/* The Academy course pages. An illuminated tome on the dark AT site: dark vellum, fine gold and silver rules,
   chapter seals, drop caps. Loaded after site.css on /academy/ pages only; linked with a content hash. */
.codex {
  --display: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
  --silver: linear-gradient(180deg, #ffffff 0%, #e4ebf4 45%, #a9b7c9 100%);
  --gold-soft: rgba(230, 204, 128, 0.28);
  --gold-line: rgba(230, 204, 128, 0.5);
  --silver-line: rgba(200, 214, 232, 0.14);
  --ink: #d9e2ee;
  --ink-soft: #b6c4d8;
  --vellum: #0e141e;
  --blue-tag: #4a9be3;
}
.codex [hidden] { display: none !important; }
.cx { scroll-padding-top: 88px; }
.cx [id] { scroll-margin-top: 88px; }
.cx h1, .cx h2, .cx h3, .cx-hero h1 { font-family: var(--display); letter-spacing: 0.02em; font-weight: 700; }

/* ---------- rune discs (chapter seals): numeral underneath, glass rune on top, a sweep on hover ---------- */
.rune-disc { position: relative; display: grid; place-items: center; width: var(--rs, 64px); height: var(--rs, 64px); border-radius: 50%; overflow: hidden; flex: none; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, #18355e 0%, #0b1a30 55%, #050b15 100%);
  box-shadow: 0 0 0 1px rgba(230, 204, 128, 0.45), 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease); }
.rune-num { font-family: var(--display); font-weight: 700; font-size: calc(var(--rs, 64px) * 0.34); letter-spacing: 0.04em; color: #e4ebf4; background: var(--silver); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rune-disc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.rune-sweep { position: absolute; inset: 0; z-index: 2; border-radius: 50%; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 240, 200, 0.26) 50%, transparent 70%); transform: translateX(-130%); }
a:hover .rune-sweep, .cx-chap:hover .rune-sweep { transform: translateX(130%); transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1); }
a:hover .rune-disc, .cx-chap:hover .rune-disc { box-shadow: 0 0 0 1px rgba(230, 204, 128, 0.8), 0 0 22px rgba(230, 204, 128, 0.28); }

/* ---------- vellum panel with a double rule and gold corners ---------- */
.cx-vellum { position: relative; border: 1px solid var(--gold-soft); border-radius: 6px;
  background: radial-gradient(130% 70% at 50% 0%, rgba(230, 204, 128, 0.05), transparent 62%), linear-gradient(180deg, #111926 0%, #0c121b 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), inset 0 0 0 5px rgba(4, 6, 10, 0.55), inset 0 0 0 6px var(--silver-line); }
.cx-vellum::before, .cx-vellum::after { content: ''; position: absolute; width: 22px; height: 22px; pointer-events: none; border-color: var(--gold-line); border-style: solid; }
.cx-vellum::before { top: 9px; left: 9px; border-width: 1px 0 0 1px; }
.cx-vellum::after { bottom: 9px; right: 9px; border-width: 0 1px 1px 0; }

/* ---------- scroll-edge divider: a rod with finials and a diamond ---------- */
.cx-scroll { position: relative; height: 18px; margin: 36px 0;
  background: radial-gradient(circle at 6px 9px, #e6cc80 0 3px, transparent 3.5px), radial-gradient(circle at calc(100% - 6px) 9px, #e6cc80 0 3px, transparent 3.5px); }
.cx-scroll::before { content: ''; position: absolute; left: 12px; right: 12px; top: 8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(230, 204, 128, 0.7), rgba(200, 214, 232, 0.3) 30%, rgba(200, 214, 232, 0.3) 70%, rgba(230, 204, 128, 0.7)); }
.cx-scroll::after { content: ''; position: absolute; left: 50%; top: 3px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  border: 1px solid rgba(230, 204, 128, 0.8); background: #0c121b; box-shadow: 0 0 12px rgba(230, 204, 128, 0.3), inset 0 0 0 3px #0c121b, inset 0 0 0 4px rgba(230, 204, 128, 0.5); }

/* ---------- breadcrumbs and layout ---------- */
.cx-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 var(--s-3); font-size: 0.86rem; color: var(--muted); }
.cx-crumbs a { color: var(--ink-soft); }
.cx-crumbs a:hover { color: #fff; }
.cx-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 40px; align-items: start; }
.cx-page { padding: 48px clamp(20px, 5vw, 56px) 36px; min-width: 0; }
.cx-page > * { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- chapter contents (sidebar) ---------- */
.cx-toc { position: sticky; top: 88px; }
.cx-toc details { border: 1px solid var(--silver-line); border-radius: 6px; background: rgba(10, 15, 24, 0.72); }
.cx-toc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; cursor: pointer; border-bottom: 1px solid var(--silver-line); }
.cx-toc summary::-webkit-details-marker { display: none; }
.cx-toc summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.3s var(--ease); }
.cx-toc details[open] summary::after { transform: rotate(-135deg); }
.cx-toc-t { display: flex; flex-direction: column; line-height: 1.2; font-family: var(--display); font-weight: 700; font-size: 0.98rem; color: #f1f5fb; }
.cx-toc-t i { font-style: normal; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.cx-toc ol, .cx-chap-l { list-style: none; margin: 0; padding: 8px; }
.cx-toc li a, .cx-chap-l li a { display: grid; grid-template-columns: 26px minmax(0, 1fr) 16px; gap: 8px; align-items: center; padding: 8px 8px; border-radius: 6px; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.35; }
.cx-toc li a:hover, .cx-chap-l li a:hover { background: rgba(230, 204, 128, 0.07); color: #fff; }
.cx-toc li a[aria-current="page"] { background: rgba(230, 204, 128, 0.1); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.cx-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.74rem; font-weight: 800; color: var(--gold); border: 1px solid var(--gold-soft); }
.cx-tick { width: 14px; height: 14px; border-radius: 50%; }
.is-read .cx-tick { background: rgba(61, 220, 132, 0.16); box-shadow: inset 0 0 0 1px rgba(61, 220, 132, 0.6); position: relative; }
.is-read .cx-tick::after { content: ''; position: absolute; left: 4.5px; top: 2px; width: 4px; height: 7px; border-right: 2px solid #3ddc84; border-bottom: 2px solid #3ddc84; transform: rotate(45deg); }
.is-read .cx-n { color: #3ddc84; border-color: rgba(61, 220, 132, 0.45); }
.cx-toc-all { margin: 0; padding: 4px 16px 14px; font-size: 0.85rem; }

/* ---------- lesson head ---------- */
.cx-head { text-align: center; }
.cx-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.cx-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); line-height: 1.12; margin: 0 0 18px; color: #f4f7fb; text-shadow: 0 2px 24px rgba(58, 155, 255, 0.18); }
.cx-lede { font-size: 1.12rem; line-height: 1.75; color: var(--ink); text-align: left; margin: 0 0 8px; }
.cx-drop::first-letter { font-family: var(--display); font-weight: 700; float: left; font-size: 3.5em; line-height: 0.82; margin: 0.07em 0.12em 0 0; color: var(--gold); text-shadow: 0 0 18px rgba(230, 204, 128, 0.35); }

/* ---------- lesson body ---------- */
.cx-page p, .cx-page li, .cx-page dd { font-size: 1.04rem; line-height: 1.75; color: var(--ink); }
.cx-page strong { color: #fff; }
.cx-page a { text-decoration: underline; text-decoration-color: rgba(58, 155, 255, 0.45); text-underline-offset: 3px; }
.cx-page a.btn, .cx-page .cx-pn, .cx-page .cx-mus h3 a { text-decoration: none; }
.cx-h { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.55rem); margin: 40px 0 14px; color: #f1f5fb; display: flex; align-items: center; gap: 12px; }
.cx-h::before { content: ''; width: 9px; height: 9px; flex: none; transform: rotate(45deg); border: 1px solid var(--gold); box-shadow: 0 0 10px rgba(230, 204, 128, 0.35); }
.cx-sub { color: var(--ink-soft); margin-top: -4px; }
.cx-list, .cx-ol { margin: 0 0 18px; padding-left: 22px; }
.cx-list li, .cx-ol li { margin: 0 0 8px; padding-left: 4px; }
.cx-list li::marker { color: var(--gold); }
.cx-ol li::marker { color: var(--gold); font-weight: 800; }
.cx-terms { margin: 0 0 18px; display: grid; gap: 10px; }
.cx-terms div { padding: 12px 16px; border-left: 2px solid var(--gold-soft); background: rgba(255, 255, 255, 0.02); border-radius: 0 6px 6px 0; }
.cx-terms dt { font-family: var(--display); font-weight: 700; color: var(--gold); letter-spacing: 0.03em; margin-bottom: 2px; }
.cx-terms dd { margin: 0; }
.cx-callout, .cx-keep, .cx-try { margin: 24px 0; padding: 18px 20px; border-radius: 6px; border: 1px solid var(--silver-line); background: rgba(58, 155, 255, 0.05); }
.cx-callout p:last-child, .cx-keep ul, .cx-try p:last-child { margin-bottom: 0; }
.cx-callout-t, .cx-keep-t, .cx-try-t { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.cx-callout.cx-rule { border-color: var(--gold-soft); background: rgba(230, 204, 128, 0.05); }
.cx-callout.cx-avoid { border-color: rgba(255, 93, 93, 0.35); background: rgba(255, 93, 93, 0.05); }
.cx-callout.cx-avoid .cx-callout-t { color: #ff9d92; }
.cx-keep { border-color: var(--gold-soft); background: linear-gradient(180deg, rgba(230, 204, 128, 0.07), rgba(230, 204, 128, 0.02)); }
.cx-keep ul { padding-left: 20px; }
.cx-keep li::marker { color: var(--gold); }
.cx-try { border-color: rgba(61, 220, 132, 0.3); background: rgba(61, 220, 132, 0.05); }
.cx-try .cx-try-t { color: #7fe8ae; }
.cx-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; }
.cx-pair { padding: 16px 18px; border-radius: 6px; border: 1px solid var(--silver-line); }
.cx-pair ul { margin: 0; padding-left: 18px; }
.cx-pair li { font-size: 0.98rem; margin-bottom: 6px; }
.cx-pair-t { margin: 0 0 8px; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.cx-good { background: rgba(61, 220, 132, 0.04); border-color: rgba(61, 220, 132, 0.28); }
.cx-good .cx-pair-t { color: #7fe8ae; }
.cx-bad { background: rgba(255, 93, 93, 0.04); border-color: rgba(255, 93, 93, 0.28); }
.cx-bad .cx-pair-t { color: #ff9d92; }
.cx-tiers { display: grid; gap: 12px; margin: 18px 0 22px; }
.cx-tier { padding: 16px 18px; border: 1px solid var(--silver-line); border-radius: 6px; background: rgba(255, 255, 255, 0.02); }
.cx-tier-t { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-family: var(--display); font-weight: 700; color: #f1f5fb; }
.cx-tier-t span { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; font-size: 0.8rem; color: #0a0f18; background: var(--gold); }
.cx-tier-n { margin: 0 0 6px; color: var(--ink-soft); font-size: 0.96rem; }
.cx-tier ul { margin: 0; padding-left: 20px; }
.cx-tier li { margin-bottom: 4px; }
.cx-fams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 22px; }
.cx-fam { padding: 14px 16px; border: 1px solid var(--silver-line); border-top: 2px solid var(--gold-soft); border-radius: 6px; background: rgba(255, 255, 255, 0.02); }
.cx-fam-t { margin: 0 0 4px; font-family: var(--display); font-weight: 700; color: var(--gold); }
.cx-fam-i { margin: 0; color: #f1f5fb; }
.cx-page .cx-fam-n { margin: 6px 0 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- comp lessons ---------- */
.cx-compbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -4px auto 22px; }
.cx-cls { --cc: #ffffff; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.05); color: #e7eef9;
  border-color: color-mix(in srgb, var(--cc) 55%, transparent); background: color-mix(in srgb, var(--cc) 12%, transparent); color: color-mix(in srgb, var(--cc) 60%, #ffffff); }
.cx-cls::before, .cx-dot { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 8px var(--cc); flex: none; }
.cx-facts { display: grid; gap: 10px; margin: 18px 0 0; }
.cx-facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 12px 16px; border-radius: 6px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--silver-line); }
.cx-facts dt { font-weight: 800; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.cx-facts dd { margin: 0; }
.cx-menu { display: inline; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.92rem; color: #f1f5fb; background: rgba(4, 6, 10, 0.6); border: 1px solid var(--silver-line); border-radius: 4px; padding: 2px 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-sec { margin-top: 8px; }
.cx-fig { margin: 8px 0 16px; }
.cx-fm { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(4, 6, 10, 0.8), 0 18px 40px rgba(0, 0, 0, 0.35); }
.cx-fig figcaption { margin-top: 8px; text-align: center; font-size: 0.86rem; color: var(--muted); }
.fm-floor { stroke: rgba(200, 214, 232, 0.12); stroke-width: 1; }
.fm-pillar { fill: #1b2535; stroke: rgba(230, 204, 128, 0.55); stroke-width: 2; }
.fm-pillar-in { fill: none; stroke: rgba(200, 214, 232, 0.14); stroke-width: 1; }
.fm-line { stroke: #3ddc84; stroke-opacity: 0.6; stroke-width: 2; stroke-dasharray: 5 6; }
.fm-crease { fill: rgba(61, 220, 132, 0.07); stroke: rgba(61, 220, 132, 0.45); stroke-width: 1.5; stroke-dasharray: 3 5; }
.fm-p circle { stroke: #ffffff; stroke-width: 2; }
.fm-stealth circle { stroke-dasharray: 3 3; fill-opacity: 0.45; }
.fm-plus { stroke: #0a0f18; stroke-width: 3; stroke-linecap: round; fill: none; }
.fm-foe { fill: rgba(255, 93, 93, 0.22); stroke: rgba(255, 93, 93, 0.65); stroke-width: 1.5; }
.fm-l { font-family: 'Open Sans', system-ui, sans-serif; font-weight: 800; font-size: 17px; fill: #eef3fa; paint-order: stroke; stroke: #0a0f18; stroke-width: 4px; stroke-linejoin: round; }
.fm-side { font-family: 'Open Sans', system-ui, sans-serif; font-weight: 800; font-size: 11px; letter-spacing: 0.16em; fill: rgba(200, 214, 232, 0.5); }
.fm-side-e { fill: rgba(255, 157, 146, 0.7); }
.cx-steps { list-style: none; margin: 18px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
.cx-steps li { position: relative; padding: 34px 14px 14px; border: 1px solid var(--silver-line); border-radius: 6px; background: rgba(255, 255, 255, 0.025); }
.cx-steps li b { display: block; font-family: var(--display); color: #f1f5fb; margin-bottom: 4px; }
.cx-steps li span:not(.cx-step-n) { display: block; font-size: 0.94rem; line-height: 1.6; color: var(--ink-soft); }
.cx-step-n { position: absolute; top: -13px; left: 14px; min-width: 28px; height: 26px; padding: 0 7px; border-radius: 13px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.78rem; color: #0a0f18; background: var(--gold); box-shadow: 0 0 14px rgba(230, 204, 128, 0.35); }
.cx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cx-tab { --cc: #fff; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px 8px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft);
  border: 1px solid var(--silver-line); background: rgba(255, 255, 255, 0.03); transition: border-color 0.25s, color 0.25s, background 0.25s; }
.cx-tab:hover { color: #fff; border-color: rgba(200, 214, 232, 0.35); }
.cx-tab[aria-selected="true"] { color: #fff; border-color: var(--cc); background: rgba(255, 255, 255, 0.07); background: color-mix(in srgb, var(--cc) 14%, transparent); }
.cx-panel { --cc: #fff; padding: 18px 22px 8px; margin: 0 0 14px; border: 1px solid var(--silver-line); border-left: 3px solid var(--cc); border-radius: 4px 6px 6px 4px; background: rgba(255, 255, 255, 0.02); }
.cx-panel h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.12rem; color: #f4f7fb; }
.cx-role { color: var(--ink-soft); font-style: italic; }
.cx-avoid { padding: 10px 14px; border-radius: 6px; background: rgba(255, 93, 93, 0.06); border: 1px solid rgba(255, 93, 93, 0.25); }
.cx-avoid b { color: #ff9d92; margin-right: 6px; text-transform: uppercase; font-size: 0.76rem; letter-spacing: 0.12em; }
.cx-mus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cx-mu { padding: 16px 18px; border: 1px solid var(--silver-line); border-radius: 6px; background: rgba(255, 255, 255, 0.02); }
.cx-mu h3 { margin: 0 0 8px; font-size: 1.04rem; color: #f1f5fb; }
.cx-mu p { margin: 0 0 6px; font-size: 0.96rem; line-height: 1.6; }
.cx-mu p b { display: inline-block; min-width: 3.6em; margin-right: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.cx-scene { padding: 20px 22px; border-radius: 6px; border: 1px solid var(--gold-soft); background: linear-gradient(180deg, rgba(230, 204, 128, 0.05), rgba(255, 255, 255, 0.01)); }
.cx-scene-s { font-style: italic; color: #e9eef6; }
.cx-scene-d { margin: 0; display: grid; gap: 10px; }
.cx-scene-d div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.cx-scene-d dt { font-weight: 800; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); padding-top: 5px; }
.cx-scene-d dd { margin: 0; }
.cx-do-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cx-do-card { padding: 18px 20px; border-radius: 6px; border: 1px solid var(--line-strong); background: rgba(58, 155, 255, 0.05); }
.cx-do-card ol { margin: 0; padding-left: 20px; }
.cx-do-card li { font-size: 0.96rem; line-height: 1.6; margin-bottom: 6px; }
.cx-do-t { margin: 0 0 8px; font-family: var(--display); font-weight: 700; color: #cfe3ff; }

/* ---------- end of lesson ---------- */
.cx-end { text-align: center; margin-top: 8px; }
.cx-mark { margin: 0 auto 22px; }
.cx-mark[aria-pressed="true"] { border-color: rgba(61, 220, 132, 0.55); color: #a8f0c6; background: rgba(61, 220, 132, 0.08); }
.cx-pnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.cx-pn { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 6px; border: 1px solid var(--silver-line); background: rgba(255, 255, 255, 0.025); color: #f1f5fb; transition: border-color 0.25s, transform 0.25s var(--ease); }
.cx-pn:hover { border-color: var(--gold-soft); transform: translateY(-2px); color: #fff; }
.cx-next { text-align: right; }
.cx-pn-k { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.cx-pn-t { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.3; }

/* ---------- front page ---------- */
.cx-hero { text-align: center; padding: var(--s-6) 0 var(--s-2); }
.cx-eyebrow { margin: 0 0 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.cx-hero h1 { font-size: clamp(2.3rem, 1.4rem + 4.6vw, 4.4rem); line-height: 1.05; margin: 0; color: #e4ebf4; background: var(--silver); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 26px rgba(58, 155, 255, 0.22)); }
.cx-orn { position: relative; height: 18px; max-width: 360px; margin: 18px auto 22px;
  background: radial-gradient(circle at 6px 9px, #e6cc80 0 3px, transparent 3.5px), radial-gradient(circle at calc(100% - 6px) 9px, #e6cc80 0 3px, transparent 3.5px); }
.cx-orn::before { content: ''; position: absolute; left: 12px; right: 12px; top: 8px; height: 2px; background: linear-gradient(90deg, rgba(230, 204, 128, 0.75), rgba(200, 214, 232, 0.3) 35%, rgba(200, 214, 232, 0.3) 65%, rgba(230, 204, 128, 0.75)); }
.cx-orn span { position: absolute; left: 50%; top: 3px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); border: 1px solid rgba(230, 204, 128, 0.85); background: var(--bg); box-shadow: 0 0 14px rgba(230, 204, 128, 0.4); }
.cx-hero-l { max-width: 640px; margin: 0 auto var(--s-3); color: var(--ink-soft); font-size: 1.12rem; line-height: 1.7; }
.cx-hero .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
.cx-progress { margin: var(--s-2) 0 0; color: #a8f0c6; font-weight: 700; font-size: 0.92rem; }
.cx-fsec { margin-top: var(--s-8); }
.cx-fsec > h2 { text-align: center; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin: 0 0 8px; color: #f1f5fb; }
.cx-fsub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto var(--s-3); }
.cx-copy { max-width: 720px; margin: 0 auto; display: grid; gap: var(--s-2); color: var(--ink-soft); text-align: center; }
.cx-copy p { margin: 0; }
.cx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.cx-tile { text-align: center; }
.cx-tile h3 { margin: 0 0 6px; color: var(--gold); font-size: 1.02rem; }
.cx-tile p { margin: 0; color: var(--muted); }
.cx-strip { counter-reset: s; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.cx-strip li { counter-increment: s; position: relative; padding: var(--s-3) var(--s-2) var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); text-align: center; }
.cx-strip li::before { content: counter(s); position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: #04060a; background: var(--gold); box-shadow: 0 0 14px rgba(230, 204, 128, 0.35); }
.cx-strip b { display: block; margin-bottom: 4px; font-family: var(--display); }
.cx-strip span { color: var(--muted); font-size: 0.92rem; }
.cx-chaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.cx-chaps-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s-2); }
.cx-chap { padding: 26px 22px 16px; display: flex; flex-direction: column; }
.cx-chap-h { display: flex; align-items: center; gap: 16px; }
.cx-seal-link { border-radius: 50%; }
.cx-chap-k { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.cx-chap h3 { margin: 2px 0 2px; font-size: 1.22rem; color: #f4f7fb; }
.cx-chap-p { margin: 0; font-size: 0.82rem; font-weight: 700; color: #7fe8ae; }
.cx-chap-b { margin: 14px 0 6px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
.cx-chap-l { padding: 4px 0 0; margin: 0 -6px; }
.cx-chap-wide .cx-chap-l { columns: 2; column-gap: 12px; }
.cx-chap-wide .cx-chap-l li { break-inside: avoid; }
.cx-wsteps { counter-reset: w; list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 10px; }
.cx-wsteps li { counter-increment: w; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink-soft); }
.cx-wsteps li::before { content: counter(w); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #bcdcff; background: rgba(58, 155, 255, 0.14); border: 1px solid var(--line-strong); }
.cx-wsteps b { color: var(--text); }
.cx-note { max-width: 760px; margin: var(--s-2) auto 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.cx-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.cx-figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cx-figs figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-solid); }
.cx-figs figure[hidden] { display: none; }
.cx-figs img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cx-figs figcaption { padding: 10px 14px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.cx-links { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 8px; }
.cx-links a { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.cx-links a:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.cx-links small { color: var(--muted); white-space: nowrap; }
.cx-cta { margin: var(--s-8) 0 var(--s-6); text-align: center; padding: var(--s-5) var(--s-3); border: 1px solid var(--gold-soft); border-radius: 6px; background: radial-gradient(120% 140% at 50% 0%, rgba(58, 155, 255, 0.16), rgba(13, 19, 31, 0.7) 60%); }
.cx-cta h2 { margin: 0 0 6px; color: #f1f5fb; }
.cx-cta p { margin: 0 0 var(--s-3); color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cx-chaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .cx-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cx-toc { position: static; }
  .cx-chaps-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .cx-page { padding: 34px 18px 26px; }
  .cx-vellum::before { top: 7px; left: 7px; width: 16px; height: 16px; }
  .cx-vellum::after { bottom: 7px; right: 7px; width: 16px; height: 16px; }
  .cx-pairs, .cx-fams, .cx-mus, .cx-do-grid, .cx-pnav, .cx-steps, .cx-chaps, .cx-tiles, .cx-strip, .cx-figs, .cx-figs.three { grid-template-columns: minmax(0, 1fr); }
  .cx-strip { gap: 22px; }
  .cx-steps { row-gap: 22px; }
  .cx-facts div, .cx-scene-d div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cx-chap-wide .cx-chap-l { columns: 1; }
  .cx-next { text-align: left; }
  .cx-links a { flex-direction: column; gap: 2px; }
  .cx-fsec { margin-top: var(--s-6); }
  .cx-hero { padding-top: var(--s-4); }
  .cx-panel { padding: 16px 16px 6px; }
  .cx-scene { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rune-sweep, .cx-pn, .rune-disc { transition: none !important; }
}
