/* Hi World Club — Club desk */
:root {
  --bg: #f3f1ec;
  --bg2: #ebe7df;
  --ink: #101735;
  --ink-2: #2a3150;
  --muted: #6d6a64;
  --line: rgba(16, 23, 53, 0.1);
  --orange: #ee6a24;
  --orange-deep: #c45112;
  --navy: #101735;
  --card: #fffcf8;
  --green: #1b7a45;
  --blue: #1d4e89;
  --amber: #8a5a10;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 40px -28px rgba(16, 23, 53, 0.45);
  --side: 252px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.lock { overflow: hidden; }
body.booting .gate,
body.booting .shell { visibility: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.sr-only, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; margin: 0; clip: auto; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.noscript { padding: 24px; }

.eyebrow {
  margin: 0;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}
.lede { margin: 8px 0 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; max-width: 62ch; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 0 rgba(238, 106, 36, 0.5);
  display: inline-block; animation: pulse 2.2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(238, 106, 36, 0); } }

.mark {
  position: relative; width: 13px; height: 24px; flex: none; margin-top: 6px;
  border-radius: 2px 2px 5px 5px;
  background: linear-gradient(90deg, #4a1f03, #c47a2b 42%, #7a3a0a);
}
.mark::before {
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: #111; border-radius: 2px 2px 0 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--sans); letter-spacing: 0.02em;
  padding: 11px 16px; border-radius: 999px; border: 1px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn.is-busy { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: #1d2753; }
.btn-danger { background: #9c3b32; color: #fff; border-color: #9c3b32; }
.btn-danger:hover { background: #832f28; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ink);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--ink); color: #fff; }
.text-link { color: var(--ink-2); font-size: 14px; }

/* ---------- gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; position: relative; overflow: hidden; }
.gate-bg { position: absolute; inset: 0; pointer-events: none; }
.gate-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(16, 23, 53, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 23, 53, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(70% 60% at 40% 40%, #000 20%, transparent 75%);
}
.gate-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.7; }
.gate-bg .b1 { width: 420px; height: 420px; left: -80px; top: -60px; background: #ffd7b0; }
.gate-bg .b2 { width: 380px; height: 380px; right: -40px; bottom: -80px; background: #d5def8; }
.gate-bg .b3 { width: 240px; height: 240px; right: 18%; top: 8%; background: #ffc7a8; opacity: 0.45; }
.gate-grid {
  position: relative; width: min(1040px, 100%);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
}
.gate-copy h1 {
  font: 600 clamp(52px, 7vw, 84px)/0.92 var(--serif);
  letter-spacing: -0.03em; margin: 14px 0 12px; text-transform: uppercase;
}
.gate-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.gate-points li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); }
.gate-points b { font: 600 12px var(--sans); letter-spacing: 0.14em; color: var(--orange); }
.gate-sign { margin-top: 28px; font: italic 600 22px var(--serif); color: var(--ink); }
.gate-card {
  background: rgba(255, 252, 248, 0.92); border: 1px solid rgba(16, 23, 53, 0.08);
  border-radius: 22px; padding: 28px 26px 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.gate-brand { display: flex; align-items: center; gap: 10px; font: 600 13px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.gate-card h2 { font: 600 32px/1.05 var(--serif); margin: 16px 0 8px; text-transform: uppercase; }
.gate-note { margin: 0 0 18px; color: var(--ink-2); font-size: 14.5px; }
.hint {
  margin-top: 16px; padding: 12px; border-radius: 12px; background: #fff6ee; border: 1px dashed rgba(238, 106, 36, 0.45);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.hint p { margin: 0; font-size: 13.5px; color: var(--orange-deep); }
.gate-card .text-link { display: inline-block; margin-top: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label, .lbl {
  font: 600 12px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.field input, .field select, .field textarea, .dialog input, .dialog select, .dialog textarea {
  width: 100%; padding: 12px 13px; border-radius: 12px; border: 1px solid rgba(16, 23, 53, 0.16);
  background: #fff; outline: none;
}
.field textarea, .dialog textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .dialog input:focus, .dialog select:focus, .dialog textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(16, 23, 53, 0.08);
}
.field.err input, .field.err select, .field.err textarea { border-color: #9c3b32; }
.form-err { color: #9c3b32; font-size: 13.5px; margin: 10px 0 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--ink); }
.remember { margin: 4px 0 14px; color: var(--ink-2); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check span { display: inline-flex; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(16, 23, 53, 0.16); background: #fff; font-weight: 600; font-size: 13.5px; }
.check input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.check input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--navy); color: #e7e4dc;
  display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 40;
}
.side-brand {
  display: flex; gap: 10px; align-items: center; text-decoration: none; color: #fff;
  padding: 0 8px 18px;
}
.side-brand strong { display: block; font: 600 15px var(--serif); letter-spacing: 0.02em; }
.side-brand em { display: block; font: 600 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: #f0a36a; font-style: normal; }
.side-label { margin: 8px 10px; font: 600 10px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #8d93ab; }
.side nav { display: grid; gap: 4px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: #c9c6be;
  padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; position: relative;
}
.side nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.side nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08); color: #fff;
  box-shadow: inset 3px 0 0 var(--orange);
}
.side nav a[aria-current="page"] svg { opacity: 1; color: #f0a36a; }
.badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 99px;
  background: var(--orange); color: #fff; font: 700 11px/18px var(--sans); text-align: center;
}
.side-foot { margin-top: auto; padding: 16px 10px 4px; display: grid; gap: 6px; }
.side-quote { margin: 0 0 6px; font: italic 600 18px var(--serif); color: #fff; }
.side-link, .btn-reset {
  background: none; border: 0; padding: 0; text-align: left; color: #b7b3aa; cursor: pointer;
  font: 500 13.5px var(--sans); text-decoration: none;
}
.side-link:hover, .btn-reset:hover { color: #fff; }
.demo-note { margin: 8px 0 0; font-size: 12.5px; color: #f0a36a; }
.demo-note button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.side-danger { justify-self: start; margin-top: 5px; border: 0; border-radius: 8px; padding: 6px 8px; background: rgba(238, 106, 36, 0.1); color: #ffc49a; cursor: pointer; font: 600 12.5px var(--sans); }
.side-danger:hover { background: rgba(238, 106, 36, 0.22); color: #fff; }
.confirm-phrase { margin-top: 14px; }
.confirm-phrase strong { color: #9c3b32; letter-spacing: 0.06em; }
.keys { margin: 8px 0 0; font-size: 11.5px; letter-spacing: 0.04em; color: #8d93ab; }

.workspace { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: rgba(243, 241, 236, 0.88);
  backdrop-filter: blur(12px);
}
.top-titles { min-width: 148px; }
.top-titles h1 { margin: 4px 0 0; font: 600 28px/1 var(--serif); letter-spacing: -0.02em; }
.burger { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 11px 12px 11px 36px; border-radius: 999px;
  border: 1px solid rgba(16, 23, 53, 0.12); background: #fff; outline: none;
}
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(16, 23, 53, 0.08); }
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: #fff; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgba(16, 23, 53, 0.5); padding: 6px; max-height: 360px; overflow: auto;
}
.search-hit, .search-hint { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.search-hit:hover, .search-hit.active { background: #f6f3ed; }
.search-hit strong { display: block; font-size: 14.5px; }
.search-hit em { display: block; font-style: normal; color: var(--muted); font-size: 12.5px; }
.search-hint { color: var(--muted); margin: 0; font-size: 13.5px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.live {
  display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--sans);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: #2f9e62; }
.live.sync i { background: var(--orange); }
.live.off i { background: #c0392b; }
.live.off { color: #c0392b; }

.demo-banner, .alert {
  margin: 16px 28px 0; border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.demo-banner { background: #fff6ee; border: 1px solid rgba(238, 106, 36, 0.28); }
.demo-banner p { margin: 0; flex: 1; min-width: 200px; font-size: 14.5px; }
.alert { background: #fdeceb; color: #7d2c26; border: 1px solid rgba(156, 59, 50, 0.25); }

main { padding: 22px 28px 72px; max-width: 1240px; }

/* ---------- overview ---------- */
.hero-row { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 18px; }
.hero-row h2 { margin: 8px 0 0; font: 600 clamp(32px, 4vw, 46px)/1 var(--serif); letter-spacing: -0.03em; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi, .card {
  background: var(--card); border: 1px solid rgba(16, 23, 53, 0.06);
  border-radius: 18px; box-shadow: var(--shadow);
}
.kpi { padding: 16px 16px 14px; position: relative; overflow: hidden; }
.kpi-label { margin: 0; font: 600 11px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi-num { margin: 8px 0 0; font: 600 34px/1 var(--serif); letter-spacing: -0.03em; }
.kpi-num small { font: 500 16px var(--sans); color: var(--muted); margin-left: 4px; }
.kpi-sub, .delta { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.delta.up { color: var(--green); }
.delta.down { color: var(--orange-deep); }
.spark { position: absolute; right: 12px; top: 14px; width: 88px; height: 28px; }
.meter, .track { height: 8px; border-radius: 99px; background: #ebe6dc; overflow: hidden; margin-top: 12px; }
.meter i, .track i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--orange), #f5a15f); }
.meter.light, .trek-card .meter { background: rgba(255, 255, 255, 0.25); }
.trek-card .meter i { background: #fff; }

.split { display: grid; grid-template-columns: 1.45fr 0.85fr; gap: 12px; margin-top: 12px; }
.trio { display: grid; grid-template-columns: 0.9fr 1.1fr 0.9fr; gap: 12px; margin-top: 12px; }
.card { padding: 16px 16px 18px; }
.card h3 { margin: 4px 0 12px; font: 600 20px/1.15 var(--serif); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 148px; margin-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; min-width: 0; }
.bar-stack { width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; overflow: hidden; display: flex; flex-direction: column-reverse; min-height: 4px; background: #efeae2; }
.bar-stack i { display: block; width: 100%; min-height: 2px; }
.bar-col span { font: 600 10px var(--sans); color: var(--muted); }

.donut-row { display: flex; gap: 14px; align-items: center; }
.donut { width: 132px; height: 132px; flex: none; }
.donut text { font-family: var(--serif); fill: var(--ink); }
.donut-n { font-size: 8px; font-weight: 600; }
.donut-s { font-size: 2.3px; letter-spacing: 0.12em; fill: var(--muted); font-family: var(--sans); }
.legend.stack { display: grid; gap: 7px; }
.legend.stack b { color: var(--ink); font-weight: 700; }

.hbar { margin-top: 10px; }
.hbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.hbar-top b { font-variant-numeric: tabular-nums; }
.hbar .track { margin-top: 5px; height: 7px; }

.attn { display: flex; gap: 10px; text-decoration: none; padding: 10px 4px; border-top: 1px solid var(--line); }
.attn:first-of-type { border-top: 0; }
.attn strong { display: block; font-size: 14.5px; }
.attn em { display: block; font-style: normal; color: var(--muted); font-size: 13px; margin-top: 2px; }
.attn-tone { width: 8px; border-radius: 99px; flex: none; background: var(--muted); }
.attn-hot .attn-tone { background: var(--orange); }
.attn-warn .attn-tone { background: #c9842a; }
.attn-info .attn-tone { background: var(--blue); }
.attn-ok .attn-tone { background: var(--green); }
.attn:hover strong { color: var(--orange-deep); }

.trek-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.trek-card {
  position: relative; display: block; min-height: 230px; border-radius: 18px; overflow: hidden;
  color: #fff; text-decoration: none; box-shadow: var(--shadow);
}
.trek-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trek-card-body {
  position: relative; z-index: 1; min-height: 230px; padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(10, 14, 28, 0.05), rgba(10, 14, 28, 0.82));
}
.trek-card .eyebrow { color: #ffc49a; }
.trek-card h3 { margin: 6px 0 8px; font: 600 28px/1.05 var(--serif); text-transform: uppercase; }
.trek-card p { margin: 8px 0 0; font-size: 13.5px; }
.trek-card.on { outline: 3px solid var(--orange); outline-offset: 2px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed a, .feed li > div {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.feed li:first-child a, .feed li:first-child > div { border-top: 0; }
.feed time, .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); transform: translateY(1px); }
.ty-pledge { background: var(--green); }
.ty-pass { background: var(--blue); }
.ty-reservation { background: var(--navy); }
.feed a:hover .feed-sum { color: var(--orange-deep); }

/* ---------- lists ---------- */
.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  border: 1px solid rgba(16, 23, 53, 0.12); background: #fff; border-radius: 999px;
  padding: 7px 12px; font: 600 13px var(--sans); cursor: pointer; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip b { font-weight: 700; color: var(--muted); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on b { color: #fff; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.toolbar input[type="search"] {
  flex: 1; max-width: 360px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(16, 23, 53, 0.12); background: #fff;
}
.filter-select {
  max-width: 240px; min-width: 150px; padding: 10px 30px 10px 12px;
  border: 1px solid rgba(16, 23, 53, 0.12); border-radius: 12px; background: #fff;
  font: 600 13px var(--sans);
}
.empty-note { margin: 8px 0; color: var(--muted); font-size: 13.5px; }

.toolbar-meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.table-card { background: var(--card); border-radius: 18px; border: 1px solid rgba(16, 23, 53, 0.06); box-shadow: var(--shadow); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
caption { text-align: left; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: #faf8f4; }
th button { background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
th[aria-sort="ascending"] button::after { content: " ↑"; }
th[aria-sort="descending"] button::after { content: " ↓"; }
tbody tr:hover { background: #faf7f2; }
tbody tr:last-child td { border-bottom: 0; }
.name-btn { background: none; border: 0; padding: 0; cursor: pointer; font: 650 15px var(--sans); text-align: left; }
.name-btn:hover { color: var(--orange-deep); }
.sub { display: block; margin-top: 2px; color: var(--muted); font: 400 12.5px var(--sans); }
.wc { font: 500 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.copy-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.copy-btn:hover { color: var(--ink); background: #f1ece4; }
.mini { display: flex; flex-wrap: wrap; gap: 4px; }
.mini i { font-style: normal; font: 600 11px var(--sans); letter-spacing: 0.04em; padding: 3px 7px; border-radius: 99px; background: #f3efe8; color: var(--ink-2); }
.pill, select.pill-select {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px;
  padding: 5px 10px; font: 600 12px var(--sans); letter-spacing: 0.02em;
}
select.pill-select {
  cursor: pointer; appearance: none; padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 8px) 55%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.st-new, .st-pledged { background: #fff1e8; color: var(--orange-deep); }
.st-reviewing { background: #e7f0fa; color: var(--blue); }
.st-accepted, .st-received, .st-active, .st-checked-in { background: #e7f5ec; color: var(--green); }
.st-waitlisted { background: #fff6e0; color: var(--amber); }
.st-declined, .st-cancelled, .st-revoked { background: #f3f0ea; color: #6e6a72; }
.st-confirmed { background: #eceaf4; color: #2a3160; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--orange-deep); font: 600 13px var(--sans); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.check-cell { width: 36px; }
.check-cell input { accent-color: var(--ink); width: 16px; height: 16px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.empty { padding: 36px 20px; text-align: center; }
.empty h3 { margin: 0 0 6px; font: 600 26px var(--serif); }
.empty p { margin: 0 auto 14px; max-width: 46ch; color: var(--muted); }
.skel { display: block; height: 12px; border-radius: 8px; background: linear-gradient(90deg, #efeae2, #f7f4ee, #efeae2); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-row td { padding: 16px 12px; }

.bulk {
  position: sticky; bottom: 16px; margin-top: 14px; z-index: 15;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--navy); color: #fff; border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 16px 40px -20px rgba(16, 23, 53, 0.7);
}
.bulk span { font-weight: 600; margin-right: 6px; }
.bulk .btn { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.bulk .btn:hover { background: #fff; color: var(--ink); }

.books-hero { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.ring-wrap { position: relative; width: 160px; height: 160px; }
.ring { width: 160px; height: 160px; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-label b { display: block; font: 600 32px/1 var(--serif); }
.ring-label span { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stat-pills span { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.stat-pills b { display: block; font: 600 18px var(--serif); }

.track-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.track-card { background: var(--card); border-radius: 16px; padding: 14px; border: 1px solid rgba(16, 23, 53, 0.06); }
.track-card b { display: block; font: 600 28px/1 var(--serif); margin-top: 6px; }
.track-card span { color: var(--muted); font: 600 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }

.print-only { display: none; }

/* ---------- drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(14, 18, 38, 0.45); z-index: 45; opacity: 0; transition: opacity 0.25s; }
.scrim.open { opacity: 1; }
.drawer-scrim { z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: #fbfaf7; z-index: 70; display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform 0.35s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: -24px 0 60px -28px rgba(16, 23, 53, 0.55);
}
.drawer.open { transform: none; }
.drawer-head { padding: 22px 22px 8px; position: relative; }
.drawer-head h2 { margin: 8px 48px 0 0; font: 600 32px/1.05 var(--serif); }
.drawer-x { position: absolute; top: 16px; right: 16px; }
.drawer-body { padding: 8px 22px 28px; overflow: auto; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: #ebe6dc; border-radius: 999px; margin: 14px 0; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 10px; cursor: pointer; font: 600 12.5px var(--sans); color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 8px 0 16px; }
.meta div { min-width: 0; }
.meta dt { font: 600 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 3px 0 0; word-break: break-word; }
.quote {
  margin: 0 0 16px; padding: 12px 14px; background: #fff; border-radius: 12px;
  border-left: 3px solid var(--orange); color: var(--ink-2); white-space: pre-wrap;
}
.drawer h3 { margin: 18px 0 8px; font: 600 13px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid rgba(16, 23, 53, 0.15); }
.timeline li { position: relative; padding: 0 0 12px 12px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -18px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #fff; border: 2px solid var(--orange); }
.danger-zone { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
details.edit { margin-top: 8px; }
details.edit summary { cursor: pointer; font-weight: 600; }

.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(14, 18, 38, 0.48); opacity: 0; transition: opacity 0.2s;
}
.modal.open { opacity: 1; }
.dialog {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: #f8f6f1; border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.45);
  transform: translateY(10px); transition: transform 0.25s;
}
.modal.open .dialog { transform: none; }
.dialog-sm { width: min(420px, 100%); }
.dialog h2 { margin: 6px 0 8px; font: 600 28px/1.05 var(--serif); text-transform: uppercase; }
.dialog-lead { margin: 0 0 14px; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 90; transform: translate(-50%, 12px);
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: 0.25s; max-width: min(92vw, 480px); text-align: center;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .kpi-grid, .track-grid { grid-template-columns: 1fr 1fr; }
  .trio, .split, .books-hero { grid-template-columns: 1fr; }
  .gate-grid { grid-template-columns: 1fr; gap: 24px; }
  .gate-copy h1 { font-size: 56px; }
}
@media (max-width: 860px) {
  .burger { display: grid; }
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform 0.28s ease;
    width: min(84vw, 300px); box-shadow: 20px 0 50px -24px rgba(0, 0, 0, 0.45);
  }
  .side.open { transform: none; }
  .top { padding: 12px 14px; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .top-titles h1 { font-size: 22px; }
  main, .demo-banner, .alert { margin-left: 0; padding-left: 14px; padding-right: 14px; }
  .demo-banner, .alert { margin: 12px 14px 0; }
  .trek-grid, .form-grid, .meta { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column; align-items: flex-start; }
}
@media print {
  .side, .top, .bulk, .drawer, .drawer-scrim, .modal, .toast, .demo-banner, .alert, .page-actions, .toolbar, .pager, .chips, .no-print, .gate { display: none !important; }
  .shell { display: block !important; }
  .print-only { display: block !important; margin-bottom: 12px; font: 600 14px var(--serif); }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .table-card, .card, .kpi { box-shadow: none; }
  table { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
