/* ============================================================
   Hyundai Card Design System
   ------------------------------------------------------------
   /Users/ruajin/Desktop/Claude/디자인가이드라인/style-hyundaicard.css
   ------------------------------------------------------------
   - Hyundai Card–inspired: zero rounding, pure black/white,
     editorial structure, flat surfaces, strong borders
   - Two presets: hc-light (default), hc-dark
   - Override via theme.js panel (localStorage)
   ============================================================ */

/* ----- Default theme: Hyundai Card Light ----- */
:root,
[data-theme="hc-light"],
[data-theme="toss-light"] {
  color-scheme: light;

  /* Surfaces */
  --bg-primary:   #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary:  #f0f0f0;

  /* Text */
  --text-primary:   #000000;
  --text-secondary: #555555;
  --text-muted:     #999999;

  /* Accent — pure black */
  --accent:      #000000;
  --accent-soft: rgba(0, 0, 0, 0.05);
  --accent-text: #ffffff;

  /* Borders — key design element */
  --border:        #e5e5e5;
  --border-soft:   #f5f5f5;
  --border-strong: #000000;

  /* Code */
  --code-bg:      #f8f8f8;
  --code-text:    #000000;
  --code-keyword: #000000;
  --code-string:  #555555;
  --code-comment: #999999;

  /* Semantic — monochrome */
  --success: #333333;
  --warning: #555555;
  --danger:  #000000;
  --info:    #444444;

  /* Typography */
  --font-sans:    "Neue Haas Grotesk", "Helvetica Neue", "Arial", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Neue Haas Grotesk Display", "Helvetica Neue", "Arial Black", sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;
  --font-size-base: 15px;
  --line-height-base: 1.6;

  /* Layout — ZERO radius everywhere */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;

  /* Shadows — minimal / none */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 2px 20px rgba(0, 0, 0, 0.07);

  --blur-glass: blur(20px);
  --max-width: 760px;

  --bg-decoration: none;
}

/* ----- Hyundai Card Dark ----- */
[data-theme="hc-dark"],
[data-theme="toss-dark"] {
  color-scheme: dark;

  --bg-primary:   #000000;
  --bg-secondary: #111111;
  --bg-tertiary:  #1c1c1c;

  --text-primary:   #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted:     #555555;

  --accent:      #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --accent-text: #000000;

  --border:        #2a2a2a;
  --border-soft:   #1c1c1c;
  --border-strong: #ffffff;

  --code-bg:      #111111;
  --code-text:    #ffffff;
  --code-keyword: #ffffff;
  --code-string:  #aaaaaa;
  --code-comment: #555555;

  --success: #bbbbbb;
  --warning: #aaaaaa;
  --danger:  #ffffff;
  --info:    #cccccc;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 2px 20px rgba(0, 0, 0, 0.6);

  --bg-decoration: none;
}

/* ============================================================
   VISUAL TOKENS — solid black / white, no gradients
   ============================================================ */
:root,
[data-theme="hc-light"],
[data-theme="toss-light"] {
  /* All grad-* vars are solid black — Hyundai Card signature */
  --grad-primary: #000000;
  --grad-success: #000000;
  --grad-warning: #000000;
  --grad-danger:  #000000;
  --grad-violet:  #000000;
  --grad-sunset:  #000000;
  --grad-mint:    #000000;
  --grad-aurora:  #000000;
  --grad-ocean:   #000000;
  --grad-hero-bg: rgba(0, 0, 0, 0.03);
  --grad-card:    #f8f8f8;
}

[data-theme="hc-dark"],
[data-theme="toss-dark"] {
  --grad-primary: #ffffff;
  --grad-success: #ffffff;
  --grad-warning: #ffffff;
  --grad-danger:  #ffffff;
  --grad-violet:  #ffffff;
  --grad-sunset:  #ffffff;
  --grad-mint:    #ffffff;
  --grad-aurora:  #ffffff;
  --grad-ocean:   #ffffff;
  --grad-hero-bg: rgba(255, 255, 255, 0.03);
  --grad-card:    #111111;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary) !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s ease, color 0.2s ease;
  word-break: keep-all;
  overflow-wrap: break-word;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; width: 0; height: 0; }

body {
  background-image: var(--bg-decoration);
  background-attachment: fixed;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--accent-soft); color: var(--text-primary); }

/* ============================================================
   Page container
   ============================================================ */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 28px 160px;
}

/* ============================================================
   Header
   ============================================================ */
.header { margin-bottom: 56px; }
.header .badge { margin-bottom: 18px; }
.header h1 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.045em;
  margin: 0 0 14px;
  color: var(--text-primary);
  line-height: 1.0;
}
.header .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 10px;
}
.header .lede {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 18px;
  line-height: 1.65;
  max-width: 580px;
}

/* ============================================================
   Body typography
   ============================================================ */
.page h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 64px 0 16px;
  color: var(--text-primary);
  line-height: 1.1;
}
.page h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin: 36px 0 10px;
  color: var(--text-primary);
}
.page h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.page p { margin: 0 0 14px; color: var(--text-secondary); }
.page ul, .page ol { margin: 0 0 14px; padding-left: 24px; color: var(--text-secondary); }
.page li { margin-bottom: 6px; }
.page strong { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   Badge — bordered, no fill
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 0px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}
.badge.report { border-color: var(--text-primary); color: var(--text-primary); background: transparent; }
.badge.spec   { border-color: var(--text-muted);  color: var(--text-muted);  background: transparent; }
.badge.note   { border-color: var(--text-muted);  color: var(--text-muted);  background: transparent; }
.badge.data   { border-color: var(--text-muted);  color: var(--text-muted);  background: transparent; }

/* ============================================================
   Inline code & code blocks
   ============================================================ */
.page code,
.code-inline {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 0px;
  font-weight: 500;
}

.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 0px;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid var(--border);
}
.code-block .header-row {
  display: flex;
  justify-content: space-between;
  margin: -18px -20px 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: 11px;
  color: var(--text-muted);
  border-radius: 0px;
  white-space: normal;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.code-block .kw  { color: var(--code-keyword); font-weight: 700; }
.code-block .str { color: var(--code-string); }
.code-block .com { color: var(--code-comment); font-style: italic; }
.code-block .num { color: var(--info); }

/* ============================================================
   Diff
   ============================================================ */
.diff {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
  padding: 10px 0;
  overflow-x: auto;
}
.diff > .row { padding: 2px 20px; white-space: pre; }
.diff > .row.added   { background: rgba(0, 0, 0, 0.04); color: var(--text-secondary); }
.diff > .row.removed { background: rgba(0, 0, 0, 0.06); color: var(--text-primary); }
.diff > .row.context { color: var(--text-muted); }

/* ============================================================
   Tables
   ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: 0px;
  overflow: hidden;
  margin: 14px 0;
  font-size: 14px;
  border: 1px solid var(--border);
}
.table th {
  text-align: left;
  padding: 14px 18px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--text-primary);
}
.table td {
  padding: 14px 18px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.table tr:last-child td { border-bottom: none; }

/* ============================================================
   Key-Value list
   ============================================================ */
.kv {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 0;
  margin: 14px 0;
  border: 1px solid var(--border);
}
.kv .row {
  display: flex;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.kv .row:last-child { border-bottom: none; }
.kv .row .k {
  flex: 1;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}
.kv .row .v {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ============================================================
   Callouts — left border only, no round
   ============================================================ */
.callout {
  position: relative;
  padding: 16px 20px 16px 24px;
  border-radius: 0px;
  font-size: 14px;
  margin: 14px 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-left: 2px solid var(--text-primary);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.callout::before { display: none; }
.callout.info    { border-left-color: var(--text-secondary); }
.callout.warn    { border-left-color: var(--text-primary); }
.callout.danger  { border-left-color: var(--text-primary); background: var(--bg-secondary); }
.callout.success { border-left-color: var(--text-secondary); }
.callout strong  { color: var(--text-primary); }

/* ============================================================
   Quote
   ============================================================ */
.quote {
  padding: 8px 20px;
  border-left: 2px solid var(--text-primary);
  color: var(--text-secondary);
  font-size: 16px;
  margin: 20px 0;
  font-weight: 500;
}
.quote cite {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.quote cite::before { content: "— "; }

/* ============================================================
   TOC
   ============================================================ */
.toc {
  background: transparent;
  border-radius: 0px;
  padding: 20px 24px;
  margin: 20px 0;
  font-size: 14px;
  border-left: 2px solid var(--text-primary);
}
.toc-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-secondary);
  font-weight: 500;
}
.toc a:hover { color: var(--text-primary); text-decoration: none; }
.toc a.sub { padding-left: 18px; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   Tag
   ============================================================ */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 0px;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  margin-right: 6px;
  letter-spacing: 0.04em;
}

/* ============================================================
   Progress
   ============================================================ */
.progress {
  height: 4px;
  background: var(--border);
  border-radius: 0px;
  overflow: hidden;
  margin: 8px 0;
}
.progress > .bar {
  height: 100%;
  background: var(--accent);
  border-radius: 0px;
  transition: width 0.3s ease;
}

/* ============================================================
   Divider
   ============================================================ */
.divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ============================================================
   Index list
   ============================================================ */
.index-list { display: flex; flex-direction: column; gap: 0px; margin-top: 24px; }
.index-item {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--border);
  border-top: none;
  transition: background 0.15s ease;
}
.index-item:first-child { border-top: 1px solid var(--border); }
.index-item:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}
.index-item .date {
  font-size: 12px;
  color: var(--text-muted);
  flex: 0 0 100px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.index-item .title {
  flex: 1;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

/* ============================================================
   Custom guide-only blocks
   ============================================================ */

/* Color swatch grid */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.swatch {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.swatch:last-child { border-right: none; }
.swatch .chip {
  width: 100%;
  height: 60px;
  border-radius: 0px;
  border: 1px solid var(--border);
}
.swatch .name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.swatch .value {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Type sample */
.type-sample {
  background: var(--bg-secondary);
  border-radius: 0px;
  padding: 20px 24px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.type-sample:first-of-type { border-top: 1px solid var(--border); }
.type-sample .label {
  flex: 0 0 140px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.type-sample .demo { color: var(--text-primary); }

/* Card */
.card {
  background: var(--bg-secondary);
  border-radius: 0px;
  padding: 24px 28px;
  margin: 14px 0;
  border: 1px solid var(--border);
}

/* Spec metadata */
.spec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0 24px;
}
.spec-meta .item strong { color: var(--text-primary); font-weight: 600; }

/* Component preview block */
.preview {
  background: var(--bg-secondary);
  border-radius: 0px;
  padding: 28px;
  margin: 12px 0;
  border: 1px solid var(--border);
}
.preview-caption {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Section description */
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin: -8px 0 24px;
  line-height: 1.65;
  max-width: 640px;
}

/* ============================================================
   THEME PANEL — 0px radius, flat borders
   ============================================================ */
.tp-fab {
  position: fixed;
  right: 0;
  bottom: 72px;
  top: auto;
  transform: none;
  width: 28px;
  height: 48px;
  border-radius: 0px;
  background: var(--bg-primary);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: none;
  font-size: 14px;
  transition:
    right 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.tp-fab:hover {
  width: 36px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: none;
}
.tp-fab-icon {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
body.tp-panel-open .tp-fab {
  right: 392px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
body.tp-panel-open .tp-fab .tp-fab-icon {
  transform: rotate(180deg);
}

.tp-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.tp-overlay.open { opacity: 1; pointer-events: auto; }

.tp-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  border-radius: 0px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transform: translateX(calc(100% + 4px));
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.tp-panel.open { transform: translateX(0); }

.tp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.tp-header .title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.tp-header .close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 20px; cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 0px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.tp-header .close:hover { background: var(--bg-secondary); color: var(--text-primary); }

.tp-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 24px 8px;
}

/* Segmented control: Light | Dark */
.tp-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-secondary);
  border-radius: 0px;
  padding: 0;
  margin-bottom: 24px;
  margin-top: 16px;
  border: 1px solid var(--border);
}
.tp-mode-btn {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 0px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}
.tp-mode-btn:last-child { border-right: none; }
.tp-mode-btn.active {
  background: var(--accent);
  color: var(--accent-text);
}

.tp-section { margin-bottom: 18px; }
.tp-section-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 0 8px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
}
.tp-section-head .chev {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.tp-section.collapsed .chev { transform: rotate(-90deg); }
.tp-section.collapsed .tp-section-body { display: none; }
.tp-section-body { padding-top: 4px; }

.tp-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.tp-color-input {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 0px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.tp-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.tp-color-input::-webkit-color-swatch { border: none; border-radius: 0px; }
.tp-color-input::-moz-color-swatch { border: none; border-radius: 0px; }
.tp-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-family: var(--font-mono);
}
.tp-text-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 0px;
  font-family: var(--font-mono);
  width: 120px;
  min-width: 0;
}
.tp-text-input:focus {
  outline: none;
  border-color: var(--text-primary);
  background: var(--bg-primary);
}

.tp-footer {
  display: flex;
  gap: 0px;
  padding: 0;
  border-top: 1px solid var(--border);
}
.tp-btn {
  flex: 1;
  padding: 14px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 0px;
  border: none;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}
.tp-btn:last-child { border-right: none; }
.tp-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.tp-btn.primary {
  background: var(--accent);
  color: var(--accent-text);
}
.tp-btn.primary:hover { opacity: 0.9; }

.tp-toast {
  position: fixed;
  bottom: 100px; right: 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 18px;
  border-radius: 0px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
  border: 1px solid var(--border);
  z-index: 10000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.tp-toast.show { opacity: 1; transform: translateY(0); }

/* "더보기" overflow row inside panel */
.tp-more {
  display: flex;
  gap: 0px;
  margin-top: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
}
.tp-more .tp-btn {
  font-size: 11px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.tp-more .tp-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Gradient picker grid in theme panel */
.tp-grad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-top: 4px;
}
.tp-grad-card {
  position: relative;
  height: 48px;
  border-radius: 0px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  transition: opacity 0.15s ease;
  background: var(--accent);
}
.tp-grad-card:hover { opacity: 0.85; }
.tp-grad-card.active {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
.tp-grad-card .name {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent-text);
  padding: 3px 6px;
  margin: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: 0px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
}
.btn:hover { background: var(--bg-tertiary); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  box-shadow: none;
}
.btn.primary:hover { opacity: 0.88; }

.btn.gradient { background: var(--accent); color: var(--accent-text); box-shadow: none; }
.btn.gradient.violet { background: var(--accent); }
.btn.gradient.sunset { background: var(--accent); }
.btn.gradient.ocean  { background: var(--accent); }
.btn.gradient:hover { opacity: 0.88; }

.btn.ghost { background: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.btn.outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn.outline:hover { background: var(--accent); color: var(--accent-text); }

.btn.lg { padding: 14px 24px; font-size: 14px; border-radius: 0px; }
.btn.sm { padding: 6px 12px; font-size: 11px; border-radius: 0px; }
.btn.full { width: 100%; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   STATS — big number cards
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.stat {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat .label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.stat .value {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.0;
  font-variant-numeric: tabular-nums;
}
.stat .delta {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 0px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}
.stat .delta.up   { color: var(--text-secondary); background: transparent; }
.stat .delta.down { color: var(--text-primary);   background: transparent; }
.stat .delta.flat { color: var(--text-muted); background: transparent; }

.stat.gradient {
  background: var(--accent);
  color: var(--accent-text);
}
.stat.gradient .label { color: rgba(255, 255, 255, 0.6); }
.stat.gradient .value { color: var(--accent-text); }
.stat.gradient.violet { background: var(--accent); }
.stat.gradient.sunset { background: var(--accent); }
.stat.gradient.ocean  { background: var(--accent); }
.stat.gradient .delta { background: rgba(255, 255, 255, 0.15); color: var(--accent-text); border-color: transparent; }
[data-theme="hc-dark"] .stat.gradient,
[data-theme="toss-dark"] .stat.gradient { border-right-color: rgba(0, 0, 0, 0.2); }

/* ============================================================
   FEATURE BLOCKS
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.feature {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 28px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: transparent;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  color: var(--text-primary);
}
.feature-icon.gradient        { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.feature-icon.gradient.violet { background: var(--accent); }
.feature-icon.gradient.sunset { background: var(--accent); }
.feature-icon.gradient.mint   { background: var(--accent); }
.feature-icon.gradient.ocean  { background: var(--accent); }
.feature-icon.gradient.aurora { background: var(--accent); }
.feature h4 {
  font-size: 15px; font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.008em;
}
.feature p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   AVATARS — square, Hyundai Card signature
   ============================================================ */
.avatar {
  width: 36px; height: 36px;
  border-radius: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.avatar.violet { background: var(--accent); }
.avatar.sunset { background: var(--accent); }
.avatar.mint   { background: var(--accent); }
.avatar.ocean  { background: var(--accent); }

.avatar-group { display: inline-flex; align-items: center; }
.avatar-group .avatar {
  margin-left: -8px;
  border: 2px solid var(--bg-primary);
}
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .more {
  margin-left: -8px;
  border: 2px solid var(--bg-primary);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 11px;
}

/* ============================================================
   BAR CHART (horizontal)
   ============================================================ */
.bar-chart {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 22px 26px;
  margin: 14px 0;
  border: 1px solid var(--border);
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}
.bar-row:last-child { border-bottom: none; }
.bar-row .label {
  flex: 0 0 88px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
}
.bar-row .track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 0px;
  overflow: hidden;
}
.bar-row .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0px;
}
.bar-row .fill.violet { background: var(--accent); }
.bar-row .fill.sunset { background: var(--accent); }
.bar-row .fill.mint   { background: var(--accent); }
.bar-row .fill.ocean  { background: var(--accent); }
.bar-row .value {
  flex: 0 0 52px;
  text-align: right;
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ============================================================
   GRADIENT SWATCH GRID — Hyundai Card: solid tone swatches
   ============================================================ */
.grad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.grad-card {
  height: 100px;
  border-radius: 0px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  background: var(--accent);
  border-right: 1px solid rgba(255,255,255,0.1);
}
.grad-card .grad-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.grad-card .grad-token {
  font-size: 10px;
  font-family: var(--font-mono);
  opacity: 0.7;
  margin-top: 2px;
  color: var(--accent-text);
}

/* ============================================================
   BANNER
   ============================================================ */
.banner {
  position: relative;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 0px;
  padding: 28px 32px;
  margin: 16px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--border-strong);
}
.banner-blob { display: none; }
.banner .content { flex: 1; min-width: 0; position: relative; }
.banner h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: -0.01em;
}
.banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}
[data-theme="hc-dark"] .banner p,
[data-theme="toss-dark"] .banner p { color: rgba(0, 0, 0, 0.65); }
.banner .btn { position: relative; }

/* ============================================================
   SKELETON / placeholder
   ============================================================ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.skel {
  background: var(--bg-tertiary);
  border-radius: 0px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skel.line { height: 10px; margin-bottom: 8px; }
.skel.line.short { width: 40%; }
.skel.line.long  { width: 80%; }
.skel.box  { height: 80px; }
.skel.circle { border-radius: 0px; width: 40px; height: 40px; }

.skel-card {
  background: var(--bg-secondary);
  border-radius: 0px;
  padding: 22px 24px;
  border: 1px solid var(--border);
}

/* ============================================================
   ICON SHAPES
   ============================================================ */
.icon-circle {
  width: 40px; height: 40px;
  border-radius: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.icon-circle.lg { width: 52px; height: 52px; font-size: 20px; border-radius: 0px; }
.icon-circle.gradient        { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.icon-circle.gradient.violet { background: var(--accent); }
.icon-circle.gradient.sunset { background: var(--accent); }
.icon-circle.gradient.mint   { background: var(--accent); }

/* Section spacer with label */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 64px 0 32px;
}
.section-divider .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.section-divider .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CTA card
   ============================================================ */
.cta-card {
  background: var(--bg-secondary);
  border-radius: 0px;
  border: 1px solid var(--border);
  padding: 32px 36px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}
.cta-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.cta-card p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  max-width: 480px;
}

/* ============================================================
   Variation grids
   ============================================================ */
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin: 12px 0;
  border: 1px solid var(--border);
}
.variant {
  background: var(--bg-primary);
  border-radius: 0px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  min-height: 100px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.variant:last-child { border-right: none; }
.variant .label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   ANIMATIONS & INTERACTIONS — restrained, editorial
   ============================================================ */

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

/* Page load fade — subtle */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero, .hero > * { animation: fade-up 0.5s ease both; }
.hero .badge      { animation-delay: 0.05s; }
.hero h1          { animation-delay: 0.12s; }
.hero .lede       { animation-delay: 0.20s; }
.hero .btn-row    { animation-delay: 0.28s; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(9) { transition-delay: 480ms; }

/* Section divider */
.section-divider .line {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s ease;
}
.section-divider.in .line { transform: scaleX(1); }
.section-divider .num,
.section-divider .label {
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}
.section-divider.in .num,
.section-divider.in .label { opacity: 1; }

/* Hover states — no transform lifts, border highlight only */
.feature, .stat, .card, .cta-card,
.swatch, .grad-card, .index-item, .skel-card, .preview, .variant {
  transition: background 0.2s ease, border-color 0.2s ease;
}
.feature:hover, .stat:hover, .card:hover,
.preview:hover, .variant:hover {
  background: var(--bg-secondary);
}
.feature:hover { border-right-color: var(--border-strong); }

.btn {
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); transition-duration: 0.05s; }

/* Bar fill transition */
.bar-row .fill { transition: width 1.2s ease; }
.progress .bar { transition: width 1.0s ease; }

/* Tag hover */
.tag { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.tag:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* Badge hover */
.badge { transition: background 0.15s ease, color 0.15s ease; }
.badge:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* Callout */
.callout { transition: border-left-color 0.15s ease; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 10000;
  transition: width 0.08s linear;
  pointer-events: none;
  border-radius: 0;
  box-shadow: none;
}

/* Theme transition smoothing */
html, body, .page,
.feature, .stat, .card, .cta-card, .swatch,
.callout, .table, .kv, .toc, .code-block, .diff,
.banner, .hero, .index-item, .preview, .variant,
.tp-panel, .tp-fab, .badge, .tag, .btn {
  transition-property: background, background-color, color, border-color;
  transition-duration: 0.25s;
  transition-timing-function: ease;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* ============================================================
   GRADIENT LINE DIVIDER (eyebrow-line)
   ============================================================ */
.eyebrow-line .line {
  background: var(--border);
  height: 1px;
}

/* Stat-line borders */
.stat-line {
  border-top: none;
  border-bottom: none;
  position: relative;
}
.stat-line::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--border); }
.stat-line::after  { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: var(--border); }

/* Feature item border-top */
.feature-list > .item {
  border-top: 1px solid var(--border);
  position: relative;
}
.feature-list > .item::before { display: none; }

/* Chapter number — corner marker */
.chapter[data-num]::after {
  content: attr(data-num);
  position: absolute;
  top: clamp(36px, 4.5vh, 52px);
  right: clamp(48px, 6vw, 96px);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
[data-theme="hc-dark"] .chapter[data-num]::after,
[data-theme="toss-dark"] .chapter[data-num]::after { opacity: 0.4; }
@media (max-width: 768px) { .chapter[data-num]::after { display: none; } }

/* Text-gradient — no gradient, just primary text color */
.text-gradient,
.text-gradient.primary,
.text-gradient.violet,
.text-gradient.sunset,
.text-gradient.ocean {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  animation: none;
}

/* Editorial mark */
.editorial-mark {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  display: inline-block;
}

/* Accent mark in hero-minimal */
.hero-minimal h1 .accent-mark,
.accent-mark {
  background: none;
  color: var(--text-primary);
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text-primary);
}

/* ============================================================
   HERO & PATTERN COMPONENTS
   ============================================================ */
.hero {
  position: relative;
  padding: 48px 40px 44px;
  border-radius: 0px;
  background: var(--bg-secondary);
  overflow: hidden;
  margin: 0 0 48px;
  border: 1px solid var(--border);
}
.hero-blob { display: none; }

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 12px 0 16px;
  line-height: 1.0;
  position: relative;
  color: var(--text-primary);
}
.hero .lede {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  position: relative;
}
.hero .badge { position: relative; }

/* Hero minimal */
.hero-minimal {
  padding: 0;
  margin: 0;
  background: none;
}
.hero-minimal .badge { margin-bottom: 18px; }
.hero-minimal h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 7.5vw, 96px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 0 0 24px;
  color: var(--text-primary);
}
.hero-minimal .lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0;
}
.hero-minimal .btn-row { margin-top: 32px; }

/* Stat line */
.stat-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
  gap: 0;
}
.stat-line > .item {
  padding: 0 28px;
  border-right: 1px solid var(--border);
}
.stat-line > .item:first-child { padding-left: 0; }
.stat-line > .item:last-child  { border-right: none; padding-right: 0; }
.stat-line .value {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.stat-line .label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .stat-line { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stat-line > .item { padding: 12px 20px; }
  .stat-line > .item:nth-child(2) { border-right: none; padding-right: 0; }
  .stat-line > .item:nth-child(3) { border-right: 1px solid var(--border); padding-left: 0; }
}

/* Feature list — editorial numbered rows */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 52px 64px;
}
.feature-list > .item {
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.feature-list .item-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.feature-list .item-num::after {
  content: "";
  flex: 0 0 24px;
  height: 1px;
  background: var(--border);
}
.feature-list h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.feature-list p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 720px) {
  .feature-list { grid-template-columns: 1fr; gap: 28px; }
}

/* Section eyebrow */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Eyebrow-line — editorial section break */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0;
  margin: 56px 0 32px;
}
.eyebrow-line .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.eyebrow-line .num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}
.eyebrow-line .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   SIDE MARKS
   ============================================================ */
.side-mark { display: none; }
.bottom-mark {
  position: fixed;
  bottom: 28px;
  right: 32px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  z-index: 10;
  opacity: 0.5;
  pointer-events: none;
  text-transform: uppercase;
}
@media (max-width: 768px) { .side-mark, .bottom-mark { display: none; } }

/* ============================================================
   PPT-STYLE SLIDE LAYOUT
   ============================================================ */
html:has(.layout),
body:has(.layout) {
  height: 100%;
  overflow: hidden;
}

.layout {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg-primary) !important;
}

.layout::before, .layout::after { display: none; }

.top-brand { display: none; }
.top-brand .brand-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.top-brand .brand-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Chapter (slide) */
.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}
.chapter.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.chapter.active .chapter-body > * {
  animation: chapter-rise 0.45s ease both;
}
.chapter.active .chapter-body > *:nth-child(1) { animation-delay: 0.05s; }
.chapter.active .chapter-body > *:nth-child(2) { animation-delay: 0.11s; }
.chapter.active .chapter-body > *:nth-child(3) { animation-delay: 0.17s; }
.chapter.active .chapter-body > *:nth-child(4) { animation-delay: 0.23s; }
.chapter.active .chapter-body > *:nth-child(5) { animation-delay: 0.29s; }
.chapter.active .chapter-body > *:nth-child(6) { animation-delay: 0.35s; }
.chapter.active .chapter-body > *:nth-child(7) { animation-delay: 0.41s; }
.chapter.active .chapter-body > *:nth-child(8) { animation-delay: 0.47s; }
.chapter.active .chapter-body > *:nth-child(9) { animation-delay: 0.53s; }
.chapter.active .chapter-body > *:nth-child(n+10) { animation-delay: 0.59s; }

.chapter.active .chapter-header {
  animation: chapter-rise 0.4s ease both;
}
@keyframes chapter-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chapter .reveal,
.chapter .reveal-stagger,
.chapter .reveal-stagger > *,
.chapter .section-divider {
  opacity: 1;
  transform: none;
  transition: none;
}

.chapter-inner {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(64px, 8vh, 96px) clamp(48px, 6vw, 96px) clamp(140px, 18vh, 180px);
  margin: 0 auto;
}

.chapter-header {
  flex-shrink: 0;
  margin-bottom: clamp(40px, 5.5vh, 64px);
}
.chapter-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: clamp(20px, 2.8vh, 32px);
  color: var(--text-muted);
}
.chapter-num::before { content: "↳ "; opacity: 0.5; }
.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(16px, 2.2vh, 26px);
  color: var(--text-primary);
  line-height: 0.95;
}
.chapter-lede {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

.chapter-body {
  flex: 0 1 auto;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chapter-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.chapter-body > * { margin-top: 0; margin-bottom: 0; }
.chapter-body > * + * { margin-top: clamp(52px, 7vh, 80px); }
.chapter-body > h3 + * { margin-top: 14px; }
.chapter-body > .section-desc + * { margin-top: 16px; }
.chapter-body > p + * { margin-top: 18px; }
.chapter-body > .hero + * { margin-top: clamp(48px, 6vh, 72px); }

/* Bottom dot navigation */
.chapter-dots {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 90;
}
.chapter-dots-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.chapter-dot {
  width: 8px;
  height: 8px;
  border-radius: 0px;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.chapter-dot:hover { background: var(--text-muted); }
.chapter-dot.active {
  width: 24px;
  border-radius: 0px;
  background: var(--accent);
  box-shadow: none;
}
.chapter-dot.active:hover { background: var(--accent); }
.chapter-dots-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.chapter-arrow { display: none !important; }

/* Click-to-copy hover hint */
.swatch, .grad-card { cursor: pointer; position: relative; }
.swatch::after, .grad-card::after {
  content: "Copy";
  position: absolute;
  bottom: 8px; right: 8px;
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 0px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.swatch:hover::after,
.grad-card:hover::after { opacity: 1; }
.grad-card::after {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}

/* Override .page inside .chapter-body */
.chapter-body .page,
.chapter-body > .page {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* Hero inside chapter */
.chapter-body > .hero { padding: 48px 44px 44px; }
.chapter-body > .hero h1 { font-size: 44px; margin: 8px 0 14px; }
.chapter-body > .hero .lede { font-size: 16px; max-width: 560px; }

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 12px 0;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ============================================================
   MOBILE — narrow viewport refinements
   ============================================================ */
@media (max-width: 640px) {
  .page { padding-left: 18px; padding-right: 18px; }
  .header h1 { font-size: 34px; line-height: 1.05; letter-spacing: -0.04em; }
  .header .lede { font-size: 15px; margin-top: 14px; }
  .page h2 { font-size: 22px; margin: 48px 0 12px; }
  .page h3 { font-size: 17px; margin-top: 24px; }

  .banner { flex-direction: column; align-items: stretch; padding: 22px 20px; gap: 12px; }

  .stat { padding: 18px 20px; }
  .stat .value { font-size: 28px; }
  .stat .label { font-size: 11px; }

  .kv { padding: 0; }
  .kv .row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; }
  .kv .row .k { display: block; width: 100%; flex: none; font-size: 12px; }
  .kv .row .v { display: block; width: 100%; flex: none; overflow-wrap: anywhere; }

  .eyebrow-line { flex-wrap: nowrap; }

  .table { font-size: 12.5px; width: 100%; table-layout: fixed; }
  .table th, .table td { padding: 10px 10px; word-break: break-word; overflow-wrap: anywhere; vertical-align: top; }
  .table td code, .table th code, .table .code-inline { font-size: 11px; padding: 1px 4px; word-break: break-all; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }

  .code-block pre { font-size: 12px; padding: 14px; overflow-x: auto; }

  .feature-grid { gap: 0; }
  .feature { padding: 18px 20px; }

  .feature-list > .item { padding: 18px 0; }
  .feature-list > .item h4 { font-size: 15px; }

  .stat-grid { border: none; }
  .stat { border: 1px solid var(--border); border-right: 1px solid var(--border); margin-bottom: -1px; }

  .chapter-inner { padding: 56px 20px 88px; }
  .chapter-title { font-size: 28px; }
  .chapter-lede  { font-size: 14px; }
}

/* ============================================================
   HYUNDAI CARD GUIDE — Slide layout extensions
   ============================================================ */

/* Two-column slide body */
.chapter-body.hc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 96px);
  align-items: start;
  overflow: visible;
}
.chapter-body.hc-split > * { margin-top: 0 !important; }

/* Centered slide body */
.chapter-body.hc-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(40px, 5.5vh, 64px);
}
.chapter-body.hc-center > * { margin-top: 0 !important; }

/* Cover: hero title */
.hc-hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 18px 0 14px;
  color: var(--text-primary);
}
.hc-hero-sub {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* Cover: right stat column */
.hc-stat-column {
  border-top: 1px solid var(--border);
}
.hc-big-stat {
  padding: clamp(24px, 3.4vh, 40px) 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.hc-big-val {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 46px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  min-width: 4.5ch;
}
.hc-big-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Color: swatch row */
.hc-color-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.hc-color-swatch {
  aspect-ratio: 3/2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.hc-color-swatch:last-child { border-right: none; }
.hc-swatch-name {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}
.hc-swatch-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}
.hc-color-desc {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
  max-width: 640px;
}

/* Typography: row */
.hc-type-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.hc-type-row {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: clamp(22px, 3.2vh, 36px) 0;
  border-bottom: 1px solid var(--border-soft);
}
.hc-type-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 0 0 44px;
}
.hc-type-demo {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1;
}

/* Section sub-label */
.hc-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 clamp(24px, 3.2vh, 36px);
  padding-bottom: clamp(14px, 1.8vh, 20px);
  border-bottom: 1px solid var(--border);
  display: block;
}

/* Callout stack (tight spacing inside) */
.hc-callout-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.hc-callout-stack .callout {
  margin: 0;
  border-radius: 0;
}

/* Chapter inner vertical center */
.chapter-inner.hc-center-inner {
  justify-content: center;
}

body.on-intro .tp-fab { opacity: 0; pointer-events: none; }

@media (max-width: 800px) {
  .chapter-body.hc-split { grid-template-columns: 1fr; gap: 36px; }
  .hc-color-row { grid-template-columns: repeat(3, 1fr); }
}
