/* PILOT — the chart room.
   A navigation station, not a dashboard: chart-bone paper ruled with a faint
   graticule, a marine-ink rail, and one dramatic surface — the ocean chart —
   where the world map lives. Ink is the accent; the lagoon fill on the chart
   marks incentive depth. Type is Avenir Next, the wayfinding face.
   Client-facing printed documents stay paper-white with Meridian branding
   only — never YV. */

:root {
  --bg: #F1EEE4;
  --panel: #FBFAF4;
  --raised: #E8E4D7;
  --ink: #16293A;
  --ink-2: #4A5B69;
  --ink-3: #7F8B96;
  --border: rgba(22, 41, 58, 0.16);
  --border-soft: rgba(22, 41, 58, 0.08);
  --accent: #1C5D8D;
  --accent-ink: #F5F8F2;
  --accent-soft: rgba(28, 93, 141, 0.10);
  --ocean: #0D2434;
  --ocean-2: #14374E;
  --foam: #D7E5EC;
  --foam-dim: #8FAAB9;
  --lagoon: #5DCDBC;
  --good: #2E7D57;
  --good-soft: rgba(46, 125, 87, 0.12);
  --warn: #A2751F;
  --warn-soft: rgba(162, 117, 31, 0.13);
  --bad: #BC4434;
  --bad-soft: rgba(188, 68, 52, 0.10);
  --radius-sm: 9px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 41, 58, 0.06), 0 8px 22px rgba(22, 41, 58, 0.06);
  --shadow-lg: 0 4px 10px rgba(22, 41, 58, 0.08), 0 26px 60px rgba(22, 41, 58, 0.16);
  --sans: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", Inter, "Helvetica Neue", Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  /* The canvas is chart paper: a faint graticule ruled into the bone. */
  background:
    repeating-linear-gradient(to right, rgba(22, 41, 58, 0.028) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, rgba(22, 41, 58, 0.028) 0 1px, transparent 1px 64px),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 0.95em; }
a { color: inherit; }
::selection { background: rgba(93, 205, 188, 0.3); }

/* ---------- YV chrome (brand-fixed, unchanged by product identity) ---------- */
.yv-endorse {
  display: flex; align-items: center; gap: 7px;
  color: var(--ink-3);
  font-size: 9px; letter-spacing: 0.03em; font-variant: small-caps; text-transform: lowercase;
  white-space: nowrap; text-decoration: none;
}
.sidebar .yv-endorse { color: var(--foam-dim); }
.yv-endorse svg { width: 11px; height: 11px; flex-shrink: 0; opacity: 0.85; }
.sidebar-foot .yv-endorse { padding: 10px 8px 0; }
.help-link { display: block; margin: 10px 6px 0; padding: 5px 8px; border-radius: var(--radius-sm); font-size: 12px; color: var(--foam-dim); text-decoration: none; transition: background 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1); }
.help-link:hover { background: rgba(215, 229, 236, 0.1); color: var(--foam); }
.yv-link { cursor: pointer; text-decoration: none; transition: color 120ms cubic-bezier(0.2, 0, 0, 1); }
.yv-link:hover { color: var(--ink-2); }
.sidebar .yv-link:hover { color: var(--foam); }
.login-endorse { justify-content: center; margin-top: 26px; }

.yv-sting {
  position: fixed; inset: 0; z-index: 300;
  background: #191B1F; color: #F5F4F1;
  display: flex; align-items: center; justify-content: center;
}
.yv-sting.out { opacity: 0; transition: opacity 120ms cubic-bezier(0.2, 0, 0, 1); }
.yv-sting-inner { display: flex; align-items: center; gap: 14px; }
.yv-sting-mark { width: 42px; height: 42px; }
.yv-s-whole, .yv-s-top { animation: yv-rise 240ms cubic-bezier(0.2, 0, 0, 1) both; }
.yv-s-base { animation: yv-rise-gap 360ms cubic-bezier(0.2, 0, 0, 1) both; }
.yv-sting-word {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
  clip-path: inset(0 100% 0 0);
  animation: yv-wipe 200ms cubic-bezier(0.2, 0, 0, 1) 360ms forwards;
}
@keyframes yv-rise { from { transform: translateY(64px); } to { transform: translateY(0); } }
@keyframes yv-rise-gap { 0% { transform: translateY(56px); } 66% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
@keyframes yv-wipe { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .yv-s-whole, .yv-s-top, .yv-s-base { animation: none; }
  .yv-sting-word { animation: none; clip-path: none; }
}

/* ---------- sign in: the chart at night ---------- */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(to right, rgba(215, 229, 236, 0.045) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, rgba(215, 229, 236, 0.045) 0 1px, transparent 1px 72px),
    radial-gradient(900px 520px at 50% 118%, rgba(93, 205, 188, 0.14), transparent 62%),
    var(--ocean);
  z-index: 100; padding: 20px;
}
.login-card {
  width: 400px; max-width: 100%;
  background: var(--panel); border-radius: 20px;
  padding: 40px 36px 28px;
  box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.client-mark { width: 52px; height: 52px; color: var(--ink); }
.client-mark.small { width: 30px; height: 30px; color: var(--foam); }
.login-company { font-size: 20px; font-weight: 700; margin: 14px 0 4px; letter-spacing: -0.02em; }
.login-product {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.26em;
  color: var(--accent); text-transform: uppercase;
}
.field-label {
  display: block; font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); margin: 14px 0 6px;
}
.login-error { color: var(--bad); font-size: 13px; margin-top: 10px; }
.login-hint { color: var(--ink-3); font-size: 11.5px; margin: 16px 0 0; text-align: center; }
#loginForm .btn-block { margin-top: 20px; }
#loginForm #btnForgot { margin-top: 10px; }
/* The forgotten password: one plain sentence on the sign-in card, in the ink of the card. */
.login-note { color: var(--ink); font-size: 13px; margin-top: 12px; line-height: 1.5; }
/* The link an administrator copies when an invitation or an account email was not sent. */
.link-copy { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.link-copy .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
.modal .mail-result { color: var(--ink); font-size: 13.5px; margin: 10px 0 0; line-height: 1.5; }
.login-card .yv-endorse { color: var(--ink-3); }
/* The client's own logo (vendor API company profile) in place of the default mark. */
.client-logo { display: block; margin: 0 auto; max-width: 180px; max-height: 56px; object-fit: contain; }
.client-logo.small { margin: 0; max-width: 64px; max-height: 30px; padding: 3px; background: var(--panel); border-radius: 6px; }
/* The one-time setup page (/setup/<token>): the sign-in card, with a heading and the account it is for. */
.setup-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; text-align: center; letter-spacing: -0.01em; }
.setup-text { color: var(--ink-2); font-size: 13px; margin: 0 0 6px; text-align: center; line-height: 1.5; }
.setup-notice { text-align: center; }
.setup-form .btn-block { margin-top: 20px; }
.login-card .yv-link:hover { color: var(--ink-2); }

/* ---------- shell: the ink rail ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 226px; flex-shrink: 0;
  background: var(--ocean);
  color: var(--foam);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; gap: 10px; align-items: center; padding: 20px 18px 14px; }
.demo-line { padding: 0 18px 12px; margin-top: -6px; font-size: 10.5px; line-height: 1.35; color: var(--foam-dim); }
.brand-company { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: #FDFCF7; }
.brand-product { font-size: 9px; letter-spacing: 0.26em; color: var(--foam-dim); text-transform: uppercase; font-weight: 600; }
.nav { flex: 1; padding: 4px 10px 10px; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: var(--ocean-2); border-radius: 2px; }
.nav-section {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--foam-dim); padding: 15px 12px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 6.5px 12px; margin-bottom: 1px;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--foam); font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: var(--ocean-2); color: #FFFFFF; }
.nav-item.active { background: var(--bg); color: var(--ink); font-weight: 600; }
.nav-count {
  margin-left: auto; font-size: 11px; font-weight: 600; color: var(--foam-dim);
  background: rgba(215, 229, 236, 0.12); border-radius: 999px; padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { background: rgba(22, 41, 58, 0.1); color: var(--ink); }
.nav-count.alert { color: #F0A9A0; }
.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid var(--ocean-2); }
.user-chip { padding: 0 6px; }
.user-name { font-weight: 600; font-size: 13.5px; color: #FDFCF7; }
.user-title { color: var(--foam-dim); font-size: 11.5px; margin-bottom: 8px; }
.sidebar-foot .btn-ghost { background: rgba(215, 229, 236, 0.1); color: var(--foam); }
.sidebar-foot .btn-ghost:hover { background: rgba(215, 229, 236, 0.18); color: #FFFFFF; }

.main { flex: 1; padding: 28px 34px 70px; min-width: 0; max-width: 1560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.page-title .idtag { font-family: var(--mono); font-size: 13px; color: var(--ink-3); font-weight: 400; }
.page-sub { color: var(--ink-2); font-size: 13.5px; margin: 4px 0 0; max-width: 72ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- the chart hero ---------- */
.chart-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 82% -120px, rgba(93, 205, 188, 0.10), transparent 60%),
    var(--ocean);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 18px;
  min-height: 360px;
}
.chart-hero .map-svg { cursor: pointer; }
.hero-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 360px; color: var(--foam-dim); font-size: 13.5px;
}
.hero-brief {
  position: absolute; left: 26px; bottom: 24px; max-width: 340px;
  color: var(--foam);
  pointer-events: none;
}
.hero-brief .btn { pointer-events: auto; }
.hero-figure {
  font-size: 54px; font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  color: #FDFCF7; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 18px rgba(13, 36, 52, 0.9);
}
.hero-line { font-size: 13px; line-height: 1.55; margin: 8px 0 14px; color: var(--foam); text-shadow: 0 1px 12px rgba(13, 36, 52, 0.9); }
.chart-hero .btn-primary { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.chart-hero .btn-primary:hover { background: #FFFFFF; }
@media (max-width: 800px) { .hero-brief { position: static; padding: 18px 20px 20px; max-width: none; } }

/* ---------- the instrument bench ---------- */
.bench { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 12px; margin-bottom: 20px; }
.bench-card {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 14px 16px 15px; box-shadow: var(--shadow); cursor: pointer;
  transition: box-shadow 0.16s, transform 0.16s;
  overflow: hidden;
}
.bench-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.bench-name { font-size: 15px; font-weight: 700; letter-spacing: -0.012em; margin-bottom: 5px; }
.bench-line { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.bench-line.dim { color: var(--ink-3); margin-top: 5px; }
.bench-stat {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  font-size: 12.5px; padding: 4px 0;
}
.bench-stat span { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-stat b { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent); }
.bench-art {
  display: flex; gap: 3px; height: 58px; margin: -14px -16px 11px;
  background: var(--ocean);
}
.bench-art img { flex: 1; min-width: 0; object-fit: cover; height: 100%; opacity: 0.92; }

/* ---------- buttons, inputs ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 8px 16px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s, transform 0.05s;
}
.btn:active { transform: scale(0.985); }
.btn-primary {
  background: var(--ink); color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(22, 41, 58, 0.4);
}
.btn-primary:hover { background: var(--ocean-2); }
.btn-ghost { background: rgba(22, 41, 58, 0.07); color: var(--ink-2); }
.btn-ghost:hover { background: rgba(22, 41, 58, 0.12); color: var(--ink); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: rgba(188, 68, 52, 0.18); }
.btn-block { width: 100%; }
.btn-small { padding: 5px 11px; font-size: 12.5px; }
a.btn { text-decoration: none; display: inline-block; }
.input, .select {
  font: inherit; width: 100%;
  padding: 8px 12px;
  background: #FFFFFF; color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.input::placeholder { color: var(--ink-3); }
textarea.input { resize: vertical; min-height: 66px; }
.input.compact, .select.compact { padding: 5px 9px; font-size: 13px; }

/* ---------- floating menu (every option gets a hover highlight) ---------- */
.menu {
  position: fixed; z-index: 250;
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px;
  min-width: 190px; padding: 5px;
  box-shadow: var(--shadow-lg);
}
.menu-item {
  display: block; width: 100%; text-align: left;
  padding: 8px 11px; border: 0; background: none; border-radius: 8px;
  color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer;
}
.menu-item:hover { background: var(--ink); color: var(--accent-ink); }
.menu-item.current { color: var(--accent); font-weight: 600; }
.menu-item.current:hover { color: var(--accent-ink); }
.menu-label { padding: 7px 11px 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); }

/* ---------- panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.panel-title { font-weight: 700; font-size: 14.5px; margin: 0; letter-spacing: -0.012em; }
.panel-body { padding: 15px 18px; }
.panel-note { color: var(--ink-3); font-size: 12.5px; }

/* ---------- figures on the margin scale, not boxes ---------- */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0; margin-bottom: 18px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: none;
}
.kpi {
  background: none; border: 0; box-shadow: none; border-radius: 0;
  border-left: 1px solid var(--border-soft);
  padding: 13px 16px 14px;
}
.kpi:first-child { border-left: 0; padding-left: 2px; }
.kpi-label { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.kpi-value { font-size: 27px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }
.kpi-value.accent { color: var(--accent); }
.kpi-value.bad { color: var(--bad); }
.kpi-sub { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.data th {
  text-align: left; padding: 10px 14px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.rowlink { cursor: pointer; transition: background 0.1s; }
table.data tr.rowlink:hover { background: rgba(28, 93, 141, 0.05); }
td.num, th.num { text-align: right; }
td.strong { font-weight: 600; }
td .sub-usd { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; }
tfoot td { font-weight: 650; border-top: 1px solid var(--border); }

.chip {
  display: inline-block; padding: 2.5px 10px;
  border-radius: 999px; border: 1px solid var(--border-soft);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink-2); background: rgba(22, 41, 58, 0.05);
  white-space: nowrap;
}
.chip.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.chip.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip.click { cursor: pointer; }
.chip.click:hover { filter: brightness(0.94); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.toggle { cursor: pointer; opacity: 0.55; }
.chip.toggle.on { opacity: 1; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.chip.toggle:hover { opacity: 1; }

.bar { height: 7px; background: var(--raised); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar > span.over { background: var(--bad); }
.bar.thin { height: 5px; }

/* ---------- layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }
.cat-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; margin-bottom: 8px; }
.cat-row label { font-size: 13px; color: var(--ink-2); }
.stat-line { display: flex; justify-content: space-between; gap: 12px; padding: 7.5px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; align-items: baseline; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.stat-line .usd { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.muted { color: var(--ink-3); }
.accent-text { color: var(--accent); }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }
.empty { color: var(--ink-3); font-size: 13.5px; padding: 22px; text-align: center; }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.searchbar .input { width: 230px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- programs (packs) ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.pack-card {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.pack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pack-rate { font-size: 25px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.02em; }
.pack-rate small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.pack-meta { font-size: 11.5px; color: var(--ink-3); }
.pack-cats { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.pack-cats .chip { font-size: 10.5px; padding: 1.5px 8px; }
.pack-note { color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--border-soft); padding-top: 10px; margin-top: 10px; }
.pack-try { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.pack-try .input { width: 140px; }
.pack-try-out { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--accent); font-size: 13.5px; }
.uplift-list { margin: 8px 0 0; padding: 0; list-style: none; }
.uplift-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); padding: 3px 0; }
.uplift-list .u-rate { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }

/* ---------- segmented tabs ---------- */
.tabs {
  display: inline-flex; gap: 2px; align-items: center;
  background: var(--raised); border-radius: 11px; padding: 3px;
  border-bottom: none; margin-bottom: 18px;
  max-width: 100%; overflow-x: auto;
}
.tab {
  padding: 7px 15px; background: none; border: 0; border-radius: 8.5px;
  color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(22, 41, 58, 0.16); }

/* ---------- timeline & history ---------- */
.timeline { display: flex; gap: 0; margin: 8px 0 18px; }
.tl-step { flex: 1; text-align: center; position: relative; padding-top: 18px; }
.tl-step::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 3px; background: var(--raised); border-radius: 2px; }
.tl-step::after {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--raised); border: 2.5px solid var(--panel); box-shadow: 0 0 0 1px var(--border);
}
.tl-step.done::before, .tl-step.done::after { background: var(--accent); box-shadow: none; }
.tl-step.current::after { background: var(--panel); box-shadow: 0 0 0 2px var(--accent); }
.tl-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
.tl-step.done .tl-label, .tl-step.current .tl-label { color: var(--accent); }
.history { margin: 0; padding: 0; list-style: none; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; display: flex; gap: 12px; }
.history li:last-child { border-bottom: 0; }
.history .h-date { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; padding-top: 1px; }

/* ---------- tasks & to-dos ---------- */
.task-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.task-row:last-child { border-bottom: 0; }
.task-check {
  width: 19px; height: 19px; margin-top: 2px; flex-shrink: 0;
  border: 1.6px solid var(--ink-3); border-radius: 50%; background: none; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.task-check:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.task-check.done { background: var(--good); border-color: var(--good); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; }
.task-title.done { color: var(--ink-3); text-decoration: line-through; }
.task-meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task-meta .link { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.task-meta .link:hover { color: var(--accent); }

/* ---------- quote builder ---------- */
.quote-grid { grid-template-columns: 1fr 320px; }
@media (max-width: 1100px) { .quote-grid { grid-template-columns: 1fr; } .quote-grid .qtotals { order: -1; } }
table.qlines td { padding: 5px 6px; vertical-align: middle; }
table.qlines .input, table.qlines .select { min-width: 0; }
table.qlines td.amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; text-align: right; }
.qtotals .stat-line b { white-space: nowrap; }
.q-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.q-meta .field { width: 150px; }

/* ---------- modal ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 36, 52, 0.4);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 20px 20px; overflow-y: auto;
}
.modal {
  width: 560px; max-width: 100%;
  background: var(--panel); border-radius: 18px;
  padding: 26px 28px;
  box-shadow: var(--shadow-lg);
}
.modal.wide { width: 760px; }
.modal h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.015em; }
.modal .sub { color: var(--ink-3); font-size: 12.5px; margin: 0 0 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- legal documents: the sign-in links, the public pages and the acceptance window ---------- */
.login-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; }
.login-foot .login-endorse { margin-top: 0; }
.legal-links { display: flex; justify-content: center; gap: 16px; }
.legal-link {
  font-size: 9px; letter-spacing: 0.03em; font-variant: small-caps; text-transform: lowercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: color 120ms cubic-bezier(0.2, 0, 0, 1);
}
.legal-link:hover { color: var(--accent); text-decoration: underline; }
.legal-page { max-width: 780px; margin: 0 auto; padding: 44px 20px 56px; }
.legal-page .login-brand { margin-bottom: 28px; }
.legal-article { background: var(--panel); border-radius: 18px; padding: 30px 34px; box-shadow: var(--shadow); line-height: 1.6; font-size: 14px; }
.legal-article h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 8px; }
.legal-article h2 { font-size: 17px; letter-spacing: -0.012em; margin: 26px 0 8px; }
.legal-article h3 { font-size: 15px; margin: 18px 0 6px; }
.legal-article p { margin: 0 0 10px; }
.legal-article ul { margin: 0 0 10px; padding-left: 22px; }
.legal-facts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.legal-fact { padding: 3px 11px; border-radius: 999px; background: rgba(22, 41, 58, 0.07); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.legal-changes h2 { margin-top: 14px; }
.legal-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; }
.legal-foot .legal-link { font-size: 12px; font-variant: normal; text-transform: none; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.legal-wrap { z-index: 400; background: rgba(13, 36, 52, 0.55); padding-top: 4vh; }
.legal-modal { width: 780px; }
.legal-text { max-height: 340px; overflow-y: auto; margin-top: 8px; padding: 12px 14px; background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.55; }
.legal-text h1 { display: none; }
.legal-text h2 { font-size: 13.5px; margin: 14px 0 4px; }
.legal-text h3 { font-size: 12.5px; margin: 10px 0 4px; }
.legal-text p { margin: 0 0 6px; }
.legal-tick { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; font-weight: 500; transition: background 120ms cubic-bezier(0.2, 0, 0, 1); }
.legal-tick:hover { background: rgba(22, 41, 58, 0.07); }
.legal-tick input { margin: 3px 0 0; flex-shrink: 0; cursor: pointer; }
.legal-tick a { color: var(--ink); text-decoration: underline; border-radius: 4px; transition: background 120ms cubic-bezier(0.2, 0, 0, 1); }
.legal-tick a:hover { background: rgba(22, 41, 58, 0.1); }

/* ---------- scenario lab ---------- */
tr.scn-open td { border-bottom: 0; }
tr.scn-detail td { background: rgba(22, 41, 58, 0.03); padding: 16px; border-bottom: 1px solid var(--border-soft); }
.scn-math td, .scn-math th { font-size: 12.5px; padding: 6px 9px; }

/* ---------- the ocean chart (Atlas and the dashboard hero) ---------- */
.atlas-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .atlas-grid { grid-template-columns: 1fr; } }
.map-panel { position: relative; }
.mapbox {
  position: relative; border-radius: 0;
  background:
    radial-gradient(1100px 480px at 80% -140px, rgba(93, 205, 188, 0.09), transparent 60%),
    var(--ocean);
}
.map-svg { display: block; width: 100%; height: auto; cursor: grab; touch-action: none; }
.map-svg:active { cursor: grabbing; }
.map-plain { fill: #1B3C52; stroke: rgba(215, 229, 236, 0.12); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.map-inc { stroke: rgba(93, 205, 188, 0.6); stroke-width: 0.7; vector-effect: non-scaling-stroke; cursor: pointer; transition: filter 0.1s; }
.map-inc.pack { stroke: var(--lagoon); stroke-width: 1.3; }
.map-inc:hover { filter: brightness(1.15) saturate(1.2); stroke: #FFFFFF; }
.map-inc.sel { stroke: #FFFFFF; stroke-width: 1.6; filter: saturate(1.2) brightness(1.1); }
.map-svg.packs-only .map-inc:not(.pack) { opacity: 0.25; }
.map-lbl {
  font-family: var(--sans);
  fill: #CFE0EA; paint-order: stroke; stroke: rgba(13, 36, 52, 0.78); stroke-width: 0.16em;
  pointer-events: none; font-weight: 600; letter-spacing: 0.01em;
}
.map-lbl.dim { fill: #7C97A8; font-weight: 500; }
.map-mk { fill: var(--ocean); stroke: var(--foam-dim); stroke-width: 1.2; cursor: pointer; vector-effect: non-scaling-stroke; }
.map-mk:hover, .map-mk.sel { stroke: var(--lagoon); fill: rgba(93, 205, 188, 0.35); }
.map-tip {
  position: absolute; z-index: 60; pointer-events: none;
  background: var(--panel); border-radius: 11px;
  padding: 9px 12px; font-size: 12px; max-width: 250px;
  box-shadow: var(--shadow-lg);
}
.map-tip .t-name { font-weight: 650; }
.map-tip .t-rate { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 650; }
.map-tip .t-note { color: var(--ink-3); font-size: 11px; }
.atlas-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.atlas-side .stat-line b { white-space: nowrap; }
.atlas-legend { display: flex; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--ink-3); align-items: center; flex-wrap: wrap; }
.atlas-legend .lg { display: flex; gap: 6px; align-items: center; }
.atlas-legend .sw-fill { width: 26px; height: 10px; display: inline-block; background: linear-gradient(to right, rgba(93, 205, 188, 0.25), rgba(93, 205, 188, 0.85)); border-radius: 4px; }
.atlas-legend .sw-pack { width: 10px; height: 10px; display: inline-block; background: rgba(93, 205, 188, 0.35); border: 1.5px solid var(--lagoon); border-radius: 3px; }
.map-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.map-card {
  position: absolute; right: 14px; top: 14px; width: 316px;
  max-height: calc(100% - 28px); overflow-y: auto;
  background: rgba(251, 250, 244, 0.96);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px 16px 16px; z-index: 55;
}
.map-card-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  margin-bottom: 4px;
}
@media (max-width: 800px) {
  .map-card { position: static; width: auto; max-height: none; margin: 10px; }
}
.map-zoom .btn { width: 32px; padding: 4px 0; text-align: center; background: var(--panel); box-shadow: var(--shadow); }

/* ---------- radar ---------- */
.radar-angle { max-width: 300px; }
.fit-high { color: var(--accent); background: var(--accent-soft); }

/* ---------- scout ---------- */
.scout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.scout-card {
  background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.scout-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.scout-card.picked { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-lg); }
.scout-img { position: relative; aspect-ratio: 3/2; background: linear-gradient(160deg, var(--ocean-2), var(--ocean)); }
.scout-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scout-img-tag {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 10px;
  background: rgba(13, 36, 52, 0.72); color: var(--foam);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 600;
  border-radius: 999px;
}
.scout-body { padding: 13px 15px 15px; display: flex; flex-direction: column; flex: 1; }
.scout-title { font-weight: 700; font-size: 15px; letter-spacing: -0.012em; }
.scout-title .sub-usd { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }
.scout-blurb { font-size: 12.5px; color: var(--ink-2); margin: 0 0 4px; }
.dl-strip { display: flex; align-items: flex-end; gap: 2px; height: 24px; margin: 0 0 8px; }
.dl-bar { flex: 1; background: var(--raised); min-height: 3px; border-radius: 2px 2px 0 0; }
.dl-bar.in { background: rgba(28, 93, 141, 0.55); }
.scout-extract {
  margin: 8px 0 0; padding: 10px 12px; max-height: 150px; overflow: auto;
  background: var(--raised); border-radius: 10px;
  font-family: var(--mono); font-size: 11px; line-height: 1.45; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}

/* ---------- cashflow, board, clocks, wire ---------- */
.cf-strip { display: flex; align-items: flex-end; gap: 2px; height: 40px; margin: 6px 0 4px; }
.cf-bar { flex: 1; min-width: 3px; background: var(--raised); border-radius: 2px 2px 0 0; }
.cf-bar.out { background: rgba(188, 68, 52, 0.4); }
.cf-bar.in { background: var(--good); }
.board-grid { display: flex; flex-direction: column; gap: 3px; }
.board-row { display: grid; grid-template-columns: 190px repeat(12, 1fr); gap: 3px; align-items: stretch; }
.board-row.board-head .board-cell { background: none; text-align: center; font-size: 10px; min-height: auto; }
.board-label { padding: 6px 8px; font-size: 13px; }
.board-cell { background: var(--raised); min-height: 34px; position: relative; border-radius: 6px; }
.board-cell.season { background: var(--good-soft); }
.board-cell.active .board-bar { position: absolute; inset: 11px 1px; background: var(--accent); border-radius: 5px; }
/* The clocks read as one ruler across the top of the queue, not a row of pills. */
.clock-strip {
  display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 18px;
  border-bottom: 1px solid var(--border-soft); padding: 2px 2px 10px;
}
.clock { display: inline-flex; align-items: baseline; gap: 7px; }
.clock-city { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.clock-time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); }
.clock.office .clock-time { color: var(--ink); }
.wire-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.wire-row:last-child { border-bottom: 0; }
.wire-main { flex: 1; min-width: 0; }
.wire-title { font-size: 13.5px; text-decoration: none; font-weight: 500; }
.wire-title:hover { color: var(--accent); }

/* ---------- pitch ---------- */
.pitch-hero { padding: 8px 0 20px; }
.pitch-title { font-size: 38px; font-weight: 700; letter-spacing: -0.025em; margin: 6px 0 4px; }
.eyebrowline { font-size: 11px; letter-spacing: 0.02em; color: var(--ink-3); font-weight: 600; }

/* ---------- printable documents (client-facing paper: Meridian branding only, never YV) ---------- */
body.print-route .sidebar { display: none; }
body.print-route .main { padding: 0; }
.printbar {
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 12px 18px; background: rgba(241, 238, 228, 0.92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 50;
}
.doc {
  background: #FFFFFF; color: #16293A;
  max-width: 860px; margin: 26px auto 60px; padding: 52px 58px;
  font-size: 13.5px; line-height: 1.55;
  border-radius: 10px; box-shadow: var(--shadow);
}
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid #16293A; padding-bottom: 18px; margin-bottom: 22px; }
.doc-brand { display: flex; align-items: center; gap: 12px; }
.doc-brand svg { width: 34px; height: 34px; color: #16293A; }
.doc-brand .n { font-weight: 700; font-size: 16px; }
.doc-brand .s { font-size: 11px; color: #71808C; }
.doc-kind { text-align: right; }
.doc-kind .k { font-size: 10.5px; font-weight: 640; letter-spacing: 0.14em; text-transform: uppercase; color: #71808C; }
.doc-kind .t { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.doc h4 { font-size: 11px; font-weight: 660; letter-spacing: 0.1em; text-transform: uppercase; color: #71808C; margin: 22px 0 8px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 30px; }
.doc-grid .l { color: #71808C; }
.doc table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; margin: 6px 0; }
.doc th { text-align: left; font-size: 10px; font-weight: 620; letter-spacing: 0.07em; text-transform: uppercase; color: #71808C; border-bottom: 1.5px solid #16293A; padding: 6px 8px; }
.doc td { padding: 6px 8px; border-bottom: 1px solid #E6E9ED; font-size: 12.5px; }
.doc td.num, .doc th.num { text-align: right; }
.doc tr.total td { font-weight: 700; border-top: 1.5px solid #16293A; border-bottom: 0; }
.doc .callout { background: #F0F5F8; border: 1px solid #D5E2EA; padding: 14px 16px; margin: 16px 0; border-radius: 9px; }
.doc .callout b { font-variant-numeric: tabular-nums; }
.doc .fine { font-size: 10.5px; color: #71808C; margin-top: 22px; border-top: 1px solid #E6E9ED; padding-top: 10px; }
.doc .sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 44px; }
.doc .sig { border-top: 1px solid #16293A; padding-top: 6px; font-size: 11.5px; color: #71808C; }
.doc .tag-ok { color: #2E7D57; font-weight: 650; }
.doc .tag-no { color: #BC4434; font-weight: 650; }
.doc .pitch-loc { page-break-inside: avoid; border-top: 1px solid #E6E9ED; padding-top: 16px; margin-top: 16px; }
.doc .pitch-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 9px; }

@media print {
  body { background: #fff; }
  .sidebar, .printbar, .menu, .modal-wrap, .yv-sting { display: none !important; }
  .main { padding: 0; }
  .doc { margin: 0; padding: 0 8px; max-width: none; border-radius: 0; box-shadow: none; }
}

@media (max-width: 800px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .nav { display: flex; flex-wrap: wrap; align-items: center; padding: 6px; }
  .nav-section { padding: 6px 8px 6px; }
  .sidebar-foot { margin-left: auto; border-top: 0; }
  .main { padding: 18px 14px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi { border-left: 0; padding-left: 2px; }
}

/* ---------- vendor directory ---------- */
tr.dir-city td {
  background: rgba(22, 41, 58, 0.045); font-weight: 640; font-size: 12px;
  letter-spacing: 0.02em; color: var(--ink-2); padding: 7px 14px;
}
