/* Ask the law (#101): feature module styles. America.gov-calm: a big serif headline, the ask bar floating over the
   top edge of a rounded photo card, a serif statement with inline image chips, answers set in serif with generous
   whitespace, navy round send buttons and a docked "Ask anything…" bar. Uses the look3 tokens from app.css. */

/* the Ask headings use the system display face (oak.css sets --ask-serif) */

:root {
  --ask-serif: "CE Serif", "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ask-navy: #0a6b44;
  --ask-navy-hover: #075a39;
  --ask-q-bg: #e9ecf1;
  --ask-ease: cubic-bezier(.22, 1, .36, 1);
  /* mobile tab bar icon (mobile.css reads --tab-ico per data-route) */
}

.ask-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ask-page { --ask-col: 760px; padding-bottom: 24px; }

/* ------------------------------------------------------------------ hero */
.ask-hero {
  position: relative; text-align: center; padding: clamp(40px, 6vw, 84px) 16px clamp(36px, 4vw, 56px);
  border-radius: 48px; margin: 0 calc(-1 * min(var(--inset), 24px));
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, rgb(255 255 255 / .7) 42%, rgb(255 255 255 / 0) 78%);
}
.ask-h1 {
  font: 700 clamp(3.4rem, 1.6rem + 5.4vw, 6.4rem)/.98 var(--ask-serif); letter-spacing: -.04em; color: var(--label);
  margin: 0; text-wrap: balance; animation: ask-rise .7s var(--ask-ease) both;
}
.ask-sub { margin: 18px auto 0; max-width: 40ch; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); line-height: 1.45; color: var(--label-2); animation: ask-rise .7s .06s var(--ask-ease) both; }

.ask-stage { position: relative; max-width: 720px; margin: clamp(32px, 4vw, 48px) auto 0; padding-top: 44px; animation: ask-rise .8s .12s var(--ask-ease) both; }
.ask-stage .ask-bar { position: absolute; top: 0; left: 18px; right: 18px; z-index: 2; }
.ask-photo {
  position: relative; height: clamp(220px, min(34vw, 100svh - 600px), 440px); border-radius: 48px; overflow: hidden;
  background: linear-gradient(180deg, #eef0ee 0%, #e6e8e5 100%);
  box-shadow: 0 2px 6px rgb(14 16 20 / .05), 0 40px 80px -30px rgb(14 16 20 / .28);
}
.ask-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; display: block; transform: scale(1.04); opacity: 0; transition: opacity .5s ease; }
.ask-photo.ready img { opacity: 1; animation: ask-settle 1.4s var(--ask-ease) both; }
.ask-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(17 22 20 / 0) 55%, rgb(17 22 20 / .12) 100%); pointer-events: none; }

/* ------------------------------------------------------------------ the ask bar (hero, dock) */
.ask-bar {
  display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 10px 10px 10px 28px; background: #fff;
  border: 1.5px solid var(--label); border-radius: 999px; box-shadow: 0 2px 6px rgb(14 16 20 / .06), 0 18px 44px -18px rgb(14 16 20 / .3);
  transition: box-shadow .25s var(--ask-ease), transform .25s var(--ask-ease);
}
.ask-bar:focus-within { box-shadow: 0 0 0 4px rgb(10 107 68 / .14), 0 18px 44px -18px rgb(14 16 20 / .34); }
.ask-bar input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 17.5px/1.3 var(--font); color: var(--label);
  text-overflow: ellipsis;
}
.ask-bar input::placeholder { color: rgb(14 16 20 / .55); transition: opacity .22s ease, transform .22s ease; }
.ask-bar input.ph-out::placeholder { opacity: 0; }
.ask-send {
  flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--ask-navy); color: #fff; transition: background .2s ease, transform .2s var(--spring, cubic-bezier(.34, 1.56, .64, 1));
}
.ask-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-send:hover { background: var(--ask-navy-hover); }
.ask-send:active { transform: scale(.95); }
.ask-send:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

/* ------------------------------------------------------------------ suggestions */
.ask-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 30px auto 0; }
.ask-chip {
  font: 500 14.5px/1.3 var(--font); color: var(--label); background: #fff; border: 1px solid var(--sep-2); border-radius: 999px;
  padding: 11px 18px; cursor: pointer; text-align: left; box-shadow: 0 1px 2px rgb(14 16 20 / .04);
  transition: border-color .2s var(--ask-ease), background-color .2s var(--ask-ease), transform .2s var(--ask-ease);
  animation: ask-rise .6s calc(.22s + var(--i, 0) * 60ms) var(--ask-ease) both;
}
.ask-chip:hover { border-color: rgb(14 16 20 / .35); background: var(--fill); }
.ask-chip:active { transform: scale(.98); }
.ask-chip:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ask-chip--line { background: transparent; box-shadow: none; animation-delay: calc(var(--i, 0) * 60ms); }
.ask-chip--line:hover { background: #fff; }

/* ------------------------------------------------------------------ statement */
.ask-statement { max-width: 1000px; margin: clamp(88px, 11vw, 160px) auto clamp(64px, 8vw, 120px); text-align: center; padding: 0 8px; }
.ask-statement p { font: 700 clamp(2.2rem, 1.1rem + 3.4vw, 4.5rem)/1.08 var(--ask-serif); letter-spacing: -.04em; color: var(--label); margin: 0; text-wrap: balance; }
.ask-ichip {
  display: inline-block; width: 1.12em; height: 1.12em; border-radius: 50%; overflow: hidden; vertical-align: -.2em; margin: 0 .04em;
  background: #fff; box-shadow: 0 1px 2px rgb(14 16 20 / .06), 0 10px 24px -10px rgb(14 16 20 / .35);
}
.ask-ichip img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); display: block; }

/* ------------------------------------------------------------------ thread */
.ask-thread-head { display: none; }
.ask-page[data-state="thread"] .ask-hero, .ask-page[data-state="thread"] .ask-statement { display: none; }
.ask-page[data-state="thread"] .ask-thread-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; max-width: var(--ask-col); margin: 8px auto 28px;
  animation: ask-rise .5s var(--ask-ease) both;
}
.ask-h1--small { font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3rem); animation: none; }
.ask-new { font-size: 15px; }
.ask-thread { max-width: var(--ask-col); margin: 0 auto; }
.ask-privacy { max-width: 60ch; margin: 22px auto 0; text-align: center; font-size: 12.5px; color: var(--label-3); }
.ask-queue { position: absolute; left: 0; right: 0; bottom: calc(100% - 20px); max-width: 720px; margin: 0 auto; padding: 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.ask-queue[hidden] { display: none; }
.ask-queue .lbl { color: var(--label-3); font-weight: 600; margin-right: 2px; }
.ask-qitem { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 5px 6px 5px 12px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(14 16 20 / .08); animation: ask-rise .3s var(--ask-ease) both; }
.ask-qitem > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48ch; }
.ask-qx { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--label-2); font-size: 15px; line-height: 1; }
.ask-qx:hover { background: var(--fill); }
.ask-dock:not(.on-ask) .ask-dock-note { display: none; }
.ask-privacy .short { display: none; }
.ask-info { border: 0; background: none; padding: 0 2px; margin-left: 4px; font: inherit; color: var(--ask-navy); cursor: pointer; vertical-align: baseline; }
.ask-info:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.ask-when { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--soon-tint); color: var(--soon); font: 600 13px/1.2 var(--font); }
.ask-when svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask-lead { margin: 0 0 8px; font: 500 18px/1.45 var(--font); color: var(--label); }
.ask-a.is-quiet { padding: 22px 26px; }
.ask-a.is-quiet .ask-body { font-size: 16.5px; }
.ask-dock-note { max-width: 720px; margin: 8px auto 0; text-align: center; font-size: 11.5px; line-height: 1.35; color: var(--label-3); }
/* the latest turn is at least a screen tall: its answer, late chips and the opened law grow inside it, nothing
   below moves (no layout shift); the room under it is where the docked bar sits */
/* while the latest answer and its chips are still arriving, its turn is a screen tall (nothing visible moves); after
   that only the room the docked bar needs stays */
.ask-page[data-state="thread"] .ask-turn:last-child { padding-bottom: 150px; margin-bottom: 0; }
.ask-page[data-state="thread"] .ask-turn.is-pending:last-child { min-height: calc(100svh - var(--nav-h) - 40px); }
html.ask-docked { scroll-padding-bottom: 150px; }
.ask-thread { overflow-anchor: none; }
.ask-chips.still .ask-chip, .ask-page.still .ask-q, .ask-page.still .ask-h1, .ask-page.still .ask-sub, .ask-page.still .ask-stage { animation: none; }

.ask-turn { margin: 0 0 64px; scroll-margin-top: calc(var(--nav-h) + env(safe-area-inset-top) + 16px); }
.ask-q { display: flex; justify-content: flex-end; }
.ask-turn.fresh .ask-q { animation: ask-rise .45s var(--ask-ease) both; }
.ask-q p {
  margin: 0; max-width: 82%; padding: 13px 20px; border-radius: 24px 24px 8px 24px; background: var(--ask-q-bg); color: var(--label);
  font: 400 16.5px/1.45 var(--font); overflow-wrap: anywhere;
}
/* one grid cell: the steps card, the streaming answer and the finished answer crossfade in place */
.ask-work { margin-top: 22px; display: grid; }
.ask-work > * { grid-area: 1 / 1; min-width: 0; }
.ask-work > .enter { animation: ask-rise .42s var(--ask-ease) both; z-index: 1; }
.ask-work > .leaving { animation: ask-leave .3s ease forwards; pointer-events: none; z-index: 0; }
.ask-work > .leaving > * { opacity: 0; transition: opacity .1s ease; } /* its words go first, the card stays under the new one */

/* progress: the server's real steps */
.ask-steps { list-style: none; margin: 4px 0 0; padding: 22px 26px; display: grid; gap: 12px; align-self: start; background: #fff; border-radius: 28px; box-shadow: var(--shadow-card); }
.ask-steps.is-queued { color: var(--label-3); }
.ask-step { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--label-3); transition: color .25s ease; min-width: 0; }
.ask-step .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* a label that changes never changes the row height */
.ask-step .dot { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid var(--sep); display: grid; place-items: center; transition: background .25s ease, border-color .25s ease; }
.ask-step .dot svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .35s var(--spring, cubic-bezier(.34, 1.56, .64, 1)); }
.ask-step.on { color: var(--label); }
.ask-step.on .dot { border-color: var(--ask-navy); animation: ask-pulse 1.2s ease-in-out infinite; }
.ask-step.done { color: var(--label); }
.ask-step.done .dot { background: var(--ask-navy); border-color: var(--ask-navy); animation: ask-pop .38s var(--spring, cubic-bezier(.34, 1.56, .64, 1)); }
.ask-step.done .dot svg { opacity: 1; transform: none; }

/* the answer */
.ask-a { background: #fff; border-radius: 32px; padding: clamp(24px, 3.4vw, 40px) clamp(22px, 3.6vw, 44px) clamp(22px, 3vw, 32px); box-shadow: var(--shadow-card); }
.ask-a { align-self: start; }
.ask-a:focus { outline: none; } /* focused only so keyboard users stay in the thread */
.ask-a:focus-visible { outline: 2px solid var(--ask-navy); outline-offset: 3px; }
.ask-nw { white-space: nowrap; }
.ask-err { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 22px 26px; }
.ask-err-msg { margin: 0; font-size: 16px; color: var(--label); }
.ask-retry { border: 0; border-radius: 999px; padding: 11px 20px; background: var(--ask-navy); color: #fff; font: 600 15px/1 var(--font); cursor: pointer; }
.ask-retry:hover { background: var(--ask-navy-hover); }
.ask-retry:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.ask-stale { display: block; margin-top: 6px; color: var(--unknown); }
.ask-stale .linkish { font-size: inherit; }
.ask-place { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--label-2); margin-bottom: 18px; line-height: 1.4; }
.ask-place img, .ask-place-dot { width: 46px; height: 46px; flex: none; border-radius: 50%; object-fit: cover; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--sep-2); }
.ask-place-dot { display: grid; place-items: center; font: 700 22px/1 var(--ask-serif); color: var(--label-2); }
.ask-place a { color: inherit; text-decoration: none; }
.ask-place a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ask-place b { color: var(--label); font-weight: 600; }
.ask-pin { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; color: var(--label-2); }
.ask-place.is-area, .ask-place.is-compact { gap: 6px; margin-bottom: 12px; }
.ask-place-dot .ask-pin { width: 20px; height: 20px; }
.ask-at { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 12px; padding: 5px 4px 5px 12px; border-radius: 999px; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--sep-2); font-size: 14px; color: var(--label-2); line-height: 1.3; }
.ask-at > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-at a { color: inherit; text-decoration: none; }
.ask-at a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ask-at b { color: var(--label); font-weight: 600; }
.ask-at-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--label-2); font-size: 18px; line-height: 1; cursor: pointer; }
.ask-at-x:hover { background: var(--sep-2); color: var(--label); }
.ask-at-x:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 1px; }
.ask-place .sep { color: var(--label-3); margin: 0 2px; }
.ask-answer { font: 700 clamp(2.1rem, 1.5rem + 1.9vw, 3rem)/1.06 var(--ask-serif); letter-spacing: -.04em; color: var(--label); margin: 0 0 14px; text-wrap: balance; }
.ask-answer.words .w { display: inline-block; animation: ask-word .55s calc(var(--w) * 45ms) var(--ask-ease) both; }
.ask-body { margin: 0; font: 400 18px/1.55 var(--font); color: rgb(14 16 20 / .74); max-width: 52ch; }
.ask-body:empty { display: none; }
.ask-sent.new { animation: ask-fade .5s var(--ask-ease) both; }
.ask-sup {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border: 0; border-radius: 999px;
  background: var(--ask-navy); color: #fff; font: 700 11px/1 var(--font); letter-spacing: 0; vertical-align: .55em; cursor: pointer;
  transition: transform .18s var(--spring, cubic-bezier(.34, 1.56, .64, 1)), background .18s ease;
}
.ask-answer .ask-sup { vertical-align: 1.1em; }
.ask-sup + .ask-sup { margin-left: 3px; }
.ask-sup:hover { background: var(--ask-navy-hover); }
.ask-sup:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* #121: the conditions that change the answer, at most 3 short lines under it */
.ask-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.ask-points li { position: relative; padding-left: 20px; font: 500 18px/1.4 var(--font); color: var(--label); max-width: 46ch; }
.ask-points li::before { content: ""; position: absolute; left: 3px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--ask-navy); }
.ask-law-body .ask-tools { margin: 6px 0 12px; }
.ask-law-body .ask-body { margin: 2px 0 0; }
.ask-law-body .ask-cites { margin-top: 18px; }
.ask-law + .ask-full { margin: 14px 0 0; }
.ask-clarify { margin: 14px 0 0; font: 700 clamp(1.35rem, 1.1rem + .6vw, 1.6rem)/1.3 var(--ask-serif); color: var(--label); } /* a question to him, not a link (#121) */
.ask-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ask-quick .ask-chip { animation-delay: calc(var(--i, 0) * 30ms); padding: 9px 15px; }
.ask-quick .ask-chip.is-state { font-weight: 600; } /* like the city chips: filled navy read as "already selected" */
.ask-summary { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 16px; }
.ask-summary li { display: flex; gap: 10px; align-items: baseline; }
.ask-summary b { min-width: 9.5em; font-weight: 600; }
.ask-steps-out, .ask-help { margin-top: 20px; }
.ask-steps-out h3, .ask-help h3 { margin: 0 0 8px; font: 600 13px/1.3 var(--font); letter-spacing: .02em; color: var(--label-2); }
.ask-steps-out ol { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 8px; }
.ask-steps-out li { counter-increment: st; position: relative; padding-left: 34px; font-size: 16.5px; line-height: 1.5; color: var(--label); }
.ask-steps-out li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font: 700 12px/1 var(--font); color: var(--label-2); }
.ask-help ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ask-help a { color: var(--ask-navy); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(10 107 68 / .35); text-underline-offset: 3px; }
.ask-help svg { width: 13px; height: 13px; margin-left: 3px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-sup { min-width: 18px; height: 18px; font-size: 10.5px; vertical-align: .45em; }
.ask-next { animation: ask-fade .5s var(--ask-ease) both; }
.ask-note { margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--unk-tint); color: var(--unknown); font-size: 14.5px; line-height: 1.45; }
.ask-advice { margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--cool); color: var(--label-2); font-size: 14.5px; line-height: 1.45; } /* #4: calm, not a warning */
.ask-official { margin: 16px 0 0; font-size: 15.5px; color: var(--label-2); }
.ask-official a, .ask-src { color: var(--ask-navy); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(10 107 68 / .35); text-underline-offset: 3px; }
.ask-official svg, .ask-src svg { width: 13px; height: 13px; margin-left: 3px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ask-law { margin-top: 18px; border-top: 1px solid var(--sep-2); }
.ask-law-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 48px; margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 15px/1.2 var(--font); color: var(--accent);
}
.ask-law-btn:hover .lbl { text-decoration: underline; text-underline-offset: 4px; }
.ask-law-btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
.ask-law-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ask-ease); }
.ask-law.open .ask-law-btn svg { transform: rotate(180deg); }
.ask-law-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s var(--ask-ease), opacity .3s ease; }
.ask-law-body > div { overflow: hidden; overflow: clip; min-height: 0; } /* clip: not a scroll box, so a citation tap scrolls the page to the quote (#121) */
.ask-law.open .ask-law-body { grid-template-rows: 1fr; opacity: 1; }
.ask-law.open .ask-cite { animation: ask-rise .5s calc(var(--i, 1) * 70ms) var(--ask-ease) both; }
.ask-law.now .ask-law-body, .ask-law.now .ask-cite { transition: none; animation: none; } /* opened from a citation: at once (#121) */
.ask-cites { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 12px; }
.ask-cite { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 20px 16px; background: var(--fill); border-radius: 22px; scroll-margin: 120px; }
.ask-cite .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ask-navy); color: #fff; font: 700 12px/1 var(--font); margin-top: 1px; }
.ask-cite-title { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: var(--label); line-height: 1.4; }
.ask-cite-title .muted { color: var(--label-3); font-weight: 500; }
.ask-cite blockquote { margin: 8px 0 0; font: 500 19px/1.45 var(--font); color: var(--label); overflow-wrap: anywhere; }
.ask-req { margin: 8px 0 0; font-size: 15px; color: var(--label-2); }
.ask-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.ask-vb { display: inline-flex; align-items: center; gap: 4px; color: var(--applies); }
.ask-vb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ask-vb.no { color: var(--unknown); }
.ask-eng { padding: 3px 9px; border-radius: 999px; background: var(--mut-tint); color: var(--st-muted); }
.ask-eng.st-applies { background: var(--ok-tint); color: var(--applies); }
.ask-eng.st-unknown { background: var(--unk-tint); color: var(--unknown); }
.ask-eng.st-not_yet_effective { background: var(--soon-tint); color: var(--soon); }
.ask-eng.st-pending { background: var(--pen-tint); color: var(--pending); }
.ask-cite.flash { animation: ask-flash 1.1s ease both; }

.ask-next { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0 4px; }

/* the answer page that already answers it (#118): one row at the top of the answer, one link under it */
.ask-full {
  display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0 0 18px; padding: 10px 12px 10px 10px;
  border-radius: 20px; background: var(--fill); color: var(--label); text-decoration: none;
  transition: background .2s ease, transform .2s var(--ask-ease);
}
.ask-full:hover { background: var(--sep-2); }
.ask-full:active { transform: scale(.98); }
.ask-full:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ask-full-ico { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ask-navy); box-shadow: inset 0 0 0 1px var(--sep-2); }
.ask-full svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ask-full > svg { color: var(--label-3); }
.ask-full-t { flex: 1; min-width: 0; display: grid; gap: 2px; line-height: 1.3; }
.ask-full-t b { font-size: 15.5px; font-weight: 600; }
.ask-full-t span { font-size: 14px; color: var(--label-2); }
.ask-chip--page { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.ask-chip--page svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-foot { margin-top: 22px; font-size: 13.5px; color: var(--label-3); }
/* the end of an answer: its date line, and Share (#133) */
.ask-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 22px; }
.ask-end .ask-foot { margin: 0; flex: 1 1 260px; }
.ask-share {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 14.5px/1 var(--font); color: var(--label); background: #fff; box-shadow: inset 0 0 0 1px var(--sep-2);
  transition: box-shadow .2s var(--ask-ease), transform .2s var(--ask-ease), background-color .2s var(--ask-ease), color .2s var(--ask-ease);
}
.ask-share svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ask-share:hover { box-shadow: inset 0 0 0 1px var(--label); }
.ask-share:active { transform: scale(.96); }
.ask-share:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ask-share[aria-expanded="true"] { background: var(--ink-btn); color: #fff; box-shadow: none; }
.ask-share[aria-busy="true"] { opacity: .6; }
.ask-a.enter .ask-share, .ask-a.reveal-rest .ask-share { animation: ask-fade .6s .55s var(--ask-ease) both; }
@media (pointer: coarse) { .ask-share { min-height: 44px; } }
.ask-fact { white-space: nowrap; }
.ask-place .ask-eng-ok { display: flex; margin-top: 2px; }
.ask-eng-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--applies); font-weight: 600; }
.ask-eng-ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* reveal: the answer rises in, then its sources one by one */
.ask-a.enter .ask-body { animation: ask-fade .6s .25s var(--ask-ease) both; }
.ask-a.enter .ask-law, .ask-a.reveal-rest .ask-law { animation: ask-rise .55s .3s var(--ask-ease) both; }
.ask-a.enter .ask-foot, .ask-a.reveal-rest .ask-foot { animation: ask-fade .6s .55s var(--ask-ease) both; }
.ask-a.enter .ask-eng-ok svg { animation: ask-pop .5s .5s var(--spring, cubic-bezier(.34, 1.56, .64, 1)) both; }

/* ------------------------------------------------------------------ dock */
.ask-dock {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 80;
  padding: 28px max(14px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgb(242 243 240 / 0) 0, var(--canvas) 26px);
  transform: translateY(110%); opacity: 0; pointer-events: none; transition: transform .5s var(--ask-ease), opacity .35s ease;
}
.ask-dock > .ask-bar { max-width: 720px; margin: 0 auto; }
.ask-dock.on { transform: none; opacity: 1; pointer-events: auto; }
/* the phone menu opens over the page: the bar steps away, so the menu's last links are never under it (#125) */
html:has(.menu[open]) .ask-dock { visibility: hidden; }
.ask-bar--dock { min-height: 64px; padding: 8px 8px 8px 24px; border: 1px solid rgb(14 16 20 / .16); box-shadow: 0 2px 6px rgb(14 16 20 / .06), 0 24px 60px -20px rgb(14 16 20 / .35); }
.ask-bar--dock .ask-send { width: 46px; height: 46px; }
.ask-bar--dock input:placeholder-shown + .ask-send { background: var(--fill); color: var(--label-3); }
html.ask-docked .toasts { bottom: calc(100px + var(--tabbar-h) + env(safe-area-inset-bottom)); }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 640px) {
  /* calm phones: no photo, no manifesto with icon bubbles, suggestions as plain rows right under the input */
  .ask-photo, .ask-statement { display: none; }
  .ask-bar--hero { border: 0; box-shadow: inset 0 0 0 1.5px var(--sep); }
  .ask-bar--hero:focus-within { box-shadow: inset 0 0 0 1.5px var(--ask-navy); }
  .ask-privacy .long { display: none; }
  .ask-privacy .short { display: inline; }
  .ask-privacy { margin-top: 14px; font-size: 12.5px; white-space: nowrap; }
  .ask-chips { display: block; margin: 16px 0 0; }
  .ask-chips .ask-chip { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--sep-2); border-radius: 0; background: none; box-shadow: none; padding: 14px 4px; font-size: 16px; line-height: 1.35; text-align: left; animation: none; }
  .ask-chips .ask-chip:nth-child(n+4) { display: none; }
  .ask-chips .ask-chip:hover { background: none; } /* in the tab bar already, like the other pages */
  .ask-hero { border-radius: 0; padding: 0 0 8px; margin: 0; background: none; }
  .ask-h1 { font-size: clamp(2.8rem, 2rem + 4vw, 3.4rem); }
  .ask-sub { margin-top: 10px; }
  .ask-sub { max-width: 26ch; }
  .ask-stage { padding-top: 0; margin-top: 22px; max-width: none; }
  .ask-stage .ask-bar { position: relative; left: auto; right: auto; margin: 0; width: 100%; box-sizing: border-box; }
  .ask-bar { min-height: 68px; padding-left: 20px; }
  .ask-bar input { font-size: 16px; }
  .ask-send { width: 48px; height: 48px; }
  .ask-photo { height: clamp(240px, 100svh - 520px, 340px); border-radius: 32px; }
  .ask-chips { justify-content: flex-start; }
  .ask-chip { font-size: 14px; padding: 10px 15px; }
  .ask-statement p { font-size: clamp(2rem, 1.2rem + 4vw, 2.6rem); }
  .ask-q p { max-width: 90%; }
  .ask-a { border-radius: 22px; padding: 18px 18px 16px; }
  .ask-answer { font-size: 1.65rem; line-height: 1.1; margin-bottom: 10px; }
  .ask-body { font-size: 16.5px; line-height: 1.5; }
  .ask-points li { font-size: 17px; }
  .ask-clarify { font-size: 1.25rem; }
  .ask-place { margin-bottom: 12px; font-size: 14px; }
  .ask-place img, .ask-place-dot { width: 38px; height: 38px; }
  .ask-a.is-quiet { padding: 16px 18px; }
  .ask-lead { font-size: 16.5px; }
  .ask-cite { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .ask-cite blockquote { font-size: 19px; }
  .ask-turn { margin-bottom: 48px; }
  .ask-dock { padding: 22px 10px 8px; }
  .ask-steps { padding: 18px 18px; }
  .ask-step { font-size: 14px; gap: 10px; }
  .ask-dock-note { font-size: 10.5px; margin-top: 5px; }
  .ask-bar--dock { min-height: 56px; }
  .ask-bar--dock .ask-send { width: 44px; height: 44px; }
}

@keyframes ask-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ask-leave { from { opacity: 1; } to { opacity: 0; transform: translateY(-4px); } }
@keyframes ask-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ask-word { from { opacity: 0; transform: translateY(.32em); } to { opacity: 1; transform: none; } }
@keyframes ask-settle { from { transform: scale(1.1); } to { transform: scale(1.04); } }
@keyframes ask-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes ask-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(10 107 68 / .28); } 50% { box-shadow: 0 0 0 6px rgb(10 107 68 / 0); } }
@keyframes ask-flash { 0% { box-shadow: 0 0 0 0 rgb(10 107 68 / 0); } 25% { box-shadow: 0 0 0 3px rgb(10 107 68 / .35); } 100% { box-shadow: 0 0 0 0 rgb(10 107 68 / 0); } }

@media (prefers-reduced-motion: reduce) {
  .ask-page *, .ask-dock, .ask-dock * { animation: none !important; transition: none !important; }
}

/* before the server says whether the law search was used: one shimmering "Thinking…" line, no dots (america.gov) */
.ask-step[data-step="thinking"] .dot { display: none; }
.ask-step[data-step="thinking"] .lbl {
  color: transparent; background: linear-gradient(90deg, rgb(17 22 20 / .45) 0%, rgb(17 22 20 / .9) 45%, rgb(17 22 20 / .45) 90%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: ask-shimmer 1.6s linear infinite;
}
@keyframes ask-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ask-step[data-step="thinking"] .lbl { animation: none; color: var(--label-2); } }
/* one activity line while a tool runs (shimmer), then a quiet line with the real count in the answer */
.ask-step[data-step="now"] .dot { display: none; }
.ask-step[data-step="now"] .lbl { color: transparent; background: linear-gradient(90deg, rgb(17 22 20 / .45) 0%, rgb(17 22 20 / .9) 45%, rgb(17 22 20 / .45) 90%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; animation: ask-shimmer 1.6s linear infinite; }
.ask-tools { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--label-2); }
.ask-tools svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .ask-step[data-step="now"] .lbl { animation: none; color: var(--label-2); } }
/* "Where do you rent?": one field with suggestions next to at most three buttons */
.ask-where { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; margin-top: 2px; padding: 4px 4px 4px 16px; min-height: 52px; border-radius: 999px;
  background: rgb(17 22 20 / .045); transition: box-shadow .2s cubic-bezier(.22, 1, .36, 1), background-color .2s cubic-bezier(.22, 1, .36, 1); }
.ask-where:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--label); }
.ask-where input { flex: 1; min-width: 0; border: 0; background: none; font: 500 16px/1.2 var(--font); color: var(--label); outline: none; }
.ask-where .ask-send { width: 44px; height: 44px; flex: none; }
