:root {
  --teal: #0F766E;
  --teal-dark: #0B5F58;
  --ocean: #0B3B4A;
  --mist: #EEF5F5;
  --line: #D6E4E4;
  --ink: #12262D;
  --muted: #5B7078;
  --bg: #F7FAFA;
  --white: #fff;
  --warn: #B45309;
  --radius: 12px;
  --head: "Manrope", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--head); color: var(--ocean); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.05rem; }
a { color: var(--teal); }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* top bar */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--head); font-weight: 800; color: var(--ocean); text-decoration: none; font-size: 1.05rem; }
.brand svg { width: 30px; height: 30px; }
.topbar .spacer { flex: 1; }
.save-status { font-size: .85rem; color: var(--muted); }
.save-status.error { color: var(--warn); font-weight: 600; }
.link-btn { background: none; border: none; color: var(--muted); font-size: .85rem; text-decoration: underline; padding: 0; }

/* centered card screens */
.screen { max-width: 520px; margin: 3.5rem auto; padding: 0 1.25rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: 0 1px 2px rgba(11,59,74,.04); }
.card p { color: var(--muted); }
.lead { font-size: 1.05rem; }

label.field-label { display: block; font-weight: 600; margin: 0 0 .35rem; color: var(--ink); }
input[type=text], input[type=number], input[type=tel], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #C3D3D3; border-radius: 8px; padding: .65rem .75rem;
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(15,118,110,.18); border-color: var(--teal); }
textarea { min-height: 110px; resize: vertical; }
.code-input { font-size: 1.8rem; letter-spacing: .5rem; text-align: center; font-family: var(--head); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 999px; padding: .7rem 1.4rem; font-weight: 600; border: 1px solid transparent; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: var(--white); color: var(--ocean); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); }
.btn-block { width: 100%; }
.error-msg { color: var(--warn); font-size: .92rem; margin-top: .6rem; min-height: 1.2em; }

.check-list { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; }
.check:hover { border-color: var(--teal); }
.check input { margin-top: .25rem; accent-color: var(--teal); width: 18px; height: 18px; flex: none; }
.check.selected { border-color: var(--teal); background: var(--mist); }

/* main layout */
.layout { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.sidebar { position: sticky; top: 76px; align-self: start; }
.progress-total { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.bar > span { display: block; height: 100%; background: var(--teal); width: 0; transition: width .3s; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav button { width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: .5rem .65rem; display: flex; justify-content: space-between; gap: .5rem; color: var(--ink); font-size: .93rem; }
.nav button:hover { background: var(--mist); }
.nav button.active { background: var(--mist); color: var(--teal); font-weight: 600; }
.nav .count { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.nav .count.done { color: var(--teal); }
.mobile-nav { display: none; margin-bottom: 1rem; }

.section-head { margin-bottom: 1.5rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--teal); }
.section-head p { color: var(--muted); margin: .25rem 0 0; }
.tip { background: var(--mist); border-left: 4px solid var(--teal); padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .95rem; }

.q { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; margin-bottom: 1rem; }
.q .help { color: var(--muted); font-size: .9rem; margin: -.15rem 0 .6rem; }
.q .meta { color: var(--muted); font-size: .78rem; margin-top: .4rem; }
.ta-wrap { position: relative; }
.mic { position: absolute; right: .5rem; bottom: .55rem; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; color: var(--ocean); display: inline-flex; align-items: center; gap: .3rem; }
.mic.on { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.mic svg { width: 14px; height: 14px; }
.ta-wrap textarea { padding-bottom: 2.6rem; }

.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.opts .check { padding: .45rem .65rem; font-size: .95rem; }
.other-input { margin-top: .5rem; }

.tbl-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; min-width: 560px; }
table.grid th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .3rem .35rem; }
table.grid td { padding: .2rem .25rem; }
table.grid input { padding: .45rem .55rem; font-size: .93rem; }
table.grid .rm { background: none; border: none; color: var(--muted); font-size: 1.1rem; padding: 0 .3rem; }
.add-row { margin-top: .5rem; background: none; border: 1px dashed #B5C9C9; border-radius: 8px; padding: .4rem .8rem; color: var(--teal); font-weight: 600; font-size: .9rem; }

.scale-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--mist); }
.scale-row:last-child { border-bottom: none; }
.dots { display: flex; gap: .3rem; }
.dots button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #C3D3D3; background: var(--white); font-weight: 600; color: var(--muted); }
.dots button.on { background: var(--teal); border-color: var(--teal); color: var(--white); }
.scale-legend { display: flex; justify-content: flex-end; gap: 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .3rem; }

.top3 { display: grid; gap: .5rem; }
.top3 .row { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: .5rem; }
.top3 .num { font-family: var(--head); font-weight: 800; color: var(--teal); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.finish { margin-top: 2rem; text-align: center; }
.done-badge { display: inline-block; background: var(--mist); color: var(--teal); font-weight: 700; padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; margin-bottom: 1rem; }

footer.site { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 1rem; }
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .card { padding: 1.4rem; }
  .screen { margin-top: 1.5rem; }
  .scale-row { grid-template-columns: 1fr; gap: .35rem; }
  .scale-legend { justify-content: flex-start; }
}
.who-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.who-picks .btn { padding: .4rem .9rem; font-size: .92rem; }
