/* Theme: Lilac daylight (Onest), from hive-peek-handoff/THEME.md. Phone-first; on wider screens the same layout
   is centred in a 480px column. Components use tokens only; rem units (1rem = 16px). */
@font-face { font-family: 'Onest'; src: url('../fonts/Onest-variable.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('../fonts/InstrumentSerif-italic-400.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --font: 'Onest', system-ui, -apple-system, sans-serif;
  --bg: #FBFAFF;
  --bg-veil: rgba(251, 250, 255, 0.92);
  --bg-glow: #EEE6FF;
  --ink: #221146;
  --ink-2: rgba(34, 17, 70, 0.74);
  --ink-3: rgba(34, 17, 70, 0.55);
  --accent: #560CDD;
  --on-accent: #FFFFFF;
  --accent-tint: #EDE4FF;
  --accent-soft: #C9A8FF;
  --surface: #FFFFFF;
  --hairline: #ECE6F8;
  --card-shadow: 0 0 0 1px var(--hairline), 0 0.5rem 1.5rem rgba(34, 17, 70, 0.06);
  --track: rgba(34, 17, 70, 0.08);
  --progress-off: rgba(34, 17, 70, 0.165);
  --shadow: 0 0.25rem 0.875rem rgba(34, 17, 70, 0.18);
  --bar: linear-gradient(90deg, #C9A8FF 0%, #8A5CFF 50%, #560CDD 100%);
  --box-off: rgba(34, 17, 70, 0.04);
  --wedge-off: #EDE7F7;
  --gutter: 1.25rem;
  --thumb: 1.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; scroll-padding-bottom: 6rem; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); font-size: 1rem; line-height: 1.5;
  background: radial-gradient(55% 45% at 100% 0%, var(--bg-glow) 0%, transparent 70%), var(--bg);
  background-attachment: fixed;
}
h1, h2 { margin: 0; font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: 1.875rem; line-height: 1.05; letter-spacing: -0.03em; }
h1.big { font-size: 2.125rem; line-height: 1.02; }
h2 { font-size: 1.375rem; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.hidden { display: none !important; }

/* Column: the phone layout, centred at 480px on wider screens */
.col { max-width: 30rem; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; gap: 0.75rem;
  padding: calc(1rem + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 0.75rem calc(var(--gutter) + env(safe-area-inset-left));
  background: var(--bg-veil); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
/* Header matches the Winterfest drinks page: white bar, Hive logo left, WINTERFEST right; progress underneath */
.top { background: var(--surface); border-bottom: 1px solid var(--hairline); -webkit-backdrop-filter: none; backdrop-filter: none; }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.brandrow img { display: block; height: 1.375rem; width: auto; }
.brandrow .tag { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-3); }
.bars { display: flex; gap: 0.375rem; }
.bars span { flex: 1; height: 3px; border-radius: 999px; background: var(--progress-off); }
.bars span.on { background: var(--accent); }

/* Screens */
main { flex: 1; display: flex; flex-direction: column; }
main > .screen { flex: 1; }   /* short pages: the action bar sits at the bottom of the screen */
.screen { display: flex; flex-direction: column; gap: 0.875rem; padding: 1.75rem calc(var(--gutter) + env(safe-area-inset-right)) 1.5rem calc(var(--gutter) + env(safe-area-inset-left)); }
.eyebrow { font-size: 0.875rem; font-weight: 700; color: var(--accent); }
.body { font-size: 1rem; color: var(--ink-2); }
.note { font-size: 0.9375rem; color: var(--ink-2); }
.fine { font-size: 0.8125rem; color: var(--ink-3); }
.legal { padding: 0 calc(var(--gutter) + env(safe-area-inset-right)) calc(1.25rem + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left)); text-align: center; font-size: 0.75rem; color: var(--ink-3); }
.notice { padding: 0.75rem 1rem; border-radius: 1rem; background: var(--accent-tint); }
.loading { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--ink-2); }
.loading::before { content: ""; width: 1.125rem; height: 1.125rem; border-radius: 999px; border: 3px solid var(--accent-tint); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Way back to the Winterfest drinks page (quiz welcome) */
/* Leaving the quiz: a quiet link below the quiz, above the legal line, on every quiz screen */
.exit { display: flex; justify-content: center; padding: 0.5rem var(--gutter) 0.75rem; border-top: 1px solid var(--hairline); }
.tolanding { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 0.75rem; color: var(--accent); font-size: 0.9375rem; font-weight: 700; text-decoration: none; }
.tolanding svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.tolanding:hover { text-decoration: underline; }

/* Name field */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.label { font-size: 1.1875rem; font-weight: 600; }
.tin { min-height: 3.5rem; padding: 0 1.125rem; border: 0; border-radius: 1rem; background: var(--surface); box-shadow: var(--card-shadow); font: inherit; font-size: 1.0625rem; color: var(--ink); }
.tin::placeholder { color: var(--ink-3); }

/* Quiz welcome: serif accent word, small hexagon, numbered steps */
h1 em { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent); }
.hexart.welcome { max-width: 18.75rem; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.625rem; }
.steps li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0.875rem; border-radius: 0.875rem; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.steps b { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 0.875rem; }
.steps span { font-size: 0.9375rem; line-height: 1.35; font-weight: 600; }
.steps small { display: block; margin-top: 0.125rem; font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); }

/* Welcome chips (not interactive) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); font-size: 0.9375rem; font-weight: 600; }

/* Sliders */
.item { border: 0; margin: 0; padding: 1.125rem 0 0.5rem; border-top: 1px solid var(--hairline); min-width: 0; }
.item legend { float: left; width: 100%; padding: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.item > legend ~ * { clear: both; }
.sl input { --fill: 50%; display: block; width: 100%; height: 2.75rem; margin: 0.5rem 0 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; touch-action: pan-y; }
.sl input::-webkit-slider-runnable-track { height: 0.5rem; border-radius: 999px; background: var(--bar) 0 0 / var(--fill) 100% no-repeat, var(--track); }
.sl input::-moz-range-track { height: 0.5rem; border-radius: 999px; background: var(--track); }
.sl input::-moz-range-progress { height: 0.5rem; border-radius: 999px; background: var(--bar); }
.sl input::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: calc((0.5rem - var(--thumb)) / 2); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.sl input::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.sl input[data-v="1"] { --fill: 0%; } .sl input[data-v="2"] { --fill: 16.7%; } .sl input[data-v="3"] { --fill: 33.3%; }
.sl input[data-v="4"] { --fill: 50%; } .sl input[data-v="5"] { --fill: 66.7%; } .sl input[data-v="6"] { --fill: 83.3%; } .sl input[data-v="7"] { --fill: 100%; }
.sl.empty input::-webkit-slider-runnable-track { background: var(--track); }
.sl.empty input::-moz-range-progress { background: transparent; }
.sl.empty input::-webkit-slider-thumb { opacity: 0; }
.sl.empty input::-moz-range-thumb { opacity: 0; }
.ends { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--ink-2); }
.hint { margin-top: 0.125rem; text-align: center; font-size: 0.8125rem; color: var(--ink-3); }
.item.flash legend { color: var(--accent); }

/* Sticky action bar */
.actionbar {
  position: sticky; bottom: 0; z-index: 9; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem calc(var(--gutter) + env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
  background: var(--bg); border-top: 1px solid var(--hairline);   /* solid, so statements don't show through */
}
.btn { flex: 1; min-height: 3.25rem; padding: 0 2rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.btn[aria-disabled="true"] { opacity: 0.4; }
.back { flex: none; min-height: 2.75rem; padding: 0 0.5rem; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* Result cards */
.card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; border-radius: 1.25rem; background: var(--surface); box-shadow: var(--card-shadow); }
.sub { margin-top: 0.125rem; font-size: 0.875rem; color: var(--ink-2); }
.cardnote { font-size: 0.875rem; color: var(--ink-2); padding: 0.625rem 0.75rem; border-radius: 0.75rem; background: var(--box-off); }
.endnames { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.endnames span { max-width: 45%; }
.endnames span:last-child { text-align: right; }
.spectrum { display: block; width: 100%; height: 1.75rem; overflow: visible; }
.spectrum .trk { fill: var(--track); }
.spectrum .fill { fill: var(--accent); opacity: 0.85; }
.spectrum .mid { fill: var(--ink); opacity: 0.45; }
.spectrum .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-3); }
.leanline { font-size: 1rem; font-weight: 600; }
.leanline span { color: var(--ink-3); font-weight: 500; }
.boxes { display: flex; gap: 0.5rem; }
.box { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; border-radius: 0.875rem; background: var(--box-off); }
.box b { font-size: 0.875rem; }
.box p { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }
.box.on { background: var(--accent-tint); }
.box.on b { color: var(--accent); }

/* Option A card: headline = the end the person leans toward; pillar badge in the top-right corner */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cardtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.dimname { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 0.25rem; }
.pbadge { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.125rem; font-size: 0.6875rem; font-weight: 700; color: var(--accent); }
.picon { display: block; flex: none; }
.picon .wedge { fill: var(--wedge-off); stroke: var(--surface); stroke-width: 3; stroke-linejoin: round; }
.picon .wedge.on { fill: var(--accent); }
.picon .hub { fill: var(--surface); }
.card h2 { font-size: 1.5rem; margin-top: -0.25rem; }
.strength { align-self: flex-start; padding: 0.25rem 0.625rem; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: 0.8125rem; font-weight: 700; }
.endnames .on { color: var(--accent); }
.desc { font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.other { border-radius: 0.75rem; background: var(--box-off); }
.other summary { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; min-height: 2.75rem; padding: 0.5rem 0.75rem; list-style: none; cursor: pointer; font-size: 0.8125rem; color: var(--ink-2); }
.other summary::-webkit-details-marker { display: none; }
.other summary b { color: var(--ink); }
.other .more { flex: none; font-weight: 700; color: var(--accent); }
.other[open] .more { visibility: hidden; }
.other p { padding: 0 0.75rem 0.75rem; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }

/* The Hive platform card */
.mech { margin-top: 0.625rem; display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem 1.25rem 0.75rem; border-radius: 1.25rem; background: var(--surface); box-shadow: var(--card-shadow); }
.mechnum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.mechnum .big { font-size: 4rem; line-height: 0.9; font-weight: 700; letter-spacing: -0.04em; color: var(--accent); }
.mech h2 { font-size: 1.375rem; line-height: 1.2; }
.mech .body { font-size: 0.9375rem; }
.hexart { display: block; width: 100%; max-width: 21.625rem; height: auto; margin: 0 auto; }
.plist { margin: 0; padding: 0; list-style: none; }
.plist li { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--hairline); }
.plist b { display: block; font-size: 0.9375rem; color: var(--ink); }
.plist p { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }

/* Closing card */
.closing { margin-top: 0.625rem; display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem 1.25rem; border-radius: 1.25rem; background: var(--ink); color: var(--on-accent); }
.closing .eyebrow { color: var(--accent-soft); }
.closing h2 { color: var(--on-accent); font-size: 1.5rem; }
.closing p { font-size: 0.9375rem; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.closing .lead { font-size: 1rem; font-weight: 600; color: var(--on-accent); }
.closing .cta { display: flex; align-items: center; justify-content: center; min-height: 3.25rem; margin-top: 0.25rem; padding: 0 1.5rem; border-radius: 999px; background: var(--surface); color: var(--accent); font-size: 1.0625rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.closing :focus-visible { outline-color: var(--on-accent); }
.links { display: flex; justify-content: center; gap: 1.5rem; }
.textlink { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 0.25rem; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

@media (max-width: 22.5rem) { .boxes { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
