/* ============================================================================
   JC OS — design system (v0.3)

   Shares its visual language with ifnotnow, so the two can sit side by side:
   a cool grey canvas, white panels with a soft shadow, one cyan accent with a
   violet second, tight heavy numerals under small uppercase labels, pill tags,
   and a dark teal-lit sign-in. Light by default; dark is a chosen set of steps,
   not an inversion.

   Colour still carries meaning only. Cyan is for marks and fills; text that has
   to be read on white uses --accent-text, which clears contrast.
   ========================================================================== */

:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* canvas & surfaces */
  --bg: #F4F6FA;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FAFBFE;
  --surface-3: #EDF0F6;
  --hover: #F3FCFD;
  --input: #FCFCFD;
  --rule: #E6E9F2;
  --rule-strong: #D3D9E6;

  /* ink */
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #6B7280;
  --ink-4: #9AA3B2;

  /* accent */
  --accent: #25CDD6;
  --accent-ink: #0B1215;
  --accent-text: #0A7C85;
  --accent-soft: rgba(37, 205, 214, 0.14);
  --accent-ring: rgba(37, 205, 214, 0.22);
  --accent-2: #5B4CF5;

  /* semantic */
  --green: #0E8A5F;  --green-soft: #E8F6EF;
  --amber: #A8620A;  --amber-soft: #FDF3E1;
  --orange: #B4530A; --orange-soft: #FDF0E5;
  --red: #B3261E;    --red-soft: #FDF1F0;
  --blue: #2159C9;   --blue-soft: #EAF1FE;
  --teal: #0A7C85;   --teal-soft: #E3F8FA;
  --violet: #5B4CF5; --violet-soft: #EEF0FF;
  --slate: #566175;  --slate-soft: #EEF1F6;

  /* charts: validated for colour-blind separation and contrast on --surface */
  --series-1: #0E9AA7;
  --series-2: #5B4CF5;
  --series-3: #C2620E;
  --grid: #E6E9F2;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.07), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lift: 0 4px 14px rgba(16, 24, 40, 0.09);
  --shadow-pop: 0 18px 44px rgba(16, 24, 40, 0.18);
  --sidebar-w: 236px;
  --gutter: 28px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 0.14s;
  --slow: 0.22s;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0D1114;
  --bg-elev: #12181C;
  --surface: #151C21;
  --surface-2: #1A2329;
  --surface-3: #222D35;
  --hover: #17262B;
  --input: #10161A;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-strong: rgba(255, 255, 255, 0.16);
  --ink: #EEF3F6;
  --ink-2: #BAC6CE;
  --ink-3: #8696A2;
  --ink-4: #586672;
  --accent: #25CDD6;
  --accent-ink: #0B1215;
  --accent-text: #56DCE4;
  --accent-soft: rgba(37, 205, 214, 0.16);
  --accent-ring: rgba(37, 205, 214, 0.3);
  --accent-2: #8F84FF;
  --green: #4CC79A;  --green-soft: rgba(76, 199, 154, 0.15);
  --amber: #E5AE55;  --amber-soft: rgba(229, 174, 85, 0.15);
  --orange: #F0934F; --orange-soft: rgba(240, 147, 79, 0.15);
  --red: #F0776F;    --red-soft: rgba(240, 119, 111, 0.15);
  --blue: #7FA8F5;   --blue-soft: rgba(127, 168, 245, 0.15);
  --teal: #56DCE4;   --teal-soft: rgba(86, 220, 228, 0.14);
  --violet: #A59CFF; --violet-soft: rgba(165, 156, 255, 0.16);
  --slate: #98A6B5;  --slate-soft: rgba(152, 166, 181, 0.16);
  --series-1: #19A8B2;
  --series-2: #7568E6;
  --series-3: #D4742B;
  --grid: rgba(255, 255, 255, 0.09);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color var(--fast) var(--ease), opacity var(--fast) var(--ease); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: rgba(37, 205, 214, 0.18); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code, .mono { font-family: var(--font-mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

@keyframes rise { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .btn:hover, .card.is-link:hover, .kcard:hover, .cat:hover, .icon-btn:hover { transform: none !important; }
}

/* ---------------------------------------------------------------- typography */

.display { font-weight: 750; letter-spacing: -0.03em !important; line-height: 1.05; text-transform: none !important; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

/* ---------------------------------------------------------------- shell */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 0 14px 16px;
  border-right: 1px solid var(--rule);
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; height: 64px; padding: 0 8px; border-bottom: 1px solid var(--rule); margin: 0 -14px; padding-left: 22px; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: #000; display: grid; place-items: center; flex: none; }
.brand-mark svg { display: block; }
.brand-name { font-weight: 800; letter-spacing: -0.03em; font-size: 17px; line-height: 1; color: var(--ink); text-transform: lowercase; }
.brand-name i { font-style: normal; color: var(--accent); }
.brand-sub { color: var(--ink-3); font-size: 9.5px; letter-spacing: 0.15em; font-weight: 600; margin-top: 4px; text-transform: uppercase; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { padding-top: 12px; border-top: 1px solid var(--rule); }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px; color: var(--ink-3); font-weight: 600; font-size: 13.5px;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); flex: none; transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.nav-item > span:first-child { flex: 1; min-width: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--hover); color: var(--ink); }
.nav-item.is-active::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-item .kbd-hint { opacity: 0; transition: opacity var(--fast); }
.nav-item:hover .kbd-hint { opacity: 1; }
.nav-count { font-size: 10.5px; font-weight: 700; color: var(--ink-3); min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); }
.nav-count.is-alert { color: var(--orange); background: var(--orange-soft); }
.sidebar-foot { margin-top: auto; padding: 10px 10px 0; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 12px; display: flex; flex-direction: column; gap: 6px; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.topbar-title { font-weight: 650; font-size: 15px; display: flex; align-items: baseline; gap: 8px; letter-spacing: -0.01em; min-width: 0; }
.topbar-title .crumb { color: var(--ink-3); font-weight: 500; }
.topbar-spacer { flex: 1; }
.search-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 12px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--bg); color: var(--ink-3);
  min-width: 280px; cursor: text; text-align: left;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.search-btn:hover { border-color: var(--accent); background: var(--hover); color: var(--ink-2); }
.kbd { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 5px; border-radius: 5px; border: 1px solid var(--rule); color: var(--ink-3); background: var(--surface); line-height: 1.2; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); cursor: pointer; position: relative;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--accent); background: var(--hover); transform: translateY(-1px); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--surface); }

.page { padding: 28px var(--gutter) 80px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.1; }
.page-head .lede { color: var(--ink-3); margin-top: 6px; max-width: 72ch; font-size: 13.5px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- tabs, filters */

.tabs {
  display: inline-flex; gap: 2px; max-width: 100%; overflow-x: auto;
  background: var(--surface-3); border: 1px solid var(--rule); border-radius: 11px; padding: 3px; margin-bottom: 20px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 7px 13px; border-radius: 8px; color: var(--ink-3); white-space: nowrap; font-weight: 600; font-size: 13px; line-height: 1.2;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.tab:hover { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06); }
.tab.is-active, .tab.is-active:hover { background: var(--ink); color: var(--bg-elev); box-shadow: none; }
.tab .count { margin-left: 7px; font-size: 11px; font-weight: 700; opacity: 0.6; font-variant-numeric: tabular-nums; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); font-size: 12px; font-weight: 600;
  background: var(--surface); cursor: pointer; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.pill:hover { border-color: var(--accent); background: var(--hover); color: var(--ink); }
.pill.is-active { background: var(--ink); color: var(--bg-elev); border-color: var(--ink); }

/* ---------------------------------------------------------------- grid & cards */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-9 { grid-column: span 9; } .span-12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 6px; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 28px; }
.mb { margin-bottom: 16px; } .mb-sm { margin-bottom: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card.is-quiet { background: transparent; box-shadow: none; }
.card.is-accent { background: linear-gradient(135deg, rgba(37, 205, 214, 0.13), rgba(91, 76, 245, 0.09)), var(--surface); }
.card.is-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.card-head .more { color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
.card-head .more:hover { color: var(--ink); }
.card-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { font-size: 15px; font-weight: 650; color: var(--ink); }
.section-title .hint { color: var(--ink-3); font-size: 12.5px; }

/* stat tiles: small uppercase label over a heavy figure */
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; min-width: 0; }
.stat .value { font-size: 28px; font-weight: 750; letter-spacing: -0.025em; line-height: 1; }
.stat .value.is-small { font-size: 20px; }
.stat .label { color: var(--ink-3); font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.stat.is-muted .value { color: var(--ink-3); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 18px 16px; }

/* joined figures: one panel, hairlines between */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.kpi { padding: 18px 20px; border-right: 1px solid var(--rule); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi.is-lead { background: linear-gradient(135deg, rgba(37, 205, 214, 0.13), rgba(91, 76, 245, 0.09)); }
.kpi .k { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.kpi .v { font-size: 30px; font-weight: 750; letter-spacing: -0.025em; margin-top: 7px; line-height: 1; white-space: nowrap; }
.kpi.is-lead .v { font-size: 48px; letter-spacing: -0.035em; }
.kpi .d { font-size: 12px; margin-top: 8px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.kpi .meter { height: 5px; border-radius: 3px; background: var(--teal-soft); overflow: hidden; margin-top: 10px; }
.kpi .meter > i { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }
.delta { font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.delta.is-up { color: var(--green); } .delta.is-down { color: var(--red); } .delta.is-flat { color: var(--ink-3); }

/* ---------------------------------------------------------------- badges & dots */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; line-height: 1.5;
  background: var(--surface-3); color: var(--ink-3); border: 1px solid transparent;
}
.badge.is-outline { background: transparent; border-color: var(--rule-strong); }
.badge.t-neutral { background: var(--surface-3); color: var(--ink-2); }
.badge.t-muted { background: transparent; color: var(--ink-3); border-color: var(--rule); }
.badge.t-accent { background: var(--teal-soft); color: var(--accent-text); }
.badge.t-green { background: var(--green-soft); color: var(--green); }
.badge.t-amber { background: var(--amber-soft); color: var(--amber); }
.badge.t-orange { background: var(--orange-soft); color: var(--orange); }
.badge.t-red { background: var(--red-soft); color: var(--red); }
.badge.t-blue { background: var(--blue-soft); color: var(--blue); }
.badge.t-teal { background: var(--teal-soft); color: var(--teal); }
.badge.t-violet { background: var(--violet-soft); color: var(--violet); }
.badge.t-slate { background: var(--slate-soft); color: var(--slate); }
.badge.is-outline.t-accent, .badge.is-outline.t-teal { background: transparent; border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
.badge.is-outline.t-green { background: transparent; border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.badge.is-outline.t-amber { background: transparent; border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.badge.is-outline.t-red { background: transparent; border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.badge.is-outline.t-slate, .badge.is-outline.t-muted { background: transparent; border-color: var(--rule-strong); }
.badge.is-demo { background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 8px); color: var(--ink-3); border-color: var(--rule-strong); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.t-green { background: var(--green); } .dot.t-amber { background: var(--amber); } .dot.t-orange { background: var(--orange); } .dot.t-red { background: var(--red); } .dot.t-slate { background: var(--slate); } .dot.t-blue { background: var(--blue); } .dot.t-accent { background: var(--accent); } .dot.t-teal { background: var(--teal); } .dot.t-violet { background: var(--violet); } .dot.t-muted { background: var(--ink-4); } .dot.t-neutral { background: var(--ink-3); }
.dot.is-hollow { background: transparent; border: 1.5px solid currentColor; }

.lane-bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--ink-4); flex: none; }
.lane-bar.t-accent { background: var(--accent); } .lane-bar.t-teal { background: var(--accent-2); } .lane-bar.t-muted { background: var(--rule-strong); }

.tone-green { color: var(--green); } .tone-amber { color: var(--amber); } .tone-orange { color: var(--orange); } .tone-red { color: var(--red); } .tone-blue { color: var(--blue); } .tone-teal { color: var(--teal); } .tone-accent { color: var(--accent-text); } .tone-slate { color: var(--slate); } .tone-violet { color: var(--violet); } .tone-muted { color: var(--ink-3); } .tone-neutral { color: var(--ink-2); }

/* ---------------------------------------------------------------- lists & rows */

.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--rule); }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.item.is-link { cursor: pointer; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 9px; transition: background var(--fast) var(--ease); }
.item.is-link:hover { background: var(--hover); }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .title { font-weight: 600; }
.item .sub { color: var(--ink-3); font-size: 12.5px; }
.item .meta { color: var(--ink-3); font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.item.is-done .title { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.list.is-dense .item { padding: 6px 0; }

.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--rule-strong); border-radius: var(--radius-lg); background: var(--surface-2); }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 650; font-size: 14.5px; }
.empty a { color: var(--accent-text); font-weight: 600; }

/* attention items */
.attn { display: flex; gap: 12px; padding: 12px 0; align-items: flex-start; }
.attn .sev { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }
.attn .sev.t-amber { background: var(--amber); } .attn .sev.t-orange { background: var(--orange); } .attn .sev.t-red { background: var(--red); } .attn .sev.t-blue { background: var(--blue); }
.attn .body { flex: 1; min-width: 0; }
.attn .title { font-weight: 600; }
.attn .sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.attn .actions { display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 700; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--fast) var(--ease); }
.table tbody tr:hover td { background: var(--hover); }
.table tr.is-link { cursor: pointer; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-title { font-weight: 600; }
.table .cell-title a:hover { color: var(--accent-text); }
.table td .bar-cell { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.table td .bar-cell .track { width: 96px; height: 6px; border-radius: 3px; background: var(--teal-soft); overflow: hidden; flex: none; }
.table td .bar-cell .track > i { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }

/* ---------------------------------------------------------------- kanban */

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board.is-wide { grid-auto-columns: minmax(230px, 1fr); }
.col { background: var(--surface-3); border: 1px solid var(--rule); border-radius: 14px; min-height: 140px; display: flex; flex-direction: column; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.col-head .count { color: var(--ink-3); font-weight: 700; background: var(--surface); border-radius: 999px; padding: 1px 7px; letter-spacing: 0; }
.col-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; flex: 1; }
.col.is-over { border-color: var(--accent); background: var(--hover); box-shadow: 0 0 0 3px var(--accent-soft); }
.kcard {
  display: flex; gap: 10px; padding: 11px 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--rule); cursor: grab;
  box-shadow: var(--shadow); transition: transform var(--slow) var(--ease), border-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}
.kcard:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); transform: translateY(-1px); }
.kcard.is-dragging { opacity: 0.5; }
.kcard .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kcard .title { font-weight: 600; line-height: 1.3; }
.kcard .sub { color: var(--ink-3); font-size: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kcard.is-demo { border-style: dashed; box-shadow: none; }

/* ---------------------------------------------------------------- readiness */

.readiness { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 12px; }
.ready { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ready .bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ready .bar > span { display: block; height: 100%; background: var(--series-1); border-radius: 3px; transition: width var(--slow) var(--ease); }
.ready.is-full .bar > span { background: var(--green); }
.ready.is-overdue .bar > span { background: var(--orange); }
.ready.is-blocked .bar > span { background: var(--red); }
.ready .lbl { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); display: flex; justify-content: space-between; gap: 4px; }
.ready .pct { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.readiness.is-compact { gap: 6px; grid-template-columns: repeat(10, 1fr); }
.readiness.is-compact .ready .lbl { display: none; }
.readiness.is-compact .ready .bar { height: 4px; }

.progress { height: 6px; border-radius: 3px; background: var(--teal-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--series-1); border-radius: 3px; transition: width var(--slow) var(--ease); }
.progress.t-green { background: var(--green-soft); } .progress.t-green > span { background: var(--green); }
.progress.t-amber { background: var(--amber-soft); } .progress.t-amber > span { background: var(--amber); }
.progress.t-neutral { background: var(--surface-3); } .progress.t-neutral > span { background: var(--ink-3); }

/* ---------------------------------------------------------------- release cards */

.release-card { display: flex; flex-direction: column; gap: 12px; }
.release-card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.release-card .name { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.release-card .date { display: flex; flex-direction: column; align-items: flex-end; }
.release-card .date .t { font-size: 24px; font-weight: 750; letter-spacing: -0.025em; line-height: 1; white-space: nowrap; }
.release-card .date .d { white-space: nowrap; }
.release-card .head > :first-child { min-width: 0; }
.release-card .date .d { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

/* ---------------------------------------------------------------- calendar */

.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.cal-month { border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); padding: 12px; min-height: 130px; display: flex; flex-direction: column; gap: 8px; }
.cal-month.is-current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.cal-month.is-empty { background: transparent; border-style: dashed; box-shadow: none; }
.cal-month .m { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.cal-month .gap { color: var(--ink-4); font-size: 12px; margin: auto 0; text-align: center; }
.cal-item { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; transition: background var(--fast) var(--ease); }
.cal-item:hover { background: var(--hover); }
.cal-item .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cal-item .day { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }
/* release confidence styling */
.conf { width: 9px; height: 9px; border-radius: 50%; flex: none; border: 1.5px solid var(--ink-3); }
.conf.IDEA { border-style: dotted; }
.conf.TARGET { border-style: solid; }
.conf.HELD { background: linear-gradient(90deg, var(--ink-2) 50%, transparent 50%); border-color: var(--ink-2); }
.conf.CONFIRMED { background: var(--accent); border-color: var(--accent); }
.conf.RELEASED { background: var(--green); border-color: var(--green); }
.conf.CANCELLED { border-color: var(--ink-4); }
.conf.CLUB-lane { border-radius: 2px; }

/* content calendar */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day-col { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); padding: 9px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.day-col.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.day-col .d { font-size: 10.5px; letter-spacing: 0.06em; font-weight: 700; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }

/* ---------------------------------------------------------------- key-value */

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; font-size: 13px; align-items: baseline; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; font-weight: 500; }
.kv.is-tight { gap: 5px 14px; }

/* ---------------------------------------------------------------- timeline */

.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.tl:first-child { border-top: none; }
.tl .dot { margin-top: 6px; background: var(--rule-strong); }
.tl .who { color: var(--ink-3); font-size: 12px; }
.tl .when { color: var(--ink-4); font-size: 12px; white-space: nowrap; }
.tl.is-meaningful .dot { background: var(--accent); }
.tl.is-sensitive .who::after { content: " · audit"; color: var(--ink-4); }

/* ---------------------------------------------------------------- forms */

.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.field .hint { color: var(--ink-3); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--rule-strong); background: var(--input); color: var(--ink);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--series-1); }

/* inline select (auto-submits) */
.inline-select { padding: 3px 24px 3px 9px; border-radius: 999px; border: 1px solid transparent; background-color: transparent; font-size: 12px; font-weight: 700; color: inherit; cursor: pointer; max-width: 100%; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.inline-select:hover { border-color: var(--accent); background-color: var(--hover); }
.inline-select.t-accent { color: var(--accent-text); } .inline-select.t-green { color: var(--green); } .inline-select.t-amber { color: var(--amber); } .inline-select.t-orange { color: var(--orange); } .inline-select.t-red { color: var(--red); } .inline-select.t-blue { color: var(--blue); } .inline-select.t-teal { color: var(--teal); } .inline-select.t-violet { color: var(--violet); } .inline-select.t-slate { color: var(--slate); } .inline-select.t-muted { color: var(--ink-3); } .inline-select.t-neutral { color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; line-height: 1.25;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { border-color: var(--accent); background: var(--hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.06s; }
.btn.is-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.is-primary:hover { background: var(--accent); filter: brightness(0.95); box-shadow: 0 3px 10px rgba(37, 205, 214, 0.28); }
.btn.is-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn.is-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--ink); transform: none; }
.btn.is-danger { color: var(--red); }
.btn.is-danger:hover { border-color: var(--red); background: var(--red); color: #fff; }
.btn.is-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.is-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 7px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.link { color: var(--accent-text); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }
.link-quiet { color: var(--ink-3); }
.link-quiet:hover { color: var(--ink); }

.inline-form { display: inline; }
.check-btn { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-4); background: transparent; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.check-btn:hover { border-color: var(--green); color: var(--green); }
.check-btn.is-done { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------------------------------------------------------------- dialogs / sheets */

dialog { border: none; padding: 0; background: transparent; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(13, 17, 20, 0.5); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw);
  background: var(--bg-elev); border-left: 1px solid var(--rule); box-shadow: var(--shadow-pop);
  padding: 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px;
  animation: sheet-in var(--slow) var(--ease);
}
@keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.palette {
  position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(640px, 92vw); background: var(--bg-elev); border: 1px solid var(--rule);
  border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden;
  animation: pal-in var(--fast) var(--ease);
}
@keyframes pal-in { from { transform: translate(-50%, -6px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.palette input { width: 100%; padding: 17px 20px; border: none; background: transparent; font-size: 16px; outline: none; border-bottom: 1px solid var(--rule); }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-group { padding: 10px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.pal-item.is-active, .pal-item:hover { background: var(--hover); }
.pal-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pal-item .s { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.pal-item .k { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; min-width: 72px; }
.pal-empty { padding: 20px; color: var(--ink-3); text-align: center; }
.pal-foot { padding: 9px 14px; border-top: 1px solid var(--rule); background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; display: flex; gap: 14px; }

/* quick add type chooser */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.type-grid button { padding: 9px 8px; border-radius: 9px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.type-grid button:hover { border-color: var(--accent); background: var(--hover); }
.type-grid button.is-active { border-color: var(--ink); color: var(--bg-elev); background: var(--ink); }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg-elev); padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-pop); z-index: 100; animation: pal-in var(--slow) var(--ease); }
.toast.is-error { background: var(--red); color: #fff; }

/* flash */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13px; font-weight: 500; border: 1px solid var(--rule); border-left: 3px solid var(--ink-4); background: var(--surface); box-shadow: var(--shadow); animation: rise var(--slow) var(--ease); }
.flash.is-error { border-left-color: var(--red); color: var(--red); }
.flash.is-ok { border-left-color: var(--green); }

/* ---------------------------------------------------------------- details / disclosure */

details.disclosure summary { cursor: pointer; list-style: none; color: var(--accent-text); font-size: 12.5px; font-weight: 600; padding: 6px 0; }
details.disclosure summary:hover { color: var(--ink); }
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform var(--fast) var(--ease); }
details.disclosure[open] summary::before { transform: rotate(90deg); }

/* ---------------------------------------------------------------- object header */

.obj-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.obj-head .eyebrow-row { display: flex; align-items: center; gap: 10px; }
.obj-head .eyebrow-row a.eyebrow:hover { color: var(--accent-text); }
.obj-head h1 { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.08; }
.obj-head .statuses { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.obj-head .statuses .sep { color: var(--ink-4); }
.health-line { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }

/* ---------------------------------------------------------------- artist hero, artwork */

.hero { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.hero .pic { width: 76px; height: 76px; border-radius: 50%; background: var(--surface-3) center / cover; flex: none; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16), 0 0 0 3px var(--surface); }
.hero h1 { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.hero .sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; color: var(--ink-3); font-size: 12.5px; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.chip.is-ink { background: var(--ink); color: var(--bg-elev); }
.chip.is-line { background: var(--surface); border: 1px solid var(--rule); }
a.chip:hover { background: var(--hover); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }

.art { border-radius: 8px; object-fit: cover; display: block; background: var(--surface-3); flex: none; }
.art.is-blank { display: block; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.cat { display: flex; flex-direction: column; gap: 3px; min-width: 0; border-radius: 12px; padding: 6px; margin: -6px; transition: background var(--slow) var(--ease), transform var(--slow) var(--ease); }
.cat:hover { background: var(--hover); transform: translateY(-2px); }
.cat img, .cat .ph { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; object-fit: cover; background: var(--surface-3); box-shadow: var(--shadow); margin-bottom: 5px; }
.cat .t { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .r { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- charts */

.chart { position: relative; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.chart-head h3 { font-size: 14.5px; font-weight: 650; }
.chart-head .now { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.chart-head .now b { color: var(--ink); font-weight: 700; font-size: 15px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-text { fill: var(--ink-3); font-size: 10.5px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.chart .end-text { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font-sans); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .wash { opacity: 0.1; }
.chart .end-dot { stroke: var(--surface); stroke-width: 2; }
.chart .s1 { stroke: var(--series-1); } .chart .f1 { fill: var(--series-1); }
.chart .s2 { stroke: var(--series-2); } .chart .f2 { fill: var(--series-2); }
.chart .s3 { stroke: var(--series-3); } .chart .f3 { fill: var(--series-3); }
.chart .cross { stroke: var(--ink-4); stroke-width: 1; opacity: 0; pointer-events: none; }
.chart .probe { opacity: 0; pointer-events: none; stroke: var(--surface); stroke-width: 2; }
.chart.is-hot .cross, .chart.is-hot .probe { opacity: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .col-hit { fill: transparent; }
.chart .col-hit:hover ~ .none { opacity: 1; }
.chart g.colgroup:hover rect.seg, .chart g.colgroup:focus rect.seg { filter: brightness(1.12); }
.chart g.colgroup:focus { outline: none; }
.chart g.colgroup:focus-visible rect.col-hit { stroke: var(--accent); stroke-width: 2; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0; transform: translate(-50%, -100%);
  background: var(--ink); color: var(--bg-elev); border-radius: 9px; padding: 7px 10px; font-size: 12px; line-height: 1.35; white-space: nowrap;
  box-shadow: var(--shadow-lift); transition: opacity var(--fast) var(--ease);
}
.chart.is-hot .chart-tip { opacity: 1; }
.chart-tip b { display: block; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-tip span { opacity: 0.7; }
.chart-tip .key { display: inline-block; width: 10px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* activity feed */
.feed { display: flex; flex-direction: column; }
.feed-day { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); padding: 12px 0 4px; }
.feed-day:first-child { padding-top: 0; }
.feed-row { display: flex; gap: 11px; align-items: center; padding: 7px 0; border-top: 1px solid var(--rule); min-width: 0; }
.feed-day + .feed-row { border-top: 0; }
.feed-row .body { flex: 1; min-width: 0; }
.feed-row .text { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .sub { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* a plain note panel: what is happening and what happens next */
.note { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); }
.note.is-warn { border-left-color: var(--orange); }
.note b { color: var(--ink); }

/* ---------------------------------------------------------------- sign-in: always dark, lit from the corners */

.login {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 12vh 24px 24px;
  color: #111827;
  background:
    radial-gradient(900px 600px at 20% 20%, #17313a, transparent 60%),
    radial-gradient(700px 500px at 80% 90%, rgba(37, 205, 214, 0.18), transparent 60%),
    #0d1114;
}
.login-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; text-transform: lowercase; }
.login-mark i { font-style: normal; color: #25CDD6; }
.login-card { width: min(384px, 100%); background: #fff; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.login-card h2 { font-size: 20px; letter-spacing: -0.01em; color: #111827; }
.login-card .tag { color: #6B7280; font-size: 11px; letter-spacing: 0.14em; font-weight: 600; text-transform: uppercase; margin-top: -10px; }
.login-card .field label { color: #6B7280; }
.login-card .input { background: #FCFCFD; border-color: #D3D9E6; color: #111827; }
.login-card .btn.is-primary { width: 100%; padding: 11px; font-size: 14.5px; margin-top: 4px; }
.login-card .flash { box-shadow: none; background: #FDF1F0; border-color: #F0C4C0; color: #B3261E; }
.login-card .muted { color: #6B7280; }
.login-brand { font-weight: 800; letter-spacing: -0.02em; font-size: 16px; }
.login-brand small { display: block; color: #6B7280; letter-spacing: 0.14em; font-size: 11px; margin-top: 4px; font-weight: 600; }
.login-legal { margin-top: 22px; color: rgba(255, 255, 255, 0.36); font-size: 11.5px; text-align: center; }
.login .card { color: var(--ink); }

/* import preview */
.flag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; margin: 1px 2px 1px 0; }
.flag.INFO { background: var(--blue-soft); color: var(--blue); } .flag.AMBIGUOUS { background: var(--amber-soft); color: var(--amber); } .flag.MISSING { background: var(--slate-soft); color: var(--slate); } .flag.DUPLICATE { background: var(--orange-soft); color: var(--orange); } .flag.UNKNOWN { background: var(--violet-soft); color: var(--violet); } .flag.ERROR { background: var(--red-soft); color: var(--red); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-12 > * { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--rule); }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(290px, 85vw); transform: translateX(-100%); transition: transform var(--slow) var(--ease); height: 100vh; box-shadow: var(--shadow-pop); }
  .sidebar.is-open { transform: none; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .search-btn { min-width: 0; flex: 1; }
  .search-btn span.label { display: none; }
  .page-head h1 { font-size: 24px; }
  .obj-head h1, .hero h1 { font-size: 25px; }
  .kpi .v { font-size: 24px; } .kpi.is-lead .v { font-size: 36px; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .actions { margin-left: 0; width: 100%; }
  .tabs { display: flex; }
}
@media (min-width: 861px) { .nav-toggle { display: none; } }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(13, 17, 20, 0.5); z-index: 39; }
.sidebar-backdrop.is-open { display: block; }
