/* FOREVER news on guildsforever.news.
   Tokens, fonts and rules come from Guilds Forever's DESIGN.md ("war table"): space black, structure from
   hairlines, one ember signal, white focus, Cabinet Grotesk titles, Satoshi text, JetBrains Mono numbers.
   Layout follows time.mk, made more compact. See DESIGN.md in this folder. */

@font-face { font-family: "Cabinet Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/cabinet-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Cabinet Grotesk"; font-weight: 800; font-display: swap; src: url("fonts/cabinet-grotesk-800.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 400; font-display: swap; src: url("fonts/satoshi-400.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 500; font-display: swap; src: url("fonts/satoshi-500.woff2") format("woff2"); }
@font-face { font-family: "Satoshi"; font-weight: 700; font-display: swap; src: url("fonts/satoshi-700.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --canvas: #0a0a0b; --track: #1a1a1d; --track-faint: #161618;
  --border: #26262a; --control: #38383d; --hover-edge: #4a4a50;
  --text: #ececee; --muted: #a9a9ae; --faint: #85858b; --heading: #f7f7f8;
  --ember: #f0914a; --ember-hover: #f6ab73; --ember-ink: #1b0d03; --focus: #f7f7f8;
  --success: #8fd48a; --error: #f2978f; --info: #8ebdf0; --warning: #e9c46d;
  --title: "Cabinet Grotesk", "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --body: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { background: var(--canvas); }
body { margin: 0; color: var(--text); font: 400 15px/1.5 var(--body); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px; }
a:hover { color: var(--ember); text-decoration-color: var(--ember); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
button, select, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.micro { font: 700 11px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1136px; margin: 0 auto; padding-inline: 24px; }

/* ---------- header: guilds forever lockup + "News", tabs ---------- */
.gf-head { border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; background: var(--canvas); }
.head-row { display: flex; align-items: center; gap: 12px 20px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand img { height: 22px; width: auto; display: block; }
.brand .news { font: 700 20px/1 var(--title); letter-spacing: -.01em; padding-left: 12px; border-left: 1px solid var(--control); }
.head-meta { color: var(--faint); font-size: 12px; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search input { width: 220px; height: 36px; padding: 0 12px; background: var(--canvas); border: 1px solid var(--control); border-radius: 2px; font-size: 14px; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--focus); outline: none; }
.gf-link { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; height: 40px; font: 500 14px/1 var(--body); color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--heading); }
.tab[aria-current="page"] { color: var(--heading); border-bottom-color: var(--ember); }
.tab .n { font: 500 11px var(--mono); color: var(--faint); margin-left: 6px; }

/* ---------- chips (time.mk's pills in the war-table style) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--control); border-radius: 2px;
  font: 500 12px/1 var(--body); color: var(--text); text-decoration: none; background: var(--canvas); white-space: nowrap; }
.chip:hover { border-color: var(--hover-edge); color: var(--heading); }
.chip .mono { font-size: 11px; }
.chip.ai { border-color: var(--ember); }
.chip.ai:hover { color: var(--ember); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }
.chip .up { color: var(--success); } .chip .down { color: var(--error); }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px; }
.panel + .panel { margin-top: 12px; }
.panel h2 { margin: 0 0 10px; }

footer.gf-foot { border-top: 1px solid var(--border); margin-top: 40px; padding-block: 18px 32px; color: var(--faint); font-size: 12px; }
footer.gf-foot p { margin: 0 0 6px; max-width: 90ch; }
footer.gf-foot a { color: var(--muted); }

@media (max-width: 700px) {
  .wrap { padding-inline: 16px; }
  .head-meta, .gf-link { display: none; }
  .brand img { height: 18px; }
  .brand .news { font-size: 18px; padding-left: 10px; }
  .search input { width: 128px; }
  .tabs { gap: 18px; }
  .chip { height: 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- a touch of nostalgia: sources, classes, coins, icons ---------- */
/* Sources: Blizzard staff posts in the old forums' "blue post" blue; Wowhead in its own red. */
.src { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.src .ico { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.src-wowhead { color: #f5736a; }
.src-blizzard { color: var(--info); }
.src-blizzard svg { width: 14px; height: 14px; flex: none; }

/* Class names in their in-game colours (Shaman lightened for contrast, as on guildsforever.com). */
.cls { font-weight: 700; }
.cls-druid { color: #FF7C0A; } .cls-hunter { color: #AAD372; } .cls-mage { color: #3FC7EB; }
.cls-paladin { color: #F48CBA; } .cls-priest { color: #F2F2F2; } .cls-rogue { color: #FFF468; }
.cls-shaman { color: #3D9BE9; } .cls-warlock { color: #8788EE; } .cls-warrior { color: #C69B6D; }

/* Money like the game prints it. */
.coin { font-weight: 700; white-space: nowrap; }
.coin::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 3px; vertical-align: 1px; }
.coin-gold { color: #ffd257; } .coin-gold::after { background: #ffd257; }
.coin-silver { color: #cfd3da; } .coin-silver::after { background: #cfd3da; }
.coin-copper { color: #e0925a; } .coin-copper::after { background: #c8703a; }

/* Game icons (class, profession, faction): small, square, hairline, like an action bar slot. */
.gi { width: 22px; height: 22px; border-radius: 2px; border: 1px solid var(--control); display: block; }
.icons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.icons .lbl { margin-right: 4px; }

/* Chip glyphs */
.chip svg { width: 13px; height: 13px; flex: none; opacity: .85; }

/* ---------- charts: finding first, then the chart (see charts.py) ---------- */
.chart { border: 1px solid var(--border); border-radius: 4px; padding: 16px 18px; }
.chart .finding { margin: 4px 0 14px; font: 700 22px/1.2 var(--title); letter-spacing: -.01em; color: var(--heading); text-wrap: balance; }
.finding.sm { font: 700 16px/1.3 var(--title); color: var(--heading); margin: 2px 0 10px; }
.chart-sub { font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: 8px; }
.chart-sub span { color: var(--faint); font-weight: 400; }
.week-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 36px; }

/* ranked class bars: icon, name, bar, count; each row is its own hit target */
.rank { display: grid; gap: 2px; }
.rank-row { display: grid; grid-template-columns: 20px 64px minmax(0, 1fr) 24px; align-items: center; gap: 8px;
  padding: 3px 4px; margin-inline: -4px; border-radius: 2px; text-decoration: none; color: var(--text); font-size: 13px; }
.rank-row:hover, .rank-row:focus-visible { background: var(--track-faint); color: var(--heading); }
.rank-row .gi { width: 20px; height: 20px; }
.rank-track { height: 10px; }
.rank-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 0; }
.rank-n { font: 500 12px var(--mono); text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* buff | other | nerf: 2px surface gap between parts, 4px rounded outer ends */
.split { display: flex; gap: 2px; height: 12px; margin-top: 12px; }
.split .seg { min-width: 4px; outline-offset: 2px; }
.split .seg:first-child { border-radius: 4px 0 0 4px; }
.split .seg:last-child { border-radius: 0 4px 4px 0; }
.split .seg:hover, .split .seg:focus-visible { filter: brightness(1.2); }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 10px; height: 10px; border-radius: 2px; }

/* before -> after tiles */
.tiles { display: grid; gap: 10px; }
.tile { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--hover-edge); color: var(--text); }
.tile-v { font: 800 24px/1.1 var(--title); color: var(--heading); letter-spacing: -.01em; }
.tile-v .arr { color: var(--faint); font-weight: 700; }
.tile-l { font-size: 13px; color: var(--text); }
.tile-m { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile-m .dot { width: 8px; height: 8px; border-radius: 50%; }

/* articles per day: columns from one baseline, peak in pressed ember */
.dcols { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 120px; border-bottom: 1px solid var(--control); padding-top: 18px; }
.dcol { flex: 0 1 24px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; outline-offset: 2px; }
.dcol i { display: block; width: 100%; background: #6b6b72; border-radius: 4px 4px 0 0; }
.dcol.peak i { background: #d9783a; }
.dcol b { position: absolute; top: -16px; font: 500 11px var(--mono); color: var(--text); }
.dcol:hover i, .dcol:focus-visible i { filter: brightness(1.25); }
.axis { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11px var(--mono); color: var(--faint); }

/* table view */
.tbl { margin-top: 14px; font-size: 12px; color: var(--muted); }
.tbl summary { cursor: pointer; width: fit-content; }
.tbl table { margin-top: 8px; border-collapse: collapse; font-size: 13px; color: var(--text); }
.tbl th, .tbl td { text-align: left; padding: 4px 16px 4px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.tbl th { font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* tooltip: value first, label second */
.ctip { position: fixed; z-index: 50; pointer-events: none; padding: 6px 9px; background: var(--canvas); border: 1px solid var(--hover-edge);
  border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); font-size: 12px; color: var(--muted); max-width: 240px; }
.ctip strong { display: block; font-size: 13px; color: var(--heading); }

@media (max-width: 800px) { .week-grid { grid-template-columns: minmax(0, 1fr); } .chart .finding { font-size: 19px; } }

/* Weekly digest signup (assets/digest.js) */
.digest-row { display: flex; gap: 6px; }
.digest input[type=email] { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 10px; background: var(--canvas); border: 1px solid var(--control); border-radius: 2px; color: var(--text); font: 400 14px var(--body); }
.digest input[type=email]::placeholder { color: var(--faint); }
.digest input[type=email]:focus { border-color: var(--focus); outline: none; }
.digest button { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 2px; background: var(--ember); color: var(--ember-ink); font: 700 14px var(--body); cursor: pointer; }
.digest button:hover { background: var(--ember-hover); }
.digest button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.digest button[disabled] { opacity: .6; cursor: default; }
.digest .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.digest-msg { margin: 6px 0 0; font-size: 13px; color: var(--muted); min-height: 0; }
.digest-msg:empty { display: none; }
.digest-msg.ok { color: var(--success); }
.digest-msg.err { color: var(--error); }
.foot-digest { margin-bottom: 14px; }
.digest.compact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.digest.compact .digest-label { color: var(--muted); font-size: 13px; }
.digest.compact .digest-row { width: min(360px, 100%); }
.digest.compact .digest-msg { flex-basis: 100%; }
@media (max-width: 700px) { .digest button { height: 44px; } .digest input[type=email] { height: 44px; } }
