/* ─────────────────────────────────────────────────────────────────────────────
   CRBN HQ — design system
   Same lab as crbninsoles.com: paper base, engineering grid, Archivo expanded
   display, Plex Mono for every measurement, carbon weave as the material moment
   (the sidebar), Spring Green only for primary actions and "live".
   ──────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Archivo Variable';
  src: url('/fonts/archivo-wdth.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  /* Tokens, straight from crbn-site/src/styles/global.css */
  --paper: #f7f7f4;
  --card: #ffffff;
  --ink: #101322;
  --ink-soft: #3d4152;
  --ink-faint: #686d7d;
  --carbon: #0a0c10;
  --carbon-2: #14171e;
  --midnight: #1e1747;
  --voltage: #5333c1;
  --voltage-soft: #7a5ee8;
  --spring-50: #ebfbf2;
  --spring-100: #d2f5e2;
  --spring-200: #a6ebc6;
  --spring-400: #35ce82;
  --spring-500: #12c267;
  --spring-700: #0b8a48;
  --line: #e4e4dd;
  --line-2: #d6d6cd;
  --line-dark: #262b35;

  /* Semantic (state, not accent) */
  --ok: #0b8a48; --ok-bg: #e5f7ed;
  --warn: #a15c00; --warn-bg: #fdf1dc;
  --bad: #c0262d; --bad-bg: #fce9e9;
  --info: #3a3fb8; --info-bg: #ecebfb;

  /* Platforms */
  --ig: #c13584; --tt: #101322; --yt: #e02b24; --story: #5333c1; --other: #686d7d;

  --sans: 'Archivo Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow-lift: 0 1px 2px rgb(16 19 34 / 0.05), 0 12px 32px -12px rgb(16 19 34 / 0.14);
  --shadow-float: 0 2px 6px rgb(16 19 34 / 0.06), 0 24px 64px -24px rgb(16 19 34 / 0.22);
  --r: 12px;
  --r-sm: 8px;
  --side: 248px;
  --gutter: clamp(16px, 2.4vw, 32px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--paper); color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--spring-200); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
[data-dark] :focus-visible { outline-color: var(--spring-400); }
img { max-width: 100%; display: block; }
:where(svg[aria-hidden='true']) { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono, .num { font-family: var(--mono); font-feature-settings: 'tnum' 1; }
.num { letter-spacing: -0.01em; }
.muted { color: var(--ink-faint); }
.soft { color: var(--ink-soft); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Type roles ─────────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  margin: 0;
}
.kicker b { color: var(--spring-700); font-weight: 500; }
[data-dark] .kicker { color: rgb(255 255 255 / 0.5); }
.display {
  margin: 0; font-weight: 850; font-variation-settings: 'wdth' 120; font-stretch: 120%;
  letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance;
  font-size: clamp(26px, 1.2rem + 1.6vw, 38px);
}
.h2 {
  margin: 0; font-weight: 800; font-variation-settings: 'wdth' 114; font-stretch: 114%;
  letter-spacing: -0.012em; line-height: 1.15; font-size: 17px; text-wrap: balance;
}
.h3 { margin: 0; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.big {
  font-weight: 900; font-variation-settings: 'wdth' 122; font-stretch: 122%;
  letter-spacing: -0.03em; line-height: 0.95; font-size: clamp(30px, 1.4rem + 1.8vw, 44px);
}
.big.mono { font-family: var(--mono); font-weight: 600; letter-spacing: -0.04em; font-variation-settings: normal; }
.highlight { position: relative; z-index: 0; white-space: nowrap; }
.highlight::before {
  content: ''; position: absolute; z-index: -1; left: -0.06em; right: -0.06em; top: 0.52em; bottom: 0.04em;
  background: var(--spring-200);
}

/* ── App shell ──────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto;
  background-color: var(--carbon);
  background-image:
    repeating-linear-gradient(45deg, rgb(255 255 255 / 0.03) 0 1.5px, transparent 1.5px 7px),
    repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.022) 0 1.5px, transparent 1.5px 7px);
  color: #fff; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  border-right: 1px solid var(--line-dark);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 2px; text-decoration: none; }
.brand img { height: 22px; width: auto; }
.brand .tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em;
  color: var(--carbon); background: var(--spring-500); border-radius: 4px; padding: 2px 6px 1px;
}
.nav { display: grid; gap: 2px; }
.nav-label { padding: 12px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: rgb(255 255 255 / 0.72); text-decoration: none; font-weight: 600; font-size: 13.5px;
  transition: background-color 120ms, color 120ms;
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav a:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.nav a[aria-current='page'] { background: rgb(255 255 255 / 0.1); color: #fff; box-shadow: inset 2px 0 0 var(--spring-500); }
.nav a .count {
  margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600;
  min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px;
  background: rgb(255 255 255 / 0.1); color: rgb(255 255 255 / 0.8);
}
.nav a .count.hot { background: var(--spring-500); color: var(--carbon); }
.nav a .count.alert { background: #f2b544; color: var(--carbon); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-product { border-radius: 10px; overflow: hidden; border: 1px solid var(--line-dark); background: var(--carbon-2); }
.side-product img { width: 100%; height: 92px; object-fit: cover; opacity: 0.9; }
.side-product div { padding: 10px 12px 11px; font-size: 12px; color: rgb(255 255 255 / 0.66); line-height: 1.4; }
.side-product strong { color: #fff; font-weight: 700; display: block; font-size: 12.5px; }
.who { display: grid; gap: 8px; padding: 10px 10px 4px; border-top: 1px solid var(--line-dark); }
.who-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgb(255 255 255 / 0.8); }
.who-row small { color: rgb(255 255 255 / 0.45); font-size: 11.5px; margin-left: auto; text-align: right; }

.avatar {
  --h: 152; width: 26px; height: 26px; flex: none; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-family: var(--mono); font-size: 10px; font-weight: 600;
  background: hsl(var(--h) 55% 92%); color: hsl(var(--h) 60% 24%);
  box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 80%);
}
[data-dark] .avatar { background: hsl(var(--h) 40% 22%); color: hsl(var(--h) 70% 85%); box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 34%); }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar .live { position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--spring-500); box-shadow: 0 0 0 2px var(--carbon); }
.avatar.ghost { background: transparent; box-shadow: none; border: 1px dashed var(--line-2); color: var(--ink-faint); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgb(247 247 244 / 0.9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter); min-height: 58px; }
.topbar .mobile-brand { display: none; }
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px 0 11px;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--card); color: var(--ink-faint); cursor: pointer;
  font-size: 13px; text-align: left;
}
.search:hover { border-color: #c2c2b8; }
.search svg { width: 15px; height: 15px; flex: none; }
.search kbd { margin-left: auto; }
kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px; color: var(--ink-faint);
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--paper);
}
.topbar .spacer { flex: 1; }
.sync {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.sync.live .dot { background: var(--spring-500); box-shadow: 0 0 0 3px var(--spring-100); }
.sync.stale .dot { background: #e19a1f; }
.sync.down { color: var(--bad); border-color: #f1c3c3; background: var(--bad-bg); }
.sync.down .dot { background: var(--bad); }
.sync.busy .dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.page { padding: 26px var(--gutter) 64px; display: grid; gap: 22px; width: 100%; max-width: 1360px; }
.page-head { display: flex; align-items: center; padding-bottom: 2px; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head > div:first-child { display: grid; gap: 4px; min-width: 0; }
.title { margin: 0; font-weight: 800; font-variation-settings: 'wdth' 108; font-stretch: 108%; font-size: 24px; letter-spacing: -0.015em; line-height: 1.15; }
.meta { margin: 0; color: var(--ink-faint); font-size: 13px; }
.page-head .lede { margin: 0; color: var(--ink-soft); max-width: 62ch; font-size: 14.5px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Lab grid behind the page, like the site's hero */
.main::before {
  content: ''; position: fixed; inset: 0 0 0 var(--side); z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgb(16 19 34 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(16 19 34 / 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0, transparent 520px);
}

/* ── Surfaces ───────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px rgb(16 19 34 / 0.03); min-width: 0; }
.card-pad { padding: 18px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px 0; flex-wrap: wrap; }
.card-head .h2 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--ink-faint); }
.card-body { padding: 14px 18px 18px; }
.card.carbon {
  background-color: var(--carbon); color: #fff; border-color: var(--line-dark);
  background-image:
    repeating-linear-gradient(45deg, rgb(255 255 255 / 0.035) 0 1.5px, transparent 1.5px 7px),
    repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.025) 0 1.5px, transparent 1.5px 7px);
}
.card.midnight { background: var(--midnight); color: #fff; border-color: #2c2463; }
.card.carbon .muted, .card.midnight .muted { color: rgb(255 255 255 / 0.58); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 15px 16px 14px; display: grid; gap: 7px; align-content: start; }
.kpi .label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.kpi.carbon .label { color: rgb(255 255 255 / 0.55); }
.kpi .value { font-family: var(--mono); font-weight: 600; font-size: 27px; letter-spacing: -0.04em; line-height: 1; font-feature-settings: 'tnum' 1; }
.kpi .value small { font-size: 14px; letter-spacing: 0; color: var(--ink-faint); font-weight: 500; margin-left: 2px; }
.kpi.carbon .value small { color: rgb(255 255 255 / 0.5); }
.kpi .foot { font-size: 12px; color: var(--ink-faint); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi.carbon .foot { color: rgb(255 255 255 / 0.6); }
.delta { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.delta.up { color: var(--ok); background: var(--ok-bg); }
.delta.down { color: var(--bad); background: var(--bad-bg); }
.delta.flat { color: var(--ink-faint); background: var(--paper); }

/* ── Buttons & inputs ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 13px; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: background-color 120ms, border-color 120ms, transform 120ms;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--spring-500); color: var(--ink); }
.btn-primary:hover { background: var(--spring-400); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--carbon-2); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: #b9b9ae; }
.btn-quiet { background: transparent; color: var(--ink-soft); padding: 0 9px; }
.btn-quiet:hover { background: rgb(16 19 34 / 0.05); color: var(--ink); }
.btn-danger { background: var(--card); border-color: #efc4c4; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }
[data-dark] .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.25); }

.field { display: grid; gap: 5px; min-width: 0; }
.field > span, .field > label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.field small { font-size: 11.5px; color: var(--ink-faint); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-width: 0; height: 36px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--card); font-size: 13.5px;
}
textarea.input { height: auto; min-height: 88px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(16 19 34 / 0.08); }
.input.mono { font-family: var(--mono); }
.input-sm { height: 30px; font-size: 12.5px; padding: 0 9px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--spring-700); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: rgb(16 19 34 / 0.05); border-radius: 9px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.seg button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgb(16 19 34 / 0.1); }
.seg button .n { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }

/* ── Chips / pills ──────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap;
}
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.chip.dark { background: var(--ink); color: #fff; border-color: transparent; }
.chip.spring { background: var(--spring-500); color: var(--ink); border-color: transparent; }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: rgb(16 19 34 / 0.05); color: var(--ink-soft); white-space: nowrap; }
.plat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.plat i { width: 8px; height: 8px; border-radius: 2px; background: var(--other); flex: none; }
.plat.instagram i { background: var(--ig); } .plat.tiktok i { background: var(--tt); } .plat.youtube i { background: var(--yt); } .plat.story i { background: var(--story); }

/* ── Lists & tables ─────────────────────────────────────────────────────── */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; overflow-wrap: anywhere; }
.li .s { font-size: 12.5px; color: var(--ink-faint); overflow-wrap: anywhere; }
.li.click { cursor: pointer; }
.li.click:hover { background: #fbfbf8; }
.empty { padding: 26px 18px; color: var(--ink-faint); text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 26px; height: 26px; opacity: 0.5; }
.empty strong { color: var(--ink); font-size: 14px; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th {
  text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfa;
}
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #fbfbf8; }
table.t .r { text-align: right; }
table.t td.num, table.t th.r { font-variant-numeric: tabular-nums; }
.cust { display: grid; gap: 1px; min-width: 140px; }
.cust b { font-weight: 600; }
.cust span { font-size: 12px; color: var(--ink-faint); }
tr.muted-row td { color: var(--ink-faint); }
tr.muted-row .cust b { text-decoration: line-through; text-decoration-color: var(--line-2); }

/* ── Size board (Stock) ─────────────────────────────────────────────────── */
.sizes { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 12px; }
.size {
  position: relative; padding: 14px 14px 13px; display: grid; gap: 11px; overflow: hidden;
  border-top: 3px solid var(--line-2);
}
.size.ok { border-top-color: var(--spring-500); }
.size.low { border-top-color: #e6a23c; }
.size.out { border-top-color: var(--bad); }
.size .eu { display: grid; gap: 1px; }
.size .eu b { font-weight: 850; font-variation-settings: 'wdth' 118; font-stretch: 118%; font-size: 19px; letter-spacing: -0.01em; }
.size .eu span { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.size .n { font-family: var(--mono); font-weight: 600; font-size: 40px; line-height: 0.9; letter-spacing: -0.05em; }
.size.out .n { color: var(--bad); }
.size.low .n { color: var(--warn); }
.size .n small { font-size: 12px; color: var(--ink-faint); letter-spacing: 0; font-weight: 500; margin-left: 4px; }
.meter { height: 6px; border-radius: 3px; background: #efefe9; overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 3px; }
.size.ok .meter i { background: var(--spring-500); }
.size.low .meter i { background: #e6a23c; }
.size.out .meter i { background: var(--bad); }
.meter u { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--voltage-soft) 0 3px, transparent 3px 5px); opacity: 0.6; text-decoration: none; }
.size .facts { display: grid; gap: 3px; font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono); }
.size .facts span { display: flex; justify-content: space-between; gap: 6px; }
.size .facts b { color: var(--ink-soft); font-weight: 600; }

/* Mini size bars (Today) */
.minisizes { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 8px; align-items: end; }
.ms { display: grid; gap: 6px; justify-items: center; }
.ms .col { width: 100%; height: 86px; border-radius: 6px; background: rgb(255 255 255 / 0.06); position: relative; overflow: hidden; }
.ms .col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--spring-500); border-radius: 6px 6px 0 0; }
.ms.low .col i { background: #f2b544; }
.ms.out .col i { background: #f07178; }
.ms b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.ms span { font-family: var(--mono); font-size: 10.5px; color: rgb(255 255 255 / 0.55); }

/* ── Attention list ─────────────────────────────────────────────────────── */
.alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line);
}
.alert:first-child { border-top: 0; }
.alert .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--paper); color: var(--ink-soft); }
.alert .ic svg { width: 15px; height: 15px; }
.alert.bad .ic { background: var(--bad-bg); color: var(--bad); }
.alert.warn .ic { background: var(--warn-bg); color: var(--warn); }
.alert.ok .ic { background: var(--ok-bg); color: var(--ok); }
.alert.info .ic { background: var(--info-bg); color: var(--info); }
.alert .grow { flex: 1; min-width: 0; }
.alert .t { font-weight: 650; font-weight: 600; }
.alert .s { font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; overflow-wrap: anywhere; }
.alert .act { display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }

/* ── Charts ─────────────────────────────────────────────────────────────── */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { font-family: var(--mono); font-size: 10px; fill: var(--ink-faint); }
.chart .bar { fill: var(--ink); }
.chart .bar.accent { fill: var(--spring-500); }
.chart .bar.ghost { fill: #e8e8e1; }
.chart .line { fill: none; stroke: var(--spring-700); stroke-width: 2; }
.chart .area { fill: url(#hqArea); }
.chart .dot { fill: var(--spring-700); stroke: #fff; stroke-width: 2; }
.chart .lbl { font-family: var(--mono); font-size: 10.5px; font-weight: 600; fill: var(--ink); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-faint); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; }
.hbar .track { height: 8px; border-radius: 4px; background: #efefe9; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 4px; background: var(--ink); }
.hbar .track i.accent { background: var(--spring-500); }
.hbar .v { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.hbar .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.ring { --p: 0; width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--spring-500) calc(var(--p) * 1%), #ececE5 0); }
.ring::after { content: attr(data-label); width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; }

/* ── Content calendar ───────────────────────────────────────────────────── */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { min-height: 176px; padding: 10px; display: flex; flex-direction: column; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.day.today { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--spring-500); }
.day.past { background: #fbfbf9; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; }
.day-h b { font-weight: 800; font-size: 13px; font-variation-settings: 'wdth' 112; font-stretch: 112%; }
.day-h span { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.day .add { margin-top: auto; opacity: 0; transition: opacity 120ms; }
.day:hover .add, .day:focus-within .add { opacity: 1; }
.post {
  border-radius: 8px; padding: 7px 8px; background: var(--paper); border: 1px solid var(--line); cursor: pointer;
  display: grid; gap: 3px; font-size: 12px; text-align: left; width: 100%; min-width: 0;
  border-left: 3px solid var(--other);
}
.post.instagram { border-left-color: var(--ig); } .post.tiktok { border-left-color: var(--tt); } .post.youtube { border-left-color: var(--yt); } .post.story { border-left-color: var(--story); }
.post b { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post .meta { display: flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 11px; }
.post.posted { background: var(--ok-bg); border-color: #cdeedb; }
.post.posted b::before { content: '✓ '; color: var(--ok); }
.post.overdue { background: var(--warn-bg); border-color: #f5ddb2; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); gap: 1px; }
.mcell { background: var(--card); min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.mcell.other { background: #fafaf7; color: var(--ink-faint); }
.mcell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.mcell .dn { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.mcell .pill { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--paper); border-left: 3px solid var(--other); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mcell .pill.instagram { border-left-color: var(--ig); } .mcell .pill.tiktok { border-left-color: var(--tt); } .mcell .pill.youtube { border-left-color: var(--yt); } .mcell .pill.story { border-left-color: var(--story); }
.mcell .pill.posted { background: var(--ok-bg); }
.mhead { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.mhead span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); padding: 0 6px 6px; }
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.target { padding: 12px 14px; display: grid; gap: 8px; }
.target .row b { font-family: var(--mono); font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.pips { display: flex; gap: 4px; }
.pips i { height: 6px; flex: 1; border-radius: 3px; background: #ececE5; }
.pips i.on { background: var(--spring-500); }

/* ── Kanban ─────────────────────────────────────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lane { background: rgb(16 19 34 / 0.035); border-radius: 12px; padding: 10px; display: grid; gap: 8px; min-height: 220px; align-content: start; transition: background-color 120ms; }
.lane.drop { background: var(--spring-50); box-shadow: inset 0 0 0 2px var(--spring-400); }
.lane-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px; }
.lane-h .h3 { display: flex; gap: 8px; align-items: center; }
.lane-h .n { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.task {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: grid; gap: 8px; cursor: grab;
  box-shadow: 0 1px 2px rgb(16 19 34 / 0.04); text-align: left;
}
.task:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.task.dragging { opacity: 0.4; }
.task .tt { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.task.done .tt { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-faint); }
.prio { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--line-2); }
.prio.high { background: var(--bad); } .prio.medium { background: #e6a23c; } .prio.low { background: var(--line-2); }
.due { font-family: var(--mono); font-size: 11px; }
.due.over { color: var(--bad); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }

/* ── Creators ───────────────────────────────────────────────────────────── */
.person { --h: 200; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px; letter-spacing: 0.02em; background: hsl(var(--h) 45% 92%); color: hsl(var(--h) 45% 28%); }
.creator-deal { margin: 0; padding: 0 16px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.creator-progress { display: grid; gap: 6px; padding: 0 16px 10px; }
.creator-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-faint); }
.creator-facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.creator-facts .warn b { color: var(--warn); }
.creator-note { margin: 0; padding: 8px 16px 10px; font-size: 12.5px; color: var(--ink-soft); background: #fbfbf8; border-top: 1px solid var(--line); }
.creator-foot { display: flex; align-items: center; gap: 6px; padding: 9px 12px 9px 16px; border-top: 1px solid var(--line); }
.creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.creator { display: grid; gap: 0; }
.creator-top { padding: 16px 16px 12px; display: flex; gap: 12px; align-items: flex-start; }
.creator-top .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.creator .monogram {
  width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-weight: 900; font-variation-settings: 'wdth' 122; font-stretch: 122%; font-size: 15px; color: #fff; background: var(--midnight);
}
.creator .monogram.team { background: var(--carbon); }
.creator .monogram.athlete { background: var(--voltage); }
.deliv { display: grid; border-top: 1px solid var(--line); }
.deliv label { display: flex; align-items: center; gap: 9px; padding: 8px 16px; font-size: 13px; border-top: 1px solid var(--line); cursor: pointer; }
.deliv label:first-child { border-top: 0; }
.deliv label.done span { color: var(--ink-faint); text-decoration: line-through; }
.deliv input { accent-color: var(--spring-700); width: 15px; height: 15px; }
.creator-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.creator-stats div { padding: 10px 14px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.creator-stats div:first-child { border-left: 0; }
.creator-stats b { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.creator-stats span { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Notes (prose) ──────────────────────────────────────────────────────── */
.notes-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.prose { color: var(--ink-soft); line-height: 1.7; font-size: 14.5px; max-width: 72ch; overflow-wrap: anywhere; }
.prose h2 { color: var(--ink); font-weight: 800; font-variation-settings: 'wdth' 112; font-stretch: 112%; font-size: 18px; margin: 22px 0 6px; }
.prose h3 { color: var(--ink); font-size: 15px; margin: 18px 0 4px; }
.prose p { margin: 8px 0; }
.prose ul, .prose ol { margin: 8px 0; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--mono); font-size: 12.5px; background: var(--paper); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.prose a { color: var(--ink); text-decoration-color: var(--spring-500); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose > :first-child { margin-top: 0; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.link {
  display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; min-width: 0;
}
.link:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.link .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--paper); display: grid; place-items: center; flex: none; }
.link .ic svg { width: 15px; height: 15px; }
.link b { display: block; font-size: 13px; }
.link span { display: block; font-size: 11.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link > div { min-width: 0; }

/* ── Activity feed ──────────────────────────────────────────────────────── */
.feed { display: grid; }
.ev { display: flex; gap: 10px; padding: 9px 18px; font-size: 13px; align-items: flex-start; }
.ev .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ev time { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.ev b { font-weight: 600; }
.ev .sysdot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--spring-400); flex: none; }
.ev .sysdot svg { width: 12px; height: 12px; }

/* ── Production run stepper ─────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.step { display: grid; gap: 6px; justify-items: start; position: relative; padding-top: 18px; font-size: 12px; color: var(--ink-faint); }
.step::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line); }
.step::after { content: ''; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); }
.step.done::before { background: var(--spring-500); }
.step.done::after { background: var(--spring-500); border-color: var(--spring-500); }
.step.now::after { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 4px var(--spring-100); }
.step.now { color: var(--ink); font-weight: 600; }
.step:last-child::before { right: auto; width: 12px; }
.run { display: grid; gap: 14px; }
.run-hero { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 16px; align-items: center; }
.run-hero img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 6px; }
.split div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; display: grid; gap: 2px; text-align: center; background: #fcfcfa; }
.split b { font-family: var(--mono); font-weight: 600; font-size: 16px; }
.split span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }

/* Order drawer details */
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; margin: 0; }
.dl dt { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 2px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.address { font-size: 14px; line-height: 1.55; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 10px; background: #fcfcfa; position: relative; white-space: pre-line; }
.address .btn { position: absolute; top: 8px; right: 8px; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.tl i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--card); margin-top: 5px; position: relative; }
.tl:not(:last-child) i::after { content: ''; position: absolute; left: 2px; top: 10px; width: 2px; height: 26px; background: var(--line); }
.tl.done i { background: var(--spring-500); border-color: var(--spring-500); }
.tl div { padding-bottom: 14px; }
.tl small { display: block; color: var(--ink-faint); font-size: 12px; }

/* ── Overlays: modal, drawer, palette, toast ────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(10 12 16 / 0.38); backdrop-filter: blur(2px); display: flex; animation: fade 140ms ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-float); animation: rise 160ms cubic-bezier(.2,.7,.3,1);
}
.modal.wide { width: min(780px, calc(100vw - 24px)); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 4px; }
.modal-h > div { display: grid; gap: 6px; }
.modal-b { padding: 14px 20px 6px; display: grid; gap: 14px; }
.modal-f { display: flex; justify-content: space-between; gap: 8px; padding: 14px 20px 18px; flex-wrap: wrap; }
.modal-f .right { display: flex; gap: 8px; margin-left: auto; }
.drawer {
  margin-left: auto; width: min(560px, 100vw); height: 100%; background: var(--card); overflow-y: auto;
  box-shadow: var(--shadow-float); animation: slide 180ms cubic-bezier(.2,.7,.3,1); display: flex; flex-direction: column;
}
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-h { position: sticky; top: 0; background: var(--card); z-index: 1; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-b { padding: 18px 20px 28px; display: grid; gap: 18px; }
.drawer section { display: grid; gap: 10px; }

.palette { margin: 12vh auto auto; width: min(620px, calc(100vw - 24px)); background: var(--card); border-radius: 14px; box-shadow: var(--shadow-float); overflow: hidden; animation: rise 140ms ease; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); height: 54px; padding: 0 18px; font-size: 16px; outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.palette li svg { width: 16px; height: 16px; color: var(--ink-faint); flex: none; }
.palette li small { margin-left: auto; color: var(--ink-faint); font-family: var(--mono); font-size: 11px; }
.palette li[aria-selected='true'] { background: var(--paper); box-shadow: inset 2px 0 0 var(--spring-500); }
.palette .grp { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 12px 4px; }

.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-float); animation: rise 160ms ease;
}
.toast svg { width: 15px; height: 15px; color: var(--spring-400); }
.toast.err svg { color: #ff8a8a; }
.toast button { background: none; border: 0; color: var(--spring-400); font-weight: 700; cursor: pointer; padding: 0 0 0 6px; }

.banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; font-size: 13px;
  background: var(--warn-bg); color: #6b3d00; border: 1px solid #f3d9a8; flex-wrap: wrap;
}
.banner.bad { background: var(--bad-bg); color: #7d1a1e; border-color: #f2c5c5; }
.banner.info { background: var(--info-bg); color: #262a85; border-color: #d6d4f6; }
.banner svg { width: 16px; height: 16px; flex: none; }
.banner .grow { flex: 1; min-width: 200px; }

/* Hero (Today) */
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 380px);
  gap: 10px; align-items: center; padding: 26px 26px 24px;
}
.hero .copy { display: grid; gap: 12px; position: relative; z-index: 1; }
.hero .brief { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 60ch; line-height: 1.55; }
.hero .brief b { color: var(--ink); }
.hero figure { margin: -10px -10px -18px 0; position: relative; }
.hero figure img { width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgb(16 19 34 / 0.18)); }
.callout { position: absolute; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; box-shadow: var(--shadow-lift); white-space: nowrap; }
.callout b { color: var(--spring-700); font-weight: 600; margin-right: 4px; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; }

/* Gate (signed-out pages) */
body.gate { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.gate-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow-float); display: grid; gap: 12px; }
.gate-card h1 { margin: 0; font-weight: 850; font-variation-settings: 'wdth' 120; font-stretch: 120%; font-size: 26px; letter-spacing: -0.02em; }
.gate-card p { margin: 0; color: var(--ink-soft); }
.gate-card img { height: 26px; width: auto; margin-bottom: 8px; }
.gate-card code { font-family: var(--mono); font-size: 12px; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.gate-form { display: grid; gap: 12px; margin-top: 4px; }
.gate-form .banner { margin: 0; }
.gate-foot { font-size: 12.5px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px !important; }

/* Boot splash */
.splash { min-height: 100vh; display: grid; place-items: center; background: var(--carbon); color: #fff; }
.splash div { display: grid; gap: 14px; justify-items: center; }
.splash img { height: 26px; width: auto; }
.splash .bar { width: 140px; height: 2px; background: var(--line-dark); overflow: hidden; border-radius: 2px; }
.splash .bar i { display: block; width: 40%; height: 100%; background: var(--spring-500); animation: load 1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Mobile tab bar */
.tabbar { display: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g-main, .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main::before { inset: 0; }
  .topbar .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .topbar .mobile-brand img { height: 18px; width: auto; }
  .search { max-width: none; }
  .search .label, .search kbd { display: none; }
  .search { flex: 0 0 36px; width: 36px; padding: 0; justify-content: center; }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    background: var(--carbon); border-top: 1px solid var(--line-dark); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; gap: 3px; padding: 6px 2px; color: rgb(255 255 255 / 0.6); text-decoration: none;
    font-size: 10.5px; font-weight: 600; background: none; border: 0; position: relative;
  }
  .tabbar svg { width: 20px; height: 20px; }
  .tabbar [aria-current='page'] { color: #fff; }
  .tabbar [aria-current='page']::before { content: ''; position: absolute; top: -6px; left: 30%; right: 30%; height: 2px; background: var(--spring-500); border-radius: 2px; }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 18px); background: var(--spring-500); color: var(--carbon); font-family: var(--mono); font-size: 9.5px; font-weight: 700; border-radius: 999px; padding: 0 5px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: minmax(0, 1fr); }
  .day { min-height: 0; }
  .day .add { opacity: 1; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .hero figure { margin: 0 -6px -12px; max-width: 340px; }
  .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:first-child { grid-column: 1 / -1; }
  .sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .g4, .fields, .fields.three { grid-template-columns: minmax(0, 1fr); }
  .fields.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .run-hero { grid-template-columns: minmax(0, 1fr); }
  .run-hero img { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .hide-sm { display: none !important; }
  .sync .txt { display: none; }
  .modal { margin: auto 0 0; width: 100vw; border-radius: 14px 14px 0 0; max-height: 92vh; }
  .mcell { min-height: 64px; }
  .mcell .pill { font-size: 0; padding: 0; height: 5px; border-left-width: 0; background: var(--other); }
  .mcell .pill.instagram { background: var(--ig); } .mcell .pill.tiktok { background: var(--tt); } .mcell .pill.youtube { background: var(--yt); }
}

@media print {
  .side, .topbar, .tabbar, .toasts, .no-print { display: none !important; }
  .app { display: block; }
  .main::before { display: none; }
  body { background: #fff; }
  .page { padding: 0; }
}
.print-only { display: none; }
@media print {
  body.printing > *:not(.print-only) { display: none !important; }
  body.printing .print-only { display: block; }
  .slip { page-break-after: always; padding: 28px; font-size: 14px; }
  .slip h2 { font-size: 22px; margin: 6px 0 16px; }
  .slip .addr { font-size: 18px; line-height: 1.5; border: 2px solid #000; padding: 16px; border-radius: 8px; margin: 14px 0; white-space: pre-line; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
