/* ============================================
   WCorp — Modern refined direction
   Geist (UI) · Instrument Serif (display, italic)
   Warm bone · graphite ink · electric violet
   Hairlines, generous whitespace, soft motion.
   ============================================ */

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
}

[data-theme="dark"] {
  --bg: #0c0c0e;
  --bg-1: #131318;
  --bg-2: #18181f;
  --bg-3: #1f1f28;
  --bg-hover: #16161c;
  --line: #25252e;
  --line-soft: #1c1c23;
  --line-strong: #313140;
  --fg: #f5f4f0;
  --fg-1: #c9c8c2;
  --fg-2: #82827e;
  --fg-3: #4a4a52;
  --accent: #7c6bff;
  --accent-strong: #9789ff;
  --accent-soft: #7c6bff1a;
  --accent-fg: #f5f4f0;
  --hot: #ff5577;
  --danger: #ff5577;
  --warn: #f5b643;
  --ok: #6ad99c;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px var(--line) inset;
  --shadow-md: 0 8px 24px -12px rgb(0 0 0 / 0.6), 0 0 0 1px var(--line) inset;
}

[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-1: #ffffff;
  --bg-2: #f1eee7;
  --bg-3: #e7e3d9;
  --bg-hover: #f3f0e9;
  --line: #e4e0d4;
  --line-soft: #ede9de;
  --line-strong: #c8c2b2;
  --fg: #16161a;
  --fg-1: #2d2d33;
  --fg-2: #74746f;
  --fg-3: #a8a59a;
  --accent: #5340ff;
  --accent-strong: #3d2bdf;
  --accent-soft: #5340ff10;
  --accent-fg: #ffffff;
  --hot: #d72d4e;
  --danger: #d72d4e;
  --warn: #b87900;
  --ok: #2d6b3e;
  --shadow-sm: 0 1px 2px rgb(20 20 24 / 0.04), 0 0 0 1px var(--line) inset;
  --shadow-md: 0 12px 32px -16px rgb(20 20 24 / 0.12), 0 0 0 1px var(--line) inset;
}

html { background: var(--bg); }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
}

.editorial { padding: 0; gap: 0; }
.editorial .card,
.editorial .stat,
.editorial .stat-hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

/* Section frame */
.ed-section {
  padding: 56px 56px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.ed-section[data-tight="true"] { padding: 32px 56px; }

.ed-rule { display: none; }

/* Section number — minimal eyebrow */
.ed-num {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  font-weight: 400;
}
.ed-num .n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  background: transparent;
  width: auto; height: auto;
  display: inline;
  border-radius: 0;
  border: 0;
  text-transform: none;
}
.ed-num .n::before { content: '/ '; color: var(--fg-3); }
.ed-num .meta { margin-left: auto; color: var(--fg-2); font-size: 11px; letter-spacing: 0; font-family: var(--font-mono); }

/* Display headline */
.ed-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 128px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums lining-nums;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
.ed-display sup {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--accent);
  vertical-align: top;
  margin-left: 12px;
  top: 18px;
  position: relative;
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 999px;
}
.ed-display .unit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 64px;
  color: var(--fg-2);
  margin-left: 6px;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.ed-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--fg);
}
.ed-h2 em { font-style: italic; color: var(--fg-2); }

.ed-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Caps label */
.ed-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  font-weight: 400;
}
.ed-cap b { color: var(--fg); font-weight: 500; }

/* Lede */
.ed-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  max-width: 32ch;
  text-wrap: pretty;
}
.ed-lede em { color: var(--accent); font-style: italic; }
.ed-lede b {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 24px;
  color: var(--fg);
  letter-spacing: -0.02em;
  font-weight: 400;
}

/* Marginalia */
.ed-margin {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
}
.ed-margin .key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
}
.ed-margin .val {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--fg);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
  font-weight: 400;
}

/* Inline metric — softer card */
.ed-metric {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.18s, transform 0.18s;
}
.ed-metric:hover { border-color: var(--line-strong); }
.ed-metric .v {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 0.95;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--fg);
  letter-spacing: -0.025em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ed-metric .v small {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--fg-2);
  letter-spacing: -0.02em;
}
.ed-metric .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  font-weight: 400;
}
.ed-metric .d {
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ed-metric .d[data-trend="up"] { color: var(--ok); }
.ed-metric .d[data-trend="up"]::before { content: '↑'; }
.ed-metric .d[data-trend="down"] { color: var(--accent); }
.ed-metric .d[data-trend="down"]::before { content: '↓'; }

/* Channel row */
.ed-row {
  display: grid;
  grid-template-columns: 40px 1.6fr 1fr 110px 110px 130px 80px;
  align-items: center;
  gap: 24px;
  padding: 18px 56px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  position: relative;
  transition: background 0.14s;
}
.ed-row:hover { background: var(--bg-1); }
.ed-row::before { display: none; }
.ed-row .idx {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0;
  line-height: 1;
}
.ed-row:hover .idx { color: var(--fg-2); }
.ed-rowname {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
}
.ed-rowname-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  margin-top: 4px;
  letter-spacing: 0;
  font-weight: 400;
}
.ed-row .cat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--fg-1);
  letter-spacing: -0.02em;
  font-weight: 400;
}
.ed-row .num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--fg);
  text-align: right;
  line-height: 1;
}
.ed-row .num small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 6px;
}
.ed-row .num[data-dim="true"] { color: var(--fg-3); }

/* Live indicator — refined dot */
.ed-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-1);
}
.ed-live::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--hot);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--hot) 22%, transparent);
  animation: blip 1.8s ease-in-out infinite;
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.ed-threat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
}
.ed-threat[data-level="med"]  { color: var(--warn); }
.ed-threat[data-level="high"] { color: var(--hot); }
.ed-threat[data-level="crit"] { color: var(--hot); }
.ed-threat::before {
  content: '';
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.ed-heat { display: flex; gap: 2px; align-items: flex-end; height: 24px; }
.ed-heat i { width: 3px; background: var(--bg-3); display: block; border-radius: 1px; }
.ed-heat i[data-l="0"] { height: 3px; }
.ed-heat i[data-l="1"] { height: 6px; }
.ed-heat i[data-l="2"] { height: 11px; }
.ed-heat i[data-l="3"] { height: 17px; background: var(--fg-2); }
.ed-heat i[data-l="4"] { height: 24px; background: var(--accent); }
.ed-heat i[data-l="warn"] { height: 24px; background: var(--warn); }
.ed-heat i[data-l="danger"] { height: 24px; background: var(--hot); }

/* Filter tabs */
.ed-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 56px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: var(--bg);
}
.ed-filter {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--fg-1);
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  transition: all 0.14s;
}
.ed-filter:hover { background: var(--bg-2); color: var(--fg); }
.ed-filter[data-on="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.ed-filter .ct {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-3);
  vertical-align: 0;
}
.ed-filter[data-on="true"] .ct { color: color-mix(in oklab, var(--bg) 60%, var(--fg)); }

/* Sidebar — refined column with labels */
.app[data-editorial="true"] {
  grid-template-columns: 220px 1fr;
  background: var(--bg);
}
.app[data-editorial="true"] .sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 0;
}
.app[data-editorial="true"] .sidebar-brand {
  height: 64px;
  flex-direction: row;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: flex-start;
}
.app[data-editorial="true"] .brand-mark {
  background: var(--fg);
  color: var(--bg);
  width: 28px; height: 28px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: grid; place-items: center;
  line-height: 1;
}
.app[data-editorial="true"] .brand-name {
  display: block !important;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.app[data-editorial="true"] .brand-name::after {
  content: ' / fr';
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0;
}
.app[data-editorial="true"] .sidebar-nav {
  padding: 16px 12px;
  gap: 1px;
}
.app[data-editorial="true"] .nav-item {
  height: 36px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.app[data-editorial="true"] .nav-item:hover { background: var(--bg-2); color: var(--fg); }
.app[data-editorial="true"] .nav-item[data-active="true"] {
  color: var(--fg);
  background: var(--bg-2);
}
.app[data-editorial="true"] .nav-item[data-active="true"]::after { display: none; }
.app[data-editorial="true"] .nav-item .nav-icon { width: 16px; height: 16px; color: var(--fg-2); }
.app[data-editorial="true"] .nav-item[data-active="true"] .nav-icon { color: var(--accent); }
.app[data-editorial="true"] .nav-item .nav-label {
  display: block !important;
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  font-weight: 500;
}
.app[data-editorial="true"] .nav-badge {
  position: static;
  margin-left: auto;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  padding: 1px 7px;
  line-height: 16px;
  height: 18px;
  letter-spacing: 0;
}

/* Topbar */
.app[data-editorial="true"] .topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 0 56px;
  gap: 16px;
}
.app[data-editorial="true"] .topbar-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.app[data-editorial="true"] .topbar-title .crumb { color: var(--fg-2); font-weight: 400; }
.app[data-editorial="true"] .topbar-title .sep { color: var(--fg-3); }
.app[data-editorial="true"] .cmd-input {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 240px;
  padding: 0 12px;
  height: 32px;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
}
.app[data-editorial="true"] .cmd-input:hover { border-color: var(--line-strong); color: var(--fg); }
.app[data-editorial="true"] .cmd-input .kbd {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-2);
}
.app[data-editorial="true"] .btn {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: none;
  height: 32px;
  padding: 0 12px;
  color: var(--fg);
  transition: background 0.14s, border-color 0.14s;
}
.app[data-editorial="true"] .btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.app[data-editorial="true"] .btn[data-variant="primary"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.app[data-editorial="true"] .btn[data-variant="primary"]:hover { background: var(--fg-1); border-color: var(--fg-1); }
.app[data-editorial="true"] .btn[data-variant="ghost"] {
  background: transparent;
  border-color: transparent;
  color: var(--fg-1);
}
.app[data-editorial="true"] .btn[data-variant="ghost"]:hover { background: var(--bg-2); color: var(--fg); }
.app[data-editorial="true"] .btn[data-square] { padding: 0; width: 32px; }

/* Fleet header */
.ed-list-head {
  display: grid;
  grid-template-columns: 40px 1.6fr 1fr 110px 110px 130px 80px;
  gap: 24px;
  padding: 12px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
}
.ed-list-head span:nth-child(4),
.ed-list-head span:nth-child(5) { text-align: right; }

/* Masthead — quiet utility strip */
.ed-mast {
  padding: 10px 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  background: var(--bg-1);
}
.ed-mast .center {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--fg);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ed-mast .center::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 22%, transparent);
}
.ed-mast .right { text-align: right; }

/* Hero stamp — replace with subtle gradient orb */
.ed-hero-stamp {
  position: absolute;
  right: 56px; top: 80px;
  width: 280px; height: 280px;
  border: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  padding: 0;
  line-height: 1.5;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--accent) 35%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, color-mix(in oklab, var(--accent) 18%, transparent) 0%, transparent 50%),
    var(--bg-1);
  pointer-events: none;
  filter: blur(0.4px);
  animation: orbDrift 12s ease-in-out infinite alternate;
}
.ed-hero-stamp::before { display: none; }
@keyframes orbDrift {
  0%   { transform: scale(1) translate(0,0); opacity: 0.85; }
  100% { transform: scale(1.05) translate(-8px, 6px); opacity: 1; }
}

/* Animated entry */
.editorial > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.editorial > *:nth-child(1) { animation-delay: 0.0s; }
.editorial > *:nth-child(2) { animation-delay: 0.05s; }
.editorial > *:nth-child(3) { animation-delay: 0.10s; }
.editorial > *:nth-child(4) { animation-delay: 0.15s; }
.editorial > *:nth-child(n+5) { animation-delay: 0.18s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer colophon */
.ed-colophon {
  padding: 28px 56px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  border-top: 1px solid var(--line);
}
.ed-colophon .mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-transform: none;
}
