/* FalsiFind — chat-first verification interface.
   Brand cue: the highlighter. Evidence is shown the way a careful reader marks it. */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --surface-3: #ebe9e3;
  --line: #e7e5de;
  --line-2: #d6d3c9;
  --ink: #141413;
  --ink-2: #4a4944;
  --ink-3: #87857d;
  --hl: #ffe45c;
  --hl-soft: rgba(255, 212, 0, .34);
  --focus: #1f5bd1;

  --true: #137a3d;  --true-soft: #e8f5ed;  --true-line: #bfe2cb;
  --false: #c22a1d; --false-soft: #fcedeb; --false-line: #f2c6c0;
  --mixed: #ad5d00; --mixed-soft: #fcf3e3; --mixed-line: #eed4a6;
  --unres: #5f5d57; --unres-soft: #f0efea; --unres-line: #dad7cd;
  --answer: #1f5bd1; --answer-soft: #eaf0fd; --answer-line: #c7d7f7;

  --sh-1: 0 1px 2px rgba(20, 20, 19, .06);
  --sh-2: 0 1px 2px rgba(20, 20, 19, .04), 0 12px 32px -14px rgba(20, 20, 19, .22);
  --sh-3: 0 2px 8px rgba(20, 20, 19, .05), 0 36px 72px -28px rgba(20, 20, 19, .36);
  --ui: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-out: cubic-bezier(.4, 0, 1, 1);
  --panel-w: 468px;
  --header-h: 56px;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #121211;
    --surface: #1a1a19;
    --surface-2: #212120;
    --surface-3: #2a2a28;
    --line: #2a2927;
    --line-2: #3a3935;
    --ink: #f1f0eb;
    --ink-2: #bcbab1;
    --ink-3: #85837b;
    --hl: #f5d548;
    --hl-soft: rgba(245, 213, 72, .26);
    --focus: #86a8f5;
    --true: #57c486;  --true-soft: #13261b;  --true-line: #24503a;
    --false: #f2766b; --false-soft: #2c1714; --false-line: #5c2a24;
    --mixed: #e9aa52; --mixed-soft: #2b2010; --mixed-line: #5b431b;
    --unres: #aaa89f; --unres-soft: #222220; --unres-line: #3a3935;
    --answer: #86a8f5; --answer-soft: #141d31; --answer-line: #283c6b;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .8);
    --sh-3: 0 2px 8px rgba(0, 0, 0, .5), 0 36px 80px -28px rgba(0, 0, 0, .9);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --surface: #1a1a19;
    --surface-2: #212120;
    --surface-3: #2a2a28;
    --line: #2a2927;
    --line-2: #3a3935;
    --ink: #f1f0eb;
    --ink-2: #bcbab1;
    --ink-3: #85837b;
    --hl: #f5d548;
    --hl-soft: rgba(245, 213, 72, .26);
    --focus: #86a8f5;
    --true: #57c486;  --true-soft: #13261b;  --true-line: #24503a;
    --false: #f2766b; --false-soft: #2c1714; --false-line: #5c2a24;
    --mixed: #e9aa52; --mixed-soft: #2b2010; --mixed-line: #5b431b;
    --unres: #aaa89f; --unres-soft: #222220; --unres-line: #3a3935;
    --answer: #86a8f5; --answer-soft: #141d31; --answer-line: #283c6b;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px -14px rgba(0, 0, 0, .8);
    --sh-3: 0 2px 8px rgba(0, 0, 0, .5), 0 36px 80px -28px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 15.5px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--hl-soft); }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── Motion primitives ──────────────────────────────────────────────── */
@keyframes in-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes in-fade { from { opacity: 0; } }
@keyframes out-fade { to { opacity: 0; } }
@keyframes in-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes in-scale { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes out-scale { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes in-right { from { transform: translateX(100%); } }
@keyframes out-right { to { transform: translateX(100%); } }
@keyframes in-left { from { transform: translateX(-100%); } }
@keyframes out-left { to { transform: translateX(-100%); } }
@keyframes in-bottom { from { transform: translateY(100%); } }
@keyframes out-bottom { to { transform: translateY(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes stripes { to { background-position: 24px 0; } }
@keyframes mark-in { from { background-size: 0% 100%; } }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 6px var(--hl-soft); } }
.enter { animation: in-up .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.spin { animation: spin .85s linear infinite; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
::view-transition-group(composer) { animation-duration: .5s; }
::view-transition-group(*) { animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.ibtn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2); transition: background .2s, color .2s; }
.ibtn:hover { background: var(--surface-2); color: var(--ink); }
.ibtn.sm { width: 32px; height: 32px; border-radius: 9px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 550; white-space: nowrap; transition: border-color .2s, background .2s, transform .15s; }
.pill:hover { border-color: var(--line-2); background: var(--surface-2); }
.pill:active { transform: scale(.98); }
.pill .muted { color: var(--ink-3); font-weight: 500; }
.send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--ink); color: var(--bg); transition: opacity .2s, transform .15s, background .2s; }
.send:disabled { opacity: .25; cursor: default; }
.send:not(:disabled):active { transform: scale(.94); }

/* ── Brand ──────────────────────────────────────────────────────────── */
.mark { display: inline-grid; place-items: center; border-radius: 30%; background: var(--ink); color: var(--bg); flex: none; }
.mark svg { width: 66%; height: 66%; }
.hemeron { display: inline-block; height: 1.02em; width: auto; vertical-align: baseline; color: var(--ink); }

/* Hemeron wordmark: optically centred on the text — its lowercase body (not the tall "h")
   sits on the line's centre. Height 1.35em → shift down ≈ 0.33 × 1.35em − 0.3em. */
.hemeron { height: 1.35em; vertical-align: -0.15em; }

/* ── Shell ──────────────────────────────────────────────────────────── */
:root { --side-w: 272px; --card-w: 312px; }
.shell { display: flex; min-height: 100dvh; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

/* Sidebar (history) */
.side { position: sticky; top: 0; height: 100dvh; width: var(--side-w); flex: none; overflow: hidden; background: var(--surface-2); border-right: 1px solid var(--line); transition: width .42s var(--ease), border-color .3s; }
.shell[data-side="closed"] .side { width: 0; border-right-color: transparent; }
.side-in { width: var(--side-w); height: 100%; display: flex; flex-direction: column; transition: opacity .25s, transform .42s var(--ease); }
.shell[data-side="closed"] .side-in { opacity: 0; transform: translateX(-24px); }
.side-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; padding: 6px 8px 6px 2px; border: 0; background: none; border-radius: 10px; font-weight: 650; font-size: 16.5px; letter-spacing: -.015em; text-decoration: none; color: var(--ink); }
.brand .mark { width: 28px; height: 28px; }
.newbtn { margin: 4px 10px 10px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); transition: border-color .2s, background .2s; }
.newbtn:hover { border-color: var(--line-2); }
.newbtn kbd { margin-left: auto; font: 500 11px var(--ui); color: var(--ink-3); }
.hist { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
.hist .grp { margin: 14px 8px 6px; font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.hitem { position: relative; animation: in-up .35s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }
.hitem a { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 7px 34px 7px 7px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s; }
.hitem a:hover { background: var(--surface-3); }
.hitem a.on { background: var(--surface); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.hthumb { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); }
.hthumb.v-false, .hthumb.v-mostly_false { background: var(--false-soft); color: var(--false); }
.hthumb.v-true, .hthumb.v-mostly_true { background: var(--true-soft); color: var(--true); }
.hthumb.v-mixed { background: var(--mixed-soft); color: var(--mixed); }
.htext { min-width: 0; }
.htext b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htext span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.htext .vd { width: 7px; height: 7px; border-radius: 50%; background: var(--unres); }
.hitem .del { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .15s; }
.hitem:hover .del, .hitem .del:focus-visible { opacity: 1; }
@media (hover: none) { .hitem .del { opacity: .65; } }
.hist-empty { margin: 18px 16px; color: var(--ink-3); font-size: 13.5px; }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 10px 10px 12px; border-top: 1px solid var(--line); }
.themes { position: relative; display: grid; grid-template-columns: repeat(3, 32px); padding: 3px; border-radius: 11px; background: var(--surface-3); }
.themes .ind { position: absolute; top: 3px; left: 3px; width: 32px; height: 28px; border-radius: 8px; background: var(--surface); box-shadow: var(--sh-1); transition: transform .35s var(--ease); }
.themes button { position: relative; z-index: 1; height: 28px; border: 0; background: none; border-radius: 8px; color: var(--ink-3); display: grid; place-items: center; transition: color .2s; }
.themes button.on { color: var(--ink); }
.side-foot .ibtn { margin-left: auto; }

/* Mobile drawer */
@media (max-width: 899px) {
  .side { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; height: auto; width: min(320px, 88vw); border-right: 0; box-shadow: var(--sh-3); animation: in-left .38s var(--ease) both; }
  .side[data-state="closing"] { animation: out-left .25s var(--ease-out) both; }
  .side-in { width: 100%; }
  .shell[data-side="closed"] .side { width: min(320px, 88vw); }
  .shell[data-side="closed"] .side-in { opacity: 1; transform: none; }
}

/* Top bar */
.top { position: sticky; top: 0; z-index: 25; height: var(--header-h); display: flex; align-items: center; gap: 6px; padding: 0 12px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); transition: box-shadow .25s; }
.top.line { box-shadow: 0 1px 0 var(--line); }
.top .title { min-width: 0; flex: 1; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: in-fade .3s both; }
.top .spacer { flex: 1; }
.top .brand { margin-right: 0; }

/* ── Start ──────────────────────────────────────────────────────────── */
.column { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.start { flex: 1; display: flex; flex-direction: column; }
.start-core { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 8px; padding-bottom: 24px; }
.hello { text-align: center; margin-bottom: 24px; }
.hello .mark { width: 46px; height: 46px; margin-bottom: 18px; box-shadow: var(--sh-2); }
.hello h1 { margin: 0; font: 500 clamp(32px, 5.2vw, 46px)/1.1 var(--serif); letter-spacing: -.02em; }
.hello h1 em { font-style: normal; background: linear-gradient(var(--hl-soft), var(--hl-soft)) no-repeat 0 85% / 100% 36%; padding: 0 .06em; animation: mark-in .9s .35s var(--ease) both; }
.hello p { margin: 12px auto 0; max-width: 540px; color: var(--ink-2); font-size: 16.5px; }

.composer { view-transition-name: composer; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--sh-2); transition: border-color .2s, box-shadow .25s; }
.composer:focus-within { border-color: var(--line-2); box-shadow: var(--sh-2), 0 0 0 4px color-mix(in srgb, var(--focus) 16%, transparent); }
.composer textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 16px 18px 6px; font-size: 16.5px; line-height: 1.5; max-height: 220px; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px 8px; }
.composer-bar .hint { margin-right: auto; color: var(--ink-3); font-size: 12.5px; padding-left: 6px; }
.attach-row { display: flex; gap: 8px; padding: 12px 14px 0; flex-wrap: wrap; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); animation: in-pop .35s var(--ease) both; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; }
.mic.on { color: #fff; background: var(--false); animation: rec 1.4s ease-in-out infinite; }
@keyframes rec { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--false) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.listening { display: flex; align-items: center; gap: 8px; padding: 0 18px 4px; font-size: 12.5px; color: var(--false); font-weight: 600; animation: in-fade .2s both; }
.listening i { width: 7px; height: 7px; border-radius: 50%; background: var(--false); animation: rec 1.4s infinite; }

.cases { margin-top: 28px; }
.cases-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin: 0 0 10px 4px; }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.case { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); text-align: left; transition: border-color .2s, transform .3s var(--ease), box-shadow .3s; }
.case:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--sh-2); }
.case .pic { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.case .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.case:hover .pic img { transform: scale(1.04); }
.case .pic .tag { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(6px); }
.case .txt { padding: 10px 12px 12px; }
.case b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.case small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.case.busy { opacity: .6; pointer-events: none; }
@media (max-width: 760px) {
  .cases-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 2px 20px 8px; margin: 0 -20px; scrollbar-width: none; }
  .cases-grid::-webkit-scrollbar { display: none; }
  .case { flex: 0 0 72%; scroll-snap-align: start; }
}

.colophon { display: flex; justify-content: center; padding: 18px 16px 24px; }
.by { display: inline-block; text-decoration: none; color: var(--ink-3); font-size: 13px; line-height: 1; white-space: nowrap; }
.by .hemeron { margin-left: .32em; color: var(--ink-2); transition: color .2s; }
.by:hover .hemeron { color: var(--ink); }

/* ── Conversation ───────────────────────────────────────────────────── */
.chatwrap { flex: 1; transition: padding-right .45s var(--ease); }
@media (min-width: 1200px) { .stage.with-card .chatwrap, .stage.with-card .dock { padding-right: calc(var(--card-w) + 28px); } }
.chat { padding-top: 14px; padding-bottom: 20px; }
.msg { margin: 0 0 26px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; animation: in-up .4s var(--ease) both; }
.msg.user .imgs { display: flex; gap: 6px; }
.msg.user .imgs img { width: 148px; height: 148px; object-fit: cover; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.bubble { max-width: min(560px, 86%); padding: 10px 15px; border-radius: 20px 20px 6px 20px; background: var(--surface-3); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.msg.bot { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.msg.bot > .mark { width: 30px; height: 30px; margin-top: 1px; }
.bot-body { min-width: 0; }

.status { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.shimmer { font-weight: 600; font-size: 15px; background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink) 25%, var(--ink-3) 50%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 2.2s linear infinite; }
.elapsed { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 8px 0 14px; }
.track i { height: 4px; border-radius: 99px; background: var(--surface-3); position: relative; overflow: hidden; }
.track i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.track i.done::after { transform: scaleX(1); }
.track i.active::after { transform: scaleX(1); background: repeating-linear-gradient(-45deg, var(--ink) 0 6px, var(--ink-3) 6px 12px); opacity: .5; animation: stripes .7s linear infinite; }
.reviewing { margin: 0 0 12px; font: italic 400 16.5px/1.5 var(--serif); color: var(--ink-2); animation: in-fade .4s both; }
.found { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 30px; }
.stack { display: inline-flex; padding-left: 6px; }
.stack .fav { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); animation: in-pop .4s var(--ease) both; }
.pill .stack .fav { box-shadow: 0 0 0 2px var(--surface); }
.found-text { font-size: 13.5px; color: var(--ink-2); }
.linkish { border: 0; background: none; padding: 5px 8px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; transition: background .2s; }
.linkish:hover { background: var(--surface-2); }
.fav { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface); }
.fav.none { display: inline-grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }

.answer { animation: in-fade .35s var(--ease) both; }
.vrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; min-height: 32px; }
.vpill { --c: var(--unres); --s: var(--unres-soft); --l: var(--unres-line); display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 9px; border-radius: 999px; background: var(--s); color: var(--c); box-shadow: inset 0 0 0 1px var(--l); font-weight: 700; font-size: 14.5px; animation: in-scale .45s var(--ease) both; white-space: nowrap; }
.vpill.sm { height: 24px; padding: 0 9px 0 6px; font-size: 12.5px; gap: 5px; }
.v-true, .v-mostly_true { --c: var(--true); --s: var(--true-soft); --l: var(--true-line); }
.v-false, .v-mostly_false { --c: var(--false); --s: var(--false-soft); --l: var(--false-line); }
.v-mixed { --c: var(--mixed); --s: var(--mixed-soft); --l: var(--mixed-line); }
.v-not_applicable { --c: var(--answer); --s: var(--answer-soft); --l: var(--answer-line); }
.conf { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background .4s var(--ease); transition-delay: calc(var(--i) * 110ms + 150ms); }
.dots i.on { background: var(--ink-2); }
.headline { margin: 0 0 8px; font: 500 21px/1.38 var(--serif); letter-spacing: -.01em; }
.summary { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.qa { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--answer-soft); box-shadow: inset 0 0 0 1px var(--answer-line); }
.skel { height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%) 0 0 / 200% 100%; animation: sheen 1.3s linear infinite; }
.skel + .skel { margin-top: 9px; }

.keyev { display: grid; gap: 8px; margin: 16px 0 0; }
.kq { position: relative; display: block; width: 100%; text-align: left; padding: 12px 14px 11px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .2s, box-shadow .2s; animation: in-up .5s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 120ms); }
.kq:hover { border-color: var(--line-2); box-shadow: var(--sh-1); }
.kq::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--unres); }
.kq.sup::before { background: var(--true); } .kq.con::before { background: var(--false); }
.kq q { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; quotes: "“" "”"; font: 400 15.5px/1.5 var(--serif); color: var(--ink); }
.kq .meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.kq .meta b { color: var(--ink-2); font-weight: 600; }
.kq .meta .go { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); font-weight: 600; transition: color .2s; }
.kq:hover .meta .go { color: var(--ink); }
.ok { color: var(--true); }

.actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.actions .spacer { flex: 1; }
.disclose { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.disclose > button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 6px 5px 2px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.disclose > button:hover { color: var(--ink); }
.chev { transition: transform .35s var(--ease); }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--ease), opacity .3s var(--ease); }
.collapse.open { grid-template-rows: 1fr; opacity: 1; }
.collapse > div { overflow: hidden; min-height: 0; }
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 2px 2px; }
.notes h4 { margin: 0 0 6px; font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.notes ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.notes li + li { margin-top: 4px; }
@media (max-width: 620px) { .notes { grid-template-columns: 1fr; } }
.reply p { margin: 3px 0 0; font-size: 15.5px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--false-soft); box-shadow: inset 0 0 0 1px var(--false-line); font-size: 14px; }
.alert .icon { color: var(--false); }
.alert .pill { margin-left: auto; }

/* Dock */
.dock { position: sticky; bottom: 0; z-index: 20; padding: 26px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 42%); pointer-events: none; transition: padding-right .45s var(--ease); }
.dock .composer { pointer-events: auto; border-radius: 20px; }
.dock-row { display: flex; align-items: flex-end; gap: 2px; padding: 6px; }
.dock-row .ibtn { flex: none; }
.dock .composer textarea { flex: 1; min-width: 0; padding: 9px 6px; font-size: 16px; min-height: 40px; }
.dock .attach-row { padding: 10px 10px 0; }
.dock .listening { padding: 4px 14px 0; }
.dropzone { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: in-fade .2s both; pointer-events: none; }
.dropzone[data-state="closing"] { animation: out-fade .18s both; }
.dropzone > div { display: grid; justify-items: center; gap: 10px; padding: 34px 44px; border: 2px dashed var(--line-2); border-radius: 26px; background: var(--surface); box-shadow: var(--sh-3); font-weight: 600; animation: in-scale .3s var(--ease) both; }
.dropzone small { font-weight: 500; color: var(--ink-3); }

/* ── Floating context card (Codex-style) ────────────────────────────── */
.ctx { position: fixed; z-index: 22; top: calc(var(--header-h) + 8px); right: 16px; width: var(--card-w); max-height: calc(100dvh - var(--header-h) - 120px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-2); padding: 6px 0 8px; animation: in-scale .4s var(--ease) both; }
.ctx[data-state="closing"] { animation: out-scale .22s var(--ease-out) both; }
.ctx-sec { padding: 10px 14px 8px; }
.ctx-sec + .ctx-sec { border-top: 1px solid var(--line); }
.ctx-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ctx-h .n { color: var(--ink-3); font-weight: 500; }
.ctx-h .ibtn { margin-left: auto; width: 26px; height: 26px; border-radius: 8px; }
.ctx-row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; border-radius: 10px; background: none; text-align: left; color: var(--ink); font-size: 13.5px; transition: background .15s; animation: in-up .35s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
button.ctx-row:hover { background: var(--surface-2); }
.ctx-row .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-row .lbl.q { font: 400 14.5px/1.35 var(--serif); }
.ctx-row .r { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctx-row .st-done { color: var(--ink); } .ctx-row .st-wait { color: var(--ink-3); opacity: .5; }
.ctx-row .ico-con { color: var(--false); } .ctx-row .ico-sup { color: var(--true); } .ctx-row .ico-unr { color: var(--unres); }
.ctx-row.dim { color: var(--ink-3); }
.ctx-more { margin: 2px -2px 0; border: 0; background: none; padding: 5px 6px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.ctx-more:hover { color: var(--ink); background: var(--surface-2); }
.ctx-sec.flash { animation: secflash 1.2s var(--ease); }
@keyframes secflash { 30% { background: var(--hl-soft); } }
.ctx-claim { margin: 0 0 8px; font: italic 400 14.5px/1.45 var(--serif); color: var(--ink-2); }
.ctx-head { display: flex; align-items: center; gap: 8px; padding: 6px 14px 8px; }
.ctx-head .t { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 1199px) {
  .ctx { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 78dvh; border-radius: 22px 22px 0 0; z-index: 46; padding-top: 18px; animation-name: in-bottom; }
  .ctx[data-state="closing"] { animation-name: out-bottom; }
  .ctx::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 99px; background: var(--line-2); }
}
@media (min-width: 900px) and (max-width: 1199px) { .ctx { left: auto; right: 16px; bottom: 16px; width: 380px; border-radius: 20px; padding-top: 6px; } .ctx::before { display: none; } }

/* ── Integrated browser ─────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 44; background: rgba(12, 12, 11, .38); animation: in-fade .25s both; }
.scrim[data-state="closing"] { animation: out-fade .22s both; }
.browser { position: fixed; z-index: 50; top: 10px; right: 10px; bottom: 10px; width: min(960px, calc(100vw - 20px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-3); overflow: hidden; animation: in-right .45s var(--ease) both; }
.browser[data-state="closing"] { animation: out-right .3s var(--ease-out) both; }
@media (max-width: 720px) { .browser { top: 6dvh; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0; animation-name: in-bottom; } .browser[data-state="closing"] { animation-name: out-bottom; } }
.bbar { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 11px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--ink-2); }
.addr b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.addr span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.addr .lock { color: var(--true); }
.seg2 { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: var(--surface-3); }
.seg2 .ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px; background: var(--surface); box-shadow: var(--sh-1); transition: transform .35s var(--ease); }
.seg2 button { position: relative; z-index: 1; height: 30px; padding: 0 12px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--ink-3); transition: color .2s; display: inline-flex; align-items: center; gap: 6px; }
.seg2 button.on { color: var(--ink); }
.quotes { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.qchip { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 320px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--ink-2); transition: background .2s, border-color .2s, color .2s; }
.qchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--serif); font-size: 13.5px; }
.qchip.on { background: var(--hl-soft); border-color: transparent; color: var(--ink); }
.qchip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.con { background: var(--false); } .dot.sup { background: var(--true); } .dot.unr { background: var(--unres); }
.bview { position: relative; flex: 1; min-height: 0; background: #fff; }
.bview iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.bload { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface); color: var(--ink-3); font-size: 13.5px; transition: opacity .3s; }
.bload.hide { opacity: 0; pointer-events: none; }
.bload div { display: grid; justify-items: center; gap: 10px; }
.btext { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 30px; background: var(--surface); }
.btext h2 { margin: 0 0 6px; font: 500 22px/1.3 var(--serif); }
.btext .d { margin: 0 0 16px; font-size: 13px; color: var(--ink-3); }
.frag { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; font: 400 16.5px/1.7 var(--serif); color: var(--ink-2); }
.frag.cited { color: var(--ink); background: var(--surface-2); }
.frag.target { animation: flash 1.6s .25s var(--ease) both; }
.frag mark { color: inherit; padding: .05em .12em; border-radius: 3px; background: linear-gradient(var(--hl-soft), var(--hl-soft)) no-repeat 0 0 / 100% 100%; animation: mark-in .9s .3s var(--ease) both; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.frag mark.con { box-shadow: inset 0 -2px 0 var(--false); }
.frag mark.sup { box-shadow: inset 0 -2px 0 var(--true); }
.bfoot { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--ink-3); }
.bfoot mark { background: var(--hl-soft); color: inherit; padding: 0 3px; border-radius: 3px; }
.stance { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; }
.stance.con { color: var(--false); } .stance.sup { color: var(--true); } .stance.unr { color: var(--unres); }

/* ── Modal & toast ──────────────────────────────────────────────────── */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal { pointer-events: auto; position: relative; width: min(600px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: 24px; box-shadow: var(--sh-3); animation: in-scale .38s var(--ease) both; }
.modal[data-state="closing"] { animation: out-scale .22s var(--ease-out) both; }
.modal-body { padding: 28px 30px 6px; }
.modal-body h2 { margin: 0 0 8px; font: 500 28px/1.15 var(--serif); letter-spacing: -.015em; }
.modal-body > p { margin: 0 0 18px; color: var(--ink-2); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.how .node { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.how b { display: block; font-weight: 650; font-size: 14.5px; }
.how span { color: var(--ink-2); font-size: 14px; }
.modal-body h3 { margin: 22px 0 4px; font-size: 14px; font-weight: 650; }
.modal-body h3 + p { margin: 0; font-size: 14px; color: var(--ink-2); }
.modal-foot { display: flex; justify-content: center; margin-top: 24px; padding: 16px 30px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal .close { position: absolute; top: 12px; right: 12px; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 116px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--sh-3); animation: in-scale .3s var(--ease) both; }
.toast[data-state="closing"] { animation: out-scale .2s var(--ease-out) both; }
