/* Kaizerians acquisition console.
 *
 * Art direction: an operations ledger. Warm paper canvas, one ink sidebar, hairline
 * rules instead of shadows, a single oxblood accent held back for primary actions and
 * live state. Instrument Serif carries headings and figures so numbers read like a
 * reported result; Instrument Sans carries the interface at a small, calm size.
 *
 * Both typefaces are served from this origin because the console's CSP starts at
 * default-src 'none'. Nothing here loads from a CDN, and no rule depends on JavaScript.
 */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f8f7f4;
  --panel: #ffffff;
  --panel-2: #fbfaf8;
  --ink: #1b1c19;
  --ink-2: #3d3e38;
  --ink-3: #6c6d64;
  --ink-4: #96978d;
  --line: #e6e3db;
  --line-2: #d5d1c7;
  --accent: #8b1e2b;
  --accent-ink: #74171f;
  --accent-soft: #f7eced;
  --ok: #3d6a4e;
  --ok-soft: #ecf2ee;
  --warn: #8a6213;
  --warn-soft: #f8f1de;
  --bad: #9c2b2b;
  --bad-soft: #f9ebeb;
  --info: #3d4f68;
  --info-soft: #edf0f5;
  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(24, 22, 18, .05), 0 1px 1px rgba(24, 22, 18, .03);
  --shadow-lift: 0 8px 24px -12px rgba(24, 22, 18, .18), 0 1px 2px rgba(24, 22, 18, .05);
  --sans: "Instrument Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.55 var(--sans);
  font-feature-settings: "cv05" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: rgba(139, 30, 43, .14); }

.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
/* min-width:0 is load-bearing: without it this grid item refuses to shrink below its
   widest descendant (a 640px table), and the whole document scrolls sideways on a
   phone instead of the table scrolling inside its own wrapper. */
main { padding: 32px 40px 80px; max-width: 1200px; width: 100%; margin: 0 auto; min-width: 0; }

/* ---------------------------------------------------------------- sidebar */
.rail {
  position: sticky; top: 0; align-self: start; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 20px 12px 14px;
  background: #17181b; color: #a9aaa4;
  border-right: 1px solid #101113;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 24px; }
.mark { width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--accent); position: relative; }
.mark::before {
  content: ""; position: absolute; inset: 6px 6px auto auto;
  width: 6px; height: 6px; background: #f6e7e9; border-radius: 1px;
}
.mark::after {
  content: ""; position: absolute; left: 6px; bottom: 6px;
  width: 11px; height: 2px; background: #f6e7e9; opacity: .65; border-radius: 1px;
}
.brand b { color: #f4f3ef; font-size: 14px; font-weight: 600; letter-spacing: .01em; display: block; line-height: 1.2; }
.brand span { display: block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #6f706a; margin-top: 2px; }
.nav-group { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #6a6b65; padding: 0 8px; margin: 0 0 6px; }
.nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 18px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 6px;
  color: #a9aaa4; font-size: 13px; position: relative;
  transition: background .14s ease, color .14s ease;
}
.nav a svg { width: 15px; height: 15px; flex: none; opacity: .62; transition: opacity .14s; }
.nav a:hover { background: #212227; color: #e8e7e2; }
.nav a:hover svg { opacity: .9; }
.nav a[aria-current="page"] { background: #26272c; color: #fff; }
.nav a[aria-current="page"] svg { opacity: 1; color: #fff; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--accent);
}
.nav .count {
  margin-left: auto; font-size: 10.5px; font-variant-numeric: tabular-nums;
  color: #8d8e88; background: #2a2b31; border-radius: 9px; padding: 0 6px;
  line-height: 16px; min-width: 18px; text-align: center;
}
.nav a[aria-current="page"] .count { background: #3a3b42; color: #e8e7e2; }
.rail-foot { margin-top: auto; border-top: 1px solid #24252a; padding-top: 12px; }
.who { font-size: 11.5px; color: #797a74; padding: 0 9px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { color: #c9c8c2; font-weight: 500; }
.rail-foot .btn { width: 100%; justify-content: center; background: transparent; border-color: #2e2f35; color: #b6b7b0; }
.rail-foot .btn:hover { background: #212227; color: #e8e7e2; border-color: #3a3b41; }
.mobile-account { display: none; }

/* ---------------------------------------------------------------- headings */
.kicker { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 9px; font-weight: 600; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; letter-spacing: -.005em; color: var(--ink); }
h2 { font-family: var(--serif); font-size: 17px; font-weight: 400; margin: 30px 0 12px; color: var(--ink); }
h3 { font-size: 13px; font-weight: 600; }
.lede { color: var(--ink-3); max-width: 70ch; margin: 8px 0 22px; font-size: 13.5px; line-height: 1.6; }
.muted { color: var(--ink-4); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; line-height: 1.5; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }

/* ---------------------------------------------------------------- surfaces */
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 17px 19px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.wrap-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rule { border: 0; height: 1px; background: var(--line); margin: 16px 0; }

/* ---------------------------------------------------------------- status */
.status-line { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 9px;
  border-radius: 5px; border: 1px solid var(--line); color: var(--ink-3);
  background: var(--panel-2); white-space: nowrap;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); flex: none; }
.pill.ok { color: var(--ok); border-color: #cfe0d5; background: var(--ok-soft); }
.pill.ok .dot { background: var(--ok); }
.pill.warn { color: var(--warn); border-color: #e8dcbd; background: var(--warn-soft); }
.pill.warn .dot { background: var(--warn); }
.pill.bad { color: var(--bad); border-color: #e7c9c9; background: var(--bad-soft); }
.pill.bad .dot { background: var(--bad); }

/* ---------------------------------------------------------------- figures */
/* Fixed four columns rather than auto-fit: with auto-fit an eight-figure row breaks
   7 + 1 and leaves a conspicuous orphan and a large empty field. */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden;
}
.stat { padding: 15px 17px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(4n) { border-right: none; }
.stat:nth-last-child(-n + 4) { border-bottom: none; }
.stat .k { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.stat .v { font-family: var(--serif); font-size: 27px; line-height: 1.15; letter-spacing: -.02em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11px; color: var(--ink-4); margin-top: 4px; }
.stat.att { background: var(--accent-soft); }
.stat.att .v { color: var(--accent); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.metric { padding: 16px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: none; }
.metric .n { font-family: var(--serif); font-size: 29px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric.hot .n { color: var(--accent); }
.metric .lab { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); margin-top: 9px; font-weight: 600; }
.metric .hint { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.hero-main { padding: 24px 26px; }
.hero-side { display: flex; flex-direction: column; gap: 12px; }
.side-card { padding: 16px 18px; }
.side-card .label { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-4); }
.side-card .value { font-family: var(--serif); font-size: 27px; line-height: 1.1; margin-top: 6px; }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; gap: 10px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-family: var(--serif); font-size: 14.5px; font-weight: 400; }
.panel-head .meta { margin-left: auto; font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.panel-body { padding: 15px 17px; }
.panel-body.flush { padding: 0; }
.panel-foot { background: var(--panel-2); border-top: 1px solid var(--line); padding: 9px 17px; font-size: 12px; }
.panel-foot a { color: var(--ink-3); }
.panel-foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- ribbon */
.ribbon { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; margin-bottom: 20px; }
.rb { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-right: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); min-width: 0; }
.rb:last-child { border-right: none; }
.rb b { font-weight: 600; color: var(--ink); font-size: 11.5px; flex: none; }
.rb .val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb .age { color: var(--ink-4); font-size: 11px; flex: none; }
.led { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #c2bdb2; }
.led.ok { background: #4c8a63; }
.led.warn { background: #c39a3a; }
.led.bad { background: #b4453f; }
.led.idle { background: #c2bdb2; }
.led.live { animation: lamp 2.6s ease-in-out infinite; }
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }

/* ---------------------------------------------------------------- tables */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 1; background: var(--panel-2); text-align: left;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4);
  font-weight: 600; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
thead th.r { text-align: right; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbfaf7; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.tight { padding-top: 8px; padding-bottom: 8px; }
.lead { font-weight: 600; color: var(--ink); border-bottom: 1px solid transparent; }
.lead:hover { border-bottom-color: var(--line-2); }
.sub { font-size: 11.5px; color: var(--ink-4); line-height: 1.45; }

/* ---------------------------------------------------------------- tags */
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 4px;
  font-size: 11px; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--panel-2);
  white-space: nowrap; font-weight: 500; text-transform: capitalize;
}
.tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.tag.plain::before { display: none; }
.tag.ok { color: var(--ok); border-color: #cfe0d5; background: var(--ok-soft); }
.tag.warn { color: var(--warn); border-color: #e8dcbd; background: var(--warn-soft); }
.tag.bad { color: var(--bad); border-color: #e7c9c9; background: var(--bad-soft); }
.tag.info { color: var(--info); border-color: #d5dce8; background: var(--info-soft); }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 7px 13px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); cursor: pointer; line-height: 1.4; white-space: nowrap;
  transition: background .14s, border-color .14s, box-shadow .14s;
}
.btn:hover { background: var(--panel-2); border-color: #c4bfb4; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-quiet { background: transparent; }
.btn-quiet:hover { background: #f1efe9; border-color: var(--line-2); }
.btn-sm { padding: 4px 9px; font-size: 11.5px; border-radius: 5px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { color: var(--bad); border-color: #e2c4c4; background: var(--bad-soft); }
.btn-danger:hover { background: #f5dede; border-color: #d6aeae; }
form.inline { display: inline-block; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 170px; min-width: 0; }
.tight label { margin-top: 0; }
label { display: block; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-4); margin: 14px 0 5px; font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 13px; color: var(--ink); padding: 8px 10px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel);
  transition: border-color .14s, box-shadow .14s;
}
input:hover, select:hover, textarea:hover { border-color: #c0bbb0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 30, 43, .09); }
input::placeholder, textarea::placeholder { color: #b4b0a6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236c6d64' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.hint { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; line-height: 1.5; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label {
  display: flex; align-items: center; gap: 7px; margin: 0; padding: 7px 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); text-transform: none;
  letter-spacing: 0; font-size: 12.5px; font-weight: 400; color: var(--ink-2);
  cursor: pointer; background: var(--panel);
}
.choice input { width: auto; }

/* ---------------------------------------------------------------- content */
pre {
  white-space: pre-wrap; word-break: break-word; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  font: 12px/1.65 var(--mono); color: var(--ink-2); max-height: 420px; overflow: auto; margin: 10px 0;
}
.msg { border-left: 2px solid var(--line-2); padding: 2px 0 2px 14px; margin: 14px 0; }
.msg.out { border-color: #c3d6c9; }
.msg.in { border-color: #e0cfa6; }
.msg .meta { font-size: 11px; color: var(--ink-4); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.empty { padding: 28px 24px; text-align: center; color: var(--ink-4); border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--panel-2); }
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; font-family: var(--serif); font-size: 15px; font-weight: 400; }
.flash {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm);
  margin-bottom: 18px; border: 1px solid #cfe0d5; background: var(--ok-soft); color: #2f5540;
  font-size: 13px; animation: drop .3s ease both;
}
.flash.bad { border-color: #e7c9c9; background: var(--bad-soft); color: #7f2626; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.finding { display: grid; grid-template-columns: 3px 1fr; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: none; }
.sev { width: 3px; border-radius: 2px; background: var(--line-2); }
.sev.high, .sev.critical { background: var(--bad); }
.sev.medium { background: #c9a24a; }
.sev.low { background: #c9c5bb; }
details { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; background: var(--panel-2); margin-top: 10px; }
details summary { cursor: pointer; padding: 10px 0; font-size: 12.5px; color: var(--ink-3); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 13px; color: var(--ink-4); font-family: var(--mono); }
details[open] summary::before { content: "–"; }
details[open] { padding-bottom: 8px; }
details pre { margin-top: 0; }

/* ---------------------------------------------------------------- lists */
.steps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; padding: 0; list-style: none; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step .num {
  width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; border: 1px solid var(--line-2); color: var(--ink-4);
  font-variant-numeric: tabular-nums; margin-top: 1px;
}
.step.done .num { background: var(--ok-soft); border-color: #cfe0d5; color: var(--ok); }
.step .t { font-size: 13px; }
.step .t a { font-weight: 500; border-bottom: 1px solid var(--line-2); }
.step .why { font-size: 11.5px; color: var(--ink-4); line-height: 1.5; margin-top: 2px; }
.feed { display: flex; flex-direction: column; }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-item:first-child { padding-top: 2px; }
.row-item:last-child { border-bottom: none; padding-bottom: 2px; }
.what { min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.what b { font-weight: 600; color: var(--ink); }
.text { color: var(--ink); border-bottom: 1px solid var(--line-2); font-weight: 500; }
.text:hover { border-bottom-color: var(--ink-3); }
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 12.5px; }
.dl dt { color: var(--ink-4); margin: 0; }
.dl dd { margin: 0; color: var(--ink-2); word-break: break-word; }

/* ---------------------------------------------------------------- bars & charts */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 40px; gap: 12px; align-items: center; font-size: 12.5px; }
.bar { height: 5px; border-radius: 3px; background: #eeebe4; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); opacity: .82; }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.chart { width: 100%; height: 120px; display: block; overflow: visible; }
.chart-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-4); margin-top: 6px; }

/* ---------------------------------------------------------------- health */
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(206px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.health-item { padding: 13px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.health-item .k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.health-item .v { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.health-item .v b { font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.tabs a { padding: 8px 13px; font-size: 12.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }

/* ---------------------------------------------------------------- motion */
.reveal { animation: rise .42s cubic-bezier(.22, .61, .36, 1) both; }
.reveal:nth-child(2) { animation-delay: .04s; }
.reveal:nth-child(3) { animation-delay: .08s; }
.reveal:nth-child(4) { animation-delay: .12s; }
.reveal:nth-child(5) { animation-delay: .16s; }
.reveal:nth-child(6) { animation-delay: .2s; }
.reveal:nth-child(7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.hoverable { transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.hoverable:hover { box-shadow: var(--shadow-lift); border-color: var(--line-2); transform: translateY(-1px); }

/* ---------------------------------------------------------------- sign in */
.splash { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.splash-card { width: min(392px, 100%); padding: 30px 28px 26px; position: relative; }
.splash-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); border-radius: var(--r) var(--r) 0 0; }
.word { font-family: var(--serif); font-size: 27px; letter-spacing: -.01em; display: block; }
.word span { display: inline-block; animation: letter .5s cubic-bezier(.22, .61, .36, 1) both; }
.word span:nth-child(1) { animation-delay: .02s; }
.word span:nth-child(2) { animation-delay: .05s; }
.word span:nth-child(3) { animation-delay: .08s; }
.word span:nth-child(4) { animation-delay: .11s; }
.word span:nth-child(5) { animation-delay: .14s; }
.word span:nth-child(6) { animation-delay: .17s; }
.word span:nth-child(7) { animation-delay: .2s; }
.word span:nth-child(8) { animation-delay: .23s; }
.word span:nth-child(9) { animation-delay: .26s; }
.word span:nth-child(10) { animation-delay: .29s; }
@keyframes letter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ring { display: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; }
  .split, .split.even { grid-template-columns: 1fr; }
  .wrap-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  /* One row of destinations. `display:contents` on the groups collapses the three
     nav blocks into a single scroll strip, so the bar is one line tall rather than
     three, and no destination can be stranded behind a taller bar. */
  .rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 30;
    display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: none; border-top: 1px solid #101113;
    background: rgba(23, 24, 27, .97); backdrop-filter: blur(12px);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
  }
  .rail::-webkit-scrollbar { display: none; }
  .brand, .nav-group, .rail-foot, .who { display: none; }
  .nav { display: contents; }
  .nav a { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav .count { display: none; }
  /* 68px clears the single-row bar (52px) plus breathing room, so the last line of
     every page sits above it rather than behind it. */
  main { padding: 18px 14px calc(68px + env(safe-area-inset-bottom)); max-width: 100%; min-width: 0; }
  h1 { font-size: 24px; }
  h2 { font-size: 16px; margin-top: 26px; }
  .metrics, .stats { grid-template-columns: 1fr 1fr; }
  .metric, .stat { border-right: none; border-bottom: 1px solid var(--line); padding: 13px 15px; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n + 2) { border-bottom: none; }
  .metric .n, .stat .v { font-size: 24px; }
  .health { grid-template-columns: 1fr; }
  .health-item { border-right: none; }
  .ribbon { display: grid; grid-template-columns: 1fr 1fr; }
  .rb { border-bottom: 1px solid var(--line); }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 32px; font-size: 11.5px; }
  table { min-width: 640px; }
  .row > * { flex: 1 1 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .mobile-account {
    display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
    font-size: 12px; color: var(--ink-3);
  }
  .mobile-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-account form { margin-left: auto; flex: none; }
  .pad { padding: 15px 16px; }
  .hero-main { padding: 20px 18px; }
  .panel-body { padding: 13px 14px; }
}
@media (max-width: 760px) {
  .grid-2, .wrap-3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .rail, .mobile-account { display: none; }
  .shell { grid-template-columns: 1fr; }
  body { background: #fff; }
}
