/* Product-UI components shared by landing pages and demo workspaces. */

.serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.015em; }
.today-greeting { font: 600 clamp(28px, 3vw, 36px)/1.15 var(--font-serif); letter-spacing: -.02em; }
.today-sub { color: var(--ink-2); font-size: 17px; margin-top: 6px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 18px 16px; min-width: 0; }
.stat b { display: block; font: 600 30px/1 var(--font-serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.stat span { display: block; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.stat.t3 b { color: var(--tone-3); }
.stat.t4 b { color: var(--tone-4); }
.stat.t1 b { color: var(--tone-1); }

/* Section headers inside the app */
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.app-head h2, .app-head h3 { font: 600 22px/1.2 var(--font-serif); letter-spacing: -.015em; display: flex; align-items: center; gap: 12px; }
.app-head p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.app-head .ic { color: var(--ink); display: inline-grid; }
.link-quiet { font-size: 14px; font-weight: 500; color: var(--tone-4); text-decoration: none; white-space: nowrap; background: none; border: 0; cursor: pointer; padding: 4px 0; }
.link-quiet:hover { color: var(--ink); }
.dot-red { width: 14px; height: 14px; border-radius: 50%; background: var(--tone-3); flex: none; }

/* Focus container + cards */
.focus-wrap { background: #fbefeb; border: 1px solid #f4e1da; border-radius: 20px; padding: 22px; }
.focus-wrap .app-head p { padding-left: 26px; }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 980px) { .focus-grid { grid-template-columns: 1fr; } }
.focus-card { position: relative; display: flex; flex-direction: column; padding: 18px; background: var(--surface); border: 1px solid #f1e6e0; border-radius: 14px; text-align: left; transition: box-shadow .2s, transform .2s, opacity .4s; min-width: 0; }
.focus-card:hover { box-shadow: var(--shadow); }
.focus-card.active { box-shadow: 0 0 0 2px var(--accent); }
.fc-top { display: flex; flex-wrap: wrap-reverse; align-items: flex-start; justify-content: space-between; gap: 8px 10px; }
.fc-kind { font-size: 13px; color: var(--muted); }
.fc-name { font: 600 21px/1.2 var(--font-serif); letter-spacing: -.015em; margin-top: 2px; }
.fc-body { color: var(--ink); font-size: 15px; line-height: 1.5; margin-top: 14px; font-weight: 450; }
.fc-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 12px; }
.fc-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; position: relative; }
.btn-open { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; padding: 10px 18px; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-open:hover { background: var(--accent-hover); }
.btn-dots { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.btn-dots:hover { background: var(--surface-2); }
.btn-view { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 9px; padding: 7px 13px; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink); }
.btn-view:hover { background: var(--surface-2); }
.menu { position: absolute; z-index: 20; top: calc(100% - 4px); left: 60px; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.menu button { text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 12px; font-size: 14px; cursor: pointer; color: var(--ink); }
.menu button:hover { background: var(--surface-2); }

/* Icon circles */
.ic-circle { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink); }
.ic-circle.sm { width: 26px; height: 26px; }
.ic-blue { background: var(--tone-4-soft); color: var(--tone-4); }
.ic-green { background: var(--tone-1-soft); color: var(--tone-1); }
.ic-red { background: var(--tone-3-soft); color: var(--tone-3); }
.ic-amber { background: var(--tone-2-soft); color: var(--tone-2); }

/* Activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 72px 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0 14px 20px; }
.tl-item + .tl-item { border-top: 1px solid var(--line); }
.tl-item::before { content: ''; position: absolute; left: 1px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--muted); }
.tl-time { font-size: 13px; line-height: 1.35; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-title { font-weight: 600; font-size: 14.5px; }
.tl-text { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.tl-actions { display: flex; gap: 8px; }
.tl-item.fresh { background: linear-gradient(90deg, var(--tone-2-soft), transparent 70%); border-radius: 10px; }
@media (max-width: 640px) {
  .tl-item { grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
  .tl-time { grid-column: 2; grid-row: 1; }
  .tl-item .ic-circle { grid-row: 1 / span 2; }
  .tl-item > div:nth-of-type(1) { grid-column: 2; }
  .tl-actions { grid-column: 2; }
  .tl-actions .btn-dots { display: none; }
}

/* Side cards (Quietly watching etc.) */
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.q-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; color: inherit; }
.q-row:first-child { border-top: 0; }
.q-row:hover .q-name { text-decoration: underline; text-underline-offset: 3px; }
.q-name { font-weight: 600; font-size: 14.5px; }
.q-why { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.q-when { color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 1px; }
.q-row.fresh { background: linear-gradient(90deg, var(--tone-2-soft), transparent 80%); border-radius: 10px; }

/* Conversation */
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 94%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.msg p + p { margin-top: 8px; }
.msg-oskar { align-self: flex-start; background: var(--surface-2); border-top-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-top-right-radius: 4px; }
.msg-who { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.msg-user .msg-who { color: rgba(255, 255, 255, .6); justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 450; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; text-align: left; line-height: 1.35; }
.chip:hover { background: var(--surface-2); }
.chip:disabled { opacity: .45; cursor: default; }
.chip.static { cursor: default; }
.chip.static:hover { background: var(--surface); }
.suggest-list { display: grid; gap: 8px; }
.suggest-list .chip { width: 100%; padding: 10px 14px; font-size: 14px; }

.composer { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); padding: 12px 12px 10px 14px; }
.composer textarea, .composer input { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.5; min-height: 44px; padding: 0; }
.composer-bar { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-top: 6px; }
.composer-bar .send { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.composer-bar .send:disabled { opacity: .5; cursor: default; }
.composer:focus-within { border-color: var(--tone-4); box-shadow: 0 0 0 4px var(--tone-4-soft); }

.avatar { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font: 700 10px/1 var(--font-body); background: var(--accent); color: #fff; object-fit: cover; }
img.avatar { background: var(--tone-1-soft); }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.fade-in { animation: fadeIn .45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
