  /* ── APPLE-STYLE DESIGN SYSTEM ── */
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif+SC:wght@400;700;900&display=swap');

  :root {
    --bg:          #f4f0e8;
    --bg2:         rgba(253,249,243,0.82);
    --bg3:         rgba(253,249,243,0.6);
    --surface:     #fdf9f3;
    --border:      rgba(0,0,0,0.12);
    --border2:     rgba(0,0,0,0.20);
    --blue:        #0071e3;
    --blue-light:  rgba(0,113,227,0.08);
    --blue-mid:    rgba(0,113,227,0.15);
    --amber:       #f59e0b;
    --amber-light: rgba(245,158,11,0.08);
    --green:       #34c759;
    --red:         #ff3b30;
    --purple:      #7c3aed;
    --text:        #1d1d1f;
    --text2:       #424245;
    --text3:       #6e6e73;
    --text4:       #a1a1a6;
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    --radius:      14px;
    --radius-sm:   8px;
    --blur:        saturate(180%) blur(20px);
    --mono:        'JetBrains Mono', 'SF Mono', monospace;
    --sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --serif:       'Noto Serif SC', serif;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* subtle dot grid */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(120,100,60,0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
  }

  #app { position: relative; z-index: 1; }

  /* ── HEADER ── */
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    background: rgba(244,240,232,0.88);
    border-bottom: 1px solid var(--border);
    padding: 18px 48px;
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .header-title {
    font-family: var(--sans);
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .header-title span { color: var(--blue); }

  .header-sub {
    font-size: 11px;
    color: var(--text3);
    margin-top: 3px;
    letter-spacing: 0.02em;
    font-family: var(--mono);
  }

  .header-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--blue);
    background: rgba(0,113,227,0.06);
    border: 1px solid rgba(0,113,227,0.18);
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    font-family: var(--sans);
  }

  /* ── LANG TOGGLE ── */
  .lang-toggle {
    display: flex;
    gap: 3px;
    align-items: center;
    background: var(--border);
    border-radius: 10px;
    padding: 3px;
  }

  .lang-btn {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text3);
    transition: all 0.2s;
    white-space: nowrap;
  }

  .lang-btn:hover { color: var(--text); }

  .lang-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
  }

  /* ── LAYOUT ── */
  .layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 65px);
  }

  /* ── SIDEBAR ── */
  .sidebar {
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
    background: rgba(244,240,232,0.75);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
  }

  .sidebar::-webkit-scrollbar { width: 3px; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

  .sidebar-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text4);
    text-transform: uppercase;
    padding: 0 18px 12px;
    font-family: var(--sans);
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    font-size: 12px;
    font-weight: 400;
    color: var(--text3);
    font-family: var(--sans);
    border-radius: 0;
  }

  .nav-item:hover {
    color: var(--text);
    background: rgba(0,113,227,0.05);
  }

  .nav-item.active {
    color: var(--blue);
    border-left-color: var(--blue);
    background: rgba(0,113,227,0.06);
    font-weight: 500;
  }

  .nav-num { font-size: 10px; width: 18px; flex-shrink: 0; opacity: 0.45; font-family: var(--mono); }
  .nav-item.active .nav-num { opacity: 1; }

  /* ── MAIN ── */
  .main {
    padding: 40px 48px;
    max-width: 920px;
  }

  /* ── CONCEPT CARD ── */
  .concept-card {
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
  }

  .concept-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  .card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #f5f0e6 0%, #fdf9f3 100%);
  }

  .card-num {
    font-size: 40px;
    font-weight: 700;
    color: rgba(0,0,0,0.08);
    line-height: 1;
    flex-shrink: 0;
    font-family: var(--sans);
    letter-spacing: -0.03em;
  }

  .card-title-wrap { flex: 1; }

  .card-title {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
    letter-spacing: -0.02em;
  }

  .card-title .accent { color: var(--blue); }

  .card-subtitle {
    font-size: 12px;
    color: var(--text3);
    font-family: var(--mono);
  }

  .card-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    text-transform: uppercase;
    font-family: var(--sans);
  }

  .tag-infra   { background: rgba(124,58,237,0.08); color: var(--purple); border: 1px solid rgba(124,58,237,0.15); }
  .tag-core    { background: rgba(0,113,227,0.06); color: var(--blue); border: 1px solid rgba(0,113,227,0.15); }
  .tag-system  { background: var(--amber-light); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
  .tag-pattern { background: rgba(52,199,89,0.08); color: #1a8a3a; border: 1px solid rgba(52,199,89,0.2); }
  .tag-biz     { background: rgba(255,59,48,0.07); color: var(--red); border: 1px solid rgba(255,59,48,0.15); }

  .card-body { padding: 28px; }

  /* ── DIAGRAM ── */
  .diagram-wrap {
    background: #f0ebe0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    margin-bottom: 24px;
    overflow: visible;
  }

  .diagram-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }

  /* ── DEFINITION BLOCK ── */
  .def-block {
    border-left: 3px solid var(--blue);
    padding: 14px 18px;
    background: rgba(0,113,227,0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 20px;
  }

  .def-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--blue);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-family: var(--sans);
  }

  .def-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    font-family: var(--sans);
  }

  .def-text strong { color: var(--blue); font-weight: 600; }

  /* ── SECTIONS ── */
  .section { margin-bottom: 20px; }

  .section-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text3);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
  }

  .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .prose {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text2);
    font-family: var(--sans);
  }

  .prose strong { color: var(--text); font-weight: 600; }
  .prose em {
    color: var(--blue);
    font-style: normal;
    border-bottom: 1px dashed rgba(0,113,227,0.35);
  }

  /* ── CODE BLOCK ── */
  .code-block {
    background: #1c1c1e;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 12px;
    line-height: 1.75;
    overflow-x: auto;
    margin: 14px 0;
    white-space: pre;
    color: #e2e8f0;
    font-family: var(--mono);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .code-block .kw  { color: #ff79c6; }
  .code-block .str { color: #f1fa8c; }
  .code-block .cmt { color: #6272a4; }
  .code-block .fn  { color: #50fa7b; }

  /* ── TABLE ── */
  .compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0;
    font-family: var(--sans);
  }

  .compare-table th {
    background: #ede8dc;
    color: var(--text3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border2);
  }

  .compare-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: top;
    line-height: 1.5;
  }

  .compare-table tr:last-child td { border-bottom: none; }
  .compare-table tr:hover td { background: rgba(0,113,227,0.03); }

  /* ── INSIGHT BOX ── */
  .insight {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.18);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text2);
    font-family: var(--sans);
  }

  .insight strong { color: var(--text); }
  .insight-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

  /* ── INSTRUCTION CARDS ── */
  .instruction-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f7f3ea;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s, background 0.15s;
  }

  .instruction-card:hover {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .instruction-icon { font-size: 20px; flex-shrink: 0; width: 32px; text-align: center; margin-top: 1px; }

  .instruction-body { flex: 1; }

  .instruction-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    font-family: var(--sans);
  }

  .instruction-text {
    font-size: 13px;
    line-height: 1.85;
    color: var(--text2);
    font-family: var(--sans);
  }

  /* ── LOADING STATE ── */
  .loading-state {
    display: flex; align-items: center; justify-content: center;
    height: 60vh; flex-direction: column; gap: 16px;
    color: var(--text3); font-size: 13px; font-family: var(--sans);
  }

  .loading-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--blue); display: inline-block;
    animation: pulse 1.2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50%       { opacity: 1;   transform: scale(1.2); }
  }

  /* ── FOOTER ── */
  .footer {
    border-top: 1px solid var(--border);
    padding: 20px 48px;
    font-size: 12px;
    color: var(--text4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(244,240,232,0.85);
    font-family: var(--sans);
  }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 5px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main { padding: 24px 20px; }
    .header { padding: 14px 20px; flex-wrap: wrap; }
    .search-input { width: 140px; }
    .search-input:focus { width: 180px; }
    .back-to-top { bottom: 20px; right: 20px; }
  }

  /* ── SIDEBAR TIER LABELS ── */
  .sidebar-tier-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 16px 16px 6px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    opacity: 0.7;
  }

  .sidebar-tier-label:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 8px;
  }

/* ── PRINCIPLES ── */
.principle-card{display:flex;gap:16px;padding:16px;margin-bottom:12px;background:var(--surface);border:1px solid var(--border);border-radius:10px}
.principle-num{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--blue-light);color:var(--blue);font-weight:700;font-size:14px;border-radius:50%}
.principle-title{font-weight:600;font-size:14px;margin-bottom:4px;color:var(--text)}
.principle-text{font-size:13px;color:var(--text2);line-height:1.6}

/* ── STEPS TIMELINE ── */
.steps-timeline{position:relative;padding-left:24px}
.steps-timeline::before{content:'';position:absolute;left:15px;top:0;bottom:0;width:2px;background:var(--border2)}
.step-item{display:flex;gap:16px;margin-bottom:20px;position:relative}
.step-marker{flex-shrink:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:var(--blue);color:white;font-weight:700;font-size:11px;border-radius:50%;z-index:1;margin-left:-24px}
.step-title{font-weight:600;font-size:14px;margin-bottom:4px;color:var(--text)}
.step-text{font-size:13px;color:var(--text2);line-height:1.6}

/* ── COMPARISON GRID ── */
.comparison-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.comparison-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px}
.comparison-name{font-weight:700;font-size:15px;color:var(--blue);margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}
.comparison-label{font-weight:600;font-size:12px}
.comparison-pros .comparison-label{color:var(--green)}
.comparison-cons .comparison-label{color:var(--red)}
.comparison-pros ul,.comparison-cons ul{margin:4px 0 12px;padding-left:16px;font-size:13px;color:var(--text2)}
.comparison-verdict{font-size:12px;font-weight:500;color:var(--text3);font-style:italic;padding-top:8px;border-top:1px solid var(--border)}

/* ── WARNING ── */
.warning-block{display:flex;gap:12px;align-items:flex-start;padding:14px 18px;background:rgba(255,59,48,0.06);border-left:3px solid var(--red);border-radius:0 8px 8px 0;font-size:13px;color:var(--text2);line-height:1.6}
.warning-icon{font-size:16px;flex-shrink:0}

/* ── COLLAPSIBLE EXAMPLES ── */
.example-block{margin-bottom:12px;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.example-summary{padding:12px 16px;font-weight:600;font-size:14px;color:var(--text);cursor:pointer;background:var(--surface);list-style:none}
.example-summary::-webkit-details-marker{display:none}
.example-summary::before{content:'▶ ';font-size:10px;color:var(--text3);transition:transform 0.2s}
details[open] .example-summary::before{content:'▼ '}
.example-body{padding:16px;font-size:13px;color:var(--text2);line-height:1.6;border-top:1px solid var(--border)}

/* ── SEARCH BOX ── */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  color: var(--text4);
  pointer-events: none;
}

.search-input {
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 28px 7px 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  width: 180px;
  outline: none;
  transition: border-color 0.2s, width 0.3s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--blue);
  width: 240px;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}

.search-input::placeholder { color: var(--text4); }

.search-clear {
  position: absolute;
  right: 8px;
  font-size: 12px;
  color: var(--text4);
  cursor: pointer;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}

.search-clear:hover { color: var(--text); background: var(--border); }

.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text4);
  font-size: 15px;
  font-family: var(--sans);
}

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  z-index: 200;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.15s;
  pointer-events: none;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ── RELATED CONCEPTS ── */
.related-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text4);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--sans);
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-chip {
  font-size: 12px;
  font-family: var(--sans);
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0,113,227,0.06);
  border: 1px solid rgba(0,113,227,0.15);
  color: var(--blue);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.related-chip:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text4);
  margin-bottom: 20px;
}

.breadcrumb-link {
  color: var(--blue);
  cursor: pointer;
  transition: opacity 0.15s;
}

.breadcrumb-link:hover { opacity: 0.7; }

.breadcrumb-sep { color: var(--text4); opacity: 0.5; }

/* ── HOME PAGE ── */
.home-hero {
  text-align: center;
  padding: 32px 0 28px;
}

.home-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

.home-hero-sub {
  font-size: 14px;
  color: var(--text3);
  margin-top: 8px;
  font-family: var(--sans);
}

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

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.tier-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tier-card-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: var(--sans);
}

.tier-card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
  font-family: var(--sans);
  margin-bottom: 12px;
}

.tier-card-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  font-family: var(--mono);
}

/* ── PAGE HEADING ── */
.page-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text2);
  font-family: var(--sans);
}

/* ── CHAPTER LIST (tier overview) ── */
.chapter-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

.chapter-list-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.chapter-list-num {
  font-size: 20px;
  font-weight: 700;
  color: rgba(0,0,0,0.1);
  font-family: var(--sans);
  flex-shrink: 0;
  width: 36px;
}

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

.chapter-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--sans);
}

.chapter-list-sub {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
  margin-top: 2px;
}

/* ── PREV/NEXT NAVIGATION ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  max-width: 48%;
}

.page-nav-btn:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
}

.page-nav-arrow {
  font-size: 20px;
  color: var(--blue);
  flex-shrink: 0;
}

.page-nav-hint {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text4);
  font-family: var(--sans);
}

.page-nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: var(--sans);
  margin-top: 2px;
}

.page-nav-next { margin-left: auto; }

/* ── SIDEBAR ENHANCEMENTS ── */
.sidebar-tier-label {
  cursor: pointer;
  transition: color 0.15s;
}

.sidebar-tier-label:hover { color: var(--blue); }
.sidebar-tier-label.active { color: var(--blue); font-weight: 700; opacity: 1; }

/* ── TIER OVERVIEW HERO ── */
.tier-hero {
  background: linear-gradient(135deg, #f5f0e6 0%, #fdf9f3 60%, rgba(0,113,227,0.04) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.tier-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0,113,227,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.tier-hero-label {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.tier-hero-desc {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text2);
  max-width: 640px;
  margin-bottom: 20px;
}

.tier-hero-stat {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tier-hero-count {
  font-size: 32px;
  font-weight: 700;
  color: var(--blue);
  font-family: var(--sans);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── TIER CHAPTER CARD GRID ── */
.tier-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.tier-chapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.tier-chapter-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(0,113,227,0.25);
}

.tier-chapter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tier-chapter-card-num {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  color: rgba(0,0,0,0.07);
  line-height: 1;
  letter-spacing: -0.03em;
}

.tier-chapter-card-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.tier-chapter-card-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tier-chapter-card-def {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text3);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tier-chapter-card-arrow {
  font-size: 16px;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  align-self: flex-end;
  margin-top: 12px;
}

.tier-chapter-card:hover .tier-chapter-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .tier-chapter-grid { grid-template-columns: 1fr; }
  .tier-hero { padding: 28px 20px 24px; }
  .tier-hero-label { font-size: 22px; }
}
