/* The visual language follows the engraved panels and inventory art of Classic LoD. */
:root {
  --bg: #0d0c0b; --bg-2: #151311; --panel: #1c1915; --panel-2: #241f19;
  --text: #f0e7d5; --dim: #c2b5a0; --faint: #ac9f8a; --flame: #e1b66c;
  --gold: #dcc099; --line: #3d362d; --line-2: #66513a; --radius: 1px; --wrap: 1320px;
}
body { background: radial-gradient(ellipse at 64% 33%, #1b1714, transparent 52%), var(--bg); }
.top, .top.solid, .top.always { background: rgb(15 14 13 / 96%); border-bottom: 1px solid #5b4935; }
.top .wrap { min-height: 72px; }
.brand { gap: .8rem; }
.brand-stone { width: 36px; height: 40px; display:grid; place-items:center; }
.brand-stone img { width:auto; height:38px; filter:sepia(.5) saturate(1.3) drop-shadow(0 1px 4px #ab4d2444); }
.wordmark { display:grid; gap:.32rem; font:800 1.12rem/1 var(--display); letter-spacing:.055em; }
.wordmark small { color:#c3a477; font:600 .65rem/1 var(--body); letter-spacing:.23em; }
.nav a { font-family:var(--display); font-size:.84rem; }
.button,.button.small { font-family:var(--display); font-weight:600; font-size:.9rem; }
.button.primary,.nav a.button { color:#fff1d7; background:linear-gradient(#833c27,#582116);
  border:1px solid #b68b5b; box-shadow:inset 0 0 0 2px #301811, inset 0 0 0 3px #9b674133, 0 3px 8px #0006; }
.button.primary:hover,.button.primary:focus-visible { color:white; background:linear-gradient(#a55034,#73311e); }
.eyebrow,.ribbon,.index-heading span,.hero-byline,.summon-plate figcaption span,.portrait-caption>span,.capture figcaption {
  color:#c9a77a; text-transform:uppercase; font:600 .82rem/1.4 var(--body); letter-spacing:.16em;
}
main > section { min-height:0; padding:clamp(3.5rem,6vw,6rem) 0; }
main > section.summoning {
  --aura: 172,59,27; --aura-light: 227,148,66;
  border:0; padding:72px 0 1.5rem; isolation:isolate; overflow:hidden; background:#100e0d;
}
.summoning[data-act="mephisto"] { --aura: 28,114,132; --aura-light: 140,196,191; }
.summoning[data-act="andariel"] { --aura: 87,113,41; --aura-light: 179,170,90; }
.summoning[data-act="duriel"] { --aura: 120,99,53; --aura-light: 207,170,105; }
.summoning[data-act="baal"] { --aura: 91,84,135; --aura-light: 185,173,204; }
.sanctum-background { position:absolute; inset:0; z-index:-3; background:#12100e url('media/sanctuary.webp') 70% 50%/cover no-repeat;
  filter:grayscale(.65) sepia(.4) brightness(.68); }
.summoning::before { content:""; position:absolute; inset:0; z-index:-2; background:linear-gradient(90deg,#0d0c0bf5 1%,#110e0de8 33%,#1e110c80 61%,#0c0c0bc2),
  linear-gradient(0deg,#0f0e0d 0%,#0f0d0be6 13%,transparent 52%,#100e0d77); }
.stage-grid { display:grid; grid-template-columns:50% 50%; align-items:center; min-height:clamp(470px,62vh,660px); }
.opening { position:relative; z-index:2; padding:2.5rem 0 2rem; }
.ribbon { display:flex; align-items:center; gap:12px; margin:0 0 1.65rem; }
.ribbon i { display:block; width:32px; height:1px; background:#b0834c; }
.opening h1 { margin:0; }
.mod-name { display:block; margin:0 0 .55rem .13em; font:600 clamp(1.12rem,1.8vw,1.5rem)/1 var(--display);
  text-transform:uppercase; letter-spacing:.34em; color:#e0c59f; }
.hell-title { display:inline-block; padding:0 .04em .06em 0; font:800 clamp(3.9rem,7.7vw,7.5rem)/1.05 var(--display);
  letter-spacing:-.064em; white-space:nowrap; color:#eac79d; text-transform:uppercase;
  background:linear-gradient(174deg,#fcf4e2 5%,#e3c99e 25%,#b79169 46%,#9c4122 59%,#ffaf60 68%,#aa3820 77%,#d59b60 90%);
  background-size:140% 150%; background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 2px 0 #672a17) drop-shadow(0 4px 13px #d443171f); animation:hellfire 5.4s ease-in-out infinite alternate; }
@keyframes hellfire { from {background-position:0 24%;} to {background-position:65% 76%;filter:drop-shadow(0 2px 0 #762e18) drop-shadow(0 2px 10px #ed5c2936);} }
.hero-byline { color:#c4a07b; font-size:.79rem; margin:.5rem 0 1.35rem; }
.opening-copy { max-width:29rem; font:400 clamp(1.1rem,1.5vw,1.29rem)/1.52 var(--body); color:#dfd1bd; margin:0; }
.entry-actions { display:flex; align-items:center; gap:1.6rem; flex-wrap:wrap; margin:1.65rem 0 0; }
.text-link { color:#dfc49f; text-decoration:underline; text-decoration-color:#846746; text-underline-offset:.4em; font-weight:600; }
.text-link:hover { color:#fff1d9; }
.summon-plate { position:relative; height:clamp(440px,53vh,550px); margin:0; isolation:isolate; }
.summon-plate::before { content:""; position:absolute; inset:-8% -20% 0; z-index:-1;
  background:radial-gradient(ellipse at 50% 53%,rgba(var(--aura),.48),rgba(var(--aura),.13) 39%,transparent 68%); }
.seal-halo,.summon-floor { position:absolute; left:50%; pointer-events:none; }
.seal-halo { width:min(74%,345px); aspect-ratio:1; top:42%; transform:translate(-50%,-50%); border-radius:50%;
  border:1px solid rgba(var(--aura-light),.42); outline:1px solid rgba(var(--aura-light),.2); outline-offset:9px;
  background:radial-gradient(ellipse,transparent 52%,rgba(var(--aura),.22) 68%,transparent 72%); }
.seal-halo::before,.seal-halo::after,.seal-halo i { position:absolute; content:""; inset:6%; border:1px solid rgba(var(--aura-light),.21); }
.seal-halo::before { border-radius:50%; inset:2%; border:2px dotted rgba(var(--aura-light),.26); }
.seal-halo::after { inset:14.5%; transform:rotate(45deg); }
.seal-halo i:first-child { inset:14.5%; }
.seal-halo i:last-child { border-radius:50%; inset:10%; }
.summon-floor { width:51%; height:10%; bottom:24%; transform:translateX(-50%); border-radius:50%;
  background:radial-gradient(ellipse,#0c0807b3 18%,rgba(var(--aura),.55) 48%,transparent 73%); filter:blur(4px); }
.monster-window { position:absolute; inset:0 0 14%; display:grid; place-items:center; }
.monster-window img,.monster-window canvas { grid-area:1/1; image-rendering:pixelated; filter:brightness(1.3) saturate(1.16) drop-shadow(0 7px 5px #0c0504b0); }
.monster-window img { width:auto; height:67%; max-width:80%; object-fit:contain; }
.monster-window canvas { width:100%; height:100%; object-fit:contain; }
[hidden] { display:none !important; }
.summon-plate figcaption { position:absolute; bottom:6%; left:10%; right:10%; text-align:center; display:grid; gap:.16rem; }
.summon-plate figcaption span { color:#ceb796; font-size:.74rem; }
.summon-plate figcaption strong { font:600 clamp(1.65rem,2.4vw,2.2rem)/1.2 var(--display); color:#f3e3c7; }
.summon-plate figcaption em { font:italic 1.05rem/1.25 Georgia,serif; color:#cdb99d; }
.motion-toggle { position:absolute; right:0; top:6%; border:1px solid #685340; background:#120f0caa; padding:.42rem .6rem;
  color:#d5c6ae; font:600 .78rem/1 var(--body); cursor:pointer; }
.cinders { position:absolute; inset:10% 5% 20%; pointer-events:none; overflow:hidden; }
.cinders::before,.cinders::after { position:absolute; content:""; inset:0; background:
  radial-gradient(circle at 15% 55%,#ea9955 1px,transparent 2px),radial-gradient(circle at 30% 79%,#d27543 1px,transparent 2px),
  radial-gradient(circle at 67% 64%,#e79963 1px,transparent 2px),radial-gradient(circle at 84% 82%,#de6536 1px,transparent 2px),
  radial-gradient(circle at 22% 15%,#ad5b36 1px,transparent 1.7px); animation:embers 6s linear infinite; }
.cinders::after { animation-delay:-3s; margin-left:10%; }
@keyframes embers { 0% {opacity:0;transform:translateY(2rem);} 30%,70% {opacity:.8;} 100% {opacity:0;transform:translate(1rem,-3rem);} }
.quiet *, .quiet *::after, .quiet *::before { animation-play-state:paused !important; }
.bestiary { position:relative; z-index:1; scroll-margin-top:5.5rem; }
.index-heading { display:flex; align-items:baseline; gap:1rem; padding:.7rem 0; }
.index-heading::after { content:""; flex:1; height:1px; background:linear-gradient(to right,#58432d,transparent); align-self:center; }
.index-heading h2 { margin:0; color:#edd5ae; font:600 .94rem/1 var(--display); letter-spacing:.09em; }
.index-heading span { color:#ae9d87; font-size:.76rem; }
.act-seals { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
.act-seal { display:flex; align-items:center; justify-content:center; gap:clamp(.4rem,1.2vw,1.1rem); min-height:74px; padding:.4rem .6rem; cursor:pointer;
  background:linear-gradient(130deg,#292520,#151413); color:#e4d5bc; border:1px solid #514536; box-shadow:inset 0 0 0 2px #161310; }
.act-seal img { width:48px; height:53px; object-fit:contain; image-rendering:pixelated; filter:saturate(.65); }
.act-seal span { text-align:left; display:grid; gap:3px; }
.act-seal small { font:600 .7rem var(--body); color:#baa381; text-transform:uppercase; letter-spacing:.1em; }
.act-seal strong { font:600 clamp(.85rem,1.3vw,1.1rem) var(--display); }
.act-seal:hover,.act-seal[aria-pressed="true"] { background:linear-gradient(120deg,#4c2b1e,#281a14); border-color:#b38b58; }
.act-seal[aria-pressed="true"] { box-shadow:inset 0 -2px #b76937; }
.act-seal[aria-pressed="true"] img { filter:brightness(1.22); }
.field-grid { display:grid; grid-template-columns:1.04fr 1fr; align-items:center; gap:clamp(2rem,6vw,6rem); }
.capture,.camp-portrait { margin:0; background:#161411; border:1px solid #66533b; box-shadow:0 1rem 3rem #0004; }
.capture { padding:6px; }
.capture img { width:100%; height:auto; }
.capture figcaption { display:flex; justify-content:space-between; padding:.6rem; font-size:.7rem; }
.capture figcaption span { color:#aea18d; }
.field-notes h2,.section-head h2,.split h2,.dl h2 { font-weight:600; letter-spacing:-.038em; }
.run-steps { padding:0; margin:1.3rem 0; list-style:none; }
.run-steps li { border-top:1px solid var(--line); padding:.65rem 0; font-size:1.04rem; color:var(--dim); }
.run-steps b { color:var(--text); }
main > section.terror { background:radial-gradient(ellipse at 73% 44%,#42251b,transparent 61%),#171310; }
.readout,.dl-card,.skill,.tile,.notice-box,.ladder-preview>div { border-radius:0; }
.deck .skill { border-top:2px solid var(--line-2); background:linear-gradient(135deg,#302820,#151310); }
.skill-icon { width:52px; height:52px; image-rendering:pixelated; margin:1rem 0 1.4rem; outline:1px solid #7a694e; }
.camp-portrait { overflow:hidden; text-align:center; background:radial-gradient(ellipse at 50% 37%,#663728 0,#2e211a 35%,#171411 72%); }
.portrait-art { height:clamp(205px,23vw,295px); display:grid; place-items:end center; padding:1.2rem 1rem 0; }
.portrait-art img { height:100%; width:100%; object-fit:contain; min-height:0; filter:brightness(1.24); image-rendering:pixelated; }
.portrait-caption { padding:1rem; }
.portrait-caption h3 { margin:.2rem 0; font-size:1.6rem; }
.hero-choices { display:flex; justify-content:center; flex-wrap:wrap; gap:4px; padding:.75rem; border-top:1px solid #584531; background:#13110f; }
.hero-choices button { color:var(--dim); font:600 .88rem/1.3 var(--body); background:transparent; border:1px solid transparent; padding:.42rem .55rem; cursor:pointer; }
.hero-choices button:hover,.hero-choices button[aria-pressed="true"] { color:#f7dfb5; background:#34261b; border-color:#785d3e; }
main>section.forge { background:radial-gradient(ellipse at 80% 80%,#39251b,transparent 58%),#151311; }
.tile .relic { width:44px; height:48px; object-fit:contain; margin-bottom:1rem; image-rendering:pixelated; }
.page-head { position:relative; isolation:isolate; overflow:hidden; padding:9rem 0 3.5rem;
  background:linear-gradient(90deg,#12100e 12%,#251811ed 56%,#140f0bbd),url('media/sanctuary.webp') center/cover; }
.page-head::after { content:""; z-index:-1; position:absolute; inset:26% 12% 0 70%; background:center top/contain no-repeat; image-rendering:pixelated; opacity:.9; }
.page-guide .page-head::after { background-image:url('media/necromancer.webp'); }
.page-leaderboard .page-head::after { background-image:url('media/baal.webp'); }
.page-head .lead { max-width:min(64%,45rem); }
.page-head h1 span { color:#dbb283; }
.toc { background:#1c1915; border:1px solid var(--line); padding:1rem .4rem; }
footer { background:#0d0c0b; }
:focus-visible { outline:2px solid #efcc8e; outline-offset:3px; }
@media(max-width:960px) {
  .top.open .nav { top:72px; }
  .stage-grid { grid-template-columns:48% 52%; }
  .act-seal { gap:.4rem; }
  .act-seal img { width:35px; }
  main>section { min-height:0; }
}
@media(max-width:700px) {
  .top .wrap { min-height:60px; }
  .top.open .nav { top:60px; }
  main>section.summoning { padding-top:60px; }
  .stage-grid { display:flex; flex-direction:column; align-items:stretch; min-height:0; }
  .opening { padding:2.3rem 0 .65rem; }
  .ribbon { margin:0 0 1rem; font-size:.75rem; }
  .hell-title { font-size:clamp(3.2rem,12.6vw,5.3rem); }
  .mod-name { font-size:1rem; }
  .hero-byline { margin:.25rem 0 .85rem; }
  .opening-copy { max-width:34rem; font-size:1.05rem; }
  .entry-actions { margin-top:1.2rem; gap:1.2rem; }
  .summon-plate { height:290px; margin:0; }
  .seal-halo { width:181px; top:40%; }
  .summon-plate figcaption { bottom:1%; }
  .summon-plate figcaption strong { font-size:1.5rem; }
  .monster-window { inset:-2% 0 10%; }
  .motion-toggle { top:6%; }
  .act-seals { gap:3px; }
  .act-seal { display:grid; justify-items:center; gap:1px; padding:.36rem .05rem; min-height:74px; }
  .act-seal img { width:30px; height:30px; }
  .act-seal span { text-align:center; gap:0; }
  .act-seal small { font-size:.62rem; }
  .act-seal strong { font:600 clamp(.65rem,2.4vw,.85rem) var(--body); }
  .field-grid { grid-template-columns:1fr; }
  .field-notes { grid-row:1; }
  .page-head { padding:6.7rem 0 2.6rem; }
  .page-head::after { inset:25% 1% 0 68%; opacity:.43; }
  .page-head .lead { max-width:82%; }
}
@media(prefers-reduced-motion:reduce) {
  .hell-title,.cinders::before,.cinders::after { animation:none; }
}

/* The loading veil occupies the summoning circle, leaving navigation usable. */
.summon-loader { position:absolute; z-index:5; inset:5% 3% 18%; pointer-events:none; display:grid; place-content:center; justify-items:center; gap:.9rem; background:radial-gradient(ellipse,#160c08 8%,#160c08e6 35%,transparent 69%); }
.summon-loader span { font:800 clamp(1.2rem,3vw,2.4rem) var(--display); letter-spacing:.14em; color:#ffe3ac; text-shadow:0 -1px 3px #fff2a8,0 -4px 10px #eb722c,0 -9px 17px #8c280b; }
.summon-loader i { width:5.5rem; height:2px; background:linear-gradient(90deg,transparent,#ffbb66,transparent); animation:stoke .85s ease-in-out infinite alternate; }
@keyframes stoke { to { transform:scaleX(.4); opacity:.5 } }
.summoning:not(.quiet) .seal-halo::after { animation:orbit-seal 80s linear infinite; }
@keyframes orbit-seal { from {transform:rotate(45deg)} to {transform:rotate(405deg)} }
.spell-range { --spell:#ff842e; position:relative; isolation:isolate; margin:2rem 0 1rem; height:clamp(12rem,24vw,18rem); overflow:hidden; border:1px solid #775c3b; background:#171211; }
.spell-range::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,#100c0c 0%,transparent 58%),linear-gradient(90deg,#211013b0,#11101344,#160d10aa),url('media/sanctuary.webp') center 60%/cover; filter:saturate(.65); }
.spell-field { position:absolute; inset:0 4% 1.8rem; }
.spell-field img { position:absolute; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(2px 6px 3px #000); }
.caster { bottom:5%; left:10%; width:22%; height:78%; }
.spell-target { right:13%; bottom:5%; width:14%; height:44%; }
.spell-gem { right:25%; bottom:6%; height:10%; opacity:0; }
.spell-range figcaption { position:absolute; inset:auto 1.2rem .7rem; display:flex; align-items:baseline; gap:.9rem; color:#f4dfbb; }
.spell-range figcaption span { font:600 .73rem var(--display); color:#d6b68d; letter-spacing:.12em; text-transform:uppercase; }
.spell-range figcaption strong { font:600 1.15rem var(--display); }
.spell-range[data-spell=cold] { --spell:#88daff; }
.spell-range[data-spell=light] { --spell:#ebacff; }
.spell-range[data-spell=light] .spell-gem { opacity:1; }
.spell-trail,.spell-impact { position:absolute; opacity:0; pointer-events:none; color:var(--spell); }
.spell-trail { width:11%; height:7px; top:63%; left:27%; transform:rotate(4deg); border-radius:90%; background:linear-gradient(90deg,transparent,currentColor,#fff4ce); filter:drop-shadow(0 0 7px currentColor); }
[data-spell=cold] .spell-trail { width:2rem; height:2rem; border-radius:50%; background:radial-gradient(circle,#fff 5%,#8edfff 28%,#3182cd 55%,transparent 74%); box-shadow:0 0 20px #66cafa; }
.spell-impact { left:77%; top:66%; width:3rem; aspect-ratio:1; border:3px solid currentColor; border-radius:50%; box-shadow:0 0 15px currentColor,inset 0 0 12px currentColor; }
.casting .spell-trail { animation:spell-flight .65s ease-in both; }
.casting .spell-impact { animation:spell-burst .46s .58s ease-out both; }
.casting[data-spell=cold] .spell-impact { border-style:dotted; border-width:6px; }
.casting[data-spell=light] .spell-trail,.casting[data-spell=light] .spell-impact { display:none; }
.casting[data-spell=light] .spell-gem { animation:retrieve-gem .85s ease-out both; }
@keyframes spell-flight { 0% {opacity:0} 12%,85% {opacity:1} 100% {left:76%;top:68%;opacity:0} }
@keyframes spell-burst { 0% {transform:translate(-50%,-50%) scale(.1);opacity:1} 100% {transform:translate(-50%,-50%) scale(2);opacity:0} }
@keyframes retrieve-gem { 35% {bottom:40%;filter:drop-shadow(0 0 8px #e6a7ff)} 100% {right:76%;bottom:24%;opacity:0} }
.skill.attuned { border-color:var(--el,#b68b5b); }
.spell-button { display:inline-flex; align-items:center; gap:1rem; padding:.65rem 1rem; border:1px solid #765c42; background:#201912; color:#f6ddae; font:600 .85rem var(--display); cursor:pointer; }
.spell-button:hover,.spell-button:focus-visible { background:#493125; border-color:#d4b27d; }
@media(prefers-reduced-motion:reduce) {
  .summoning .seal-halo::after,.summon-loader i,.casting .spell-trail,.casting .spell-impact,.casting .spell-gem { animation:none!important; }
  .casting .spell-impact { opacity:.6; transform:translate(-50%,-50%); }
}
.invoke { position:absolute; z-index:2; top:6%; left:4%; padding:.55rem .75rem; font:600 .78rem var(--display); letter-spacing:.045em; cursor:pointer; color:#f2dcbb; border:1px solid #86613e; background:#1c130ee6; }
.invoke:hover,.invoke:focus-visible { border-color:#f3bf73; color:white; }
#hero-specialty { margin:.3rem 0 .7rem; color:#dbc6aa; }
.summon-plate:has(.summon-loader:not([hidden])) .monster-window { visibility:hidden; }

/* An upright portal behind the act boss. Its colour follows the selected act. */
.infernal-gate { position:absolute; z-index:-1; width:44%; height:65%; top:7%; left:28%; border-radius:50%; transform:rotate(-9deg);
  background:radial-gradient(ellipse,transparent 39%,rgba(var(--aura),.28) 57%,rgba(var(--aura-light),.75) 64%,rgba(var(--aura),.85) 66%,transparent 72%);
  filter:drop-shadow(0 0 18px rgba(var(--aura),.85)); }
.infernal-gate::before,.infernal-gate::after { content:""; position:absolute; inset:4% 1%; border-radius:50%; border:2px solid rgba(var(--aura-light),.45); border-top-color:transparent; transform:rotate(13deg); }
.infernal-gate::after { inset:-2% 6%; transform:rotate(-8deg); }
.summoning:not(.quiet) .infernal-gate { animation:gate-breathe 3.8s ease-in-out infinite alternate; }
@keyframes gate-breathe { to {transform:rotate(-5deg) scale(.94,1.035);filter:drop-shadow(0 0 28px rgba(var(--aura),.9));} }

main>.breach { background:linear-gradient(110deg,#211912,#120e0d 60%,#151518); border-block:1px solid #58412c; }
.breach-layout { display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); align-items:center; gap:clamp(2rem,5vw,6rem); }
.breach-copy h2 { font:600 clamp(2.6rem,5.5vw,5.4rem)/.99 var(--display); letter-spacing:-.065em; margin:.7rem 0 1.2rem; }
.breach-copy em { color:#e1b887; font-style:normal; }
.breach-copy>p:not(.eyebrow) { max-width:34ch; color:#d0bfa9; }
.breach-copy .button { margin-top:.7rem; }
.breach-copy .breach-tip { font-size:.9rem; }
.breach-board { overflow:hidden; isolation:isolate; border:1px solid #96734c; background:#151211; box-shadow:0 15px 45px #07050288,inset 0 0 0 3px #272018; }
.breach-hud,.breach-foot { display:flex; gap:1rem; justify-content:space-between; align-items:center; padding:.75rem 1.15rem; }
.breach-hud { color:#ceb996; font:600 .86rem var(--display); border-bottom:1px solid #59422b; }
.breach-hud b { margin-left:.4rem; color:#fff0c8; font-variant-numeric:tabular-nums; }
.breach-gates { position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); background:linear-gradient(#100c0c33,#0c0809a6),url('media/sanctuary.webp') center 65%/cover; }
.breach-gate { --ink:240,138,57; position:relative; display:grid; place-items:center; height:clamp(11rem,22vw,19rem); border:0; border-right:1px solid #9c805333; padding:0; background:transparent; color:#f0dfc5; cursor:crosshair; overflow:hidden; }
.breach-gate:nth-child(2) { --ink:105,189,226; }
.breach-gate:nth-child(3) { --ink:226,88,75; border:0; }
.breach-gate:disabled { opacity:1; cursor:default; }
.breach-gate:focus-visible { outline-offset:-4px; }
.breach-gate:not(:disabled):hover { background:#e5c39112; }
.rift { position:absolute; inset:15% 17% 22%; border-radius:50%; transform:rotate(5deg); border:1px solid rgba(var(--ink),.65);
  background:radial-gradient(ellipse,#0e080c 40%,rgba(var(--ink),.38) 58%,rgba(var(--ink),.85) 66%,#140a09 72%); box-shadow:0 0 20px rgba(var(--ink),.24); }
.rift::after { content:""; position:absolute; inset:4% -4%; border:1px dashed rgba(var(--ink),.65); border-radius:50%; transform:rotate(-11deg); }
.threat .rift { filter:brightness(1.55); }
.invader { position:absolute; top:49%; left:50%; width:45px; height:58px; background:url('media/fallen-motion.webp') 0 0/450px 58px no-repeat; image-rendering:pixelated; opacity:0; transform:translate(-50%,-50%) scale(1.65); }
.threat .invader { opacity:1; animation:fallen-stride .4s steps(10,end) infinite; filter:drop-shadow(0 3px 2px #000); }
@keyframes fallen-stride { to { background-position:-450px 0; } }
.sealed .rift { animation:seal-shut .5s ease-out both; }
@keyframes seal-shut { from {box-shadow:0 0 25px #f9dba5;filter:brightness(2)} to {transform:scaleX(.08);opacity:0} }
.broken .rift { box-shadow:0 0 35px #ad271e; }
.gate-name { position:absolute; bottom:7%; display:flex; align-items:center; gap:.45rem; font:600 clamp(.8rem,1.5vw,1.1rem) var(--display); }
.gate-name kbd { font:500 .75rem var(--body); border:1px solid #8a745c; padding:.1rem .35rem; background:#201912; }
.breach-foot { min-height:3.2rem; color:#e2cfaf; border-top:1px solid #59422b; }
.breach-foot button { border:0; background:transparent; color:#f7dfb9; text-decoration:underline; cursor:pointer; }
[data-state=paused] .invader { animation-play-state:paused; }
@media(max-width:800px) { .breach-layout { grid-template-columns:1fr; gap:1.3rem; } .breach-copy h2 br {display:none} .breach-copy>p:not(.eyebrow) {max-width:52ch;} }
@media(prefers-reduced-motion:reduce) { .summoning:not(.quiet) .infernal-gate,.threat .invader,.sealed .rift { animation:none; } }

/* The letter faces stay crisp over the moving flame layer. */
.hell-title { position:relative; isolation:isolate; animation:none; filter:none; background:none; }
.title-fire { position:absolute; pointer-events:none; inset:-.47em -.1em -.03em; width:calc(100% + .2em); height:calc(100% + .5em); z-index:0; }
.hell-title .ember-face { position:relative; z-index:1; background:linear-gradient(174deg,#fff4d5 4%,#ffcb85 23%,#cc8960 46%,#773d2c 57%,#d58c50 73%,#a54928 88%,#ffd289 99%); background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; filter:drop-shadow(0 1px 1px #401109); }
.brand-stone {width:48px;height:48px}.brand-stone img {width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 4px #0009)} .wordmark small {color:#e6ac67;letter-spacing:.26em;text-transform:uppercase}
.title-baseline {display:inline-block;width:0;height:0;vertical-align:baseline;}

.trail-section { padding:clamp(3rem,7vw,7rem) 0; background:radial-gradient(ellipse at 78% 45%,#2c1b14,transparent 64%),#100d0c }
.trail-intro { display:flex; align-items:end; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.6rem }
.trail-intro h2,.release-panel h2 { margin:0 }
.trail-landscape { position:relative; height:clamp(200px,26vw,350px); overflow:hidden; margin:0; border:1px solid #735238; background:#191310 }
.trail-landscape img { width:100%; height:100%; object-fit:cover; object-position:50% 47% }
.trail-landscape figcaption { position:absolute; inset:auto 0 0; padding:3rem 1.5rem 1rem; background:linear-gradient(transparent,#090706ed); font:700 clamp(1.45rem,3vw,2.6rem) Cinzel,serif; color:#f4dfb8 }
.trail-landscape small { display:block; font:600 .72rem sans-serif; text-transform:uppercase; letter-spacing:.15em; color:#e4bf8e }
.run-trail { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; padding:0; margin:0; border:1px solid #624634; border-top:0 }
.run-trail li { display:flex; align-items:flex-start; gap:1rem; padding:clamp(1rem,2vw,2rem); background:linear-gradient(150deg,#261c16,#100e0c); border-inline-end:1px solid #624634 }
.run-trail li:last-child { border:0 }
.run-trail img { width:clamp(38px,4vw,60px); height:64px; object-fit:contain; filter:drop-shadow(0 4px 8px #a4481844) }
.run-trail h3 { color:#f3d4a6; margin:0; font-family:Cinzel,serif }
.run-trail p,.release-panel p { color:#d2c2b3; line-height:1.55 }
.run-trail a,.guide-start strong { color:#ecc591 }
.guide-start { padding-left:1.6em }
.guide-start li { padding:0 0 .85rem .5rem }
.release-panel { display:flex; align-items:center; gap:2rem; flex-wrap:wrap }
.release-panel div { flex:1 1 300px }
.release-panel img { object-fit:contain }
@media(max-width:780px) { .run-trail {grid-template-columns:1fr} .run-trail li {border-inline-end:0;border-bottom:1px solid #624634} .release-panel {gap:1rem} }

/* The header doubles as a waypoint index on every page. */
.waypoints { position:relative }
.waypoints summary,.chapter-menu summary { cursor:pointer; color:var(--gold); font:600 .9rem var(--display); padding:.9rem }
.waypoint-links { position:absolute; top:100%; left:0; width:16rem; padding:.5rem; background:#181411; border:1px solid #715438; box-shadow:0 .8rem 2rem #0008 }
.waypoint-links a { display:block; line-height:1.25 }
.waypoint-links a:hover,.waypoint-links a:focus-visible { background:#2b2119 }
.top.open {backdrop-filter:none}
@media(max-width:960px){
  .top.open .nav {top:72px; max-height:calc(100dvh - 72px)}
  .waypoints summary {padding:1rem 0; font-size:1.25rem}
  .waypoint-links {position:static; width:auto; padding:0 1rem; box-shadow:none}
  .top.open .waypoint-links a {font-size:1rem;padding:.75rem .15rem}
}
.chapter-menu summary {border-block:1px solid var(--line-2); padding-left:1rem}
.chapter-menu ol { margin-top:.55rem }
.toc a[aria-current=location] {color:#ffe3b3; border-left-color:#e6ad62; background:linear-gradient(90deg,#b6854924,transparent)}
.page-guide .page-head,.page-leaderboard .page-head {background:linear-gradient(95deg,#100d0af5 35%,#150e0a94),url('media/sanctuary.webp') 70% 42%/cover}
.ladder-training {display:flex; align-items:center; flex-wrap:wrap; gap:1.25rem; border-block:1px solid var(--line-2); margin-top:2rem; padding:1.5rem 0}
.ladder-training img {width:3.5rem; image-rendering:pixelated}
.ladder-training div {flex:1 1 14rem}
.ladder-training h2 {font:600 1.5rem var(--display); margin:0}
.ladder-training p {margin:.3rem 0;color:var(--dim)}
.forge-bench {--heat:#a77e58; position:relative; border:1px solid #856441; background:#16120f; box-shadow:inset 0 0 0 4px #282018,0 16px 50px #0005; min-width:0 }
.forge-bench[data-grade="1"] {--heat:#a5c8da}
.forge-bench[data-grade="2"] {--heat:#ffd181}
.bench-head {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.5rem; padding:.9rem 1.25rem; border-bottom:1px solid var(--line-2); color:#dbc6a6; font:600 .82rem var(--display)}
.bench-head span:last-child {display:flex; gap:.35rem; align-items:center}
.bench-head img {width:1.3rem;height:1.6rem;object-fit:contain}
.anvil-display {position:relative; display:grid; place-items:center; isolation:isolate; overflow:hidden; height:13rem; background:radial-gradient(ellipse at 50% 83%,#9c4e252f,transparent 58%),repeating-linear-gradient(0deg,transparent 0 29px,#b48c6320 30px),repeating-linear-gradient(90deg,#191612 0 29px,#373027 30px)}
.anvil-ring {width:9rem;aspect-ratio:1; position:absolute; border:1px solid var(--heat); border-radius:50%; outline:1px dashed #866b4b;outline-offset:.6rem;opacity:.58}
.anvil-ring::after {content:"";position:absolute;inset:12%;border:1px solid var(--heat);transform:rotate(45deg)}
.anvil-item {height:7rem;width:7rem;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 0 9px var(--heat));z-index:1; transition:filter .45s}
.smith-sparks {position:absolute;inset:0;opacity:0;pointer-events:none;background:radial-gradient(ellipse at center,#fff8d6 1%,#e3ab5988 7%,transparent 52%)}
.bench-body {padding:1.2rem clamp(1rem,3vw,2rem) 1.6rem;border-top:1px solid var(--line-2)}
.bench-body .eyebrow {margin:0}
.bench-body h3 {font:600 clamp(1.6rem,3vw,2.35rem) var(--display);color:var(--heat);margin:.15rem 0 .9rem}
.forge-track {list-style:none;margin:0;padding:0;display:flex}
.forge-track li {flex:1;border-top:2px solid #524332;padding:.4rem .15rem 0;color:#baaa96;font-size:.9rem}
.forge-track li[aria-current=step] {border-color:var(--heat);color:#fff2cf}
.bench-controls {display:flex;align-items:center;flex-wrap:wrap;gap:1rem}
#forge-reset {background:none;border:0;text-decoration:underline;color:var(--gold);padding:.6rem;cursor:pointer}
.bench-controls [hidden] {display:none}
@media(prefers-reduced-motion:no-preference){.forge-bench[data-grade="2"] .anvil-ring {animation:relic-illuminate 1s ease-out}@keyframes relic-illuminate {from{transform:scale(.85);opacity:1}to{transform:scale(1);opacity:.58}}}
.tier-presets {display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.tier-presets button {font:600 .86rem var(--display);color:var(--gold);background:#221b15;border:1px solid #73583c;cursor:pointer;padding:.65rem .9rem}
.tier-presets button:hover,.tier-presets button:focus-visible {background:#3c291c}
#breach-best {color:#f1d79e;margin-bottom:0}
.axe-stats {display:flex;gap:2rem;margin:.8rem 0;padding:.75rem 0;border-block:1px solid var(--line)}
.axe-stats dt {font-size:.85rem;color:var(--dim)}
.axe-stats dd {margin:0;color:#f4e3c7;font:600 1.2rem var(--display);font-variant-numeric:tabular-nums}

.journal-body{max-width:48rem;padding-block:2.5rem 5rem}.journal-body p{line-height:1.7;margin-block:0 1.35rem}
