/* ════════════════════════════════════════════════════════════
   NEN CODEX · SECTIONS ENHANCE
   Visual treatment for chapters 2 (Hatsu Types), 4 (Conditions),
   5 (Post-Mortem Nen) and 6 (Equations).
   ════════════════════════════════════════════════════════════ */

/* ─── CH.2 · HATSU TYPES ─────────────────────────────────── */

.htype-extra {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) { .htype-extra { grid-template-columns: 1fr; } }

.htype-panel {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.htype-panel__title {
  font-family: var(--font-ar);
  font-size: 14px;
  font-weight: 800;
  color: var(--type-color, var(--cyan));
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.htype-panel__title::before {
  content: "";
  width: 4px; height: 18px;
  background: var(--type-color, var(--cyan));
  border-radius: 100px;
  display: inline-block;
}
.htype-panel__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-3);
  margin-bottom: 14px;
}

/* Pros / Cons list */
.htype-list { list-style: none; padding: 0; margin: 0; }
.htype-list li {
  display: flex; gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 0;
  line-height: 1.85;
  border-bottom: 1px dashed var(--border);
}
.htype-list li:last-child { border-bottom: 0; }
.htype-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  margin-top: 12px;
  border-radius: 100px;
  background: var(--type-color, var(--cyan));
}
.htype-list--neg li::before { background: var(--coral); }

/* Famous users grid */
.htype-users {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.htype-user {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.3s;
}
.htype-user:hover {
  border-color: var(--type-color, var(--cyan));
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
}
.htype-user__name {
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.htype-user__ability {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
}

/* Compatibility wheel */
.htype-wheel {
  grid-column: 1 / -1;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 760px) { .htype-wheel { grid-template-columns: 1fr; } }
.htype-wheel svg { width: 100%; height: auto; max-width: 360px; margin: 0 auto; display: block; }
.htype-wheel__caption {
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--text-2);
  line-height: 2;
}
.htype-wheel__caption strong { color: var(--type-color, var(--cyan)); }
.htype-wheel__caption h4 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

/* ─── CH.4 · CONDITIONS / RESTRICTIONS / VOWS ───────────── */

.vow-calc {
  margin-top: 36px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.vow-calc__bg {
  position: absolute; top: 0; right: 0;
  font-family: var(--font-display);
  font-size: 200px;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.04;
  line-height: 0.8;
  pointer-events: none;
}
.vow-calc__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}
.vow-calc__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.vow-calc__row {
  display: grid;
  grid-template-columns: 140px 1fr 64px;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.vow-calc__row:last-child { border-bottom: 0; }
.vow-calc__label { font-size: 14px; color: var(--text); font-weight: 600; }
.vow-calc__label span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1.5px;
  margin-top: 2px;
}
.vow-calc__slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  border-radius: 100px;
  background: var(--bg-3);
  outline: none;
  cursor: pointer;
}
.vow-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 14px var(--gold);
  cursor: grab;
  transition: all 0.2s;
}
.vow-calc__slider::-webkit-slider-thumb:hover { transform: scale(1.18); }
.vow-calc__slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 14px var(--gold);
  cursor: grab;
}
.vow-calc__val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-align: end;
}

.vow-calc__output {
  margin-top: 28px;
  background: linear-gradient(135deg, rgba(255,192,72,0.10), transparent);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.vow-calc__output-label {
  font-family: var(--font-ar);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}
.vow-calc__output-label strong { color: var(--gold); font-size: 15px; }
.vow-calc__output-val {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 30px rgba(255,192,72,0.4);
  min-width: 140px;
  text-align: end;
}
.vow-calc__output-val span {
  font-size: 18px;
  color: var(--text-2);
  font-style: normal;
  font-family: var(--font-mono);
}

/* Famous cases of conditions */
.vow-cases {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.vow-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  border-top: 3px solid var(--vc-clr, var(--gold));
  position: relative;
}
.vow-case__hero {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--vc-clr, var(--gold));
  margin-bottom: 8px;
}
.vow-case__name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}
.vow-case__ability {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 14px;
}
.vow-case__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.vow-case__pair > div {
  background: rgba(0,0,0,0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
}
.vow-case__pair > div strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--vc-clr, var(--gold));
  margin-bottom: 4px;
}
.vow-case__result {
  font-size: 13px;
  color: var(--text-2);
  background: rgba(255,192,72,0.06);
  padding: 10px 14px;
  border-radius: 8px;
  border-right: 3px solid var(--vc-clr, var(--gold));
  line-height: 1.85;
}
.vow-case__result strong { color: var(--vc-clr, var(--gold)); }

/* ─── CH.5 · POST-MORTEM NEN ─────────────────────────────── */

.pmn-flow {
  margin-top: 36px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}
.pmn-flow__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}
.pmn-flow__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--coral);
  margin-bottom: 24px;
}
.pmn-flow svg { width: 100%; max-width: 800px; height: auto; display: block; margin: 0 auto; }

.pmn-cases {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pmn-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-right: 4px solid var(--pc-clr, var(--coral));
  padding: 22px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  cursor: pointer;
  transition: all 0.4s;
}
.pmn-case:hover { transform: translateX(-4px); box-shadow: 0 12px 32px -16px var(--pc-clr, var(--coral)); }
.pmn-case__num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  font-style: italic;
  color: var(--pc-clr, var(--coral));
  opacity: 0.5;
  line-height: 1;
  text-align: center;
}
.pmn-case__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--pc-clr, var(--coral));
  margin-bottom: 4px;
}
.pmn-case__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.pmn-case__body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.95;
}
.pmn-case__body strong { color: var(--pc-clr, var(--coral)); }
.pmn-case__example {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.8;
}
.pmn-case__example::before {
  content: "▸ ";
  color: var(--pc-clr, var(--coral));
  font-style: normal;
  font-weight: 700;
}

/* ─── CH.6 · EQUATIONS ──────────────────────────────────── */

.eqx-simulator {
  margin-top: 36px;
  background:
    linear-gradient(135deg, rgba(0,212,255,0.04), rgba(165,94,234,0.04)),
    rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.eqx-simulator__title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}
.eqx-simulator__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.eqx-formula {
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  margin: 18px 0;
  padding: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px dashed var(--border-2);
  border-radius: 12px;
  line-height: 1.5;
}
.eqx-formula em { color: var(--cyan); font-style: italic; font-weight: 800; }
.eqx-formula b { color: var(--gold); font-style: italic; font-weight: 800; }
.eqx-formula u { color: var(--coral); font-style: italic; font-weight: 800; text-decoration: none; }
.eqx-formula .op { color: var(--text-3); font-style: normal; padding: 0 6px; }

.eqx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 760px) { .eqx-grid { grid-template-columns: 1fr; } }

.eqx-control {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.eqx-control__label {
  font-family: var(--font-ar);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.eqx-control__val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ctrl-clr, var(--cyan));
}
.eqx-control__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.eqx-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px;
  border-radius: 100px;
  background: var(--bg-3);
  outline: none;
  cursor: pointer;
}
.eqx-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ctrl-clr, var(--cyan));
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px var(--ctrl-clr, var(--cyan));
  cursor: grab;
}
.eqx-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ctrl-clr, var(--cyan));
  border: 2px solid var(--bg);
  cursor: grab;
}

.eqx-output {
  margin-top: 24px;
  text-align: center;
}
.eqx-output__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.eqx-output__val {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  font-style: italic;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(255,192,72,0.45);
  line-height: 1;
}
.eqx-output__val span {
  font-size: 22px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 400;
  margin-right: 4px;
}
.eqx-output__breakdown {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 1px;
}

/* Extra equation cards (the new ones) */
.eqx-extras {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.eqx-extra {
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: 4px solid var(--ex-clr, var(--cyan));
  border-radius: 14px;
  padding: 22px;
}
.eqx-extra__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ex-clr, var(--cyan));
  margin-bottom: 8px;
}
.eqx-extra__name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}
.eqx-extra__formula {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  text-align: center;
  padding: 12px;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  margin-bottom: 12px;
  color: var(--ex-clr, var(--cyan));
  letter-spacing: 1px;
}
.eqx-extra__formula b { color: var(--text); font-weight: 800; }
.eqx-extra__body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.95;
}
.eqx-extra__body strong { color: var(--ex-clr, var(--cyan)); }

/* ─── VOW LADDER (Ch.4) ───────────────────────────────────── */
.vow-ladder {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.vow-ladder__row {
  display: grid;
  grid-template-columns: 180px 1fr 60px 80px;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
}
.vow-ladder__lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.vow-ladder__lbl span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-top: 2px;
  font-weight: 400;
}
.vow-ladder__track {
  position: relative;
  height: 14px;
  background: var(--bg-3);
  border-radius: 100px;
  overflow: hidden;
}
.vow-ladder__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--gold) 60%, var(--coral));
  border-radius: 100px;
  box-shadow: 0 0 12px var(--gold);
  transition: width 1s cubic-bezier(.2,.7,.2,1);
}
.vow-ladder__mult {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}
.vow-ladder__pow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  text-align: end;
}
@media (max-width: 700px) {
  .vow-ladder__row { grid-template-columns: 1fr 60px 80px; }
  .vow-ladder__row .vow-ladder__lbl { grid-column: 1 / -1; }
}

/* ─── EQ EXAMPLES (Ch.6) ──────────────────────────────────── */
.eqx-examples {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.eqx-example {
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.eqx-example__head { margin-bottom: 12px; }
.eqx-example__name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.eqx-example__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-3);
  margin-top: 2px;
}
.eqx-example__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.eqx-example__chips span {
  font-size: 11px;
  color: var(--text-2);
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c);
  border-radius: 100px;
  padding: 4px 12px;
  font-family: var(--font-mono);
}
.eqx-example__chips span b {
  color: var(--c);
  font-weight: 700;
  margin-right: 4px;
}
.eqx-example__formula {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.eqx-example__formula span { color: var(--text); }
.eqx-example__formula b {
  color: var(--gold);
  font-weight: 900;
  font-size: 18px;
  margin-right: 6px;
}
.eqx-example__bar-track {
  position: relative;
  height: 26px;
  background: var(--bg-3);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.eqx-example__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--gold) 60%, var(--coral));
  border-radius: 6px;
  box-shadow: 0 0 14px var(--gold);
  transition: width 1.2s cubic-bezier(.2,.7,.2,1);
}
.eqx-example__bar-power {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: #06060b;
  mix-blend-mode: screen;
}
.eqx-example__note {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.85;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}
