/* ================================================================ 2.5: fresh
   The whole app, on the Mac and the phone, one step lighter and clearer.
   Same Thirdhand (its colours, its character, black buttons for the thing
   to do next); more air, finer edges instead of heavy shadows, a calmer
   ground, one type scale, and the box you type in at the centre of it all:
   it opens into what you can find and do (quick.js) as one surface.

   Loaded after styles.css, profile.css and answer.css (and on the phone,
   before its layout file). */

/* ---------- tokens ---------- */
:root {
  --bg: #f2f4f0;
  --surface: #ffffff;
  --surface-2: #f6f8f4;
  --surface-3: #ebefe8;
  --line: rgba(20, 24, 22, 0.075);
  --line-2: rgba(20, 24, 22, 0.13);
  --text: #141716;
  --text-2: #49514c;
  --text-3: #646c66;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --edge: 0 0 0 1px var(--line);
  --shadow-sm: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 24, 22, .04);
  --shadow-md: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 24, 22, .04), 0 10px 28px -14px rgba(20, 24, 22, .18);
  --shadow-lg: 0 0 0 1px var(--line), 0 2px 6px rgba(20, 24, 22, .05), 0 28px 60px -20px rgba(20, 24, 22, .28);
  --ring: 0 0 0 4px color-mix(in srgb, var(--coral) 12%, transparent);
  --device-bg: #e3e8e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1110;
    --surface: #161a18;
    --surface-2: #1b201e;
    --surface-3: #242a27;
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.13);
    --text: #eef2ed;
    --text-2: #b6beb6;
    --text-3: #8c958d;
    --shadow-sm: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 0 0 1px var(--line-2), 0 30px 70px -20px rgba(0, 0, 0, .75);
    --device-bg: #0a0c0b;
  }
}

/* ---------- type: one scale ---------- */
body { font-size: 14px; letter-spacing: -.003em; }
h1, h2, h3 { letter-spacing: -.02em; }
::selection { background: color-mix(in srgb, var(--cobalt) 26%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--coral) 70%, transparent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- frame: one canvas, a floating rail, a calm top ---------- */
.backdrop { left: 0; border-top-left-radius: 0; }
.rail { margin: 0 0 12px 12px; width: 72px; padding: 8px 0 10px; border-radius: 26px; background: color-mix(in srgb, var(--surface) 62%, transparent); box-shadow: var(--shadow-sm); }
.rail-btn { width: 58px; }
.titlebar { height: 52px; }
.status-pill { height: 32px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.status-pill.s-working { box-shadow: none; }
.rail { gap: 4px; }
.rail-btn { padding: 10px 0 8px; border-radius: 18px; font-size: 11px; color: var(--text-3); }
.rail-btn[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.rail-btn[aria-current="page"] svg { color: var(--coral); }
.rail-me { box-shadow: var(--shadow-sm); }
.workspace { gap: 14px; }
.sidebar { border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.device { border-radius: var(--r-xl); box-shadow: var(--shadow-md); }

/* ---------- buttons ---------- */
.btn { height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 600; letter-spacing: -.005em; transition: background .15s, transform .12s var(--ease), box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn.small { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 4px 12px -6px color-mix(in srgb, var(--btn) 70%, transparent); }
.btn.ghost:hover { background: var(--surface-2); }
.icon-btn { border-radius: 12px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.round-btn { transition: transform .15s var(--ease), background .15s, opacity .15s; }
.round-btn:active { transform: scale(.94); }

/* ---------- the box: the centre of it all ---------- */
.composer-box { border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid transparent; transition: box-shadow .2s var(--ease), border-color .2s; }
.composer-box:focus-within { border-color: color-mix(in srgb, var(--coral) 30%, transparent); box-shadow: var(--shadow-md), var(--ring); }
.home-q { font-size: 34px; font-weight: 750; letter-spacing: -.03em; margin: 8px 0 26px; }
.home-ask .composer-box { border-radius: 30px; box-shadow: var(--shadow-md); padding: 20px 14px 12px 24px; }
.home-ask .composer-box:focus-within { box-shadow: var(--shadow-lg), var(--ring); }
.home-ask .composer textarea { font-size: 17px; }
.chip { border-radius: 999px; background: var(--surface-2); box-shadow: var(--edge); }

/* ---------- finding and doing (quick.js): the box opens into one list ---------- */
.quick { position: absolute; z-index: 40; left: 0; right: 0; bottom: calc(100% + 8px); max-height: min(60vh, 460px); overflow-y: auto; padding: 6px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); animation: quick-in .16s var(--ease); overscroll-behavior: contain; }
.home-ask .quick { top: calc(100% + 8px); bottom: auto; }
.app.layout-chat .composer > .quick { left: max(12px, calc((100% - 784px) / 2)); right: max(12px, calc((100% - 784px) / 2)); }
.sidebar .composer > .quick { left: 12px; right: 12px; }
@keyframes quick-in { from { opacity: 0; transform: translateY(4px) scale(.99); } }
.home-ask .quick { animation-name: quick-down; }
@keyframes quick-down { from { opacity: 0; transform: translateY(-4px) scale(.99); } }
.quick-head { padding: 10px 12px 4px; font-size: 12px; font-weight: 650; color: var(--text-3); }
.quick-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 48px; padding: 7px 10px; border-radius: 14px; cursor: pointer; }
.quick-row.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.quick-ico { --hc: var(--text-2); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--hc); }
.quick-row.on .quick-ico { background: var(--surface); box-shadow: var(--edge); }
.quick-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quick-ico .buddy, .quick-face .buddy { width: 24px; height: 24px; stroke: none; }
.quick-row.k-ask .quick-ico { background: var(--coral-soft); color: var(--coral); }
.quick-row.k-find .quick-ico { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--text)); }
.quick-face { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--hc) 15%, var(--surface)); }
.quick-ico:has(.quick-face) { background: none; box-shadow: none; }
.quick-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.quick-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-row.k-ask .quick-t b { font-weight: 500; }
.quick-t small { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-hint { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; font-weight: 600; opacity: 0; transition: opacity .12s; }
.quick-row.on .quick-hint { opacity: 1; }
.quick-hint kbd { min-width: 24px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-sm); font: 600 12px/1 var(--font); color: var(--text-2); }
.quick-switch { position: relative; width: 40px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: background .18s; }
.quick-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.quick-switch.on { background: var(--mint); }
.quick-switch.on i { transform: translateX(16px); }
.quick-foot { display: flex; gap: 14px; justify-content: flex-end; padding: 8px 12px 4px; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 4px; }

/* ---------- Home ---------- */
.home-pill { height: 36px; box-shadow: none; }
.today-brief { gap: 14px; margin-top: 30px; }
.tb-needs-h { font-size: 20px; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.tb-needs-h em { font-style: normal; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--coral); color: var(--on-accent); font: 700 13px/1 var(--font); }
.tb-list { gap: 12px; }
.tb-card { border-radius: 24px; padding: 18px 20px 16px; box-shadow: var(--shadow-md); }
.tb-card.k-needs, .tb-card.k-ask { box-shadow: var(--shadow-md); }
.tb-card.k-needs::before, .tb-card.k-ask::before { content: ""; position: absolute; left: 0; top: 22px; width: 3px; height: 26px; border-radius: 0 3px 3px 0; background: var(--hc, var(--coral)); }
.tb-card { position: relative; }
.tb-face { width: 40px; height: 40px; border-radius: 13px; }
.tb-face .buddy { width: 29px; height: 29px; }
.tb-title-l { font-size: 16.5px; letter-spacing: -.012em; }
.tb-draft { border-radius: 16px; background: var(--surface-2); box-shadow: var(--edge); }
.tb-draft-h { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.tb-chip { box-shadow: none; }
.tb-opts { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 2px; }
.tb-doneline-b, .tb-up { border-radius: 18px; }

/* ---------- Chats column ---------- */
.pp-head h2 { font-size: 24px; letter-spacing: -.025em; }
.pp-row { border-radius: 16px; min-height: 56px; }
.pp-row.on { box-shadow: var(--shadow-sm); }
.pp-face { border-radius: 14px; }
.pp-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 650; }

/* ---------- a chat ---------- */
.log { gap: 16px; }
.msg.user { background: var(--cobalt-soft); color: var(--text); border-radius: 22px 22px 8px 22px; padding: 11px 16px; }
.msg.assistant { line-height: 1.6; }
.avatar { border-radius: 11px; }
.activity { border-left-color: var(--line-2); }
.activity summary { border-radius: 12px; }
.activity summary:hover { background: var(--surface-2); }
.call-bar { border-radius: 22px; box-shadow: var(--shadow-md); }
.welcome h2 { font-size: 32px; font-weight: 750; letter-spacing: -.03em; }

/* ---------- a teammate's page (2.5.1): the same cards as Home ---------- */
.prof-card { border: 0; border-radius: 24px; box-shadow: var(--shadow-md); }
.prof-needs { border: 0; background: var(--surface); box-shadow: var(--shadow-md), inset 0 0 0 1.5px color-mix(in srgb, var(--coral) 35%, transparent); }
.prof-card .rep { border-radius: 18px; border-color: var(--line); box-shadow: none; }
.prof-card-t h2 { font-size: 17px; letter-spacing: -.012em; }
.prof-tabs button { border-radius: 12px 12px 0 0; }

/* ---------- sheets and Settings ---------- */
dialog.sheet { border-radius: 26px; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: color-mix(in srgb, var(--bg) 40%, rgba(10, 12, 11, .35)); backdrop-filter: blur(2px); }
.settings-nav button { border-radius: 12px; }
.settings-nav button.active { box-shadow: var(--shadow-sm); }
input.switch { transition: background .18s; }

/* Your phone (2.5.1): one card of rows, each with its phone and a quiet Remove. */
.rmt-phone { align-items: stretch; gap: 10px; }
.rmt-phone > .btn { align-self: flex-start; }
.rmt-devices { border-top: 0; padding: 4px; gap: 0; border-radius: 18px; background: var(--surface-2); box-shadow: var(--edge); }
.rmt-dev { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 14px; }
.rmt-dev + .rmt-dev { box-shadow: 0 -1px 0 var(--line); }
.rmt-dev:hover { background: var(--surface); box-shadow: none; }
.rmt-dev:hover + .rmt-dev { box-shadow: none; }
.rmt-dev-i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--surface); box-shadow: var(--edge); color: var(--text-2); }
.rmt-dev-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rmt-dev-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rmt-dev-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rmt-dev-t small { color: var(--text-3); font-size: 12px; }
.rmt-dev button { flex: none; }
.rmt-dev-more { align-self: center; margin: 4px 0 2px; }

/* Apps: the ideas wear line icons, not emoji. */
.apps-idea svg.apps-idea-i { width: 16px; height: 16px; fill: none; stroke: var(--coral); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }


/* ---------- toasts ---------- */
.toast { border-radius: 16px; box-shadow: var(--shadow-lg); }

@media (prefers-reduced-motion: reduce) {
  .quick, .home-ask .quick { animation: none; }
  .btn:active, .round-btn:active { transform: none; }
}
