/* ===========================
   DESIGN TOKENS
   (from design-system-web.md)
   =========================== */
:root {
  /* Backgrounds */
  --bg-page: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-callout: #FFF9E6;
  --bg-key-takeaway: #F0F7F4;
  --bg-part-header: #F5F0EB;

  /* Text */
  --text-primary: #1E2A3A;
  --text-secondary: #5A6B7D;
  --text-muted: #8A95A3;
  --text-heading: #1A2332;

  /* Accent Colors */
  --accent-blue: #2B5EA7;
  --accent-red: #C4463A;
  --accent-yellow: #F5C542;
  --accent-yellow-bg: #FEF6D8;
  --accent-green: #5B9A6F;
  --accent-green-bg: #EAF4ED;
  --accent-amber: #D4914A;
  --accent-amber-bg: #FDF3E7;

  /* Borders & Lines */
  --border-light: #E8E2DA;
  --border-ruled: #EDE8E2;
  --border-emphasis: #C4463A;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30,42,58,0.06);
  --shadow-md: 0 4px 12px rgba(30,42,58,0.08);
  --shadow-lg: 0 8px 24px rgba(30,42,58,0.10);

  /* Layout */
  --content-width: 720px;
  --wide-width: 900px;
  --page-padding: 1.5rem;
  --page-padding-lg: 2rem;
  --topbar-height: 50px;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 20px);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-page);
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    var(--border-ruled) 31px,
    var(--border-ruled) 32px
  );
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   LAYOUT
   =========================== */
.site-layout {
  min-height: 100vh;
}

/* ===========================
   TOP BAR
   =========================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-padding);
}

.topbar-left {
  flex-shrink: 0;
}

.topbar-brand {
  font-family: 'Caveat', cursive;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  text-decoration: none;
}

.topbar-brand:hover {
  color: var(--accent-blue);
}

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.topbar-center:hover {
  background: var(--bg-page);
}

.topbar-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.topbar-dropdown-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.topbar-dropdown-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-right {
  flex-shrink: 0;
}

.topbar-lang {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 4px 24px 4px 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6B7D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.topbar-lang:hover {
  border-color: var(--text-muted);
  color: var(--text-heading);
}

.topbar-lang:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}

@media (max-width: 768px) {
  .topbar-title {
    max-width: 160px;
  }
  .topbar-lang {
    display: none;
  }
}

/* ===========================
   BOTTOM BAR (prev / next)
   =========================== */
.bottombar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 8px rgba(30,42,58,0.06);
  padding: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
}

.bottombar-prev,
.bottombar-next {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  min-width: 0;
  flex: 1;
  transition: background 0.2s;
}

.bottombar-prev {
  align-items: flex-start;
}

.bottombar-next {
  align-items: flex-end;
  border-left: 1px solid var(--border-light);
}

.bottombar-prev:hover,
.bottombar-next:hover {
  background: var(--bg-page);
}

.bottombar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bottombar-label svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.bottombar-chapter {
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--accent-blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bottombar-next {
  padding-right: var(--space-lg);
}

.bottombar-prev {
  padding-left: var(--space-lg);
}

/* Bottom padding so content isn't hidden behind fixed bottom bar */
body {
  padding-bottom: 72px;
}

@media (max-width: 768px) {
  .bottombar-chapter {
    display: none;
  }
  .bottombar-prev,
  .bottombar-next {
    padding: var(--space-xs) var(--space-sm);
  }
}

/* ===========================
   CONTENTS OVERLAY
   =========================== */
.contents-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.contents-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contents-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 42, 58, 0.3);
  backdrop-filter: blur(2px);
}

.contents-panel {
  position: relative;
  width: calc(100% - 80px);
  max-width: var(--content-width);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
  animation: contentsFadeIn 0.2s ease;
}

@keyframes contentsFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.contents-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.contents-title {
  font-family: 'Caveat', cursive;
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
}

.contents-close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: none;
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-size: var(--text-xl);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.contents-close:hover {
  background: var(--bg-card);
}

.contents-part-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.contents-nav {
  list-style: none;
  padding: 0;
}

.contents-nav li {
  margin-bottom: 2px;
}

.contents-link {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  font-family: 'Caveat', cursive;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--accent-blue);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: background 0.2s;
  line-height: 1.4;
}

.contents-link:hover {
  background: rgba(43, 94, 167, 0.06);
}

.contents-link.active {
  color: var(--text-heading);
  background: rgba(43, 94, 167, 0.08);
}

/* ===========================
   MAIN CONTENT AREA
   =========================== */
.main-content {
  flex: 1;
  min-width: 0;
}

/* ===========================
   HERO
   =========================== */
.hero {
  padding: var(--space-2xl) var(--page-padding) var(--space-md);
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero-title {
  font-family: 'Caveat', cursive;
  font-size: 4.5rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--text-heading);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-md);
}

.hero-img {
  display: block;
  max-width: 760px;
  width: 100%;
  margin: var(--space-lg) auto var(--space-xl);
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
    margin-top: var(--space-xl);
  }
}

.hero-cta {
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--bg-card);
  background: var(--accent-blue);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover {
  background: #234d8e;
  transform: translateY(-1px);
}

/* ===========================
   PART HEADER
   =========================== */
.part-header {
  background: transparent;
  padding: var(--space-xl) var(--page-padding);
  text-align: center;
  margin: var(--space-2xl) 0 0;
}

.part-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.part-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.part-title {
  font-family: 'Caveat', cursive;
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  color: var(--text-heading);
}

/* ===========================
   CHAPTER CARD
   =========================== */
.chapter {
  max-width: var(--content-width);
  margin: var(--space-xl) auto;
  padding: 0 var(--page-padding);
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
}

.chapter-number {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.chapter-title {
  font-family: 'Caveat', cursive;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--text-heading);
  margin-bottom: var(--space-lg);
}

.chapter-header-img {
  display: block;
  max-width: 100%;
  width: 100%;
  margin: var(--space-sm) auto var(--space-xl);
  filter: contrast(0.92) saturate(0.88) brightness(1.03);
}

/* ===========================
   CONTENT TYPOGRAPHY
   =========================== */
.content p {
  margin-bottom: var(--space-md);
}

.content p:last-child {
  margin-bottom: 0;
}

.content strong {
  font-weight: var(--weight-bold);
  color: var(--text-heading);
}

.content em {
  font-style: italic;
}

.content h2 {
  font-family: 'Caveat', cursive;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.content h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.content h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-heading);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--space-xl) 0;
}

.content ul,
.content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.content li {
  margin-bottom: var(--space-sm);
}

.content li strong {
  font-weight: var(--weight-bold);
}

.content a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.content a:hover {
  color: #234d8e;
}

/* ===========================
   CALLOUT / BLOCKQUOTE
   =========================== */
.callout {
  border-left: 3px solid var(--accent-blue);
  background: var(--bg-callout);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-lg) 0;
  font-size: var(--text-base);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ===========================
   KEY TAKEAWAY BOX
   =========================== */
.key-takeaway {
  background: var(--bg-key-takeaway);
  border-left: 3px solid var(--accent-green);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: var(--space-xl);
}

.key-takeaway-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.key-takeaway p {
  margin: 0;
  color: var(--text-primary);
}

/* ===========================
   IMPORTANT WARNING
   =========================== */
.warning {
  border-left: 3px solid var(--accent-red);
  background: #FDF2F1;
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-lg) 0;
}

.warning p {
  margin: 0;
}

/* ===========================
   YELLOW HIGHLIGHT (inline)
   =========================== */
.hl {
  background: var(--accent-yellow-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ===========================
   TABLES
   =========================== */
.table-wrap {
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-wrap thead th {
  background: var(--bg-part-header);
  font-weight: var(--weight-semibold);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  color: var(--text-heading);
  white-space: nowrap;
}

.table-wrap thead th:last-child {
  border-right: none;
}

.table-wrap tbody td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-wrap tbody td:last-child {
  border-right: none;
}

.table-wrap tbody tr:nth-child(odd) {
  background: var(--bg-card);
}

.table-wrap tbody tr:nth-child(even) {
  background: var(--bg-page);
}

.num {
  font-family: 'DM Mono', monospace;
  font-weight: var(--weight-medium);
  text-align: right;
  white-space: nowrap;
}

.num-accent {
  font-family: 'DM Mono', monospace;
  font-weight: var(--weight-semibold);
  color: var(--accent-amber);
  text-align: right;
  white-space: nowrap;
}

/* ===========================
   NUMBERED STEP LIST
   =========================== */
.steps {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  margin-bottom: var(--space-sm);
  padding-left: 2.5rem;
  position: relative;
  line-height: 1.7;
}

.steps li::before {
  content: counter(step) ".";
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--accent-blue);
  position: absolute;
  left: 0;
  top: -2px;
}

/* ===========================
   ETF CARDS
   =========================== */
.etf-grid {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.etf-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.etf-card-title {
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-bottom: var(--space-xs);
}

.etf-card-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.etf-card-stat {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--accent-amber);
}

.etf-card-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.etf-card-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent-green);
  background: var(--accent-green-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
}

/* ===========================
   COMPARISON GRID
   =========================== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.comparison-col {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.comparison-col h4 {
  font-family: 'Caveat', cursive;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-md);
  margin-top: 0;
}

.comparison-col.positive {
  border-top: 3px solid var(--accent-green);
}

.comparison-col.neutral {
  border-top: 3px solid var(--border-light);
}

.comparison-col ul {
  list-style: none;
  padding: 0;
}

.comparison-col li {
  padding: var(--space-xs) 0;
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* ===========================
   CHECKLIST
   =========================== */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-weight: var(--weight-medium);
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.check-yes {
  background: var(--accent-green-bg);
  color: var(--accent-green);
}

.check-no {
  background: #FDF2F1;
  color: var(--accent-red);
}

/* ===========================
   INFOGRAPHIC IMAGES
   =========================== */
.infographic {
  display: block;
  max-width: 600px;
  width: 100%;
  margin: var(--space-lg) auto;
  border-radius: 0;
  filter: contrast(0.92) saturate(0.88) brightness(1.03);
}

/* ===========================
   MONO INLINE
   =========================== */
.mono {
  font-family: 'DM Mono', monospace;
}

/* (Old chapter-nav removed — replaced by .bottombar above) */

/* ===========================
   INDEX PAGE: CHAPTER LIST
   =========================== */
.index-parts {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-padding) var(--space-2xl);
}

.index-part {
  margin-bottom: var(--space-xl);
}

.index-part-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.index-part-title {
  font-family: 'Caveat', cursive;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-bottom: var(--space-md);
}

.index-chapter-list {
  list-style: none;
  padding: 0;
}

.index-chapter-item {
  margin-bottom: 2px;
}

.index-chapter-link {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.index-chapter-link:hover {
  background: rgba(43, 94, 167, 0.06);
}

.index-chapter-num {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-shrink: 0;
  width: 2rem;
}

.index-chapter-info {
  flex: 1;
}

.index-chapter-title {
  font-family: 'Caveat', cursive;
  font-weight: var(--weight-bold);
  color: var(--accent-blue);
  font-size: var(--text-lg);
}

.index-chapter-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  text-align: center;
  padding: var(--space-2xl) var(--page-padding) 5rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer p {
  margin-bottom: var(--space-sm);
}

/* ===========================
   RESPONSIVE: MOBILE < 768px
   =========================== */
@media (max-width: 768px) {
  :root {
    --text-4xl: 2.5rem;
    --text-3xl: 2rem;
    --text-2xl: 1.5rem;
  }

  .chapter-card {
    padding: var(--space-lg);
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .contents-panel {
    width: calc(100% - 32px);
    padding: var(--space-lg);
  }
}

/* ===========================
   RESPONSIVE: DESKTOP > 1024px
   =========================== */
@media (min-width: 1024px) {
  :root {
    --page-padding: 2rem;
  }
}
