/* Eaton Channel OS.
   Design system: intakto Design Book v4, McKinsey variant.
   Derived from the July 2026 McKinsey B2B sales report. See design-mckinsey.md.
   Two families: Source Serif 4 for headings, Golos Text for everything read. */

@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal; font-display: swap; font-weight: 400 700;
  src: url('../fonts/golos-text-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal; font-display: swap; font-weight: 400 700;
  src: url('../fonts/golos-text-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal; font-display: swap; font-weight: 400 700;
  src: url('../fonts/source-serif-4-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal; font-display: swap; font-weight: 400 700;
  src: url('../fonts/source-serif-4-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #ffffff;
  --panel-blue: #e8f2fb;
  --panel-grey: #f2f2f0;
  --line: #d8dee2;
  --line-strong: #b3bec5;
  --ink: #051c2c;
  --ink-600: #2a3f4d;
  --ink-500: #6b7c86;
  --link: #2f6fd0;

  --sans: 'Golos Text Variable', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Source Serif 4 Variable', Georgia, 'Times New Roman', serif;

  /* Four roles, four sizes. Nothing else exists. */
  --step-display: clamp(2rem, 3.4vw, 3.2rem);
  --step-heading: 22px;
  --step-body: 17px;
  --step-small: 14px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --page-pad: clamp(20px, 3.6vw, 72px);
  --nav-h: 52px;
  --sidebar-w: 248px;
  --measure: 92ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #06121b; --panel-blue: #0d2434; --panel-grey: #14191d;
    --line: #24343f; --line-strong: #3a4c58;
    --ink: #eef3f6; --ink-600: #bdcbd4; --ink-500: #8b9aa4; --link: #7fb0f0;
  }
}
:root[data-theme='dark'] {
  --paper: #06121b; --panel-blue: #0d2434; --panel-grey: #14191d;
  --line: #24343f; --line-strong: #3a4c58;
  --ink: #eef3f6; --ink-600: #bdcbd4; --ink-500: #8b9aa4; --link: #7fb0f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-600);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* ─── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s5);
  padding: 0 var(--page-pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar__mark {
  font-size: var(--step-small); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.topbar__nav { margin-left: auto; display: flex; gap: var(--s5); list-style: none; }
.topbar__nav a {
  font-size: var(--step-small); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-500); text-decoration: none; padding: var(--s1) 0;
  border-bottom: 1px solid transparent;
}
.topbar__nav a:hover, .topbar__nav a[aria-current='true'] {
  color: var(--ink); border-bottom-color: var(--ink);
}
.topbar__theme {
  background: none; border: 1px solid var(--line-strong); color: var(--ink-500);
  font: inherit; font-size: var(--step-small); letter-spacing: 0.04em;
  text-transform: uppercase; padding: var(--s1) var(--s3); cursor: pointer;
}
.topbar__theme:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ─── Shell and accordion sidebar ─────────────────────────── */
.shell { display: flex; padding-top: var(--nav-h); min-height: 100vh; }
.sidebar {
  position: fixed; top: var(--nav-h); bottom: 0; left: 0; width: var(--sidebar-w);
  overflow-y: auto; padding: var(--s5) var(--s5) var(--s7) var(--page-pad);
  border-right: 1px solid var(--line); background: var(--paper);
}
.sidebar__group { border-bottom: 1px solid var(--line); }
.sidebar__group:first-child { border-top: 1px solid var(--line); }
.sidebar__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  width: 100%; padding: var(--s3) var(--s3) var(--s3) 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: var(--step-small); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-align: left;
  color: var(--ink);
}
.sidebar__head:hover { color: var(--link); }
.sidebar__head::after { content: '+'; font-weight: 400; font-size: 14px; line-height: 1; }
.sidebar__head[aria-expanded='true']::after { content: '\2212'; }
.sidebar__list { list-style: none; padding-bottom: var(--s3); }
.sidebar__list[hidden] { display: none; }
.sidebar__list a {
  display: block; padding: var(--s2) 0 var(--s2) var(--s4); font-size: var(--step-small);
  line-height: 1.35; color: var(--ink-600); text-decoration: none;
  border-left: 1px solid var(--line);
}
.sidebar__list a:hover { color: var(--link); border-left-color: var(--link); }
.sidebar__list a[aria-current='page'] {
  color: var(--ink); font-weight: 600; border-left-color: var(--link);
}

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); padding: var(--s7) var(--page-pad) var(--s9); }
.wrap { max-width: 1180px; }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: var(--s5); }

/* ─── Type ────────────────────────────────────────────────── */
.display {
  font-family: var(--serif); font-size: var(--step-display); font-weight: 400;
  line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); max-width: 20ch;
}
h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; }
h2 { font-size: var(--step-heading); font-weight: 600; margin-bottom: var(--s4); }
h3 { font-size: var(--step-heading); font-weight: 600; margin-bottom: var(--s2); }
.label {
  font-family: var(--sans); font-size: var(--step-small); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--link);
  margin-bottom: var(--s3);
}
.lede {
  font-size: var(--step-body); line-height: 1.6; color: var(--ink);
  max-width: 62ch; margin-top: var(--s5);
}
.lead { font-weight: 600; color: var(--ink); }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }
em { font-style: italic; }

/* ─── Sections ────────────────────────────────────────────── */
.section { padding-top: var(--s7); margin-top: var(--s7); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; margin-top: var(--s7); padding-top: 0; }
.section__head { margin-bottom: var(--s5); }

/* ─── Ledger rows ─────────────────────────────────────────── */
.ledger { border-top: 1px solid var(--line); }
.ledger__row {
  display: grid; grid-template-columns: 210px 1fr; gap: var(--s6);
  padding: var(--s5) 0; border-bottom: 1px solid var(--line);
}
.ledger__key { color: var(--ink); font-weight: 600; }
.ledger__key .label { display: block; font-weight: 600; margin-bottom: var(--s1); }
.ledger__value { max-width: var(--measure); }
.ledger__value p + p { margin-top: var(--s4); }
a.ledger__row { text-decoration: none; color: inherit; }
a.ledger__row:hover .ledger__key { color: var(--link); }
a.ledger__row:hover { background: var(--panel-grey); }

/* ─── Exhibits: the takeaway is the title ─────────────────── */
.exhibit { margin-top: var(--s6); }
.exhibit__label {
  font-size: var(--step-small); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-500); margin-bottom: var(--s2);
}
.exhibit__title {
  font-family: var(--serif); font-size: var(--step-heading); font-weight: 600;
  color: var(--ink); line-height: 1.3; max-width: 60ch; margin-bottom: var(--s5);
}

/* ─── Tables ──────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--step-small); line-height: 1.5; }
th, td { text-align: left; padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: var(--step-small); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600; border-bottom-color: var(--line-strong);
}
td strong { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ─── Lists ───────────────────────────────────────────────── */
.list { list-style: none; max-width: var(--measure); }
.list li { padding: var(--s3) 0 var(--s3) var(--s5); border-bottom: 1px solid var(--line); position: relative; }
.list li::before { content: ''; position: absolute; left: 0; top: 1.35em; width: 12px; height: 1px; background: var(--line-strong); }

/* ─── Panels: flat fill, no border, no radius ─────────────── */
.callout {
  background: var(--panel-blue); padding: var(--s6);
  margin: var(--s7) 0; max-width: var(--measure);
}
.casebox {
  background: var(--panel-grey); padding: var(--s6);
  margin: var(--s7) 0;
}
.callout h3, .casebox h3 { margin-bottom: var(--s4); }
.callout p + p, .casebox p + p { margin-top: var(--s4); }
.attrib { font-style: italic; color: var(--ink-500); font-size: var(--step-small); margin-top: var(--s5); }
.cols { columns: 2; column-gap: var(--s7); }
.cols p { break-inside: avoid; }

/* ─── Sources and footnotes ───────────────────────────────── */
.ref { font-size: var(--step-small); color: var(--link); text-decoration: none; vertical-align: super; }
.ref:hover { text-decoration: underline; }
.sources { font-size: var(--step-small); line-height: 1.5; color: var(--ink-500); }
.sources ol { padding-left: var(--s5); columns: 2; column-gap: var(--s7); }
.sources li { padding: var(--s1) 0; overflow-wrap: anywhere; break-inside: avoid; }
.sources a { color: var(--ink-500); }

/* ─── Bars ────────────────────────────────────────────────── */
.bar { display: grid; grid-template-columns: minmax(200px, 22rem) 1fr 64px; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.bar__track { height: 10px; background: var(--panel-grey); }
.bar__fill { height: 100%; background: var(--ink); }
.bar__fill--accent { background: var(--link); }
.bar__val { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ─── Notes ───────────────────────────────────────────────── */
.note {
  border-top: 1px solid var(--line-strong); padding-top: var(--s3);
  max-width: var(--measure); color: var(--ink-500); font-size: var(--step-small);
}

/* ─── Footer ──────────────────────────────────────────────── */
.footer { margin-top: var(--s9); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: var(--step-small); color: var(--ink-500); max-width: var(--measure); }
.footer p + p { margin-top: var(--s3); }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 208px; }
  .sources ol, .cols { columns: 1; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar {
    position: static; width: auto; border-right: 0;
    border-bottom: 1px solid var(--line); padding: var(--s4) var(--page-pad) var(--s5);
  }
  .main { margin-left: 0; padding-top: var(--s6); }
  .ledger__row { grid-template-columns: 1fr; gap: var(--s2); }
  .bar { grid-template-columns: 1fr; gap: var(--s1); }
  .topbar__nav { gap: var(--s4); }
  .table-scroll table { min-width: 620px; }
  .callout, .casebox { padding: var(--s5); }
}
@media (max-width: 620px) {
  .topbar__nav a { font-size: var(--step-small); }
  .topbar { gap: var(--s3); }
  .display { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .prose p + p { margin-top: var(--s4); }
}
@media print {
  .topbar, .sidebar, .topbar__theme { display: none; }
  .main { margin: 0; padding: 0; }
  .callout, .casebox { background: none; border-top: 1px solid #000; border-bottom: 1px solid #000; }
}
