:root {
  --ink: #0f1d2e;
  --muted: #5a6b7e;
  --faint: #8da0b3;
  --mist: #f3f7fb;
  --card: #ffffff;
  --line: #dfe8f1;
  --line-soft: #eaf1f7;
  --signal: #2e8fe0;
  --signal-deep: #1f6fb8;
  --signal-tint: #e9f4fe;
  --go: #1e9d66;
  --go-tint: #e7f6ef;
  --danger: #c24b3f;
  --danger-tint: #fbecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 29, 46, 0.05), 0 6px 18px rgba(15, 29, 46, 0.06);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--ink); background: var(--mist); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: 780px; margin: 0 auto; padding: 44px 24px 90px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--signal-deep); letter-spacing: 0.3px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.brand .admin-link { margin-left: auto; font-weight: 600; font-size: 13px; }

h1.title { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.16; margin: 0 0 8px; letter-spacing: -0.3px; }
.lede { color: var(--muted); font-size: 15.5px; margin: 0 0 28px; max-width: 60ch; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--signal-deep); margin-bottom: 10px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 18px; }
.block-q { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.helper { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.divider { border: 0; border-top: 1px solid var(--line-soft); margin: 22px 0; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
label.flabel { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; }
label.flabel .opt { color: var(--faint); font-weight: 400; }
input[type="text"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px;
}
textarea { min-height: 70px; resize: both; }
input::placeholder, textarea::placeholder { color: #a9b8c6; }
input:focus, textarea:focus, select:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px rgba(46,143,224,0.14); }
.input-xl { font-size: 19px; padding: 14px 16px; font-family: var(--font-display); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }
.suffix-wrap { position: relative; }
.suffix-wrap .suffix { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; pointer-events: none; }
.suffix-wrap input { padding-right: 60px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px) { .choices { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; transition: border-color 0.15s, background 0.15s; }
.choice:hover { border-color: var(--signal); }
.choice.on { border-color: var(--signal); background: var(--signal-tint); }
.choice input { margin-top: 3px; accent-color: var(--signal); flex: none; }
.choice .c-label { font-weight: 600; font-size: 14px; }
.choice .c-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.pills { display: flex; flex-wrap: wrap; gap: 9px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink); transition: border-color 0.15s, background 0.15s; }
.pill:hover { border-color: var(--signal); }
.pill.on { border-color: var(--signal); background: var(--signal-tint); color: var(--signal-deep); font-weight: 600; }

/* Calculator */
.calc { background: linear-gradient(160deg, #0e1b2c, #14304a); color: #fff; border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); }
.calc h2 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 0 4px; color: #fff; }
.calc .csub { color: #9fc0de; font-size: 13px; margin: 0 0 20px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .calc-grid { grid-template-columns: 1fr; } }
.metric { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 16px 18px; }
.metric .m-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: #8fb0cc; margin-bottom: 8px; }
.metric .m-value { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -0.5px; }
.metric .m-value.rate { color: #ffffff; }
.metric .m-value.rev { color: #ff9d8a; }
.metric .m-sub { font-size: 11.5px; color: #8fb0cc; margin-top: 8px; }
.metric.wide { grid-column: 1 / -1; }
.calc-note { font-size: 11.5px; color: #7e97b1; margin-top: 16px; line-height: 1.5; }
.calc-pending { color: #8fb0cc; font-size: 13.5px; }

.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 12px 24px; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-deep); }
.btn-primary:disabled { background: #b9d4eb; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--signal); }
.btn-danger { background: #fff; color: var(--danger); border-color: #ecd1cd; }
.btn-lg { font-size: 16px; padding: 14px 28px; font-family: var(--font-display); }
.linkish { background: none; border: none; color: var(--signal-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.submitbar { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.muted { color: var(--muted); }

.note { background: var(--signal-tint); border: 1px solid #cfe6fa; color: var(--signal-deep); border-radius: 10px; padding: 11px 14px; font-size: 13px; }
.note.go { background: var(--go-tint); border-color: #cdeadd; color: var(--go); }

.pick-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--signal-deep); margin-top: 10px; }

/* Admin */
table.subs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.subs th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--mist); }
table.subs td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
table.subs tr.rowlink { cursor: pointer; }
table.subs tr.rowlink:hover td { background: var(--signal-tint); }
pre.jsonview { background: #0e1b2c; color: #cfe0f0; border-radius: var(--radius); padding: 20px; font-family: var(--font-mono); font-size: 12px; overflow: auto; max-height: 460px; }
.admin-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kvline { font-size: 13.5px; color: var(--muted); margin: 3px 0; }
.kvline b { color: var(--ink); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.4px; padding: 4px 9px; border-radius: 99px; background: var(--signal-tint); color: var(--signal-deep); border: 1px solid #cfe6fa; }

.success-hero { text-align: center; padding: 8px 0 22px; }
.success-hero .big-check { width: 60px; height: 60px; border-radius: 99px; background: var(--go-tint); color: var(--go); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 14px; }
