/* wow-survivor's site (WSW-4): one sheet, read like a book. One accent colour, large type, a single
   column to read, wide breaks for what needs the room; dark by default, light if the system asks.
   No remote font, no image: the only drawing is the run's ruler, inline SVG. */

:root {
  color-scheme: dark;
  --paper: #121110;
  --paper-2: #1b1917;
  --ink: #ece6dc;
  --muted: #a59d91;
  --accent: #ff6b4a;
  --on-accent: #121110;
  --rule: #35312c;
  --rule-strong: #5a544c;

  /* Item quality, as WoW names and colours it: data, not decoration (a piece's name only). */
  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #4a9bff;
  --q-epic: #b867f5;
  --q-legendary: #ff8000;

  --measure: 38rem;
  --wide: 62rem;
  --font-text: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", "Noto Serif", "Source Serif Pro", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --paper: #f5f1ea;
    --paper-2: #ebe5da;
    --ink: #1a1714;
    --muted: #5d564c;
    --accent: #b03419;
    --on-accent: #ffffff;
    --rule: #d9d1c3;
    --rule-strong: #a99f8f;

    --q-poor: #5e5e5e;
    --q-common: #3d3d3d;
    --q-uncommon: #176400;
    --q-rare: #005bb5;
    --q-epic: #8424c9;
    --q-legendary: #934700;
  }
}

/* The classes' colours (WoW's, by class id): a small swatch beside a class's name, never more. */
.cls-1 { --cc: #c79c6e; }  /* Guerrier */
.cls-2 { --cc: #f58cba; }  /* Paladin */
.cls-3 { --cc: #abd473; }  /* Chasseur */
.cls-4 { --cc: #fff569; }  /* Voleur */
.cls-5 { --cc: #ffffff; }  /* Prêtre */
.cls-7 { --cc: #0070de; }  /* Chaman */
.cls-8 { --cc: #69ccf0; }  /* Mage */
.cls-9 { --cc: #9482c9; }  /* Démoniste */
.cls-11 { --cc: #ff7d0a; } /* Druide */

/* --- Base ------------------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1.0625rem, 1rem + .25vw, 1.1875rem)/1.65 var(--font-text);
  overflow-wrap: break-word;
  overflow-x: clip;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 { font-weight: 400; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.5rem + 5vw, 5.25rem); line-height: 1.02; letter-spacing: -.025em; margin: .3rem 0 1.25rem; }
h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem);
  margin: 4.5rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
h3 { font-size: clamp(1.25rem, 1.15rem + .45vw, 1.5rem); margin: 2.5rem 0 .5rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .25rem; }
h2 a, h3 a { text-decoration: none; }
h2 a:hover, h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

p, ul, ol, dl { margin: .9rem 0; }
ul, ol { padding-left: 1.25rem; }
li { margin: .3rem 0; }
li::marker { color: var(--muted); }
strong { font-weight: 700; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.5; font-style: italic; }

code, kbd {
  font-family: var(--font-mono);
  font-size: .82em;
  font-variant-numeric: normal;
}
code { background: var(--paper-2); padding: .08em .3em; }
kbd {
  padding: .02em .35em;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  white-space: nowrap;
}

/* Small capitals of the interface: labels, kickers, kinds. */
.kicker, .tag, .kind, .crumbs, .toc p, .pager small, .site-nav, .downloads, .meta, .ruler-caption, .band-source,
th, summary {
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums;
}
.kicker {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.tag, .kind {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.meta { font-size: .85rem; color: var(--muted); margin: .25rem 0 .5rem; }

.wrap { width: 100%; max-width: calc(var(--wide) + 32px); margin: 0 auto; padding: 0 16px; }

/* The reading column; `.wide` and `.bleed` leave it for what needs the room. */
/* The reading column keeps the left edge of the page's heads, the room on its right left empty;
   what needs more width (`.wide`, tables, contents) takes the whole of it, a `.bleed` the window's. */
.col { width: 100%; max-width: calc(var(--wide) + 32px); margin: 0 auto; padding: 0 16px; }
.col > *, .col > details > :not(.wide) { max-width: var(--measure); }
.col > .wide, .col > .bleed, .col > .contents, .col > .entries, .col > .pager, .col > .toc,
.col > .page-head, .col > details, .col > h2, .col > .ruler { max-width: none; }
.wide { width: 100%; }
.bleed { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }

/* Said to a screen reader, not shown. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip { position: absolute; left: 16px; top: -3rem; z-index: 20; padding: .5rem .9rem; background: var(--accent); color: var(--on-accent); font-family: var(--font-ui); }
.skip:focus { top: .5rem; }

/* --- The top bar: on a phone its links fold behind « Menu » (a checkbox, no script) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  min-height: 3.25rem;
}

.brand {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  padding: .45rem 0;
  white-space: nowrap;
}
.brand::before { content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--accent); margin-right: .55rem; vertical-align: .1em; }
.brand:hover { color: var(--ink); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-button {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: .55rem;
  padding: .4rem 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  user-select: none;
}
.nav-button .bars, .nav-button .bars::before, .nav-button .bars::after {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-button .bars::before, .nav-button .bars::after { content: ""; position: absolute; left: 0; }
.nav-button .bars::before { top: -5px; }
.nav-button .bars::after { top: 5px; }
.nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 .95rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: .85rem 0 .75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .86rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 68rem) {
  .nav-button { display: inline-flex; }
  .site-nav { display: none; width: 100%; margin: 0; padding: .25rem 0 1rem; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .55rem 0; font-size: 1rem; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--accent); }
}

/* --- The front page's opening ---------------------------------------------------------------- */

.hero { border-bottom: 1px solid var(--rule); }
.hero .wrap { padding-top: clamp(3.5rem, 10vw, 8rem); }
.hero h1 {
  font-size: clamp(3.3rem, 1rem + 11vw, 9.5rem);
  line-height: .92;
  letter-spacing: -.04em;
  margin: 1rem 0 2rem;
}
.hero .lead { max-width: 34rem; margin: 0 0 2.25rem; }
.hero .muted { font-size: .95rem; max-width: 34rem; }

.downloads { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin: 0 0 1rem; }
.download {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.2rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}
.download:hover { color: var(--on-accent); background: var(--ink); }
.download svg { width: 1.1rem; height: 1.1rem; flex: none; }
.download small { font-weight: 400; }
@media (max-width: 30rem) { .download { flex: 1 1 100%; justify-content: center; } }

.hero-run { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: 2.5rem; }

/* --- The run's ruler: the site's one drawing ------------------------------------------------- */

.ruler { display: block; overflow: visible; margin: 1.5rem 0 .5rem; }
.ruler .r-base { stroke: var(--ink); stroke-width: 1.5; }
.ruler .r-min { stroke: var(--rule-strong); stroke-width: 1; }
.ruler .r-elite { stroke: var(--ink); stroke-width: 1.5; }
.ruler .r-boss { stroke: var(--accent); stroke-width: 3; }
.ruler .r-final { fill: var(--accent); }
.ruler .r-label { fill: var(--muted); font-family: var(--font-ui); font-size: 12px; }
.ruler .r-label.r-boss-label { fill: var(--ink); }
.ruler-caption { font-size: .9rem; color: var(--muted); max-width: var(--measure); margin: .75rem 0 0; }

/* --- Pages ----------------------------------------------------------------------------------- */

main { flex: 1; padding-bottom: 5rem; }

.page-head { padding: clamp(2.5rem, 7vw, 5.5rem) 0 1rem; }
.page-head > p { max-width: var(--measure); }
.page-head .crumbs { font-size: .85rem; margin: 0 0 2rem; }
.page-head .crumbs a { color: var(--muted); text-decoration: none; }
.page-head .crumbs a::before { content: "← "; }
.page-head .crumbs a:hover { color: var(--accent); }
.page-head h1 .swatch { width: .2em; height: .2em; vertical-align: .55em; margin-right: .25em; }

/* Edged, so the priest's white and the rogue's yellow still show on a light page. */
.swatch { display: inline-block; width: .55em; height: .55em; background: var(--cc, var(--accent)); box-shadow: 0 0 0 1px var(--rule-strong); margin-right: .45em; vertical-align: .05em; }

/* The figures of the game, said in a sentence. */
.tally { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.65rem); line-height: 1.45; margin: 2rem 0; }
.tally a { text-decoration-thickness: 1px; }

/* A pause, the width of the window. */
.band {
  margin-top: 5rem;
  margin-bottom: 5rem;
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.band-quote { font-size: clamp(2rem, 1rem + 4.5vw, 4.25rem); line-height: 1.08; letter-spacing: -.02em; font-style: italic; margin: 0; max-width: 18ch; }
.band-source { font-size: .9rem; color: var(--muted); margin: 1.5rem 0 0; max-width: var(--measure); }

/* A book's contents: the chapters, one per line. */
.contents { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid var(--ink); }
.contents li { margin: 0; border-bottom: 1px solid var(--rule); }
.contents a { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0 1rem; padding: 1.1rem 0; text-decoration: none; }
.contents .num { font-size: 2.2rem; line-height: 1; color: var(--accent); font-variant-numeric: lining-nums; }
.contents .name { display: block; font-size: 1.45rem; line-height: 1.2; }
.contents .gist { display: block; color: var(--muted); font-style: italic; font-size: 1rem; margin-top: .2rem; }
.contents a:hover .name { color: var(--accent); }

/* Entries: a heading and a few lines, between hairlines. */
.entries { list-style: none; padding: 0; margin: 2rem 0; }
.entries > li, .entries > section { margin: 0; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.entries > li > :first-child, .entries > section > :first-child { margin-top: 0; }
.entries > li > :last-child, .entries > section > :last-child { margin-bottom: 0; }
.entries h3 { margin: 0 0 .35rem; }
.entries p, .entries ul, .entries dl { max-width: var(--measure); }
.entries .kicker { margin-bottom: .4rem; }
.chapter-entry h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); border: 0; padding: 0; margin: 0 0 .5rem; }
.chapter-entry { padding: 2.5rem 0 !important; }

/* An inline list: a sentence of names. */
.names { margin: .9rem 0; }
.inline { list-style: none; padding: 0; display: inline; }
.inline li { display: inline; margin: 0; }
.inline li:not(:last-child)::after { content: ", "; }
.inline li:last-child::after { content: "."; }

/* The run, minute by minute. */
.run { list-style: none; padding: 0; margin: 1.5rem 0; }
.run li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 0 1rem; align-items: baseline; margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.run li:has(> .who:last-child) { grid-template-columns: 4.5rem 1fr; }
.run time, .run .at { font-family: var(--font-ui); font-size: .95rem; font-variant-numeric: tabular-nums lining-nums; color: var(--muted); }
.run .boss time, .run .boss .at { color: var(--accent); font-weight: 600; }
.run .who { font-size: 1.1rem; }
.run .final .who { font-size: 1.35rem; font-style: italic; }

/* Definitions: a name, then what it does. */
.defs dt { font-weight: 700; margin-top: 1.25rem; }
.defs dt .meta { font-weight: 400; display: inline; margin-left: .5rem; }
.defs dd { margin: .2rem 0 0; }
.defs dd + dd { color: var(--muted); }

.steps { padding-left: 1.5rem; }
.steps li { padding-left: .35rem; margin: .9rem 0; }
.steps li::marker { color: var(--accent); font-family: var(--font-ui); font-weight: 600; }

/* A set's bonuses, step by step. */
.steps-set { list-style: none; padding: 0; }
.steps-set li { padding-left: 1.25rem; position: relative; }
.steps-set li::before { content: ""; position: absolute; left: 0; top: .72em; width: .6rem; height: 1px; background: var(--accent); }

/* Two columns on a wide screen, one on a phone (installing on Windows, on Linux). */
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 0 3rem; }
.pair > section { border-top: 1px solid var(--ink); }
.pair h3 { margin-top: 1rem; }

/* A remark aside from the text: a thin accent line, no box. */
.aside { border-left: 2px solid var(--accent); padding-left: 1.1rem; margin: 1.75rem 0; }
.aside > :first-child { margin-top: 0; }
.aside > :last-child { margin-bottom: 0; }

/* --- Item quality ---------------------------------------------------------------------------- */

.q-poor { color: var(--q-poor); }
.q-common { color: var(--q-common); }
.q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); }
.q-epic { color: var(--q-epic); }
.q-legendary { color: var(--q-legendary); }
td.q-poor, td.q-common, td.q-uncommon, td.q-rare, td.q-epic, td.q-legendary { font-weight: 600; }

/* --- Tables, folds, tables of contents ------------------------------------------------------- */

/* Wide tables scroll inside themselves, never the page. */
.table { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
td { padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums lining-nums; }

details.fold { border-bottom: 1px solid var(--rule); }
details.fold:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; padding: .8rem 0; font-size: 1rem; list-style-position: outside; }
summary .muted { font-size: .9rem; margin-left: .4rem; }
summary::marker { color: var(--accent); }

.toc { margin: 0 0 3rem; padding: 1rem 0 0; border-top: 1px solid var(--rule); }
.toc p { margin: 0 0 .5rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; font-family: var(--font-ui); font-size: .92rem; }
.toc li { margin: 0; }
.toc a { text-decoration-color: var(--rule-strong); }

/* The chapter (or class) before and after. */
.pager { list-style: none; padding: 0; margin: 5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid var(--ink); }
.pager li { margin: 0; }
.pager li:last-child { text-align: right; }
.pager a { display: block; padding: 1.25rem 0; text-decoration: none; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.25; }
.pager small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .35rem; }
.pager a:hover { color: var(--accent); }
@media (max-width: 30rem) { .pager { grid-template-columns: 1fr; gap: 0; } .pager li:last-child { text-align: left; } }

/* --- Footer ---------------------------------------------------------------------------------- */

.site-foot { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; color: var(--muted); font-family: var(--font-ui); font-size: .85rem; }
.site-foot p { margin: .3rem 0; }
