/* Shared forged presentation; page structures, artwork and semantic colors stay authored. */
body.site-forged {
  --forge-gold: #c5a466;
  --forge-gold-light: #f0d49a;
  --forge-muted: #c1b3c7;
  --forge-emerald: #8fe7ad;
  --forge-frame: url('assets/interface/throgg-forged-v1/frame-stone-gold.png');
  --forge-stone: url('assets/interface/throgg-forged-v1/stone-texture.webp');
  background: radial-gradient(ellipse at 50% 0, #45265755, transparent 1200px), linear-gradient(#100b18e8, #100b18f2), var(--forge-stone) center top / 512px 512px;
  color: #eee5e6;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}
body.site-forged::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 0; left: 0; right: 0; height: 1000px;
  background: linear-gradient(#100b1859, #100b1880 35%, #100b18e6 82%, #100b18), url('assets/interface/throgg-forged-v1/world-backdrop.webp') center top / cover no-repeat;
  mask-image: linear-gradient(#000 0%, #000 65%, transparent 100%);
}

body.site-forged .site-nav {
  position: sticky; top: 0; z-index: 60;
  border: 0;
  background: linear-gradient(#080a0ce8, #08090af8), var(--forge-stone) center / 512px;
  box-shadow: 0 4px 22px #000b;
  backdrop-filter: blur(12px);
}
body.site-forged .site-nav .nav-inner {
  display: flex; align-items: center; justify-content: space-between; margin-inline: auto;
  width: min(1500px, calc(100% - 44px));
  min-height: 126px;
  padding: 8px 0;
  gap: 24px;
}
body.site-forged .site-nav .brand { display: block; flex: 0 1 292px; min-width: 180px; text-shadow: none; }
body.site-forged .site-nav .brand img { display: block; width: 100%; height: auto; max-height: 112px; object-fit: contain; }
body.site-forged .site-nav .nav-links { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
body.site-forged .site-nav .nav-links a {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 12px 7px;
  border: 10px solid transparent;
  border-image: var(--forge-frame) 32 / 12px / 0 stretch;
  border-radius: 0;
  background: linear-gradient(#0d1012d9,#080a0cef), var(--forge-stone) center / 380px;
  color: #d8c09a;
  font: 700 14px/1.25 Georgia, serif;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .055em;
  white-space: normal;
  text-decoration: none;
}
body.site-forged .site-nav .nav-links a.active {
  color: #eaffdf;
  background: linear-gradient(#10251ddd,#0c2119ef), var(--forge-stone) center / 380px;
  box-shadow: inset 0 -2px #8fe7ad, inset 0 -14px 16px #3f9f5428;
}
body.site-forged .site-nav .nav-links a.active::after {
  content: ''; position: absolute; width: 8px; height: 8px; background: #a7e9b8; border: 1px solid #e6d195;
  transform: rotate(45deg); bottom: -7px; left: calc(50% - 4px); box-shadow: 0 0 8px #51d28788;
}
body.site-forged .site-nav a:focus-visible { outline: 2px solid var(--forge-emerald); outline-offset: 3px; }
body.site-forged .site-nav .nav-links a:hover { color: #fff0cd; background-color: #2b2116; }

body.site-forged { margin: 0; font-family: "Segoe UI",Arial,sans-serif; line-height: 1.55; }
body.site-forged *, body.site-forged *::before, body.site-forged *::after { box-sizing: border-box; }
body.site-forged::before { opacity: 1; }
body.site-forged .site-nav { display: block; padding: 0; margin: 0; border-radius: 0; }
body.site-forged .site-nav .brand { padding: 0; border: 0; border-radius: 0; background: none; text-decoration: none; }
body.site-forged .site-nav .brand img { max-width: 100%; }
body.site-forged :where(button,input,select,textarea,a):focus-visible { outline: 2px solid var(--forge-emerald); outline-offset: 3px; }
body.site-forged :where(button,input,select) { font-family: inherit; }
body.site-forged :where(button,select) { min-height: 44px; }
body.site-forged :where(button,.button,.career-link,.shop-account-button):where(:not(.monster-card,.counter-item,.shelf-item,.supply-card)) {
  border-color: #967b4c; border-radius: 1px;
  background: linear-gradient(#28232ad9,#110e18f2),var(--forge-stone) center / 350px;
  color: #ecdbb6; box-shadow: inset 0 1px #f2d48b22,inset 0 -2px #0008;
}
body.site-forged :where(button,.button,.career-link,.shop-account-button):where(:not(.monster-card,.counter-item,.shelf-item,.supply-card)):hover:not(:disabled) { border-color: #d5b46d; color: #fff0ce; }
body.site-forged :where(input,select,textarea) { border-color: #8b734c; border-radius: 1px; }
body.site-forged :is(.button.primary,.dungeon-button.active,.category-tabs button[aria-pressed=true],.tier-tabs button[aria-pressed=true],.detail-tiers button[aria-pressed=true],.career-period-tab[aria-selected=true]) {
  color: #e1f5de; border-color: #8bc59b; background: linear-gradient(#183023d9,#101b16f2),var(--forge-stone) center / 350px;
  box-shadow: inset 0 -2px #8fd6a1;
}
body.site-forged :where(.panel,.class-card,.credit-card,.doc-box,.monster-card,.detail-panel,.item-dialog) {
  border: 8px solid transparent; border-image: var(--forge-frame) 32 / 12px / 0 stretch; border-radius: 0;
  background: linear-gradient(125deg,#1d1420f2,#100d15f5 70%),var(--forge-stone) center / 512px;
  box-shadow: inset 0 0 24px #0005,0 10px 25px #0006;
}
body.site-forged :where(.hero-doc,.reference-panel,.dungeon-sidebar,.monster-toolbar,.chronicle-masthead,.career-login,.career-status,.career-chapter,.shop-account) {
  border: 12px solid transparent; border-image: var(--forge-frame) 32 / 22px / 0 stretch; border-radius: 0;
  background: linear-gradient(125deg,#1d1420f2,#100d15f5 70%),var(--forge-stone) center / 512px;
  box-shadow: inset 0 0 35px #0006,0 12px 28px #0006;
}
body.site-forged :where(header.hero,.bestiary-hero) {
  margin-top: 24px; margin-bottom: 32px; padding: 42px 24px;
  border: 18px solid transparent; border-image: var(--forge-frame) 32 / 30px / 0 stretch; border-radius: 0;
  background: linear-gradient(125deg,#1d1420ed,#100d15f2 70%),var(--forge-stone) center / 512px;
  box-shadow: inset 0 0 40px #0007,0 12px 28px #0006;
}
body.site-forged :where(.hero h1,.bestiary-hero h1,.section-heading h2,.sidebar-heading strong,.collection-heading h2) {
  color: var(--forge-gold-light); text-shadow: 0 2px 3px #000; font-variant: small-caps; letter-spacing: .025em;
}
body.site-forged .eyebrow { color: #c5ad7b; }
body.site-forged :where(.hero p,.section-heading p,.doc-intro p) { color: #cfc1d6; }
body.site-forged :where(.class-card,.hero-doc) { box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--class) 55%,transparent),0 12px 28px #0007; }
body.site-forged .class-card h3 { color: var(--class); }
body.site-forged .hero-doc-summary h2 { color: var(--class); text-shadow: 0 2px 3px #000; }
body.site-forged .hero-doc-body .doc-box { padding: 17px; }
body.site-forged :where(.skill-level-group,.stance-pill,.skill) { border-color: #947b4c55; border-radius: 1px; }
body.site-forged .step-number { border-radius: 1px; border-color: #b3965b; background: #241c29; color: #e7d19e; }
body.site-forged :where(code,.command) { border-color: #89714588; border-radius: 1px; background: #120e19; }
body.site-forged .notice { border-radius: 1px; border-color: #8dd3a1; background: #142019; }
body.site-forged :where(.credit-avatar,.gender-panel) { border-radius: 1px; }
body.site-forged .credit-avatar { border-color: #b3945b; box-shadow: 0 8px 20px #0008; }
body.site-forged .credit-role { color: #d7bd84; }
body.site-forged .credit-card::before { box-shadow: inset 0 0 28px #0004; }
body.site-forged .command-table th { background: #241a2a; color: #ead9b4; }
body.site-forged .command-table td { border-color: #8e764733; }
body.site-forged main section[id], body.site-forged .hero-doc[id] { scroll-margin-top: 154px; }
body.site-forged footer { color: #b9a9c4; }
/* Bestiary artwork, rarity colors and authored dungeon backgrounds remain intact. */
body.site-forged .dungeon-sidebar { top: 148px; max-height: calc(100vh - 170px); scrollbar-color: #9b814d #120d19; }
body.site-forged .sidebar-heading { background: #17101ef2; border-bottom-color: #9c7e4744; }
body.site-forged .dungeon-showcase { border: 12px solid transparent; border-image: var(--forge-frame) 32 / 22px / 0 stretch; border-radius: 0; }
body.site-forged .dungeon-copy h2 { color: #efd8ac; text-shadow: 0 2px 4px #000; }
body.site-forged :where(.archive-counts span,.bestiary-kicker span,.dungeon-meta span,.dungeon-facts span,.mini-stats span,.full-stats div,.detail-tags span) { border-radius: 1px; }
body.site-forged :where(.archive-counts span,.bestiary-kicker span,.dungeon-facts span) { border-color: #8b724b66; background: #15101bd9; }
body.site-forged .monster-card { box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--rarity) 75%,transparent),0 12px 26px #0008; }
body.site-forged .monster-card h3 { color: var(--rarity); }
body.site-forged .monster-card:hover, body.site-forged .monster-card:focus-visible { box-shadow: inset 0 0 0 2px var(--rarity),0 12px 26px #0008; }
body.site-forged .monster-card:focus-visible { outline: 2px solid var(--forge-emerald); outline-offset: 3px; }
body.site-forged #monster-search { min-height: 44px; }
body.site-forged .monster-dialog { border: 14px solid transparent; border-image: var(--forge-frame) 32 / 22px / 0 stretch; border-radius: 0; background: #120e1a; }
body.site-forged .dialog-close { width: 44px; height: 44px; border-radius: 1px; }
body.site-forged :where(.move-row,.move-detail-row,.move-facts span) { border-radius: 1px; }
/* The merchant stage is framed by an overlay so its pixel-positioned art and goods never move. */
body.site-forged .shop-shell { margin-top: 24px; }
body.site-forged .shop-stage { border-radius: 0; border-bottom-color: #a48850; }
body.site-forged .shop-stage::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border: 18px solid transparent; border-image: var(--forge-frame) 32 / 30px / 0 stretch; }
body.site-forged .shelf-item { border-radius: 0; border-color: #967b4c; }
body.site-forged .shelf-item::before { content: ''; position: absolute; inset: -1px; z-index: 2; pointer-events: none; border: 8px solid transparent; border-image: var(--forge-frame) 32 / 8px / 0 stretch; }
body.site-forged .shelf-art { border-radius: 0; background: linear-gradient(#17111bdc,#100c16ed),var(--forge-stone) center / 280px; }
body.site-forged .shelf-tag { border-color: #967b4c; border-radius: 0; background: linear-gradient(#27202bdc,#130f1af5),var(--forge-stone) center / 280px; }
body.site-forged .shelf-name { color: #e0cda8; }
body.site-forged .shelf-symbol { z-index: 3; }
body.site-forged .keeper-name { border-color: #b29559; border-radius: 1px; color: #efd8a8; background: #120d19ed; }
body.site-forged .shop-owner-summary { border-color: #947e4e88; border-radius: 1px; background: #15101bd9; }
body.site-forged .shop-hero-name { color: #e3c994; }
body.site-forged .shop-hero-emblem { color: #c5aa71; }
body.site-forged .shop-account-button .symbol { color: #dfc694; }
body.site-forged .shop-button-chevron { border-color: #d6ba87; }
body.site-forged :where(.shop-rack,.catalog,.detail-rules,.detail-stats>div) { border-color: #947b4c66; border-radius: 1px; }
body.site-forged #close-item { min-width: 44px; min-height: 44px; }
body.site-forged .item-dialog { border-width: 14px; border-image-width: 22px; }
body.site-forged .detail-rules { background: #18101ed9; }
body.site-forged .detail-tiers button[aria-pressed=true] { color: #e1f5de; border-color: #8bc59b; background: #183023; }
/* Chronicle ledgers retain their original portraits, backgrounds, numbers and period controls. */
body.site-forged.chronicle-page .site-nav { border: 0!important; background: linear-gradient(#080a0ce8,#08090af8),var(--forge-stone) center / 512px!important; }
body.site-forged.chronicle-page .site-nav .nav-links { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.site-forged.chronicle-page .site-nav .nav-links a { border-color: transparent!important; border-radius: 0!important; color: #d8c09a!important; background: linear-gradient(#0d1012d9,#080a0cef),var(--forge-stone) center / 380px!important; }
body.site-forged.chronicle-page .site-nav .nav-links a.active { color: #eaffdf!important; background: linear-gradient(#10251ddd,#0c2119ef),var(--forge-stone) center / 380px!important; }
body.site-forged .career-chapter { padding: 22px 26px 28px; }
body.site-forged .career-chapter::after { display: none; }
body.site-forged :where(.support-ledger,.career-collection,.battle-register,.empty-hall) { border-color: #aa8b4f66; border-radius: 1px; background: linear-gradient(#211627c9,#100d18); }
body.site-forged .career-period-tabs { border-bottom-color: #a68b5066; }
body.site-forged .career-period-tab[aria-selected=true]::after { background: #8fd6a1; }
body.site-forged .career-login h1 { color: #ead29e; }
/* Public fallbacks and the local legacy wrapper share the same finished surface. */
body.site-forged .site-fallback { width: min(720px,calc(100% - 28px)); margin: 48px auto; padding: 32px; border: 18px solid transparent; border-image: var(--forge-frame) 32 / 30px / 0 stretch; background: linear-gradient(125deg,#1d1420f2,#100d15f5 70%),var(--forge-stone) center / 512px; box-shadow: inset 0 0 35px #0006,0 12px 28px #0007; }
body.site-forged .site-fallback h1 { margin: 0 0 20px; color: var(--forge-gold-light); font: 700 clamp(28px,5vw,44px)/1.15 Georgia,serif; }
body.site-forged .site-fallback .button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 18px; text-decoration: none; border: 1px solid #987e4a; }
body.site-forged.legacy-guide-page .page>nav { background: #15101bd9; border-color: #947b4c66; border-radius: 1px; }
body.site-forged.legacy-guide-page :where(.info,.commands,.tip) { border-color: #947b4c66; border-radius: 1px; background-color: #18101e; }
body.site-forged.legacy-guide-page .start-command { border-color: #a68a4f; border-radius: 1px; color: #e7d09b; background: #17101c; }
@media(max-width:1100px) {
  body.site-forged .site-nav .nav-inner { gap: 14px; min-height: 104px; }
  body.site-forged .site-nav .brand { flex-basis: 220px; }
  body.site-forged .site-nav .nav-links a { font-size: 12px; padding-inline: 4px; }
  body.site-forged .dungeon-sidebar { top: 126px; max-height: calc(100vh - 148px); }
}
@media(max-width:800px) { body.site-forged .dungeon-sidebar { position: static; max-height: none; } }
@media(max-width:760px) {
  body.site-forged .site-nav .nav-inner { flex-direction: column; gap: 3px; width: calc(100% - 24px); padding-bottom: 12px; }
  body.site-forged .site-nav .brand { flex: none; width: 218px; }
  body.site-forged .site-nav .brand img { max-height: 80px; }
  body.site-forged .site-nav .nav-links { width: 100%; gap: 2px; }
  body.site-forged .site-nav .nav-links a { border-width: 6px; border-image-width: 6px; padding: 7px 3px; min-height: 44px; font-size: 11px; letter-spacing: 0; }
}
@media(max-width:650px) {
  body.site-forged :where(header.hero,.bestiary-hero) { padding: 30px 16px; border-width: 10px; border-image-width: 18px; margin-top: 18px; }
  body.site-forged :where(.panel,.class-card,.credit-card,.doc-box,.monster-card,.detail-panel) { border-width: 5px; border-image-width: 8px; }
  body.site-forged :where(.hero-doc,.reference-panel,.dungeon-sidebar,.monster-toolbar,.chronicle-masthead,.career-login,.career-status,.career-chapter,.shop-account) { border-width: 8px; border-image-width: 16px; }
  body.site-forged .hero-doc-body .doc-box { padding: 12px; }
  body.site-forged .career-chapter { padding: 16px 12px 20px; }
  body.site-forged .shop-shell { margin-top: 14px; }
  body.site-forged .shop-stage::after { border-width: 10px; border-image-width: 18px; }
  body.site-forged .shelf-item::before { border-width: 6px; border-image-width: 6px; }
  body.site-forged .site-fallback { padding: 22px 16px; border-width: 10px; border-image-width: 18px; margin-top: 28px; }
}
@media(max-width:600px) {
  body.site-forged .site-nav { position: relative; }
  body.site-forged .site-nav .nav-inner { width: calc(100% - 16px); }
  body.site-forged .site-nav .brand { width: 196px; }
  body.site-forged .site-nav .nav-links a { min-width: 0; padding-inline: 1px; border-width: 4px; border-image-width: 6px; font-size: clamp(9px,2.5vw,10px); overflow-wrap: normal; word-break: normal; hyphens: none; }
  body.site-forged main section[id], body.site-forged .hero-doc[id] { scroll-margin-top: 24px; }
}
@media(prefers-reduced-motion:reduce) { body.site-forged * { transition: none!important; scroll-behavior: auto!important; } }
