@font-face { font-family: "Bebas Neue"; src: url("/assets/bebas-neue.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/assets/montserrat-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/assets/montserrat-bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0a0a; --surface: #111; --card: #141414; --raised: #1b1b1b;
  --text: #ededed; --muted: #888; --border: rgba(255,255,255,.11);
  --accent: #189766; --accent-light: #1fb87d; --focus: #62d8a8;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --body: "Montserrat", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 78% 40%, rgba(24,151,102,.08), transparent 30%), var(--bg); font-family: var(--body); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 72px); border-top: 4px solid var(--accent); border-bottom: 1px solid var(--border); background: rgba(10,10,10,.94); }
.brand { display: flex; align-items: center; gap: 18px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .05em; }
.brand img { width: 74px; height: 38px; object-fit: contain; }
.brand b { color: var(--accent-light); }
.header-meta { color: var(--muted); font-family: var(--display); letter-spacing: .14em; }
.app-shell, .admin-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.intro { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); align-items: center; gap: 48px; padding: 68px 0; overflow: hidden; }
.intro-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 16px; color: var(--accent-light); font-size: 12px; font-weight: 700; letter-spacing: .22em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .045em; }
h1 { margin: 0; max-width: 780px; color: #fff; font-size: clamp(52px, 8vw, 94px); line-height: .93; }
.lede { max-width: 660px; margin: 28px 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.58; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 34px 0; color: var(--muted); }
.facts span { display: flex; align-items: baseline; gap: 8px; }
.facts strong { color: var(--accent-light); font-family: var(--display); font-size: 30px; font-weight: 400; }
.fineprint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bit { object-fit: contain; filter: drop-shadow(0 20px 50px rgba(0,0,0,.7)); }
.bit-intro { width: min(480px, 43vw); justify-self: end; }
.button { min-height: 52px; padding: 13px 30px; border-radius: 999px; border: 1px solid var(--border); color: #fff; font-family: var(--display); font-size: 19px; letter-spacing: .09em; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease, opacity .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { border-color: var(--accent-light); background: var(--accent); box-shadow: 0 0 22px rgba(24,151,102,.18); }
.button.primary:hover { background: var(--accent-light); }
.button.secondary { background: transparent; }

.survey-view { width: min(980px, 100%); margin: 0 auto; padding: clamp(34px, 6vw, 70px) 0; }
.progress-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; font-family: var(--display); letter-spacing: .1em; color: var(--accent-light); }
.progress-head div { display: grid; gap: 4px; }
.progress-head small, #time-left { color: var(--muted); font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.progress-track { height: 4px; overflow: hidden; background: var(--raised); }
.progress-track span { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--accent-light); transition: transform .45s cubic-bezier(.16,1,.3,1); }
.question-panel { min-height: 540px; padding: clamp(30px, 5vw, 64px); border: 1px solid var(--border); border-radius: 14px; background: rgba(20,20,20,.92); }
.question-panel h1 { max-width: 780px; font-size: clamp(38px, 5.4vw, 64px); line-height: 1; }
.question-help { min-height: 26px; margin: 14px 0 30px; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scale-choices { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
.choice { position: relative; display: grid; min-height: 60px; place-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--raised); cursor: pointer; text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.choice:hover { transform: translateY(-2px); border-color: rgba(31,184,125,.5); }
.choice.selected { border-color: var(--accent-light); background: var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { font-weight: 700; }
.scale-choices .choice span { font-family: var(--display); font-size: 28px; font-weight: 400; }
.scale-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12px; }
.matrix { display: grid; gap: 10px; }
.matrix-head, .matrix fieldset { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(5, 56px); gap: 8px; align-items: center; }
.matrix-head { color: var(--muted); text-align: center; font-size: 12px; }
.matrix fieldset { margin: 0; padding: 8px 0; border: 0; border-bottom: 1px solid var(--border); }
.matrix legend { display: contents; }
.matrix fieldset label { position: relative; display: grid; width: 48px; height: 44px; place-items: center; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.matrix fieldset input { position: absolute; opacity: 0; }
.matrix fieldset label:has(input:checked) { border-color: var(--accent-light); background: var(--accent); }
.text-answer { position: relative; display: block; }
textarea, input[type="email"], input[type="password"] { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); color: var(--text); }
textarea { min-height: 150px; padding: 20px; resize: vertical; font-size: 18px; line-height: 1.6; }
.counter { position: absolute; right: 14px; bottom: 12px; color: var(--muted); font-size: 12px; }
.actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; }
.form-error { min-height: 24px; color: #ff8d87; font-size: 14px; }

.completion-view { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 620px) 1fr; align-items: center; gap: 32px; padding: 60px 0; }
.completion-copy { position: relative; z-index: 1; }
.completion-copy h1, .done-view h1 { font-size: clamp(58px, 8vw, 92px); }
.completion-copy > p:not(.eyebrow) { font-size: 20px; line-height: 1.55; }
.raffle-form { display: grid; gap: 18px; margin-top: 32px; }
.raffle-form > label:first-child { display: grid; gap: 9px; color: var(--accent-light); font-family: var(--display); letter-spacing: .08em; }
.raffle-form input[type="email"], .admin-login input { padding: 15px 18px; font-family: var(--body); }
.check { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check a { color: var(--accent-light); text-underline-offset: 3px; }
.text-button { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; }
.bit-complete { width: min(430px, 38vw); justify-self: end; }
.done-view { min-height: calc(100vh - 76px); display: grid; place-content: center; justify-items: start; max-width: 760px; gap: 18px; }
.done-view p { font-size: 20px; line-height: 1.5; }

.admin-shell { padding: 56px 0 90px; }
.admin-login { width: min(580px, 100%); margin: 10vh auto 0; }
.admin-login h1, .dashboard-title h1 { font-size: clamp(48px, 6vw, 72px); }
.admin-login form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 28px; }
.dashboard-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 34px 0; border: 1px solid var(--border); background: var(--border); }
.metrics div { display: grid; padding: 28px; background: var(--card); }
.metrics strong { color: var(--accent-light); font-family: var(--display); font-size: 54px; font-weight: 400; }
.metrics span { color: var(--muted); font-size: 13px; }
.checkpoint-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.checkpoint-filter button { padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.checkpoint-filter button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.results { display: grid; gap: 14px; margin-top: 24px; }
.result-card { padding: 26px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.result-card header { display: grid; grid-template-columns: 50px 1fr auto; gap: 14px; align-items: start; }
.result-card header > span, .result-card header > b { color: var(--accent-light); font-family: var(--display); font-size: 18px; }
.result-card header h2 { margin: 0; font-size: 28px; }
.average { margin-left: 64px; color: var(--muted); }
.average strong { margin-right: 8px; color: var(--accent-light); font-family: var(--display); font-size: 42px; font-weight: 400; }
.bars, .comments, .matrix-results { margin: 22px 0 0 64px; }
.bar-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr 40px; gap: 12px; align-items: center; margin-top: 9px; font-size: 13px; }
.bar-row > div { height: 8px; overflow: hidden; background: var(--raised); }
.bar-row i { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--accent); }
.bar-row b { color: var(--muted); text-align: right; }
.matrix-results { display: flex; flex-wrap: wrap; gap: 24px; }
.matrix-results div { display: grid; min-width: 140px; }
.matrix-results strong { color: var(--accent-light); font-family: var(--display); font-size: 42px; font-weight: 400; }
.matrix-results small { color: var(--muted); }
blockquote { margin: 10px 0; padding: 12px 16px; border-left: 2px solid var(--accent); background: var(--raised); color: var(--text); line-height: 1.5; }

@media (max-width: 760px) {
  .site-header { height: 64px; padding-inline: 18px; }
  .brand { gap: 10px; font-size: 13px; }
  .brand img { width: 54px; }
  .header-meta { display: none; }
  .app-shell, .admin-shell { width: min(100% - 28px, 1180px); }
  .intro { grid-template-columns: 1fr; align-content: center; padding: 46px 0; }
  .bit-intro { position: absolute; right: -65px; bottom: -8px; width: 230px; opacity: .28; }
  .intro-copy { padding-bottom: 120px; }
  .facts { display: grid; }
  .survey-view { padding: 24px 0 40px; }
  .question-panel { min-height: calc(100vh - 160px); padding: 28px 20px; }
  .choices { grid-template-columns: 1fr; }
  .scale-choices { grid-template-columns: repeat(3, 1fr); }
  .matrix-head { display: none; }
  .matrix fieldset { grid-template-columns: repeat(5, 1fr); padding: 14px 0 18px; }
  .matrix legend { display: block; grid-column: 1 / -1; margin-bottom: 6px; }
  .matrix fieldset label { width: 100%; }
  .actions { position: sticky; bottom: 10px; padding-top: 18px; background: linear-gradient(transparent, var(--card) 32%); }
  .actions .button { flex: 1; padding-inline: 18px; }
  .completion-view { grid-template-columns: 1fr; padding: 44px 0; }
  .bit-complete { position: absolute; right: -35px; top: 100px; width: 180px; opacity: .22; }
  .completion-copy { padding-bottom: 40px; }
  .admin-login form { grid-template-columns: 1fr; }
  .dashboard-title { align-items: start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .result-card { padding: 20px 16px; }
  .result-card header { grid-template-columns: 42px 1fr auto; }
  .bars, .comments, .matrix-results, .average { margin-left: 0; }
  .bar-row { grid-template-columns: 120px 1fr 30px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
