/* 01 the questions. Built on results/style.css tokens; this page scrolls freely (no screen snapping). */
html { scroll-snap-type: none; }
.rq main { padding: 0 var(--gutter) 0 calc(var(--zip-x) + 26px); }
.rq a:focus-visible, .rq button:focus-visible { outline: 1px solid var(--zip); outline-offset: 3px; }

/* ---------------------------------------------------------------- hero */
.rq-hero { min-height: auto; padding: 0; display: block; }
.rq-hero .hero-copy { margin-top: calc(120px + 6vh); }
.rq-lead { margin: 30px 0 0; max-width: 52ch; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.6; color: var(--ink); }
.rq-tally { margin-top: clamp(48px, 9vh, 96px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rq-tally dd a { color: var(--ink); text-shadow: 0 0 18px rgba(120, 160, 255, 0.28); transition: color .2s var(--ease); }
.rq-tally dd a:hover { color: var(--zip); }
.rq-tally div:last-child dd a { color: var(--zip); text-shadow: 0 0 14px rgba(60, 255, 230, 0.4); }
.rq-tally dt { text-transform: none; letter-spacing: 0.04em; font-size: 12px; color: var(--dim); }

/* ---------------------------------------------------------------- sections */
.rq-sec { padding-top: clamp(90px, 14vh, 150px); }
.rq-head h2.swarmed { color: transparent; text-shadow: none; }
.rq-head h2 { margin: 0; font: 900 clamp(34px, 4.6vw, 72px)/0.95 var(--display); }
.rq-head p, .rq-p { margin: 18px 0 0; max-width: 72ch; color: var(--dim); font-size: 14px; line-height: 1.7; }
.rq-sub { margin: 64px 0 0; font: 900 clamp(24px, 2.4vw, 34px)/1 var(--display); }

/* ---------------------------------------------------------------- the library field */
.lib { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.lib-stage { position: relative; min-width: 0; }
#lib-cv { display: block; cursor: crosshair; touch-action: pan-y; }
.lib-labels span { position: absolute; left: 0; font-size: 12px; letter-spacing: 0.04em; color: var(--dim); pointer-events: none; transform: translateY(4px); }
.lib-labels b { font: 900 17px/1 var(--display); color: var(--ink); margin-right: 6px; }
.tip { position: absolute; z-index: 5; width: min(320px, 100%); padding: 11px 13px 12px; display: grid; gap: 6px; pointer-events: none;
  background: rgba(10, 13, 24, 0.94); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  font-size: 12px; line-height: 1.5; animation: tipIn .16s var(--ease); }
.tip b { font-weight: 400; color: var(--ink); font-size: 13px; }
.tip span { color: var(--faint); }
.tip .tt { color: var(--dim); }
.tip .tt i, .lib-key i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--c); border-radius: 1px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(3px); } }

.lib-key h3 { margin: 0 0 10px; font: 900 20px/1 var(--display); }
.lib-key ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lib-key button { width: 100%; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 4px; padding: 6px 4px; text-align: left; font-size: 12px; line-height: 1.35; color: var(--dim);
  border-bottom: 1px solid var(--line); transition: color .2s var(--ease), background .2s var(--ease); }
.lib-key button b { font: 700 12px/1 var(--mono); color: var(--faint); }
.lib-key button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.lib-key button.on { color: var(--ink); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 90%); }
.lib-key button.on b { color: var(--c); }
.lib-key .note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--faint); }

/* ---------------------------------------------------------------- surveys */
.sv { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sv a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 26%) 52px; grid-template-rows: auto auto; gap: 2px 20px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); transition: background .2s var(--ease); }
.sv a:hover { background: rgba(255, 255, 255, 0.03); }
.sv-t { grid-column: 1; font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.sv-m { grid-column: 1; grid-row: 2; font-size: 11.5px; color: var(--faint); }
.sv-bar { grid-column: 2; grid-row: 1 / span 2; height: 6px; background: rgba(255, 255, 255, 0.05); border-radius: 1px; }
.sv-bar i { display: block; height: 100%; background: rgba(170, 190, 255, 0.55); border-radius: 1px; transition: background .2s var(--ease); }
.sv a:hover .sv-bar i { background: var(--zip); }
.sv b { grid-column: 3; grid-row: 1 / span 2; text-align: right; font: 900 20px/1 var(--display); }

/* ---------------------------------------------------------------- the atlas */
.at { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 44px; align-items: start; }
.at-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 28px; }
.ag h3 { margin: 0 0 9px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.ag h3 b { flex: none; font: 900 16px/1 var(--display); color: var(--ink); }
.ag h3 em { font: 400 11px/1 var(--mono); font-style: normal; color: var(--zip); margin-left: 8px; }
.ag-c { display: flex; flex-wrap: wrap; gap: 5px; }
.hc { width: 16px; height: 16px; border-radius: 2px; background: rgba(170, 180, 220, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.hc:hover, .hc.on { background: rgba(236, 236, 240, 0.85); transform: scale(1.18); }
.hc.lit { background: var(--zip); box-shadow: 0 0 10px rgba(60, 255, 230, 0.55); }
.hc.lit.on { background: rgb(210, 255, 248); box-shadow: 0 0 16px rgba(60, 255, 230, 0.9); }
.at-read { position: sticky; top: 24px; padding: 20px 22px 22px; border-radius: 8px; min-height: 280px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .14s var(--ease), transform .14s var(--ease); }
.at-read.swap { opacity: 0; transform: translateY(3px); }
.ar-id { margin: 0; white-space: nowrap; display: flex; justify-content: space-between; gap: 12px; font: 900 22px/1 var(--display); color: var(--ink); }
.ar-id span { white-space: normal; font: 400 11px/1.4 var(--mono); color: var(--faint); text-align: right; }
.at-read h3 { margin: 14px 0 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.ar-q { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
.ar-h { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--dim); }
.ar-h span { display: block; color: var(--faint); font-size: 11px; margin-bottom: 2px; }
.ar-c { margin: 16px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.ar-c.lit { color: var(--zip); }

/* ---------------------------------------------------------------- tracks */
.trk { margin: 36px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.trk > li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 90px; gap: 6px 26px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); position: relative; }
.trk > li::before { content: ""; position: absolute; left: -14px; top: 22px; bottom: 22px; width: 2px; background: hsl(var(--th) 95% 72%); opacity: 0.55; }
.tk-code { font: 900 36px/1 var(--display); color: hsl(var(--th) 95% 78%); text-shadow: 0 0 14px hsla(var(--th), 95%, 65%, 0.35); }
.tk-body h3 { margin: 0; font-size: 17px; font-weight: 700; }
.tk-body p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink); max-width: 64ch; }
.tk-body ul { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--faint); }
.tk-n { justify-self: end; text-align: right; display: grid; color: var(--dim); transition: color .2s var(--ease); }
.tk-n b { font: 900 34px/1 var(--display); color: var(--ink); }
.tk-n span { font-size: 11.5px; }
.tk-n:hover, .tk-n:hover b { color: hsl(var(--th) 95% 78%); }
.rq-next { margin: 56px 0 0; display: inline-grid; grid-template-columns: auto auto; gap: 4px 16px; align-items: baseline; padding: 18px 24px 18px 0; color: var(--ink); }
.rq-next b { grid-row: span 2; font: 900 56px/1 var(--display); color: var(--zip); text-shadow: 0 0 14px rgba(60, 255, 230, 0.4); transition: transform .2s var(--ease); }
.rq-next span { font: 900 clamp(26px, 3vw, 40px)/1 var(--display); }
.rq-next em { font-style: normal; font-size: 12px; color: var(--dim); }
.rq-next:hover b { transform: translateX(4px); }
.rq-foot { margin-top: 90px; padding: 20px 0 40px; border-top: 1px solid var(--line); }
.rq-foot p { margin: 0; font-size: 12px; color: var(--faint); }
.rq-foot a { color: var(--dim); border-bottom: 1px solid var(--line-2); }
.rq-foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- narrow */
/* results/style.css hides the first nav link on small screens; here it is the current page, so keep it */
.top nav.phase-nav a:nth-child(1) { display: inline-flex; }
@media (max-width: 1100px) {
  .lib, .at { grid-template-columns: minmax(0, 1fr); }
  .lib-key ol { columns: 2; column-gap: 24px; }
  .lib-key li { break-inside: avoid; }
  .at-read { top: auto; bottom: 10px; min-height: 0; z-index: 4; background: rgba(12, 15, 28, 0.92); }
}
@media (max-width: 680px) {
  :root { --zip-x: 12px; }
  .rq main { padding: 0 16px 0 calc(var(--zip-x) + 14px); }
  .top { padding-left: calc(var(--zip-x) + 14px); padding-right: 16px; gap: 10px; }
  .rq-hero .hero-copy { margin-top: 110px; }
  .rq-tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-tally div { padding-right: 8px; padding-bottom: 14px; }
  .lib-key ol { columns: 1; }
  .sv a { grid-template-columns: minmax(0, 1fr) 46px; }
  .sv-bar { grid-column: 1; grid-row: 3; margin-top: 6px; }
  .sv b { grid-column: 2; grid-row: 1 / span 3; }
  .at-grid { grid-template-columns: minmax(0, 1fr); }
  .at-read { padding: 14px 16px; } .ar-h { display: none; } .at-read h3 { margin-top: 8px; font-size: 14px; } .ar-q { font-size: 12.5px; } .ar-c { margin-top: 10px; padding-top: 8px; }
  .trk > li { grid-template-columns: minmax(0, 1fr) auto; }
  .tk-code { font-size: 28px; }
  .tk-body { grid-column: 1 / -1; grid-row: 2; }
  .tk-n { grid-column: 2; grid-row: 1; }
  .trk > li::before { left: -10px; }
}
@media (prefers-reduced-motion: reduce) { .tip, .at-read, .hc { animation: none; transition: none; } }
