/* Perilous Legends Wiki — Outlands-style MediaWiki structure in the PL brand.
   Palette + Seraphon lifted from perilouslegends.com so the wiki reads as one site. */
@font-face{ font-family:'Seraphon'; src:url('fonts/seraphon.ttf') format('truetype'); font-display:swap; }

:root{
  --black:#050201; --near-black:#0c0503; --charcoal:#17100d; --iron:#312821;
  --ember:#ff4b16; --ember-dark:#9f260c; --gold:#f6c36a; --gold-deep:#a96822;
  --bone:#f8e2bd; --muted:#ba9f7b; --teal:#1a8a83; --blood:#5c1209;
  --line:rgba(246,195,106,0.22); --line-soft:rgba(246,195,106,0.10);
  --panel:#120a06; --panel-2:#170d07;
  --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --serif:'Seraphon',Georgia,"Times New Roman",serif;
  --sidebar-w:240px; --max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; color:var(--bone); background:var(--black);
  background-image:
    radial-gradient(1200px 480px at 50% -8%, rgba(255,75,22,0.10), transparent 60%),
    linear-gradient(180deg,#0a0503,#050201 60rem,#050201);
  background-attachment:fixed;
  font-family:var(--sans); font-size:15.5px; line-height:1.62;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--gold); text-decoration:none}
a:hover{color:#ffe6b2; text-decoration:underline; text-underline-offset:2px}
img{max-width:100%; height:auto}

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; gap:18px;
  padding:10px 22px; border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(8,4,2,0.96),rgba(8,4,2,0.86)); backdrop-filter:blur(8px);
}
.topbar .brand{display:flex; align-items:center; gap:12px; flex:0 0 auto}
.topbar .brand img{height:34px; width:auto; display:block}
.topbar .brand b{font-family:var(--serif); font-weight:600; letter-spacing:.06em; color:var(--bone); font-size:1.05rem}
.topbar .brand b span{color:var(--ember)}
.topbar nav{display:flex; gap:4px; margin-left:auto; flex-wrap:wrap}
.topbar nav a{
  color:var(--muted); padding:6px 12px; border-radius:6px; font-size:.92rem; letter-spacing:.02em;
}
.topbar nav a:hover{color:var(--bone); background:rgba(246,195,106,0.08); text-decoration:none}
.topbar nav a.site{color:var(--ember)}

/* ---------- shell ---------- */
.shell{display:grid; grid-template-columns:var(--sidebar-w) 1fr; gap:0; max-width:var(--max); margin:0 auto; align-items:start}
@media (max-width:900px){ .shell{grid-template-columns:1fr} .sidebar{display:none} }

/* ---------- sidebar ---------- */
.sidebar{position:sticky; top:56px; align-self:start; padding:22px 14px 60px; border-right:1px solid var(--line-soft)}
.searchbox{width:100%; padding:8px 11px; border-radius:7px; border:1px solid var(--line);
  background:#0b0604; color:var(--bone); font-family:var(--sans); font-size:.9rem; margin-bottom:18px}
.searchbox::placeholder{color:#8a7a63}
.sidebar h4{font-family:var(--serif); text-transform:uppercase; letter-spacing:.14em; font-size:.7rem;
  color:var(--gold-deep); margin:20px 8px 8px; font-weight:600}
.sidebar ul{list-style:none; margin:0 0 4px; padding:0}
.sidebar li a{display:block; padding:4px 8px; color:var(--muted); font-size:.9rem; border-radius:5px; border-left:2px solid transparent}
.sidebar li a:hover{color:var(--bone); background:rgba(246,195,106,0.06); border-left-color:var(--ember); text-decoration:none}

/* ---------- content ---------- */
.content{padding:26px 40px 90px; min-width:0}
@media (max-width:900px){ .content{padding:22px 18px 70px} }
.breadcrumb{color:#8a7a63; font-size:.82rem; margin-bottom:6px}
.breadcrumb a{color:var(--muted)}
.pagetitle{font-family:var(--serif); font-weight:600; font-size:2.15rem; line-height:1.12;
  margin:2px 0 4px; color:var(--bone); letter-spacing:.01em}
.pagetitle .accent{color:var(--ember)}
.subtitle{color:var(--muted); font-size:1.02rem; margin:0 0 18px; border-bottom:1px solid var(--line); padding-bottom:16px}

.content h2{font-family:var(--serif); font-weight:600; font-size:1.5rem; color:var(--gold);
  border-bottom:1px solid var(--line); padding-bottom:6px; margin:34px 0 12px}
.content h3{font-family:var(--serif); font-weight:600; font-size:1.16rem; color:var(--bone); margin:22px 0 8px}
.content p{margin:10px 0}
.content ul,.content ol{margin:10px 0; padding-left:22px}
.content li{margin:4px 0}
.content strong{color:#ffe6b2}
.lead{font-size:1.06rem; color:#e9d6b4}

/* table of contents */
.toc{background:var(--panel); border:1px solid var(--line-soft); border-radius:9px; padding:14px 18px;
  margin:0 0 22px; display:inline-block; min-width:240px}
.toc b{font-family:var(--serif); text-transform:uppercase; letter-spacing:.12em; font-size:.72rem; color:var(--gold-deep)}
.toc ol{margin:8px 0 0; padding-left:20px}
.toc a{color:var(--muted)} .toc a:hover{color:var(--bone)}

/* infobox */
.infobox{float:right; width:290px; margin:6px 0 18px 24px; background:var(--panel);
  border:1px solid var(--line); border-radius:11px; overflow:hidden; box-shadow:0 20px 50px rgba(0,0,0,0.5)}
.infobox .ib-title{font-family:var(--serif); font-weight:600; text-align:center; padding:10px;
  background:linear-gradient(180deg,rgba(255,75,22,0.16),rgba(255,75,22,0.04)); border-bottom:1px solid var(--line); color:var(--bone)}
.infobox img{display:block; width:100%}
.infobox table{width:100%; border-collapse:collapse; font-size:.86rem}
.infobox th,.infobox td{text-align:left; padding:7px 12px; border-bottom:1px solid var(--line-soft); vertical-align:top}
.infobox th{color:var(--gold-deep); width:42%; font-weight:600}
@media (max-width:640px){ .infobox{float:none; width:100%; margin:12px 0} }

/* data tables */
table.data{width:100%; border-collapse:collapse; margin:14px 0; font-size:.92rem}
table.data caption{caption-side:top; text-align:left; color:var(--muted); font-size:.85rem; margin-bottom:6px}
table.data th,table.data td{padding:8px 12px; border:1px solid var(--line-soft); text-align:left; vertical-align:top}
table.data thead th{background:rgba(246,195,106,0.08); color:var(--gold); font-family:var(--serif); letter-spacing:.02em}
table.data tbody tr:nth-child(even){background:rgba(255,255,255,0.02)}

/* figures — ONE uniform standard for every in-page screenshot (Outlands-style):
   fixed frame, fixed size, identical border. object-fit:cover crops each shot to fill
   the same 16:10 box centered, so mismatched captures line up. Per-image framing can be
   nudged with .shot[data-pos] (object-position) when the subject isn't centered. */
figure.shot{
  width:100%; max-width:460px; margin:18px 0;
  border:1px solid var(--gold-deep); border-radius:8px; overflow:hidden;
  background:#0b0604; box-shadow:0 14px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,0,0,0.6);
}
figure.shot img{
  display:block; width:100%; aspect-ratio:16 / 10; object-fit:cover; object-position:center;
  border-bottom:1px solid var(--gold-deep); background:#000;
}
figure.shot figcaption{padding:8px 12px; color:var(--muted); font-size:.85rem}
figure.shot[data-pos="top"]    img{object-position:center top}
figure.shot[data-pos="bottom"] img{object-position:center bottom}
figure.shot[data-pos="left"]   img{object-position:left center}
figure.shot[data-pos="right"]  img{object-position:right center}
/* a "plate" figure for item/menu art that should show WHOLE, not be cropped — still identical border */
figure.plate{width:100%; max-width:300px; margin:18px 0; border:1px solid var(--gold-deep); border-radius:8px;
  overflow:hidden; background:#0b0604; box-shadow:0 14px 34px rgba(0,0,0,0.5)}
figure.plate img{display:block; width:100%; padding:14px; background:radial-gradient(circle at 50% 40%, #17100d, #080402)}
figure.plate figcaption{padding:8px 12px; color:var(--muted); font-size:.85rem; border-top:1px solid var(--gold-deep)}

/* callouts */
.note{border-left:3px solid var(--ember); background:rgba(255,75,22,0.06); padding:12px 16px; border-radius:0 8px 8px 0; margin:16px 0}
.note b{color:var(--ember)}

/* ---------- main-page hero + hubs ---------- */
.hero{position:relative; border-bottom:1px solid var(--line); overflow:hidden; margin:-26px -40px 24px}
@media (max-width:900px){ .hero{margin:-22px -18px 20px} }
.hero .bg{position:absolute; inset:0; opacity:.28; object-fit:cover; width:100%; height:100%;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.9),transparent); mask-image:linear-gradient(180deg,rgba(0,0,0,.9),transparent)}
.hero .inner{position:relative; padding:40px 40px 30px; max-width:760px}
.hero h1{font-family:var(--serif); font-size:2.5rem; line-height:1.08; margin:0 0 8px; color:var(--bone)}
.hero h1 span{color:var(--ember)}
.hero p{color:#e4cfa8; font-size:1.08rem; margin:0 0 16px; max-width:640px}
.hero .stat{color:var(--muted); font-size:.9rem}
.hero .stat b{color:var(--gold)}

.section-h{font-family:var(--serif); text-transform:uppercase; letter-spacing:.16em; font-size:.8rem;
  color:var(--gold-deep); margin:30px 0 12px; padding-bottom:6px; border-bottom:1px solid var(--line-soft)}

/* framed-image grid of hub tiles */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(184px,1fr)); gap:22px}
.tile{display:flex; flex-direction:column; align-items:center; text-align:center; gap:7px;
  color:var(--bone); transition:transform .14s}
.tile:hover{transform:translateY(-4px); text-decoration:none}
.tile img{width:100%; aspect-ratio:1/1; object-fit:cover; display:block; border-radius:5px;
  box-shadow:0 4px 13px rgba(0,0,0,.42); transition:box-shadow .14s}
.tile:hover img{box-shadow:0 13px 30px rgba(0,0,0,.58)}
.tile b{font-family:var(--serif); font-weight:600; font-size:1.02rem; color:var(--bone); margin-top:3px}
.tile small{color:var(--muted); font-size:.8rem; line-height:1.35}
/* keep any legacy emoji-icon tiles from collapsing if one remains */
.tile .ic{width:56px; height:56px; display:grid; place-items:center; border-radius:10px;
  background:radial-gradient(circle at 50% 35%, rgba(255,75,22,0.22), rgba(0,0,0,0.2)); font-size:1.7rem}
.tile .ic img{width:46px; height:46px; object-fit:contain; box-shadow:none; border-radius:0}

/* categorized link clusters */
.cats{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:18px; margin-top:6px}
.cat{border:1px solid var(--line-soft); border-radius:11px; background:linear-gradient(180deg,var(--panel),#0b0604); padding:16px 18px}
.cat h3{font-family:var(--serif); font-size:1.06rem; margin:0 0 8px; color:var(--gold); display:flex; align-items:center; gap:8px}
.cat h3 .dot{width:7px; height:7px; border-radius:50%; background:var(--ember); box-shadow:0 0 10px var(--ember)}
.cat ul{list-style:none; margin:0; padding:0; columns:1}
.cat li{margin:3px 0}
.cat li a{color:var(--muted); font-size:.92rem}
.cat li a:hover{color:var(--bone)}
.cat li .tag{font-size:.66rem; color:var(--near-black); background:var(--gold-deep); border-radius:4px; padding:0 5px; margin-left:6px; vertical-align:1px}

/* community strip */
.community{display:flex; flex-wrap:wrap; gap:12px; margin:26px 0 8px}
.community a{display:flex; align-items:center; gap:10px; padding:11px 18px; border-radius:10px;
  border:1px solid var(--line); background:var(--panel); color:var(--bone); font-family:var(--serif)}
.community a:hover{border-color:var(--ember); text-decoration:none; background:var(--panel-2)}
.community a.disc{border-color:rgba(88,101,242,.5)}

footer.wiki{border-top:1px solid var(--line-soft); margin-top:50px; padding:22px 40px; color:#7a6a55; font-size:.82rem}
footer.wiki a{color:var(--muted)}
.clear{clear:both}
