/* My Azeroth Life: a broadsheet printed in Azeroth, framed like the game's UI.
   Dark stone world outside, parchment newspaper inside. */

:root {
  --ink: #0b0806;
  --stone: #17120d;
  --text: #eadfc8;
  --dim: #b3a68a;
  --gold: #ffd100;
  --gold-2: #e6b54a;
  --bronze: #8a6526;
  --bronze-dark: #4a3413;

  /* The paper. */
  --paper: #efe2c2;
  --paper-2: #e2cfa2;
  --paper-edge: #b89a5e;
  --print: #25190c;
  --print-soft: #5b4526;
  --rule: #3a2a15;

  /* Faction accent; neutral is forge ember. */
  --accent: #b5501a;
  --accent-2: #8f3c0b;
  --accent-glow: rgba(255, 150, 40, 0.35);

  --blackletter: "Grenze Gotisch", "Old English Text MT", serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --headline: "IM Fell English", "Crimson Pro", Georgia, serif;
  --smallcaps: "IM Fell English SC", "Cinzel", Georgia, serif;
  --body: "Crimson Pro", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --cursor: url("ui/gauntlet.png") 2 2;
  color-scheme: dark;
}
:root[data-faction="alliance"] { --accent: #2f55b8; --accent-2: #14306e; --accent-glow: rgba(80, 140, 255, 0.35); }
:root[data-faction="horde"] { --accent: #b3261a; --accent-2: #5e0f09; --accent-glow: rgba(255, 60, 40, 0.35); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.14rem/1.6 var(--body);
  cursor: var(--cursor), auto;
  overflow-x: hidden;
}
a, button, summary, label { cursor: var(--cursor), pointer; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; }
.skip:focus { left: 8px; background: var(--gold); color: #000; padding: 6px 10px; }

/* --- The world behind the paper ------------------------------------------ */

.world {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(8, 6, 4, 0.35), rgba(8, 6, 4, 0.92) 70%),
    url("art/loading-painting.webp") center 35% / cover no-repeat;
  filter: saturate(0.85);
}

/* --- Top bar (the game UI) ------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 24px;
  background: linear-gradient(rgba(12, 9, 6, 0.96), rgba(12, 9, 6, 0.86));
  border-bottom: 1px solid var(--bronze);
  box-shadow: 0 1px 0 #000, 0 6px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 -3px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--gold);
  font: 700 1.1rem var(--display);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand img { border: 1px solid var(--bronze); border-radius: 3px; }
.nav { display: flex; gap: 22px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a {
  color: var(--dim);
  font: 500 0.8rem var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover, .nav a[aria-current] { color: var(--gold); }
.faction { display: flex; gap: 6px; flex-shrink: 0; }
.faction button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--bronze-dark);
  border-radius: 50%;
  background: radial-gradient(circle, #2a2016, #0e0a06);
  opacity: 0.55;
  filter: grayscale(0.7);
  transition: opacity 0.2s, filter 0.2s, box-shadow 0.2s;
}
.faction button:hover, .faction button[aria-pressed="true"] { opacity: 1; filter: none; }
.faction button[aria-pressed="true"] { border-color: var(--gold-2); box-shadow: 0 0 12px var(--accent-glow); }

/* --- Buttons: the classic red panel button ------------------------------- */

.wow-btn {
  --b1: #b8190f;
  --b2: #6a0b05;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.5em;
  border: 1px solid #f2c75c;
  border-radius: 4px;
  background: linear-gradient(#e0352a 0%, var(--b1) 38%, var(--b2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.45), inset 0 -2px 6px rgba(0, 0, 0, 0.5), 0 0 0 2px #2a1a08, 0 3px 10px rgba(0, 0, 0, 0.45);
  color: var(--gold);
  font: 700 0.9rem/1 var(--display);
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  transition: filter 0.15s;
}
.wow-btn:hover { filter: brightness(1.18); color: #fff2a8; }
.wow-btn.ghost { --b1: #3a2c1c; --b2: #140e07; background: linear-gradient(#57442b 0%, var(--b1) 38%, var(--b2) 100%); border-color: var(--gold-2); }
.wow-btn.small { padding: 0.55em 1.1em; font-size: 0.75rem; }

/* --- The sheet of newsprint ---------------------------------------------- */

.sheet {
  position: relative;
  width: min(1200px, calc(100% - 48px));
  margin: 40px auto 0;
  padding: 28px clamp(18px, 4vw, 52px) 32px;
  color: var(--print);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(120, 80, 30, 0.18), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(90, 60, 20, 0.07) 0 1px, transparent 1.5px) 0 0 / 5px 5px,
    linear-gradient(var(--paper), var(--paper-2));
  box-shadow:
    inset 0 0 90px rgba(120, 80, 30, 0.35),
    inset 0 0 0 1px rgba(90, 60, 20, 0.35),
    0 0 0 2px #2a1a08,
    0 0 0 4px var(--bronze),
    0 0 0 5px #000,
    0 30px 80px rgba(0, 0, 0, 0.8);
  cursor: var(--cursor), auto;
}
.sheet::before, .sheet::after {
  /* Gilded corner brackets, like a UI frame. */
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  border: 3px solid var(--gold-2);
  pointer-events: none;
}
.sheet::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.sheet::after { top: -7px; right: -7px; border-left: 0; border-bottom: 0; }

.sheet a { color: var(--print); text-decoration-color: rgba(58, 42, 21, 0.4); text-underline-offset: 3px; }
.sheet a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* --- Masthead ------------------------------------------------------------ */

.masthead { text-align: center; }
.ears {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.ear {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--rule);
  text-align: left;
}
.ear.right { justify-self: end; text-align: right; }
.ear img { border: 1px solid var(--rule); filter: sepia(0.35); }
.ear p { margin: 0; font: italic 0.85rem/1.25 var(--headline); }
.ear b { display: block; font: 700 0.68rem var(--display); letter-spacing: 0.18em; text-transform: uppercase; }
.ear small { color: var(--print-soft); }
.motto { margin: 0; font: italic 0.95rem var(--headline); color: var(--print-soft); }
.nameplate .title {
  display: block;
  font: 900 clamp(2.6rem, 8.6vw, 6.4rem)/1 var(--blackletter);
  color: var(--print);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}
.nameplate .title:hover { color: var(--print); }
.nameplate-h1 { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.dateline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 6px 2px;
  border-block: 3px double var(--rule);
  font: 0.95rem var(--smallcaps);
  letter-spacing: 0.04em;
}
.edition { color: var(--accent); font-weight: 700; }
.edition > span { display: none; }
:root[data-faction="neutral"] .ed-neutral,
:root[data-faction="alliance"] .ed-alliance,
:root[data-faction="horde"] .ed-horde { display: inline; }

/* --- Shared type --------------------------------------------------------- */

.kicker {
  margin: 0 0 0.3em;
  color: var(--accent);
  font: 700 0.72rem var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.kicker a { color: inherit; }
.headline { margin: 0; font-family: var(--headline); font-weight: 400; line-height: 1.08; overflow-wrap: anywhere; }
.headline a { text-decoration: none; }
.deck { margin: 0.4em 0 0; font: italic 1.25rem/1.35 var(--headline); color: var(--print-soft); }
.byline {
  margin: 0.6em 0;
  padding: 4px 0;
  border-block: 1px solid rgba(58, 42, 21, 0.35);
  font: 0.82rem var(--smallcaps);
  letter-spacing: 0.05em;
  color: var(--print-soft);
}
.byline b { color: var(--print); font-weight: 400; }
.draft { padding: 0 5px; border: 1px dashed var(--accent); color: var(--accent); }
.zone { font: 0.95em var(--smallcaps); letter-spacing: 0.06em; text-transform: uppercase; }
.more { clear: both; margin: 0.4em 0 0; font: italic 0.95rem var(--headline); }
p.empty { font-style: italic; color: var(--print-soft); }

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--rule);
  font: 700 0.85rem var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-head img { border: 1px solid var(--rule); border-radius: 2px; }

/* Engravings: game art printed as a sepia halftone. */
.woodcut { margin: 14px 0; }
.woodcut img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: sepia(0.75) contrast(1.1) brightness(0.95) saturate(0.8);
  mix-blend-mode: multiply;
}
.woodcut { position: relative; }
.woodcut::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle, rgba(37, 25, 12, 0.22) 0.8px, transparent 1.3px) 0 0 / 3px 3px;
  pointer-events: none;
}
.woodcut figcaption { margin-top: 4px; font: italic 0.82rem var(--headline); color: var(--print-soft); }

.dropcap > p:first-of-type:not(.zone-line)::first-letter,
.dropcap > figure + p::first-letter,
.dropcap > .zone-line + p::first-letter {
  margin-right: 0.04em;
  font: 900 3.4em/1 var(--blackletter);
  color: inherit;
}

/* --- Front page ---------------------------------------------------------- */

main { padding-top: 26px; }
.front {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
}
.stories { min-width: 0; }
.continued { margin: 0 0 16px; font: italic 1rem var(--headline); color: var(--print-soft); }

.lead { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 3px double var(--rule); }
.lead .headline { font-size: clamp(2rem, 5vw, 3.4rem); }
.lead .excerpt { overflow-wrap: anywhere; }
.lead .excerpt.cols { columns: 2 15em; column-gap: 28px; column-rule: 1px solid rgba(58, 42, 21, 0.35); text-align: justify; hyphens: auto; }
.lead .excerpt > p { margin: 0 0 0.8em; text-indent: 1.2em; }
.lead .excerpt > p:first-of-type, .lead .excerpt > .zone-line + p { text-indent: 0; }
.lead-body { margin-top: 14px; }
.lead-body .woodcut { break-inside: avoid; margin: 4px 0 14px; }

.columns { columns: 3 15em; column-gap: 28px; column-rule: 1px solid rgba(58, 42, 21, 0.35); }
.story { break-inside: avoid; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(58, 42, 21, 0.35); }
.story .headline { font-size: 1.6rem; }
.story .summary { margin: 0; overflow-wrap: anywhere; text-align: justify; hyphens: auto; font-size: 1.05rem; line-height: 1.5; }
.story .summary > p { margin: 0 0 0.6em; text-indent: 1.2em; }
.story .summary > p:first-child, .story .summary > .zone-line + p { text-indent: 0; }
.story .woodcut { margin: 10px 0 4px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font: italic 0.95rem var(--headline); }
.sheet .pager a.wow-btn { color: var(--gold); }

/* --- Sidebar: the Town Crier --------------------------------------------- */

.crier { display: flex; flex-direction: column; gap: 22px; padding-left: 24px; border-left: 1px solid rgba(58, 42, 21, 0.45); }
.box p { margin: 0 0 0.6em; font-size: 1rem; }
.tip-box {
  padding: 14px 16px;
  background: rgba(6, 8, 22, 0.94);
  border: 1px solid #a9a9b4;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #000, 0 6px 16px rgba(0, 0, 0, 0.35);
  color: #fff;
}
.tip-box .section-head { color: var(--gold); border-bottom-color: #3b3b52; }
.tip-box .tip { margin: 0; color: #e8e2d0; font-style: italic; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dotted rgba(58, 42, 21, 0.45); font-size: 1rem; }
.plain small { font-family: var(--smallcaps); color: var(--print-soft); }
.raven .wow-btn { color: var(--gold); }

/* --- Article ------------------------------------------------------------- */

.article, .records { max-width: 760px; margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 10px; }
.article-head .headline { font-size: clamp(2.1rem, 6vw, 3.8rem); }
.article-head .byline { display: inline-block; padding-inline: 18px; }

.content { font-size: 1.2rem; line-height: 1.65; overflow-wrap: break-word; }
.content > * + * { margin-top: 0; }
.content p { margin: 0 0 1em; }
.zone-line { margin-bottom: 0.2em !important; }
.content h2, .content h3, .content h4 {
  margin: 1.6em 0 0.5em;
  font-family: var(--headline);
  font-weight: 400;
  line-height: 1.15;
}
.content h2 { font-size: 1.9rem; text-align: center; }
.content h2::after { content: "❦"; display: block; font-size: 1rem; color: var(--accent); margin-top: 0.1em; }
.content h3 { font-size: 1.45rem; }
.content h4 { font: 700 0.85rem var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.content img { display: block; margin: 1em auto; border: 1px solid var(--rule); filter: sepia(0.3); box-shadow: 0 4px 14px rgba(58, 42, 21, 0.3); }
.content figure { margin: 1.4em 0; }
.content figcaption { text-align: center; font: italic 0.9rem var(--headline); color: var(--print-soft); }
.content blockquote {
  margin: 1.4em 0;
  padding: 0.6em 1.2em;
  border-block: 2px solid var(--rule);
  font: italic 1.4rem/1.4 var(--headline);
  text-align: center;
}
.content blockquote p:last-child { margin-bottom: 0; }
.content hr { border: 0; text-align: center; margin: 2em 0; }
.content hr::before { content: "✦ ✦ ✦"; color: var(--accent); letter-spacing: 0.6em; }
.content ul, .content ol { padding-left: 1.4em; }
.content li { margin: 0.25em 0; }
.content li::marker { color: var(--accent); }
.content table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.content th { font: 700 0.75rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 2px solid var(--rule); padding: 6px 10px; text-align: left; }
.content td { padding: 6px 10px; border-bottom: 1px solid rgba(58, 42, 21, 0.3); }
.content code { font: 0.82em var(--mono); background: rgba(58, 42, 21, 0.1); padding: 0.08em 0.35em; border-radius: 3px; }
.content pre {
  margin: 1.4em 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: rgba(6, 8, 22, 0.94);
  color: #e8e2d0;
  border: 1px solid #a9a9b4;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #000;
  font-size: 0.9rem;
  line-height: 1.5;
}
.content pre code { background: none; padding: 0; font-size: inherit; }
.content kbd { font: 0.75em var(--mono); padding: 0.05em 0.45em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; }
.content input[type="checkbox"] { accent-color: var(--accent); }
.content .footnote-ref a { text-decoration: none; color: var(--accent); }
.content .footnote { display: flex; gap: 0.6em; font-size: 0.95rem; margin-top: 0.4em; }
.content .footnote:first-of-type { margin-top: 2em; padding-top: 0.8em; border-top: 1px solid var(--rule); }
.content .footnote p { margin: 0; }
.content .footnote-number { font-family: var(--smallcaps); color: var(--accent); }

.endmark { text-align: center; color: var(--accent); letter-spacing: 0.6em; margin: 1.6em 0; }
.tags { margin: 0 0 1em; font-size: 1rem; }
.tags span { font: 700 0.7rem var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--print-soft); margin-right: 6px; }
.neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 3px double var(--rule); padding-top: 14px; }
.neighbours a { text-decoration: none; font: 1.2rem/1.2 var(--headline); overflow-wrap: anywhere; }
.neighbours a.older { text-align: right; }
.neighbours small { display: block; font: 700 0.66rem var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }

/* --- Archive and sections ------------------------------------------------ */

.year h2 { display: flex; align-items: baseline; justify-content: space-between; margin: 1.6em 0 0.4em; padding-bottom: 4px; border-bottom: 2px solid var(--rule); font: 900 1.9rem var(--blackletter); }
.year h2 small { font: 0.9rem var(--smallcaps); color: var(--print-soft); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; }
.ledger time { flex: 0 0 4.2em; font: 0.9rem var(--smallcaps); color: var(--print-soft); }
.ledger a { min-width: 0; font: 1.2rem/1.3 var(--headline); text-decoration: none; overflow-wrap: anywhere; }
.ledger .dots { flex: 1; border-bottom: 1px dotted rgba(58, 42, 21, 0.55); min-width: 20px; transform: translateY(-4px); }
.ledger .len { font: 0.85rem var(--smallcaps); color: var(--print-soft); white-space: nowrap; }

.classifieds { list-style: none; margin: 1em 0 0; padding: 0; columns: 3 12em; column-gap: 18px; }
.classifieds li { break-inside: avoid; margin-bottom: 12px; }
.classifieds a { display: block; padding: 10px 12px; border: 1px solid var(--rule); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(58, 42, 21, 0.5); text-decoration: none; text-align: center; }
.classifieds b { display: block; font: 400 1.25rem var(--headline); overflow-wrap: anywhere; }
.classifieds small { font: 0.8rem var(--smallcaps); color: var(--print-soft); }

/* --- Colophon and fan-site footer ---------------------------------------- */

.colophon { margin-top: 34px; text-align: center; }
.rule-double { border-top: 3px double var(--rule); }
.imprint { margin: 10px 0 0; font: italic 0.95rem var(--headline); color: var(--print-soft); }

.footer { max-width: 900px; margin: 0 auto; padding: 40px 20px 50px; text-align: center; }
.crests { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 14px; }
.crests .seal { border: 1px solid var(--bronze); border-radius: 50%; }
.legal { margin: 0; color: var(--dim); font-size: 0.85rem; line-height: 1.5; text-shadow: 0 1px 3px #000; }
.legal a { color: var(--gold-2); }

/* --- Syntax highlighting (tooltip-dark code panels) ---------------------- */

.hl-comment { color: #8f8a7a; font-style: italic; }
.hl-string { color: #1eff00; }
.hl-constant { color: #ff8000; }
.hl-keyword, .hl-storage { color: #3d9bff; }
.hl-entity { color: #ffd100; }
.hl-support { color: #c69bff; }
.hl-variable { color: #f0e6d0; }
.hl-punctuation { color: #b3a68a; }
.hl-invalid { color: #ff5a4a; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 960px) {
  .front { grid-template-columns: 1fr; }
  .crier { padding-left: 0; border-left: 0; border-top: 3px double var(--rule); padding-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; padding: 0 12px; }
  .brand span { display: none; }
  .nav { gap: 14px; }
  .sheet { width: calc(100% - 20px); margin-top: 18px; padding: 18px 16px 24px; }
  .ears { grid-template-columns: 1fr; gap: 8px; }
  .ear { display: none; }
  .nameplate .title { white-space: normal; font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .dateline { flex-direction: column; align-items: center; gap: 2px; font-size: 0.85rem; }
  .lead .excerpt, .story .summary { text-align: left; }
  .neighbours { grid-template-columns: 1fr; }
  .neighbours a.older { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
