/* ============================================================
   Poker Foundations · 撲克基本功 — Reading Companion
   Aesthetic: Architectural Blueprint
   Inspired by: classical columns + red triangulation lines
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Manrope:wght@300;400;500;600;700;800&family=Archivo:wght@500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Noto+Serif+TC:wght@500;700;900&family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Architectural slate */
  --bg: #15191F;
  --bg-2: #1B2028;
  --surface: #232932;
  --surface-2: #2C333E;
  --surface-3: #383F4B;
  --border: #3A4250;
  --border-soft: #2A2F38;
  --grid: rgba(255, 255, 255, 0.022);

  /* Paper / cream — architectural drawing paper */
  --paper: #EBE6D8;
  --paper-2: #DDD7C5;

  /* Accent — structural red (from cover lines) */
  --red: #E03B2C;
  --red-bright: #FF4D3D;
  --red-soft: #C43025;
  --red-dim: rgba(224, 59, 44, 0.18);
  --red-glow: rgba(224, 59, 44, 0.35);

  /* Accent — blueprint blue (technical) */
  --blue: #6E94D4;
  --blue-soft: #517ABF;
  --blue-dim: rgba(110, 148, 212, 0.14);

  /* Text */
  --text: #E8E4D8;
  --text-2: #B0B6C2;
  --text-3: #7A828F;
  --text-dim: #525A66;

  /* Typography */
  --f-display: "Fraunces", "Noto Serif TC", "PingFang TC", serif;
  --f-body: "Manrope", "Noto Sans TC", "PingFang TC", -apple-system, sans-serif;
  --f-tech: "Archivo", "Noto Sans TC", sans-serif;
  --f-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Spacing rhythm */
  --r-1: 0.5rem;
  --r-2: 1rem;
  --r-3: 1.5rem;
  --r-4: 2rem;
  --r-5: 3rem;
  --r-6: 4.5rem;
  --r-7: 6rem;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "ss01";
  overflow-x: hidden;
}

/* ---------- Decorative geometry: red triangulation overlay ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(115deg, transparent 49.85%, rgba(224, 59, 44, 0.08) 49.92%, rgba(224, 59, 44, 0.08) 50.08%, transparent 50.15%),
    linear-gradient(65deg, transparent 49.85%, rgba(224, 59, 44, 0.06) 49.92%, rgba(224, 59, 44, 0.06) 50.08%, transparent 50.15%);
  background-size: 100vw 100vh;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
}

/* ---------- Utilities ---------- */
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
img { max-width: 100%; display: block; }
::selection { background: var(--red); color: var(--paper); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--r-3);
  position: relative;
  z-index: 1;
}
.container-narrow {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--r-3);
  position: relative;
  z-index: 1;
}

/* ---------- Top Nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21, 25, 31, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--r-2) var(--r-3);
  max-width: 1180px;
  margin: 0 auto;
  gap: var(--r-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--f-tech);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--red);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1rem;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.nav-links {
  display: flex;
  gap: var(--r-3);
  align-items: center;
  font-family: var(--f-tech);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-links a {
  color: var(--text-2);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--red);
}
.lang-switch {
  display: flex;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.lang-switch a,
.lang-switch button {
  padding: 0.4rem 0.7rem;
  background: var(--bg-2);
  color: var(--text-3);
  border: none;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-switch a.active,
.lang-switch button.active { background: var(--red); color: var(--paper); }
.lang-switch a:hover:not(.active),
.lang-switch button:hover:not(.active) { color: var(--text); }

/* ---------- Tag / Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-tech);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--red);
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--r-7) 0 var(--r-6);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--r-4);
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: var(--r-3) 0 var(--r-3);
  font-variation-settings: "opsz" 144;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--red);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero h1 .zh {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.45em;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-top: 0.5em;
}
.hero-tagline {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 640px;
  margin-bottom: var(--r-4);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-4);
  padding-top: var(--r-3);
  border-top: 1px solid var(--border-soft);
}
.meta-item {
  font-family: var(--f-tech);
}
.meta-item .label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.2rem;
}
.meta-item .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.meta-item .value.accent { color: var(--red); }

/* ---------- Section base ---------- */
section {
  padding: var(--r-6) 0;
  position: relative;
}
section.tight { padding: var(--r-5) 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: var(--r-2);
  margin-bottom: var(--r-4);
}
.section-label .num {
  font-family: var(--f-tech);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--red);
  letter-spacing: 0.05em;
}
.section-label .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label .tag {
  font-family: var(--f-tech);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

h2.section-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--r-2);
}
h2.section-title .zh {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.5em;
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-top: 0.4em;
}

.lede {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 720px;
  margin-bottom: var(--r-4);
}

/* ---------- Chapter Grid ---------- */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}
.chapter-card {
  background: var(--surface);
  padding: var(--r-3);
  display: flex;
  flex-direction: column;
  gap: var(--r-2);
  transition: background 0.3s var(--ease);
  position: relative;
  min-height: 260px;
}
.chapter-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.4s var(--ease);
}
.chapter-card:hover { background: var(--surface-2); }
.chapter-card:hover::before { width: 100%; }
.chapter-card-num {
  font-family: var(--f-tech);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
}
.chapter-card-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}
.chapter-card-en {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-3);
  font-weight: 400;
  margin-top: -0.4rem;
}
.chapter-card-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-2);
  flex: 1;
}
.chapter-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-tech);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: var(--r-2);
  border-top: 1px solid var(--border-soft);
}
.chapter-card-foot .read {
  color: var(--red);
  font-weight: 700;
}

/* ---------- Concept blocks (chapter pages) ---------- */
.concept {
  background: var(--surface);
  padding: var(--r-4);
  margin: var(--r-4) 0;
  position: relative;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s var(--ease);
}
.concept:hover { border-left-color: var(--red); }
.concept-id {
  position: absolute;
  top: var(--r-3);
  right: var(--r-3);
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.concept h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.concept h3 .en {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.7em;
  color: var(--text-3);
  margin-top: 0.2em;
}
.concept .key {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--red);
  padding: var(--r-2) 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin: var(--r-2) 0;
}
.concept p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: var(--r-2);
}
.concept p:last-child { margin-bottom: 0; }
.concept p strong { color: var(--text); font-weight: 700; }
.concept ul, .concept ol {
  margin: var(--r-2) 0;
  padding-left: 1.5rem;
}
.concept li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 0.4rem;
}
.concept li::marker { color: var(--red); }

/* ---------- Math / formula box ---------- */
.formula {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: var(--r-3);
  margin: var(--r-3) 0;
  font-family: var(--f-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  position: relative;
  overflow-x: auto;
}
.formula::before {
  content: attr(data-label);
  position: absolute;
  top: -0.6rem;
  left: var(--r-2);
  background: var(--bg);
  padding: 0 0.5rem;
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--red);
  text-transform: uppercase;
}
.formula .var { color: var(--blue); }
.formula .op { color: var(--red); }
.formula .comment { color: var(--text-3); font-style: italic; }

/* ---------- Quote / pull quote ---------- */
blockquote.pull {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--text);
  padding: var(--r-3) 0 var(--r-3) var(--r-4);
  margin: var(--r-4) 0;
  border-left: 3px solid var(--red);
  position: relative;
}
blockquote.pull cite {
  display: block;
  font-family: var(--f-tech);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: var(--r-2);
}

/* ---------- Comparison / table-like blocks ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  margin: var(--r-3) 0;
}
.compare-cell {
  background: var(--surface);
  padding: var(--r-3);
}
.compare-cell .label {
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.compare-cell .value-big {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.compare-cell p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------- Chapter navigation (prev/next) ---------- */
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: var(--r-5) 0 0;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}
.chapter-nav a {
  background: var(--surface);
  padding: var(--r-3);
  transition: background 0.3s var(--ease);
}
.chapter-nav a:hover { background: var(--surface-2); }
.chapter-nav .dir {
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.4rem;
}
.chapter-nav .ttl {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.chapter-nav .next { text-align: right; }
.chapter-nav .empty { background: var(--bg-2); pointer-events: none; }

/* ---------- Path / steps ---------- */
.path {
  list-style: none;
  counter-reset: path;
  padding: 0;
  margin: var(--r-3) 0;
}
.path li {
  position: relative;
  padding: var(--r-2) 0 var(--r-2) 3.5rem;
  counter-increment: path;
  border-bottom: 1px dashed var(--border-soft);
}
.path li:last-child { border-bottom: none; }
.path li::before {
  content: "0" counter(path);
  position: absolute;
  left: 0;
  top: var(--r-2);
  font-family: var(--f-tech);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--red);
  letter-spacing: 0.05em;
}
.path li strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border-soft);
  padding: var(--r-5) 0 var(--r-4);
  margin-top: var(--r-6);
  font-size: 0.88rem;
  color: var(--text-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--r-4);
  margin-bottom: var(--r-4);
}
.footer-grid h4 {
  font-family: var(--f-tech);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--r-2);
}
.footer-grid a {
  display: block;
  color: var(--text-3);
  padding: 0.25rem 0;
  font-size: 0.88rem;
}
.footer-grid a:hover { color: var(--red); }
.footer-bot {
  padding-top: var(--r-3);
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--f-tech);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--paper);
  border: 1px solid var(--red);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn:hover {
  background: transparent;
  color: var(--red);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text);
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-2);
  margin: var(--r-3) 0;
}

/* ---------- Decorative architectural diagram ---------- */
.arch-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  margin: var(--r-3) 0;
}
.arch-cell {
  background: var(--surface);
  padding: var(--r-3) var(--r-2);
  text-align: center;
}
.arch-cell .icon {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.arch-cell .ttl {
  font-family: var(--f-tech);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}
.arch-cell .sub {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ---------- Flashcards ---------- */
.cards-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--r-3) 0;
}
.filter-btn {
  font-family: var(--f-tech);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--text-3); }
.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--r-2);
  margin: var(--r-3) 0;
}
.flip-card {
  perspective: 1000px;
  height: 220px;
  cursor: pointer;
}
.flip-card.hidden { display: none; }
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: var(--r-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.flip-front {
  background: var(--surface);
  border: 1px solid var(--border);
}
.flip-back {
  background: var(--bg-2);
  border: 1px solid var(--red);
  transform: rotateY(180deg);
  overflow-y: auto;
}
.flip-tag {
  font-family: var(--f-tech);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.flip-term-zh {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--text);
  margin-top: 0.4rem;
}
.flip-term-en {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-3);
  margin-top: 0.2rem;
}
.flip-hint {
  font-family: var(--f-tech);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: auto;
}
.flip-back-content {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
}
.flip-back-content strong { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar-inner { padding: 0.7rem var(--r-2); gap: var(--r-2); }
  .nav-links { gap: var(--r-2); font-size: 0.7rem; }
  .nav-links a:nth-child(n+3) { display: none; }
  .hero { padding: var(--r-5) 0 var(--r-4); }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 4rem); }
  .hero-meta { gap: var(--r-2); }
  .meta-item .value { font-size: 0.95rem; }
  section { padding: var(--r-5) 0; }
  .chapter-card { min-height: 220px; padding: var(--r-2); }
  .concept { padding: var(--r-2); }
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav .next { text-align: left; }
}

/* ---------- Anim ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.7s var(--ease) both; }
.rise-d1 { animation-delay: 0.1s; }
.rise-d2 { animation-delay: 0.2s; }
.rise-d3 { animation-delay: 0.3s; }
.rise-d4 { animation-delay: 0.4s; }
