:root {
  --bg: #06060b;
  --bg-2: #0c0c14;
  --bg-3: #12121e;
  --bg-4: #1a1a2e;
  --surface: #16162a;
  --surface-2: #1e1e38;
  --border: rgba(0,212,255,0.08);
  --border-2: rgba(0,212,255,0.15);
  --text: #e8eaf0;
  --text-2: #9ba3b5;
  --text-3: #5d6577;
  --cyan: #00d4ff;
  --cyan-dim: rgba(0,212,255,0.15);
  --coral: #ff4757;
  --coral-dim: rgba(255,71,87,0.12);
  --gold: #ffc048;
  --gold-dim: rgba(255,192,72,0.12);
  --green: #2ed573;
  --purple: #a55eea;
  --enh: #ff4757;
  --trn: #3742fa;
  --mat: #2ed573;
  --emi: #a55eea;
  --man: #ff9f43;
  --spc: #808e9b;
  --font-ar: 'Noto Kufi Arabic', sans-serif;
  --font-display: 'Playfair Display', serif;
  --font-mono: 'Space Mono', monospace;
  --font-ui: 'Outfit', sans-serif;
  --max-w: 1200px;
  --glow-cyan: 0 0 30px rgba(0,212,255,0.15);
  --glow-coral: 0 0 30px rgba(255,71,87,0.15);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cyan); color: var(--bg); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }

/* ═══════════════════════════════════════════ */
/*  NAVIGATION                                */
/* ═══════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 56px;
  background: rgba(6,6,11,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  transition: all 0.4s;
}
.topbar.scrolled { box-shadow: var(--glow-cyan); }
.topbar__logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 3px;
  display: flex; align-items: center; gap: 10px;
}
.topbar__logo-kanji {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--coral);
}
.topbar__nav {
  display: flex; gap: 2px; list-style: none;
  overflow-x: auto;
  max-width: 70%;
}
.topbar__nav a {
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}
.topbar__nav a:hover, .topbar__nav a.active {
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ═══════════════════════════════════════════ */
/*  HERO                                      */
/* ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
}
.hero__grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 80%);
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.hero__orb--1 { width:500px; height:500px; background:rgba(0,212,255,0.06); top:-100px; right:-100px; }
.hero__orb--2 { width:400px; height:400px; background:rgba(255,71,87,0.05); bottom:-100px; left:-100px; animation-delay:-4s; }
.hero__orb--3 { width:300px; height:300px; background:rgba(165,94,234,0.04); top:40%; left:50%; animation-delay:-8s; }

@keyframes orbFloat {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(30px,-20px) scale(1.1); }
}

.hero__badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 4px;
  border: 1px solid var(--border-2);
  padding: 6px 20px;
  border-radius: 100px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}
.hero__kanji {
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 220px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,212,255,0.15);
  line-height: 0.85;
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}
.hero__kanji span {
  display: inline-block;
  animation: kanjiGlow 4s ease-in-out infinite alternate;
}
@keyframes kanjiGlow {
  0% { -webkit-text-stroke-color: rgba(0,212,255,0.1); }
  100% { -webkit-text-stroke-color: rgba(0,212,255,0.3); }
}
.hero__title {
  font-family: var(--font-ar);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}
.hero__title em {
  font-style: normal;
  color: var(--cyan);
}
.hero__subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 3px;
  margin-bottom: 40px;
  position: relative; z-index: 2;
}
.hero__desc {
  max-width: 680px;
  font-size: 16px;
  color: var(--text-2);
  line-height: 2;
  margin-bottom: 56px;
  position: relative; z-index: 2;
}
.hero__toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 900px;
  width: 100%;
  position: relative; z-index: 2;
}
.hero__toc-item {
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: 12px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.35s;
}
.hero__toc-item:hover {
  border-color: var(--cyan);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}
.hero__toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  background: var(--cyan);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}
.hero__toc-name {
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ═══════════════════════════════════════════ */
/*  CHAPTER HEADERS                           */
/* ═══════════════════════════════════════════ */
.ch-header {
  padding: 100px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ch-header__bg-kanji {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 300px;
  font-family: var(--font-display);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,212,255,0.04);
  pointer-events: none;
}
.ch-header__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 4px;
  margin-bottom: 12px;
  position: relative; z-index: 2;
}
.ch-header__num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  font-style: italic;
  color: var(--cyan);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: -20px;
  position: relative; z-index: 2;
}
.ch-header__title {
  font-family: var(--font-ar);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  position: relative; z-index: 2;
}
.ch-header__title em { font-style: normal; color: var(--cyan); }
.ch-header__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 3px;
  margin-top: 10px;
  position: relative; z-index: 2;
}
.ch-header__line {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin: 24px auto 0;
  position: relative; z-index: 2;
}

/* ═══════════════════════════════════════════ */
/*  SECTION WRAPPER                           */
/* ═══════════════════════════════════════════ */
.sec {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.sec__intro {
  font-size: 17px;
  color: var(--text-2);
  line-height: 2.1;
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
}
.sec__intro strong { color: var(--cyan); font-weight: 700; }

.sec__heading {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sec__heading-text {
  font-family: var(--font-ar);
  font-size: 22px;
  font-weight: 800;
}
.sec__heading-en {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════ */
/*  PRINCIPLE CARDS (Ch.1)                    */
/* ═══════════════════════════════════════════ */
.princ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.princ-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
  cursor: pointer;
}
.princ-card:hover {
  border-color: var(--card-accent, var(--cyan));
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(0,212,255,0.08);
}
.princ-card__accent {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--cyan));
}
.princ-card__badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--card-accent, var(--cyan));
  margin-bottom: 12px;
  display: inline-block;
}
.princ-card__kanji {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--card-accent, var(--cyan));
  opacity: 0.12;
  position: absolute;
  top: 16px; left: 20px;
}
.princ-card__name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}
.princ-card__latin {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.princ-card__text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
  margin-bottom: 16px;
}
.princ-card__summary {
  font-size: 13px;
  color: var(--text-2);
  background: rgba(0,212,255,0.04);
  padding: 12px 16px;
  border-radius: 8px;
  border-right: 3px solid var(--card-accent, var(--cyan));
}
.princ-card__summary strong { color: var(--cyan); }
.princ-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}
.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-3);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* expandable details */
.princ-card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.princ-card.open .princ-card__details {
  max-height: 500px;
}
.princ-card__toggle {
  font-size: 12px;
  color: var(--cyan);
  cursor: pointer;
  margin-top: 12px;
  font-family: var(--font-ui);
  display: flex; align-items: center; gap: 6px;
}

/* ═══════════════════════════════════════════ */
/*  FLOWCHART (Ch.1)                          */
/* ═══════════════════════════════════════════ */
.flow-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 56px;
  overflow-x: auto;
}
.flow-container__title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.flow-container__sub {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin-bottom: 32px;
}
.flow-svg text { font-family: var(--font-ar); }

/* ═══════════════════════════════════════════ */
/*  HATSU TYPES (Ch.2) — TABBED              */
/* ═══════════════════════════════════════════ */
.types-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.types-tab {
  font-family: var(--font-ar);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.3s;
}
.types-tab:hover { border-color: var(--tab-color, var(--cyan)); color: var(--text); }
.types-tab.active {
  background: var(--tab-color, var(--cyan));
  color: var(--bg);
  border-color: transparent;
  font-weight: 700;
}

.type-panel {
  display: none;
  animation: fadeUp 0.4s ease;
}
.type-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.type-card {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.type-card__glow {
  position: absolute; top: -50%; right: -20%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: var(--type-color, var(--cyan));
  opacity: 0.03;
  filter: blur(80px);
  pointer-events: none;
}
.type-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--type-color, var(--cyan));
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.type-card__name {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 4px;
}
.type-card__latin {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.type-card__tagline {
  font-size: 15px;
  color: var(--type-color, var(--cyan));
  font-weight: 600;
  margin-bottom: 20px;
}
.type-card__body p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 2;
  margin-bottom: 14px;
}
.type-card__summary {
  background: rgba(0,0,0,0.3);
  padding: 16px 20px;
  border-radius: 10px;
  border-right: 3px solid var(--type-color, var(--cyan));
  font-size: 14px;
  color: var(--text-2);
  margin-top: 16px;
}
.type-card__summary strong { color: var(--type-color, var(--cyan)); }

.type-card__hex {
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}

/* Water test card */
.water-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.water-card__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.water-card__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.water-card__desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 2;
  margin-bottom: 28px;
  max-width: 700px;
}
.water-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.water-cell {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border-top: 3px solid var(--cell-clr);
  transition: all 0.3s;
}
.water-cell:hover { transform: translateY(-2px); border-color: var(--cell-clr); }
.water-cell__name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--cell-clr);
}
.water-cell__effect {
  font-size: 12px;
  color: var(--text-3);
}

/* ═══════════════════════════════════════════ */
/*  SUBCATEGORIES (Ch.3) — GRID              */
/* ═══════════════════════════════════════════ */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.sub-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  transition: all 0.3s;
  cursor: pointer;
}
.sub-item:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.sub-item__header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.sub-item__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--bg);
  background: var(--cyan);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}
.sub-item__name {
  font-size: 16px;
  font-weight: 700;
}
.sub-item__latin {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1.5px;
}
.sub-item__body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.85;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.sub-item.open .sub-item__body { max-height: 400px; }
.sub-item__summary {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}
.sub-item__summary strong { color: var(--cyan); }

/* ═══════════════════════════════════════════ */
/*  CONDITIONS TRINITY (Ch.4)                */
/* ═══════════════════════════════════════════ */
.trinity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.trinity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.35s;
}
.trinity-card:hover {
  border-color: var(--tri-color, var(--cyan));
  transform: translateY(-3px);
}
.trinity-card__icon {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--tri-color, var(--cyan));
}
.trinity-card__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.trinity-card__latin {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.trinity-card__body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
  text-align: right;
  margin-bottom: 16px;
}
.trinity-card__example {
  background: rgba(0,0,0,0.3);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.trinity-card__example strong { color: var(--gold); }

/* ═══════════════════════════════════════════ */
/*  DEATH NEN (Ch.5)                         */
/* ═══════════════════════════════════════════ */
.death-block {
  background: linear-gradient(135deg, var(--surface), rgba(255,71,87,0.04));
  border: 1px solid rgba(255,71,87,0.12);
  border-radius: 20px;
  padding: 48px 40px;
  margin-bottom: 32px;
  position: relative;
}
.death-block__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--coral);
}
.death-block__body p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 2;
  margin-bottom: 14px;
}
.death-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.death-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.death-case__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--coral);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.death-case__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.death-case__body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.85;
}

/* ═══════════════════════════════════════════ */
/*  EQUATIONS (Ch.6)                         */
/* ═══════════════════════════════════════════ */
.eq-stack {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  margin-bottom: 48px;
}
.eq-level {
  text-align: center;
  padding: 20px 40px;
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s;
}
.eq-level:nth-child(1) {
  width: 240px;
  background: linear-gradient(135deg, rgba(255,192,72,0.12), var(--surface));
  border-color: rgba(255,192,72,0.2);
  border-radius: 12px 12px 0 0;
  z-index: 3;
}
.eq-level:nth-child(2) {
  width: 360px;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), var(--surface));
  border-color: rgba(0,212,255,0.15);
  z-index: 2;
}
.eq-level:nth-child(3) {
  width: 480px;
  background: linear-gradient(135deg, rgba(165,94,234,0.08), var(--surface));
  border-color: rgba(165,94,234,0.15);
  border-radius: 0 0 12px 12px;
  z-index: 1;
}
.eq-level__code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.eq-level:nth-child(1) .eq-level__code { color: var(--gold); }
.eq-level:nth-child(2) .eq-level__code { color: var(--cyan); }
.eq-level:nth-child(3) .eq-level__code { color: var(--purple); }
.eq-level__desc {
  font-size: 12px;
  color: var(--text-3);
}

.eq-detail-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.eq-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.eq-detail__code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.eq-detail__body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.85;
}

.eq-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.eq-person {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.eq-person__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.eq-bar {
  margin-bottom: 10px;
}
.eq-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
  display: flex; justify-content: space-between;
}
.eq-bar__track {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}
.eq-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

/* ═══════════════════════════════════════════ */
/*  Q&A (Ch.7)                               */
/* ═══════════════════════════════════════════ */
.qa-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.qa-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}
.qa-item:hover { border-color: var(--border-2); }
.qa-q {
  padding: 20px 24px;
  display: flex; align-items: flex-start; gap: 14px;
  cursor: pointer;
  user-select: none;
}
.qa-q__mark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}
.qa-q__text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.qa-q__arrow {
  margin-right: auto;
  font-size: 18px;
  color: var(--text-3);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.qa-item.open .qa-q__arrow { transform: rotate(180deg); }
.qa-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.qa-item.open .qa-a { max-height: 600px; }
.qa-a__inner {
  padding: 0 24px 20px 62px;
}
.qa-a__inner p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.95;
  margin-bottom: 10px;
}
.qa-a__inner strong { color: var(--cyan); }

/* ═══════════════════════════════════════════ */
/*  FOOTER                                    */
/* ═══════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer__kanji {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,212,255,0.1);
  margin-bottom: 16px;
}
.footer__text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 3px;
}

/* ═══════════════════════════════════════════ */
/*  SEPARATOR                                 */
/* ═══════════════════════════════════════════ */
.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2), transparent);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════ */
/*  RESPONSIVE                                */
/* ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .type-card { grid-template-columns: 1fr; }
  .type-card__hex { order: -1; margin-bottom: 20px; }
  .trinity-grid { grid-template-columns: 1fr; }
  .eq-detail-cards { grid-template-columns: 1fr; }
  .eq-compare { grid-template-columns: 1fr; }
  .eq-level:nth-child(1), .eq-level:nth-child(2), .eq-level:nth-child(3) { width: 100%; }
  .topbar__nav { display: none; }
  .sub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .princ-grid { grid-template-columns: 1fr; }
  .hero__toc { grid-template-columns: 1fr; }
  .water-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-container { padding: 20px; }
}

/* ═══════════════════════════════════════════ */
/*  NOTE BLOCK                                */
/* ═══════════════════════════════════════════ */
.note-block {
  background: var(--gold-dim);
  border: 1px solid rgba(255,192,72,0.15);
  border-radius: 14px;
  padding: 24px 28px;
  margin-top: 32px;
}
.note-block__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.note-block__body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
}
.note-block__body strong { color: var(--gold); }

/* Training box */
.training-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-top: 32px;
}
.training-box__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.training-box__body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
  margin-bottom: 16px;
}
.training-box__rule {
  background: rgba(0,212,255,0.05);
  padding: 14px 18px;
  border-radius: 10px;
  border-right: 3px solid var(--cyan);
  font-size: 14px;
  color: var(--text-2);
}
.training-box__rule strong { color: var(--cyan); }
