:root {
  /* brand ramp — the ONLY per-demo block (plus --head-font). Everything below is shared. */
  /* Chris's own two brand colours, given by him on 2026-09-08: red #d13938, navy #073654.
     Red is the accent, navy is the ink. The ground stays LIGHT for the reason the previous
     note gave — this is a reading surface and his black would fight the citation cards — but
     moves from a warm off-white to a cool one so it sits with navy instead of with orange. */
  --accent: #d13938;
  --accent-dark: #A82B2A;
  --accent-soft: #FBEAEA;
  --accent-line: #EDA9A8;
  --bg: #F7F8FA;
  --bg-blur: rgba(247,248,250,.82);
  --bg-tint: rgba(209,57,56,.06);
  --surface: #ffffff;
  --ink: #073654;
  --muted: #5A6B78;
  --line: #E2E7EB;
  --head-font: "Space Grotesk", system-ui, -apple-system, sans-serif;

  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(7,54,84,.06);
  --shadow: 0 1px 2px rgba(7,54,84,.05), 0 10px 30px rgba(7,54,84,.07);
  --shadow-lg: 0 6px 16px rgba(7,54,84,.08), 0 22px 50px rgba(7,54,84,.10);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 460px at 50% -200px, var(--bg-tint) 0%, rgba(255,255,255,0) 72%);
}

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 14px 20px;
  background: var(--bg-blur);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.paw {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  font-size: 23px;
  background: linear-gradient(150deg, var(--accent-soft), #fff);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.85);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-family: var(--head-font);
  font-weight: 700; font-size: 1.3rem; margin: 0; letter-spacing: -.02em; line-height: 1.12;
}
.tagline { margin: 3px 0 0; font-size: .82rem; color: var(--muted); max-width: 46ch; line-height: 1.4; }
.demo-badge {
  flex: none; align-self: center;
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 5px 11px; border-radius: 999px;
}

/* ---- thread ---- */
.thread {
  flex: 1; min-width: 0; overflow-y: auto;
  padding: 26px 20px 10px;
  display: flex; flex-direction: column; gap: 22px;
  scroll-behavior: smooth;
}
.thread > * { min-width: 0; max-width: 100%; }
.welcome-card, .suggestions, .bubble { max-width: 100%; }

.welcome { margin: auto 0; }
.welcome-card {
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 58%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.intro { margin: 0 0 20px; font-size: 1.1rem; line-height: 1.5; color: var(--ink); }
.suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit; font-size: .9rem; text-align: left; max-width: 100%;
  color: var(--accent-dark); background: var(--surface);
  border: 1px solid var(--accent-line); border-radius: 14px;
  padding: 10px 14px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.chip:hover {
  background: var(--accent-soft); border-color: var(--accent);
  transform: translateY(-1px); box-shadow: var(--shadow);
}

/* ---- messages ---- */
.msg { display: flex; flex-direction: column; max-width: 100%; }
.msg.user { align-items: flex-end; }
.msg.assistant { align-items: flex-start; }
.bubble {
  max-width: 88%;
  padding: 14px 17px; border-radius: 18px;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.user .bubble {
  background: linear-gradient(160deg, var(--accent), var(--accent-dark));
  color: #fff; border-bottom-right-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.msg.assistant .bubble {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-bottom-left-radius: 6px;
  box-shadow: var(--shadow);
}
.bubble :first-child { margin-top: 0; } .bubble :last-child { margin-bottom: 0; }
.bubble p { margin: 0 0 .6em; }
.bubble ul, .bubble ol { margin: .3em 0 .6em; padding-left: 1.25em; }
.bubble li { margin: .2em 0; }
.bubble strong { font-weight: 600; }
.bubble a { color: var(--accent-dark); font-weight: 500; text-underline-offset: 2px; }

.who { font-size: .72rem; color: var(--muted); margin: 0 5px 6px; font-weight: 600; }

/* typing dots */
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  opacity: .4; animation: blink 1.3s infinite both;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

/* ---- citations ---- */
.cites { margin-top: 14px; width: 100%; }
.cites-label {
  font-size: .72rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin: 0 2px 10px;
  display: flex; align-items: center; gap: 6px;
}
.cite-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
}
.cite {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease;
}
.cite:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.cite-thumb { position: relative; aspect-ratio: 16/9; background: var(--accent-soft); }
.cite-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cite-play { position: absolute; inset: 0; display: grid; place-items: center; }
.cite-play span {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(15,25,30,.55); color: #fff; display: grid; place-items: center;
  font-size: 14px; padding-left: 3px;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  transition: transform .12s ease, background .16s ease;
}
.cite:hover .cite-play span { transform: scale(1.08); background: var(--accent); }
.cite-title {
  font-size: .8rem; font-weight: 600; line-height: 1.3;
  padding: 10px 11px 7px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cite-jump {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 4px;
  margin: 0 11px 11px; padding: 3px 9px;
  font-size: .7rem; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 999px;
}

/* ---- composer ---- */
.composer {
  position: sticky; bottom: 0;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(255,255,255,0));
}
.composer-form {
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow);
}
.composer-form:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft); }
.composer-input {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; color: var(--ink); padding: 9px 0;
  display: block; resize: none; overflow-y: auto; max-height: 140px; line-height: 1.4;
}
.composer-input::placeholder { color: var(--muted); }
.send-btn {
  flex: none; width: 42px; height: 42px; border: none; border-radius: 50%;
  background: linear-gradient(160deg, var(--accent), var(--accent-dark)); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  transition: filter .15s ease, transform .08s ease;
}
.send-btn:hover { filter: brightness(1.08); }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { background: #b9c7cc; cursor: default; filter: none; }
.disclaimer { text-align: center; color: var(--muted); font-size: .72rem; margin: 10px 4px 0; line-height: 1.4; }

/* ---- feedback (disclosed, user-initiated; rendered only when config feedback !== "off") ---- */
/* Authoritative hide for feedback elements. The `hidden` attribute is display:none at UA
   specificity, which an author `display:flex` (on .fb-follow / .fb-chips / .fb-general)
   overrides — leaving them visible. So JS toggles this class instead, and it must win. */
.fb-hide { display: none !important; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.feedback-toggle {
  font: inherit; font-size: .76rem; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.feedback-toggle:hover { color: var(--accent-dark); border-color: var(--accent-line); background: var(--accent-soft); }

/* per-answer feedback row (quiet, under the answer) */
.fb { margin-top: 12px; width: 100%; }
.fb-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fb-q { font-size: .78rem; color: var(--muted); margin-right: 2px; }
.fb-thumb {
  font: inherit; font-size: .78rem;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.fb-thumb:hover { border-color: var(--accent-line); color: var(--ink); }
.fb-thumb.sel {
  color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent);
  font-weight: 600;
}

.fb-follow { margin-top: 9px; display: flex; flex-direction: column; gap: 8px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip {
  font: inherit; font-size: .72rem;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.fb-chip:hover { border-color: var(--accent-line); color: var(--ink); }
.fb-chip.sel { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }

.fb-note-row { display: flex; gap: 7px; align-items: center; max-width: 460px; }
.fb-note {
  flex: 1; min-width: 0; font: inherit; font-size: .8rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 11px; outline: none;
}
.fb-note:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-note-send, .fb-general-send {
  flex: none; font: inherit; font-size: .78rem; font-weight: 600;
  color: #fff; background: var(--accent);
  border: none; border-radius: 10px; padding: 7px 14px; cursor: pointer;
  transition: background .15s ease;
}
.fb-note-send:hover, .fb-general-send:hover { background: var(--accent-dark); }
.fb-thanks { font-size: .76rem; color: var(--accent-dark); font-weight: 600; align-self: center; }
.fb-priv { font-size: .68rem; color: var(--muted); line-height: 1.4; max-width: 460px; }

/* general feedback panel (under the header, inline, not a modal) */
.fb-general {
  position: sticky; top: 0; z-index: 4;
  margin: 0 20px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0 0 16px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 9px;
}
.fb-general-text {
  font: inherit; font-size: .85rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; outline: none; resize: vertical; width: 100%;
}
.fb-general-text:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fb-general-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 560px) {
  .brand-text h1 { font-size: 1.16rem; }
  .tagline { display: none; }
  .bubble { max-width: 92%; }
  .welcome-card { padding: 22px 20px; }
  .feedback-toggle { font-size: .72rem; padding: 4px 9px; }
}

/* A non-video citation (written guide / blog post) gets this in place of the play overlay; see
   the isVideo() branch in app.js. Sits where the .cite-jump pill sits on a video card so the two
   read as siblings. Inert on a video-only demo, which never renders the element. */
.cite-read {
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); padding: 0 11px 9px; margin-top: -2px;
  align-self: flex-start;
}

/* Optional feedback notes appear only after a rating. */
.fb-note-label { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; color: var(--muted); max-width: 460px; }
textarea.fb-note { width: 100%; resize: vertical; }
.fb-note-skip { font: inherit; font-size: .78rem; color: var(--muted); background: transparent; border: 0; padding: 7px; cursor: pointer; }
.fb-thanks { margin-top: 8px; }
.fb-note-send:disabled, .fb-general-send:disabled { opacity: .6; cursor: wait; }

/* ---- first-visit welcome (rendered by app.js only when config.js carries `firstVisit`) ----
   Follows the Ask Eric welcome dialog: a native <dialog>, blurred backdrop, one primary button.
   Three short steps, so no step needs scrolling on a laptop and the first reads in a few seconds.

   The dialog is three regions and only the middle one scrolls: a head that always shows the step's
   title and the way out, a body, and a foot that always shows Back, the step dots and the primary
   button. A step taller than the window therefore cuts a row of the body at a hairline, and never
   a heading at the rounded top edge or a button behind the controls.

   Every length below comes from the two scales declared on dialog.fv. A gap is one of five values
   and a size is one of five sizes; picking a sixth is how the spacing drifted the first time. */
dialog.fv, .fv-next {
  --fv-1: 4px; --fv-2: 8px; --fv-3: 12px; --fv-4: 16px; --fv-5: 24px; --fv-pad: 26px;
  --fv-title: 1.25rem;   /* 20px  step heading          */
  --fv-lede: 1.0625rem;  /* 17px  the sentence that matters on the step */
  --fv-body: .9375rem;   /* 15px  running text and the question buttons */
  --fv-meta: .8125rem;   /* 13px  counts, links, the line under an answer */
  --fv-fine: .75rem;     /* 12px  small print and the step numbers */
}
dialog.fv {
  width: min(576px, calc(100vw - 32px)); max-height: min(90dvh, 760px);
  padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
  font: inherit;
  transition: height .24s cubic-bezier(.22, .61, .36, 1);
}
dialog.fv[open] { display: flex; flex-direction: column; animation: fv-in .22s cubic-bezier(.22, .61, .36, 1) both; }
dialog.fv::backdrop { background: rgba(10, 12, 13, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* first visit: the page stays invisible until app.js has put the welcome up (html.pre-welcome is
   set by the inline script in index.html before first paint, with a 2.5 s safety timeout) */
html.pre-welcome .app { opacity: 0; }
.app { transition: opacity .25s ease; }
@keyframes fv-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fv-step { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  dialog.fv[open], .fv-body.fv-in { animation: none; }
  dialog.fv, .app { transition: none; }
}
/* the surfaces a browser would otherwise style for us */
dialog.fv :focus-visible, .fv-about:focus-visible, .fv-next :focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
dialog.fv .fv-start:focus-visible { outline-color: var(--ink); }   /* a brand ring on the brand fill reads as a bug */
dialog.fv ::selection { background: var(--accent-soft); color: var(--ink); }

/* ---- the three regions ---- */
.fv-head {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  gap: var(--fv-3); padding: var(--fv-5) var(--fv-pad) var(--fv-4);
}
.fv-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px var(--fv-pad) var(--fv-2);
  scrollbar-width: none; -ms-overflow-style: none;   /* the hairlines below carry the signal instead */
}
.fv-body::-webkit-scrollbar { width: 0; height: 0; }
.fv-body.fv-in { animation: fv-step .18s ease both; }
.fv-foot { flex: none; padding: var(--fv-4) var(--fv-pad) var(--fv-5); }
dialog.fv[data-overflow="1"] .fv-head { border-bottom: 1px solid var(--line); }
dialog.fv[data-overflow="1"] .fv-foot { border-top: 1px solid var(--line); }

dialog.fv h2 {
  font-family: var(--head-font); font-weight: 700; font-size: var(--fv-title);
  letter-spacing: -.02em; line-height: 1.2; margin: 0; text-wrap: balance;
}
.fv-x {
  width: 32px; height: 32px; margin: -5px -8px 0 0; display: grid; place-items: center;
  color: var(--muted); background: transparent; border: 0; border-radius: 999px; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.fv-x:hover { color: var(--ink); background: var(--accent-soft); }
.fv-x svg { display: block; width: 15px; height: 15px; }

/* ---- step 1 and step 2 ---- */
.fv-premise { margin: 0 0 var(--fv-4); font-size: var(--fv-lede); line-height: 1.45; }
.fv-lead { margin: var(--fv-4) 0 0; font-size: var(--fv-meta); line-height: 1.45; color: var(--muted); }

/* ---- step 3: three rows, a hairline between them, no box inside a box ---- */
.fv-decisions { list-style: none; counter-reset: fv; margin: 0; padding: 0; }
.fv-dec {
  counter-increment: fv; display: grid; grid-template-columns: 24px minmax(0, 1fr);
  column-gap: var(--fv-3); row-gap: var(--fv-2);
}
.fv-dec > * { grid-column: 2; }
.fv-dec + .fv-dec { margin-top: var(--fv-4); padding-top: var(--fv-4); border-top: 1px solid var(--line); }
.fv-dec::before {
  content: counter(fv); grid-column: 1; grid-row: 1; align-self: start; margin-top: -1px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fv-fine); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--accent-dark); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.fv-dec.fv-tried::before {
  content: ""; border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6.3l2.6 2.6L10 3.2' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    center / 12px no-repeat;
}
.fv-so { margin: 0; font-size: var(--fv-body); line-height: 1.45; text-wrap: pretty; }
.fv-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline;
  column-gap: var(--fv-3); font-size: var(--fv-meta); line-height: 1.45; color: var(--muted);
}
.fv-ran { margin: 0; }
.fv-why {
  font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.fv-why:hover { color: var(--accent-dark); }
.fv-said { margin: 0; font-size: var(--fv-meta); line-height: 1.45; color: var(--muted); }

/* ---- the question buttons ---- */
.fv-try {
  display: block; width: 100%; margin: 0; font: inherit; font-size: var(--fv-body); line-height: 1.4;
  text-align: left; text-wrap: pretty; color: var(--accent-dark); background: var(--surface);
  border: 1px solid var(--accent-line); border-radius: 14px; padding: 9px 13px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.fv-try:hover { background: var(--accent-soft); border-color: var(--accent); }
/* step 2's single action sits above a question box that looks a lot like a bordered white
   field, so it is tinted at rest: a button, not something to type in. */
.fv-try.fv-big {
  font-size: var(--fv-lede); padding: 14px 16px; box-shadow: var(--shadow-sm);
  background: var(--accent-soft);
}
.fv-try.fv-big:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ---- the step controls: Back, the dots and the primary button on one centre line ---- */
.fv-nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--fv-3); }
.fv-nav .fv-link { margin-left: -2px; }   /* the ink lines up, the hit area keeps its padding */
.fv-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--fv-2);
}
/* The active dot is a pill, and it changes in the same instant the whole body swaps, so there is
   nothing to tween: an extra 180ms width animation here would be a second moving part nobody sees. */
.fv-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--line);
  cursor: pointer; transition: background .15s ease;
}
.fv-dot:hover { background: var(--accent-line); }
.fv-dot.on { width: 22px; background: var(--accent); }
.fv-start {
  flex: none; white-space: nowrap; font: inherit; font-size: var(--fv-body); font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(160deg, var(--accent), var(--accent-dark));
  border: 0; border-radius: 14px; padding: 11px 22px; min-width: 104px;
  box-shadow: var(--shadow-sm); transition: filter .15s ease;
}
.fv-start:hover { filter: brightness(1.07); }
.fv-link {
  font: inherit; font-size: var(--fv-meta); color: var(--muted); background: transparent; border: 0;
  padding: 4px 2px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.fv-link:hover { color: var(--accent-dark); }
.fv-fine { margin: var(--fv-5) 0 0; font-size: var(--fv-fine); color: var(--muted); line-height: 1.45; }

/* ---- header: the way back in ---- */
.fv-about {
  font: inherit; font-size: .75rem; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.fv-about:hover { color: var(--accent-dark); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---- under an answer to one of the welcome's questions: the way onward ---- */
.fv-next {
  margin-top: var(--fv-4); width: 100%; display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--fv-2) var(--fv-3); font-size: var(--fv-meta); line-height: 1.45; color: var(--muted);
  border: 1px dashed var(--accent-line); border-radius: 14px; padding: 12px 14px;
}
.fv-next > span { flex: 1 1 100%; }
.fv-next .fv-try { width: auto; max-width: 100%; flex: 0 1 auto; }

@media (max-width: 560px) {
  dialog.fv, .fv-next { --fv-pad: 18px; --fv-title: 1.1875rem; --fv-lede: 1rem; }
  .fv-dec { grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; }
  .fv-dec::before { width: 22px; height: 22px; }
  .fv-start { padding: 11px 18px; min-width: 0; }
  /* Back, the dots and the button do not fit one row at 390px without crowding, so the dots take
     their own centred line above the two controls. */
  .fv-nav { display: grid; grid-template-columns: auto auto; grid-template-areas: "dots dots" "back next"; row-gap: var(--fv-3); }
  .fv-dots { position: static; transform: none; grid-area: dots; justify-self: center; }
  .fv-nav .fv-link { grid-area: back; justify-self: start; }
  .fv-nav .fv-start { grid-area: next; justify-self: end; }
  .fv-about { font-size: .7rem; padding: 4px 10px; }
  .topbar-right .demo-badge { display: none; }
}
