/* Kalman's Lab. Navy and paper, cobalt for links, amber for the answer and the action. One family: Instrument Sans. */
:root {
  --navy: #0B1730; --navy-2: #14264D; --paper: #F5F7FA; --white: #FFFFFF; --ink: #0E1A2B; --muted: #516079;
  --rule: #D5DCE6; --cobalt: #1F4BE0; --sky: #8FAEFF; --amber: #F5A524; --on-dark: #E9EEF7; --on-dark-muted: #A9B6CC;
  --font: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cobalt); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
h1 { font-weight: 650; font-stretch: 85%; font-size: clamp(38px, 5.6vw, 64px); line-height: 1.03; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-weight: 600; font-stretch: 88%; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 21px; line-height: 1.25; }

.dark { background: var(--navy); color: var(--on-dark); }
.dark a { color: var(--on-dark); }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 16px; }
.dark .nav a { text-decoration: none; color: var(--on-dark-muted); }
.dark .nav a:hover { color: var(--white); }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 84px; }
.lede { font-size: 21px; line-height: 1.5; color: var(--on-dark-muted); max-width: 34em; margin-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn { display: inline-block; font: 600 17px/1 var(--font); padding: 15px 22px; border-radius: 8px; text-decoration: none; background: var(--amber); color: var(--navy); border: 2px solid var(--amber); }
.dark .btn { color: var(--navy); }
.dark .btn.quiet { background: transparent; border-color: var(--on-dark-muted); color: var(--on-dark); }

.scope { background: var(--navy-2); border-radius: 14px; padding: 18px 18px 16px; }
.scope svg { display: block; width: 100%; height: auto; }
.scope figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--on-dark-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; color: var(--on-dark); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; }
.k-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sky); }
.k-line { width: 22px; height: 3px; border-radius: 2px; background: var(--amber); }
.k-band { width: 22px; height: 10px; border-radius: 2px; background: rgba(143, 174, 255, .3); }

.band { padding-top: 88px; padding-bottom: 88px; }
.band + .band { border-top: 1px solid var(--rule); }
.band.dark { border-top: 0; }
.intro { max-width: 40em; margin-bottom: 40px; }
.intro p { margin-top: 14px; color: var(--muted); font-size: 20px; }
.dark .intro p { color: var(--on-dark-muted); }

.shifts-head, .shifts li { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px 36px; }
.shifts-head { font-size: 15px; font-weight: 600; color: var(--muted); padding-bottom: 12px; }
.shifts-head span:last-child { color: var(--cobalt); }
.shifts { border-top: 2px solid var(--ink); }
.shifts li { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.shifts .was { color: var(--muted); }
.shifts .tag { display: none; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.shifts .now .tag { color: var(--cobalt); }
.after { margin-top: 28px; max-width: 40em; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.split .intro { margin-bottom: 0; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 34px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-weight: 650; font-size: 19px; }
.steps li::after { content: ""; position: absolute; left: 21px; top: 52px; bottom: 8px; width: 2px; background: var(--rule); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { padding-top: 8px; }
.steps p { color: var(--muted); margin-top: 6px; }

.white { background: var(--white); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.rules li { border-top: 2px solid var(--ink); padding-top: 16px; }
.rules p { color: var(--muted); margin-top: 6px; }

.about p + p { margin-top: 14px; }
.about .intro p { font-size: 18px; }
.person { padding: 22px 0; border-top: 1px solid var(--rule); }
.person:last-child { border-bottom: 1px solid var(--rule); }
.person .role { font-size: 15px; font-weight: 600; color: var(--cobalt); }
.person h3 { margin: 2px 0 8px; }
.person p { color: var(--muted); font-size: 17px; }

.contact p { max-width: 36em; margin-top: 14px; color: var(--on-dark-muted); font-size: 20px; }
.dark .mail { display: inline-block; margin-top: 26px; font-size: clamp(24px, 4.2vw, 42px); font-weight: 600; font-stretch: 88%; color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 7px; overflow-wrap: anywhere; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; padding-top: 26px; padding-bottom: 40px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 15px; color: var(--on-dark-muted); }
.dark .foot a { color: var(--on-dark-muted); }

.ticks li { position: relative; padding-left: 28px; margin-top: 12px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.sample { background: var(--white); border-radius: 12px; overflow: hidden; color: var(--ink); }
.sample .cap { font-size: 14px; font-weight: 600; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.sample pre { margin: 0; padding: 16px; font: 400 14px/1.6 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; border-bottom: 1px solid var(--rule); }
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--rule); }
td { padding: 11px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: 14px; }
.pill { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #E2F3EA; color: #17754A; white-space: nowrap; }
.pill.hold { background: #FDEFD0; color: #8A5300; }
.note { font-size: 14px; color: var(--muted); padding: 10px 16px; }

@media (max-width: 900px) {
  .hero, .split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 32px; padding-bottom: 56px; gap: 36px; }
  .split { gap: 36px; }
  .band { padding-top: 64px; padding-bottom: 64px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .shifts-head { display: none; }
  .shifts li { grid-template-columns: minmax(0, 1fr); }
  .shifts .tag { display: block; }
}
