@font-face { font-family: "Jersey 15"; font-weight: 400 700; font-display: swap; src: url("/rc-static/fonts/jersey-15-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/rc-static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/rc-static/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/rc-static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/rc-static/fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* ---------------------------------------------------------------- Tokens */
:root {
  color-scheme: dark;
  --pixel: "Jersey 15", ui-monospace, monospace;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;

  /* Stone and parchment */
  --bg: #110e0a;
  --bg-deep: #0b0907;
  --surface: rgba(32, 26, 19, .78);
  --surface-solid: #1c1711;
  --surface-raised: #261f17;
  --surface-sunken: rgba(0, 0, 0, .28);
  --hairline: rgba(255, 228, 180, .08);
  --hairline-strong: rgba(255, 228, 180, .14);
  --text: #efe6d6;
  --text-strong: #fbf5ea;
  --muted: #ad9e86;
  --faint: #7d705d;

  /* OSRS accents: one per element */
  --osrs-yellow: #ffff00;
  --heading: #ffd84d;
  --orange: #ff981f;
  --orange-hi: #ffb04f;
  --orange-ink: #1d1203;
  --link: #ffc266;
  --good: #7fd17a;
  --bad: #f0806c;
  --q-done: #3cff3c;
  --q-todo: #ff5a5a;

  /* Mithril */
  --mith: #6fc3d3;
  --mith-deep: #12333d;
  --mith-ink: #b9e6ee;

  /* Parchment */
  --ink: #2b1d0c;
  --ink-link: #6e2b0a;
  --scroll-line: #8a6a3a;

  /* Shape */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --edge: inset 0 1px 0 rgba(255, 236, 200, .06), inset 0 0 0 1px var(--hairline);
  --lift: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -8px rgba(0, 0, 0, .55);
  --lift-hi: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -12px rgba(0, 0, 0, .7);

  /* Spacing: 4, 8, 12, 16, 24, 32, 48, 64, 96 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --fast: 120ms;
  --med: 200ms;
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 170, 60, .05), transparent 70%),
    linear-gradient(rgba(14, 11, 8, .9), rgba(14, 11, 8, .9)),
    var(--bg) url("/rc-static/art/stone.jpg") center top / 560px;
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
img, svg { max-width: 100%; }
p { margin: 0 0 var(--s3); }
h1, h2, h3 { margin: 0 0 var(--s3); font-family: var(--pixel); font-weight: 400; font-synthesis: none; line-height: 1.05; letter-spacing: 0; color: var(--heading); text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 4.5vw, 3.2rem); }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; color: var(--text-strong); }
table, .n, .num, time, .stat b, .kpi b, dd { font-variant-numeric: tabular-nums; }
::selection { color: #000; background: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s3); top: -64px; z-index: 50; padding: 10px 16px; color: #000; background: var(--osrs-yellow); border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s3); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.muted { color: var(--muted); }
.hint { margin: var(--s1) 0 0; color: var(--muted); font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.on { color: var(--good); }
.off { color: var(--bad); }
.up { color: var(--good); }
.down { color: var(--bad); }
.flat { color: var(--muted); }

/* ---------------------------------------------------------------- Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgba(13, 10, 7, .86);
  box-shadow: 0 1px 0 var(--hairline), 0 8px 24px -16px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
.top-inner { display: flex; align-items: center; gap: var(--s5); max-width: 1200px; height: 60px; margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--osrs-yellow); font: 400 1.85rem/1 var(--pixel); text-decoration: none; text-shadow: 2px 2px 0 #000; border-radius: var(--r-sm); }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.nav-main { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav-link, .nav-main a { display: inline-flex; white-space: nowrap; align-items: center; min-height: 40px; padding: 0 12px; color: var(--text); border-radius: var(--r-sm); font-size: .9375rem; text-decoration: none; transition: color var(--fast) ease, background-color var(--fast) ease; }
.nav-main a[aria-current="page"] { color: var(--heading); background: rgba(255, 216, 77, .08); }
.nav-end { display: flex; align-items: center; gap: var(--s2); margin-left: auto; white-space: nowrap; }
.nav-end form { margin: 0; }
.nav-end .link-plain { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; color: var(--text); font-size: .9375rem; text-decoration: none; border-radius: var(--r-sm); }
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 0 8px 0 12px;
  color: var(--muted); background: rgba(255, 255, 255, .03); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--hairline-strong); font: 400 .875rem var(--sans); cursor: pointer;
}
.cmdk-trigger[hidden] { display: none; }
.cmdk-trigger svg { width: 16px; height: 16px; }
.cmdk-trigger kbd, kbd { padding: 1px 6px; color: var(--muted); background: rgba(0, 0, 0, .35); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--hairline-strong); font: 600 .72rem/1.5 var(--mono); }
.nav-play, button.nav-play {
  display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding: 0 18px;
  color: var(--orange-ink); background: linear-gradient(#ffad45, var(--orange)); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .65), inset 0 -2px 0 rgba(130, 60, 0, .45), 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, .4);
  font: 400 1.35rem/1 var(--pixel); text-decoration: none; cursor: pointer;
  transition: transform var(--fast) var(--ease-out), filter var(--fast) ease;
}
button.link { margin: 0; padding: 0; color: inherit; background: none; border: 0; box-shadow: none; font: inherit; cursor: pointer; }
.nav-end button.link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; color: var(--text); border-radius: var(--r-sm); font-size: .9375rem; }

/* Small screens: the links fold into a menu */
.menu { display: none; position: relative; }
.menu > summary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 40px; padding: 0 12px; color: var(--text); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline-strong); font-size: .9375rem; list-style: none; cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-bars { position: relative; width: 16px; height: 10px; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px; transition: transform var(--med) var(--ease-out); }
.menu-bars::before { top: 0; }
.menu-bars::after { bottom: 0; }
.menu[open] .menu-bars::before { transform: translateY(4px) rotate(45deg); }
.menu[open] .menu-bars::after { transform: translateY(-4px) rotate(-45deg); }
.menu-panel {
  position: fixed; left: var(--s3); right: var(--s3); top: calc(64px + env(safe-area-inset-top));
  display: grid; gap: 2px; padding: var(--s2); background: var(--surface-raised); border-radius: var(--r-lg);
  box-shadow: var(--edge), var(--lift-hi); transform-origin: top right;
  animation: pop-in var(--med) var(--ease-out);
}
.menu-panel a, .menu-panel button.link { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--text); border-radius: var(--r-sm); font-size: 1rem; text-decoration: none; width: 100%; text-align: left; }
.menu-panel a[aria-current="page"] { color: var(--heading); background: rgba(255, 216, 77, .08); }
.menu-panel hr { width: 100%; height: 1px; margin: var(--s1) 0; background: var(--hairline); border: 0; }
.menu-panel form { margin: 0; }

@media (max-width: 1080px) {
  .nav-main { display: none; }
  .nav-end .link-plain, .nav-end .logout { display: none; }
  .menu { display: block; }
}
@media (max-width: 560px) {
  .cmdk-trigger .cmdk-label, .cmdk-trigger kbd { display: none; }
  .cmdk-trigger { padding: 0 12px; }
  .brand { font-size: 1.6rem; }
  .top-inner { gap: var(--s3); }
}
@media (max-width: 350px) {
  .brand span { display: none; }
}

/* ---------------------------------------------------------------- Layout */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--s6) var(--gutter-r) var(--s8) var(--gutter); }
.page-head { margin-bottom: var(--s5); }
.page-head p, .market-lead { max-width: 65ch; margin: 0; color: var(--muted); font-size: 1.0625rem; }
.page-title { margin: 0 0 var(--s2); color: var(--heading); font: 400 clamp(2.4rem, 5vw, 3.25rem)/1 var(--pixel); text-shadow: 2px 2px 0 #000; }
.crumbs, .forum-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--s3); color: var(--faint); font-size: .875rem; }
.crumbs a, .forum-crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover, .forum-crumbs a:hover { color: var(--link); }

/* ---------------------------------------------------------------- Surfaces */
.panel { margin-bottom: var(--s4); padding: var(--s5); overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.panel > h2:first-child { margin-bottom: var(--s4); }
.panel h2 { font-size: 1.6rem; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--s4); align-items: start; }
.grid > .panel { margin-bottom: 0; }
main > .grid { margin-bottom: var(--s4); }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); min-height: 52px; padding: var(--s3) 0; border-bottom: 1px solid var(--hairline); }
.row:last-child { border-bottom: 0; }
.row button { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: var(--s4); background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.stat b { color: var(--text-strong); font: 600 1.5rem/1.2 var(--sans); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .8125rem; }

/* Notices */
.notice, .error { display: flex; gap: 10px; align-items: flex-start; max-width: 720px; margin: 0 0 var(--s4); padding: 12px 16px; border-radius: var(--r); box-shadow: var(--edge); font-size: .9375rem; }
.notice { color: #d6f2d2; background: rgba(60, 120, 55, .18); box-shadow: inset 0 0 0 1px rgba(127, 209, 122, .28); }
.error { color: #ffd9d0; background: rgba(150, 50, 35, .2); box-shadow: inset 0 0 0 1px rgba(240, 128, 108, .3); }
body.auth .notice, body.auth .error { margin-left: auto; margin-right: auto; max-width: 440px; }
.simulated { box-shadow: inset 0 0 0 1px rgba(255, 216, 77, .45), var(--lift); }
.simulated h2 { color: var(--heading); }

/* ---------------------------------------------------------------- Buttons and inputs */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; margin-top: var(--s4); padding: 0 18px;
  color: var(--orange-ink); background: linear-gradient(#ffad45, var(--orange)); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .6), inset 0 -2px 0 rgba(130, 60, 0, .4), 0 0 0 1px rgba(0, 0, 0, .7);
  font: 600 .9375rem/1 var(--sans); text-decoration: none; cursor: pointer; user-select: none;
  transition: transform var(--fast) var(--ease-out), filter var(--fast) ease, background-color var(--fast) ease, color var(--fast) ease;
}
button:disabled { opacity: .5; cursor: default; }
button.ghost, .button.ghost {
  color: var(--text); background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, .05), inset 0 0 0 1px var(--hairline-strong);
}
.button.small, button.small { min-height: 34px; margin: 0; padding: 0 12px; font-size: .8125rem; }
button.link { min-height: 0; margin: 0; padding: 0; color: inherit; background: none; box-shadow: none; font: inherit; }
form.inline { display: inline; margin: 0; }
button:active:not(:disabled), .button:active, .play:active, .btn-line:active, .nav-play:active, .cmdk-trigger:active, .menu > summary:active { transform: scale(.97); }
button.link:active { transform: none; }

label { display: block; margin: var(--s4) 0 6px; color: var(--text-strong); font-size: .875rem; font-weight: 600; }
label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  color: var(--text-strong); background: rgba(0, 0, 0, .35); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--hairline-strong);
  font: 400 1rem/1.4 var(--sans);
  transition: box-shadow var(--fast) ease;
}
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--orange), 0 0 0 3px rgba(255, 152, 31, .22); }
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="hidden"] { display: none; }

/* Big OSRS-style buttons */
.play, button.play {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; margin: 0; padding: 0 28px;
  color: var(--orange-ink); background: linear-gradient(#ffb350, var(--orange) 60%, #f08a12); border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, .75), inset 0 -3px 0 rgba(130, 60, 0, .45), 0 0 0 2px #000, 0 8px 22px -6px rgba(255, 140, 20, .45);
  font: 400 1.65rem/1 var(--pixel); text-decoration: none; cursor: pointer;
  transition: transform var(--fast) var(--ease-out), filter var(--fast) ease;
}
.btn-line {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  color: var(--text-strong); background: rgba(14, 11, 8, .55); border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, .08), inset 0 0 0 1px rgba(255, 236, 200, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 400 1.55rem/1 var(--pixel); text-decoration: none;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast) ease, box-shadow var(--fast) ease;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s5); }
.actions form { margin: 0; }

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover, .nav-main a:hover, .nav-end .link-plain:hover, .nav-end button.link:hover { color: var(--text-strong); background: rgba(255, 255, 255, .05); }
  .cmdk-trigger:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 228, 180, .24); }
  .menu-panel a:hover, .menu-panel button.link:hover { background: rgba(255, 255, 255, .05); }
  button:hover:not(:disabled), .button:hover, .nav-play:hover, .play:hover { filter: brightness(1.08); }
  button.ghost:hover, .button.ghost:hover { filter: none; background: rgba(255, 255, 255, .08); }
  button.link:hover { filter: none; color: var(--link); }
  .btn-line:hover { background: rgba(30, 24, 17, .75); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .1), inset 0 0 0 1px rgba(255, 236, 200, .36); }
  a:hover { color: var(--orange-hi); }
}

/* ---------------------------------------------------------------- Footer */
footer { margin-top: auto; padding: var(--s7) var(--gutter-r) calc(var(--s6) + env(safe-area-inset-bottom)) var(--gutter); color: var(--muted); background: var(--bg-deep); box-shadow: inset 0 1px 0 var(--hairline); font-size: .875rem; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: var(--s6); max-width: 1120px; margin: 0 auto; }
.foot-brand strong { display: inline-flex; align-items: center; gap: 8px; color: var(--osrs-yellow); font: 400 1.6rem/1 var(--pixel); text-shadow: 2px 2px 0 #000; }
.foot-brand strong img { image-rendering: pixelated; }
.foot-brand p { max-width: 42ch; margin: var(--s3) 0 0; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.foot-cols h2 { margin: 0 0 var(--s2); color: var(--text-strong); font: 600 .8125rem var(--sans); letter-spacing: .02em; }
.foot-cols ul { margin: 0; padding: 0; list-style: none; }
.foot-cols a { display: inline-flex; min-height: 32px; align-items: center; color: var(--muted); text-decoration: none; }
.foot-cols a:hover { color: var(--text-strong); }
@media (max-width: 760px) {
  .foot-inner { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols a { min-height: 40px; }
}

/* ---------------------------------------------------------------- Home */
body.landing main { max-width: 1200px; padding-top: 0; }
.landing-hero { position: relative; display: flex; align-items: flex-end; min-height: min(80vh, 720px); padding: var(--s9) var(--gutter-r) var(--s8) var(--gutter); background: #0e0b08 center 30% / cover no-repeat; }
.landing-hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; }
.landing-hero h1 { max-width: 13em; margin: 0 0 var(--s4); color: var(--osrs-yellow); font: 400 clamp(3rem, 7.2vw, 5.75rem)/.92 var(--pixel); text-shadow: 3px 3px 0 #000, 0 0 30px rgba(0, 0, 0, .6); }
.landing-hero .lead { max-width: 34em; margin: 0; color: #f4ecdf; font-size: 1.1875rem; line-height: 1.5; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--s4); padding: 6px 12px 6px 10px; color: #eadfcb; background: rgba(8, 6, 4, .62); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 236, 200, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 600 .8125rem var(--sans); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot.on { color: var(--q-done); box-shadow: 0 0 0 3px rgba(60, 255, 60, .18); }
.dot.off { color: var(--q-todo); }

.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: calc(var(--s7) * -1) 0 var(--s8); position: relative; overflow: hidden; background: var(--hairline); border-radius: var(--r-lg); box-shadow: var(--edge), var(--lift-hi); }
.hero-stats > div { padding: var(--s5); background: var(--surface-solid); }
.hero-stats b { display: block; color: var(--text-strong); font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats b small { margin-left: 4px; color: var(--mith); font-size: .55em; letter-spacing: 0; }
.hero-stats > div > span { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; }

.section { margin-bottom: var(--s8); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
.section-head h2, .section h2.big { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); text-shadow: 2px 2px 0 #000; }
.section-head p { max-width: 60ch; margin: var(--s2) 0 0; color: var(--muted); font-size: 1.0625rem; }
.section-head .more { color: var(--link); font-weight: 600; text-decoration: none; white-space: nowrap; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin: 0 0 var(--s8); }
.gallery figure { position: relative; margin: 0; overflow: hidden; background: #000; border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 280ms var(--ease-out); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s5) var(--s3) var(--s2); color: var(--orange); background: linear-gradient(transparent, rgba(0, 0, 0, .85)); font: 400 1.2rem/1 var(--pixel); text-shadow: 1px 1px 0 #000; }
@media (hover: hover) and (pointer: fine) { .gallery figure:hover img { transform: scale(1.03); } }

.pvp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.mode { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--edge), var(--lift); }
.mode-art { position: relative; aspect-ratio: 21 / 9; background: #000 center / cover no-repeat; }
.mode-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(28, 23, 17, .95)); }
.mode-body { position: relative; padding: var(--s5); }
.mode-body > .item-icon { width: 44px; height: 44px; margin-bottom: var(--s3); padding: 4px; background: rgba(0, 0, 0, .3); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline); }
.mode h3 { margin-bottom: var(--s2); color: var(--heading); font-size: 2rem; text-shadow: 2px 2px 0 #000; }
.mode p { max-width: 60ch; color: #ddd2bf; }
.facts { display: grid; gap: 0; margin: var(--s4) 0 0; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: var(--s4); padding: 10px 0; border-top: 1px solid var(--hairline); font-size: .9375rem; }
.facts li span { color: var(--muted); }
.facts li b { color: var(--text-strong); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.feed { margin-top: var(--s4); padding: var(--s4) var(--s5); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--edge), var(--lift); }
.feed h3 { margin: 0 0 var(--s2); font: 600 .875rem var(--sans); color: var(--muted); letter-spacing: .01em; }
.feed ol { margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); min-height: 44px; border-top: 1px solid var(--hairline); font-size: .9375rem; }
.feed li:first-child { border-top: 0; }
.feed .tag { padding: 2px 8px; color: var(--orange-hi); background: rgba(255, 152, 31, .1); border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.feed .tag.bh { color: var(--bad); background: rgba(240, 128, 108, .1); }
.feed .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .who a { color: var(--text-strong); text-decoration: none; font-weight: 600; }
.feed .who span { color: var(--muted); }
.feed .amt { color: var(--mith-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed time { color: var(--faint); font-size: .8125rem; white-space: nowrap; }

.coin { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s6); padding: var(--s6); background: radial-gradient(600px 300px at 0% 0%, rgba(111, 195, 211, .1), transparent 70%), linear-gradient(160deg, #18272a, #13110d 60%); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 rgba(185, 230, 238, .08), inset 0 0 0 1px rgba(111, 195, 211, .14), var(--lift-hi); }
.coin-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.coin-head img { width: 56px; height: 56px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.coin-head h2 { margin: 0; color: var(--mith-ink); font-size: clamp(2.2rem, 4vw, 3rem); text-shadow: 2px 2px 0 #000; }
.coin-head p { margin: 2px 0 0; color: var(--mith); font: 600 .875rem var(--mono); }
.coin-text p { max-width: 60ch; color: #dbe3df; font-size: 1.0625rem; }
.coin-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s4); }
.coin-links a { color: var(--mith-ink); font-weight: 600; }
.coin-facts { align-self: start; margin: 0; padding: var(--s2) var(--s5); background: rgba(0, 0, 0, .3); border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(111, 195, 211, .12); }
.coin-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 11px 0; border-top: 1px solid rgba(185, 230, 238, .08); }
.coin-facts div:first-child { border-top: 0; }
.coin-facts dt { color: #9fb4b4; font-size: .9375rem; }
.coin-facts dd { margin: 0; color: var(--text-strong); font-weight: 600; text-align: right; }
.coin-facts a { color: var(--mith-ink); }

.ranks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); margin: var(--s5) 0 0; padding: 0; list-style: none; }
.ranks li { padding: var(--s3); background: rgba(0, 0, 0, .25); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline); }
.ranks .gem { margin-bottom: 6px; }
.ranks b { display: block; color: var(--text-strong); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.card { padding: var(--s5); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--edge), var(--lift); }
.card h3 { margin-bottom: var(--s3); color: var(--heading); font-size: 1.75rem; text-shadow: 2px 2px 0 #000; }
.card > p { color: #ddd2bf; }
.toplist { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.toplist li { display: flex; align-items: center; gap: var(--s3); min-height: 44px; border-top: 1px solid var(--hairline); counter-increment: rank; }
.toplist li:first-child { border-top: 0; }
.toplist li::before { content: counter(rank); width: 1.5em; color: var(--faint); font: 600 .875rem var(--mono); text-align: right; }
.toplist a { flex: 1; color: var(--text-strong); font-weight: 600; text-decoration: none; }
.toplist small { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.card-more { margin: var(--s3) 0 0; font-weight: 600; }
.card-more a { text-decoration: none; }
.card-more a::after { content: " →"; }
.ge-shot { display: block; margin: 0 0 var(--s4); overflow: hidden; border-radius: var(--r); box-shadow: var(--edge); }
.ge-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }

.closing { padding: var(--s8) var(--s6); background: #0e0b08 center / cover no-repeat; border-radius: var(--r-lg); box-shadow: var(--edge), var(--lift-hi); }
.closing h2 { margin: 0; color: var(--osrs-yellow); font-size: clamp(2.4rem, 5vw, 3.5rem); text-shadow: 3px 3px 0 #000; }
.closing p { max-width: 46ch; margin: var(--s3) 0 0; color: #eee4d4; font-size: 1.0625rem; text-shadow: 0 1px 2px #000; }
.closing p a { color: var(--link); }

@media (max-width: 960px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pvp, .duo, .coin { grid-template-columns: 1fr; }
  .ranks { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
@media (max-width: 640px) {
  .landing-hero { min-height: min(78vh, 640px); padding-top: var(--s8); padding-bottom: var(--s8); }
  .landing-hero .lead { font-size: 1.0625rem; }
  .actions > * { flex: 1 1 100%; }
  .actions .play, .actions .btn-line { width: 100%; }
  .hero-stats > div { padding: var(--s4); }
  .coin { padding: var(--s5); }
  .closing { padding: var(--s7) var(--s5); }
  .feed { padding: var(--s3) var(--s4); }
  .feed li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .feed time { display: none; }
  .mode-body, .card { padding-left: var(--s4); padding-right: var(--s4); }
}

/* ---------------------------------------------------------------- Auth */
body.auth main { display: grid; align-content: center; padding-top: var(--s7); }
body.auth .panel { width: 100%; padding: var(--s6); background: linear-gradient(180deg, rgba(48, 39, 29, .9), rgba(28, 23, 17, .92)); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .08), inset 0 0 0 1px var(--hairline-strong), var(--lift-hi); }
body.auth .panel h1 { margin-bottom: var(--s3); color: var(--osrs-yellow); font-size: 2.5rem; text-shadow: 2px 2px 0 #000; }
body.auth .panel form button { width: 100%; min-height: 48px; margin-top: var(--s5); font: 400 1.45rem/1 var(--pixel); }
body.auth .panel .hint { color: #cdbfa8; }
.auth-lead { margin: 0 0 var(--s5); color: var(--muted); }
body.auth .panel h1 + form { margin-top: var(--s5); }
.auth-foot { margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--hairline); color: var(--muted); font-size: .9375rem; }
.auth-foot p { margin: 0 0 6px; }
@media (max-width: 480px) { body.auth .panel { padding: var(--s5) var(--s4); } body.auth main { padding-top: var(--s5); } }

/* ---------------------------------------------------------------- Parchment */
.scroll {
  padding: var(--s5) var(--s6);
  overflow-x: auto;
  color: var(--ink);
  background: #d9b676 url("/rc-static/art/parchment.jpg") center / 520px;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 2px rgba(91, 65, 32, .7), inset 0 0 48px rgba(90, 55, 15, .4), 0 0 0 1px #2b1d0c, var(--lift-hi);
}
.scroll h2 { margin-bottom: var(--s3); color: var(--ink); font: 700 1.5rem/1.2 var(--serif); text-align: center; text-shadow: none; letter-spacing: -.01em; }
.scroll a { color: var(--ink-link); font-weight: 600; }
.scroll .hint, .scroll small { color: #5a4325; }
.scroll-note { margin: var(--s3) 0 0; font-size: .875rem; text-align: center; color: #5a4325; }
.scroll table { font-family: var(--serif); }
.scroll th { color: var(--ink); font-size: .9375rem; font-weight: 700; border-bottom: 2px solid var(--scroll-line); }
.scroll td { border-bottom: 1px solid rgba(90, 60, 25, .3); }
.scroll tbody tr:hover > td { background-color: rgba(120, 80, 30, .12); }
/* Georgia only has old-style figures; numbers read better in Inter. */
.scroll td.n { font-family: var(--sans); font-size: .9375rem; }

/* Hiscores */
.hiscore-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.hiscore-side { position: sticky; top: 76px; display: grid; gap: var(--s3); }
.skill-menu { display: grid; gap: 1px; padding: var(--s2); background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.skill-menu a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; color: var(--text); border-radius: var(--r-sm); font-size: .875rem; text-decoration: none; transition: background-color var(--fast) ease, color var(--fast) ease; }
.skill-menu a.active { color: var(--orange-ink); background: var(--orange); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .skill-menu a:not(.active):hover { color: var(--text-strong); background: rgba(255, 255, 255, .05); } }
.skill-icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; margin-right: 8px; image-rendering: pixelated; }
.skill-menu .skill-icon { margin: 0; }
.hiscore-search { padding: var(--s4); background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.hiscore-search label { margin-top: 0; }
.hiscore-search button { width: 100%; margin-top: var(--s2); }
table.hiscores { font-family: var(--serif); }
.hiscores td.rank-1 { font-weight: 700; }
@media (max-width: 760px) {
  .hiscore-layout { grid-template-columns: 1fr; }
  .hiscore-side { position: static; }
  .skill-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-menu a { min-height: 40px; }
  .scroll { padding: var(--s4) var(--s3); }
}

/* ---------------------------------------------------------------- Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--hairline); }
th { color: var(--muted); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
td.n, th.n { text-align: right; }
.panel tbody tr:last-child td { border-bottom: 0; }
.qr { display: inline-block; padding: var(--s3); background: #fff; border-radius: var(--r-sm); line-height: 0; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--s4); margin: var(--s4) 0; padding: var(--s4); list-style: none; background: rgba(0, 0, 0, .3); border-radius: var(--r-sm); font: 600 1rem var(--mono); }

/* ---------------------------------------------------------------- Mithril account page */
.deposit-address { padding: var(--s3); color: var(--mith-ink); background: rgba(18, 51, 61, .45); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px rgba(111, 195, 211, .25); }
td.on { color: var(--q-done); }
td.off { color: var(--q-todo); }
details > summary { cursor: pointer; color: var(--muted); }
details.manual-deposit { margin-top: var(--s4); }
details.manual-deposit > summary { display: inline-flex; align-items: center; min-height: 40px; }

.economy { margin-bottom: var(--s5); padding: var(--s5); background: linear-gradient(160deg, rgba(24, 39, 42, .9), rgba(19, 17, 13, .9)); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 rgba(185, 230, 238, .08), inset 0 0 0 1px rgba(111, 195, 211, .14), var(--lift); }
.economy h2 { margin-bottom: var(--s4); color: var(--mith-ink); font-size: 1.85rem; }
.economy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: rgba(111, 195, 211, .1); border-radius: var(--r); }
.economy-grid div { padding: var(--s4); background: #121a1b; }
.economy-grid b { display: block; color: var(--text-strong); font: 600 1.3rem/1.2 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.economy-grid span { display: block; margin-top: 2px; color: var(--text); font-size: .875rem; }
.economy-grid small { color: var(--muted); font-size: .8125rem; }
.budget-bar { height: 6px; margin: var(--s4) 0 var(--s2); overflow: hidden; background: rgba(111, 195, 211, .12); border-radius: 3px; }
.budget-bar span { display: block; height: 100%; background: var(--mith); border-radius: 3px; }
@media (max-width: 760px) { .economy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .economy-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Grand Exchange */
.market-search { display: flex; gap: var(--s2); max-width: 560px; margin: 0 0 var(--s5); }
.market-search input { flex: 1; min-width: 0; }
.market-search button { margin: 0; min-height: 44px; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px var(--s4); margin: 0; padding: 0; list-style: none; }
.search-results li { min-height: 40px; display: flex; align-items: center; }
.market-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.market-columns > * { min-width: 0; }
.market-columns .panel, .market-columns .scroll { margin-bottom: var(--s4); }
.market-table td { vertical-align: middle; }
.item-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); text-decoration: none; }
.item-link span { min-width: 0; }
@media (hover: hover) and (pointer: fine) { .item-link:hover span { color: var(--link); text-decoration: underline; } }
.item-icon { width: 32px; height: 32px; max-width: none; flex: none; object-fit: contain; image-rendering: pixelated; }
.item-head { display: flex; align-items: center; gap: var(--s3); }
.item-head .item-icon { width: 48px; height: 48px; padding: 4px; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge); }
.item-head .page-title { margin: 0; }
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark.up path { stroke: var(--good); }
.spark.down path { stroke: var(--bad); }
.spark-none { color: var(--faint); font-size: .8125rem; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: rgba(255, 228, 180, .08); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--mono); }
.chart .area { fill: var(--orange); opacity: .1; }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--orange); }
.chart .bar { fill: var(--muted); opacity: .45; }
.chart .guide { stroke: var(--heading); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.chart .guide-label { fill: var(--heading); font: 11px var(--mono); }
.chart + .hint, .chart-empty + .hint { margin-top: var(--s3); }
.chart-empty { padding: var(--s7) var(--s3); text-align: center; color: var(--muted); background: rgba(0, 0, 0, .2); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline); }
.depth { position: relative; min-width: 120px; }
.depth-bar { position: absolute; inset: 6px auto 6px 0; border-radius: 3px; opacity: .22; }
.depth-bar.sell { background: var(--bad); }
.depth-bar.buy { background: var(--good); }
.depth-n { position: relative; padding-left: 8px; font-variant-numeric: tabular-nums; }
.market-updated { margin-top: var(--s4); text-align: center; color: var(--faint); }
.tape-more { margin: var(--s2) 0 0; text-align: right; }
@media (max-width: 760px) {
  .market-columns { grid-template-columns: 1fr; }
  .market-table th:nth-child(6), .market-table td:nth-child(6) { display: none; }
  .panel { padding: var(--s4); }
}
@media (max-width: 520px) {
  .market-table th:nth-child(5), .market-table td:nth-child(5) { display: none; }
  .market-table th, .market-table td { padding-left: 8px; padding-right: 8px; }
  .market-table .item-icon { width: 24px; height: 24px; }
}

/* ---------------------------------------------------------------- Drop tables */
.drop-list { margin: 0; padding: 0; list-style: none; }
.drop-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 40px; padding: 8px 0; border-bottom: 1px solid rgba(90, 60, 25, .3); }
.drop-list li:last-child { border-bottom: 0; }
.drop-list small, .drop-columns small { color: #5a4325; }
.drop-columns { columns: 3 220px; column-gap: var(--s5); margin: 0; padding: 0; list-style: none; }
.drop-columns li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 5px 0; break-inside: avoid; }
.panel .drop-columns a { color: var(--link); }
.panel .drop-columns small { color: var(--muted); }
.drop-scroll { margin-bottom: var(--s5); }
.drop-scroll h2 { margin-bottom: var(--s3); }
.drop-scroll td { vertical-align: middle; }
.drop-scroll .item-link { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .drop-scroll .item-link:hover span { color: var(--ink-link); } }
.drop-table .icon-cell { width: 48px; padding-right: 0; }
.drop-table .odds span { display: block; }
.drop-table tr.section th { padding-top: var(--s4); color: #7a2d07; font-size: .875rem; }
.drop-table tr.nothing td { color: #5a4325; }
.drop-table td.odds { color: #000; font-weight: 700; border-bottom-color: rgba(0, 0, 0, .2); }
.drop-table td.odds small { display: block; color: rgba(0, 0, 0, .62); font-weight: 400; font-size: .78rem; }
.rarity-always { background: #afeeee; }
.rarity-common { background: #56e156; }
.rarity-uncommon { background: #ffed4c; }
.rarity-rare { background: #ff863c; }
.rarity-very-rare { background: #ff6262; }
.rarity-varies { background: #d9d0bd; }
.rarity-key { display: inline-flex; flex-wrap: wrap; margin: 0 0 var(--s4); padding: 0; overflow: hidden; list-style: none; border-radius: var(--r-sm); box-shadow: 0 0 0 1px #000, var(--lift); }
.rarity-key li { padding: 4px 12px; color: #000; font: 700 .8125rem var(--serif); }
.drop-table .boost { display: inline-block; margin-left: 4px; padding: 0 5px; color: #e8f5c8; background: #2f5d1f; border-radius: 4px; font: 700 .75em var(--sans); }
.drop-table td.n small.osrs { display: block; color: #6b5535; font-size: .75em; }
.drops-meta { margin-top: var(--s4); color: var(--faint); font-size: .875rem; }
@media (max-width: 640px) {
  .drop-table .icon-cell { width: 30px; padding-left: 2px; }
  .drop-table .icon-cell .item-icon { width: 24px; height: 24px; }
  .drop-table th, .drop-table td { padding: 8px 5px; font-size: .875rem; }
}

/* ---------------------------------------------------------------- Forums */
.forum-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
.forum-head .page-title { margin: 0; }
.forum-head .button { margin: 0; font: 400 1.35rem/1 var(--pixel); }
.forum-intro { max-width: 65ch; margin: var(--s2) 0 0; color: var(--muted); }
.thread-title { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.forum-box { margin-bottom: var(--s5); overflow: hidden; overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); }
.forum-table th { padding: 12px 16px; color: var(--orange); background: rgba(255, 152, 31, .05); font: 400 1.35rem/1 var(--pixel); letter-spacing: 0; border-bottom: 1px solid var(--hairline-strong); }
.forum-table th.n, .forum-table th.last { color: var(--muted); font: 600 .8125rem var(--sans); }
.forum-table td { padding: 14px 16px; vertical-align: middle; }
.forum-table tbody tr { transition: background-color var(--fast) ease; }
@media (hover: hover) and (pointer: fine) { .forum-table tbody tr:hover { background: rgba(255, 255, 255, .025); } }
.forum-table tr.pinned { background: rgba(255, 152, 31, .05); }
.forum-table td.icon { width: 56px; padding-right: 0; text-align: center; }
.forum-table td.icon .item-icon { padding: 4px; width: 40px; height: 40px; background: rgba(0, 0, 0, .3); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline); }
.forum-table td p { max-width: 60ch; margin: 2px 0 0; color: var(--muted); font-size: .875rem; }
.forum-table td.last { width: 240px; font-size: .8125rem; }
.forum-table td.last a { display: block; max-width: 220px; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; }
.forum-table td.last span { color: var(--muted); }
.forum-table td.n { width: 90px; color: var(--muted); }
.forum-table .empty { padding: var(--s7); text-align: center; color: var(--muted); }
.forum-name { color: var(--text-strong); font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .forum-name:hover { color: var(--heading); } }
.forum-tag { display: inline-block; margin-right: 4px; padding: 1px 7px; color: var(--orange-ink); background: var(--orange); border-radius: 4px; font: 600 .6875rem/1.5 var(--sans); vertical-align: 2px; }
.forum-tag.locked { color: #fff; background: #8a3412; }
.forum-pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin: var(--s3) 0; }
.forum-pager a, .forum-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; color: var(--text); background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--edge); font-size: .875rem; text-decoration: none; font-variant-numeric: tabular-nums; }
.forum-pager .current { color: var(--orange-ink); background: var(--orange); font-weight: 600; }
.forum-posts { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.forum-post { display: grid; grid-template-columns: 180px minmax(0, 1fr); overflow: hidden; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge), var(--lift); scroll-margin-top: 80px; }
.forum-post.staff { box-shadow: inset 0 0 0 1px rgba(245, 196, 0, .35), var(--lift); }
.forum-author { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); color: var(--muted); background: rgba(0, 0, 0, .2); box-shadow: inset -1px 0 0 var(--hairline); font-size: .8125rem; }
.author-name { color: var(--heading); font-size: .9375rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.author-name:hover { text-decoration: underline; }
.author-name .crown { margin-right: 4px; vertical-align: -1px; image-rendering: pixelated; }
.author-rank { color: #f5c400; font-weight: 600; }
.forum-body { min-width: 0; padding: var(--s3) var(--s5) var(--s5); }
.forum-body header { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 36px; margin-bottom: var(--s3); color: var(--faint); border-bottom: 1px solid var(--hairline); font-size: .8125rem; }
.forum-body header a, .forum-body header button.link { color: var(--faint); font-size: .8125rem; text-decoration: none; }
.forum-body header button.link:hover { color: var(--bad); }
.forum-text { max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-form { padding: var(--s5); }
.forum-form h2 { color: var(--heading); font-size: 1.75rem; }
.forum-form button { font: 400 1.35rem/1 var(--pixel); }
.forum-mod { display: flex; flex-wrap: wrap; gap: 6px; }
.forum-mod button { margin: 0; }
.forum-locked, .forum-blocked { max-width: 720px; padding: 12px 16px; color: var(--muted); background: var(--surface); border-radius: var(--r); box-shadow: var(--edge); }
@media (max-width: 760px) {
  .forum-table td.last, .forum-table th.last { display: none; }
  .forum-table td, .forum-table th { padding-left: 12px; padding-right: 12px; }
  .forum-table td.n { width: auto; }
  .forum-post { grid-template-columns: 1fr; }
  .forum-author { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px var(--s3); padding: var(--s3) var(--s4); box-shadow: inset 0 -1px 0 var(--hairline); }
  .forum-body { padding: var(--s3) var(--s4) var(--s4); }
}
@media (max-width: 520px) {
  .forum-table td.icon { width: 40px; padding-left: 10px; }
  .forum-table td.icon .item-icon { width: 32px; height: 32px; padding: 2px; }
  .forum-table td, .forum-table th { padding-left: 8px; padding-right: 8px; }
}

/* ---------------------------------------------------------------- Account */
.account-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); }
.account-head h1 { margin: 0; }
.admin-link { margin: 0; }
.admin-link .button { margin: 0; }
.panel form h3 { margin-top: 0; }
.panel > form:not(.inline) { max-width: 480px; margin-top: var(--s4); }
.panel > h2 + form:not(.inline), .panel.narrow > form { margin-top: 0; }
.panel .grid { margin-top: var(--s4); }
.panel .grid form { padding: var(--s4); background: rgba(0, 0, 0, .18); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--hairline); }
.device { display: block; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Admin */
.admin-body main { max-width: 1240px; }
.admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.admin > *, .admin-cols > * { min-width: 0; }
.admin .panel { margin-bottom: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.admin-head h1 { margin: 0 0 var(--s1); color: var(--osrs-yellow); font-size: clamp(2.2rem, 4vw, 2.8rem); text-shadow: 2px 2px 0 #000; }
.admin-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; background: var(--surface); border-radius: 999px; box-shadow: var(--edge); font-size: .875rem; font-weight: 600; }
.admin-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px rgba(240, 128, 108, .2); }
.admin-status.up i { background: var(--good); box-shadow: 0 0 0 3px rgba(127, 209, 122, .2); }
.admin-nav { position: sticky; top: 68px; z-index: 5; display: flex; gap: 2px; overflow-x: auto; padding: 6px; background: rgba(20, 16, 12, .92); border-radius: var(--r); box-shadow: var(--edge), var(--lift); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); scrollbar-width: none; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; color: var(--muted); border-radius: var(--r-sm); font-size: .875rem; text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .admin-nav a:hover { color: var(--text-strong); background: rgba(255, 255, 255, .05); } }
.admin section { scroll-margin-top: 130px; }
.admin h2 { color: var(--heading); font-size: 1.85rem; }
.admin h3 { margin-top: var(--s5); color: var(--text-strong); font: 600 .9375rem var(--sans); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s2); margin: var(--s2) 0 var(--s4); }
.kpis.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); background: rgba(0, 0, 0, .22); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--hairline); }
.kpi::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: transparent; }
.kpi span { color: var(--muted); font-size: .75rem; font-weight: 600; }
.kpi b { color: var(--text-strong); font: 600 1.35rem/1.2 var(--sans); letter-spacing: -.02em; }
.kpi b small { font-size: .6em; letter-spacing: 0; }
.kpi small { color: var(--muted); font-size: .75rem; }
.kpi.good::before { background: var(--good); }
.kpi.good b { color: var(--good); }
.kpi.bad::before { background: var(--bad); }
.kpi.bad b { color: var(--bad); }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: var(--s5); }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; font-size: .875rem; }
.admin-table th { padding: 8px; white-space: nowrap; }
.admin-table td { padding: 8px; vertical-align: top; }
@media (hover: hover) and (pointer: fine) { .admin-table tr:hover td { background: rgba(255, 152, 31, .04); } }
.admin-table .n { text-align: right; white-space: nowrap; }
.admin .mono { font-size: .8125rem; }
.admin-chart { margin: var(--s1) 0 var(--s3); }
.admin-chart svg { display: block; width: 100%; height: auto; max-height: 260px; }
.admin-chart .grid { stroke: rgba(255, 228, 180, .08); stroke-width: 1; }
.admin-chart .axis { fill: var(--muted); font: 11px var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 6px var(--s4); margin-top: var(--s2); color: var(--muted); font-size: .8125rem; }
.legend i, .share-label i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.share-bars { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.share-bars li { display: grid; grid-template-columns: 150px 1fr 130px; align-items: center; gap: var(--s3); font-size: .875rem; }
.share-track { height: 8px; overflow: hidden; background: rgba(0, 0, 0, .35); border-radius: 4px; }
.share-track span { display: block; height: 100%; border-radius: 4px; }
.share-value { text-align: right; font-variant-numeric: tabular-nums; }
/* Series colours: the same order in every chart, legend and share bar. */
.s0 { fill: #e9a83a; background: #e9a83a; }
.s1 { fill: #6fc3d3; background: #6fc3d3; }
.s2 { fill: #e77fae; background: #e77fae; }
.s3 { fill: #7fd17a; background: #7fd17a; }
.s4 { fill: #a991f0; background: #a991f0; }
.s5 { fill: #f0806c; background: #f0806c; }
.s6 { fill: #8fb3ff; background: #8fb3ff; }
.gem { display: inline-block; padding: 1px 8px; color: #111; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.gem-sapphire { color: #fff; background: #3f68e0; }
.gem-emerald { background: #2ecc71; }
.gem-ruby { color: #fff; background: #d8412f; }
.gem-diamond { background: #e8f4ff; }
.gem-onyx { color: #fff; background: #262626; box-shadow: inset 0 0 0 1px #6c6c6c; }
.admin details summary { display: inline-flex; align-items: center; min-height: 40px; margin-top: var(--s3); }
.admin .chart-empty { padding: var(--s5) 0; }
@media (max-width: 640px) {
  .share-bars li { grid-template-columns: 1fr; gap: 4px; }
  .share-value { text-align: left; }
  .admin-nav { top: 64px; }
}

/* ---------------------------------------------------------------- Command palette */
.cmdk { width: min(640px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 120px)); margin: min(12vh, 120px) auto auto; padding: 0; overflow: hidden; color: var(--text); background: var(--surface-raised); border: 0; border-radius: var(--r-lg); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .08), inset 0 0 0 1px var(--hairline-strong), 0 24px 80px -12px rgba(0, 0, 0, .85); }
.cmdk[open] { display: flex; flex-direction: column; animation: pop-in 180ms var(--ease-out); }
.cmdk.closing { animation: pop-out 120ms ease-in forwards; }
.cmdk::backdrop { background: rgba(5, 4, 2, .6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade-in 180ms var(--ease-out); }
.cmdk.closing::backdrop { animation: fade-out 120ms ease-in forwards; }
.cmdk-search { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); box-shadow: inset 0 -1px 0 var(--hairline-strong); }
.cmdk-search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.cmdk-search input { min-height: 56px; padding: 0; background: none; box-shadow: none; font-size: 1.0625rem; }
.cmdk-search input:focus-visible { box-shadow: none; }
.cmdk-search kbd { flex: none; }
.cmdk-list { flex: 1; min-height: 0; margin: 0; padding: var(--s2); overflow-y: auto; overscroll-behavior: contain; scroll-padding: var(--s2); }
.cmdk-group { margin: 0; padding: var(--s2) 10px 4px; color: var(--faint); font-size: .75rem; font-weight: 600; }
.cmdk-item { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 10px; color: var(--text); border-radius: var(--r-sm); text-decoration: none; cursor: pointer; }
.cmdk-item[aria-selected="true"] { color: var(--text-strong); background: rgba(255, 152, 31, .12); box-shadow: inset 0 0 0 1px rgba(255, 152, 31, .2); }
.cmdk-item .ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--muted); }
.cmdk-item .ico img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.cmdk-item .ico svg { width: 18px; height: 18px; }
.cmdk-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .meta { color: var(--faint); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmdk-empty, .cmdk-loading { padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: .9375rem; }
.cmdk-foot { display: flex; gap: var(--s4); padding: 10px var(--s4); color: var(--faint); box-shadow: inset 0 1px 0 var(--hairline); font-size: .75rem; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .cmdk { margin-top: var(--s4); } .cmdk-foot { display: none; } }

/* ---------------------------------------------------------------- Toasts */
.toaster { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: var(--s2); width: min(380px, calc(100vw - 32px)); margin: 0; padding: 0; list-style: none; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: var(--s3); padding: 14px 14px 14px 16px; color: var(--text-strong); background: var(--surface-raised); border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .08), inset 0 0 0 1px var(--hairline-strong), 0 16px 40px -10px rgba(0, 0, 0, .8); font-size: .9375rem; pointer-events: auto; animation: toast-in 260ms var(--ease-out); }
.toast.leaving { animation: toast-out 160ms ease-in forwards; }
.toast .t-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: 1px; color: #0b1a0a; background: var(--good); border-radius: 50%; }
.toast .t-icon svg { width: 12px; height: 12px; }
.toast p { flex: 1; margin: 0; line-height: 1.45; }
.toast button { display: grid; place-items: center; width: 28px; min-height: 28px; height: 28px; margin: -4px -4px 0 0; padding: 0; color: var(--muted); background: none; box-shadow: none; border-radius: var(--r-sm); }
@media (hover: hover) and (pointer: fine) { .toast button:hover { color: var(--text-strong); background: rgba(255, 255, 255, .06); filter: none; } }
@media (max-width: 560px) { .toaster { left: 16px; right: 16px; width: auto; bottom: max(16px, env(safe-area-inset-bottom)); } }

/* ---------------------------------------------------------------- Animated numbers */
.flow { display: inline-flex; white-space: nowrap; }
.flow-d { display: inline-block; height: 1.1em; overflow: hidden; line-height: 1.1; vertical-align: top; }
.flow-d > span { display: flex; flex-direction: column; transition: transform 900ms var(--ease-out); }
.flow-d > span > span { height: 1.1em; }

/* ---------------------------------------------------------------- Motion */
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: color, background-color, opacity, box-shadow, filter !important; }
  .menu-panel, .cmdk[open], .cmdk.closing, .toast, .toast.leaving { animation-name: fade-in; }
  .cmdk.closing, .toast.leaving { animation-name: fade-out; }
  .gallery figure:hover img { transform: none; }
  button:active, .button:active, .play:active, .btn-line:active, .nav-play:active { transform: none !important; }
  .flow-d > span { transition: none; }
}
.panel.narrow h1 { font-size: 2.25rem; }
