/* ============================================================
   Claude Output Design System  —  Toss-inspired
   ------------------------------------------------------------
   /Users/midbar_/Desktop/Claude/style.css
   ------------------------------------------------------------
   - Toss-inspired tokens: clean light surface, blue accent,
     generous radii, soft shadows, generous spacing
   - Two presets: toss-light (default), toss-dark
   - Override any variable via theme.js panel (localStorage)
   ============================================================ */

/* ----- Default theme: Olive Light ----- */
:root,
[data-theme="toss-light"] {
  /* Surfaces — warm off-white paper */
  --bg-primary: #f3f1e7;
  --bg-secondary: #eae7d3;
  --bg-tertiary: #ddd9c0;

  /* Text — near-black olive */
  --text-primary: #1c1d11;
  --text-secondary: #4a4d35;
  --text-muted: #898b6c;

  /* Accent (Low-sat olive) */
  --accent: #6b7c3e;
  --accent-soft: rgba(107, 124, 62, 0.12);
  --accent-text: #f3f1e7;

  /* Borders */
  --border: #c6c2a4;
  --border-soft: #d8d4b9;

  /* Code */
  --code-bg: #eae7d3;
  --code-text: #1c1d11;
  --code-keyword: #6b7c3e;
  --code-string: #856b2a;
  --code-comment: #898b6c;

  /* Semantic — all earth-toned */
  --success: #6b7c3e;
  --warning: #a8843a;
  --danger: #9a4530;
  --info: #4a5e3d;

  /* Typography — heavier display feel */
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-display: "Pretendard Variable", "Pretendard", "Inter", "Helvetica Neue", "Archivo", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Berkeley Mono", "SF Mono", "Menlo", "Consolas", monospace;
  --font-size-base: 15px;
  --line-height-base: 1.65;

  /* Layout — sharper edges, editorial feel */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows — minimal, paper-like */
  --shadow-sm: 0 1px 2px rgba(28, 29, 17, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 29, 17, 0.06);
  --shadow-lg: 0 12px 40px rgba(28, 29, 17, 0.08);

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

  --bg-decoration: none;
}

/* ----- Olive Dark ----- */
[data-theme="toss-dark"] {
  --bg-primary: #131410;
  --bg-secondary: #1d1f15;
  --bg-tertiary: #292c1d;

  --text-primary: #ebe9d8;
  --text-secondary: #b8b89a;
  --text-muted: #7a7d60;

  --accent: #a8b878;
  --accent-soft: rgba(168, 184, 120, 0.14);
  --accent-text: #131410;

  --border: #393b27;
  --border-soft: #2b2d1d;

  --code-bg: #1d1f15;
  --code-text: #ebe9d8;
  --code-keyword: #a8b878;
  --code-string: #c4a45e;
  --code-comment: #7a7d60;

  --success: #a8b878;
  --warning: #c4a45e;
  --danger: #c46850;
  --info: #8a9d70;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

  --bg-decoration: radial-gradient(ellipse at top right, rgba(168, 184, 120, 0.04) 0%, transparent 50%);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  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: 1.5px; 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: 48px; }
.header .badge { margin-bottom: 16px; }
.header h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  color: var(--text-primary);
  line-height: 1.05;
}
.header .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header .lede {
  font-size: 17px;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.6;
}

/* ============================================================
   Body typography
   ============================================================ */
.page h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.028em;
  margin: 64px 0 16px;
  color: var(--text-primary);
  line-height: 1.1;
}
.page h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.016em;
  margin: 36px 0 10px;
  color: var(--text-primary);
}
.page h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.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 — editorial mono uppercase
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.report { background: var(--accent-soft); color: var(--accent); }
.badge.spec   { background: rgba(74, 94, 61, 0.14); color: var(--info); }
.badge.note   { background: rgba(107, 124, 62, 0.14); color: var(--success); }
.badge.data   { background: rgba(168, 132, 58, 0.14); color: var(--warning); }

/* ============================================================
   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: 6px;
  font-weight: 500;
}

.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-md);
  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-soft);
}
.code-block .header-row {
  display: flex;
  justify-content: space-between;
  margin: -18px -20px 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-secondary);
  font-size: 12px;
  color: var(--text-muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  white-space: normal;
  font-family: var(--font-sans);
  font-weight: 500;
}
.code-block .kw  { color: var(--code-keyword); font-weight: 600; }
.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-soft);
  border-radius: var(--radius-md);
  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, 182, 163, 0.1); color: var(--success); }
.diff > .row.removed { background: rgba(233, 49, 49, 0.08); color: var(--danger); }
.diff > .row.context { color: var(--text-muted); }

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

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

/* ============================================================
   Callouts
   ============================================================ */
/* ⚠ DO NOT change to display:flex here.
   Inline children (<strong>, <code>, text nodes) become separate flex items
   and the text breaks one character per column. Keep absolute icon. */
.callout {
  position: relative;
  padding: 16px 20px 16px 54px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin: 14px 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.callout::before {
  position: absolute;
  left: 20px;
  top: 18px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.callout.info::before    { content: "i"; background: rgba(49, 130, 246, 0.15); color: var(--info); }
.callout.warn::before    { content: "!"; background: rgba(245, 166, 35, 0.15); color: var(--warning); }
.callout.danger::before  { content: "!"; background: rgba(233, 49, 49, 0.15);  color: var(--danger); }
.callout.success::before { content: "✓"; background: rgba(0, 182, 163, 0.15); color: var(--success); }
.callout strong { color: var(--text-primary); }

/* ============================================================
   Quote
   ============================================================ */
.quote {
  padding: 6px 20px;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-size: 16px;
  margin: 20px 0;
  font-weight: 500;
}
.quote cite {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 500;
}
.quote cite::before { content: "— "; }

/* ============================================================
   TOC
   ============================================================ */
.toc {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
  font-size: 14px;
}
.toc-title {
  font-size: 12px;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-secondary);
  font-weight: 500;
}
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.sub { padding-left: 18px; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   Tag
   ============================================================ */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  margin-right: 6px;
}

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

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

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

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

/* Color swatch grid (used in guide.html) */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.swatch {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.swatch .chip {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}
.swatch .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.swatch .value {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Type sample (used in guide.html) */
.type-sample {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 8px 0;
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.type-sample .label {
  flex: 0 0 140px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.type-sample .demo { color: var(--text-primary); }

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

/* Spec metadata (small inline kv) */
.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 (with caption) */
.preview {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 12px 0;
}
.preview-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: var(--font-mono);
}

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

/* ============================================================
   THEME PANEL — injected by theme.js, styled here.
   Slimmer, Toss-flavored.
   ============================================================ */

.tp-fab {
  position: fixed;
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 28px;
  height: 64px;
  border-radius: 14px 0 0 14px;
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-right: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: var(--shadow-sm);
  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,
    box-shadow 0.2s ease;
}
.tp-fab:hover {
  width: 36px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}
.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(--accent);
}
body.tp-panel-open .tp-fab .tp-fab-icon {
  transform: rotate(180deg);
}

.tp-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  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: 24px; right: 24px; bottom: 24px;
  width: 360px;
  background: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transform: translateX(calc(100% + 48px));
  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;
}
.tp-header .title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tp-header .close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 24px; cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.tp-header .close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

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

/* Single segmented control: Light | Dark */
.tp-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.tp-mode-btn {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s ease, color 0.15s ease;
}
.tp-mode-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tp-section { margin-bottom: 18px; }
.tp-section-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
}
.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: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  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: 6px; }
.tp-color-input::-moz-color-swatch { border: none; border-radius: 6px; }
.tp-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.tp-text-input {
  background: var(--bg-secondary);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  width: 120px;
  min-width: 0;
}
.tp-text-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-primary);
}

.tp-footer {
  display: flex;
  gap: 8px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-soft);
}
.tp-btn {
  flex: 1;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s ease, color 0.15s ease;
}
.tp-btn:hover { background: var(--border-soft); color: var(--text-primary); }
.tp-btn.primary {
  background: var(--grad-primary);
  color: var(--accent-text);
}
.tp-btn.primary:hover { opacity: 0.94; color: var(--accent-text); background: var(--grad-primary); }

.tp-toast {
  position: fixed;
  bottom: 100px; right: 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  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: 6px;
  margin-top: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border-soft);
}
.tp-more .tp-btn {
  font-size: 12px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-muted);
}
.tp-more .tp-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ============================================================
   VISUAL TOKENS — Olive gradients (low saturation)
   ============================================================ */
:root,
[data-theme="toss-light"] {
  --grad-primary:  linear-gradient(135deg, #5b6b32 0%, #8a9d5c 100%);
  --grad-success:  linear-gradient(135deg, #4a5429 0%, #6b7c3e 100%);
  --grad-warning:  linear-gradient(135deg, #856b2a 0%, #b2944a 100%);
  --grad-danger:   linear-gradient(135deg, #6e3520 0%, #9a4530 100%);
  --grad-violet:   linear-gradient(135deg, #4d6b40 0%, #7a9560 100%);
  --grad-sunset:   linear-gradient(135deg, #8a9d5c 0%, #c4b46e 100%);
  --grad-mint:     linear-gradient(135deg, #4a5429 0%, #a8b878 100%);
  --grad-aurora:   linear-gradient(135deg, #3d4423 0%, #6b7c3e 50%, #b3c082 100%);
  --grad-ocean:    linear-gradient(135deg, #2c3618 0%, #5b6b32 50%, #a8b878 100%);
  --grad-hero-bg:  radial-gradient(ellipse 80% 50% at 50% 0%, rgba(107, 124, 62, 0.1) 0%, transparent 60%);
  --grad-card:     linear-gradient(135deg, rgba(107, 124, 62, 0.06) 0%, rgba(74, 84, 41, 0.04) 100%);
}

[data-theme="toss-dark"] {
  --grad-primary:  linear-gradient(135deg, #6b7c3e 0%, #a8b878 100%);
  --grad-success:  linear-gradient(135deg, #5b6b32 0%, #8a9d5c 100%);
  --grad-warning:  linear-gradient(135deg, #b2944a 0%, #d8c074 100%);
  --grad-danger:   linear-gradient(135deg, #9a4530 0%, #c46850 100%);
  --grad-violet:   linear-gradient(135deg, #6b7c3e 0%, #b3c082 100%);
  --grad-sunset:   linear-gradient(135deg, #a8b878 0%, #d8c074 100%);
  --grad-mint:     linear-gradient(135deg, #5b6b32 0%, #b3c082 100%);
  --grad-aurora:   linear-gradient(135deg, #4a5429 0%, #8a9d5c 50%, #d8c074 100%);
  --grad-ocean:    linear-gradient(135deg, #3d4423 0%, #6b7c3e 50%, #b3c082 100%);
  --grad-hero-bg:  radial-gradient(ellipse 80% 50% at 50% 0%, rgba(168, 184, 120, 0.08) 0%, transparent 60%);
  --grad-card:     linear-gradient(135deg, rgba(168, 184, 120, 0.06) 0%, rgba(107, 124, 62, 0.04) 100%);
}

/* ----- Gradient preset selector ----- */
:root[data-grad="success"] { --grad-primary: var(--grad-success); }
:root[data-grad="warning"] { --grad-primary: var(--grad-warning); }
:root[data-grad="danger"]  { --grad-primary: var(--grad-danger);  }
:root[data-grad="violet"]  { --grad-primary: var(--grad-violet);  }
:root[data-grad="sunset"]  { --grad-primary: var(--grad-sunset);  }
:root[data-grad="mint"]    { --grad-primary: var(--grad-mint);    }
:root[data-grad="aurora"]  { --grad-primary: var(--grad-aurora);  }
:root[data-grad="ocean"]   { --grad-primary: var(--grad-ocean);   }

/* Hero with gradient backdrop & decorative blobs */
.hero {
  position: relative;
  padding: 56px 36px 48px;
  border-radius: var(--radius-xl);
  background: var(--grad-card);
  overflow: hidden;
  margin: 0 0 48px;
}
.hero-blob {
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}
.hero-blob.b1 { top: -80px; right: -60px; background: var(--accent); opacity: 0.13; }
.hero-blob.b2 { bottom: -100px; left: -40px; background: #a855f7; opacity: 0.08; }
.hero-blob.b3 { display: none; }

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

/* Gradient text */
.text-gradient {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.text-gradient.primary { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient.violet  { background: var(--grad-violet);  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient.sunset  { background: var(--grad-sunset);  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient.ocean   { background: var(--grad-ocean);   -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

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

.btn.primary {
  background: var(--grad-primary);
  color: var(--accent-text);
  box-shadow: 0 2px 12px rgba(91, 107, 50, 0.18);
}
.btn.primary:hover {
  opacity: 0.94;
  background: var(--grad-primary);
  box-shadow: 0 4px 18px rgba(91, 107, 50, 0.28);
}
[data-theme="toss-dark"] .btn.primary {
  box-shadow: 0 2px 12px rgba(168, 184, 120, 0.18);
}
[data-theme="toss-dark"] .btn.primary:hover {
  box-shadow: 0 4px 18px rgba(168, 184, 120, 0.28);
}

.btn.gradient { background: var(--grad-primary); color: #ffffff; box-shadow: 0 4px 16px rgba(49, 130, 246, 0.3); }
.btn.gradient.violet { background: var(--grad-violet); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3); }
.btn.gradient.sunset { background: var(--grad-sunset); box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3); }
.btn.gradient.ocean  { background: var(--grad-ocean);  box-shadow: 0 4px 16px rgba(26, 108, 202, 0.3); }
.btn.gradient:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(49, 130, 246, 0.4); }

.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); box-shadow: inset 0 0 0 1px var(--border); }
.btn.outline:hover { background: var(--bg-secondary); }

.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }

.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: 12px;
  margin: 16px 0;
}
.stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.stat .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.stat .value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .delta {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.stat .delta.up   { color: var(--success); background: rgba(0, 182, 163, 0.12); }
.stat .delta.down { color: var(--danger);  background: rgba(233, 49, 49, 0.12); }
.stat .delta.flat { color: var(--text-muted); background: var(--bg-tertiary); }

.stat.gradient {
  background: var(--grad-primary);
  color: #ffffff;
}
.stat.gradient .label { color: rgba(255, 255, 255, 0.85); }
.stat.gradient .value { color: #ffffff; }
.stat.gradient.violet { background: var(--grad-violet); }
.stat.gradient.sunset { background: var(--grad-sunset); }
.stat.gradient.ocean  { background: var(--grad-ocean); }

.stat.gradient .delta { background: rgba(255, 255, 255, 0.2); color: #ffffff; }

/* ============================================================
   FEATURE BLOCKS — icon + title + body
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.feature {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px 26px;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--accent-soft);
  margin-bottom: 14px;
}
.feature-icon.gradient        { background: var(--grad-primary); color: #ffffff; }
.feature-icon.gradient.violet { background: var(--grad-violet); }
.feature-icon.gradient.sunset { background: var(--grad-sunset); }
.feature-icon.gradient.mint   { background: var(--grad-mint); }
.feature-icon.gradient.ocean  { background: var(--grad-ocean); }
.feature-icon.gradient.aurora { background: var(--grad-aurora); }
.feature h4 {
  font-size: 16px; font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary);
  letter-spacing: -0.012em;
}
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   AVATARS
   ============================================================ */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad-primary);
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.violet { background: var(--grad-violet); }
.avatar.sunset { background: var(--grad-sunset); }
.avatar.mint   { background: var(--grad-mint); }
.avatar.ocean  { background: var(--grad-ocean); }

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

/* ============================================================
   BAR CHART (simple horizontal)
   ============================================================ */
.bar-chart {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 14px 0;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 13px;
}
.bar-row .label {
  flex: 0 0 88px;
  color: var(--text-secondary);
  font-weight: 500;
}
.bar-row .track {
  flex: 1;
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 999px;
  overflow: hidden;
}
.bar-row .fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 999px;
}
.bar-row .fill.violet { background: var(--grad-violet); }
.bar-row .fill.sunset { background: var(--grad-sunset); }
.bar-row .fill.mint   { background: var(--grad-mint); }
.bar-row .fill.ocean  { background: var(--grad-ocean); }
.bar-row .value {
  flex: 0 0 60px;
  text-align: right;
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   GRADIENT SWATCH GRID
   ============================================================ */
.grad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.grad-card {
  height: 120px;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.grad-card .grad-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.grad-card .grad-token {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.85;
  margin-top: 2px;
}

/* ============================================================
   BANNER (full-bleed gradient announcement)
   ============================================================ */
.banner {
  position: relative;
  background: var(--grad-aurora);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 16px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.banner-blob {
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}
.banner-blob.b1 { background: rgba(255, 255, 255, 0.25); top: -40px; right: 20%; }
.banner-blob.b2 { background: rgba(0, 0, 0, 0.15); bottom: -60px; left: 10%; }
.banner .content { flex: 1; min-width: 0; position: relative; }
.banner h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
}
.banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}
.banner .btn { position: relative; }

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

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

/* ============================================================
   ICON SHAPES (pure CSS, no assets)
   ============================================================ */
.icon-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: transparent;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--grad-primary);
  background-clip: padding-box, text;
  -webkit-background-clip: padding-box, text;
  -webkit-text-fill-color: transparent;
  font-size: 16px;
  font-weight: 700;
}
.icon-circle.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }
.icon-circle.gradient        { background: var(--grad-primary); color: #fff; }
.icon-circle.gradient.violet { background: var(--grad-violet); color: #fff; }
.icon-circle.gradient.sunset { background: var(--grad-sunset); color: #fff; }
.icon-circle.gradient.mint   { background: var(--grad-mint); color: #fff; }

/* ============================================================
   COLOR CHIP (used in palette grid with gradient option)
   ============================================================ */
.swatch.gradient .chip { border: none; }

/* Section spacer with decorative line */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 64px 0 32px;
}
.section-divider .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.section-divider .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ============================================================
   CTA card (call to action with gradient bg)
   ============================================================ */
.cta-card {
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}
.cta-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.cta-card p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  max-width: 480px;
}

/* ============================================================
   Variation grids (for showing multiple variants side by side)
   ============================================================ */
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.variant {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  min-height: 100px;
  text-align: center;
}
.variant .label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ============================================================
   ANIMATIONS & INTERACTIONS
   ============================================================ */

/* Reduce motion respect */
@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;
  }
}

/* ----- Floating blobs ----- */
@keyframes blob-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-30px, 40px) scale(1.08); }
  66%      { transform: translate(40px, -20px) scale(0.95); }
}
@keyframes blob-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, -30px) scale(1.1); }
}
@keyframes blob-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(30px, 30px) scale(1.05); }
  80%      { transform: translate(-20px, 10px) scale(0.92); }
}
.hero-blob.b1 { animation: blob-float-1 18s ease-in-out infinite; }
.hero-blob.b2 { animation: blob-float-2 22s ease-in-out infinite; }
.hero-blob.b3 { animation: blob-float-3 26s ease-in-out infinite; }
.banner-blob.b1 { animation: blob-float-1 14s ease-in-out infinite; }
.banner-blob.b2 { animation: blob-float-2 18s ease-in-out infinite; }

/* ----- Gradient text shimmer ----- */
.text-gradient {
  background-size: 200% auto;
  animation: gradient-shift 8s ease-in-out infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ----- Page load fade-up ----- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero, .hero > * { animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .badge      { animation-delay: 0.05s; }
.hero h1          { animation-delay: 0.15s; }
.hero .lede       { animation-delay: 0.25s; }
.hero .btn-row    { animation-delay: 0.35s; }

/* ----- Reveal on scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.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: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 490ms; }
.reveal-stagger.in > *:nth-child(9) { transition-delay: 560ms; }

/* ----- Section divider line draw ----- */
.section-divider .line {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-divider.in .line { transform: scaleX(1); }
.section-divider .num,
.section-divider .label {
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
}
.section-divider.in .num,
.section-divider.in .label { opacity: 1; }

/* ----- Card / feature / stat hover lifts ----- */
.feature, .stat, .card, .cta-card,
.swatch, .grad-card, .index-item, .skel-card, .preview, .variant {
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature:hover, .stat:hover, .card:hover,
.preview:hover, .variant:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.swatch:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Feature icon scale on parent hover */
.feature .feature-icon { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.feature:hover .feature-icon { transform: scale(1.06) rotate(-3deg); }

/* Gradient card glow on hover */
.grad-card {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.25s ease;
}
.grad-card:hover {
  transform: translateY(-4px) scale(1.02);
  filter: brightness(1.05);
}

/* Index item pretty hover */
.index-item .title { transition: color 0.15s ease; }
.index-item:hover .title { color: var(--accent); }

/* ----- Button micro-interactions ----- */
.btn {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    background 0.15s ease,
    opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); transition-duration: 0.05s; }

/* Button ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: 0.25;
  pointer-events: none;
  animation: ripple-anim 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn.gradient .ripple,
.btn.primary .ripple { background: rgba(255,255,255,0.5); }
@keyframes ripple-anim {
  to { transform: scale(3.5); opacity: 0; }
}

/* ----- Avatar group hover spread ----- */
.avatar-group:hover .avatar {
  margin-left: -4px;
  transition: margin 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.avatar-group .avatar { transition: margin 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.avatar { transition: transform 0.2s ease; }
.avatar:hover { transform: translateY(-2px) scale(1.05); z-index: 1; }

/* ----- Bar chart row hover ----- */
.bar-row { transition: transform 0.15s ease; }
.bar-row:hover { transform: translateX(4px); }
.bar-row .fill {
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Progress bar fill animation */
.progress .bar { transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1); }

/* ----- Tag hover ----- */
.tag { transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.tag:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ----- Badge hover (subtle) ----- */
.badge { transition: transform 0.15s ease; }
.badge:hover { transform: scale(1.04); }

/* ----- Code block hover (highlights) ----- */
.code-block, .diff {
  transition: border-color 0.2s ease;
}

/* ----- Callout slide in ----- */
.callout {
  transition: transform 0.2s ease;
}
.callout:hover { transform: translateX(2px); }

/* ----- Scroll progress bar (top of viewport) ----- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-primary);
  z-index: 10000;
  transition: width 0.08s linear;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(49, 130, 246, 0.5);
}

/* ----- TP Panel: smoother field interactions ----- */
.tp-color-input { transition: transform 0.15s ease; }
.tp-color-input:hover { transform: scale(1.08); }

/* Gradient picker grid in theme panel */
.tp-grad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 4px;
}
.tp-grad-card {
  position: relative;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  transition: transform 0.15s ease, box-shadow 0.18s ease;
}
.tp-grad-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tp-grad-card.active {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
.tp-grad-card .name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.96);
  padding: 3px 7px;
  margin: 5px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tp-text-input { transition: border-color 0.15s ease, background 0.15s ease; }
.tp-section-head { transition: color 0.15s ease; }
.tp-section-head:hover { color: var(--text-primary); }
.tp-mode-btn { transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease; }
.tp-mode-btn:active { transform: scale(0.97); }

/* ----- 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, box-shadow, transform;
  transition-duration: 0.25s, 0.25s, 0.25s, 0.25s, 0.25s, 0.25s;
  transition-timing-function: ease;
}

/* ----- Subtle FAB attention nudge on first paint ----- */
@keyframes fab-nudge {
  0%, 90%, 100% { transform: translateY(-50%) translateX(0); }
  95%           { transform: translateY(-50%) translateX(-6px); }
}
body:not(.tp-panel-open) .tp-fab {
  animation: fab-nudge 4s ease-in-out 2 1.2s;
}
.tp-fab:hover { animation: none; }

/* ----- Typing-like cursor on gradient title (optional accent) ----- */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

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

/* ============================================================
   EDITORIAL BACKGROUND — grain texture overlay
   ============================================================ */
.layout::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.11 0 0 0 0 0.07 0 0 0 0.6 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

[data-theme="toss-dark"] .layout::before {
  opacity: 0.08;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.92 0 0 0 0 0.92 0 0 0 0 0.85 0 0 0 0.7 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

/* Soft olive radial wash, fixed */
.layout::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 40% at 30% 0%, rgba(107, 124, 62, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(107, 124, 62, 0.06) 0%, transparent 60%);
}
[data-theme="toss-dark"] .layout::after {
  background:
    radial-gradient(ellipse 70% 40% at 30% 0%, rgba(168, 184, 120, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(168, 184, 120, 0.05) 0%, transparent 60%);
}

/* (Wipe transition removed — chapter content rises in via .chapter.active .chapter-body > *) */

/* ============================================================
   SIDE MARK — rotated editorial text on right edge
   ============================================================ */
.side-mark {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  z-index: 10;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.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.6;
  pointer-events: none;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .side-mark, .bottom-mark { display: none; }
}

/* ============================================================
   CHAPTER WATERMARK — huge faded chapter number (per chapter)
   ============================================================ */
.chapter[data-num]::after {
  content: attr(data-num);
  position: absolute;
  top: 56px;
  right: clamp(48px, 6vw, 112px);
  font-family: var(--font-display);
  font-size: clamp(140px, 16vw, 240px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.85;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
[data-theme="toss-dark"] .chapter[data-num]::after {
  opacity: 0.1;
}
@media (max-width: 768px) {
  .chapter[data-num]::after { display: none; }
}

/* ============================================================
   GRADIENT LINE DIVIDER (replaces solid borders where used)
   ============================================================ */
.eyebrow-line .line {
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--border) 25%,
    transparent 100%
  );
  height: 1px;
}

/* Stat-line top/bottom borders use gradient too */
.stat-line {
  border-top: none;
  border-bottom: none;
  position: relative;
}
.stat-line::before,
.stat-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--border) 30%,
    var(--border-soft) 70%,
    transparent 100%
  );
}
.stat-line::before { top: 0; }
.stat-line::after  { bottom: 0; }

/* Feature item border-top with gradient */
.feature-list > .item {
  border-top: none;
  position: relative;
}
.feature-list > .item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--border) 40%,
    transparent 100%
  );
}

/* Bring chapter content above watermark */
.chapter-inner > * { position: relative; z-index: 1; }
.chapter-watermark { z-index: 0; }

/* Big asterisk / arrow editorial marks */
.editorial-mark {
  font-family: var(--font-display);
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ============================================================
   PPT-STYLE SLIDE LAYOUT
   ============================================================ */

/* ⚠ Slide-only viewport lock. NEVER drop the :has(.layout) scope —
   without it, every regular output page loses scrolling. */
html:has(.layout),
body:has(.layout) {
  height: 100%;
  overflow: hidden;
}

.layout {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Top-left brand — editorial mono */
.top-brand {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 50;
}
.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) — simple fade only ----- */
.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.chapter.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Each top-level chapter-body child rises in with stagger when chapter becomes active */
.chapter.active .chapter-body > * {
  animation: chapter-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.chapter.active .chapter-body > *:nth-child(1) { animation-delay: 0.05s; }
.chapter.active .chapter-body > *:nth-child(2) { animation-delay: 0.13s; }
.chapter.active .chapter-body > *:nth-child(3) { animation-delay: 0.21s; }
.chapter.active .chapter-body > *:nth-child(4) { animation-delay: 0.29s; }
.chapter.active .chapter-body > *:nth-child(5) { animation-delay: 0.37s; }
.chapter.active .chapter-body > *:nth-child(6) { animation-delay: 0.45s; }
.chapter.active .chapter-body > *:nth-child(7) { animation-delay: 0.53s; }
.chapter.active .chapter-body > *:nth-child(8) { animation-delay: 0.61s; }
.chapter.active .chapter-body > *:nth-child(9) { animation-delay: 0.69s; }
.chapter.active .chapter-body > *:nth-child(n+10) { animation-delay: 0.77s; }

/* Chapter header (when present) animates first */
.chapter.active .chapter-header {
  animation: chapter-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes chapter-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Inside chapters: kill the old reveal hidden state so it doesn't conflict with the rise stagger above */
.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;
  padding: clamp(56px, 7vh, 88px) clamp(48px, 6vw, 96px) clamp(96px, 11vh, 128px);
  margin: 0 auto;
}

/* ----- Chapter header ----- */
.chapter-header {
  flex-shrink: 0;
  margin-bottom: 28px;
}
.chapter-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.chapter-num::before {
  content: "↳ ";
  opacity: 0.6;
}
.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  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 (scrollable inside slide) ----- */
.chapter-body {
  flex: 1;
  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 spacing — clean & breathable */
.chapter-body > * { margin-top: 0; margin-bottom: 0; }
.chapter-body > * + * { margin-top: clamp(36px, 5vh, 56px); }

/* Tighter spacing where context demands it */
.chapter-body > h3 + * { margin-top: 14px; }
.chapter-body > .section-desc + * { margin-top: 16px; }
.chapter-body > p + * { margin-top: 18px; }

/* Extra breathing room after hero */
.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: 8px;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}
.chapter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.chapter-dot:hover {
  background: var(--text-muted);
  transform: scale(1.3);
}
.chapter-dot.active {
  width: 28px;
  border-radius: 999px;
  background: var(--grad-primary);
  box-shadow: 0 0 8px rgba(107, 124, 62, 0.3);
}
.chapter-dot.active:hover {
  background: var(--grad-primary);
  transform: none;
}
.chapter-dots-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* Side arrows removed — use dots / keyboard / horizontal swipe */
.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: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.swatch:hover::after,
.grad-card:hover::after { opacity: 1; }
.grad-card::after {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

/* Hero (chapter 1) */
.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;
}

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

/* ============================================================
   MINIMAL PATTERNS — block-free, typography-led
   ============================================================ */

/* Plain hero — editorial poster feel */
.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 h1 .accent-mark,
.accent-mark {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.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 — heavy editorial numbers, mono uppercase labels */
.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-soft);
}
.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: 11px;
  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-soft); padding-left: 0; }
}

/* Feature list — editorial numbered rows */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 56px;
}
.feature-list > .item {
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.feature-list .item-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.feature-list .item-num::after {
  content: "";
  flex: 0 0 24px;
  height: 1px;
  background: var(--grad-primary);
  -webkit-text-fill-color: initial;
}
.feature-list h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  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 — small label above big content */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Eyebrow-line — horizontal rule with label, like editorial section break */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0;
}
.eyebrow-line .label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.eyebrow-line .num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.eyebrow-line .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ----- Mobile responsive ----- */
@media (max-width: 768px) {
  .top-brand { display: none; }
  .chapter-arrow { display: none; }
  .chapter-inner { padding: 64px 24px 100px; }
  .chapter-title { font-size: 30px; }
  .chapter-lede { font-size: 14px; }
}

/* ============================================================
   MOBILE — narrow viewport refinements (≤ 640px)
   - Editorial type scaling
   - Banner URL wrap
   - KV rows stack vertically
   - Stat-grid compact padding
   ============================================================ */
@media (max-width: 640px) {
  /* Page padding — tighter on mobile */
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Editorial headings — scale down for narrow viewport */
  .header h1 {
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }
  .header .lede {
    font-size: 15px;
    margin-top: 14px;
  }
  .page h2 {
    font-size: 22px;
    margin: 48px 0 12px;
    line-height: 1.15;
  }
  .page h3 {
    font-size: 17px;
    margin-top: 24px;
  }

  /* Banner — column layout + force wrap on long URLs */
  .banner {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 20px;
    gap: 12px;
  }
  .banner > div:not(.banner-blob) {
    min-width: 0;
    width: 100%;
  }
  .banner > div:not(.banner-blob),
  .banner > div:not(.banner-blob) * {
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  /* Inline-styled monospace URL inside banner — force smaller + wrap */
  .banner > div:not(.banner-blob) > div[style*="mono"] {
    font-size: 13px !important;
    line-height: 1.4;
  }

  /* Stat cards — tighter padding & smaller numbers */
  .stat {
    padding: 18px 20px;
  }
  .stat .value {
    font-size: 26px;
  }
  .stat .label {
    font-size: 12px;
  }

  /* KV rows — stack vertically so Korean labels don't break char-by-char */
  .kv {
    padding: 6px 16px;
  }
  .kv .row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0;
  }
  .kv .row .k,
  .kv .row .v {
    display: block;
    width: 100%;
    flex: none;
  }
  .kv .row .k {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .kv .row .v {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  /* Eyebrow section header — keep label inline with line */
  .eyebrow-line {
    flex-wrap: nowrap;
  }

  /* Tables — wrap content within viewport instead of horizontal scroll */
  .table {
    font-size: 12.5px;
    width: 100%;
    table-layout: fixed;
  }
  .table th,
  .table td {
    padding: 10px 8px;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
  }
  /* Inline code in table cells — much smaller, allow break */
  .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 blocks — slightly tighter on mobile */
  .code-block pre {
    font-size: 12px;
    padding: 14px;
    overflow-x: auto;
  }

  /* Feature grid — single column with cleaner spacing */
  .feature-grid {
    gap: 12px;
  }
  .feature {
    padding: 18px 20px;
  }
  .feature h3 {
    font-size: 16px;
    margin-top: 0;
  }

  /* Feature list — looser tap targets */
  .feature-list > .item {
    padding: 20px 0;
  }
  .feature-list > .item h3 {
    font-size: 16px;
  }
}
