/* ══════════════════════════════════════════════════════════
   BiV Design System — Shared Stylesheet
   Source of truth: templates/guide.html
   ══════════════════════════════════════════════════════════ */

/* ── Font Faces ── */
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayXXThin.ttf'); font-weight: 100; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayXXThinItalic.ttf'); font-weight: 100; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayXThin.ttf'); font-weight: 200; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayXThinItalic.ttf'); font-weight: 200; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayThin.ttf'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayThinItalic.ttf'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayLight.ttf'); font-weight: 350; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayLightItalic.ttf'); font-weight: 350; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayRoman.ttf'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayRomanItalic.ttf'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayMediu.ttf'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayMediumItalic.ttf'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayBold.ttf'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayBoldItalic.ttf'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayBlack.ttf'); font-weight: 900; font-style: normal; }
@font-face { font-family: 'NHG Display'; src: url('/assets/brand-review/fonts/NeueHaasDisplayBlackItalic.ttf'); font-weight: 900; font-style: italic; }

/* ── Reset & Variables ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #111;
  --secondary: #6b6b74;
  --tertiary: #a0a0a8;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --bg: #fff;
  --bg-hover: #fafafa;
  --accent: #f43f5e;
}

body {
  font-family: 'NHG Display', 'Helvetica Neue', Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 0 60px 16px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* ── Sticky Header ── */
.sticky-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  margin: 0 -60px;
  padding: 0 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 24px;
}
.sticky-header .wordmark { flex-shrink: 0; padding: 12px 0; }
.sticky-header .wordmark a { display: flex; align-items: center; gap: 6px; height: 36px; line-height: 0; cursor: pointer; text-decoration: none; }
.wordmark-text { height: 36px !important; width: auto !important; max-height: 36px; }
.wordmark-brain { height: 36px !important; width: 36px !important; max-height: 36px; object-fit: contain; }
.sticky-nav { display: flex; gap: 0; flex-wrap: wrap; align-items: flex-end; padding: 0; }
.sticky-nav a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  padding: 18px 16px 14px;
  transition: all .15s;
  border-bottom: 2px solid transparent;
}
.sticky-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* ── Page Header ── */
.page-header { padding-top: 48px; margin-bottom: 32px; }
h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.25px; line-height: 1.1; margin-bottom: 8px; }
h2 { letter-spacing: -0.3px; }
.subtitle { font-size: 14px; font-weight: 400; color: var(--secondary); }

/* ── Sections (details/summary) ── */
.section { margin-bottom: 48px; scroll-margin-top: 120px; }
.section > summary {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.3px;
  border-bottom: 2px solid var(--text);
  padding-bottom: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  cursor: pointer;
}
.section > summary::-webkit-details-marker { display: none; }
.toggle {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--secondary);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details:not([open]) > summary > .toggle { transform: rotate(0deg); }
details[open] > summary > .toggle { transform: rotate(90deg); }

/* ── Subsection Labels ── */
.subsection-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--secondary);
  margin: 32px 0 16px;
}
.subsection-label:first-child { margin-top: 0; }

/* Collapsible subsections (JS-converted from .subsection-label) */
details.subsection { margin: 32px 0 0; }
details.subsection:first-child { margin-top: 0; }
details.subsection > summary {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--secondary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin-bottom: 16px;
}
details.subsection > summary::-webkit-details-marker { display: none; }
details.subsection > summary > .toggle {
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent var(--tertiary);
}
.note {
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 72ch;
}

/* ── TOC ── */
.toc { border: 1px solid var(--border); padding: 24px 28px; margin-bottom: 48px; }
.toc .toc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); margin-bottom: 12px; }
.toc a { display: block; font-size: 14px; color: var(--text); text-decoration: none; padding: 4px 0; }
.toc a:hover { color: var(--accent); }
.toc a.toc-indent { padding-left: 16px; color: var(--secondary); }

/* ── Global Em-Dash Bullets ── */
ul:not([class]) { list-style: none; padding-left: 1.5em; }
ul:not([class]) li { position: relative; }
ul:not([class]) li::before { content: "\2014"; position: absolute; left: -1.5em; color: var(--secondary); }

/* ── Links ── */
a.styled-link {
  color: var(--accent);
  font-weight: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 63, 94, 0.4);
  transition: border-color .15s;
}
a.styled-link:hover { border-bottom-color: var(--accent); }

/* ── Stat Cards ── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  border: 1px solid var(--border);
  padding: 24px;
  transition: background .15s, border-color .15s;
}
.stat-card:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.stat-card:hover .stat-label { color: var(--accent); }
.stat-card:hover .stat-value { color: var(--accent); }
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.5px;
  font-feature-settings: 'tnum' 1;
  line-height: 1.1;
}

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  margin: 0 6px 6px 0;
}
.tag.accent { border-color: var(--accent); color: var(--accent); }
.tag.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tag.clickable { cursor: pointer; transition: all .15s; }
.tag.clickable:hover { border-color: var(--accent); color: var(--accent); }

/* ── Callout ── */
.callout {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  background: var(--bg-hover);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 72ch;
}

/* ── Progress Bars ── */
.progress-bar-wrap { margin-bottom: 16px; }
.progress-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 6px;
}
.progress-track {
  height: 6px;
  background: var(--border-light);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
}

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 8px 16px 8px 0;
  border-bottom: 2px solid var(--text);
  color: var(--secondary);
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; }
th.sort-asc::after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid currentColor; }
th.sort-desc::after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid currentColor; }
td {
  font-size: 14px;
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
th:last-child, td:last-child { text-align: right; padding-right: 0; }

/* ── Comparison Containers ── */
.compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
.compare-panel {
  border: 1px solid var(--border);
  padding: 32px;
}
.compare-panel-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tertiary);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.compare-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.compare-5col .compare-panel { padding: 20px; }
.compare-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

/* ── Bullet Variants ── */
.bullet-disc { list-style-type: disc; padding-left: 20px; }
.bullet-disc li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; }

.bullet-endash { list-style-type: "\2013\0020"; padding-left: 20px; }
.bullet-endash li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; }

.bullet-emdash { list-style: none; padding-left: 20px; }
.bullet-emdash li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; position: relative; }
.bullet-emdash li::before { content: "\2014"; position: absolute; left: -20px; color: var(--secondary); }

.bullet-middot { list-style: none; padding-left: 16px; }
.bullet-middot li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; position: relative; }
.bullet-middot li::before { content: "\00B7"; position: absolute; left: -12px; color: var(--secondary); font-weight: 900; }

.bullet-none { list-style: none; padding-left: 20px; }
.bullet-none li { margin-bottom: 6px; font-size: 14px; line-height: 1.6; }

/* ── Status Variants ── */
.status-text { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.status-placed { color: #16a34a; }
.status-pending { color: #ca8a04; }
.status-declined { color: #dc2626; }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.dot-placed::before { background: #16a34a; }
.status-dot.dot-pending::before { background: #ca8a04; }
.status-dot.dot-declined::before { background: #dc2626; }

.status-weight-active { font-weight: 700; color: var(--text); }
.status-weight-pending { font-weight: 400; color: var(--text); }
.status-weight-declined { font-weight: 300; color: var(--text); text-decoration: line-through; }

/* ── Dark Mode ── */
[data-theme="dark"] {
  --text: #E5E5E5;
  --secondary: #8b949e;
  --tertiary: #6b7280;
  --border: #2d333b;
  --border-light: #21262d;
  --bg: #121212;
  --bg-hover: #1C1C1E;
}
[data-theme="dark"] body { background: #121212; color: rgba(255,255,255,0.87); }
[data-theme="dark"] .sticky-header { background: #121212; border-bottom-color: #2d333b; }
[data-theme="dark"] .page-footer { background: #121212; border-top-color: #2d333b; }
[data-theme="dark"] .toc { border-color: #2d333b; }
[data-theme="dark"] .stat-card { border-color: #2d333b; background: #1C1C1E; }
[data-theme="dark"] table th { border-bottom-color: rgba(255,255,255,0.3); color: #8b949e; }
[data-theme="dark"] table td { border-bottom-color: #2d333b; }
[data-theme="dark"] .callout { background: #1C1C1E; border-left-color: rgba(255,255,255,0.3); }
[data-theme="dark"] .tag { border-color: #444; color: rgba(255,255,255,0.87); }
[data-theme="dark"] .tag.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
[data-theme="dark"] .tag.clickable:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="dark"] .compare-panel { border-color: #2d333b; }
[data-theme="dark"] .progress-track { background: #2d333b; }
[data-theme="dark"] .toggle { border-left-color: #8b949e; }
[data-theme="dark"] summary { color: rgba(255,255,255,0.87); border-bottom-color: rgba(255,255,255,0.3); }
[data-theme="dark"] .subsection-label { color: #8b949e; }
[data-theme="dark"] .footer-brand { opacity: 0.5; }
/* dark mode: accent-colored wordmark text PNGs don't need inversion */
[data-theme="dark"] .footer-brand .footer-brain-gif { mix-blend-mode: screen; }
[data-theme="dark"] .sticky-header .wordmark-text { filter: invert(1); }

/* ── Footer ── */
.page-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 60px;
  border-top: 1px solid var(--border);
  margin: 48px -60px 0;
}
.footer-meta {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
}
.footer-controls {
  display: flex;
  gap: 8px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity .2s;
  line-height: 0;
  margin-left: auto;
}
.footer-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 4px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--tertiary);
  cursor: pointer;
  transition: all .15s;
}
.footer-btn:hover {
  color: var(--text);
  border-color: var(--text);
}
.footer-brand:hover { opacity: 0.65; }
.footer-brand .footer-wordmark-text {
  height: 36px;
  width: auto;
}
.footer-brand .footer-brain-gif {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

/* ── Timeline (Compact Inline) ── */
.timeline-c .tl-entry {
  font-size: 14px;
  line-height: 1.8;
  display: flex;
  align-items: center;
  position: relative;
}
.timeline-c .tl-date { font-feature-settings: 'tnum' 1; font-weight: 700; flex-shrink: 0; min-width: 90px; }
.timeline-c .tl-line { flex: 1; height: 1px; background: var(--border); margin: 0 12px; }
.timeline-c .tl-content { flex-shrink: 0; text-align: right; }
.timeline-c .tl-entry.tl-past { color: var(--secondary); }

/* ── Metric Comparison ── */
.metric-a { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.metric-a-item { text-align: center; }
.metric-a-item .metric-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); margin-bottom: 8px; }
.metric-a-cols { display: flex; align-items: center; justify-content: center; gap: 16px; }
.metric-a-val { font-size: 28px; font-weight: 900; font-feature-settings: 'tnum' 1; }
.metric-a-arrow { font-size: 20px; color: var(--secondary); }
.metric-a-val.old { color: var(--secondary); }
.metric-a-delta { font-size: 12px; font-weight: 700; font-feature-settings: 'tnum' 1; margin-top: 6px; }
.metric-a-delta.up { color: #16a34a; }
.metric-a-delta.down { color: #dc2626; }
.metric-a-delta.neutral { color: var(--secondary); }
.metric-a-bar { height: 3px; margin-top: 8px; background: var(--border); position: relative; }
.metric-a-bar .bar-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--accent); }

/* ── Alert Banner ── */
.alert-info-color { --alert-color: #2563eb; --alert-bg: #eff6ff; }
.alert-warning-color { --alert-color: #ca8a04; --alert-bg: #fefce8; }
.alert-error-color { --alert-color: #dc2626; --alert-bg: #fef2f2; }
.alert-success-color { --alert-color: #16a34a; --alert-bg: #f0fdf4; }
[data-theme="dark"] .alert-info-color { --alert-bg: #1e293b; }
[data-theme="dark"] .alert-warning-color { --alert-bg: #2d2305; }
[data-theme="dark"] .alert-error-color { --alert-bg: #2d0f0f; }
[data-theme="dark"] .alert-success-color { --alert-bg: #0a2614; }
.alert-b {
  border-left: 3px solid var(--alert-color);
  padding: 12px 16px;
  background: var(--alert-bg);
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-b .alert-text { flex: 1; font-weight: 500; }
.alert-b .alert-dismiss { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--secondary); padding: 0 4px; font-family: inherit; }
.alert-b .alert-dismiss:hover { color: var(--text); }

/* ── Accordion / FAQ ── */
.faq-a .faq-item { border-bottom: 1px solid var(--border); }
.faq-a .faq-item:first-child { border-top: 1px solid var(--border); }
.faq-a .faq-item summary {
  font-size: 14px;
  font-weight: 700;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-a .faq-item summary::-webkit-details-marker { display: none; }
.faq-a .faq-item .faq-content { font-size: 14px; color: var(--secondary); padding: 0 0 16px; line-height: 1.6; max-width: 72ch; }
[data-theme="dark"] .faq-a .faq-item { border-color: #2d333b; }

/* ── Kanban / Pipeline ── */
.kanban-a { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-a-col { min-width: 200px; flex: 1; }
.kanban-a-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-a-header .count { color: var(--tertiary); font-feature-settings: 'tnum' 1; }
.kanban-a-card {
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  transition: border-color .15s;
}
.kanban-a-card:hover { border-color: var(--text); }
.kanban-a-card .card-title { font-weight: 500; margin-bottom: 4px; }
.kanban-a-card .card-meta { font-size: 11px; color: var(--secondary); }
.kanban-a-card[draggable="true"] { cursor: grab; }
.kanban-a-card[draggable="true"]:active { cursor: grabbing; }
.kanban-a-card.dragging { opacity: 0.4; }
.kanban-a-col.drag-over { background: var(--bg-hover); outline: 2px dashed var(--accent); outline-offset: -2px; }
[data-theme="dark"] .kanban-a-card { border-color: #2d333b; background: #1C1C1E; }
[data-theme="dark"] .kanban-a-card:hover { border-color: rgba(255,255,255,0.3); }

.kanban-b-stage { margin-bottom: 24px; }
.kanban-b-stage:last-child { margin-bottom: 0; }
.kanban-b-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  padding: 8px 0 8px 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.kanban-b-stage.s-prospect .kanban-b-header { border-left-color: var(--secondary); }
.kanban-b-stage.s-pitched .kanban-b-header { border-left-color: #2563eb; color: #2563eb; }
.kanban-b-stage.s-review .kanban-b-header { border-left-color: #ca8a04; color: #ca8a04; }
.kanban-b-stage.s-placed .kanban-b-header { border-left-color: #16a34a; color: #16a34a; }
.kanban-b-stage.s-reported .kanban-b-header { border-left-color: var(--text); color: var(--text); }
.kanban-b-header .count { font-feature-settings: 'tnum' 1; color: var(--tertiary); }
.kanban-b-item {
  font-size: 14px;
  padding: 8px 0 8px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-b-item .item-meta { font-size: 12px; color: var(--secondary); }
[data-theme="dark"] .kanban-b-stage.s-reported .kanban-b-header { color: rgba(255,255,255,0.87); border-left-color: rgba(255,255,255,0.87); }

.kanban-c-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
}
.kanban-c-stage {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 100px;
}
.kanban-c-stage.s-prospect { color: var(--secondary); }
.kanban-c-stage.s-pitched { color: #2563eb; }
.kanban-c-stage.s-review { color: #ca8a04; }
.kanban-c-stage.s-placed { color: #16a34a; }
.kanban-c-stage.s-reported { color: var(--text); }
.kanban-c-name { font-size: 14px; flex: 1; }
.kanban-c-meta { font-size: 12px; color: var(--secondary); font-feature-settings: 'tnum' 1; }
[data-theme="dark"] .kanban-c-stage.s-reported { color: rgba(255,255,255,0.87); }

/* ── Sparkline / Mini Charts ── */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; }
.bar-chart .bar-group { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.bar-chart .bar {
  width: 100%;
  max-width: 48px;
  background: var(--accent);
  transition: background .2s;
  min-height: 4px;
}
.bar-chart .bar-label { font-size: 11px; font-weight: 700; color: var(--secondary); font-feature-settings: 'tnum' 1; }
.bar-chart .bar-value { font-size: 11px; font-weight: 700; font-feature-settings: 'tnum' 1; }
.sparkline-wrap { display: flex; align-items: center; gap: 16px; }
.sparkline-wrap svg { display: block; }
.sparkline-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); }
.dot-chart { position: relative; padding: 16px 0; display: flex; align-items: flex-end; margin: 0 auto; }
.dot-chart-line { position: absolute; bottom: 34px; left: 0; right: 0; height: 1px; background: var(--border); }
.dot-chart-points { display: flex; align-items: flex-end; justify-content: space-around; width: 100%; position: relative; z-index: 1; }
.dot-chart-point { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dot-chart-point .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
.dot-chart-point .dot-label { font-size: 11px; color: var(--secondary); font-feature-settings: 'tnum' 1; font-weight: 700; }
[data-theme="dark"] .dot-chart-point .dot { border-color: #121212; }

/* ── Breadcrumbs ── */
.breadcrumb { font-size: 14px; margin-bottom: 12px; }
.breadcrumb a { color: var(--secondary); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .bc-current { color: var(--text); font-weight: 500; }
.breadcrumb .bc-sep { margin: 0 8px; color: var(--tertiary); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: 4px; }
.pg-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  font-feature-settings: 'tnum' 1;
}
.pg-btn:hover { border-color: var(--text); }
.pg-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pg-btn.disabled { color: var(--tertiary); cursor: default; }
.pg-btn.disabled:hover { border-color: var(--border); }
[data-theme="dark"] .pg-btn { border-color: #2d333b; color: rgba(255,255,255,0.87); background: #121212; }
[data-theme="dark"] .pg-btn.active { background: rgba(255,255,255,0.87); color: #121212; border-color: rgba(255,255,255,0.87); }

/* ── Modal / Overlay ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.active { display: flex; }
.modal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  position: relative;
}
.modal-card h3 { font-size: 18px; font-weight: 900; margin-bottom: 12px; }
.modal-card p { font-size: 14px; color: var(--secondary); line-height: 1.6; margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--secondary);
  font-family: inherit;
}
.modal-close:hover { color: var(--text); }
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
}
.panel-backdrop.active { display: block; }
.slide-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 32px;
  z-index: 1001;
  transition: right .25s ease;
  overflow-y: auto;
}
.slide-panel.active { right: 0; }
.slide-panel h3 { font-size: 18px; font-weight: 900; margin-bottom: 12px; }
.slide-panel p { font-size: 14px; color: var(--secondary); line-height: 1.6; margin-bottom: 20px; }
.trigger-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all .15s;
  margin-right: 8px;
}
.trigger-btn:hover { border-color: var(--text); }
[data-theme="dark"] .modal-card { background: #1C1C1E; border-color: #2d333b; }
[data-theme="dark"] .slide-panel { background: #1C1C1E; border-color: #2d333b; }
[data-theme="dark"] .trigger-btn { border-color: #2d333b; color: rgba(255,255,255,0.87); background: #121212; }

/* ── Form Inputs ── */
.form-b input[type="text"],
.form-b textarea,
.form-b select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color .15s;
  letter-spacing: 0.3px;
}
.form-b input[type="text"]:focus,
.form-b textarea:focus,
.form-b select:focus { border-color: var(--text); }
.form-b textarea { resize: vertical; min-height: 80px; }
.form-b select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b74' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 6px;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all .15s;
}
.form-check input[type="checkbox"]::after,
.form-check input[type="radio"]::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--border);
  transition: all .15s;
}
.form-check input[type="checkbox"]:checked,
.form-check input[type="radio"]:checked {
  border-color: var(--accent);
}
.form-check input[type="checkbox"]:checked::after,
.form-check input[type="radio"]:checked::after {
  background: var(--accent);
  inset: 1px;
}
.form-check input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all .15s;
}
[data-theme="dark"] .form-b input, [data-theme="dark"] .form-b textarea, [data-theme="dark"] .form-b select { border-color: #2d333b; color: rgba(255,255,255,0.87); background: #1C1C1E; }
[data-theme="dark"] .form-b input:focus, [data-theme="dark"] .form-b textarea:focus, [data-theme="dark"] .form-b select:focus { border-color: rgba(255,255,255,0.5); }

/* ── Notification Badge ── */
.badge-demo-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 10px 16px;
  margin-right: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  position: relative;
}
.notif-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  font-feature-settings: 'tnum' 1;
}
[data-theme="dark"] .badge-demo-item { border-color: #2d333b; }

/* ── Clickable Rows ── */
tr.clickable { cursor: pointer; transition: background .15s; }
tr.clickable:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ── Detail Panel Content ── */
.detail-header { margin-bottom: 24px; }
.detail-header h3 { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.detail-header .detail-subtitle { font-size: 14px; color: var(--secondary); }
.detail-fields { margin-bottom: 20px; }
.detail-field { margin-bottom: 16px; }
.detail-field .form-label { margin-bottom: 4px; }
.detail-field .detail-value { font-size: 14px; }
.detail-field .detail-value.large { font-size: 28px; font-weight: 900; font-feature-settings: 'tnum' 1; }
.detail-actions { border-top: 1px solid var(--border); padding-top: 16px; }

/* ── Mini Table ── */
.mini-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.mini-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 6px 12px 6px 0;
  border-bottom: 2px solid var(--text);
  color: var(--secondary);
}
.mini-table td {
  font-size: 14px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border-light);
}

/* ── Platform Breakdown ── */
.platform-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin-bottom: 24px; }
.platform-card { text-align: center; padding: 16px; border: 1px solid var(--border); transition: background .15s, border-color .15s; }
.platform-card:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.platform-card .num { font-size: 28px; font-weight: 900; font-feature-settings: 'tnum' 1; letter-spacing: -1px; line-height: 1.1; }
.platform-card .label { font-size: 11px; font-weight: 700; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
[data-theme="dark"] .platform-card { border-color: #2d333b; }

/* ── Stat Card Sub-description ── */
.stat-card .stat-desc { font-size: 13px; color: var(--secondary); margin-top: 4px; line-height: 1.4; }

/* ── Keyboard Shortcut Hint ── */
.shortcut-hint { font-size: 13px; color: var(--secondary); }
.shortcut-hint kbd { font-family: inherit; font-size: 12px; font-weight: 700; padding: 2px 6px; border: 1px solid var(--border); background: var(--bg-hover); }
[data-theme="dark"] .shortcut-hint kbd { border-color: #2d333b; background: #1C1C1E; }

/* ── Hero Section ── */
.hero { text-align: center; padding: 64px 0; }
.hero-wordmark { height: 48px; width: auto; margin-bottom: 24px; }
.hero-tagline { font-size: 22px; font-weight: 400; max-width: 60ch; margin: 0 auto 12px; line-height: 1.4; }
.hero-subtitle { font-size: 14px; color: var(--secondary); }
[data-theme="dark"] .hero-wordmark { filter: invert(1); }

/* ── Service Grid ── */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.service-card { border: 1px solid var(--border); padding: 24px; transition: border-color .15s; }
.service-card:hover { border-color: var(--text); }
.service-card .service-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.service-card .service-desc { font-size: 13px; color: var(--secondary); line-height: 1.5; }
[data-theme="dark"] .service-card { border-color: #2d333b; }

/* ── Pricing Table ── */
.pricing-card { border: 1px solid var(--border); padding: 24px; margin-bottom: 16px; }
.pricing-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.pricing-row:last-child { border-bottom: none; }
.pricing-label { font-size: 14px; }
.pricing-value { font-size: 14px; font-weight: 700; font-feature-settings: 'tnum' 1; }
.pricing-value.highlight { color: var(--accent); }
[data-theme="dark"] .pricing-card { border-color: #2d333b; }

/* ── Contact Block ── */
.contact-block { margin-bottom: 16px; }
.contact-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); margin-bottom: 4px; }
.contact-value { font-size: 14px; }
.contact-value a { color: var(--text); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); transition: border-color .15s; }
.contact-value a:hover { border-bottom-color: var(--accent); }

/* ── Responsive ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  /* ── Kill horizontal overflow at the root ── */
  html { overflow-x: hidden; }
  body { padding: 0 20px 24px; font-size: 14px; overflow-x: hidden; max-width: 100vw; }

  /* ── Typography scale ── */
  h1 { font-size: 26px; }
  .section > summary { font-size: 18px; padding-bottom: 6px; }
  .subtitle { font-size: 13px; }

  /* ── Header ── */
  .sticky-header { padding: 0 20px; margin: 0 -20px; flex-wrap: wrap; gap: 0; }
  .sticky-header .wordmark { width: 100%; padding: 10px 0 6px; }
  .wordmark-text { height: 24px !important; max-height: 24px; }
  .sticky-nav { width: calc(100% + 40px); overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 8px; margin-left: -20px; padding-left: 20px; padding-right: 20px; }
  .sticky-nav a { white-space: nowrap; padding: 8px 12px 6px; font-size: 13px; font-weight: 400; }
  .sticky-nav a:first-child { padding-left: 0; }

  /* ── Hide TOC ── */
  .toc { display: none; }

  /* ── Page header ── */
  .page-header { padding-top: 24px; margin-bottom: 20px; }

  /* ── Sections ── */
  .section { scroll-margin-top: 90px; margin-bottom: 32px; }

  /* ── All boxes: contain overflow ── */
  .specimen-box { padding: 16px; overflow: hidden; }
  .showcase-box { padding: 16px; overflow: hidden; }

  /* ── Grids: single column ── */
  .logo-grid { grid-template-columns: 1fr; gap: 12px; }
  .logo-cell { padding: 24px; min-height: 100px; }
  .mascot-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .anim-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .color-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .color-swatch .swatch-block { height: 56px; }
  .compare-cols { grid-template-columns: 1fr; gap: 16px; }
  .compare-3col { grid-template-columns: 1fr; gap: 16px; }
  .compare-5col { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* ── Stat cards ── */
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 32px; }
  .stat-card .stat-label { font-size: 10px; }

  /* ── Tables: wrapped in scroll container ── */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }

  /* ── Timeline: stacked ── */
  .timeline-c .tl-entry { flex-wrap: wrap; gap: 2px; }
  .timeline-c .tl-date { min-width: auto; font-size: 12px; }
  .timeline-c .tl-line { display: none; }
  .timeline-c .tl-content { text-align: left; width: 100%; font-size: 13px; color: var(--secondary); }

  /* ── Metrics: single column, contained ── */
  .metric-a { grid-template-columns: 1fr; gap: 16px; }
  .metric-a-item { text-align: left; }
  .metric-a-cols { justify-content: flex-start; }
  .metric-a-val { font-size: 22px; }
  .metric-a-bar { max-width: 100%; }

  /* ── Charts: contained ── */
  .bar-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sparkline-wrap { flex-direction: column; align-items: flex-start !important; gap: 12px !important; }
  .sparkline-wrap svg { max-width: 100%; height: auto; }
  .dot-chart { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

  /* ── Kanban: stack columns ── */
  .kanban-a { flex-direction: column; overflow: hidden; }
  .kanban-a-col { min-width: auto; }
  .kanban-b-item { font-size: 13px; }
  .kanban-c-row { font-size: 13px; gap: 8px; }
  .kanban-c-stage { min-width: 70px; font-size: 10px; }

  /* ── Tags: wrap ── */
  .tag { font-size: 10px; padding: 3px 8px; margin: 0 4px 4px 0; }

  /* ── Breadcrumbs: smaller ── */
  .breadcrumb { font-size: 13px; }
  .breadcrumb .bc-sep { margin: 0 4px; }

  /* ── Pagination ── */
  .pg-btn { padding: 5px 8px; font-size: 12px; }

  /* ── Hero ── */
  .hero { padding: 32px 0; }
  .hero-wordmark { height: 32px; max-width: 80%; }
  .hero-tagline { font-size: 16px; }
  .hero-subtitle { font-size: 12px; }

  /* ── Service/Pricing/Contact ── */
  .service-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 16px; }
  .pricing-row { padding: 8px 0; }

  /* ── Platform Breakdown ── */
  .platform-breakdown { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .platform-card { padding: 12px 8px; }
  .platform-card .num { font-size: 22px; }

  /* ── Alerts ── */
  .alert-b { font-size: 13px; padding: 10px 12px; }

  /* ── Callouts ── */
  .callout { font-size: 13px; padding: 12px 16px; }

  /* ── Footer: row 1 = meta + wordmark, row 2 = controls ── */
  .page-footer { padding: 12px 20px; margin: 24px -20px 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 8px; align-items: center; }
  .footer-meta { font-size: 10px; grid-column: 1; grid-row: 1; }
  .footer-brand { grid-column: 2; grid-row: 1; margin-left: 0; }
  .footer-brand .footer-wordmark-text { height: 20px; }
  .footer-brand .footer-brain-gif { height: 20px; width: 20px; }
  .footer-controls { grid-column: 1 / -1; grid-row: 2; }
  .footer-btn { font-size: 10px; padding: 3px 8px; }

  /* ── Modals: full width ── */
  .slide-panel { width: 100vw; max-width: 100vw; padding: 24px; }
  .modal-card { max-width: 92%; padding: 20px; }

  /* ── Forms ── */
  .form-b input[type="text"], .form-b textarea, .form-b select { font-size: 14px; }
}

/* ── Extra small (phones in portrait) ── */
@media (max-width: 414px) {
  body { padding: 0 16px 16px; }
  h1 { font-size: 22px; }
  .sticky-header { padding: 0 16px; margin: 0 -16px; }
  .sticky-nav { width: calc(100% + 32px); margin-left: -16px; padding-left: 16px; padding-right: 16px; }
  .sticky-nav a { font-size: 12px; padding: 8px 10px 6px; }
  .stat-cards { grid-template-columns: 1fr; }
  .stat-card .stat-value { font-size: 28px; }
  .mascot-grid { grid-template-columns: 1fr; }
  .anim-grid { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: repeat(2, 1fr); }
  .page-footer { flex-direction: column; align-items: flex-start; }
  .metric-a-val { font-size: 20px; }
}
@media print {
  .sticky-header, .sticky-nav { position: static; }
  .page-footer { position: static; }
  table { width: 100%; white-space: normal; }
  details { display: block; }
  details > summary { pointer-events: none; }
  details > summary .toggle { display: none; }
  .footer-controls { display: none; }
}
