/* AI Workplace Survey — fresh visual identity (Inter + Source Serif 4; teal/slate) */
:root {
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --accent: #0D9488;
  --accent-ink: #0F766E;
  --accent-soft: #CCFBF1;
  --navy: #1E3A5F;
  --warn: #B45309;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.04);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top {
  background: var(--navy); color: #fff; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 600; letter-spacing: -.01em; }
.top .brand .mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.top .meta { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; text-align: right; }
.top .meta b { display: block; font-weight: 600; letter-spacing: .04em; opacity: 1; font-size: 13px; text-transform: none; }

.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 80px; }
.wrap.wide { max-width: 980px; }

.demo-banner {
  background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D;
  border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 18px;
}

.rail { height: 4px; background: var(--line); border-radius: 99px; margin: 0 0 24px; overflow: hidden; }
.rail i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease; }

h1, h2, .fname, .pname { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 14px; color: var(--navy); }
h2 { font-size: clamp(22px, 3.5vw, 28px); margin: 0 0 10px; color: var(--navy); }
.lead { color: var(--muted); margin: 0 0 18px; font-size: 17px; }
.notice {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 14px 16px; margin: 18px 0; box-shadow: var(--shadow);
}
.notice p { margin: 0 0 8px; } .notice p:last-child { margin: 0; }

.btn {
  appearance: none; border: none; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: #152a45; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.nav .warn { flex: 1; color: var(--warn); font-size: 14px; font-weight: 500; min-height: 1.2em; }
.nav .btn:last-child { margin-left: auto; }

.q { margin: 22px 0; }
.q .text { font-weight: 600; margin: 0 0 6px; font-size: 17px; }
.q .hint { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.opts, .scale { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: #94A3B8; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 3px; accent-color: var(--accent); }
.scale { flex-direction: row; flex-wrap: wrap; }
.scale .opt { flex: 1 1 120px; font-size: 14px; }
.mix .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mix input[type=range] { flex: 1; min-width: 160px; accent-color: var(--accent); }
.mix .pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; }
textarea {
  width: 100%; min-height: 90px; padding: 12px; border-radius: 10px;
  border: 1.5px solid var(--line); font: inherit; resize: vertical; background: var(--surface);
}
.section-fade { animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.factor, .card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin: 18px 0; box-shadow: var(--shadow);
}
.factor .k, .card .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.fname, .pname { font-size: clamp(26px, 4vw, 34px); margin: 6px 0 10px; color: var(--navy); }
.score { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 220px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.srow { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
@media (max-width: 640px) { .srow { grid-template-columns: 1fr; } }
.op { text-align: center; font-size: 28px; color: var(--muted); font-weight: 300; margin: 4px 0; }
.note { font-size: 14px; color: var(--muted); font-style: italic; }

.pmap { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.prow { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: stretch; }
@media (max-width: 560px) { .prow { grid-template-columns: 1fr; } }
.plab { font-size: 13px; color: var(--muted); display: flex; align-items: center; }
.pcell {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-weight: 600; display: flex; flex-direction: column; gap: 2px;
}
.pcell.wide { grid-column: 1 / -1; }
.prow > div:last-child { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.pcell small { font-weight: 400; color: var(--muted); font-size: 12px; }
.pcell.here { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

details { margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details summary { padding: 14px 16px; cursor: pointer; font-weight: 600; }
details .inner { padding: 0 16px 16px; color: var(--muted); }
details .inner p { margin: 0 0 10px; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }

.group-block { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--line); }
.wait-card {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; margin: 16px 0;
}
.wait-count { font-family: var(--serif); font-size: 48px; font-weight: 600; color: var(--navy); line-height: 1; }
.wait-count span { font-size: 22px; color: var(--muted); }
.wait-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 16px; max-width: 280px; margin-left: auto; margin-right: auto; }
.wait-bar i { display: block; height: 100%; background: var(--accent); }

.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.leg { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.leg i { width: 10px; height: 10px; border-radius: 99px; display: inline-block; }
.leg.me { font-weight: 700; }
.leg b { margin-left: auto; font-variant-numeric: tabular-nums; }

.cmp-bars { display: flex; flex-direction: column; gap: 14px; }
.cmp-lab { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cmp-tracks { display: flex; flex-direction: column; gap: 4px; }
.cmp-track { position: relative; height: 22px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.cmp-track i { display: block; height: 100%; border-radius: 6px; }
.cmp-track.you i { background: var(--accent); }
.cmp-track.grp i { background: var(--navy); opacity: .55; }
.cmp-track span { position: absolute; right: 8px; top: 2px; font-size: 12px; font-weight: 600; color: var(--ink); }

.scatter { width: 100%; max-width: 560px; height: auto; }

.admin-form, .leader-hero { max-width: 520px; }
.admin-form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
.admin-form input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface);
}
.admin-out {
  margin-top: 20px; padding: 16px; background: var(--accent-soft); border-radius: var(--radius); border: 1px solid var(--accent);
  font-size: 14px; word-break: break-all;
}
.admin-out code { background: #fff; padding: 2px 6px; border-radius: 4px; }

.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legal { font-size: 12px; color: var(--muted); }

.stage-track { width: 100%; height: auto; }

@media print {
  .top, .nav, .result-actions, .demo-banner, #again { display: none !important; }
  body { background: #fff; }
  .factor, .card, .panel { box-shadow: none; break-inside: avoid; }
}

/* Lead capture */
.lead-card {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.lead-card h2 { margin: 0 0 8px; font-size: 1.35rem; color: var(--ink); }
.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}
@media (max-width: 640px) {
  .lead-grid { grid-template-columns: 1fr; }
}
.lead-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.lead-field input {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.lead-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.lead-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.lead-check input { margin-top: 3px; flex-shrink: 0; }
.req { color: #B45309; }
.opt-tag { font-weight: 400; color: var(--muted); font-size: 12px; }
.lead-ok {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ECFDF5;
  color: #065F46;
  font-size: 14px;
}
#leadsubmit { margin-top: 8px; }
