/* Suno-style stage: a warm, grainy glow over near-black, one centred column with a big composer,
   the answer underneath, and sample answers floating at the sides. Answer cards and the popup keep the
   Mac app's visual language. */
:root {
  --bg: #0b0707;
  --panel: rgba(20, 14, 14, 0.62);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --field: rgba(255, 255, 255, 0.05);
  --text: #fbf7f4;
  --muted: rgba(251, 247, 244, 0.62);
  --faint: rgba(251, 247, 244, 0.4);
  --accent: #ff7a45;
  --hot: #ff3d6e;
  --violet: #7c6cff;
  --blue: #5b8cff;
  --teal: #4fd1c5;
  --yes: #34d399;
  --mid: #fbbf24;
  --no: #f87171;
  --paper: #f6f5f2;
  --font: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 18px;
  --radius-sm: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* The floating sample cards hang past the edges on purpose; never let them scroll the page sideways. */
html, body { overflow-x: clip; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The glow: warm light pooled behind the hero, fading to the ground, with film grain on top. */
.glow {
  position: absolute; inset: 0 0 auto 0; height: 1100px; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(42% 38% at 70% 18%, rgba(196, 44, 150, 0.55), transparent 70%),
    radial-gradient(55% 45% at 22% 28%, rgba(255, 140, 40, 0.6), transparent 72%),
    radial-gradient(60% 50% at 50% 8%, rgba(214, 58, 46, 0.65), transparent 75%),
    linear-gradient(180deg, #4a1d10 0%, #2a0f0c 45%, var(--bg) 100%);
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent 100%);
  mask: linear-gradient(180deg, #000 55%, transparent 100%);
}
.glow::after {
  content: ""; position: absolute; inset: 0; opacity: 0.32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.num { font-variant-numeric: tabular-nums; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 18px 24px;
  position: absolute; top: 0; left: 0; right: 0; z-index: 20; /* over the first screen, so it can fill the window; the how-to card opens over the stage */
}
.wordmark { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-strong); }
.segmented button {
  height: 30px; padding: 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent;
  transition: color 0.15s, background 0.15s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { color: #140a08; background: #fff; }

.topbar-end { display: flex; align-items: center; gap: 10px; }

/* How to ask about a chat: a round "i" and a small card under it */
.howto-wrap { position: relative; }
.info-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  color: var(--muted); background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-strong); transition: color 0.15s, background 0.15s;
}
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.howto {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: min(340px, calc(100vw - 32px)); padding: 20px;
  border-radius: var(--radius); background: rgba(24, 16, 15, 0.94); border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); backdrop-filter: blur(18px); animation: howto-in 0.18s ease;
}
@keyframes howto-in { from { opacity: 0; transform: translateY(-4px); } }
.howto h2 { margin: 0 0 16px; font-size: 17px; font-weight: 700; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.howto li { counter-increment: step; display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; }
.howto li::before {
  content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #140a08; background: var(--accent);
}
.howto li strong { font-size: 14px; line-height: 24px; font-weight: 600; }
.howto li span { font-size: 13px; line-height: 18px; color: var(--muted); }
.howto-way + .howto-way { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.howto h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.howto-tag { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(255, 122, 69, 0.12); }
.howto-tag.quiet { color: var(--muted); background: rgba(255, 255, 255, 0.07); }
.howto-way p { margin: 0 0 12px; font-size: 13px; line-height: 19px; color: var(--muted); }
.howto-way ol { margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .howto { animation: none; } }

/* Stage */
/* minmax(0, 1fr): a long example chip must not widen the column past the screen. */
.stage { width: min(780px, 100% - 32px); margin: 0 auto; padding: 96px 0 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.hero { text-align: center; margin-bottom: 26px; }
.hero-head { --h1: clamp(34px, 5.4vw, 60px); display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(40px + 2.1 * var(--h1)); }
.hero h1 {
  margin: 0 auto; max-width: 760px;
  font-size: var(--h1); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
  text-wrap: balance; transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}
.hero h1.swap { opacity: 0; transform: translateY(8px); filter: blur(6px); }
.hero-lead { margin: 0 0 14px; font-size: 18px; line-height: 26px; font-weight: 500; color: var(--muted); }
.hero-sub { margin: 18px auto 0; max-width: 440px; font-size: 15px; line-height: 22px; color: var(--muted); }

/* The composer */
.composer {
  position: relative; padding: 14px 14px 12px; border-radius: 22px;
  background: rgba(30, 18, 16, 0.55); border: 1px solid var(--line-strong);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.composer:focus-within { border-color: rgba(255, 122, 69, 0.55); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(255, 122, 69, 0.12); }
.composer textarea#question {
  display: block; width: 100%; min-height: 64px; max-height: 220px; padding: 6px 6px 10px; resize: none;
  font: inherit; font-size: 18px; line-height: 26px; color: var(--text); background: transparent; border: 0; outline: none;
}
.composer textarea#question::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.bar-spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text); background: var(--panel-hover); border: 1px solid var(--line-strong);
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.chip kbd { font-family: var(--mono); font-size: 11px; opacity: 0.55; }
.chip.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.chip.ghost:hover { color: var(--text); background: var(--panel-hover); }
.ask {
  height: 38px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--hot), var(--accent));
  box-shadow: 0 10px 28px -10px rgba(255, 61, 110, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
}
.ask:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(255, 61, 110, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.ask:disabled { cursor: progress; opacity: 0.75; transform: none; }
:is(.ask, .chip, .btn-text, .segmented button, .keycap-btn, .example):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.under-hint { margin: 2px 0 0; text-align: center; font-size: 12.5px; color: var(--faint); }

/* "Provide context": a quiet text link under the question, opposite Ask. */
.context-toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 8px; margin-left: -2px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; color: var(--muted); background: transparent;
  transition: color 0.15s, background 0.15s;
}
.context-toggle svg { transition: transform 0.2s ease; }
.context-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.context-toggle.on { color: var(--text); }
.context-toggle.on svg { transform: rotate(45deg); }
.context-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The tray: one tone step darker than the composer, no outline, folded until asked for. */
.context-tray {
  margin: 4px 0 12px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.28);
  animation: tray 0.22s ease-out;
}
@keyframes tray { from { opacity: 0; transform: translateY(-4px); } }
.tray-hint { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--muted); }
.tray-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.context-tray .chip { background: rgba(255, 255, 255, 0.07); border-color: transparent; }
.context-tray .chip:hover { background: rgba(255, 255, 255, 0.13); border-color: transparent; }
.context-tray .chip.ghost { background: transparent; }

/* Context inside the composer, above the question */
.shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.shot {
  position: relative; flex: none; width: 76px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px;
  background: var(--field); border: 1px solid var(--line-strong);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot-tag {
  position: absolute; left: 5px; bottom: 5px; padding: 0 6px; border-radius: 999px; line-height: 16px;
  font-family: var(--mono); font-size: 9.5px; color: #fff; background: rgba(10, 6, 6, 0.75);
}
.shot-status {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px;
  font-size: 11px; color: #fff; background: rgba(10, 6, 6, 0.55); backdrop-filter: blur(2px);
}
.shot.done .shot-status { display: none; }
.shot.warn .shot-status { color: var(--no); }
.shot.warn .spinner { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent); animation: rotate 0.8s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.shot-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.shot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--hot), var(--accent)); transition: width 0.2s; }
.shot.done .shot-bar, .shot.warn .shot-bar { display: none; }

.texts { display: grid; gap: 8px; }
.texts:not(:empty) { padding-bottom: 10px; }
.text-block { position: relative; }
.text-block textarea {
  width: 100%; min-height: 76px; padding: 10px 38px 10px 12px; resize: vertical; outline: none;
  font: inherit; font-size: 13px; line-height: 19px; color: var(--text);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 12px;
}
.text-block textarea:focus { border-color: rgba(255, 122, 69, 0.5); }
.remove {
  position: absolute; top: 5px; right: 5px; z-index: 1; width: 22px; height: 22px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 14px; line-height: 1; color: #fff; background: rgba(10, 6, 6, 0.7);
}
.remove:hover { background: var(--no); }

#input-card .drop-hint {
  position: absolute; inset: 0; display: none; place-items: center; border-radius: inherit;
  font-weight: 600; color: var(--text); background: rgba(255, 122, 69, 0.14);
  border: 1px dashed var(--accent); backdrop-filter: blur(4px); pointer-events: none;
}
#input-card.drag .drop-hint { display: grid; }

/* After a paste went to Context: one click to make it the question instead. */
.paste-flip {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 6px 6px 14px; justify-self: center;
  border-radius: 999px; font-size: 12.5px; color: var(--muted);
  background: rgba(255, 122, 69, 0.1); border: 1px solid rgba(255, 122, 69, 0.3); animation: fade 0.2s ease-out;
}
.paste-flip .btn-text { color: var(--accent); font-weight: 600; }

/* Notice: guidance next to the composer. */
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius-sm); background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.28);
}
.notice-icon { flex: none; display: grid; place-items: center; width: 16px; height: 20px; color: var(--mid); }
.notice-title { display: block; font-weight: 600; color: var(--text); }
.notice-detail { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }

/* Example questions as chips under the composer */
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.example {
  max-width: 100%; padding: 8px 14px; border-radius: 999px; cursor: pointer; text-align: left;
  font: inherit; font-size: 13px; color: var(--muted); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.example.has-chat { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.example svg { flex: none; color: var(--accent); }
.example:hover { color: var(--text); border-color: rgba(255, 122, 69, 0.45); background: rgba(255, 122, 69, 0.08); }

/*
 * The chat beside the rolling question: a dark-mode iMessage thread on the same card as the floating fact check,
 * tilted like it was dropped on the page, behind the headline.
 */
.hero { position: relative; }
.hero-head, .hero-sub { position: relative; z-index: 1; }
.hero-chat {
  --chat-scale: 1.3;
  position: absolute; z-index: 0; width: 232px; border-radius: 20px; overflow: hidden; pointer-events: none;
  /* Same card as the floating fact check on the right, made solid so the bubble tails' cut-outs match it. */
  --imsg-bg: #150d0c;
  background: var(--imsg-bg); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: rotate(-7deg) scale(var(--chat-scale)) translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease;
}
.hero-chat .imsg { border-radius: 0; border: 0; box-shadow: none; background: transparent; }
.hero-chat.on { opacity: 1; transform: rotate(-7deg) scale(var(--chat-scale)); }
.hero-chat.cramped { visibility: hidden; }
.imsg {
  padding: 12px 12px 14px; border-radius: 26px; text-align: left; color: #fff; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif;
}
.imsg-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.imsg-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: linear-gradient(180deg, #a5abb8, #858994);
}
.imsg-name { font-size: 10.5px; color: rgba(255, 255, 255, 0.85); }
.imsg-body { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.imsg-time { align-self: center; margin-bottom: 6px; font-size: 9.5px; color: #8e8e93; }
.imsg-bubble {
  position: relative; max-width: 80%; padding: 6px 10px; border-radius: 16px; font-size: 12px; line-height: 15.5px;
  align-self: flex-start; background: #26252a;
}
.imsg-bubble.me { align-self: flex-end; background: #0a84ff; }
.imsg-bubble.tail { margin-bottom: 6px; }
/* The tail: a corner curl under the last bubble of each run. */
.imsg-bubble.tail::before, .imsg-bubble.tail::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 16px; }
.imsg-bubble.them.tail::before { left: -5px; border-bottom-right-radius: 12px 10px; background: #26252a; }
.imsg-bubble.them.tail::after { left: -12px; width: 12px; border-bottom-right-radius: 8px; background: var(--imsg-bg, #000); }
.imsg-bubble.me.tail::before { right: -5px; border-bottom-left-radius: 12px 10px; background: #0a84ff; }
.imsg-bubble.me.tail::after { right: -12px; width: 12px; border-bottom-left-radius: 8px; background: var(--imsg-bg, #000); }

/* Two full screens, ask and how it works, snapped while each fits the window (see syncSnap in app.js). */
html.snap { scroll-snap-type: y mandatory; }
.screen { position: relative; min-height: 100svh; display: flex; flex-direction: column; scroll-snap-align: start; }
.screen-ask .stage { flex: 1; align-content: center; padding-bottom: 24px; }
.next-cue {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 auto 22px; padding: 8px 14px; border: 0; border-radius: 14px;
  cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); background: transparent; transition: color 0.15s;
}
.next-cue:hover { color: var(--text); }
.next-cue:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.next-cue svg { animation: cue-bob 2s ease-in-out infinite; }
@keyframes cue-bob { 50% { transform: translateY(4px); } }

/* How it works */
.screen-how { justify-content: center; padding: 72px 0 40px; }
.screen-how::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 0%, rgba(214, 58, 46, 0.16), transparent 75%), radial-gradient(40% 35% at 85% 100%, rgba(196, 44, 150, 0.1), transparent 75%);
}
.tutorial { width: min(960px, 100% - 32px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.tutorial h2 { margin: 0 0 16px; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.tut-switch { margin-bottom: 28px; }
.tut-switch button[aria-selected="true"] { color: #140a08; background: #fff; }
.tut-way { width: 100%; }
.tut-steps { margin: 0; padding: 0; list-style: none; counter-reset: tut; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tut-step { counter-increment: tut; padding: 16px 16px 20px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.tut-art {
  position: relative; height: 118px; margin-bottom: 16px; padding: 14px; border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; background: rgba(255, 255, 255, 0.04);
}
.tut-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.tut-step h3::before {
  content: counter(tut); flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #140a08; background: var(--accent);
}
.tut-step p { margin: 0; font-size: 13px; line-height: 19px; color: var(--muted); }
/* The step-1 sketch is a slice of the same iMessage thread as the hero chat. */
.tut-chat { gap: 2px; padding-left: 18px; background: #000; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif; }
.tut-chat .imsg-bubble { max-width: 86%; }
.tut-chat kbd, .tut-count {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 6px; font-size: 11px;
  color: var(--text); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-strong);
}
.tut-chat kbd { font-family: var(--mono); }
.tut-input {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px;
  font-size: 13px; background: rgba(30, 18, 16, 0.55); border: 1px solid var(--line-strong);
}
.tut-caret { display: inline-block; width: 1.5px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: tut-blink 1.1s steps(1) infinite; }
@keyframes tut-blink { 50% { opacity: 0; } }
.tut-ask { flex: none; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--hot), var(--accent)); }
.tut-sources { justify-content: flex-start; gap: 9px; padding-top: 18px; }
.tut-src { display: flex; align-items: center; gap: 8px; }
.tut-src i { flex: none; width: 7px; height: 7px; border-radius: 999px; }
.tut-src b { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.tut-result { gap: 10px; }
.tut-figure { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tut-figure small { font-size: 0.5em; }
.tut-figure span { font-size: 18px; letter-spacing: 0; }
.tut-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.tut-bar i { display: block; height: 100%; border-radius: inherit; }
.tut-art .yes { color: var(--yes); }
.tut-art .no { color: var(--no); }
.tut-art i.yes { background: var(--yes); }
.tut-art i.no { background: var(--no); }
.tut-actions { display: flex; justify-content: center; margin-top: 22px; }

/* Phones: each step becomes a row, sketch beside the words, so a whole way fits on one screen. */
@media (max-width: 720px) {
  .screen-how { padding: 64px 0 28px; }
  .tutorial h2 { font-size: 24px; margin-bottom: 12px; }
  .tut-switch { margin-bottom: 18px; }
  .tut-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tut-step { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; }
  .tut-art { height: 96px; margin: 0; padding: 10px; gap: 4px; }
  .tut-chat { padding-left: 14px; }
  .tut-chat .imsg-bubble { font-size: 10px; line-height: 13px; padding: 4px 8px; border-radius: 12px; }
  .tut-chat kbd, .tut-count { right: 6px; bottom: 6px; padding: 1px 5px; font-size: 9px; }
  .tut-input { flex-direction: column; align-items: flex-start; padding: 8px; font-size: 11px; line-height: 15px; }
  .tut-ask { padding: 3px 9px; font-size: 10px; }
  .tut-figure { font-size: 32px; }
  .tut-figure span { font-size: 14px; }
  .tut-step h3 { font-size: 14px; margin-bottom: 4px; }
  .tut-step h3::before { width: 20px; height: 20px; font-size: 11px; }
  .tut-step p { font-size: 12.5px; line-height: 17px; }
  .tut-actions { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .tut-caret, .next-cue svg { animation: none; } }

/* Panels under the composer: the answer and recent questions */
.panel {
  position: relative; padding: 26px; margin-top: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
#history-wrap { margin-top: 2px; }
.panel-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
  font-family: var(--mono); font-size: 11px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.panel-title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.btn-text { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; }
.btn-text:hover { color: var(--text); background: var(--panel-hover); }

/* Sample answers floating at the sides, like Suno's album covers, in a clipped layer so they never widen the page. */
.float-layer { position: absolute; inset: 0 0 auto 0; height: 760px; overflow: hidden; pointer-events: none; z-index: 0; }
.float-card {
  position: absolute; top: 300px; width: 300px; padding: 22px; border-radius: 20px; z-index: 0; pointer-events: none;
  background: rgba(16, 10, 10, 0.78); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  font-size: 12px;
}
.float-card.right { right: -70px; transform: rotate(8deg); top: 330px; }
.float-card .asked { font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.float-card .figure { font-size: 54px; }
.float-card .verdict { font-size: 15px; margin-top: 6px; }
.float-card .scale, .float-card .split { margin-top: 14px; }
.float-card .evidence { margin-top: 10px; font-size: 11.5px; }
.float-card .ledger-list, .float-card .sources-more, .float-card .answer-note { display: none; }
@media (max-width: 1240px) { .float-card { display: none; } }

/* Answer */
.answer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.answer-head .panel-title { margin: 0; }
.answer-mode { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.answer-mode.working { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-family: var(--font); font-size: 12px; }
.answer-mode .spinner { width: 12px; height: 12px; border-width: 1.5px; }

.result { --tone: var(--teal); }
.asked { margin: 0 0 14px; font-size: 17px; line-height: 25px; font-weight: 600; overflow-wrap: anywhere; }
.asked-label {
  display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10.5px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
}
/* The question gets the Mac's gradient highlighter. */
.asked mark {
  color: #fff; padding: 0 4px; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, rgba(124, 108, 255, 0.75), rgba(79, 209, 197, 0.6)) no-repeat 0 88% / 0% 42%;
  animation: highlight 0.7s 0.25s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
@keyframes highlight { to { background-size: 100% 42%; } }

.figure-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.figure-row.fit { flex-wrap: nowrap; white-space: nowrap; }
.figure {
  font-size: calc(76px * var(--fit, 1)); line-height: 0.95; font-weight: 800; letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 25%, var(--tone));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 26px color-mix(in srgb, var(--tone) 45%, transparent));
}
.figure small { font-size: 0.42em; font-weight: 700; letter-spacing: 0; margin-left: 2px; }
.figure.none { color: var(--faint); background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; }
.figure-cap { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.figure-word { margin-left: 14px; letter-spacing: -0.04em; }
.verdict { margin: 12px 0 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--tone); }
.answer-note { margin: 6px 0 0; font-size: 12.5px; line-height: 19px; color: var(--muted); }

/* Evidence strength in three steps. */
.evidence { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.evidence-label { color: var(--muted); }
.steps { display: inline-flex; gap: 3px; }
.steps i { width: 26px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.steps i.on { background: var(--teal); box-shadow: 0 0 8px rgba(79, 209, 197, 0.5); }
.evidence-value { font-weight: 600; }

/* The verdict scale for subtext answers. */
.scale { margin-top: 22px; }
.scale-track { position: relative; display: flex; gap: 2px; height: 9px; }
.scale-band { height: 100%; background: rgba(255, 255, 255, 0.07); }
.scale-band:first-child { border-radius: 5px 0 0 5px; }
.scale-band:last-child { border-radius: 0 5px 5px 0; }
.scale-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone, var(--teal)) 55%, transparent), var(--tone, var(--teal)));
  box-shadow: 0 0 14px color-mix(in srgb, var(--tone, var(--teal)) 40%, transparent);
  transition: width 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.scale-marker {
  position: absolute; top: -5px; left: 0; width: 3px; height: 19px; margin-left: -1.5px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 10px var(--tone, var(--teal)); transition: left 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.scale-labels { display: flex; gap: 2px; margin-top: 8px; }
.scale-labels span { font-size: 11px; line-height: 14px; color: var(--faint); overflow-wrap: anywhere; }
.scale-labels span.on { color: var(--text); font-weight: 600; }
.scale-labels span:last-child { text-align: right; }

/* Fact check: supports against disputes, at their true ratio. */
.split { margin-top: 22px; }
.split-track { height: 9px; border-radius: 5px; background: rgba(248, 113, 113, 0.2); overflow: hidden; }
.split-fill {
  height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, var(--yes), color-mix(in srgb, var(--yes) 70%, #fff));
  transition: width 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.split-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.split-legend b { color: var(--text); font-weight: 600; }

/* Sources: Mac-style rows with a stance edge and an arrow. */
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 22px; }
.ledger h3 {
  margin: 0 0 8px; font-family: var(--mono); font-size: 10.5px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.ledger-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.source {
  position: relative; display: grid; gap: 2px; padding: 9px 30px 9px 13px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045); border-left: 3px solid var(--faint);
  transition: background 0.15s;
}
.source:hover { background: rgba(255, 255, 255, 0.08); }
.source.supports { border-left-color: var(--yes); }
.source.refutes { border-left-color: var(--no); }
.source::after {
  content: "↗"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--faint);
}
.source a {
  color: var(--text); text-decoration: none; font-size: 13px; line-height: 18px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.source a::before { content: ""; position: absolute; inset: 0; }
.source-meta { font-size: 11px; line-height: 15px; color: var(--muted); }
.source-empty { margin: 0; font-size: 12.5px; color: var(--faint); }
.ledger .btn-text, .sources-more { margin: 6px 0 0 -10px; font-size: 12px; }
.unrelated { margin: 16px 0 0; font-size: 12px; color: var(--faint); }

.answer-meta { margin: 22px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--faint); }

/* Empty, loading and error states keep the answer's frame. */
.answer-empty { margin: 0; color: var(--muted); }
.skeleton {
  display: block; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.answer-error { display: flex; gap: 10px; align-items: flex-start; }
.answer-error svg { flex: none; margin-top: 2px; color: var(--no); }
.answer-error p { margin: 0; }
.answer-error .btn-text { margin: 6px 0 0 -10px; }
/* Recent questions */
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.recent button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.025); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.recent button:hover { border-color: rgba(255, 122, 69, 0.45); background: rgba(255, 122, 69, 0.07); transform: translateX(2px); }
.recent-q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-v {
  flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--tone, var(--muted)); background: color-mix(in srgb, var(--tone, var(--muted)) 14%, transparent);
}

/* Result popup, after the Mac result card. */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 8, 0.72); backdrop-filter: blur(14px) saturate(140%); animation: fade 0.25s ease-out; }
.modal.closing .modal-backdrop { opacity: 0; transition: opacity 0.2s ease-out; }
.modal.closing .modal-card { opacity: 0; transform: scale(0.96) translateY(8px); transition: opacity 0.2s ease-out, transform 0.2s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.9) translateY(10px); } 60% { opacity: 1; } 100% { transform: none; } }
.modal-card {
  --tone: var(--teal);
  position: relative; display: grid; grid-template-columns: 270px 1fr; width: min(880px, 100%);
  max-height: calc(100vh - 32px); overflow: hidden; border-radius: 20px;
  background: #101219; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px -30px color-mix(in srgb, var(--tone) 55%, transparent), 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: pop 0.55s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.modal-media {
  position: relative; display: grid; place-items: center; padding: 28px; overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, rgba(124, 108, 255, 0.45), transparent 60%),
    radial-gradient(circle at 85% 95%, rgba(79, 209, 197, 0.28), transparent 55%),
    #0b0d14;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
/* The pasted material as a tilted paper card. */
.paper {
  max-width: 100%; border-radius: 12px; transform: rotate(-3deg);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  animation: tilt 0.8s 0.12s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
@keyframes tilt { from { opacity: 0; transform: translateY(26px) rotate(-12deg) scale(0.92); } }
img.paper { display: block; max-height: 62vh; }
blockquote.paper {
  margin: 0; padding: 20px 22px; max-height: 56vh; overflow: hidden; background: var(--paper); color: #1b1d24;
  font-size: 13px; line-height: 20px; white-space: pre-wrap;
}
blockquote.paper.query { font-size: 20px; line-height: 28px; font-weight: 700; color: #16181f; }
.media-count {
  position: absolute; top: 14px; left: 14px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #fff; background: rgba(6, 7, 10, 0.7); border: 1px solid rgba(255, 255, 255, 0.12);
}
.modal-body { display: flex; flex-direction: column; padding: 34px 32px 22px; overflow-y: auto; }
.modal-body .asked { font-size: 21px; line-height: 30px; margin-bottom: 16px; }
.modal-body .figure { font-size: calc(96px * var(--fit, 1)); }
.modal-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: auto; padding-top: 26px; }
.keycap-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px; border: 0; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--muted); background: transparent; transition: color 0.15s, background 0.15s;
}
.keycap-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.keycap-btn kbd {
  min-width: 22px; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--text); background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14);
}
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, 0.08); cursor: pointer;
}
.modal-x:hover { background: rgba(255, 255, 255, 0.16); }

@media (max-width: 560px) {
  .topbar { padding: 14px 16px; }
  .stage { padding-top: 76px; }
  /* Small enough that every rolling question fits in two lines, so the screen keeps one height and keeps snapping. */
  .hero-head { --h1: clamp(27px, 7.4vw, 34px); min-height: calc(40px + 2.2 * var(--h1)); }
  .composer textarea#question { font-size: 16px; }
  .panel { padding: 20px; }
  .figure { font-size: calc(64px * var(--fit, 1)); }
  .scale-labels span:not(.on) { visibility: hidden; }
  .scale-labels:not(:has(.on)) { display: none; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-media { display: none; }
  .modal-body { padding: 26px 22px 18px; }
  .modal-body .figure { font-size: calc(76px * var(--fit, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ── The answer and Recent, in the page's own voice ──
   No box, no labels above the heading, no monospace: the question is the heading, the figure is flat
   type, sources are rows on a tone step. (The popup keeps the Mac card's look.) */
#answer, #history-wrap {
  margin-top: 28px; padding: 36px; border: 0; border-radius: 28px;
  background: rgba(255, 238, 228, 0.04); backdrop-filter: none; box-shadow: none;
}
#history-wrap { margin-top: 12px; padding: 28px 36px; }
#answer .answer-head { margin-bottom: 14px; }
#answer .answer-mode.working { font-size: 14px; letter-spacing: 0; }
#answer .asked { margin: 0 0 22px; font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
#answer .figure {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none;
  color: var(--text); font-size: calc(88px * var(--fit, 1)); letter-spacing: -0.045em;
}
#answer .figure-word { color: var(--tone); }
#answer .figure.none { color: var(--faint); }
#answer .figure-cap { font-size: 15px; font-weight: 500; }
#answer .verdict { font-size: 22px; }
#answer .answer-note { margin-top: 10px; font-size: 15px; line-height: 22px; }
#answer .evidence { margin-top: 18px; font-size: 15px; }
#answer .steps i { width: 30px; height: 8px; border-radius: 4px; }
#answer .steps i.on { background: var(--accent); box-shadow: none; }
#answer .scale-fill { background: var(--tone); box-shadow: none; }
#answer .scale-marker { box-shadow: none; }
#answer .scale-labels span { font-size: 12px; }
#answer .split { margin-top: 28px; }
#answer .split-track { height: 8px; background: rgba(248, 113, 113, 0.55); }
#answer .split-fill { background: var(--yes); }
#answer .split-legend { font-size: 14px; }
#answer .ledger { margin-top: 30px; gap: 28px; }
#answer .ledger h3 {
  margin: 0 0 10px; font-family: var(--font); font-size: 16px; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--text);
}
#answer .ledger-list { gap: 8px; }
#answer .source {
  padding: 14px 40px 14px 16px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.045);
}
#answer .source:hover { background: rgba(255, 255, 255, 0.085); }
#answer .source a { font-size: 15px; line-height: 21px; }
#answer .source-meta { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; }
#answer .source-meta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
#answer .source.supports .source-meta::before { background: var(--yes); }
#answer .source.refutes .source-meta::before { background: var(--no); }
#answer .source::after { right: 16px; font-size: 14px; }
#answer .ledger .btn-text { margin: 8px 0 0 -10px; font-size: 14px; color: var(--accent); }
#answer .unrelated { font-size: 14px; }
#answer .answer-meta {
  margin-top: 30px; font-family: var(--font); font-size: 13px; letter-spacing: 0; color: var(--faint);
}

#history-wrap .panel-title {
  margin: 0 0 14px; font-family: var(--font); font-size: 18px; line-height: 24px; font-weight: 600;
  letter-spacing: -0.01em; text-transform: none; color: var(--text);
}
#history-wrap .panel-title::before { display: none; }
#history-wrap .recent { gap: 6px; }
#history-wrap .recent button {
  padding: 14px 16px; border: 0; border-radius: 16px; font-size: 15px; background: rgba(255, 255, 255, 0.045);
}
#history-wrap .recent button:hover { background: rgba(255, 255, 255, 0.085); transform: none; }
#history-wrap .recent-v { font-size: 13px; padding: 3px 10px; }

@media (max-width: 560px) {
  #answer, #history-wrap { padding: 24px 20px; border-radius: 22px; }
  #answer .asked { font-size: 22px; line-height: 28px; }
  #answer .figure { font-size: calc(64px * var(--fit, 1)); }
}

/* Short phones (iPhone SE and the like): tighter spacing so the ask screen still fits one window and snaps. */
@media (max-width: 560px) and (max-height: 740px) {
  .stage { padding-top: 66px; gap: 10px; }
  .hero { margin-bottom: 14px; }
  .hero-head { min-height: calc(32px + 2.1 * var(--h1)); }
  .hero-lead { margin-bottom: 8px; font-size: 16px; line-height: 22px; }
  .hero-sub { margin-top: 10px; }
  .examples { margin-top: 4px; gap: 6px; }
  .example { padding: 6px 12px; }
  .next-cue { margin-bottom: 8px; padding: 4px 14px; }
  .screen-how { padding: 56px 0 16px; }
  .tut-art { height: 84px; }
}
