/* ── Sault Skill Survey — app styles (built on Agenvia foundations) ── */

body { min-height: 100vh; background: var(--bg-1); }

/* ── App shell ─────────────────────────────────────────────── */
.shell { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 60px;
  flex: 0 0 60px;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-1);
  background: rgb(246 245 240 / 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand svg { width: 26px; height: 26px; display: block; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.brand-sub {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  border-left: 1px solid var(--border-1); padding-left: 10px; margin-left: 2px;
  white-space: nowrap;
}
.topbar-spacer { flex: 1; }
.topbar-link {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 12px; border-radius: var(--r-full); border: 1px solid var(--border-1);
  transition: all var(--dur) var(--ease);
}
.topbar-link:hover { color: var(--fg-1); background: var(--bg-2); border-color: var(--border-2); text-decoration: none; }

.view { flex: 1; display: none; }
.view.active { display: block; }

@media (max-width: 560px) { .brand-sub { display: none; } }

/* ── Home ──────────────────────────────────────────────────── */
.home {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - 60px);
}
.home-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px clamp(40px, 6vw, 96px);
  max-width: 760px;
  animation: rise 600ms var(--ease) both;
}
.home-left .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-2);
}
.home-left .eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: var(--r-full);
  background: var(--signal-green); box-shadow: 0 0 0 4px var(--signal-green-2);
}
.home-left h1 {
  font-size: clamp(40px, 5.2vw, 60px); line-height: 1.02;
  letter-spacing: -0.035em; font-weight: 600; margin: 18px 0 20px;
  text-wrap: balance;
}
.home-lede { font-size: 19px; line-height: 1.55; color: var(--fg-2); max-width: 500px; margin-bottom: 36px; }

.start-card {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-2xl);
  padding: 28px;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.start-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.start-card-head h5 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.start-meta { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.start-meta-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-top: 1px solid var(--border-1);
  font-size: 13px; color: var(--fg-2);
}
.start-meta-row:last-child { border-bottom: 1px solid var(--border-1); }
.start-meta-row .k {
  color: var(--fg-3); width: 96px; flex: 0 0 96px;
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
}
.start-meta-row .v { color: var(--fg-1); font-weight: 500; }
.start-card .btn { width: 100%; padding: 14px 16px; font-size: 15px; }
.start-foot { font-size: 12.5px; color: var(--fg-3); margin: 14px 0 0; line-height: 1.5; }

/* hero panel */
.home-right { background: var(--bg-2); border-left: 1px solid var(--border-1); position: relative; overflow: hidden; }
.home-right svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-right::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgb(11 15 14 / 0.04));
  pointer-events: none;
}
.hero-caption {
  position: absolute; left: 22px; bottom: 22px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-1);
  background: rgb(246 245 240 / 0.82); backdrop-filter: blur(4px);
  border: 1px solid var(--border-1); border-radius: var(--r-full);
  padding: 7px 13px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; }
  .home-right { min-height: 240px; order: -1; }
  .home-left { padding: 44px 28px; }
}

/* ── Survey ────────────────────────────────────────────────── */
.survey-wrap { max-width: 680px; margin: 0 auto; padding: 28px 24px 100px; }

/* progress */
.progress-card {
  background: rgb(246 245 240 / 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  padding: 16px 18px 14px;
  margin-bottom: 36px;
  position: sticky; top: 76px; z-index: 5;
  box-shadow: var(--shadow-sm);
}
.progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-section {
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg-1);
  display: inline-flex; align-items: center; gap: 8px;
}
.progress-section::before {
  content: ""; width: 7px; height: 7px; border-radius: var(--r-full); background: var(--signal-green);
}
.progress-count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }

/* segmented section stepper */
.stepper { display: flex; gap: 6px; }
.step {
  flex: 1; height: 6px; border-radius: var(--r-full);
  background: var(--fog); overflow: hidden; position: relative;
}
.step .step-fill {
  position: absolute; inset: 0; width: 0;
  background: var(--signal-green); border-radius: var(--r-full);
  transition: width 420ms var(--ease);
}
.step.done .step-fill { width: 100%; }
.step.active .step-fill { width: 100%; background: linear-gradient(90deg, var(--signal-green), #3DD4A0); }
.step.active::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-full);
  box-shadow: 0 0 0 2px rgb(18 185 129 / 0.18);
}

/* question block */
.q-block { animation: qenter 360ms var(--ease) both; }
@keyframes qenter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.q-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--signal-green);
  letter-spacing: 0.04em; margin-bottom: 12px; font-weight: 500;
}
.q-text { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.16; letter-spacing: -0.025em; font-weight: 600; margin-bottom: 10px; text-wrap: pretty; }
.q-help { font-size: 15px; color: var(--fg-2); line-height: 1.55; margin-bottom: 28px; max-width: 560px; }

/* option rows */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border-2); border-radius: var(--r-xl);
  background: var(--bg-1); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  font-size: 16px; color: var(--fg-1); text-align: left; width: 100%;
  font-family: var(--font-sans); line-height: 1.35;
}
.opt:hover { background: var(--bg-1); border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.opt-mark {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: var(--r-full);
  border: 2px solid var(--border-2); display: grid; place-items: center;
  background: var(--bg-1);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.opt.multi .opt-mark { border-radius: var(--r-md); }
.opt-mark::after {
  content: ""; width: 10px; height: 10px; border-radius: inherit; background: var(--paper);
  transform: scale(0); transition: transform 160ms var(--ease);
}
.opt.multi .opt-mark::after {
  width: 12px; height: 12px; background: none; border-radius: 0;
  border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: rotate(45deg) scale(0); margin-top: -2px; width: 6px; height: 11px;
}
.opt.on {
  border-color: var(--signal-green); background: var(--signal-green-2);
  box-shadow: var(--shadow-sm);
}
.opt.on .opt-mark { border-color: var(--signal-green); background: var(--signal-green); }
.opt.on .opt-mark::after { transform: scale(1); }
.opt.multi.on .opt-mark::after { transform: rotate(45deg) scale(1); }
.opt-label { flex: 1; }
.opt-key {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-1); border-radius: var(--r-md);
  background: var(--bg-2);
  transition: all var(--dur) var(--ease);
}
.opt:hover .opt-key { border-color: var(--border-2); color: var(--fg-2); }
.opt.on .opt-key { background: var(--signal-green); color: var(--paper); border-color: var(--signal-green); }

/* Option definition helper ("?" with tooltip) */
.opt { position: relative; }
.opt-help {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; cursor: help; outline: none;
}
.opt-help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: var(--r-full);
  border: 1.25px solid var(--border-2); background: var(--bg-2);
  color: var(--fg-3); font-size: 9.5px; font-weight: 700; line-height: 1;
  font-family: var(--font-sans);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.opt-help:hover .opt-help-icon,
.opt-help:focus-visible .opt-help-icon,
.opt-help.tip-open .opt-help-icon {
  border-color: var(--signal-green); color: var(--signal-green); background: var(--signal-green-2);
}
.opt-tip {
  position: absolute; bottom: calc(100% + 8px); left: 16px; right: auto;
  width: max-content; max-width: min(320px, calc(100% - 32px));
  padding: 9px 12px; z-index: 40;
  background: var(--green-deep); color: #fff;
  font-family: var(--font-sans); font-size: 13px; font-weight: 400; line-height: 1.45;
  text-align: left; border-radius: 9px;
  box-shadow: 0 12px 28px -10px rgb(20 32 28 / 0.45);
  opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none;
  transition: opacity 130ms var(--ease), transform 130ms var(--ease);
}
.opt-help:hover .opt-tip,
.opt-help:focus-visible .opt-tip,
.opt-help.tip-open .opt-tip {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.opt-help.tip-open .opt-tip { pointer-events: auto; }

/* select / input / textarea */
.field { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.field-lbl { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-2); }
select.input { appearance: none; background-image: none; cursor: pointer; padding-right: 38px; }
.select-wrap { position: relative; max-width: 460px; }
.select-wrap::after { content: "▾"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--fg-2); pointer-events: none; }
textarea.input { font-family: var(--font-sans); font-size: 16px; line-height: 1.55; min-height: 140px; resize: vertical; max-width: 100%; }
input.input { max-width: 460px; }

/* rating grid */
/* Skill rows are separate cards, matching the .opt option rows for consistency. */
.grid-rate { display: flex; flex-direction: column; gap: 10px; }
.rate-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  min-height: 58px; padding: 12px 18px;
  border: 1px solid var(--border-2); border-radius: var(--r-xl);
  background: var(--bg-1); box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.rate-row:hover { background: var(--bg-1); border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.rate-name { font-size: 15px; color: var(--fg-1); font-weight: 500; }
.rate-name span { display: block; font-size: 12.5px; color: var(--fg-3); margin-top: 2px; font-weight: 400; }
.rate-scale { display: flex; gap: 6px; }
.rate-dot {
  width: 40px; height: 38px; border: 1px solid var(--border-2); background: var(--bg-1);
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-2);
  border-radius: var(--r-lg); cursor: pointer; display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.rate-dot:hover { border-color: var(--signal-green); color: var(--signal-green); transform: translateY(-1px); }
.rate-dot.on { background: var(--signal-green); color: var(--paper); border-color: var(--signal-green); box-shadow: var(--shadow-accent); }
.rate-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 12px; padding: 0 2px; }
/* one-at-a-time skills: small "x/N" counter (row style unchanged) */
.rate-one-top { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 8px; }
.rate-count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
/* "0 = Not Sure" button — set slightly apart from the 1–5 scale, neutral when chosen */
.rate-dot.ns { margin-left: 10px; color: var(--fg-3); }
.rate-dot.ns.on { background: var(--fg-2); border-color: var(--fg-2); color: #fff; box-shadow: none; }

/* Progress trophy goal marker (grey → green when complete) */
.progress-bar-row { display: flex; align-items: center; gap: 8px; }
.progress-bar-row .progress-track { flex: 1; }
.progress-trophy { flex: 0 0 auto; width: 18px; height: 18px; color: var(--fg-3); display: inline-flex; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.progress-trophy svg { width: 100%; height: 100%; }
.progress-trophy.done { color: var(--signal-green); transform: scale(1.08); }

/* Halfway acknowledgment — colorful trophy moment, auto-dismissing */
.champion-backdrop {
  position: fixed; inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: rgb(248 247 243 / 0.36);
  backdrop-filter: blur(9px) saturate(1.05);
  opacity: 0;
  transition: opacity 360ms var(--ease);
}
.champion-backdrop.show { opacity: 1; }
.champion-toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999; pointer-events: none;
  display: grid; justify-items: center; gap: 12px;
  width: min(430px, calc(100vw - 38px));
  padding: 36px 34px 30px; border-radius: 26px;
  background:
    radial-gradient(circle at 30% 10%, rgb(255 212 98 / 0.34), transparent 9rem),
    radial-gradient(circle at 84% 18%, rgb(11 79 156 / 0.18), transparent 9rem),
    linear-gradient(145deg, #ffffff, #f8fbff 48%, #fff3f6);
  border: 1px solid rgb(36 122 90 / 0.18);
  box-shadow: 0 30px 80px -28px rgb(20 32 28 / 0.5);
  opacity: 0;
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}
.champion-toast::before {
  content: "";
  position: absolute; inset: 12px;
  border-radius: 21px;
  border: 1px solid rgb(11 79 156 / 0.12);
}
.champion-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.champion-toast-trophy {
  position: relative;
  flex: 0 0 auto; width: 96px; height: 96px;
  display: grid; place-items: center;
  color: #c58a10;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 36%, rgb(255 224 116 / 0.95), rgb(255 196 65 / 0.5) 42%, transparent 43%),
    linear-gradient(135deg, rgb(11 79 156 / 0.16), rgb(164 20 53 / 0.16));
  box-shadow: 0 16px 34px -18px rgb(164 20 53 / 0.55);
  animation: champion-pop 900ms var(--ease) both, champion-glow 1400ms ease-in-out 900ms 2 alternate;
}
.champion-toast-trophy svg { width: 68px; height: 68px; filter: drop-shadow(0 5px 8px rgb(197 138 16 / 0.28)); }
.champion-toast-text { position: relative; text-align: center; }
.champion-toast-text b { display: block; font-size: 28px; font-weight: 600; color: var(--fg-1); letter-spacing: -0.03em; }
.champion-toast-text span { display: block; margin-top: 5px; font-size: 15px; line-height: 1.45; color: var(--fg-2); }

@keyframes champion-pop {
  0% { opacity: 0; transform: translateY(10px) scale(0.72) rotate(-5deg); }
  55% { opacity: 1; transform: translateY(-3px) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes champion-glow {
  from { box-shadow: 0 16px 34px -18px rgb(164 20 53 / 0.55), 0 0 0 0 rgb(255 196 65 / 0.34); }
  to { box-shadow: 0 16px 34px -18px rgb(164 20 53 / 0.55), 0 0 0 10px rgb(255 196 65 / 0); }
}

/* Completion screen trophy */
.champion-trophy { display: block; width: 86px; height: 86px; margin: 0 auto 18px; color: var(--signal-green); }
.champion-trophy svg { width: 100%; height: 100%; }
.state-card:has(.champion-trophy) { text-align: center; }
.state-card:has(.champion-trophy) p { margin-left: auto; margin-right: auto; }
.state-card:has(.champion-trophy) .actions { justify-content: center; }

@media (max-width: 560px) {
  .rate-row { grid-template-columns: 1fr; gap: 12px; }
  .rate-dot { width: 100%; height: 40px; }
  .rate-scale { display: grid; grid-template-columns: repeat(5, 1fr); }
}

/* opt-in toggle */
.optin { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--border-2); border-radius: var(--r-xl); background: var(--bg-1); cursor: pointer; margin-bottom: 18px; box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease); }
.optin:hover { border-color: var(--border-strong); }
.optin .opt-mark { border-radius: var(--r-md); margin-top: 1px; }
.optin .opt-mark::after {
  width: 6px; height: 11px; background: none; border-radius: 0;
  border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: rotate(45deg) scale(0); margin-top: -2px;
}
.optin.on { border-color: var(--signal-green); background: var(--signal-green-2); }
.optin.on .opt-mark { border-color: var(--signal-green); background: var(--signal-green); }
.optin.on .opt-mark::after { transform: rotate(45deg) scale(1); }
.optin-text { font-size: 15px; line-height: 1.5; }
.optin-text b { font-weight: 600; }
.optin-text span { display: block; color: var(--fg-3); font-size: 13px; margin-top: 3px; }

/* nav row */
.q-nav { display: flex; align-items: center; gap: 12px; margin-top: 36px; }
.q-nav .btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.q-nav-spacer { flex: 1; }
.q-hint { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.kbd-hint { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-2);
  border: 1px solid var(--border-1); border-bottom-width: 2px; border-radius: var(--r-sm);
  padding: 2px 5px; background: var(--bg-1); line-height: 1;
}

/* terminal / ineligible / complete states */
.state-card { max-width: 580px; margin: 72px auto; text-align: left; animation: rise 500ms var(--ease) both; }
.state-card.card { box-shadow: var(--shadow-lg); border-radius: var(--r-2xl); padding: 36px; }
.state-card .pill { margin-bottom: 20px; }
.state-card h2 { font-size: 32px; letter-spacing: -0.025em; margin-bottom: 14px; }
.state-card p { font-size: 16px; line-height: 1.6; color: var(--fg-2); }
.state-card .actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.receipt { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--border-1); border-radius: var(--r-lg); padding: 14px 16px; margin-top: 26px; }
.receipt div { display: flex; justify-content: space-between; padding: 4px 0; }
.receipt .k { color: var(--fg-3); }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-wrap { max-width: 940px; margin: 0 auto; padding: 48px 24px 80px; }
.admin-head { margin-bottom: 32px; }
.admin-head .eyebrow { margin-bottom: 10px; display: block; }
.admin-head h2 { font-size: 32px; letter-spacing: -0.025em; }

.gate { max-width: 400px; margin: 88px auto; }
.gate.card { box-shadow: var(--shadow-lg); border-radius: var(--r-2xl); padding: 32px; }
.gate .field { max-width: 100%; }
.gate h4 { margin-bottom: 8px; }
.gate p { font-size: 14px; color: var(--fg-2); margin-bottom: 22px; }
.gate .btn { width: 100%; margin-top: 14px; padding: 13px; }
.gate-err { font-family: var(--font-mono); font-size: 12px; color: var(--crimson); margin-top: 12px; min-height: 16px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.astat { border: 1px solid var(--border-1); border-radius: var(--r-xl); padding: 20px; background: var(--bg-1); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.astat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.astat-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.astat-val { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.astat-sub { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 8px; }
.astat-sub.g { color: var(--signal-green); }

.export-card { border: 1px solid var(--border-1); border-radius: var(--r-2xl); background: var(--bg-1); padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: var(--shadow-md); }
.export-card h4 { font-size: 19px; margin-bottom: 8px; }
.export-card p { font-size: 14px; color: var(--fg-2); margin: 0; max-width: 440px; line-height: 1.55; }
.export-meta { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.export-card .btn { padding: 13px 20px; }
.export-card .btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

.admin-foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border-1); display: flex; align-items: center; gap: 18px; }
.admin-foot .lnk { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.admin-foot .lnk:hover { color: var(--crimson); }

@media (max-width: 720px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .export-card { grid-template-columns: 1fr; }
}

/* ── shared motion ─────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 2026 product refresh */
:root {
  --ink: #14201c;
  --ink-2: #20332c;
  --paper: #f8f7f3;
  --paper-2: #f0eee7;
  --paper-3: #e7e4dc;
  --graphite: #58645f;
  --graphite-2: #89918d;
  --fog: #d8d9d3;
  --signal-green: #247a5a;     /* accent: selection, progress, ratings */
  --signal-green-2: #e6f1eb;
  --green-deep: var(--signal-green); /* actions match the indicator green */
  --green-deep-hover: #1c5e45;        /* darker shade, hover only */
  --nordik-blue: #0b4f9c;
  --nordik-red: #a41435;
  --nordik-bg:
    radial-gradient(circle at 10% 4%, rgb(11 79 156 / 0.16), transparent 32rem),
    radial-gradient(circle at 92% 0%, rgb(164 20 53 / 0.14), transparent 30rem),
    linear-gradient(135deg, rgb(11 79 156 / 0.08), rgb(164 20 53 / 0.06) 48%, #fff 82%);
  --dashboard-bg:
    #ebe7df;
  --dashboard-card:
    #fff;
  --dashboard-card-solid: #fff;
  --dashboard-border: rgb(0 0 0 / 0.14);
  --dashboard-border-strong: rgb(0 0 0 / 0.2);
  --dashboard-muted: #666;
  --dashboard-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  --dashboard-shadow-soft: 0 1px 2px rgb(0 0 0 / 0.06);
  --border-1: rgb(20 32 28 / 0.1);
  --border-2: rgb(20 32 28 / 0.18);
  --border-strong: var(--green-deep);
  --shadow-sm: 0 1px 2px rgb(20 32 28 / 0.05);
  --shadow-md: 0 10px 30px -18px rgb(20 32 28 / 0.32);
  --shadow-lg: 0 24px 60px -28px rgb(20 32 28 / 0.34);
  --shadow-accent: 0 10px 24px -12px rgb(36 122 90 / 0.55);
  --ring: 0 0 0 4px rgb(36 122 90 / 0.14);
}

body {
  background: var(--nordik-bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

.topbar {
  height: 56px;
  flex-basis: 56px;
  padding: 0 max(64px, calc((100vw - 1180px) / 2));
  background: #ffffff;
  border-color: var(--border-1);
  backdrop-filter: saturate(1.2) blur(18px);
}
.brand { gap: 10px; }
.brand svg { width: 28px; height: 28px; }
.brand-copy { display: flex; flex-direction: column; gap: 0; }
.brand-name { font-size: 14px; line-height: 17px; font-weight: 600; }
.brand-sub {
  margin: 0; padding: 0; border: 0;
  font-family: var(--font-sans); font-size: 10.5px; line-height: 13px;
  color: var(--fg-3); letter-spacing: 0.015em;
}
.topbar-link {
  gap: 6px; padding: 7px 16px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  color: #fff; background: var(--signal-green);
  border-radius: 8px; border-color: var(--signal-green);
}
.topbar-link:hover { background: var(--green-deep-hover); border-color: var(--green-deep-hover); color: #fff; }

.home {
  display: block;
  min-height: auto;
}
.hero {
  width: min(1180px, calc(100% - 128px));
  min-height: auto;
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}
.hero-copy {
  width: 100%;
  animation: rise 600ms var(--ease) both;
}
.hero-art {
  pointer-events: none;
}
.hero-map {
  width: 100%;
  min-height: 500px;
  margin-top: -32px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: rise 700ms 80ms var(--ease) both;
}
.hero-map img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
}
.map-location-label {
  position: absolute;
  left: 63%;
  top: 70%;
  padding: 7px 10px;
  border: 1px solid rgb(23 61 50 / 0.12);
  border-radius: 999px;
  background: rgb(248 247 243 / 0.94);
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 20px -14px rgb(20 32 28 / 0.5);
  white-space: nowrap;
}
.hero-copy .eyebrow { color: #426257; }
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 0 5px rgb(36 122 90 / 0.1);
}
.hero h1 {
  max-width: 650px;
  margin: 0 0 24px;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}
.home-lede {
  max-width: 600px;
  margin: 0;
  font-size: 19px;
  line-height: 1.58;
  color: var(--fg-2);
}
/* A/B/C recruitment message body — leaning (parallelogram) cards, decreasing width.
   Green outline + faint light-green fill + rounded corners; the card shape is a
   skewed pseudo-element so the text stays upright while the panel leans. */
.home-body { display: flex; flex-direction: column; gap: 14px; max-width: 600px; align-items: flex-start; }
.home-body-p {
  position: relative; z-index: 0;
  margin: 0;
  padding: 16px 30px;
  font-size: 15.5px; line-height: 1.6; color: var(--fg-1);
}
.home-body-p::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--signal-green-2);
  border: 1.5px solid var(--signal-green);
  border-radius: 14px;
  transform: skewX(-6deg);
  box-shadow: 0 8px 18px -12px rgb(20 32 28 / 0.22);
}
.home-body-p:nth-child(1) { width: 100%; }
.home-body-p:nth-child(2) { width: 86%; }
.home-body-p:nth-child(3) { width: 72%; }
.hero-actions {
  display: flex; align-items: center; gap: 22px;
  margin-top: 34px;
}
.btn-hero { min-height: 42px; padding: 0 22px; background: var(--green-deep); border-color: var(--green-deep); }
.btn-hero:hover { background: var(--green-deep-hover); }
.hero-time {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-2); font-size: 14px; font-weight: 500;
}
.hero-time svg { width: 18px; height: 18px; }

.hero-reward {
  display: inline-flex; align-items: center; gap: 9px;
  width: fit-content; max-width: 100%;
  margin: 16px 0 0; padding: 9px 14px;
  background: var(--signal-green-2);
  border: 1px solid rgb(36 122 90 / 0.18);
  border-radius: var(--r-full);
  color: #1c5e45; font-size: 13.5px; font-weight: 500; line-height: 1.35;
}
.hero-reward svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--signal-green); }

.trust-row {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-top: 28px;
}
.trust-row span {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--fg-2); font-size: 13px; font-weight: 500;
}
.trust-row svg { width: 18px; height: 18px; color: var(--signal-green); }

.hero-visual {
  min-height: 520px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  animation: rise 700ms 80ms var(--ease) both;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 18px 8px 16px 48px; z-index: -3;
  border-radius: 42% 58% 48% 52% / 48% 42% 58% 52%;
  background:
    radial-gradient(circle at 70% 22%, rgb(255 255 255 / 0.7) 0 5%, transparent 5.5%),
    linear-gradient(145deg, #dce9df, #b9d7c5 56%, #93bba8);
  transform: rotate(-3deg);
}
.hero-visual::after {
  content: "";
  position: absolute; right: 7%; top: 9%; z-index: -2;
  width: 94px; height: 94px; border-radius: 50%;
  background: #f0b95d;
  box-shadow: 0 0 0 14px rgb(240 185 93 / 0.13);
}
.visual-orbit {
  position: absolute; z-index: -1;
  border: 1px solid rgb(23 61 50 / 0.16); border-radius: 50%;
}
.orbit-one { width: 400px; height: 400px; right: 5%; top: 11%; }
.orbit-two { width: 480px; height: 240px; left: 2%; bottom: 5%; transform: rotate(18deg); }
.preview-card {
  width: min(470px, calc(100% - 54px));
  margin: 4px 0 0 20px;
  background: rgb(255 255 255 / 0.94);
  border: 1px solid rgb(20 32 28 / 0.12);
  border-radius: 22px;
  box-shadow: 0 30px 70px -28px rgb(23 61 50 / 0.42);
  overflow: hidden;
  transform: rotate(1.4deg);
}
.preview-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 21px 13px;
  font-size: 11px; color: var(--fg-3);
}
.preview-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-1); font-weight: 600; }
.preview-brand span { width: 8px; height: 8px; border-radius: 3px; background: var(--signal-green); }
.preview-count { font-family: var(--font-mono); font-size: 10px; }
.preview-progress { height: 3px; margin: 0 21px; background: #e8ebe8; border-radius: 3px; overflow: hidden; }
.preview-progress span { display: block; width: 36%; height: 100%; background: var(--signal-green); }
.preview-body { padding: 31px 32px 28px; }
.preview-kicker {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--signal-green);
}
.preview-body h2 { max-width: 340px; margin: 9px 0 8px; font-size: 26px; line-height: 1.12; font-weight: 600; }
.preview-body p { margin: 0 0 20px; color: var(--fg-3); font-size: 13px; }
.preview-options { display: flex; flex-direction: column; gap: 8px; }
.preview-options span {
  min-height: 45px; padding: 0 13px;
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--border-2); border-radius: 10px;
  color: var(--fg-2); font-size: 13px; font-weight: 500;
}
.preview-options i {
  width: 17px; height: 17px; flex: 0 0 17px;
  display: grid; place-items: center;
  border: 1.5px solid #b7bfba; border-radius: 5px;
  font-style: normal; font-size: 11px;
}
.preview-options .selected { color: var(--green-deep); border-color: #79aa91; background: #eff7f2; }
.preview-options .selected i { color: white; background: var(--signal-green); border-color: var(--signal-green); }
.preview-footer {
  padding: 15px 21px; display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border-1); background: #fbfbf9;
  font-size: 11px; color: var(--fg-3);
}
.preview-footer b {
  padding: 9px 12px; border-radius: 8px;
  background: var(--green-deep); color: white; font-size: 11px; font-weight: 600;
}
.reward-card, .location-chip {
  position: absolute;
  background: rgb(255 255 255 / 0.95);
  border: 1px solid var(--border-1);
  box-shadow: var(--shadow-lg);
}
.reward-card {
  left: -5px; bottom: 38px;
  display: flex; align-items: center; gap: 11px;
  padding: 12px 15px; border-radius: 14px;
  transform: rotate(-3deg);
}
.reward-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: #fff4dc; color: #9c671c; font-weight: 600;
}
.reward-card b, .reward-card small { display: block; }
.reward-card b { font-size: 12px; }
.reward-card small { margin-top: 1px; color: var(--fg-3); font-size: 10px; }
.location-chip {
  right: -5px; top: 40px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 13px; border-radius: 999px;
  color: var(--fg-2); font-size: 11px; font-weight: 500;
}
.location-chip span { width: 7px; height: 7px; border-radius: 50%; background: #e6a63e; }

.home-details {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 98px 0 108px;
  border-top: 1px solid var(--border-1);
  display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 90px;
}
.detail-intro h2 {
  margin-top: 16px; max-width: 390px;
  font-size: clamp(32px, 3.5vw, 46px); line-height: 1.05; font-weight: 600;
}
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.detail-grid article { padding-top: 17px; border-top: 2px solid #b8e3c9; }
.detail-number { font-family: var(--font-mono); font-size: 11px; color: var(--signal-green); }
.detail-grid h3 { margin: 28px 0 10px; font-size: 19px; line-height: 1.2; font-weight: 600; }
.detail-grid p { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.55; }
.home-cta {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 48px;
  padding: 52px 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
  color: white; background: var(--green-deep);
  border-radius: 26px;
  box-shadow: 0 24px 60px -34px var(--green-deep);
  overflow: hidden; position: relative;
}
.home-cta::after {
  content: ""; position: absolute; width: 280px; height: 280px; right: 14%; top: -180px;
  border: 1px solid rgb(255 255 255 / 0.13); border-radius: 50%;
  box-shadow: 0 0 0 45px rgb(255 255 255 / 0.025), 0 0 0 90px rgb(255 255 255 / 0.02);
}
.eyebrow-light { color: #b8e3c9; }
.home-cta h2 { max-width: 600px; margin-top: 10px; color: white; font-size: 34px; line-height: 1.08; font-weight: 500; }
.btn-light { z-index: 1; white-space: nowrap; color: var(--green-deep); background: #f7f5ef; border-color: #f7f5ef; }
.btn-light:hover { color: var(--green-deep); background: white; }

body[data-route="survey"] {
  background: var(--nordik-bg);
  background-attachment: fixed;
}
body[data-route="admin"] {
  background: var(--dashboard-bg);
  background-attachment: fixed;
}
/* Home base matches the map artwork's panel so it blends seamlessly.
   Flat colour (no gradient) — a tint behind the opaque artwork panel
   would make the panel read as a card. */
body[data-route="home"] {
  background: var(--nordik-bg);
  background-attachment: fixed;
}
.survey-wrap { max-width: 780px; padding: 42px 24px 110px; }
.progress-card {
  top: 88px; margin-bottom: 24px; padding: 17px 20px 16px;
  background: rgb(255 255 255 / 0.88);
  border-radius: 16px;
  box-shadow: 0 10px 32px -24px rgb(20 32 28 / 0.4);
}
.stepper { gap: 5px; }
.step { height: 5px; background: #e2e4df; }
.q-block {
  min-height: 420px;
  padding: 42px 46px 44px;
  background: rgb(255 255 255 / 0.78);
  border: 1px solid var(--border-1);
  border-radius: 22px;
  box-shadow: 0 24px 60px -42px rgb(20 32 28 / 0.42);
}
.q-num { color: var(--signal-green); font-size: 11px; }
.q-text { max-width: 630px; font-size: clamp(28px, 4vw, 38px); line-height: 1.08; letter-spacing: -0.035em; }
.q-help { margin-bottom: 30px; color: var(--fg-2); }
.options { gap: 9px; }
.opt {
  min-height: 58px; padding: 15px 17px;
  background: #fff; border-color: var(--border-1); border-radius: 12px;
  box-shadow: none;
}
.opt:hover { border-color: #76a58e; box-shadow: 0 8px 22px -18px rgb(20 32 28 / 0.5); transform: translateY(-1px); }
.opt.on { color: var(--green-deep); border-color: #72a88d; background: #edf6f0; }
.opt-mark { width: 21px; height: 21px; flex-basis: 21px; border-width: 1.5px; }
.q-nav { margin-top: 20px; padding: 0 10px; }
.q-nav .btn { min-height: 45px; border-radius: 10px; }
.grid-rate { gap: 9px; }
.rate-row { min-height: 58px; padding: 9px 17px; background: #fff; border-color: var(--border-1); border-radius: 12px; box-shadow: none; }
.rate-row:hover { border-color: #76a58e; box-shadow: 0 8px 22px -18px rgb(20 32 28 / 0.5); transform: translateY(-1px); }
.rate-dot { width: 39px; border-radius: 9px; }
.rate-dot.on { background: var(--signal-green); box-shadow: 0 7px 16px -10px var(--signal-green); }
.optin { background: #fff; box-shadow: none; border-color: var(--border-1); }
.input { background: #fff; }

.admin-wrap { max-width: 1040px; padding: 24px 24px; }
.admin-head { margin-bottom: 18px; }
.admin-stats { margin-bottom: 16px; }
.admin-foot { margin-top: 18px; padding-top: 14px; }

/* Admin login: center the card in the viewport so the page never scrolls */
body[data-route="admin"] .admin-wrap:has(.gate) {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 24px;
}
.gate { margin: 0; width: 100%; }
.gate.card, .state-card.card {
  padding: 38px; border-radius: 16px;
  background: rgb(255 255 255 / 0.86);
  box-shadow: var(--shadow-lg);
}
.admin-head h2 { font-size: 40px; }
.astat {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  background: var(--dashboard-card);
  box-shadow: var(--dashboard-shadow-soft);
}
.astat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #050505;
}
.astat:nth-child(2)::before { background: linear-gradient(90deg, var(--signal-green), #63b58a); }
.astat:nth-child(3)::before { background: linear-gradient(90deg, var(--nordik-blue), #4b7fd0); }
.astat:nth-child(4)::before { background: linear-gradient(90deg, var(--signal-green), var(--nordik-red)); opacity: 0.72; }
.astat:hover {
  transform: translateY(-1px);
  border-color: var(--dashboard-border-strong);
  box-shadow: var(--dashboard-shadow);
}
.astat-lbl { color: var(--dashboard-muted); letter-spacing: 0.08em; }
.astat-val { color: #10201b; }
.astat-sub { color: #666; }
.export-card { border-radius: 20px; background: rgb(255 255 255 / 0.84); }

/* Primary admin actions use the brand action colour, not ink */
.gate .btn, .export-card .btn {
  background: var(--green-deep); border-color: var(--green-deep); color: #fff;
}
.gate .btn:hover, .export-card .btn:not([disabled]):hover {
  background: var(--green-deep-hover); border-color: var(--green-deep-hover);
}

/* ── Admin: full-height left rail + content (app-style) ─────── */
/* Dashboard is full-bleed so the rail sits flush to the edge;
   the login gate stays centered (rule above). */
body[data-route="admin"] .admin-wrap:has(.admin-shell) {
  max-width: none; padding: 0; margin: 0;
}
.admin-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: 28px 32px;
}

.topbar .admin-header-actions {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-height: none;
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-right: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.topbar .admin-header-actions::before { content: none; }
.topbar .admin-header-actions .export-menu { width: 132px; }
.topbar .admin-header-actions .export-menu .rail-btn-primary,
.topbar .admin-header-actions .rail-btn-ghost {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgb(0 0 0 / 0.16);
  box-shadow: none;
}
.topbar .admin-header-actions .export-menu .rail-btn-primary:not(:disabled):hover,
.topbar .admin-header-actions .rail-btn-ghost:hover {
  background: #f3f2ef;
  border-color: rgb(0 0 0 / 0.24);
  color: #1f1f1f;
}
.topbar .admin-header-actions .rail-spacer { display: none; }
.topbar .admin-header-actions .rail-foot {
  border: 0;
  margin: 0;
  padding: 0;
}
.topbar .admin-header-actions .rail-btn-ghost {
  min-width: 92px;
}

.admin-rail {
  flex: none;
  width: min(1180px, 100%);
  position: relative;
  top: auto;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  box-shadow: var(--dashboard-shadow-soft);
  overflow: visible;
}
.admin-rail::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #050505;
  border-radius: 8px 8px 0 0;
}
.rail-head { padding: 4px 8px 12px; }
.rail-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-3);
}

.rail-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; min-height: 42px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rail-btn-primary { background: var(--green-deep); color: #fff; border-color: var(--green-deep); justify-content: center; }
.rail-btn-primary:not(:disabled):hover { background: var(--green-deep-hover); border-color: var(--green-deep-hover); }
.rail-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.rail-meta { padding: 7px 12px 0; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }

/* Export dropdown (format picker) */
.export-menu {
  position: relative;
  width: 220px;
  margin: 0;
}
.export-menu .rail-btn-primary {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 18px;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  border-color: rgb(0 0 0 / 0.16);
  background: #fff;
  color: #1f1f1f;
  box-shadow: none;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.export-icon,
.export-caret {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.export-icon svg,
.export-caret svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.export-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(-0.5px);
}
.export-caret {
  margin-left: 0;
  opacity: 0.82;
}
.export-caret svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}
.export-menu .rail-btn-primary:not(:disabled):hover {
  background: #f3f2ef;
  border-color: rgb(0 0 0 / 0.24);
  color: #1f1f1f;
  box-shadow: none;
}
.export-menu-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: calc(50% + 24px);
  right: 0;
  z-index: 20;
  width: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: 9px;
  box-shadow: 0 12px 24px -18px rgb(20 32 28 / 0.45), 0 1px 3px rgb(20 32 28 / 0.06);
  transform: none;
}
.export-menu.open .export-menu-list { display: block; }
.export-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 32px;
  text-align: left;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-1);
  cursor: pointer;
}
.export-menu-item svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--fg-3); }
.export-menu-item:hover { background: var(--signal-green-2); color: var(--green-deep); }
.export-menu-item:hover svg { color: var(--green-deep); }
.rail-meta {
  padding-left: 6px;
}

.rail-section-label {
  margin-top: 16px; padding: 12px 12px 8px;
  border-top: 1px solid rgb(0 0 0 / 0.12);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: #7a8580;
}

/* collaborators — rail list, no card chrome */
.collab { display: flex; flex-direction: column; min-height: 0; }
.collab-form { display: flex; gap: 6px; padding: 0 4px; }
.collab-form .input { min-height: 36px; font-size: 13px; }
.collab-form .btn-add {
  width: auto; flex: 0 0 auto; min-height: 36px; padding: 0 14px;
  background: var(--green-deep); border-color: var(--green-deep); color: #fff; box-shadow: none;
}
.collab-form .btn-add:hover { background: var(--green-deep-hover); border-color: var(--green-deep-hover); }
.collab-err { min-height: 13px; padding: 3px 8px 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--crimson); }
.collab-list { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; overflow-y: auto; }
.collab-empty { padding: 6px 10px; font-size: 12px; color: var(--fg-3); }
.collab-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; }
.collab-item:hover { background: var(--bg-2); }
.collab-avatar {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-deep); color: #fff; font-size: 11px; font-weight: 600;
}
.collab-email { flex: 1; min-width: 0; font-size: 12.5px; color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collab-remove {
  flex: 0 0 auto; width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: transparent; color: var(--fg-3); font-size: 17px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.collab-item:hover .collab-remove { opacity: 1; }
.collab-remove:hover { background: var(--crimson-2); color: var(--crimson); }

.rail-spacer { display: block; flex: 1 1 auto; min-width: 12px; }

/* account + log out pinned to the bottom of the rail */
.rail-foot { border-top: 0; margin-top: 0; padding-top: 0; }
.role-badge {
  display: inline-block;
  margin: 0 0 8px 2px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #5f6b66;
  background: rgb(36 122 90 / 0.08);
  border: 1px solid rgb(36 122 90 / 0.16);
}
.rail-account { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.rail-avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--green-deep); color: #fff; font-size: 11px; font-weight: 600;
}
.rail-account-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rail-account-copy b { font-size: 13px; font-weight: 600; }
.rail-account-copy small { font-size: 11px; color: var(--fg-3); }
.rail-btn-ghost {
  justify-content: center;
  background: #fff;
  color: #404040;
  border-color: rgb(0 0 0 / 0.16);
  min-height: 42px;
  min-width: 140px;
  border-radius: 8px;
  font-weight: 500;
}
.rail-btn-ghost:hover {
  background: #f3f2ef;
  border-color: rgb(0 0 0 / 0.24);
  color: #1f1f1f;
}

/* content column */
.admin-content { flex: 1; width: min(1180px, 100%); min-width: 0; padding: 0; }
.admin-content {
  background:
    transparent;
}
.admin-content .admin-head { margin-bottom: 20px; }
.admin-content .admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }

/* ── dashboard analytics ────────────────────────────────────── */
.admin-grid { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-analytics-split {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}
.admin-analytics-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  min-height: 0;
}

.chart-card {
  position: relative;
  overflow: hidden;
  background: var(--dashboard-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: var(--dashboard-shadow-soft);
}
.chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #050505;
}
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-head h4 { font-size: 15px; font-weight: 650; color: #10201b; }
.chart-sub { font-family: var(--font-mono); font-size: 11px; color: #666; white-space: nowrap; }
.chart-empty { display: grid; place-items: center; min-height: 110px; padding: 0 16px; text-align: center; color: #666; font-size: 13px; line-height: 1.5; }

/* Homepage variant funnel table */
.variant-table { display: flex; flex-direction: column; }
.variant-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); align-items: center; padding: 10px 4px; border-top: 1px solid rgb(0 0 0 / 0.08); }
.variant-row > span { font-size: 13.5px; color: #1f1f1f; text-align: right; font-family: var(--font-mono); }
.variant-row > span:first-child { text-align: left; font-family: var(--font-sans); }
.variant-id { font-weight: 600; }
.variant-head {
  border-top: 0;
  margin: 0 -6px;
  padding-inline: 10px;
  border-radius: 6px;
  background: #f3f2ef;
}
.variant-head > span { font-family: var(--font-mono); font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.06em; }
.chan-row { grid-template-columns: 1.6fr 1fr 1fr; }
.vc-row { grid-template-columns: 0.8fr 1.3fr 1fr 1fr 1fr; }
.vc-row > span:nth-child(2) { text-align: left; font-family: var(--font-sans); }

/* Channel-aware privacy note on the consent step */
.consent-privacy { margin: -4px 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--fg-3); max-width: 560px; }

/* Email invitations manager */
.invite-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.invite-emails { min-height: 76px; resize: vertical; }
.invite-card {
  height: 338px;
  min-height: 0;
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
}
.invite-admin-content {
  display: grid;
  place-items: center;
  padding: 0;
  min-height: calc(100vh - 112px);
}
.invite-admin-content .invite-card-focused {
  width: min(620px, 100%);
  height: 338px;
  min-height: 0;
  padding: 16px 20px 14px;
  border-radius: 8px;
  box-shadow: var(--dashboard-shadow-soft);
}
.invite-admin-content .invite-card-focused .chart-head {
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}
.invite-admin-content .invite-card-focused .chart-head h4 {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.invite-admin-content .invite-card-focused .chart-sub {
  padding-top: 0;
}
.invite-admin-content .invite-card-focused .invite-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 0;
}
.invite-admin-content .invite-card-focused .invite-emails {
  height: 42px;
  min-height: 42px;
  padding-inline: 11px;
  border-radius: 7px;
}
.invite-admin-content .invite-card-focused .btn-sm {
  align-self: flex-start;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 9px;
}
.invite-admin-content .invite-card-focused .invite-list-wrap {
  margin-top: 18px;
}
.invite-admin-content .invite-card-focused .invite-list-wrap:empty {
  display: block;
  min-height: 0;
  border: 0;
  margin-top: 0;
  padding: 0;
  background: transparent;
}
.invite-card .chart-head { margin-bottom: 10px; }
.invite-card .invite-form { gap: 8px; margin-bottom: 0; }
.invite-card .invite-emails {
  min-height: 42px;
  height: 42px;
  resize: none;
  overflow: hidden;
  color: #14201c;
  background: #fff;
  border-color: rgb(0 0 0 / 0.18);
}
.invite-card .invite-emails::placeholder { color: #8b948f; }
.invite-card .invite-emails:focus {
  border-color: rgb(36 122 90 / 0.46);
  box-shadow: 0 0 0 4px rgb(36 122 90 / 0.13);
}
.invite-card .btn-sm { min-height: 32px; padding: 0 14px; }
.invite-card .invite-list-wrap {
  min-height: 0;
  margin-top: 8px;
  background:
    #fff;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgb(0 0 0 / 0.22) transparent;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 8px;
  padding: 0 12px;
}
.invite-card .invite-list-wrap:empty {
  display: none;
  margin-top: 0;
}
.invite-card .chart-empty {
  min-height: 0;
  padding: 2px 0 0;
  place-items: start;
  text-align: left;
}
.btn-sm { align-self: flex-start; min-height: 36px; padding: 0 16px; font-size: 13px; }
.invite-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; color: var(--fg-2); }
.invite-card .invite-summary { display: none; }
.invite-table { display: flex; flex-direction: column; min-height: 0; }
.invite-table-body {
  min-height: 0;
  max-height: 104px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(20 32 28 / 0.22) transparent;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.invite-table-body::-webkit-scrollbar { width: 8px; }
.invite-table-body::-webkit-scrollbar-track { background: transparent; }
.invite-table-body::-webkit-scrollbar-thumb {
  background: rgb(20 32 28 / 0.2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.invite-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(108px, 0.72fr) minmax(116px, auto); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgb(0 0 0 / 0.08); }
.invite-head {
  border-top: 0;
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -6px 2px;
  padding: 10px 10px;
  border-radius: 6px;
  background: #f3f2ef;
  box-shadow: none;
}
.invite-head > span { font-family: var(--font-mono); font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.06em; }
.invite-email { font-size: 13px; color: #172721; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #66726c; }
.invite-status-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-grid;
  place-items: center;
}
.invite-status-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.invite-status.is-not-started { color: #7a8580; }
.invite-status.is-started { color: #b87912; }
.invite-status.is-completed,
.invite-status.done { color: var(--signal-green); }
.invite-link { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.btn-copy {
  font-family: var(--font-sans); font-size: 12px; color: var(--green-deep);
  background: rgb(36 122 90 / 0.1); border: 1px solid rgb(36 122 90 / 0.28);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; white-space: nowrap;
  line-height: 1.1;
}
.btn-copy:hover { background: rgb(36 122 90 / 0.16); }
.btn-copy-ghost {
  color: #6c7772;
  background: transparent;
  border-color: rgb(20 32 28 / 0.14);
}
.btn-copy-ghost:hover {
  color: var(--green-deep);
  background: rgb(36 122 90 / 0.08);
  border-color: rgb(36 122 90 / 0.22);
}

.area-svg { width: 100%; height: 150px; display: block; }
.area-fill { fill: rgb(36 122 90 / 0.12); }
.area-line { fill: none; stroke: var(--signal-green); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.area-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 152px 1fr 32px; align-items: center; gap: 12px; }
.bar-label { font-size: 12.5px; color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: var(--fog); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--signal-green); border-radius: 999px; transition: width 400ms var(--ease); }
.bar-val { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); text-align: right; }

@media (max-width: 900px) {
  .admin-grid-2 { grid-template-columns: 1fr; }
  .admin-analytics-split { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 120px 1fr 30px; }
}

@media (max-width: 1024px) {
  .admin-content .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; min-height: 0; padding: 18px; }
  .admin-rail {
    flex: none; width: 100%; height: auto; max-height: none; position: static;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--dashboard-border);
  }
  .export-menu { width: 100%; }
  .rail-spacer { display: none; }
  .rail-btn-ghost { width: 100%; }
  .admin-content { padding: 0; }
  .invite-admin-content { min-height: auto; }
}
@media (max-width: 480px) {
  .admin-content .admin-stats { grid-template-columns: 1fr; }
}
.export-card .btn[disabled] { background: var(--green-deep); border-color: var(--green-deep); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .hero-copy { max-width: 720px; }
  .hero-visual { width: min(650px, 100%); margin: 0 auto; }
  .hero-map { width: min(700px, 100%); min-height: auto; margin: 0 auto; }
  .home-details { grid-template-columns: 1fr; gap: 52px; }
}

@media (max-width: 720px) {
  .topbar { height: 64px; flex-basis: 64px; padding: 0 18px; }
  .brand svg { width: 32px; height: 32px; }
  .brand-sub { display: block; }
  .topbar-link { padding: 8px 10px; }
  .hero { width: calc(100% - 36px); max-width: 620px; min-height: auto; padding: 24px 0 56px; gap: 50px; }
  .hero h1 { font-size: clamp(34px, 10vw, 48px); }
  .home-lede { font-size: 17px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 15px; }
  .trust-row { gap: 14px 20px; margin-top: 28px; }
  .hero-visual { min-height: 470px; }
  .hero-map { min-height: auto; }
  .hero-map img { border-radius: 18px; }
  .map-location-label {
    padding: 6px 8px;
    font-size: 10px;
  }
  .preview-card { width: calc(100% - 24px); margin: 0; transform: none; }
  .preview-body { padding: 27px 22px 24px; }
  .preview-body h2 { font-size: 23px; }
  .reward-card { left: -4px; bottom: 9px; }
  .location-chip { right: -4px; top: 7px; }
  .hero-visual::before { inset: 14px 0 22px 20px; }
  .home-details { width: calc(100% - 36px); max-width: 620px; padding: 76px 0 82px; }
  .detail-grid { grid-template-columns: 1fr; gap: 34px; }
  .detail-grid h3 { margin-top: 20px; }
  .home-cta {
    width: calc(100% - 36px); margin-bottom: 18px; padding: 38px 28px;
    flex-direction: column; align-items: flex-start;
  }
  .home-cta h2 { font-size: 29px; }
  .survey-wrap { width: 100%; padding: 22px 14px 80px; overflow: hidden; }
  .progress-card { top: 76px; }
  .q-block { min-height: 0; padding: 30px 22px 32px; border-radius: 18px; }
  .q-text { font-size: 29px; }
  .q-nav { padding: 0 3px; flex-wrap: wrap; }
  .q-nav .q-hint, .q-nav .kbd-hint { display: none; }
  .admin-wrap { padding: 38px 16px 70px; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .topbar-link { font-size: 0; }
  .topbar-link svg { width: 18px; height: 18px; }
  .hero h1 { font-size: 36px; }
  .hero-copy, .home-lede, .q-text, .q-help { min-width: 0; overflow-wrap: anywhere; }
  .hero-visual { min-height: 445px; margin-top: -12px; }
  .preview-top { padding-inline: 16px; }
  .preview-progress { margin-inline: 16px; }
  .preview-footer { padding-inline: 16px; }
  .reward-card { transform: none; }
  .location-chip { font-size: 10px; }
  .home-cta .btn { width: 100%; white-space: normal; }
  .progress-card { position: relative; top: auto; }
  .q-nav { width: 100%; }
  .q-nav .btn { padding-inline: 15px; }
  .q-nav-spacer { min-width: 8px; }
}

/* Compact survey respondent experience */
body[data-route="survey"] {
  background: var(--nordik-bg);
  background-attachment: fixed;
}
body[data-route="survey"] .topbar {
  height: 58px; flex-basis: 58px;
  background: #ffffff;
}
body[data-route="survey"] .brand svg { width: 30px; height: 30px; }
body[data-route="survey"] .brand-name { font-size: 14px; }
body[data-route="survey"] .brand-sub { display: none; }
body[data-route="survey"] .topbar-link {
  display: none;
}

.survey-wrap {
  width: min(100%, 590px); max-width: 590px;
  margin: 0 auto; padding: 28px 20px 60px;
}
.progress-card {
  position: static;
  margin: 0 0 38px; padding: 0;
  background: transparent; border: 0; border-radius: 0;
  box-shadow: none; backdrop-filter: none;
}
.progress-top {
  justify-content: flex-end;
  margin-bottom: 8px;
}
.progress-section {
  gap: 7px; color: #34423d;
  font-size: 11px; font-weight: 600; letter-spacing: 0;
}
.progress-section::before { width: 5px; height: 5px; }
.progress-count {
  color: #89918d; font-family: var(--font-sans); font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.progress-track {
  width: 100%; height: 6px; overflow: hidden;
  background: #dedfdb; border-radius: 999px;
}
.progress-track span {
  display: block; height: 100%;
  background: var(--signal-green); border-radius: inherit;
  transition: width 300ms var(--ease);
}
.stepper { display: none; }

.q-block {
  min-height: 0; padding: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.q-num {
  margin-bottom: 9px; color: var(--signal-green);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0; text-transform: none;
}
.q-text {
  max-width: 560px; margin-bottom: 7px;
  font-size: clamp(23px, 2.5vw, 30px); line-height: 1.14;
  letter-spacing: -0.03em; font-weight: 600;
}
.q-help {
  max-width: 520px; margin-bottom: 20px;
  font-size: 13px; line-height: 1.45;
}

.options { gap: 6px; }
.opt {
  min-height: 40px; padding: 6px 10px; gap: 9px;
  border-color: #d9ddd9; border-radius: 7px;
  font-size: 12.5px;
}
.opt:hover {
  border-color: #8aa799; box-shadow: none; transform: none;
}
.opt.on { border-color: #6e9f87; background: #edf4f0; }
.opt-mark { width: 16px; height: 16px; flex-basis: 16px; }
.opt-mark::after { width: 7px; height: 7px; }
.opt-key {
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px; font-size: 9px;
}

.field, .select-wrap, input.input { max-width: 100%; }
.field { gap: 6px; }
.field-lbl {
  color: #65716c; font-family: var(--font-sans);
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
}
.input {
  min-height: 42px; padding: 9px 11px;
  border-color: #d5d9d6; border-radius: 7px;
  background: #fff; box-shadow: none; font-size: 14px;
}
.input:hover { border-color: #9ba6a1; }
textarea.input { min-height: 100px; font-size: 14px; }
input.input[type="email"] {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12.5px;
}
.contact-field,
.contact-field input.input[type="email"] {
  width: 100%;
  max-width: 100%;
}
.gift-card-email {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
}
.gift-card-email[hidden] { display: none; }
.gift-card-email input.input[type="email"] {
  width: 100%;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12.5px;
}
select.input {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 36px;
  height: 36px;
  padding: 6px 36px 6px 10px;
  border: 1px solid #d9ddd9;
  border-radius: 7px;
  background-color: #fff;
  box-shadow: none;
  font-size: 12.5px;
}
select.input:hover { border-color: #8aa799; }
select.input:focus {
  border-color: #6e9f87;
  box-shadow: 0 0 0 2px rgb(36 122 90 / 0.1);
}
.select-wrap::after {
  right: 12px;
  font-size: 11px;
}
.q-block > .field,
.q-block > .field .select-wrap,
.q-block > .field .custom-select {
  width: 100%;
  max-width: none;
}
.custom-select {
  position: relative;
  width: 100%;
}
.custom-select-trigger {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  border: 1px solid #d9ddd9;
  border-radius: 7px;
  background: #fff;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.custom-select-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-trigger:hover { border-color: #8aa799; }
.custom-select-trigger:focus {
  outline: none;
  border-color: #6e9f87;
  box-shadow: 0 0 0 2px rgb(36 122 90 / 0.1);
}
.custom-select-caret {
  flex: 0 0 auto;
  color: #65716c;
  font-size: 10px;
}
.custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 240px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d9ddd9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px -18px rgb(20 32 28 / 0.45);
}
.custom-select.open .custom-select-menu { display: block; }
/* searchable picklist (reuses the dropdown look; just adds a filter box) */
.custom-select-menu.has-search { max-height: none; overflow: visible; }
.custom-select-search {
  width: 100%; box-sizing: border-box; margin: 0 0 6px;
  padding: 6px 9px; font-family: var(--font-sans); font-size: 12.5px;
  border: 1px solid #d9ddd9; border-radius: 6px; background: #fff; color: var(--fg-1);
}
.custom-select-search:focus { outline: none; border-color: #6e9f87; box-shadow: 0 0 0 2px rgb(36 122 90 / 0.1); }
.custom-select-list { max-height: 210px; overflow-y: auto; }
.custom-select-empty { padding: 8px 9px; color: #65716c; font-size: 12px; }

/* The question block has a transform (entrance animation) which forms a
   stacking context; keep it above the nav so an open dropdown covers the
   faded "next" arrow instead of showing it through like a watermark. */
.q-block { position: relative; z-index: 2; }
.q-nav { position: relative; z-index: 1; }

/* Final page: CAPTCHA gate + explicit Submit (no arrows) */
.submit-area {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 20px;
}
.btn-back-link {
  align-self: flex-start;
  border: 0; background: transparent; cursor: pointer;
  color: var(--fg-3); font-family: var(--font-sans); font-size: 13px;
  padding: 4px 2px;
}
.btn-back-link:hover { color: var(--fg-1); }
.captcha-wrap { display: flex; justify-content: center; }
/* scale down the fixed-size Cloudflare widget so it sits neatly, roughly
   the width of the Submit button; negative margins collapse the leftover
   layout box so spacing stays tight */
.cf-turnstile-box {
  transform: scale(0.63, 0.58);
  transform-origin: center;
  margin: -14px -56px;
}
.btn-submit {
  min-width: 180px;
  padding: 10px 30px;
  font-size: 14px; font-weight: 600;
  background: var(--signal-green); color: #fff;
  border: 0; border-radius: 9px; cursor: pointer;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-submit:hover:not(:disabled) { transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mobile (esp. iOS Safari): register taps immediately and don't let the
   double-tap-zoom gesture swallow the first tap on buttons/dropdowns. */
button, a, label, [role="button"],
.opt, .custom-select-trigger, .custom-select-option, .rate-dot,
.btn, .btn-nav-arrow, .btn-copy, .invite-eye, .opt-help {
  touch-action: manipulation;
}
.custom-select-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.custom-select-option:hover { background: #f1f4f2; }
.custom-select-option.on {
  background: #e8f2ed;
  color: #176346;
  font-weight: 500;
}

.q-nav {
  width: 100%;
  margin-top: 46px;
  margin-left: 0;
  padding: 0;
  transform: none;
  display: flex; align-items: center; gap: 12px;
}
.q-nav .btn {
  min-height: 35px; padding: 0 12px;
  border-radius: 7px; font-size: 12px; box-shadow: none;
}
.q-nav .btn-nav-arrow {
  width: 46px; height: 36px; min-height: 36px; padding: 0;
  border: 0; border-radius: 7px;
  background: var(--signal-green); color: #fff;
  font-family: var(--font-sans); font-size: 17px; font-weight: 500;
  box-shadow: none;
}
.q-nav .btn-nav-arrow:hover {
  background: var(--green-deep-hover); transform: none; box-shadow: none;
}
.q-nav .btn-nav-arrow:focus-visible {
  box-shadow: 0 0 0 3px rgb(36 122 90 / 0.2);
}
.q-nav .btn-nav-arrow[disabled] {
  opacity: 0.32; background: var(--signal-green);
}
.kbd-hint, .q-hint { font-size: 10px; }

.grid-rate { gap: 6px; }
.rate-row { min-height: 40px; padding: 4px 10px; gap: 10px; background: #fff; border-color: #d9ddd9; border-radius: 7px; box-shadow: none; }
.rate-name { font-size: 12px; }
.rate-name span { font-size: 10px; }
.rate-scale { gap: 4px; }
.rate-dot {
  width: 30px; height: 30px;
  border-radius: 6px; font-size: 11px;
}
.rate-legend { font-size: 10px; }
.optin {
  max-width: 420px; margin-bottom: 13px; padding: 11px;
  border-radius: 8px; box-shadow: none;
}
.optin-text { font-size: 13px; }
.optin-text span { font-size: 11px; }

.state-card { margin-top: 48px; }
.state-card.card {
  padding: 30px; border-radius: 14px; box-shadow: var(--shadow-md);
}
body[data-route="survey"] .state-card {
  max-width: 100%;
  margin: 42px 0 0;
}
body[data-route="survey"] .state-card.card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body[data-route="survey"] .state-card .pill {
  margin-bottom: 16px;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
}
body[data-route="survey"] .state-card h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 600;
}
body[data-route="survey"] .state-card p {
  max-width: 520px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}
body[data-route="survey"] .receipt {
  margin-top: 24px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #d9ddd9;
  border-bottom: 1px solid #d9ddd9;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 12px;
}
body[data-route="survey"] .receipt div {
  padding: 6px 0;
}
body[data-route="survey"] .receipt .k {
  color: #75807b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body[data-route="survey"] .state-card .actions {
  margin-top: 24px;
}
body[data-route="survey"] .state-card .actions .btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--green-deep);
  border-color: var(--green-deep);
  font-size: 12px;
  box-shadow: none;
}
body[data-route="survey"] .state-card .actions .btn:hover {
  background: var(--green-deep-hover);
}

@media (max-width: 560px) {
  body[data-route="survey"] .topbar { height: 54px; flex-basis: 54px; }
  body[data-route="survey"] .topbar-link { display: none; }
  .survey-wrap { padding: 23px 18px 56px; }
  .progress-card { margin-bottom: 34px; }
  .q-text { font-size: 25px; line-height: 1.14; }
  .q-help { margin-bottom: 19px; }
  .opt { min-height: 40px; }
  .q-nav {
    width: 100%;
    margin-top: 38px;
    margin-left: 0;
    transform: none;
  }
  .q-nav .q-hint, .q-nav .kbd-hint { display: none; }
}

/* ── RTL (Arabic, Urdu) ───────────────────────────────────────────────────────
   Scoped to the survey view — the home page and admin stay left-to-right.
   dir="rtl" (set in app.js applyDir) already mirrors layout + text alignment;
   these rules fix the things the browser can't infer. */
#view-survey.rtl .btn-nav-arrow {
  /* ← / → are direction glyphs: mirror them so "next" still points forward. */
  transform: scaleX(-1);
}
#view-survey.rtl .btn-back-link {
  /* the "← Back" link builds its arrow from text, so flip the whole label */
  direction: rtl;
}
#view-survey.rtl .progress-track {
  /* progress fills from the right in RTL */
  transform: scaleX(-1);
}
#view-survey.rtl .opt-key {
  /* keyboard-shortcut badge sits on the mirrored side automatically; keep the
     letter itself upright */
  transform: none;
}
