/* EnshroudedBuilder — carved night / flame gold theme. */
:root {
  --night: #0c0a10;
  --night-2: #15111c;
  --night-3: #1f1828;
  --stone: #2c2433;
  --parchment: #ece3cf;
  --ash: #b9ad9a;
  --mist: #8a7f8f;
  --flame: #f3a73b;
  --ember: #ff6a2b;
  --shroud: #b2457f;
  --spirit: #4fc1b0;
  --arcane: #7aa7ff;
  --t-mage: #6f9bff;
  --t-warrior: #e45a4f;
  --t-ranger: #5fbf6a;
  --t-core: #e3b55a;
  --display: "Cinzel", "Times New Roman", serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --radius: 0.6rem;
  --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}
* { box-sizing: border-box; }
html { background: var(--night); color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgb(178 69 127 / 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgb(243 167 59 / 0.07), transparent 60%),
    var(--night);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-display { font-family: var(--display); letter-spacing: 0.02em; line-height: 1.2; font-weight: 700; margin: 0; }
a { color: inherit; }
::selection { background: var(--shroud); color: #fff; }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--flame); color: #22130a; padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0; font-family: var(--display); }
.skip:focus { left: 0; }
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .wrap { padding-inline: 1.5rem; } }
.text-flame { color: var(--flame); }
.text-ember { color: var(--ember); }
.text-parchment { color: var(--parchment); }
.text-ash { color: var(--ash); }
.text-mist { color: var(--mist); }
.text-spirit { color: var(--spirit); }
.t-mage { color: var(--t-mage); }
.t-warrior { color: var(--t-warrior); }
.t-ranger { color: var(--t-ranger); }
.t-core { color: var(--t-core); }
.eyebrow { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--flame); margin: 0 0 0.5rem; }
.lead { font-size: 1.2rem; color: var(--ash); margin: 0.75rem 0 0; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgb(243 167 59 / 0.15); background: rgb(12 10 16 / 0.85); backdrop-filter: blur(10px); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--parchment); }
.brand:hover { color: var(--flame); }
.brand .flame { color: var(--flame); }
.main-nav { display: none; align-items: center; gap: 0.25rem; }
.main-nav a { padding: 0.5rem 0.75rem; border-radius: 0.35rem; text-decoration: none; font-family: var(--display); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.main-nav a:hover { color: var(--parchment); }
.lang-switch { padding: 0.5rem 0.7rem; border: 1px solid rgb(236 227 207 / 0.25); border-radius: 0.4rem; text-decoration: none; font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--parchment); }
.lang-switch:hover { border-color: var(--flame); color: var(--flame); }
@media (min-width: 768px) { .main-nav { display: flex; } }
@media (max-width: 767px) { .main-nav { display: none; } .brand span { font-size: 0.98rem; } }

/* Footer */
.site-foot { margin-top: 5rem; border-top: 1px solid rgb(243 167 59 / 0.15); background: rgb(21 17 28 / 0.8); }
.foot-grid { display: grid; gap: 2rem; padding-block: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-brand { font-family: var(--display); font-size: 1.05rem; margin: 0 0 0.5rem; }
.foot-brand .flame { color: var(--flame); }
.foot-note { color: var(--ash); font-size: 0.92rem; margin: 0; max-width: 30rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; color: var(--ash); font-size: 0.95rem; }
.site-foot li { margin-block: 0.3rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover, .site-foot .link-ish:hover { color: var(--flame); }
.link-ish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.foot-fine { padding-bottom: 2rem; color: var(--mist); font-size: 0.78rem; }
.foot-fine a { color: var(--ash); }


/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid rgb(243 167 59 / 0.12); }
.hero-img .hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; opacity: 0.8; }
.hero-img .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--night), rgb(12 10 16 / 0.55) 45%, rgb(12 10 16 / 0.1)); }
.hero-img .hero-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgb(12 10 16 / 0.85), transparent 65%); z-index: 1; }
.hero-inner { position: relative; z-index: 1; padding-block: 3rem 2.5rem; }
.hero-img .hero-inner { min-height: 24rem; display: flex; flex-direction: column; justify-content: flex-end; padding-block: 5rem 3rem; }
@media (min-width: 768px) { .hero-img .hero-inner { min-height: 32rem; padding-block: 7rem 4rem; } }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 900; color: var(--parchment); text-shadow: 0 4px 20px rgb(0 0 0 / 0.55); max-width: 46rem; }
.hero h1 span { color: var(--flame); }
.hero .lead { max-width: 42rem; }
.hero .eyebrow { margin-bottom: 0.9rem; }
.hero-img .hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.crumbs { font-size: 0.85rem; color: var(--mist); margin-bottom: 1.1rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--flame); }
.crumbs span[aria-hidden] { margin-inline: 0.35rem; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 1.6rem 0 0; max-width: 46rem; }
@media (min-width: 768px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-stats > div { border: 1px solid rgb(243 167 59 / 0.18); border-radius: var(--radius); background: linear-gradient(180deg, rgb(31 24 40 / 0.92), rgb(21 17 28 / 0.95)); padding: 0.7rem 0.9rem; }
.hero-stats dt { font-family: var(--display); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flame); }
.hero-stats dd { margin: 0.25rem 0 0; color: var(--parchment); font-size: 0.95rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--display); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.7rem 1.25rem; min-height: 2.75rem; border-radius: 0.4rem; border: 0; cursor: pointer; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn-flame { background: linear-gradient(180deg, #ffbd59, #e2861f); color: #22130a; box-shadow: 0 0 0 1px #ffcf85 inset, 0 6px 24px rgb(243 167 59 / 0.3); }
.btn-flame:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #ffe0ad inset, 0 8px 30px rgb(243 167 59 / 0.45); }
.btn-ghost { border: 1px solid rgb(236 227 207 / 0.25); color: var(--parchment); background: rgb(12 10 16 / 0.4); }
.btn-ghost:hover { border-color: var(--flame); color: var(--flame); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }

/* Tier labels, chips */
.tier { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; font-family: var(--display); font-weight: 900; font-size: 1.3rem; border-radius: 0.35rem; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); flex: none; }
.tier-S { background: linear-gradient(180deg, #ffd27a, #e08a1e); color: #2a1606; }
.tier-A { background: linear-gradient(180deg, #d58bff, #8c3fc0); color: #1c0826; }
.tier-B { background: linear-gradient(180deg, #7fd8c9, #2f8f81); color: #06201c; }
.hero .tier { margin-bottom: 0.8rem; }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; line-height: 1.3; padding: 0.18rem 0.55rem; border-radius: 999px; border: 1px solid rgb(236 227 207 / 0.18); color: var(--ash); background: rgb(12 10 16 / 0.5); text-decoration: none; }
a.chip:hover { border-color: var(--flame); color: var(--flame); }

/* Panels */
.panel { position: relative; background: linear-gradient(180deg, rgb(31 24 40 / 0.92), rgb(21 17 28 / 0.95)); border: 1px solid rgb(243 167 59 / 0.18); border-radius: var(--radius); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), var(--shadow); }
.panel.ornate::before, .panel.ornate::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--flame); opacity: 0.55; pointer-events: none; }
.panel.ornate::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.panel.ornate::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }


/* Page layout */
.page-layout { display: grid; gap: 2.5rem; padding-top: 2.5rem; }
.page-layout .toc { order: -1; }
@media (min-width: 1024px) {
  .page-layout:has(.toc) { grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; }
  .page-layout .toc { order: 2; position: sticky; top: 5rem; }
}
.toc ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.toc li { border-left: 2px solid rgb(243 167 59 / 0.18); }
.toc li a { display: block; padding: 0.35rem 0.75rem; text-decoration: none; color: var(--ash); }
.toc li a:hover { color: var(--flame); border-left-color: var(--flame); }
.toc .eyebrow { padding-left: 0.75rem; }

/* Prose */
.prose { min-width: 0; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin-top: 2.6rem; color: var(--parchment); max-width: 46rem; }
.prose h3 { font-size: clamp(1.15rem, 1.8vw, 1.3rem); margin-top: 1.9rem; color: var(--parchment); max-width: 46rem; }
.prose h4 { font-size: 1.02rem; margin-top: 1.5rem; color: var(--ash); font-family: var(--display); }
.prose p, .prose li, .prose dt, .prose dd, .prose h2, .prose h3, .prose h4, .prose blockquote { max-width: 46rem; }
.prose > section, .prose > div { margin-top: 2rem; }
.prose section > * + *, .prose div > * + * { margin-top: 0.9rem; }
.prose p { margin: 0; color: var(--parchment); }
.prose a { color: var(--flame); text-decoration: underline; text-decoration-color: rgb(243 167 59 / 0.35); text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--flame); }
.prose strong { color: var(--parchment); font-weight: 700; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25rem; }
.prose li { margin-top: 0.35rem; }
.prose li > ul, .prose li > ol { margin-top: 0.3rem; }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(243 167 59 / 0.45), transparent); margin-block: 2rem; }
.prose blockquote { margin: 0; padding: 0.75rem 1rem; border-left: 3px solid var(--flame); background: rgb(31 24 40 / 0.6); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ash); }
.prose code { font-size: 0.9em; background: rgb(44 36 51 / 0.8); padding: 0.1rem 0.35rem; border-radius: 0.25rem; }
.prose figure { margin: 0; }
.prose figure img, .prose .media img { border-radius: var(--radius); border: 1px solid rgb(243 167 59 / 0.15); }
.prose dl { display: grid; gap: 0.5rem; margin: 0; }
.prose dl > div { display: grid; gap: 0.15rem; }
.prose dt { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flame); }
.prose dd { margin: 0; color: var(--parchment); }
.prose details { border: 1px solid rgb(243 167 59 / 0.18); border-radius: var(--radius); padding: 0.8rem 1rem; background: rgb(21 17 28 / 0.7); }
.prose summary { cursor: pointer; font-family: var(--display); color: var(--parchment); }

/* Tables */
.prose .table-wrap, .prose .panel.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgb(243 167 59 / 0.18); background: rgb(21 17 28 / 0.75); max-width: 100%; }
.table-game { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 34rem; }
.table-game th { text-align: left; font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--flame); background: rgb(44 36 51 / 0.55); padding: 0.65rem 0.85rem; white-space: nowrap; }
.table-game td { padding: 0.6rem 0.85rem; border-top: 1px solid rgb(236 227 207 / 0.08); vertical-align: top; color: var(--ash); }
.table-game tbody tr:hover td { background: rgb(31 24 40 / 0.6); }
.table-game td .chip { white-space: nowrap; }
.table-game a { color: var(--parchment); text-decoration: none; }
.table-game a:hover { color: var(--flame); }


/* Cards and grids inside prose */
.card-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card-grid > a.panel, .card-grid > div.panel { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.2s ease, transform 0.2s ease; }
.card-grid > a.panel:hover { border-color: rgb(243 167 59 / 0.5); }
.card-grid > a.panel > div:first-child { position: relative; overflow: hidden; }
.card-grid > a.panel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.card-grid > a.panel > div:first-child .tier { position: absolute; top: 0.7rem; left: 0.7rem; }
.card-grid > a.panel > div:last-child { display: flex; flex-direction: column; gap: 0.65rem; padding: 1.1rem; }
.card-grid h3 { font-size: 1.15rem; margin: 0; color: var(--parchment); max-width: none; }
.card-grid p { margin: 0; color: var(--ash); font-size: 0.97rem; max-width: none; }
.card-grid .font-display { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flame); margin-top: 0.2rem; }
.panel-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 768px) { .panel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.panel-grid > .panel { padding: 1.4rem; }
.panel-grid > p { grid-column: 1 / -1; }
.panel-grid .font-display { font-size: 2.2rem; color: var(--flame); }
.panel-grid h3 { margin-top: 0.35rem; font-size: 1.1rem; }
.panel-grid p { font-size: 0.95rem; }
.tier-head { display: flex; align-items: center; gap: 0.9rem; margin-top: 2rem; max-width: 46rem; }
.tier-head p { margin: 0; color: var(--ash); }
.prose .panel { padding: 1.25rem; margin-top: 1.25rem; }
.prose .panel > * + * { margin-top: 0.85rem; }
.prose p > .font-display { margin-right: 0.35rem; }
.prose .card-grid, .prose .panel-grid, .prose .table-wrap { max-width: none; }
.prose .panel-grid > .panel, .prose .card-grid > a.panel { margin-top: 1.25rem; }
.prose section > .card-grid:first-child, .prose section > .panel-grid:first-child, .prose section > .table-wrap:first-child { margin-top: 0.75rem; }

/* Skill planner tool */
.planner-bar { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .planner-bar { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.planner-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.planner-select { font: inherit; font-size: 0.92rem; color: var(--parchment); background: var(--night-3); border: 1px solid rgb(243 167 59 / 0.25); border-radius: 0.4rem; padding: 0.55rem 0.7rem; min-height: 2.75rem; }
.planner-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .planner-grid { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } }
.planner-stage { position: relative; overflow: hidden; height: 70vh; min-height: 28rem; touch-action: none; user-select: none; }
#tree { width: 100%; height: 100%; cursor: grab; display: block; }
.zoom-controls { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; z-index: 2; }
.zoom-controls .btn { width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; justify-content: center; font-size: 1rem; }
.zoom-controls .btn.small { font-size: 0.6rem; }
.search-box { position: absolute; top: 0.75rem; right: 0.75rem; left: 4rem; z-index: 2; }
@media (min-width: 640px) { .search-box { left: auto; width: 16rem; } }
.search-box input { width: 100%; padding: 0.5rem 0.7rem; border-radius: 0.4rem; border: 1px solid rgb(243 167 59 / 0.25); background: var(--night-3); color: var(--parchment); font: inherit; font-size: 0.92rem; }
.search-box input::placeholder { color: var(--mist); }
#searchResults { list-style: none; margin: 0.3rem 0 0; padding: 0; max-height: 14rem; overflow-y: auto; background: linear-gradient(180deg, rgb(31 24 40 / 0.98), rgb(21 17 28 / 0.98)); border: 1px solid rgb(243 167 59 / 0.2); border-radius: 0.5rem; touch-action: auto; }
#searchResults li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0.7rem; cursor: pointer; border-bottom: 1px solid rgb(236 227 207 / 0.06); }
#searchResults li:last-child { border-bottom: 0; }
#searchResults li:hover { background: var(--night-3); }
.planner-tip { position: absolute; top: 0; left: 0; z-index: 6; pointer-events: none; max-width: 20rem; padding: 0.6rem 0.8rem; font-size: 0.9rem; }
.planner-hint { position: absolute; bottom: 0.5rem; left: 0.75rem; right: 0.75rem; margin: 0; font-size: 0.72rem; color: var(--mist); z-index: 2; }
.planner-side { display: flex; flex-direction: column; gap: 1rem; }
.planner-card { padding: 1.1rem; }
.planner-card .eyebrow { margin-bottom: 0.6rem; }
.points-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.points-head .eyebrow { margin: 0; }
.points { font-family: var(--display); font-size: 1.5rem; margin: 0; }
.points-track { height: 0.5rem; border-radius: 999px; background: var(--night); overflow: hidden; margin-top: 0.75rem; }
.points-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--flame), var(--ember)); }
.level-label { display: block; margin-top: 1rem; font-size: 0.92rem; color: var(--ash); }
#level { width: 100%; accent-color: #f3a73b; margin-top: 0.35rem; }
.biomes { margin-top: 0.9rem; border: 0; padding: 0; }
.biomes legend { font-size: 0.92rem; color: var(--ash); margin-bottom: 0.35rem; padding: 0; }
.biome-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.92rem; color: var(--ash); padding: 0.15rem 0; }
.biome-name { display: flex; align-items: center; gap: 0.45rem; }
.biome { accent-color: #f3a73b; }
#attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; font-size: 0.92rem; margin: 0; }
#attrs > div { display: flex; justify-content: space-between; gap: 0.5rem; }
#attrs dt { font-family: var(--body); font-size: 0.92rem; letter-spacing: 0; text-transform: none; color: var(--ash); }
#attrs dd { margin: 0; color: var(--parchment); font-family: var(--display); }
#list { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; max-height: 20rem; overflow-y: auto; }
#list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.22rem 0; }
.planner-mobilebar { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.5rem 0.9rem; border-top: 1px solid rgb(243 167 59 / 0.15); background: rgb(12 10 16 / 0.9); }
.planner-mobilebar .points-track { margin-top: 0; }
@media (min-width: 1024px) { .planner-mobilebar { display: none; } }
.planner-wrap .flex { display: flex; }
.planner-wrap .items-center { align-items: center; }
.planner-wrap .justify-between { justify-content: space-between; }
.planner-wrap .gap-2 { gap: 0.5rem; }
.planner-wrap .gap-3 { gap: 0.75rem; }
.planner-wrap .text-xs { font-size: 0.75rem; }
.planner-wrap .min-w-0 { min-width: 0; }
.planner-wrap .whitespace-nowrap { white-space: nowrap; }
.planner-wrap .cursor-pointer { cursor: pointer; }
.planner-wrap .px-3 { padding-inline: 0.75rem; }
.planner-wrap .py-2 { padding-block: 0.5rem; }
.planner-wrap .border-b { border-bottom: 1px solid rgb(236 227 207 / 0.06); }
.planner-wrap .hover\:bg-night-3:hover { background: var(--night-3); }

/* Consent dialog */
.consent { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 60; padding: 1rem; border: 1px solid rgb(243 167 59 / 0.25); border-radius: var(--radius); background: linear-gradient(180deg, rgb(31 24 40 / 0.98), rgb(21 17 28 / 0.99)); box-shadow: 0 18px 40px rgb(0 0 0 / 0.5); font-size: 0.92rem; }
.consent p { margin: 0; color: var(--parchment); }
.consent-link { margin-top: 0.35rem !important; font-size: 0.85rem; }
.consent-link a { color: var(--ash); }
.consent-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.consent-actions .btn { min-height: 2.4rem; padding: 0.5rem 0.9rem; font-size: 0.78rem; }
@media (min-width: 640px) { .consent { left: auto; right: 1rem; bottom: 1rem; max-width: 24rem; } }

/* 404 */
.nf { padding-block: 4rem 5rem; text-align: center; }
.nf h1 { font-size: clamp(2rem, 6vw, 3rem); }
.nf p { color: var(--ash); max-width: 34rem; margin: 1rem auto 0; }
.nf .hero-ctas { justify-content: center; }


/* Section headers that pair a heading block with a trailing link. */
.prose section > div:has(> div > h2) { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prose section > div:has(> div > h2) > a { white-space: nowrap; }
/* Card footer call-to-action stays in the display face but small. */
.card-grid > a.panel > div:last-child > .font-display { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--flame); margin: 0; }
.panel-grid > .panel > .font-display { font-size: 2.2rem; color: var(--flame); }


/* Mobile navigation menu (the desktop nav is hidden below 768px). */
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { list-style: none; cursor: pointer; padding: 0.5rem 0.7rem; border: 1px solid rgb(236 227 207 / 0.25); border-radius: 0.4rem; font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--parchment); }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { border-color: var(--flame); color: var(--flame); }
.mobile-menu-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 13rem; background: var(--night-2); border: 1px solid rgb(243 167 59 / 0.22); border-radius: 0.5rem; padding: 0.4rem; display: flex; flex-direction: column; z-index: 50; box-shadow: 0 12px 30px rgb(0 0 0 / 0.45); }
.mobile-menu-panel a { padding: 0.55rem 0.7rem; text-decoration: none; color: var(--parchment); font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 0.3rem; }
.mobile-menu-panel a:hover { color: var(--flame); background: var(--night-3); }
@media (max-width: 767px) { .mobile-menu { display: block; } }


/* ---- Motion: the small effects the original site had ---- */

/* Floating embers over the home hero (18 sparks, same geometry and timing as before). */
.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.embers span { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 8px 2px rgb(255 140 50 / 0.7); animation: eb-rise linear infinite; opacity: 0; }
@keyframes eb-rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.9; } 100% { transform: translate(40px, -70vh); opacity: 0; } }
.hero-img .hero-media { z-index: 0; }
.hero-img .hero-media::after { z-index: 1; }
.hero-img .hero-media::before { z-index: 1; }
.hero-img .hero-inner { z-index: 2; }

/* Build cards: image zooms and the title warms to flame on hover, like the original cards. */
.card-grid > a.panel { transition: border-color 0.2s ease; }
.card-grid > a.panel img { transition: transform 0.5s ease; }
.card-grid > a.panel:hover img { transform: scale(1.05); }
.card-grid > a.panel h3 { transition: color 0.2s ease; }
.card-grid > a.panel:hover h3 { color: var(--flame); }
.card-grid > a.panel .font-display { transition: none; }

/* Links, navigation, chips and table rows ease between states instead of snapping. */
.main-nav a, .brand, .lang-switch, .site-foot a, .crumbs a, .toc li a, .prose a, .chip, a.chip, .link-ish { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, text-decoration-color 0.2s ease; }
.table-game tbody tr td { transition: background-color 0.15s ease; }
.prose .table-game tbody tr:hover td { background: rgb(243 167 59 / 0.05); }
.prose h2, .prose h3 { scroll-margin-top: 5.5rem; }

/* Accept lighter cards/elements on hover on the mobile nav menu. */
.mobile-menu-panel a { transition: color 0.2s ease, background-color 0.2s ease; }

@media (prefers-reduced-motion: reduce) {
  .embers { display: none; }
  html { scroll-behavior: auto; }
  .card-grid > a.panel:hover img { transform: none; }
  .card-grid > a.panel img, .card-grid > a.panel h3, .table-game tbody tr td { transition: none; }
}

/* Ad slots & geo-consent gate: reserved height prevents CLS; holder avoids banner overlap. */
html.ads-gate-pending #consent { display: none !important; }
html.ads-denied .ad-slot { display: none !important; }
.ad-slot { display: flex; justify-content: center; align-items: center; margin: 1.5rem auto; min-height: 250px; overflow: hidden; }
.ad-slot[hidden] { display: none !important; }
.ads-native { max-width: 728px; width: 100%; }
.ad-slot-sidebar { max-width: 300px; width: 100%; min-height: 250px; margin: 0 auto; }
@media (max-width: 1023px) { .ad-slot-sidebar { display: none !important; } }
@media (max-width: 768px) { .ad-slot { min-height: 430px; } .table-cards { display: block; overflow-x: auto; min-width: 0; } }
.ads-social-holder { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; }
.ads-social-holder[hidden] { display: none !important; }
