/* ==========================================================================
   100parse — design layer
   --------------------------------------------------------------------------
   Load this FIRST, before theme.css. It owns every colour, font and radius on
   the site, and it styles bare HTML (body, a, h1-h6, table, input, button) on
   its own. theme.css sits on top and maps this app's markup onto these tokens
   without deciding how anything looks — which is what makes a re-skin a change
   to this one file rather than a hunt through the whole stylesheet.

   The palette is weathered stone and red, taken off the old action-bar
   gryphons: cool carved rock, dark in the crevices, lit on the raised faces.
   Corners are near-square and lines carry real contrast, so the frame reads
   carved rather than printed.

   Three colour families, and the split is the whole idea. **The names describe
   the ROLE, never the value.** This file has been gold, then brown, and is now
   stone, and the app layer never changed once — which only works because
   nothing downstream refers to a colour by what colour it happens to be.

     --accent*  ACTION. Red. Buttons that do something: Start Run, Take.
                Nothing decorative is ever red, so a red thing on the page
                always means "this is the move".
     --chrome*  CHROME. Brand, headings, links, counters, focus, emphasis
                borders. Everything that frames the page rather than acts on it.
     --select*  SURFACE. Selected states and emphasis panels — a place, never
                an action.

   Mixing them is how a design loses the ability to point at anything.

   ── Type ──────────────────────────────────────────────────────────────────
   Four faces, mapped to the four roles WoW itself uses, because the roles are
   what make it feel like the game — not any single typeface:

     Morpheus       quest titles       -> Almendra        --font-header
     Friz Quadrata  main UI text       -> Marcellus       --font-display
     Arial Narrow   chat log           -> Archivo Narrow  --font-body
     Skurri         combat text        -> Metamorphous    --font-numeric

   The real ones are not shipped and cannot be. Friz Quadrata belongs to ITC,
   Arial Narrow to Monotype, and Morpheus and Skurri to Blizzard; serving any
   of them over @font-face is redistributing a licensed font, which is a
   different thing from a fan project using Blizzard's art, and it is exactly
   the sort of thing that costs a fan project its tolerance. (It is moot
   anyway: current clients ship Blizzard's .slug format, not TTFs.)

   The combat-text mapping is the one worth keeping: a parse renders in the
   face WoW uses for damage numbers.
   ========================================================================== */

/* Four game faces, plus Cinzel and IBM Plex for the score card — see the
   `.surface-logs` scope below for why the report reads in a different voice
   from the game.

   Served from here rather than @import-ed from Google. Three reasons, in
   `manage.py fetch_fonts`: the privacy page promises the site loads nothing
   from third parties, every visitor's IP was going to Google to get them, and
   the share card needs a real .ttf on disk because Pillow cannot draw with a
   webfont. All six families are OFL or Apache, which permits this. The note
   above about not shipping the *real* WoW faces is a different question and
   still holds. */
@import url("fonts.5023f4ecf5a1.css");

:root {
  /* The parse face, on every surface (Sosa, 7 Sep: every parse number in
     the Warcraft Logs style, the class plates and spec tiles included).
     .surface-logs below declares the same value; this one is what the
     front page and the profile resolve, which have no logs surface. */
  --font-parse: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;

  /* surfaces — shadow to lit face. Neutral-cool grey with the faintest blue
     in it; a pure neutral goes flat next to the rarity colours. */
  --bg:            #131415;
  --surface:       #1a1c1e;
  --surface-2:     #212427;
  --surface-3:     #292d31;
  --surface-hover: #32363b;

  /* The top bar. Darker than any panel on purpose: it is the frame, and a
     frame that reads lighter than the page inside it puts the emphasis in the
     wrong place. Near-black is also what lets the chain read as iron — over the
     old mid-grey it washed out however opaque it was.
     The footer deliberately still uses --surface; matching it would be a
     one-line change if the two bars should be a pair. */
  --bar:           #08090a;

  /* The tooltip backdrop. Darker than --bar, and the only surface in the file
     that is effectively black, because it is the one thing that floats over
     the page rather than sitting in it: it has to separate from the parchment
     behind it at a glance, and the client's own tooltip is near-black for the
     same reason. Slightly blue rather than neutral so the rarity colours on it
     stay warm. */
  --tip-bg:        #060a10;

  /* lines. Deliberately high contrast against their surfaces — a crisp 1px
     edge reads harder than a thicker muddy one, which is what carved needs. */
  --line:        #33373b;
  --line-soft:   #26292c;
  --line-strong: #474c52;
  --line-hover:  #5d636a;

  /* text */
  --text-bright: #f2f4f5;   /* hover states and the top of the hierarchy */
  --text:        #dfe2e4;
  --text-body:   #bcc1c5;
  --text-muted:  #8a9096;
  --text-dim:    #656b71;
  --text-faint:  #4e545a;

  /* action — red */
  --accent:            #a3272b;
  --accent-hover:      #c8353a;
  --accent-line:       #c8353a;
  --accent-line-hover: #e04148;
  --accent-text:       #fdeceb;
  --accent-soft:       #2a1113;  /* tinted fill for badges */
  --accent-quiet:      #d0716f;  /* accent-coloured text on dark */

  /* chrome — the gryphon's lit stone */
  --chrome:        #85898e;
  --chrome-bright: #b4b8bd;
  --chrome-line:   #4a5057;
  --chrome-soft:   #1e2124;        /* tinted fill */
  --chrome-quiet:  #767b81;
  --chrome-focus:  #9aa0a6;

  /* surface — lit stone for a selected state. A place, never an action. */
  --select:      #3c4248;
  --select-line: #5a6169;
  --select-soft: #24282c;

  /* status. `warn` can be a plain amber again: against grey it no longer risks
     reading as chrome, which is why it was pushed orange under the gold. */
  /* ---- button plates ----------------------------------------------------
     The client's buttons are stamped metal: a near-black rim, a face lit from
     above, and gold lettering. Three tokens carry that, and the treatment is
     built from gradients and inset shadows rather than art so it works at any
     size a button happens to be.

     `--plate-gold` is WoW's own UI gold rather than our amber `--warn`. It is
     the one colour on a button people recognise before they read the word, and
     the amber goes muddy against crimson. */
  --plate-edge:      #14090a;   /* the rim, near-black with a red cast */
  --plate-gold:      #f8cf47;   /* lettering */
  --plate-gold-lit:  #ffe27a;   /* lettering, hover */
  /* The lettering's shadow, as one value because it was written twice and the
     copies drifted — the Start run button kept a weak early version while every
     other plate got the real one, which is precisely the bug a duplicated
     declaration produces.

     Three layers. Two hard offsets a pixel down and a pixel down-right build a
     solid dark edge under the glyphs rather than a blur, which is what the
     client draws and what keeps gold from dissolving into lit metal. The wide
     soft one behind them is a halo for the brightest band of the gradient. */
  --plate-text-shadow:
    0 2px 0 rgb(0 0 0 / 0.95),
    1px 1px 0 rgb(0 0 0 / 0.95),
    0 0 7px rgb(0 0 0 / 0.85);

  --warn:      #d9a13f;
  --warn-line: #9c7328;
  --warn-soft: #241d0c;
  --ok:        #7fb582;
  --ok-line:   #4f8f57;
  --ok-soft:   #101a12;
  --danger:    #cf6b62;
  --danger-text: #f3d3cd;

  /* Stat value ramp, for the board's stat digest. How much DPS a stat is worth
     to your spec, in five steps.

     One hue, varying in brightness and warmth, and that is the whole point.
     Green-blue-purple is the *rarity* scale and it is already on the item name
     in the same row — a second meaning for those colours would make both
     unreadable. Intensity is unused on this page and reads as "how much"
     without anyone being taught it.

     v0 is its own step rather than the bottom of the ramp: worth exactly
     nothing is a different statement from worth little, and a warrior's spirit
     should look like it is not participating. */
  /* The item row's slot/type/ilvl line. Cool blue-grey rather than the neutral
     dim it used to share with every other muted string: it is the item's
     identity — where it goes and what it is — and it earns being told apart
     from the stat digest underneath at a glance. Kept desaturated so it never
     competes with the rarity colour on the name directly above it. */
  --item-meta: #8fa6c4;

  --stat-v0: #5a6066;   /* worth nothing to this spec */
  --stat-v1: #8d8579;   /* under 1 dps — the defensive floor */
  --stat-v2: #b8a578;   /* 1-5 */
  --stat-v3: #dcc07d;   /* 5-12 */
  --stat-v4: #ffd978;   /* 12+ — the reason to take the item */

  /* type — see the four roles in the header comment.
     Sizes below run smaller and tighter than they would for a plain sans:
     Marcellus and Almendra are wide flared serifs that bring their own
     letter-spacing, and Archivo Narrow is condensed, so body copy needs a
     point more size to read at the same weight. */
  --font-header:  'Almendra', Georgia, serif;                   /* Morpheus */
  --font-display: 'Marcellus', Georgia, serif;             /* Friz Quadrata */
  --font-body:    'Archivo Narrow', 'Arial Narrow', system-ui, sans-serif;
  --font-numeric: 'Metamorphous', Georgia, serif;                 /* Skurri */
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Near-square. Carved stone has no soft corners, and this is most of what
     separates brutal from merely recoloured. */
  --radius: 2px;
  --radius-sm: 1px;
  /* Border weight is a token so a future theme can thicken every edge without
     touching the app layer — same reason the colours are tokens. */
  --border: 1px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;

  /* The diamond that terminates a section rule. It lives here, in the design
     layer, for a specific reason: a data URI cannot reference a custom
     property, so the colour has to be baked into the SVG — and a baked colour
     is exactly the thing the app layer is not allowed to own. Keeping the
     whole URL as a token means the ornament re-colours with the theme instead
     of stranding an orphan hex in theme.css.
     fill is --chrome-line (#4a5057); update both together. */
  --ornament-diamond:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2010%2010'%3E%3Cpath%20d='M5%200L10%205L5%2010L0%205Z'%20fill='%234a5057'/%3E%3C/svg%3E");
}

/* ---------- the score card is a report, not the game ---------------------- */
/*
   The run screen is the game; the score card is the report, and the reference
   the audience already reads for a report is Warcraft Logs — near-black, with
   the parse colour carrying every bit of emphasis and item rarity doing the
   rest. Site chrome and a quest-title face would make it worse, and the share
   card with it, since the card renders from the same markup.

   Scoped to the card, NOT to <body>. The page around it — background, header,
   section headings, the Draft Again button — stays on the site's own colours,
   and the box reads as an inset report rather than a whole page that changed
   theme. Custom properties cascade, so putting the class on the card is the
   entire mechanism; every rule in theme.css stays exactly as written.

   Any element can wear this. The share-card renderer will put it on its root.
*/
.surface-logs {
  --bg:            #0a0a0b;
  --surface:       #0e0e10;
  --surface-2:     #131316;
  --surface-3:     #17171b;
  --surface-hover: #1c1c21;

  --line:        #1e1e22;
  --line-soft:   #191a1d;
  --line-strong: #2a2a31;
  --line-hover:  #3a3a43;

  /* Chrome recedes so the parse leads. It is not wrong here, just louder than
     the number it would sit next to. */
  --chrome:        var(--text-muted);
  --chrome-bright: var(--text);
  --chrome-quiet:  var(--text-muted);
  --chrome-line:   var(--line-strong);
  --chrome-soft:   var(--surface-3);

  --select:      #1e1e22;
  --select-line: #2a2a31;
  --select-soft: #17171b;

  /* Two faces, and they are the two that were here before the game fonts
     arrived: Cinzel for the numbers, IBM Plex Sans for everything else. A data
     readout does not want four voices, and a condensed face makes a dense
     column of labels harder to scan, not easier. */
  --select:      #2a2a31;
  --select-line: #3a3a43;
  --select-soft: #17171b;

  --font-header:  'Cinzel', Georgia, serif;
  --font-display: 'Cinzel', Georgia, serif;
  --font-numeric: 'Cinzel', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  /* The parse number itself, and only that. Warcraft Logs sets it in a plain
     heavy grotesque, so this is deliberately *not* one of the game faces and
     not Cinzel either — the number is the one element on this page borrowed
     wholesale from their report, the same way the colour bands are, and a
     serif immediately reads as ours rather than as a parse.

     Archivo Narrow at 700 rather than Arial itself. It keeps the grotesque
     reading while being a face we already self-host, which matters more than it
     sounds: the share card renders this same number server-side with Pillow,
     and Pillow needs a real file on disk. Arial is not redistributable, so
     matching it there would have meant fetching a metric clone purely to agree
     with a system font. One face, both surfaces, no clone.

     Condensed also buys room. The card's centre block is 580px wide: a serif
     put "100.0" at 572px of it, and this puts the same string at 459px — which
     is why the card can draw the number *larger* than the design called for
     rather than shrinking it to fit. */
  --font-parse: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;

  /* Redefining --font-body above is not enough on its own. `body` resolves
     `font-family: var(--font-body)` at body level, and descendants inherit the
     *computed* result — Archivo Narrow — not the var() reference. Re-declaring
     the property here forces it to resolve again against this scope's token, so
     everything inside actually picks up IBM Plex Sans. Rules that set
     font-family explicitly (.item-name, .gear-slot) were always fine; it is the
     inherited ones that need this. */
  font-family: var(--font-body);

  /* The site runs at 15px because Archivo Narrow is condensed and reads a size
     small. IBM Plex Sans doesn't, so inheriting 15px here would come out
     visibly larger than this card is meant to look. */
  font-size: 14px;
}


/* ---------- base ---------------------------------------------------------- */

* { box-sizing: border-box; }

/* The browser's own `[hidden] { display: none }` lives in the UA stylesheet, at
   the lowest specificity there is — so any class that sets `display` silently
   defeats it, and `el.hidden = true` then does nothing at all while looking for
   all the world like it worked.

   That is not hypothetical: .reel, .tier-track and .notice all set
   `display: flex`, so none of them could ever hide. The roll reel stayed on
   screen after landing (printing the raid and boss a second time above the
   board) and, with instant rolls on, left the previous roll's names up
   permanently.

   !important earns its keep here. The alternative is remembering to write
   `.thing[hidden]` for every component that ever hides, forever, and the
   failure mode is invisible. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  /* A point larger than a normal-width sans would need: Archivo Narrow is
     condensed, so it reads a size smaller than its nominal value. */
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* h1 and h2 name regions of the page and take the quest-title face. h3 and
   below name one thing and take the UI face — the same division the game
   makes between a quest header and a unit frame. */
h1, h2 { font-family: var(--font-header); font-weight: 400; }
h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 400; }
h1, h2, h3, h4, h5, h6 { color: var(--text); margin: 0 0 8px; }

h1 { font-size: 27px; letter-spacing: 0.01em; color: var(--chrome-bright); line-height: 1.25; }
h2 { font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--chrome); }
h3 { font-size: 15px; letter-spacing: 0.03em; }
h4, h5, h6 {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0 0 14px; color: var(--text-muted); text-wrap: pretty; }
small, .muted { color: var(--text-dim); font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, kbd, pre, .mono, .num { font-family: var(--font-mono); }
code {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 3px; padding: 1px 5px; font-size: 12.5px; color: var(--chrome-quiet);
}

a { color: var(--chrome-quiet); text-decoration: none; transition: color 0.12s ease; }
a:hover { color: var(--chrome-bright); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--chrome-focus);
  outline-offset: 2px;
}

::selection { background: var(--select); color: var(--text-bright); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #1e2c3a; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #33485f; }

/* ---------- layout helpers ------------------------------------------------ */

.container { max-width: 1240px; margin: 0 auto; padding: 34px 22px 80px; }
.section { margin-bottom: 38px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.spacer { flex: 1; }

/* ---------- top navigation ------------------------------------------------ */

.navbar, header.site {
  background: var(--surface-2);
  border-bottom: 1px solid var(--chrome-line);
}
.navbar-inner {
  display: flex; align-items: center; gap: 22px;
  height: 52px; padding: 0 22px; white-space: nowrap;
}
.brand {
  font-family: var(--font-header);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--chrome-bright);
  text-transform: uppercase;
}
.brand:hover { color: var(--text-bright); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-body);
  transition: background 0.12s ease, color 0.12s ease;
}
.nav a:hover { background: var(--surface-hover); color: var(--text-bright); }
/* "You are here" is chrome, not an action — so it's gold, not crimson. */
.nav a.active, .nav a[aria-current="page"] {
  background: var(--select-soft);
  border: 1px solid var(--select-line);
  color: var(--text-bright);
  font-weight: 600;
}
.nav a.active:hover { color: var(--text-bright); }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }

/* ---------- cards --------------------------------------------------------- */

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 18px;
  transition: border-color 0.12s ease;
}
.card:hover { border-color: var(--chrome-line); }
.card-title {
  font-family: var(--font-display); font-size: 15px;
  color: var(--text); letter-spacing: 0.03em;
}
.card-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.card-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}

/* ---------- buttons ------------------------------------------------------- */

.btn, button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 3px;
  /* Stone by default, crimson for `.primary`. One construction, two faces, so
     hierarchy survives making every button look like a plate — if the base
     button were red as well, everything on the page would read as the action. */
  background: linear-gradient(180deg, #43484e 0%, #33383d 46%, #23272b 100%);
  border: 2px solid var(--plate-edge);
  color: var(--plate-gold);
  /* Marcellus, our Friz Quadrata stand-in, which is the face the client letters
     its buttons in. Already self-hosted, so this costs nothing. Small caps
     spacing because the real ones are set wide. */
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: var(--plate-text-shadow);
  cursor: pointer;
  /* Four layers make the stamped edge, and each is doing a job:
       1  a hairline of light inside the rim, which is the bevel's top facet
       2  a dark inner shade at the bottom, the facet turning away from the light
       3  a soft inner vignette so the face is brighter in the middle than at
          its edges, which is what stops a flat gradient reading as plastic
       4  a drop shadow, so it sits on the page rather than in it */
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.20),
    inset 0 -2px 3px rgb(0 0 0 / 0.45),
    inset 0 0 14px rgb(0 0 0 / 0.35),
    0 1px 3px rgb(0 0 0 / 0.55);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease,
              box-shadow 0.12s ease;
}
/* Pressed inverts the lighting: the plate goes in, so the lit edge moves to the
   bottom and the whole thing drops a pixel. */
/* Pressed inverts the lighting: the plate goes in, so the lit facet moves to
   the bottom and the whole thing drops a pixel. */
.btn:active, button:active, input[type="submit"]:active {
  box-shadow:
    inset 0 2px 4px rgb(0 0 0 / 0.55),
    inset 0 -1px 0 rgb(255 255 255 / 0.08);
  transform: translateY(1px);
}
/* Hover lifts the face rather than recolouring it. The rim stays put — it is a
   stamped edge and it does not brighten because a cursor went past. */
.btn:hover, button:hover, input[type="submit"]:hover {
  background: linear-gradient(180deg, #545a61 0%, #40464c 46%, #2c3136 100%);
  color: var(--plate-gold-lit);
}
/* The crimson plate. Same construction as the stone one above, so a primary
   button is the same object in a different metal rather than a different
   component — which is what keeps a page of mixed buttons reading as one set.

   Four stops, and the order matters. The face does not peak at the rim, it
   peaks just under it at 18% and falls away from there — a stamped plate
   catches a light hung above it a little way down its face, not on its very
   edge. Starting bright at 0% is what makes a button look like a coloured
   rectangle instead of a piece of metal.

   `a.btn.primary` is in this list on purpose. It used to be styled over in the
   app layer as a documented exception, which meant the crimson lived in two
   files and the later one silently won. Colour belongs here. */
.btn-primary, button.primary, input[type="submit"],
a.btn.primary, .btn.primary {
  background: linear-gradient(180deg, #8e2429 0%, #ad3036 18%, #8b2126 58%, #5c1418 100%);
  border-color: var(--plate-edge);
  color: var(--plate-gold);
}
.btn-primary:hover, button.primary:hover, input[type="submit"]:hover,
a.btn.primary:hover, .btn.primary:hover {
  background: linear-gradient(180deg, #a32d33 0%, #c53b42 18%, #9e2a30 58%, #6c191e 100%);
  color: var(--plate-gold-lit);
}
/* Board chips: the plate at chip scale (Sosa, 1 Sep). Same stone, same
   stamped edge, shrunk -- the window tabs, spec chips, per-spec/day-total
   toggle and the day-step arrows all wear it, and the active one wears
   the crimson, so the boards page reads as the same metal as everywhere
   else instead of a row of outline pills. */
.board-filters a, a.board-day-step {
  padding: 4px 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, #43484e 0%, #33383d 46%, #23272b 100%);
  border: 2px solid var(--plate-edge);
  color: var(--plate-gold);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-shadow: var(--plate-text-shadow);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.18),
    inset 0 -2px 3px rgb(0 0 0 / 0.40),
    inset 0 0 10px rgb(0 0 0 / 0.30),
    0 1px 2px rgb(0 0 0 / 0.50);
  transition: background 0.12s ease, color 0.12s ease;
}
.board-filters a:hover, a.board-day-step:hover {
  background: linear-gradient(180deg, #545a61 0%, #40464c 46%, #2c3136 100%);
  color: var(--plate-gold-lit);
}
.board-filters a.is-active {
  background: linear-gradient(180deg, #8e2429 0%, #ad3036 18%, #8b2126 58%, #5c1418 100%);
  color: var(--plate-gold);
}
.board-filters a.is-active:hover {
  background: linear-gradient(180deg, #a32d33 0%, #c53b42 18%, #9e2a30 58%, #6c191e 100%);
  color: var(--plate-gold-lit);
}

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-muted); }
.btn-danger { background: transparent; border-color: #5a221c; color: #e09189; }
.btn-danger:hover { background: var(--accent-soft); color: var(--danger-text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled, button:disabled {
  opacity: 0.4; cursor: not-allowed; background: var(--surface-2);
  border-color: var(--line); color: var(--text-dim);
}

/* tab / toggle group */
.tabs { display: flex; gap: 8px; margin-bottom: 26px; }
.tabs > * {
  padding: 9px 20px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
}
.tabs > *:hover { border-color: var(--line-hover); color: var(--text); }
.tabs > .active, .tabs > [aria-selected="true"] {
  background: var(--select-soft); border-color: var(--select-line); color: var(--text-bright);
}

/* ---------- forms --------------------------------------------------------- */

label {
  display: block; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px;
}
.field { margin-bottom: 18px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}
textarea { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; padding: 14px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--chrome-focus); background: var(--surface-3); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--chrome); width: auto; }
.help { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.error-text { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
input.error, select.error, textarea.error { border-color: #6a2a22; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline-offset: 3px; }

/* ---------- tables -------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13.5px;
}
thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-body); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(odd) { background: var(--surface-2); }
tbody tr:nth-child(even) { background: var(--surface); }
tbody tr:hover { background: var(--surface-3); }
td.num, th.num { font-family: var(--font-mono); text-align: right; }
td strong, .cell-title { color: var(--text); font-weight: 500; }

.rank-list { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  background: var(--surface-3); border-bottom: 1px solid var(--line-soft);
}
.rank-row:nth-child(even) { background: var(--surface); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rank { width: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--chrome-quiet); }
.rank-row .name { color: var(--text-body); font-weight: 500; }

/* ---------- badges, pills, callouts --------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 3px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-family: var(--font-body); font-weight: 600;
  background: var(--surface-3); border: 1px solid var(--chrome-line); color: var(--chrome-quiet);
}
.badge-accent { background: var(--accent-soft); border-color: var(--accent-line); color: #e8a49c; }
.badge-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.badge-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }

.callout {
  display: flex; gap: 13px;
  padding: 13px 16px; margin-bottom: 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13.5px;
}
.callout strong { color: var(--text); }
.callout-warn { border-left-color: var(--warn-line); }
.callout-warn strong { color: #e8cfa4; }
.callout-danger { border-left-color: var(--accent-line); }
.callout-danger strong { color: var(--danger-text); }
.callout-ok { border-left-color: var(--ok-line); }
.callout-ok strong { color: #d2e4c4; }

/* empty state */
.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* status dot */
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); display: inline-block; }
.dot-ok { background: var(--ok-line); }
.dot-warn { background: var(--warn-line); }
.dot-danger { background: var(--accent-hover); }

/* ---------- WoW class colours (opt-in) ------------------------------------ */
/* Not ours to pick — the same reasoning as the two scales in theme.css. A
   player identifies their class by this colour before they read the word. */

.c-warrior { color: #c69b6d; } .c-paladin { color: #f48cba; } .c-hunter  { color: #aad372; }
.c-rogue   { color: #fff468; } .c-priest  { color: #ffffff; } .c-shaman  { color: #0070dd; }
.c-mage    { color: #3fc7eb; } .c-warlock { color: #8788ee; } .c-monk    { color: #00ff98; }
.c-druid   { color: #ff7c0a; } .c-dk      { color: #c41e3a; } .c-dh      { color: #a330c9; }
.c-evoker  { color: #33937f; }

/* ---------- footer -------------------------------------------------------- */

footer.site {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 22px;
  font-size: 12.5px;
  color: var(--text-dim);
}
