/* Bakstop pilot. Colors and type from the Bakstop design system tokens. */
:root {
  --surface: #F2F4FA; --raised: #FFFFFF; --sunken: #E6EAF4;
  --ink: #26324A; --muted: #56617A; --border: #D6DDEA; --border-strong: #7A869E;
  --arm: #5F7FBA; --deep: #46659F; --on-brand: #FFFFFF; --navy: #26324A;
  --sky: #DCE5F5; --apricot: #F4A672; --apricot-tint: #FCE6D6;
  --success: #2E6E8E; --attention: #B3472E; --focus: #46659F;
  --shadow: 0 8px 24px rgba(38, 50, 74, 0.10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink);
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 16px; line-height: 24px; }
a { color: var(--deep); font-weight: 700; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; }
p { margin: 0; }

.phone { max-width: 440px; margin: 0 auto; min-height: 100vh; padding: 24px 20px 32px; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.logo { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.logo span { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.back { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; }
.pill { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); background: var(--sky); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.pill.warm { background: var(--apricot-tint); }
.caption { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.lead { color: var(--muted); }
.small { font-size: 14px; line-height: 20px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card { background: var(--raised); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card.navy { background: var(--navy); color: #fff; box-shadow: none; }
.card.navy .sub { color: var(--sky); }
.card-title { font-size: 18px; line-height: 26px; font-weight: 700; }
.list { padding-top: 6px; padding-bottom: 6px; gap: 0; }
.list-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item strong { display: block; font-weight: 700; }
.note { background: var(--sunken); border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 20px; }
.note.sky { background: var(--sky); }
.note.warm { background: var(--apricot-tint); }
.error { color: var(--attention); font-weight: 700; display: flex; gap: 8px; align-items: flex-start; }
.ok { color: var(--success); font-weight: 700; }

.btn { display: flex; align-items: center; justify-content: center; height: 52px; padding: 0 20px; border-radius: 16px; border: 0;
  background: var(--deep); color: var(--on-brand); font: 700 16px Nunito, system-ui, sans-serif; text-decoration: none; cursor: pointer; width: 100%; }
.btn:hover { color: var(--on-brand); filter: brightness(0.95); }
.btn.apricot { background: var(--apricot); color: var(--ink); }
.btn.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--deep); height: 48px; }
.btn.outline.light { color: #fff; border-color: #fff; }
.btn.quiet { background: transparent; color: var(--deep); height: 48px; }
.btn.danger { background: var(--attention); }
.btn.small-btn { height: 40px; width: auto; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn:disabled { background: var(--sunken); color: var(--muted); cursor: not-allowed; }
.bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

label.field, .field { display: flex; flex-direction: column; gap: 6px; }
.field > span, label.field > span, .label { font-size: 14px; line-height: 20px; font-weight: 700; }
input[type=text], input[type=tel], input[type=date], input[type=number], input[type=password], select, textarea {
  height: 48px; border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 0 14px; width: 100%;
  font: 500 16px Nunito, system-ui, sans-serif; color: var(--ink); background: var(--raised); }
textarea { height: auto; padding: 12px 14px; resize: vertical; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; border: 1.5px solid var(--border-strong);
  background: var(--raised); font-weight: 700; cursor: pointer; text-align: center; padding: 4px 6px; }
.seg input:checked + label { border-color: var(--deep); background: var(--sky); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qrow .seg { width: 136px; flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; font-weight: 600; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--deep); }
.lang-form { display: inline; }
.lang-btn { background: none; border: 0; color: var(--deep); font: 700 14px Nunito, system-ui, sans-serif; cursor: pointer; padding: 10px 4px; min-height: 44px; }

.code-box { font-size: 44px; line-height: 50px; font-weight: 800; letter-spacing: -0.025em; }
.result-band { background: var(--sky); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.result-big { font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -0.02em; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { font-weight: 600; color: var(--muted); }
.kv span:last-child { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.linkbox { font-size: 14px; background: var(--sunken); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }

/* Staff */
.wide { max-width: 1280px; margin: 0 auto; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 700px) { .wide { padding: 16px; } }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a { display: flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--navy); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--raised); border-radius: 24px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 44px; line-height: 50px; font-weight: 800; letter-spacing: -0.025em; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--border); vertical-align: top; }
td.wrap { white-space: normal; max-width: 360px; }
.status-ok { color: var(--success); font-weight: 700; }
.status-warn { color: var(--attention); font-weight: 700; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > * { flex: 1 1 280px; min-width: 0; }
.cols > .grow2 { flex: 2 1 420px; }
.step { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 12px; border-radius: 16px; font-weight: 600; }
.step.current { background: var(--sky); }
.step.locked { color: var(--muted); }
.step input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--deep); }
.step .num { width: 18px; flex: none; font-weight: 800; }
.step .when { margin-left: auto; white-space: nowrap; font-size: 12px; color: var(--muted); }
.timer { font-size: 64px; line-height: 68px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.inline { display: inline; }
.flex-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input[type=file] { font: 600 14px Nunito, system-ui, sans-serif; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: 700 14px Nunito, system-ui, sans-serif; color: var(--ink); background: var(--raised);
  border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 10px 14px; margin-right: 10px; cursor: pointer; }

/* Anything marked hidden stays hidden, even if a class sets display. */
[hidden] { display: none !important; }
