/* ============================================================
   Island Ales HQ
   The Dashboard v14 (Vertix) look: rounded shell, pill top bar,
   slim icon rail, white glass cards, delta chips, a featured
   gradient tile. Re-cut in Island Ales navy #042a4f and gold
   #ccad66. Light is the reference; dark is its own palette.
   ============================================================ */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, serif;

  --navy: #042a4f;
  --navy-2: #0b4378;
  --gold: #ccad66;
  --gold-deep: #8a6a24;       /* gold that reads as text on white (5.1:1) */

  --page: #e6e9ee;
  --shell: #f3f4f6;
  --card: #ffffff;
  --soft: #f4f5f7;
  --soft-2: #eaecef;
  --soft-3: #dfe2e7;
  --line: #eceef1;
  --line-2: #e1e4e9;

  --ink: #0f1a26;
  --ink-2: #364352;
  --muted: #6f7b88;
  --faint: #aab3bd;

  --solid: var(--navy);
  --on-solid: #ffffff;
  --accent: var(--gold);
  --accent-text: var(--gold-deep);
  --accent-soft: #f7f0e0;

  /* chart series — validated (dataviz validator, light surface) */
  --s-mainland: #c49a3a;
  --s-island: #1f5a8c;
  --s-other: #9aa5b1;
  --s-third: #2a9d7f;

  --green: #1f9156;
  --green-bg: #e3f4ea;
  --red: #d63c42;
  --red-bg: #fbe7e7;
  --amber: #b07800;
  --amber-bg: #fcf1d3;
  --blue: #2d64c8;
  --blue-bg: #e6eefc;

  --shadow-pop: 0 24px 60px -18px rgba(4, 42, 79, 0.25), 0 4px 14px -6px rgba(4, 42, 79, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-xl: 36px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  color-scheme: light;
}

[data-theme='dark'] {
  --page: #04070b;
  --shell: #0b1119;
  --card: #131b26;
  --soft: #1a2431;
  --soft-2: #222e3d;
  --soft-3: #2c394a;
  --line: #1e2835;
  --line-2: #283444;

  --ink: #f1f4f8;
  --ink-2: #c9d1db;
  --muted: #8b97a6;
  --faint: #556272;

  --solid: var(--gold);
  --on-solid: #071a2e;
  --accent-text: #dcc07f;
  --accent-soft: rgba(204, 173, 102, 0.14);

  /* validated against the dark surface */
  --s-mainland: #a8842f;
  --s-island: #3d84d6;
  --s-other: #5f6b79;
  --s-third: #2b9a7c;

  --green: #3cc47a;
  --green-bg: rgba(60, 196, 122, 0.14);
  --red: #f2666b;
  --red-bg: rgba(242, 102, 107, 0.14);
  --amber: #f5c542;
  --amber-bg: rgba(245, 197, 66, 0.13);
  --blue: #6b95ff;
  --blue-bg: rgba(107, 149, 255, 0.15);
  --shadow-pop: 0 28px 70px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

/* ---------------- reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss03';
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex-shrink: 0; }
.num, .value, td.n, .tnum { font-variant-numeric: tabular-nums; }
[data-theme='dark'] .light-only, :root:not([data-theme='dark']) .dark-only { display: none; }

/* ---------------- motion ---------------- */
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes popPill { from { opacity: 0; transform: translateY(-14px) scale(0.92); } }
@keyframes growY { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: var(--len, 1000); } }
@keyframes shellIn { from { opacity: 0; transform: scale(0.985); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------- shell ---------------- */
.shell {
  --gutter: clamp(16px, 4vw, 72px);
  width: min(1640px, calc(100% - var(--gutter) * 2));
  margin: 28px auto; min-height: calc(100vh - 56px);
  background: var(--shell); border-radius: var(--r-xl);
  padding: 22px clamp(18px, 2.6vw, 42px) 28px;
  animation: shellIn 0.9s var(--ease) both;
}
.topbar { display: flex; align-items: center; gap: 14px; position: relative; z-index: 30; }
.pill {
  height: 60px; border-radius: 999px; background: var(--card);
  display: flex; align-items: center; animation: popPill 0.8s var(--spring) both;
}
.brand { gap: 10px; padding: 0 22px 0 12px; text-decoration: none; flex-shrink: 0; }
.brand .logo { height: 44px; width: auto; display: block; }
.brand .logo.dark-only { height: 30px; }
.brand-name {
  font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 0.2px;
  color: var(--accent-text); border-left: 1px solid var(--line-2); padding-left: 10px;
}
.nav {
  position: relative; margin-inline: auto; padding: 7px; gap: 6px;
  overflow-x: auto; scrollbar-width: none; min-width: 0; animation-delay: 0.1s;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; z-index: 1; height: 46px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center; font-size: 15.5px; color: var(--ink-2);
  text-decoration: none; white-space: nowrap; transition: color 0.35s;
  animation: rise 0.6s var(--ease) both; animation-delay: calc(0.25s + var(--i, 0) * 0.06s);
}
.nav a:hover:not(.on) { color: var(--ink); }
.nav a.on { color: var(--on-solid); }
.nav-ind {
  position: absolute; top: 7px; left: 0; height: 46px; width: 0; border-radius: 999px;
  background: var(--solid); transition: transform 0.55s var(--ease), width 0.55s var(--ease);
}
.user { gap: 10px; padding: 0 18px 0 8px; flex-shrink: 0; animation-delay: 0.2s; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: var(--gold);
  font-family: var(--serif); font-weight: 600; font-size: 18px;
}
.user-txt { display: flex; flex-direction: column; }
.user-txt strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.user-txt small { font-size: 12px; color: var(--muted); }

.frame { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 28px; margin-top: 34px; }
.main { min-width: 0; outline: none; }

/* ---------------- icon rail ---------------- */
.rail { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 18px; z-index: 20; }
.rail-group {
  background: var(--card); border-radius: 999px; padding: 6px; display: flex; flex-direction: column; gap: 6px;
  animation: cardIn 0.7s var(--ease) both; animation-delay: 0.3s;
}
.rail-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  position: relative; text-decoration: none; transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.rail-btn:hover { background: var(--soft); color: var(--ink); }
.rail-btn:active { transform: scale(0.9); }
.rail-btn.on { background: var(--solid); color: var(--on-solid); }
.rail-btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; translate: 0 -50%;
  background: var(--solid); color: var(--on-solid); font-size: 12.5px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
}

/* ---------------- page head ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.4vw, 46px);
  letter-spacing: -0.8px; line-height: 1.08; animation: rise 0.7s var(--ease) both;
}
.page-head p { color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 62ch; animation: rise 0.7s var(--ease) 0.08s both; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- grid + cards ---------------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid + .grid, .grid + .card, .card + .grid, .card + .card { margin-top: 18px; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }

.card {
  background: var(--card); border-radius: var(--r-lg); padding: 22px; min-width: 0;
  animation: cardIn 0.7s var(--ease) both; animation-delay: calc(0.08s + var(--d, 0) * 0.06s);
}
.card.inset { background: var(--soft); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-foot { margin-top: 14px; color: var(--muted); font-size: 12.5px; }

/* stat tiles */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat {
  background: var(--soft); border-radius: var(--r-md); padding: 16px 16px 14px; min-width: 0;
  display: flex; flex-direction: column; gap: 6px; position: relative;
  animation: cardIn 0.7s var(--ease) both; animation-delay: calc(0.12s + var(--d, 0) * 0.06s);
}
.card > .stats .stat { background: var(--soft); }
.grid > .stat { background: var(--card); }
.stat .label { font-size: 13px; color: var(--ink-2); font-weight: 500; padding-right: 40px; }
.stat .ico {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); display: grid; place-items: center; color: var(--ink-2);
}
.grid > .stat .ico { background: var(--soft); }
.stat .value { font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; letter-spacing: -0.8px; margin-top: 10px; line-height: 1.1; }
.stat .value small { font-size: 0.5em; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat .meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.stat.feature {
  background: linear-gradient(150deg, #0b4a80 0%, var(--navy) 62%, #021a33 100%); color: #fff;
  box-shadow: 0 18px 40px -18px rgba(4, 42, 79, 0.55);
}
.stat.feature .label, .stat.feature .meta { color: rgba(255, 255, 255, 0.78); }
.stat.feature .ico { background: rgba(255, 255, 255, 0.14); color: var(--gold); }
.stat.feature .value { color: #fff; }
.stat.feature .value small { color: rgba(255, 255, 255, 0.7); }
[data-theme='dark'] .stat.feature { background: linear-gradient(150deg, #123f6b 0%, #0a2a4a 60%, #061a2f 100%); box-shadow: 0 0 0 1px rgba(204, 173, 102, 0.25); }

.delta {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--soft-2); color: var(--ink-2); white-space: nowrap;
}
.delta.up { background: var(--green-bg); color: var(--green); }
.delta.down { background: var(--red-bg); color: var(--red); }
.stat.feature .delta { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* chips + statuses */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--soft-2); color: var(--ink-2); white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.good { background: var(--green-bg); color: var(--green); }
.chip.warn { background: var(--amber-bg); color: var(--amber); }
.chip.bad { background: var(--red-bg); color: var(--red); }
.chip.info { background: var(--blue-bg); color: var(--blue); }
.chip.gold { background: var(--accent-soft); color: var(--accent-text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* buttons + segmented */
.btn {
  height: 42px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; background: var(--soft-2); color: var(--ink); text-decoration: none;
  transition: transform 0.25s var(--spring), background-color 0.2s, opacity 0.2s; white-space: nowrap;
}
.btn:hover { background: var(--soft-3); }
.btn:active { transform: scale(0.96); }
.btn.solid { background: var(--solid); color: var(--on-solid); }
.btn.solid:hover { opacity: 0.9; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { white-space: nowrap; flex-shrink: 0; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); position: relative; z-index: 1; transition: color 0.3s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field span { color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea, .cell-input {
  height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--card);
  padding: 0 12px; outline: none; min-width: 0; width: 100%;
}
.field textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .cell-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.form-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* tables */
.scroller { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 12px;
  background: var(--soft); white-space: nowrap;
}
.tbl th:first-child { border-radius: 12px 0 0 12px; }
.tbl th:last-child { border-radius: 0 12px 12px 0; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl tbody tr { transition: background-color 0.15s; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.tbl .strong { font-weight: 600; }
.tbl .sub { color: var(--muted); font-size: 12px; }
.tbl select.cell-input { height: 34px; padding: 0 8px; font-size: 13px; width: auto; min-width: 120px; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: growY 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.03s); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .hover-band, .chart .band-on { fill: var(--soft); }
.chart .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 1000); animation: draw 1.2s var(--ease) both; }
.chart .target { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.chart .dlabel { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.dash { height: 0; width: 16px; border-top: 2px dashed var(--ink-2); border-radius: 0; }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--card); color: var(--ink);
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; box-shadow: var(--shadow-pop);
  min-width: 150px; max-width: 260px;
}
.tooltip b { display: block; margin-bottom: 6px; font-size: 13px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.tooltip .row span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tooltip .row i { width: 8px; height: 8px; border-radius: 2px; }
.tooltip .row strong { font-variant-numeric: tabular-nums; }

/* bars as rows (share, lines per account) */
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 70px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.hbar .track { height: 10px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 999px; background: var(--solid); transform-origin: left; animation: growX 0.9s var(--ease) both; }
.hbar .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes growX { from { transform: scaleX(0); } }

/* ring */
.ring { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, 0.16); }
.ring .prog { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.ring .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .mid strong { font-size: 28px; font-weight: 600; letter-spacing: -0.6px; display: block; }
.ring .mid small { font-size: 11.5px; opacity: 0.75; }

/* hero tile */
.hero {
  background: linear-gradient(150deg, #0b4a80 0%, var(--navy) 58%, #021a33 100%); color: #fff;
  border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden;
  animation: cardIn 0.7s var(--ease) both;
}
[data-theme='dark'] .hero { background: linear-gradient(150deg, #123f6b 0%, #0a2a4a 60%, #061a2f 100%); box-shadow: 0 0 0 1px rgba(204, 173, 102, 0.22); }
.hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 173, 102, 0.22), transparent 70%); pointer-events: none;
}
.hero .kicker { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-weight: 500; }
.hero h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -0.3px; }
.hero .row { display: flex; gap: 20px; align-items: center; }
.hero .next { background: rgba(255, 255, 255, 0.1); border-radius: var(--r-md); padding: 14px 16px; position: relative; z-index: 1; }
.hero .next small { color: var(--gold); font-weight: 600; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase; }
.hero .next p { margin-top: 4px; font-size: 14.5px; }
.hero .btn { background: var(--gold); color: var(--navy); align-self: flex-start; position: relative; z-index: 1; }

/* findings */
.findings { display: flex; flex-direction: column; gap: 10px; }
.finding { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--soft); animation: rise 0.6s var(--ease) both; animation-delay: calc(0.2s + var(--i, 0) * 0.05s); }
.finding .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.finding.bad .dot { background: var(--red-bg); color: var(--red); }
.finding.warn .dot { background: var(--amber-bg); color: var(--amber); }
.finding.good .dot { background: var(--green-bg); color: var(--green); }
.finding.info .dot { background: var(--blue-bg); color: var(--blue); }
.finding strong { display: block; font-size: 14px; }
.finding p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* roadmap */
.milestones { display: flex; flex-direction: column; position: relative; }
.ms { display: grid; grid-template-columns: 110px 28px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; position: relative; }
.ms .when { color: var(--muted); font-size: 13px; padding-top: 4px; }
.ms .node { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); color: var(--muted); position: relative; z-index: 1; }
.ms:not(:last-child) .node::after { content: ''; position: absolute; top: 30px; left: 13px; width: 2px; height: calc(100% + 20px); background: var(--line-2); z-index: -1; }
.ms.done .node { background: var(--green); color: #fff; }
.ms.now .node { background: var(--solid); color: var(--on-solid); box-shadow: 0 0 0 5px var(--accent-soft); }
.ms .what strong { font-size: 14.5px; font-weight: 600; display: block; }
.ms .what p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ms .side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.track90 { position: relative; height: 12px; border-radius: 999px; background: var(--soft-2); overflow: visible; margin: 34px 0 26px; }
.track90 .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--navy-2)); }
[data-theme='dark'] .track90 .fill { background: linear-gradient(90deg, #8a6a24, var(--gold)); }
.track90 .mark { position: absolute; top: -26px; translate: -50% 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.track90 .mark::after { content: ''; position: absolute; left: 50%; top: 20px; width: 2px; height: 20px; background: var(--line-2); }
.track90 .today { position: absolute; top: 50%; translate: -50% -50%; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 4px solid var(--card); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }

/* pipeline */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stage { background: var(--soft); border-radius: var(--r-md); padding: 14px; min-width: 0; }
.stage .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stage .count { font-size: 28px; font-weight: 600; letter-spacing: -0.6px; margin-top: 8px; }
.stage .bar { height: 6px; border-radius: 999px; background: var(--soft-3); margin-top: 10px; overflow: hidden; }
.stage .bar i { display: block; height: 100%; background: var(--solid); border-radius: 999px; }

/* upload */
.drop {
  display: block; border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 38px 20px; text-align: center;
  background: var(--soft); transition: border-color 0.2s, background-color 0.2s; cursor: pointer;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 16px; margin-bottom: 6px; }
.drop p { color: var(--muted); font-size: 13.5px; }
.map-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* notices, empty, toast */
.notice { border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; background: var(--soft); color: var(--ink-2); }
.notice.bad { background: var(--red-bg); color: var(--red); }
.notice.warn { background: var(--amber-bg); color: var(--amber); }
.notice.info { background: var(--blue-bg); color: var(--ink-2); }
.notice.gold { background: var(--accent-soft); color: var(--ink-2); }
.notice b { color: var(--ink); }
.sample-banner { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; animation: rise 0.6s var(--ease) both; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.toast {
  position: fixed; bottom: 24px; left: 50%; translate: -50% 0; z-index: 120; background: var(--solid); color: var(--on-solid);
  padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop); animation: rise 0.4s var(--ease) both;
}
.foot { margin-top: 30px; text-align: center; color: var(--muted); font-size: 12.5px; }
.muted { color: var(--muted); }
.gold-text { color: var(--accent-text); }
.mt { margin-top: 18px; }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
details.how { margin-top: 14px; }
details.how summary { cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
details.how p, details.how li { color: var(--muted); font-size: 13px; }

/* ---------------- sign in ---------------- */
.signin-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, #0b4a80, var(--navy) 55%, #021a33); }
.signin { width: min(420px, calc(100vw - 32px)); text-align: center; padding: 34px 30px 28px; display: flex; flex-direction: column; gap: 14px; background: #fff; color: #0f1a26; }
.signin img { width: 120px; height: auto; margin: 0 auto 4px; }
.signin h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; }
.signin .lead { color: #6f7b88; margin-top: -6px; }
.signin .field { text-align: left; }
.signin .field input { background: #fff; color: #0f1a26; border-color: #d9dde3; }
.signin .btn.solid { background: #042a4f; color: #fff; width: 100%; height: 46px; }
.signin footer { font-size: 12px; color: #8b95a1; margin-top: 6px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .s3 { grid-column: span 6; } .s4, .s5, .s7, .s8 { grid-column: span 12; } .s6 { grid-column: span 12; }
  .user-txt { display: none; } .user { padding: 0 8px; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { width: 100%; margin: 0; border-radius: 0; padding: 14px 16px 24px; min-height: 100vh; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .pill { height: 54px; }
  .brand { order: 1; } .user { order: 2; margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0; padding: 5px; }
  .nav a { height: 44px; padding: 0 14px; font-size: 14.5px; }
  .nav-ind { top: 5px; height: 44px; }
  .frame { grid-template-columns: minmax(0, 1fr); margin-top: 22px; }
  .rail { position: fixed; top: auto; bottom: 16px; right: 16px; flex-direction: row; gap: 8px; }
  .rail-group { flex-direction: row; box-shadow: var(--shadow-pop); }
  .rail-btn[data-tip]:hover::after { display: none; }
  .s3 { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms { grid-template-columns: 28px minmax(0, 1fr); }
  .ms .when { grid-column: 2; order: -1; padding: 0; }
  .ms .node { grid-row: 1 / span 3; }
  .ms .side { grid-column: 2; justify-content: flex-start; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .row { flex-direction: column; align-items: flex-start; }
  .foot { padding-bottom: 70px; }
}
@media (max-width: 700px) {
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .stat { padding: 14px 12px 12px; }
  .stat .ico { display: none; }
  .stat .label { padding-right: 0; }
  .card { padding: 18px 16px; }
  /* tables become cards */
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { background: var(--soft); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; }
  .tbl.cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
  .tbl.cards td.lead { display: block; text-align: left; font-size: 15px; }
  .tbl.cards td.lead::before { display: none; }
  .tbl.cards tbody tr:hover td { background: none; }
  .hbar { grid-template-columns: 90px minmax(0, 1fr) 56px; }
}
