/* ──────────────────────────────────────────────────────────
   kalo · brand guideline site
   Pure white, grayscale, Aeonik everywhere.
────────────────────────────────────────────────────────── */

/* Aeonik · local, served from repo-level /fonts */
@font-face {
  font-family: "Aeonik";
  src: url("/fonts/Aeonik-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/fonts/Aeonik-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/fonts/Aeonik-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/fonts/Aeonik-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("/fonts/Aeonik-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Use Aeonik's tabular figures for any numeric / eyebrow context */
.eyebrow, .type-sample.data, .type-sample.mono-caption, .hex, .swatch-meta,
.share-kcal, .share-macro-value, .share-macro-unit, .share-timestamp,
.data-val, .data-unit, .data, code, kbd, samp {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

/* ──────────────────────────────────────────────────────────
   Design tokens
────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;

  /* Type · Aeonik across the board.
     --font-label is the same face used in label/eyebrow/meta roles
     (small-caps style, uppercase, tracked). Named separately for
     semantic clarity — NOT a monospace font. */
  --font-sans:  "Aeonik", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  "Aeonik", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-label: "Aeonik", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* ── Color palette ──────────────────────────────────────
     PRIMARY · foundation
     Ghost White / Ink / Stone
  */
  --primary-white:      #F8F8FF;
  --primary-ink:        #000000;
  --primary-stone:      #D4C5B0;

  /* SECONDARY · deep forest green */
  --secondary-night:    #0A1A0F;  /* dark surfaces, editorial */
  --secondary-forest:   #1A5C35;  /* UI, buttons, brand marks */
  --secondary-sage:     #5A9E78;  /* tints, states, surfaces  */

  /* TERTIARY · warm amber */
  --tertiary-amber:     #C49A6C;  /* highlights, CTAs on dark  */
  --tertiary-umber:     #8C6540;  /* depth, type accents        */
  --tertiary-wheat:     #F2DEB8;  /* warm background washes     */

  /* Gray scale */
  --gray-100: #fafafa;
  --gray-200: #eaeaea;
  --gray-300: #d4d4d4;
  --gray-400: #a1a1a1;
  --gray-500: #757575;
  --gray-600: #525252;
  --gray-700: #323232;
  --gray-800: #1f1f1f;
  --gray-900: #171717;
  --gray-1000: #000;

  /* Semantic · ghost-white bg · forest green accent · warm ink */
  --ink: #1a1a1a;
  --accent: var(--secondary-forest);      /* #1A5C35 · forest green */
  --accent-deep: var(--secondary-night);  /* #0A1A0F · dark forest */

  --bg: var(--primary-white);
  --bg-subtle: #f2f2f7;
  --border: rgba(0, 0, 0, 0.09);
  --fg: var(--ink);
  --fg-muted: rgba(26, 26, 26, 0.65);
  --fg-subtle: rgba(26, 26, 26, 0.42);
  --code-bg: rgba(163, 82, 0, 0.07);

  /* Geist semantic palette */
  --color-success:     #45a557;
  --color-success-bg:  #eff7ef;
  --color-danger:      #e5484d;
  --color-danger-bg:   #fff0f0;
  --color-info:        #0072f5;
  --color-info-bg:     #f0f7ff;
  --color-system:      #12a594;
  --color-system-bg:   #eefcf9;

  /* Layout */
  --max-width: 960px;
  --gutter: 32px;
  --section-gap: 120px;
  --block-gap: 48px;
}

/* Dark theme · neutral charcoal */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E0E0E0;
    --accent: #E0E0E0;
    --accent-deep: #B0B0B0;

    --bg: #121212;
    --bg-subtle: #1e1e1e;
    --border: rgba(255, 255, 255, 0.1);
    --fg: #E0E0E0;
    --fg-muted: #B0B0B0;
    --fg-subtle: #888888;
    --code-bg: rgba(242, 162, 13, 0.09);

    --color-success:     #60c073;
    --color-success-bg:  #0b2212;
    --color-danger:      #ff6166;
    --color-danger-bg:   #2a1314;
    --color-info:        #0091ff;
    --color-info-bg:     #0f1c2e;
    --color-system:      #0ac7b4;
    --color-system-bg:   #042023;
  }
}
:root[data-theme="dark"] {
  --ink: #E0E0E0;
  --accent: #E0E0E0;
  --accent-deep: #B0B0B0;

  --bg: #121212;
  --bg-subtle: #1e1e1e;
  --border: rgba(255, 255, 255, 0.1);
  --fg: #E0E0E0;
  --fg-muted: #B0B0B0;
  --fg-subtle: #888888;
  --code-bg: rgba(242, 162, 13, 0.09);

  --color-success:     #60c073;
  --color-success-bg:  #0b2212;
  --color-danger:      #ff6166;
  --color-danger-bg:   #2a1314;
  --color-info:        #0091ff;
  --color-info-bg:     #0f1c2e;
  --color-system:      #0ac7b4;
  --color-system-bg:   #042023;
}

/* Anchor offset so sticky topbar never covers section headings */
section[id] {
  scroll-margin-top: 96px;
}

/* Skip link · hidden until keyboard-focused */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  border-radius: 6px;
  transform: translateY(-200%);
  transition: transform 0.18s ease;
  z-index: 100;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: none;
}

/* Focus rings · quiet but visible */
a:focus-visible,
button:focus-visible,
.swatch:focus-visible,
.wordmark:focus-visible,
.sidenav nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Motion discipline · honor reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Base ── */
body {
  font-family: var(--font-sans);
  font-size: 1.25rem;    /* 20px */
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01";
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout shell ── */
.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.25rem;    /* 20px */
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-meta {
  font-family: var(--font-label);
  font-size: 0.75rem;    /* 12px */
  color: var(--fg-subtle);
  letter-spacing: 0;
}

/* Theme toggle · cycles auto → light → dark. Three SVGs inside; CSS shows the active one. */
.theme-toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}
.theme-toggle svg {
  width: 14px;
  height: 14px;
  display: block;
}
/* Icon visibility · default (no data-theme) shows auto; explicit themes show their icon */
.theme-toggle .icon-auto,
.theme-toggle .icon-light,
.theme-toggle .icon-dark { display: none; }
:root:not([data-theme]) .theme-toggle .icon-auto,
:root[data-theme="auto"] .theme-toggle .icon-auto { display: block; }
:root[data-theme="light"] .theme-toggle .icon-light { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: block; }

/* Download trigger · single-click opens browser print dialog */
.download-trigger {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.download-trigger:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}
.download-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.download-trigger svg {
  width: 14px;
  height: 14px;
  display: block;
}

.topbar-link {
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.topbar-link:hover { border-bottom-color: var(--fg); }

.meta-link {
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.meta-link:hover { border-bottom-color: var(--fg); }

/* ──────────────────────────────────────────────────────────
   Sections
────────────────────────────────────────────────────────── */

main > .shell > section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--border);
}

main > .shell > section:first-of-type {
  padding-top: var(--section-gap);
}

main > .shell > section:last-of-type {
  border-bottom: none;
}

/* Eyebrow — uppercase label, canonically tracked at 0.04em */
.eyebrow {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.6875rem;  /* 11px */
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Chip (replaces old tagline pill) */
.tagline {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.6875rem;  /* 11px */
  font-weight: 500;
  color: var(--fg-muted);
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 2.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Section headings ──
   Display: 48px / 500 / -0.044em  (matches type specimen)
   Heading:  36px / 500 / -0.037em (matches type specimen)
   Both use fluid sizing so they breathe at wider viewports.  */
.hero-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem); /* 28–40px */
  line-height: 1.08;
  letter-spacing: -0.044em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 2.75rem);  /* 32–44px */
  line-height: 1.12;
  letter-spacing: -0.037em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lead, .thesis {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.25rem;    /* 20px · on the scale between body and heading */
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
  letter-spacing: -0.009em;
}

.thesis {
  font-size: 1.25rem;
  color: var(--fg-muted);
}

/* ── Hero meta row ── */
.meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-item .label {
  font-family: var(--font-label);
  font-size: 0.6875rem;  /* 11px */
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.meta-item .value {
  font-size: 1rem;       /* 16px */
  color: var(--fg);
}

/* ──────────────────────────────────────────────────────────
   Positioning table
────────────────────────────────────────────────────────── */
.positioning-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 48px;
  font-size: 16px;
}
.positioning-table th,
.positioning-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.positioning-table th {
  font-weight: 500;
  font-family: var(--font-label);
  font-size: 0.6875rem;  /* 11px */
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--fg);
  background: var(--bg-subtle);
}
.positioning-table td:first-child { font-weight: 500; color: var(--fg); }
.positioning-table td:not(:first-child) { color: var(--fg-muted); }
.positioning-table tbody tr:hover td { background: var(--bg-subtle); }

blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 20px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--accent);
  max-width: 640px;
  letter-spacing: -0.011em;
}

/* Three-lever creed · exclusivity · identity · storytelling */
.creed {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
  border-top: 1px solid var(--border);
}
.creed li {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
}
.creed .creed-key {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--accent);
}
.creed .creed-line {
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  letter-spacing: -0.011em;
}
@media (max-width: 640px) {
  .creed li { grid-template-columns: 1fr; gap: 4px; }
}

/* ──────────────────────────────────────────────────────────
   Pillars · 4-up card grid
────────────────────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.pillar {
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.pillar:last-child { border-right: none; }

.pillar .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 24px;
  display: block;
}
.pillar h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.017em;
  color: var(--accent);
}
.pillar p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(2n) { border-right: none; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* ──────────────────────────────────────────────────────────
   Voice do/don't grid
────────────────────────────────────────────────────────── */
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.voice-row {
  display: contents;
}

.voice-cell {
  padding: 16px 0 16px 16px;
  font-size: 15px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  border-left: 2px solid transparent;
}

.voice-cell.dont {
  border-left-color: #e05c5c;
  padding-right: 24px;
}

.voice-cell.do {
  border-left-color: #4a9e6a;
  padding-left: 24px;
}

.voice-cell .label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.voice-cell.dont .quote {
  color: var(--fg-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #e05c5c;
}

.voice-cell.do .quote { color: var(--fg); }

@media (max-width: 768px) {
  .voice-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Palette · grouped swatches
────────────────────────────────────────────────────────── */
.palette-group {
  margin-bottom: 32px;
}

.palette-group h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  transition: transform 0.12s ease, border-color 0.12s ease;
  text-align: left;
}

.swatch:hover { border-color: var(--fg); }
.swatch:active { transform: scale(0.99); }

.swatch-swatch {
  height: 80px;
  width: 100%;
  display: block;
}

.swatch-meta {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swatch-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}
.swatch-hex {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
}

@media (max-width: 768px) {
  .palette-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Themes-at-a-glance row */
.theme-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.theme-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.theme-card .theme-preview {
  height: 96px;
  position: relative;
}
.theme-card .theme-label {
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  border-top: 1px solid var(--border);
}
.theme-card .theme-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  font-weight: 400;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .theme-row { grid-template-columns: 1fr 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Typography specimens
────────────────────────────────────────────────────────── */
.type-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  margin: 8px 0 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.type-download:hover {
  border-color: var(--fg);
  background: var(--bg-subtle);
}
.type-download-key {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.type-download-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--fg);
}
.type-download-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}
.type-download-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.type-download:hover .type-download-cta { color: var(--fg); }

.type-specimen {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.type-specimen:last-child { border-bottom: none; }

.type-meta {
  font-family: var(--font-label);
  font-size: 0.75rem;    /* 12px */
  color: var(--fg-subtle);
  line-height: 1.5;
}

.type-sample { color: var(--fg); }

/* Type scale · canonical reference.
   All downstream heading/lead classes must match these values. */
.type-sample.display {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 3rem;       /* 48px */
  line-height: 1.08;
  letter-spacing: -0.044em;
}
.type-sample.heading {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.75rem;    /* 28px */
  line-height: 1.15;
  letter-spacing: -0.037em;
}
.type-sample.body {
  font-family: var(--font-sans);
  font-size: 1rem;       /* 16px */
  line-height: 1.55;
  letter-spacing: -0.011em;
}
.type-sample.caption {
  font-family: var(--font-sans);
  font-size: 1rem;       /* 16px */
  color: var(--fg-muted);
  line-height: 1.5;
  letter-spacing: -0.006em;
}
.type-sample.data {
  font-family: var(--font-label);
  font-size: 1.5rem;     /* 24px */
  font-weight: 500;
  letter-spacing: -0.01em;
}
.type-sample.mono-caption {
  font-family: var(--font-label);
  font-size: 0.6875rem;  /* 11px */
  font-weight: 500;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .type-specimen { grid-template-columns: 1fr; gap: 8px; }
}

/* ──────────────────────────────────────────────────────────
   Logo section
────────────────────────────────────────────────────────── */
.logo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 40px;
}

.logo-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  min-height: 160px;
  z-index: 1;
}
/* Tile that owns an open popover floats above its neighbours so the
   popover can overflow the narrow 1fr column and cascade over the
   adjacent wordmark tile / the presskit strip below. */
.logo-tile:has(.logo-download-trigger[aria-expanded="true"]) {
  z-index: 30;
}

.logo-wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 72px;
  letter-spacing: -0.049em;
  color: var(--fg);
  line-height: 1;
}

.logo-mark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 96px;
  letter-spacing: -0.049em;
  color: var(--fg);
  line-height: 1;
}

.logo-tile-thin {
  background: #000;
  border-color: #000;
}

.logo-wordmark-thin,
.logo-mark-thin {
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.03em;
}

/* Keep the download trigger legible on the black tile. The popover itself
   stays on --bg so its matrix reads normally against the dark chrome. */
.logo-tile-thin .logo-download-trigger {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
}
.logo-tile-thin .logo-download-trigger:hover,
.logo-tile-thin .logo-download-trigger[aria-expanded="true"] {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.logo-rules {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.logo-rules li {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.55;
}

.logo-rules li strong {
  display: block;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .logo-grid { grid-template-columns: 1fr; }
  .logo-rules { grid-template-columns: 1fr; }
}

/* Per-tile download control · mirrors the header download menu tokens
   (border, radius, bg, font-mono) so the two controls feel like one family. */
.logo-download-trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.logo-download-trigger:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}
.logo-download-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.logo-download-trigger[aria-expanded="true"] {
  color: var(--fg);
  border-color: var(--fg-muted);
}

/* Elevated popover surface · must stay visibly lifted from the page in
   both themes. In dark mode --bg is near-black (#0a0f0c), which is the
   same color the body paints, so a popover that overflows its narrow
   tile onto the body would otherwise disappear. We pin an elevated
   token that's distinct from --bg and mirror the site's dark-mode
   resolution (OS dark unless user forced light, OR user forced dark). */
:root {
  --popover-bg: #ffffff;
  --popover-border: rgba(0, 0, 0, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --popover-bg: #1a241d;
    --popover-border: rgba(238, 240, 236, 0.24);
  }
}
:root[data-theme="dark"] {
  --popover-bg: #1a241d;
  --popover-border: rgba(238, 240, 236, 0.24);
}

.logo-download-popover {
  position: absolute;
  top: calc(100% - 8px);
  right: 12px;
  width: 340px;
  padding: 12px;
  background: var(--popover-bg);
  border: 1px solid var(--popover-border);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
  z-index: 30;
}
.logo-download-popover[hidden] { display: none; }

.logo-download-matrix {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 2px 6px;
  align-items: center;
}
.logo-download-matrix .col-head {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 4px 0 6px;
  text-align: center;
}
.logo-download-matrix .col-head:first-child { text-align: left; }
.logo-download-matrix .row-label {
  font-size: 12px;
  color: var(--fg);
  letter-spacing: -0.005em;
  padding: 6px 4px 6px 0;
  white-space: nowrap;
}
.logo-download-cell {
  width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}
.logo-download-cell:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
  background: var(--bg-elev, rgba(0, 0, 0, 0.04));
}
.logo-download-cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.logo-download-cell svg {
  width: 12px;
  height: 12px;
  display: block;
}

.logo-download-zip {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.logo-download-zip:hover {
  background: var(--bg-elev, rgba(0, 0, 0, 0.04));
}
.logo-download-zip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.logo-download-zip[disabled] {
  cursor: progress;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .logo-download-popover {
    width: auto;
    left: 12px;
    right: 12px;
  }
  .logo-download-matrix {
    grid-template-columns: 1fr auto auto auto auto;
    gap: 2px 4px;
  }
  .logo-download-cell { width: 30px; }
}

/* ──────────────────────────────────────────────────────────
   Logo · press kit + visual rule diagrams
   Mixpanel-style "show, don't tell" surfaces: clear-space,
   min-size, color-usage, don'ts. All scoped to #logo so the
   patterns don't leak into other sections.
────────────────────────────────────────────────────────── */

/* Press-kit bar · one-click download for both logos */
#logo .logo-presskit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
#logo .logo-presskit-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--fg-muted);
}
#logo .logo-presskit-text strong {
  color: var(--fg);
  font-weight: 500;
  font-size: 16px;
}
#logo .logo-presskit-button {
  flex-shrink: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
#logo .logo-presskit-button:hover { background: var(--bg-elev, rgba(0, 0, 0, 0.04)); }
#logo .logo-presskit-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#logo .logo-presskit-button[disabled] { cursor: progress; opacity: 0.7; }

/* Diagram wrapper · common rhythm for the four visual rules */
#logo .logo-diagram {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
#logo .logo-diagram-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 8px;
}
#logo .logo-diagram-caption {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 62ch;
}

/* Clear-space stages */
#logo .logo-clearspace-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
#logo .logo-clearspace-stage {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 24px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#logo .logo-clearspace-stage svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* Min-size row · true-size samples */
#logo .logo-minsize-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#logo .logo-minsize-cell {
  margin: 0;
  padding: 36px 24px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 160px;
}
#logo .logo-minsize-sample {
  display: flex;
  align-items: center;
  justify-content: center;
}
#logo .logo-minsize-sample svg { display: block; }
#logo .logo-minsize-cell figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  text-align: center;
}
#logo .logo-minsize-cell figcaption .mono { color: var(--fg); }

/* Color-usage cells · three approved colorways */
#logo .logo-colors-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#logo .logo-colors-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#logo .logo-colors-sample {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#logo .logo-colors-sample svg {
  width: 70%;
  height: auto;
  display: block;
}
#logo .logo-colors-cell figcaption {
  font-size: 16px;
  color: var(--fg-muted);
}

/* Don'ts · 3x2 grid of misuse tiles with red Ø overlay */
#logo .logo-donts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#logo .logo-donts-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#logo .logo-donts-sample {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#logo .logo-donts-sample svg {
  width: 70%;
  height: auto;
  display: block;
}
#logo .logo-donts-cell figcaption {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  #logo .logo-presskit { flex-direction: column; align-items: stretch; }
  #logo .logo-presskit-button { align-self: flex-start; }
  #logo .logo-clearspace-row,
  #logo .logo-minsize-row,
  #logo .logo-colors-row { grid-template-columns: 1fr; }
  #logo .logo-donts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  #logo .logo-donts-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Share cards (static mockups)
────────────────────────────────────────────────────────── */
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

/* Share cards are product mocks · they keep their absolute product colors
   in both light and dark site themes (a "dark share card" must look dark
   regardless of what theme the guide is viewed under). */
.share-card {
  aspect-ratio: 4 / 5;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #ffffff;
  color: #000000;
}

.share-card.light {
  background: #ffffff;
  color: #000000;
  border-color: rgba(0, 0, 0, 0.12);
}

.share-card.dark {
  background: #000000;
  color: #fafafa;
  border-color: #000000;
}

.share-card.streak {
  background: #f6f3ee;
  color: #000000;
  border-color: rgba(0, 0, 0, 0.12);
}

.sc-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.022em;
  margin-bottom: 12px;
}

.share-card .sc-macros {
  display: flex;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid currentColor;
  border-top-color: rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-top: auto;
}
.share-card.light .sc-macros,
.share-card.streak .sc-macros {
  border-top-color: rgba(0, 0, 0, 0.12);
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

.sc-macro {
  display: flex;
  flex-direction: column;
}
.sc-macro .n {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.sc-macro .u {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.sc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.6;
  margin-top: 12px;
}

.sc-wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  opacity: 1;
  margin-right: auto;
}

.streak-num {
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.streak-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.017em;
}

.share-rules {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.share-rules li {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .share-grid { grid-template-columns: 1fr; }
  .share-rules { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Architecture diagram
────────────────────────────────────────────────────────── */
.arch {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  background: var(--bg);
  margin-bottom: 32px;
}

.arch-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.arch-node {
  text-align: center;
  padding: 16px 24px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  background: var(--bg);
  min-width: 140px;
}
.arch-node .name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.017em;
  display: block;
}
.arch-node .desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  margin-top: 4px;
  display: block;
}

.arch-children {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  position: relative;
}

.arch-children::before {
  content: "";
  position: absolute;
  top: -32px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--border);
}

.arch-children .arch-node {
  border: 1px solid var(--border);
  position: relative;
}

.arch-children .arch-node::before {
  content: "";
  position: absolute;
  top: -32px;
  left: 50%;
  width: 1px;
  height: 32px;
  background: var(--border);
}

.arch-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.arch-list li {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.55;
}
.arch-list li strong {
  display: block;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

@media (max-width: 768px) {
  .arch-children { grid-template-columns: 1fr; }
  .arch-children::before { display: none; }
  .arch-children .arch-node::before { display: none; }
  .arch-list { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Footer
────────────────────────────────────────────────────────── */
footer {
  padding: 60px 0 80px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

/* ──────────────────────────────────────────────────────────
   Toast
────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ──────────────────────────────────────────────────────────
   Responsive
────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --section-gap: 80px; --gutter: 20px; }
  .meta-row { grid-template-columns: 1fr 1fr; gap: 20px; }
  .topbar { padding: 16px var(--gutter); }
  .hero-display .meta-row { grid-template-columns: 1fr 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Layout + sidenav (desktop only)
────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  align-items: flex-start;
}

.sidenav {
  display: none;
  position: sticky;
  top: 72px;
  align-self: flex-start;
  width: 240px;
  flex-shrink: 0;
  padding: 72px 0 72px 28px;
  border-right: 1px solid var(--border);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidenav nav ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidenav nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 14px 6px 14px;
  margin-left: -16px;
  margin-right: 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.sidenav nav a .n {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  min-width: 16px;
  letter-spacing: 0.02em;
}

.sidenav nav a:hover {
  color: var(--fg);
}

.sidenav nav a.is-active {
  color: var(--fg);
  border-left-color: var(--fg);
}

.sidenav nav a.is-active .n {
  color: var(--fg);
}

main {
  flex: 1;
  min-width: 0;
}

@media (min-width: 1100px) {
  .sidenav { display: block; }
  main > .shell { max-width: 860px; margin: 0 auto; padding-left: 56px; padding-right: 56px; }
  .section--dark,
  .section--warm {
    margin-left: -56px;
    margin-right: -56px;
    padding-left: 56px;
    padding-right: 56px;
  }
}

/* ──────────────────────────────────────────────────────────
   Section colour variants · dark + warm
   These break the white monotony by painting full-bleed
   Forest Night or Wheat sections. Text tokens are redefined
   inside each variant so child components (swatch, canon,
   pillars, etc.) inherit correct contrast automatically.
────────────────────────────────────────────────────────── */

/* Full-bleed: the section must sit outside .shell constraints */
.section--dark,
.section--warm {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section--dark {
  background: #0A1A0F;
  --bg: #0A1A0F;
  --bg-subtle: #0f2416;
  --border: rgba(255,255,255,0.10);
  --fg: #F2DEB8;
  --fg-muted: rgba(242,222,184,0.60);
  --fg-subtle: rgba(242,222,184,0.38);
  --ink: #F2DEB8;
  --accent: #C49A6C;
  --accent-deep: #F2DEB8;
  --code-bg: rgba(196,154,108,0.12);
}

.section--warm {
  background: #F2DEB8;
  --bg: #F2DEB8;
  --bg-subtle: #ecdbb1;
  --border: rgba(0,0,0,0.09);
  --fg: #1a1a1a;
  --fg-muted: rgba(26,26,26,0.65);
  --fg-subtle: rgba(26,26,26,0.42);
  --accent: #0A1A0F;
  --accent-deep: #1A5C35;
}

/* Hero display · oversized centered wordmark moment */
.hero-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100svh;
  padding: 0 var(--gutter);
  position: relative;
}

.hero-display .hero-kalo {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(5rem, 16vw, 10rem);
  letter-spacing: -0.049em;
  color: #F2DEB8;
  line-height: 0.9;
  margin-bottom: 2rem;
  display: block;
}

.hero-display .hero-subline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.375rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: rgba(242,222,184,0.55);
  margin-bottom: 4rem;
  max-width: 480px;
}

.hero-display .meta-row {
  width: 100%;
  max-width: 680px;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 40px;
}

.hero-display .meta-item .label {
  color: rgba(242,222,184,0.38);
}

.hero-display .meta-item .value {
  color: rgba(242,222,184,0.72);
}

.hero-display .meta-link {
  color: rgba(242,222,184,0.72);
}

/* Hero: simple docs-style, white bg, left-aligned */
.page-hero {
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
}

.page-hero .shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-hero-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.048em;
  line-height: 1;
  color: var(--fg);
  margin: 12px 0 16px;
}

.page-hero-sub {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  margin-bottom: 40px;
}

@media (min-width: 1100px) {
  .page-hero .shell { max-width: 860px; padding-left: 56px; padding-right: 56px; }
}

/* ──────────────────────────────────────────────────────────
   Voice · principles + tone subsections
────────────────────────────────────────────────────────── */
.sub-heading {
  font-family: var(--font-sans);
  font-size: 1rem;       /* 16px · readable heading, not a label */
  font-weight: 500;
  color: var(--fg);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
}

.sub-heading:first-of-type {
  margin-top: 24px;
}

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.principle {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.principle .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 16px;
  display: block;
  letter-spacing: 0.02em;
}

.principle h4 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--accent);
  margin-bottom: 6px;
}

.principle p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .principles { grid-template-columns: 1fr; }
}

.tone-grid {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.tone-row {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 1.4fr;
  gap: 24px;
  padding: 20px 24px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 16px;
  line-height: 1.55;
}

.tone-row:last-child { border-bottom: none; }

.tone-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-subtle);
  white-space: nowrap;
}

.tone-desc {
  font-size: 1rem;       /* 16px */
  line-height: 1.6;
  color: var(--fg-muted);
}

.tone-sample {
  font-size: 1rem;       /* 16px */
  font-style: italic;
  color: var(--fg-muted);
  font-family: var(--font-sans);
}

@media (max-width: 768px) {
  .tone-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
}

/* Arch node emphasis · teal (structural/system signal) */
.arch-node .name { color: var(--color-system); }

/* Voice do/don't semantic colors handled in voice-cell block above */

/* ──────────────────────────────────────────────────────────
   Content section · pipeline ASCII, mix cards, pillar 5-up
────────────────────────────────────────────────────────── */
/* Pipeline flow · vertical spine of numbered stage cards */
.pipeline-flow {
  list-style: none;
  position: relative;
  padding: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pipeline-flow::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 16px;
  width: 1px;
  background: var(--border);
}

.pipeline-stage {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
}

.stage-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--fg);
  letter-spacing: 0.02em;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.stage-body {
  padding-top: 4px;
  min-width: 0;
}

.stage-name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.022em;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1.2;
}

.stage-desc {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  letter-spacing: -0.008em;
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  line-height: 1.3;
}

.stage-branches {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
  background: var(--bg);
}

.branch {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 16px;
  line-height: 1.55;
}

.branch:last-child { border-bottom: none; }

.branch-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-system);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.branch-desc {
  color: var(--fg-muted);
}

.branch code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .branch {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .pipeline-stage { gap: 16px; }
}

/* Mix cards · 3-up pillar variant with percentage lede */
.mix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.mix-cell {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.mix-cell:last-child { border-right: none; }
.mix-cell .pct {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.028em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  display: block;
}
.mix-cell .name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}
.mix-cell p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.5;
}
@media (max-width: 768px) {
  .mix { grid-template-columns: 1fr; }
  .mix-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .mix-cell:last-child { border-bottom: none; }
}

/* 3-up pillars for editorial post cards */
.pillars.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .pillars.three { grid-template-columns: 1fr; }
  .pillars.three .pillar { border-right: none; border-bottom: 1px solid var(--border); }
  .pillars.three .pillar:last-child { border-bottom: none; }
}
.pillar .why {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.pillar .why strong { color: var(--fg); font-weight: 500; margin-right: 4px; }

/* 5-up pillars for content · slightly denser than the brand pillars */
.pillars.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
  .pillars.five { grid-template-columns: repeat(2, 1fr); }
  .pillars.five .pillar { border-right: 1px solid var(--border); }
  .pillars.five .pillar:nth-child(2n) { border-right: none; }
  .pillars.five .pillar:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .pillars.five { grid-template-columns: 1fr; }
  .pillars.five .pillar { border-right: none; border-bottom: 1px solid var(--border); }
  .pillars.five .pillar:last-child { border-bottom: none; }
}

/* Small lead paragraph under a sub-heading */
.lead-small {
  font-size: 1rem;        /* 16px · matches body, muted colour distinguishes */
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 0 1.5rem;
  letter-spacing: -0.009em;
}

/* Pillar card extras used by Audience block */
.pillar .fit {
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.5;
  margin-top: 6px;
}
.pillar-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* Instagram-style grid preview */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: 560px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
}
.ig-tile {
  aspect-ratio: 1 / 1;
  position: relative;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  background: var(--bg);
}
.ig-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.ig-badge svg { width: 14px; height: 14px; display: block; }
.ig-hook {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.ig-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
}

/* Real tiles · locked colors, independent of theme */
.ig-tile-reel { background: #0d2418; color: #eaf3ea; }
.ig-tile-carousel { background: #f7d7df; color: #192830; }
.ig-tile-still { background: #f6f3ee; color: #192830; }

/* Ghost tiles · planning slots, theme-reactive */
.ig-tile-ghost {
  background: var(--bg-subtle);
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0;
}
.ig-ghost-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ig-ghost-format {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.ig-ghost-segment {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--fg-subtle);
  line-height: 1.35;
  letter-spacing: -0.005em;
}

@media (max-width: 640px) {
  .ig-grid { max-width: 100%; }
  .ig-hook { font-size: 12px; }
  .ig-tile { padding: 10px; }
  .ig-badge { top: 7px; right: 7px; width: 14px; height: 14px; }
  .ig-badge svg { width: 12px; height: 12px; }
}

/* Never list · stacked single-column for scanability */
.never-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.never-list li {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.6;
  background: var(--bg);
}
.never-list li:last-child { border-bottom: none; }
.never-list li strong {
  display: block;
  color: var(--color-danger);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 3px;
}

/* ──────────────────────────────────────────────────────────
   Canonical copy · protected lockup block in Positioning
────────────────────────────────────────────────────────── */
.canon {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.canon li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.canon li:last-child { border-bottom: none; }
.canon .canon-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-info);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.canon .canon-value {
  font-size: 16px;
  color: var(--fg);
  line-height: 1.4;
  letter-spacing: -0.008em;
}
.canon .canon-value.headline {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.028em;
}

/* ──────────────────────────────────────────────────────────
   Spacing scale · visual bar in the spacing table
────────────────────────────────────────────────────────── */
.space-vis {
  vertical-align: middle;
  padding-top: 18px;
  padding-bottom: 18px;
}
.space-bar {
  height: 4px;
  background: var(--fg);
  display: block;
  border-radius: 2px;
  opacity: 0.7;
}

/* ──────────────────────────────────────────────────────────
   Storytelling template · cards preview in brand guide
────────────────────────────────────────────────────────── */
.story-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.sc {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  font-family: var(--font-sans);
}
.sc-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.sc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.28) 0%, transparent 42%,
    transparent 52%, rgba(0,0,0,0.40) 100%);
}
.sc-body {
  position: absolute;
  inset: 0;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sc-hl-em {
  display: block;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.0;
  letter-spacing: -0.022em;
}
.sc-hl-body {
  display: block;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.028em;
}
/* scope footer + wordmark to avoid conflict with .share-card .sc-footer */
.story-preview-grid .sc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 1;
  margin-top: 0;
  font-family: var(--font-sans);
  font-size: 11px;
}
.story-preview-grid .sc-wordmark {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
  opacity: 0.9;
  margin-right: 0;
}
.sc-ts {
  font-size: 10px;
  opacity: 0.6;
  text-align: right;
  line-height: 1.5;
}
.sc-label {
  position: absolute;
  left: 18px;
  top: 54%;
}
.sc-label-cat {
  display: block;
  font-size: 10px;
  font-style: italic;
  opacity: 0.75;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}
.sc-label-val {
  display: block;
  font-size: 11px;
  opacity: 0.88;
  letter-spacing: -0.01em;
}
.sc-white { color: #fff; }
.sc-black { color: #000; }
.sc-no-overlay .sc-overlay { display: none; }

@media (max-width: 640px) {
  .story-preview-grid { grid-template-columns: 1fr; max-width: 240px; }
}

/* ──────────────────────────────────────────────────────────
   Share card v2 · Strava-informed anatomy
   Top: meal-tag. Middle: hero zone (photo/bg shows through).
   Bottom: triptych + footer.
────────────────────────────────────────────────────────── */
.sc-v2 .sc-body {
  padding: 14px;
  justify-content: flex-start;
  gap: 0;
}
/* meal tag: "LUNCH  ·  12:34" */
.sc-meal-tag {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.sc-meal-type {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.62;
}
.sc-meal-time {
  font-size: 9px;
  opacity: 0.38;
}
/* hero zone: fills middle; bg/photo shows through */
.sc-hero-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}
.sc-hero-n {
  display: block;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.sc-hero-u {
  display: block;
  font-size: 10px;
  opacity: 0.48;
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
/* achievement badge pill */
.sc-badge {
  display: inline-flex;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid currentColor;
  opacity: 0.52;
  width: fit-content;
}
/* triptych: three-column stat row */
.sc-triptych {
  display: flex;
  padding: 7px 0;
  margin-bottom: 6px;
  border-top: 1px solid;
  border-bottom: 1px solid;
}
.sc-white .sc-triptych { border-color: rgba(255,255,255,0.16); }
.sc-black .sc-triptych { border-color: rgba(0,0,0,0.11); }
.sc-tri-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sc-tri-cell + .sc-tri-cell {
  padding-left: 9px;
  border-left: 1px solid;
}
.sc-white .sc-tri-cell + .sc-tri-cell { border-color: rgba(255,255,255,0.12); }
.sc-black .sc-tri-cell + .sc-tri-cell { border-color: rgba(0,0,0,0.09); }
.sc-tri-n {
  font-size: clamp(12px, 1.9vw, 17px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.sc-tri-n-hero { font-size: clamp(14px, 2.2vw, 20px); }
.sc-tri-u {
  font-size: 8px;
  opacity: 0.42;
  letter-spacing: 0.03em;
}

/* ──────────────────────────────────────────────────────────
   Motion · easing curve diagrams
────────────────────────────────────────────────────────── */
.motion-curves {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 40px;
}
.motion-curve-cell {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.motion-curve-svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--fg);
}
.motion-curve-label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.012em;
}
.motion-curve-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: -4px;
}

/* ──────────────────────────────────────────────────────────
   Macro donut · data language color encoding
────────────────────────────────────────────────────────── */
.macro-viz {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.macro-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.macro-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
}
.macro-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.macro-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .motion-curves { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────
   Print · save-as-PDF via the browser's native print dialog.
   Hides chrome (topbar, sidenav, toast, buttons), reflows main
   to full width, keeps accent / theme colors, avoids splitting
   blocks across pages.
────────────────────────────────────────────────────────── */
@media print {
  @page { margin: 16mm 14mm; size: A4; }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    --bg: #ffffff;
    --fg: #000000;
    --fg-muted: #444444;
    --fg-subtle: #777777;
    --border: #dddddd;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide interactive chrome */
  .topbar,
  .sidenav,
  .toast,
  .theme-toggle,
  .download-trigger,
  .logo-download-trigger,
  .logo-download-popover,
  .logo-presskit-button { display: none !important; }

  /* Collapse the flex layout so main takes full width */
  .layout { display: block !important; }
  main { flex: none !important; }
  main > .shell {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Section rhythm: let the browser flow naturally, but keep
     logical blocks intact. */
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid-page;
  }
  .section-title,
  .sub-heading,
  .eyebrow { page-break-after: avoid; break-after: avoid-page; }

  .pillar,
  .voice-cell,
  .tone-row,
  .pipeline-stage,
  .ig-tile,
  .mix-cell,
  .share-card,
  .swatch-block,
  .positioning-table tr { page-break-inside: avoid; break-inside: avoid; }

  /* Keep the IG grid as a 3-up even at A4 width. */
  .ig-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 100% !important;
  }

  /* Suppress hover/focus artefacts in print. */
  *:hover, *:focus, *:focus-visible { outline: none !important; }

  /* Don't append raw URLs next to anchors. */
  a[href]::after { content: "" !important; }

  /* Reduce section top-padding slightly for print density. */
  section { padding-top: 32px !important; padding-bottom: 32px !important; }
  .hero-section { padding: 0 !important; min-height: auto !important; }
  .hero-display { min-height: auto !important; padding-top: 32px !important; padding-bottom: 32px !important; }

  /* Flatten section colour variants in print */
  .section--dark,
  .section--warm {
    background: #ffffff !important;
    --bg: #ffffff !important;
    --fg: #000000 !important;
    --fg-muted: #444444 !important;
    --border: #dddddd !important;
    --accent: #000000 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .hero-kalo { color: #000000 !important; }
  .hero-subline { color: #444444 !important; }
}
