/* web/styles.css — mobile-first design system
   Tokens: deep navy ink, single cobalt accent (fintech trust), cool off-white surfaces.
   Mono stack for figures. System sans body (fast, offline-safe at events). */

:root {
  --ink: #0B1F3A;           /* deep navy — headlines + primary text */
  --ink-soft: #1C3252;
  --slate: #5C6B7E;         /* body, metadata */
  --slate-light: #93A1B2;
  --line: rgba(11, 31, 58, 0.12);   /* hairline */
  --bg: #F4F7FB;            /* cool canvas */
  --card: #ffffff;
  --accent: #1D4ED8;        /* cobalt, single accent — CTAs, active, focus, key figures */
  --accent-dark: #1742A8;
  --accent-wash: #E7EEFD;
  --amber: #B45309;          /* warnings only */
  --danger: #BE123C;         /* errors only */
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 40px -20px rgba(11, 31, 58, 0.20);
  --shadow-sm: 0 6px 18px -10px rgba(11, 31, 58, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --maxw: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;          /* no horizontal scroll on mobile */
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; max-width: var(--maxw); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.logo .mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
.logo .muted { color: var(--slate); font-weight: 500; }

/* ---------- Hero ---------- */
.hero { padding: 14px 0 8px; }
.hero h1 { border-left: 3px solid var(--accent); padding-left: 16px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent-dark); background: var(--accent-wash);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
h1 {
  font-size: clamp(26px, 7.2vw, 34px); line-height: 1.1;
  letter-spacing: -0.02em; font-weight: 800; color: var(--ink);
  overflow-wrap: break-word; word-break: break-word;
}
h1 .hl { color: var(--accent-dark); }
.sub { margin-top: 14px; font-size: 16.5px; color: var(--slate); max-width: 34ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 20px; border: none; border-radius: 14px;
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer; transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  min-height: 52px;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---------- Cards / sections ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
}
.section { margin: 26px 0; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate-light); margin-bottom: 12px; }

.stat-row { display: flex; gap: 10px; margin-top: 22px; }
.stat { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px; }
.stat .num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.stat .lbl { font-size: 12px; color: var(--slate); margin-top: 2px; }

.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 13px; color: var(--slate); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.check { color: var(--accent); font-weight: 800; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
input, select {
  width: 100%; padding: 14px 14px; font-family: inherit; font-size: 16px; /* 16px: no iOS zoom */
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease; min-height: 50px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.hint { font-size: 12.5px; color: var(--slate-light); margin-top: 6px; }
.err { font-size: 13px; color: var(--danger); margin-top: 6px; display: none; }
.err.show { display: block; }

/* ---------- Choice chips (checker) ---------- */
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  cursor: pointer; transition: border-color .15s ease, background .15s ease; min-height: 56px;
}
.choice:active { transform: translateY(1px); }
.choice.sel { border-color: var(--accent); background: var(--accent-wash); }
.choice .tick { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; color: #fff; font-size: 13px; }
.choice.sel .tick { background: var(--accent); border-color: var(--accent); }
.choice .txt { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.choice .txt small { display: block; font-weight: 500; color: var(--slate); font-size: 12.5px; }

/* ---------- Progress ---------- */
.progress { display: flex; gap: 6px; margin: 4px 0 22px; }
.progress i { height: 5px; flex: 1; border-radius: 3px; background: var(--line); transition: background .25s ease; }
.progress i.on { background: var(--accent); }
.step-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin-bottom: 6px; }

/* ---------- Result ---------- */
.headline-num { font-family: var(--font-mono); font-size: clamp(38px, 13vw, 58px); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; display: inline-block; border-bottom: 4px solid var(--accent); padding-bottom: 4px; }
.match-list { display: grid; gap: 10px; margin-top: 6px; }
.match {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.match .name { font-size: 15px; font-weight: 700; color: var(--ink); }
.match .meta { font-size: 12.5px; color: var(--slate); margin-top: 3px; }
.match .amt { font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.locked { filter: blur(5px); user-select: none; pointer-events: none; }
.lockwrap { position: relative; }
.lockbadge {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--ink); background: rgba(247,248,250,.35);
  border-radius: 14px;
}

/* ---------- Misc ---------- */
.spacer { height: 14px; }
.foot { text-align: center; color: var(--slate-light); font-size: 12px; padding: 30px 0 40px; }
.foot a { color: var(--slate); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 50; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hide { display: none !important; }
.fade-in { animation: fade .35s cubic-bezier(.16,1,.3,1); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, .fade-in { animation: none !important; transition: none !important; } }
