/* MT Pockets Control Center: same look as mtpperformance.com and the support site.
   Barlow, near-black on white, logo blue accent, square corners. */
:root {
  --ink: #121212;
  --ink-soft: #2e3034;
  --muted: #5c5f66;
  --faint: #9a9da3;
  --line: #e3e3e3;
  --line-strong: #c9cacd;
  --bg: #f3f3f3;
  --surface: #fff;
  --surface-2: #f7f7f7;
  --brand: #12aeef;          /* logo blue: bars, highlights */
  --accent: #0a6f99;         /* logo blue dark enough for text on white */
  --accent-hover: #085a7c;
  --accent-soft: #e4f5fd;
  --accent-ink: #fff;
  --black: #121212;
  --good: #15803d;
  --good-soft: #e8f6ed;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --danger: #c0262d;
  --danger-soft: #fdecec;
  --violet: #6d3fd1;
  --violet-soft: #f1ecfd;
  --radius: 0;
  --radius-sm: 0;
  --shadow: none;
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .10);
  --ring: 0 0 0 3px rgba(18, 174, 239, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 15.5px/1.5 Barlow, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1 { margin: 0; font-size: 1.85rem; font-weight: 900; letter-spacing: .01em; line-height: 1.15; text-transform: uppercase; }
h2 { margin: 0 0 .9rem; font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
small { display: block; color: var(--muted); font-size: .8rem; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 0; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }

/* App shell ---------------------------------------------------------------- */
/* White header like the store, with a logo-blue rule under it. */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--brand); background: var(--surface); }
.topbar-inner { display: flex; align-items: center; gap: 1.75rem; max-width: 1400px; margin: 0 auto; padding: .45rem 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; flex: none; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 96px; height: auto; }
.brand-tag {
  padding: .2rem .5rem; background: var(--black); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.main-nav { display: flex; align-items: center; flex: 1; min-width: 0; gap: .15rem; overflow-x: auto; scrollbar-width: none; }
.main-nav a {
  display: flex; align-items: center; padding: .85rem .7rem; border-bottom: 3px solid transparent; margin-bottom: -3px;
  color: var(--ink); font-size: .88rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.main-nav a[aria-current] { border-bottom-color: var(--black); }
.main-nav svg { display: none; }
.main-nav .nav-secondary { margin-left: auto; color: var(--muted); }
.signout { display: flex; align-items: center; gap: .55rem; flex: none; font-size: .9rem; }
.avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; background: var(--black); color: #fff; font-weight: 800; font-size: .8rem; }
.who { max-width: 10rem; overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.link:hover { color: var(--ink); text-decoration: underline; }

.page { width: 100%; max-width: 1400px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }
.no-shell .page { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .35rem; color: var(--muted); font-size: .85rem; font-weight: 500; }
.back::before { content: "←"; }
.back:hover { color: var(--accent); text-decoration: none; }
.title-name { margin-left: .5rem; font-weight: 500; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.title-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }

/* Buttons ------------------------------------------------------------------ */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; padding: .45rem .95rem;
  border: 1px solid var(--black); border-radius: 0; background: var(--surface); color: var(--ink);
  font: inherit; font-size: .85rem; font-weight: 800; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.button:hover { background: var(--black); color: #fff; text-decoration: none; }
.button.primary { border-color: var(--black); background: var(--black); color: #fff; }
.button.primary:hover { border-color: #747578; background: #747578; }
.button.danger { border-color: #f1b8bb; color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.button:disabled { opacity: .55; cursor: not-allowed; }

/* Messages ----------------------------------------------------------------- */
.flashes { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.flash {
  display: flex; align-items: center; gap: .6rem; margin: 0; padding: .7rem 1rem; border: 1px solid #bfe3cb; border-radius: var(--radius-sm);
  background: var(--good-soft); color: #14532d; font-weight: 500; transition: opacity .4s, transform .4s;
}
.flash::before { content: "✓"; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font-size: .72rem; font-weight: 800; }
.flash-error { border-color: #f3c0c3; background: var(--danger-soft); color: #7f1d1d; }
.flash-error::before { content: "!"; background: var(--danger); }
.flash-warning { border-color: #f5d7a6; background: var(--warn-soft); color: #78350f; }
.flash-warning::before { content: "!"; background: var(--warn); }
.flash.is-leaving { opacity: 0; transform: translateY(-4px); }
.notice { margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid #f5d7a6; border-radius: var(--radius-sm); background: var(--warn-soft); color: #78350f; }
.error { margin: .3rem 0 0; color: var(--danger); font-size: .84rem; font-weight: 500; }
.empty {
  margin: 0; padding: 3.5rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); text-align: center;
}

/* Forms -------------------------------------------------------------------- */
label { display: block; margin-bottom: .3rem; color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.req { color: var(--danger); }
input, select, textarea {
  width: 100%; min-height: 38px; padding: .45rem .7rem; border: 1px solid var(--line-strong); border-radius: 0;
  background: #fff; color: var(--ink); font: inherit; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { width: 16px; min-height: 0; height: 16px; padding: 0; accent-color: var(--accent); box-shadow: none; cursor: pointer; }
input[type=search] {
  padding-left: 2.2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat .7rem center / 16px;
}
select {
  appearance: none; padding-right: 2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .6rem center / 16px;
}
textarea { min-height: 80px; resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.help { margin: .3rem 0 0; color: var(--muted); font-size: .83rem; }
.check { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-size: .95rem; font-weight: 500; }
.current-file { margin: .2rem 0 .4rem; font-size: .9rem; }
.search { margin-bottom: 1.1rem; }
.search label, .filter-row label { color: var(--muted); font-weight: 550; }
.search input { max-width: 560px; }
.filter-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1.1rem; }
.filter-row .grow { flex: 1 1 300px; }
.filter-row select { min-width: 9.5rem; }
.count-input { width: 6.5rem; }
.has-error .count-input { border-color: var(--danger); }
.radio-list { display: flex; flex-direction: column; gap: .35rem; margin: .2rem 0 0; padding: 0; list-style: none; }
.radio-list label { display: flex; gap: .55rem; align-items: flex-start; margin: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 0; color: var(--ink); font-size: .92rem; font-weight: 400; cursor: pointer; }
.radio-list label:hover { border-color: var(--faint); }
.radio-list input { margin-top: .2rem; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
.claim-form { max-width: 900px; }
.claim-form .panel { padding: 1.3rem 1.4rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .25rem; }
.stack { display: flex; flex-direction: column; gap: .8rem; align-items: stretch; }
.stack .button { align-self: flex-start; }

/* Sign in ------------------------------------------------------------------ */
.no-shell { min-height: 100vh; background: var(--black); border-top: 4px solid var(--brand); }
.signin { max-width: 400px; margin: 9vh auto 0; padding: 2.25rem 2rem 2rem; border-top: 4px solid var(--brand); background: var(--surface); box-shadow: var(--shadow-lg); }
.signin h1 { margin-bottom: .3rem; }
.signin .lede { margin: 0 0 1.4rem; color: var(--muted); }
.signin .button { width: 100%; min-height: 44px; }
.signin-brand { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.75rem; }
.signin-brand img { width: 168px; height: auto; }
.signin--wide { max-width: 480px; }
.signin-alt { margin-top: 1rem; text-align: center; }
.setup-steps { margin: 0 0 1.25rem; padding-left: 1.2rem; display: grid; gap: .8rem; }
.qr { margin: .75rem 0 .4rem; }
.qr svg { width: 200px; height: 200px; display: block; }
.setup-key { font-size: .95rem; letter-spacing: .05em; word-break: break-all; }
.backup-codes { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.backup-codes code { display: block; padding: .5rem .75rem; background: var(--bg, #f4f4f4); font-size: 1.05rem; letter-spacing: .08em; text-align: center; }
.signin-brand span { padding: .2rem .55rem; background: var(--black); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

/* Tabs --------------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tabs a {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: -1px; padding: .55rem .7rem;
  border-bottom: 2px solid transparent; color: var(--muted); font-weight: 550; text-decoration: none; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a span {
  min-width: 1.6rem; padding: .05rem .45rem; border-radius: 2px; background: #eceef2; color: var(--ink-soft);
  font-size: .75rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: center;
}
.tabs a[aria-current] { border-bottom-color: var(--accent); color: var(--ink); }
.tabs a[aria-current] span { background: var(--accent); color: #fff; }

/* Station pipeline (work order tabs) */
.pipeline { display: flex; gap: .4rem; margin-bottom: 1.1rem; padding-bottom: .2rem; overflow-x: auto; scrollbar-width: thin; }
.pipeline a {
  display: flex; flex-direction: column; gap: .1rem; flex: 1 1 0; min-width: 76px; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted);
  font-size: .8rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow); transition: border-color .12s, transform .12s;
}
.pipeline a strong { color: var(--ink); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pipeline a:hover { border-color: var(--faint); text-decoration: none; }
.pipeline a.is-empty strong { color: var(--faint); }
.pipeline a[aria-current] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pipeline a[aria-current] strong { color: var(--accent); }
.pipeline .sep { flex: none; align-self: center; width: 10px; height: 1px; background: var(--line-strong); }
.pipeline a.all, .pipeline a.finished { flex-grow: 1.3; }
.pipeline a.finished { margin-left: .6rem; }

/* Summary tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.stat { padding: .95rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat dt { color: var(--muted); font-size: .8rem; font-weight: 600; }
.stat dd { margin: .2rem 0 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat dd small { display: inline; margin-left: .3rem; font-size: .8rem; font-weight: 500; letter-spacing: 0; }
.stat.is-bad dd { color: var(--danger); }
.stat.is-warn dd { color: var(--warn); }
.stat.is-good dd { color: var(--good); }

/* Tables ------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.station-bar + .table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.claims { width: 100%; border-collapse: separate; border-spacing: 0; }
.claims th {
  position: sticky; top: 0; z-index: 1; padding: .6rem .85rem; border-bottom: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap;
}
.claims td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.claims tbody tr:last-child td { border-bottom: 0; }
.claims tbody tr { transition: background .08s; }
.claims tbody tr:hover { background: #f4fafd; }
.claims tbody tr.is-selected { background: var(--accent-soft); }
.claims td a { font-weight: 600; }
.claims td.right, .claims th.right { text-align: right; }
.select-col { width: 2.6rem; }
.claims td.select-col { vertical-align: middle; }
.station-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .65rem .85rem;
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); color: var(--ink-soft); font-size: .9rem;
}
.station-bar .count { color: var(--accent); font-weight: 650; }
.station-bar .done-by { display: flex; align-items: center; gap: .5rem; }
.station-bar .done-by label { margin: 0; white-space: nowrap; }
.station-bar .done-by select { width: auto; min-width: 11rem; }
.next-step .done-by select { font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1.1rem; color: var(--muted); font-size: .9rem; }
.pager a { padding: .35rem .8rem; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink-soft); font-weight: 600; }
.pager a:hover { background: var(--surface-2); text-decoration: none; }

/* Badges ------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .55rem; border-radius: 2px;
  background: #eef0f3; color: var(--ink-soft); font-size: .76rem; font-weight: 650; line-height: 1.5; white-space: nowrap;
}
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-blue { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: var(--good-soft); color: var(--good); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-gray { background: #f1f2f4; color: var(--muted); }
td .badge + small, td small + .badge { margin-top: .25rem; }

/* Older text flags, used across pages */
.late { display: inline-block; margin-top: .2rem; padding: 0 .45rem; border-radius: 2px; background: var(--danger-soft); color: var(--danger); font-size: .74rem; font-weight: 650; }
.urgent { color: var(--danger); font-weight: 650; }
.short { color: var(--danger); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .6rem; border-radius: 2px; background: var(--warn-soft); color: var(--warn); font-size: .78rem; font-weight: 650; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-received, .status-diagnosed { background: var(--accent-soft); color: var(--accent); }
.status-resolved { background: var(--good-soft); color: var(--good); }
.status-closed { background: #f1f2f4; color: var(--muted); }

/* Panels and detail pages -------------------------------------------------- */
.panel { margin-bottom: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel > h2:first-child, .panel .page-head h2 { margin-bottom: .9rem; }
.panel .page-head { margin-bottom: .6rem; align-items: center; }
.panel .page-head h2 { margin: 0; }
.panel-table { margin: 0 -1.25rem -1.15rem; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.1rem; align-items: start; }
.detail-main, .detail-side { min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; margin: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { margin-bottom: .15rem; color: var(--muted); font-size: .78rem; font-weight: 600; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.facts dd small { display: inline; }
.next-step { border-color: var(--line); border-top: 3px solid var(--brand); background: var(--surface); }
.next-step h2 { color: var(--accent); }
.alt-step { border-top: 1px solid var(--line); }
.alt-step:first-of-type { border-top: 0; }
.alt-step summary { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; color: var(--ink-soft); font-weight: 550; cursor: pointer; list-style: none; }
.alt-step summary::-webkit-details-marker { display: none; }
.alt-step summary::after { content: "+"; color: var(--faint); font-size: 1.1rem; font-weight: 400; }
.alt-step[open] summary::after { content: "−"; }
.alt-step[open] { padding-bottom: .8rem; }
.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.lead-number { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stack-buttons { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.stack-buttons form { display: block; }
.stack-buttons .button { width: 100%; justify-content: flex-start; text-align: left; }
.stack-buttons .button.primary { justify-content: center; min-height: 42px; font-size: 1rem; }

.note-form { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; }
.note-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: .1rem 0 .9rem 1.1rem; border-left: 2px solid var(--line); margin-left: .3rem; }
.timeline li::before { content: ""; position: absolute; top: .45rem; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 2px var(--faint); }
.timeline li:last-child { padding-bottom: 0; }
.timeline strong { font-weight: 600; font-size: .9rem; }
.timeline p { margin: 0 0 .1rem; }

/* Progress stepper */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 1.25rem; padding: 1.1rem 1.25rem 1rem; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stepper-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stepper-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.stepper-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stepper li { position: relative; padding: 2rem .4rem 0 0; }
.stepper li::before { content: ""; position: absolute; top: .7rem; left: 1.4rem; right: 0; height: 2px; background: var(--line); }
.stepper li::after {
  content: ""; position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); color: #fff; font-size: .72rem; font-weight: 800;
}
.stepper li:last-child::before { display: none; }
.stepper .done::before, .stepper .skipped::before { background: var(--accent); }
.stepper .done::after { content: "✓"; background: var(--accent); box-shadow: none; }
.stepper .current::after { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-soft); }
.stepper .skipped::after { content: "–"; background: var(--line-strong); box-shadow: none; }
.stepper .label { display: block; color: var(--muted); font-size: .85rem; font-weight: 550; }
.stepper .done .label { color: var(--ink); }
.stepper .current .label { color: var(--accent); font-weight: 700; }
.stepper .skipped .label { color: var(--faint); text-decoration: line-through; }
.stepper .date { display: block; min-height: 1.1em; color: var(--muted); font-size: .76rem; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-tag, .who { display: none; }
  .topbar-inner { gap: 1rem; padding: .4rem 1.1rem; }
}
@media (max-width: 900px) {
  /* Logo and sign out on top, the menu scrolls sideways underneath. */
  .topbar-inner { flex-wrap: wrap; row-gap: 0; }
  .brand img { width: 80px; }
  .signout { margin-left: auto; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -1.1rem; padding: 0 .4rem; border-top: 1px solid var(--line); }
  .main-nav a { padding: .65rem .6rem; font-size: .8rem; }
  .main-nav .nav-secondary { margin-left: 0; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail-side { order: -1; }
  .page { padding: 1.25rem 1.1rem 3rem; }
}
@media (max-width: 640px) {
  .page { padding: 1rem 1rem 2rem; }
  h1 { font-size: 1.35rem; }
  .main-nav svg { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > * { grid-column: span 2; }
  .grid > .span-1 { grid-column: span 1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stepper { grid-template-columns: 1fr; gap: .1rem; }
  .stepper li { padding: 0 0 .7rem 2.1rem; min-height: 2rem; }
  .stepper li::before { top: 1.6rem; bottom: -.1rem; left: .67rem; right: auto; width: 2px; height: auto; }
}
