/* Everesteer brand v0.1. Two font sizes only: 16 and 32 px. White leads; one Glacier bar per page; one Signal primary per view. */
:root {
  --white: #FFFFFF; --mist: #F4F7F8; --silver: #C9CED4; --steel: #6B7480; --ink: #12161B;
  --glacier: #8FC3CF; --glacier-deep: #2B6878; --glacier-tint: #E4F1F4; --signal: #1FA3BA; --ember-deep: #A9584A;
  --bg: var(--white); --panel: var(--mist); --card: var(--white); --field: var(--white); --fg: var(--ink); --muted: var(--steel);
  --rule: #E1E5E9; --rule-strong: var(--silver); --link: var(--glacier-deep); --bar: var(--glacier); --bar-fg: var(--ink); --tint: var(--glacier-tint);
  --primary: #178EA3; --primary-hi: #127A8D; --primary-fg: #FFFFFF; --shadow: 18, 22, 27;
  --err: var(--ember-deep);
  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #12161B; --panel: #1A1F25; --card: #171C21; --field: #12161B; --fg: #EEF2F4; --muted: #9AA3AD;
  --rule: #272E36; --rule-strong: #3A434C; --link: #8FC3CF; --bar: #8FC3CF; --bar-fg: #12161B; --tint: #1F3238;
  --primary: #8FC3CF; --primary-hi: #A9D3DD; --primary-fg: #12161B; --shadow: 0, 0, 0;
  --err: #DC8E7E; --silver: #3A434C; color-scheme: dark;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; font-weight: 400 }
a { color: var(--link) }
h1, h2 { font-size: 32px; line-height: 1.2; font-weight: 500; margin: 0; letter-spacing: -0.01em; text-wrap: balance }
h3 { font-size: 16px; line-height: 1.5; font-weight: 500; margin: 0 }
p { margin: 0 }
.cap { font-size: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); margin: 0 }
.lede { max-width: 60ch; color: var(--muted) }
.bar { background: var(--bar); color: var(--bar-fg); padding: 0 0.2em; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-transform: lowercase }
h1 .bar { display: inline-block; line-height: 1.1 }
.note { color: var(--muted) }
.err { color: var(--err) }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center }
.stack { display: flex; flex-direction: column; gap: 16px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: 16px; top: -64px; background: var(--bg); color: var(--fg); padding: 8px 16px; border-radius: 16px; z-index: 10 }
.skip:focus { top: 8px }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px }
code { background: var(--panel); padding: 0 4px; border-radius: 4px; overflow-wrap: anywhere }
pre { margin: 0; background: var(--panel); border-radius: 16px; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere }
pre code { background: none; padding: 0 }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px }

/* header, tracker, footer */
.site-head { border-bottom: 1px solid var(--rule) }
.site-head-in, .track { max-width: 1120px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap }
.site-head-in { justify-content: space-between }
.site-logo { display: block; line-height: 0; border-radius: 8px }
.logo { display: block; height: 24px; width: auto }
.logo.on-dark { display: none }
html[data-theme="dark"] .logo.on-light { display: none }
html[data-theme="dark"] .logo.on-dark { display: block }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-right: auto }
.nav a, .nav .locked { color: var(--muted); text-decoration: none; padding: 4px 16px; border-radius: 999px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; min-height: 32px }
.nav a:hover { color: var(--fg) }
.nav a[aria-current="page"] { color: var(--fg); background: var(--tint) }
.nav .locked { opacity: .6; cursor: default }
.nav svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5 }
.head-r { display: flex; align-items: center; gap: 16px; margin-left: auto; color: var(--muted) }
.linkbtn { height: auto; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--link); text-decoration: underline; border-radius: 4px }
.track-wrap { border-top: 1px solid var(--rule) }
.track { list-style: none; margin: 0 auto; padding-top: 8px; padding-bottom: 8px }
.track li { display: flex; align-items: center; gap: 8px; color: var(--muted) }
.track b { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rule-strong); display: grid; place-items: center; font-weight: 500; flex: none }
.track li.done b { background: var(--tint); color: var(--link); border-color: transparent }
.track li[aria-current="step"] { color: var(--fg); font-weight: 500 }
.track li[aria-current="step"] b { border-color: var(--glacier-deep); color: var(--fg) }
.site-foot { max-width: 1120px; margin: 0 auto; padding: 24px 32px 48px; border-top: 1px solid var(--rule); color: var(--muted); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between }
.site-foot .row { gap: 16px }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--panel); gap: 4px }
.seg button { height: 32px; padding: 0 16px; border-radius: 999px; color: var(--muted); background: none; border: 0 }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(var(--shadow), .14) }
@media (max-width: 640px) {
  .site-head-in, .track, .site-foot { padding-left: 16px; padding-right: 16px }
  .nav { order: 3; flex-basis: 100%; margin: 0 -8px; gap: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none }
  .nav a, .nav .locked { padding: 4px 8px }
  .track { gap: 8px }
  .track li:not([aria-current="step"]) span { display: none }
  .hide-s { display: none }
}

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px 64px; display: flex; flex-direction: column; gap: 64px }
.page-head { display: flex; flex-direction: column; gap: 16px; padding-top: 48px }
.sec { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.band { height: 140px; background-size: cover; background-position: 50% 40%; opacity: .75 }
html[data-theme="dark"] .band { display: none }
@media (max-width: 640px) { .wrap { padding: 0 16px 48px; gap: 40px } .page-head { padding-top: 32px } }

/* buttons: primary 48, secondary 40, small 32 */
button, .btn { font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--fg); height: 48px; padding: 0 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1; transition: background-color 120ms ease-out, border-color 120ms ease-out }
button:active:not(:disabled), .btn:active { transform: scale(0.98) }
.primary { color: var(--primary-fg); background: var(--primary); box-shadow: 0 2px 8px rgba(var(--shadow), .12) }
.primary:hover:not(:disabled) { background: var(--primary-hi) }
.secondary { height: 40px; border-color: var(--rule-strong) }
.secondary:hover:not(:disabled) { border-color: var(--muted) }
.small { height: 32px; padding: 0 16px; border: 1px solid var(--rule-strong) }
.small:hover:not(:disabled) { border-color: var(--muted) }
.touch { height: 44px }
.text { color: var(--link); padding: 0 8px; height: 40px }
.text:hover { text-decoration: underline }
button:disabled { background: var(--card); color: var(--muted); box-shadow: none; cursor: default; border-color: var(--rule) }

/* forms */
input, select, textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--field); border: 1px solid var(--rule-strong); border-radius: 16px; padding: 0 16px; height: 48px; width: 100% }
input::placeholder, textarea::placeholder { color: var(--muted) }
input[aria-invalid="true"] { border-color: var(--err) }
input[type="file"] { padding: 4px 8px; height: 48px; line-height: 38px }
input[type="file"]::file-selector-button { font: inherit; font-size: 16px; font-weight: 500; height: 32px; padding: 0 16px; margin-right: 16px; border-radius: 999px; border: 1px solid var(--silver); background: var(--panel); color: var(--fg); cursor: pointer }
input[type="checkbox"] { width: 24px; height: 24px; padding: 0; border-radius: 8px; accent-color: var(--glacier-deep); flex: none }
label.f { display: flex; flex-direction: column; gap: 8px; color: var(--muted); min-width: 0 }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.chk { display: flex; align-items: flex-start; gap: 16px }
form.cols { display: grid; grid-template-columns: 1fr; gap: 24px }
.form { max-width: 560px }

/* surfaces */
.panel { background: var(--panel); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 24px; min-width: 0 }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.panel .card { border-color: var(--rule) }
.panel input { border-color: var(--rule-strong) }
@media (max-width: 640px) { .panel { padding: 24px } }
.tag { font-weight: 500; height: 28px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--tint); color: var(--link); white-space: nowrap }
.tag.neg { background: var(--panel); color: var(--muted) }
.tag.you { background: var(--signal); color: #fff }
.notice { background: var(--tint); border-radius: 16px; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between }
.ph { background: var(--tint); padding: 0 4px; border-radius: 4px }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--link); animation: spin .9s linear infinite; vertical-align: -3px; margin-right: 8px }
@keyframes spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none } button, .btn { transition: none } }
details > summary { cursor: pointer; font-weight: 500; color: var(--link); min-height: 32px; display: list-item }
details[open] > summary { margin-bottom: 16px }

/* tables */
.scroll { overflow-x: auto; max-width: 100% }
table.tbl { width: 100%; border-collapse: collapse }
table.tbl th { color: var(--link); text-align: left; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 0 16px 8px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap }
table.tbl td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: middle }
table.tbl .n, table.tbl th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
table.tbl td:last-child, table.tbl th:last-child { padding-right: 0 }
table.tbl tr.me td { background: var(--tint) }
table.tbl tr.me td:first-child { box-shadow: inset 2px 0 0 var(--signal); padding-left: 8px }
table.tbl tr.house td { color: var(--muted) }
table.tbl tr.ex td { color: var(--muted) }
table.tbl tr.cut td { padding: 16px 0; border-bottom: 1px dashed var(--glacier-deep) }
.sub { color: var(--muted); font-variant-numeric: tabular-nums }
.who { display: grid; gap: 4px; min-width: 0 }
.who-1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.who-1 b { font-weight: 500 }
@media (max-width: 640px) { table.tbl th, table.tbl td { padding-right: 8px } }

/* landing */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-top: 48px }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0 }
.hero-img { width: 100%; height: 100%; min-height: 440px; max-height: 600px; object-fit: cover; object-position: 50% 40%; border-radius: 28px; display: block }
#steps .track { padding: 0; margin: -32px 0 0; color: var(--muted) }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 24px } .hero-img { order: -1; min-height: 0; height: 200px } }
.seg.lg button { height: 40px; padding: 0 24px }
.seg.lg { border: 1px solid var(--rule-strong); background: var(--field) }
.seg.lg button[aria-pressed="true"] { background: var(--tint); color: var(--fg); box-shadow: none }

/* questions */
/* countdown to the close: four live numbers (Signal, tabular), their units small and quiet beneath */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 560px }
.cd-u { display: flex; flex-direction: column; gap: 4px }
.cd-u b { font-size: 32px; line-height: 1.1; font-weight: 500; color: var(--signal); font-variant-numeric: tabular-nums; letter-spacing: -0.01em }
.cd-u span { color: var(--muted) }
.cd-line { color: var(--muted); font-variant-numeric: tabular-nums }
.wait { max-width: 760px }
.nav a.locked { cursor: pointer }
.qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 16px }
.q { background: var(--panel); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.q .grow { flex: 1; color: var(--muted) }
.big-n { font-size: 32px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums }

/* docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 68ch); gap: 64px; align-items: start }
.contents { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px }
.contents a { text-decoration: none; color: var(--muted) }
.contents a:hover { color: var(--fg) }
.doc { display: flex; flex-direction: column; gap: 48px; min-width: 0 }
.doc section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px }
.doc ul, .doc ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px }
.steps { counter-reset: s; list-style: none; padding: 0 !important; gap: 24px !important }
.steps > li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-left: 48px; position: relative }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 500; color: var(--link) }
.cmd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; max-width: 100% }
.cmd .os { font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--link); min-width: 80px }
.dicebar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; text-align: center }
.dicebar span { background: var(--panel); border-radius: 8px; padding: 4px 0; color: var(--muted) }
.dicebar i { font-style: normal; border-radius: 999px; padding: 4px 8px; font-weight: 500; background: var(--tint); color: var(--link) }
.dicebar i.b { background: var(--panel); border: 1px solid var(--rule-strong); color: var(--fg) }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 32px }
  .contents { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 16px }
}

/* play */
.gate-h { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap }
.gate .tag { background: var(--tint) }
.gate.fail .tag { background: var(--panel); color: var(--muted) }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.controls button[aria-pressed="true"] { background: var(--tint); color: var(--link); border-color: transparent }
.controls .grow { flex: 1 }
.status { color: var(--muted); font-variant-numeric: tabular-nums }
.status b { color: var(--fg); font-weight: 500 }
.controls .icon { width: 40px; padding: 0; justify-content: center }
.ladder { min-width: 0; font-variant-numeric: tabular-nums }
.ladder svg { display: block; overflow: visible }
.ladder text { font-family: var(--font); font-size: 16px; fill: var(--fg) }
.ladder .mut { fill: var(--muted) }
.ladder .grid { stroke: var(--rule); stroke-width: 1 }
.ladder .youcol { fill: var(--tint) }
html[data-theme="dark"] .ladder .youcol { fill-opacity: .55 }
.ladder .q { stroke: var(--steel); stroke-width: 2; stroke-linecap: round }
.ladder .q.cap { stroke-width: 3 }
.ladder .you .q { stroke: var(--fg) }
.ladder .ghost { stroke: var(--silver); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 4 }
.ladder .out .q { stroke: var(--silver) }
.ladder .tr { stroke: var(--signal); stroke-width: 2 }
.ladder .tr.cross { stroke-dasharray: 6 4 }
.ladder .td { fill: var(--signal) }
.ladder .value { stroke: var(--signal); stroke-width: 2 }
.ladder .value-t { fill: var(--signal); font-weight: 500 }
.lad-row { display: grid; align-items: end }
.lad-row > * { min-width: 0; text-align: center; padding: 0 4px }
.lad-h { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 8px }
.lad-h .nm { max-width: 100%; color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.lad-h.you .nm { color: var(--fg); font-weight: 500 }
.lad-h .dice { display: inline-flex; gap: 4px }
.die { width: 28px; height: 28px; border: 1px solid var(--rule-strong); border-radius: 8px; display: inline-grid; place-items: center; line-height: 1 }
.lad-row.stats { align-items: start; padding-top: 8px; border-top: 1px solid var(--rule) }
.lad-row.stats > .mut { display: flex; flex-direction: column; text-align: right; color: var(--muted); padding-right: 12px }
.lad-s { display: flex; flex-direction: column; color: var(--muted) }
.lad-s b { font-weight: 500; color: var(--fg) }
.lad-s .pend { color: transparent }
.lad-s.you b { color: var(--signal) }
@media (prefers-reduced-motion: no-preference) {
  .lad-s .flash { animation: flash 1s ease-out }
  @keyframes flash { from { background: var(--tint) } to { background: transparent } }
}
.reveal-line { font-variant-numeric: tabular-nums; min-height: 24px }
.reveal-line b { font-weight: 500; color: var(--signal) }
.reveal-line .hid { text-decoration: underline dotted; text-underline-offset: 4px }
.mut { color: var(--muted) }
.sub-h { font-size: 16px; font-weight: 500 }
.trades { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; min-height: 24px }
.trades li.me::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: 2px }
.chart { min-width: 0 }
.chart svg { display: block; overflow: visible }
.chart text { font-family: var(--font); font-size: 16px; fill: var(--fg); font-variant-numeric: tabular-nums }
.chart .mut { fill: var(--muted) }
.chart .ax.zero { stroke: var(--silver); stroke-width: 1 }
.chart .ax.tick { stroke: var(--rule); stroke-width: 1 }
.chart .ln { fill: none; stroke: var(--steel); stroke-width: 1.5; stroke-opacity: .55; stroke-linejoin: round }
.chart .ln.you { stroke: var(--signal); stroke-width: 2.5; stroke-opacity: 1 }
.chart .dot { fill: var(--steel) }
.chart .dot.you { fill: var(--signal) }
.chart .lbl { fill: var(--muted) }
.chart .lbl.you { fill: var(--signal); font-weight: 500 }
@media (max-width: 640px) {
  .controls .grow { display: none }
  .lad-h .dice { flex-direction: column }
}

/* admin */
.actions { display: flex; gap: 8px; flex-wrap: nowrap }
.ex-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.ex-form input { height: 32px; width: 200px }
#root { display: flex; flex-direction: column; gap: 64px }
#root table.tbl td, #root table.tbl th { white-space: nowrap }
.big { font-size: 32px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums }
