/* ask.css — the /ask page (W-WEB-ASK). Shell and tokens come from site.css; this file holds only what
   this page uses. It is a file, not an inline <style>, because /ask is served with style-src 'self'.

   Layout: her ring on the left, the conversation on the right; one column on a phone (heading, ring,
   conversation). No bubbles and no avatars: the transcript is plain lines with a small name label, so
   the page stays as quiet as the rest of the site and the ring is the only picture. The Pocket kit (P3-L4-U3):
   the ring is the homepage hero's pixel lockup, the transcript and the typed box are KIT wells (ink, recessed),
   the no-JavaScript note is a quiet HUD panel (class tokens in ask.html). */

.ask { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 64px;
  grid-template-areas: "her intro" "her chat"; align-items: start; padding-top: 56px; }
.ask-intro { grid-area: intro; }
.ask-her { grid-area: her; display: flex; flex-direction: column; align-items: center; gap: 12px; position: sticky; top: calc(var(--header-h) + 32px); }
.ask-chat { grid-area: chat; min-width: 0; }

.ask h1 { font-size: 2.5rem; line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; margin: 12px 0 0; text-wrap: balance; }
.ask .lead { color: var(--text-prose); max-width: 56ch; }
.ask-promise { margin: 12px 0 0; font-size: var(--body-medium-size); font-weight: 500; color: var(--fineprint); }

/* ---- Her ring: the homepage hero's pixel lockup (assets/brandmark, pinned cell for cell by WebHeroPixelParityTest):
   the 71-art-px bead ring under the ink disc with the mascot. The page holds all 28 ring frames and the 5 lockups,
   hidden but for the one for her day, and the module shows that one: a frame swap with no tween, as the app's ring
   steps. Every box is a whole multiple of 71 (284 = 4px, 213 = 3px per art px), so every art pixel is the same size. ---- */
.ask-ring { position: relative; width: 284px; height: 284px; max-width: 100%; aspect-ratio: 1; }
.ask-ring img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* The one motion of this page: a small nod when she answers, so the eye knows who spoke. One art px (4px at 284, 3px at 213), two 83 ms frames, stepped (D-91). */
@keyframes asknod { from { transform: translateY(calc(-100% / 71)); } to { transform: none; } }
.ask-ring.ask-nod { animation: asknod 166ms steps(1) 1; }

.ask-day { margin: 0; font-size: var(--body-medium-size); font-weight: 500; color: var(--text-muted); text-align: center; font-variant-numeric: tabular-nums; }
.ask-ctl { background: none; color: var(--text-muted); padding: 0 16px; border-bottom-width: 0; }
.ask-ctl:active { border-width: 0; }
.ask-ctl:hover { background: var(--surface-row); color: var(--text-primary); }
.ask-ctl[hidden] { display: none; }
.ask-ctl .ic { display: none; width: 16px; height: 16px; fill: currentColor; flex: none; }
.ask-ctl[data-state="playing"] .ic-hold, .ask-ctl[data-state="step"] .ic-next { display: block; }

/* ---- The conversation ---- */
.ask-nojs { margin: 32px 0 0; padding: 16px 20px; color: var(--text-prose); line-height: 1.55; max-width: 60ch; }
.ask-nojs a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ask-app { margin-top: 32px; }
.ask-app[hidden] { display: none; }
.ask-log { max-height: 420px; overflow-y: auto; padding: 8px 16px 16px; }
.ask-log:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ask-line { margin: 16px 0 0; max-width: 62ch; font-size: var(--body-web); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.ask-who { display: block; font-size: var(--body-small-size); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.ask-line.from-her { color: var(--text-primary); }
.ask-line.from-her .ask-who { color: var(--warm); }
.ask-line.from-you { color: var(--text-muted); padding-left: 16px; border-left: 2px solid var(--rim); }
.ask-line.from-you .ask-who { color: var(--text-muted); }
.ask-line.from-you[data-empty] .ask-text { font-style: italic; color: var(--fineprint); }
.ask-line.from-day { font-size: var(--body-medium-size); color: var(--fineprint); font-weight: 500; text-align: center; max-width: none; }

.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ask-chip { font-weight: 500; color: var(--text-primary); text-align: left; }

/* Iteration 9 (BRIEF A5): the chips lead; the typed box sits after them, quieter. */
.ask-form { margin-top: 24px; }
.ask-form label { display: block; font-size: var(--body-medium-size); font-weight: 500; color: var(--fineprint); margin-bottom: 8px; }
.ask-sos { margin: 16px 0 0; font-size: var(--body-medium-size); font-weight: 500; color: var(--text-muted); }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1 1 auto; min-width: 0; }
.ask-row .btn { flex: none; }

/* The shared grouped footer (page-local, as on /privacy and the homepage: site.css is at its B5 cap). */
.foot { align-items: flex-start; }
.foot img { height: 26px; }
.foot .links { gap: 4px 44px; font-size: var(--body-medium-size); font-weight: 500; }
.foot .fg { display: grid; }
.foot .links a { padding: 6px 0; }

@media (max-width: 900px) {
  .foot .links { flex-direction: column; gap: 14px; }
  .ask { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "her" "chat"; padding-top: 28px; }
  .ask h1 { font-size: 2.125rem; }
  .ask-her { position: static; margin-top: 28px; }
  .ask-ring { width: 213px; height: 213px; }
  .ask-log { max-height: 55vh; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-ring.ask-nod { animation: none; }
}
