/* gaffy.org in the Gaffy panel's craft language: warm near-black canvas, orange/gold accent, bevelled blocks that
   press down, pixel squares instead of dots, the Minecraft face only on ASCII labels (it has no ă ș ț). */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/assets/fonts/figtree/figtree-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/assets/fonts/figtree/figtree-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/bricolage/bricolage-grotesque-latin-ext-opsz-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/bricolage/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Gaffy Minecraft"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/minecraft/Minecraft.otf") format("opentype"); }
@font-face { font-family: "Gaffy Minecraft"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/minecraft/Minecraft-Bold.otf") format("opentype"); }

:root {
  --canvas: #0a0a0b;
  --surface: #111113;
  --raised: #17171a;
  --line: #26262b;
  --line-soft: #1b1b1f;
  --ink: #f4f3ef;
  --muted: #9a9aa2;
  --muted-strong: #c4c4ca;
  --accent: #f3a126;
  --accent-hot: #ff6b2c;
  --gold: #ffc23d;
  --danger: #ef5b5b;
  --success: #5fd08f;
  --sky: #7cc0ff;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Gaffy Minecraft", ui-monospace, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { position: relative; margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; background: var(--canvas); color: var(--ink); font: 400 18px/1.7 var(--text); text-rendering: optimizeLegibility; }
/* The panel's faint block grid and film grain. */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px); background-size: 42px 42px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; opacity: .035; pointer-events: none; background-image: url("/assets/noise.svg"); }
.ambient { position: absolute; z-index: -1; left: -18vw; top: -34vw; width: 72vw; height: 72vw; max-width: 980px; max-height: 980px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(243,161,38,.13) 0, rgba(255,107,44,.06) 26%, transparent 67%); filter: blur(16px); animation: ambient-drift 18s ease-in-out infinite; }
main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 140ms; }
a:hover { color: #ffd77a; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(243,161,38,.3); color: #fff; }
strong { font-weight: 700; color: #fff; }
mark.todo { background: rgba(239,91,91,.16); color: #ffb4b4; border: 1px dashed rgba(239,91,91,.7); border-radius: 4px; padding: 0 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--accent); color: #1d1003; padding: 8px 14px; border-radius: 7px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Craft primitives ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 400 11px/1.2 var(--pixel); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ""; width: 7px; height: 7px; background: currentColor; box-shadow: 2px 2px 0 rgba(0,0,0,.45); }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #303036; border-radius: 999px; background: rgba(255,255,255,.035); padding: 3px 10px; color: var(--muted-strong); font: 650 12px/1.3 var(--text); letter-spacing: .03em; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid; border-radius: 9px; font: 700 16px/1 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; transition: transform 90ms ease, box-shadow 90ms ease, filter 140ms ease, background-color 140ms ease; }
.btn-gold { border-color: #a85a10; color: #1d1003; background: linear-gradient(180deg, #ffd56e 0%, #f9aa34 52%, #ee861b 100%); text-shadow: 0 1px 0 rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(130,56,0,.5), 0 3px 0 #5a2b05, 0 10px 24px rgba(243,161,38,.18); }
.btn-gold:hover { color: #1d1003; filter: brightness(1.06); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(130,56,0,.5), 0 4px 0 #5a2b05, 0 14px 30px rgba(243,161,38,.26); }
.btn-gold:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(130,56,0,.5), 0 0 0 #5a2b05; }
.btn-stone { border-color: #393940; color: var(--ink); background: linear-gradient(180deg, #2a2a2f, #1f1f23); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -2px 0 rgba(0,0,0,.4), 0 2px 0 #08080a; }
.btn-stone:hover { color: #fff; background: linear-gradient(180deg, #313137, #24242a); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.4), 0 3px 0 #08080a; }
.btn-stone:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 #08080a; }
.ip .ip-value { margin-right: -6px; padding: 6px 10px; border-radius: 6px; background: rgba(60,25,0,.14); font: 400 13px/1.2 var(--pixel); letter-spacing: .05em; }
.ip.is-copied { animation: success-pop 300ms cubic-bezier(.2,.8,.2,1); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(10,10,11,.88); backdrop-filter: blur(18px); }
.top-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.brand:hover { color: #fff; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 3px 7px rgba(0,0,0,.35)); transition: transform 200ms var(--ease); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.tabs { display: flex; gap: 26px; height: 100%; }
.tabs a { position: relative; display: flex; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; }
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--ink); }
.tabs a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(243,161,38,.5); transform: scaleX(0); transform-origin: right; transition: transform 220ms cubic-bezier(.2,.8,.2,1); }
.tabs a:hover::after, .tabs a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.top-ip { margin-left: auto; padding: 6px 4px; border: 0; background: none; color: var(--muted); cursor: pointer; font: 400 13px/1 var(--pixel); letter-spacing: .05em; transition: color 140ms, transform 90ms; }
.top-ip:hover { color: var(--ink); }
.top-ip:active { transform: translateY(1px); }
.langs { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: #0d0d0f; padding: 3px; }
.langs a { min-width: 40px; padding: 6px 10px; border-radius: 6px; color: var(--muted); text-align: center; text-decoration: none; font: 400 11px/1.2 var(--pixel); letter-spacing: .1em; transition: color 140ms, background-color 140ms, transform 90ms; }
.langs a:hover { color: var(--ink); }
.langs a:active { transform: translateY(1px); }
.langs a[aria-current="true"] { color: var(--ink); background: linear-gradient(180deg, #2d2d33, #222227); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.6); }
@media (max-width: 820px) {
  .top-inner { height: auto; flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .brand { height: 48px; }
  .top-ip { display: none; }
  .langs { margin-left: auto; }
  .tabs { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 6px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); height: 50px; gap: 22px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line-soft); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
}

/* ---------- Entrance motion (one orchestrated load, like the panel) ---------- */
.reveal { animation: home-rise 620ms cubic-bezier(.2,.75,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms); }
.reveal-2 { --i: 1; }
.d2 { --i: 2; }
.d3 { --i: 3; }
.d4 { --i: 4; }
.d5 { --i: 5; }
.d6 { --i: 6; }
.d7 { --i: 7; }
.d8 { --i: 8; }

@keyframes home-rise { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ambient-drift { 0%,100% { transform: translate3d(-4%, -2%, 0) scale(1); opacity: .46; } 50% { transform: translate3d(6%, 3%, 0) scale(1.08); opacity: .62; } }
@keyframes gt-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes success-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes list-item-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ---------- Home ---------- */
.home { max-width: var(--wrap); margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--gutter) 88px; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 360px; padding: clamp(28px, 5vw, 60px); border: 1px solid #33271a; border-radius: 20px;
  background: radial-gradient(110% 140% at 95% -10%, rgba(255,150,40,.2), transparent 55%), linear-gradient(180deg, #19140e, #121112 75%);
  box-shadow: inset 0 1px 0 rgba(255,214,150,.07), 0 3px 0 rgba(0,0,0,.5), 0 40px 90px rgba(0,0,0,.35); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55; background-image: linear-gradient(rgba(255,180,80,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,180,80,.06) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(105deg, transparent 35%, #000 90%); mask-image: linear-gradient(105deg, transparent 35%, #000 90%); }
.hero h1 { margin: 16px 0 0; font: 800 clamp(2.6rem, 6vw, 4.8rem)/.98 var(--display); letter-spacing: -.035em; text-shadow: 0 4px 0 rgba(0,0,0,.45); max-width: 13ch; }
.hero-lead { margin: 18px 0 0; max-width: 44ch; color: #cfcfd4; font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.hero-mascot { align-self: end; margin: 0 -14px -64px 0; }
.hero-mascot img { display: block; width: clamp(150px, 24vw, 300px); filter: drop-shadow(0 16px 30px rgba(0,0,0,.5)); animation: gt-float 6s ease-in-out infinite; }

.timeline { margin-top: 44px; display: grid; gap: 18px; }
.update { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px 36px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #151517, #111113 200px); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); transition: border-color 160ms, box-shadow 160ms; }
.update:hover { border-color: #33333a; box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 2px 0 rgba(0,0,0,.4), 0 14px 32px rgba(0,0,0,.22); }
.update-when { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 6px; }
.update-when time { font: 400 12px/1.3 var(--pixel); letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.update-body h2 { margin: 0 0 10px; font: 750 clamp(1.5rem, 2.8vw, 2rem)/1.15 var(--display); letter-spacing: -.02em; }
.update-body h2 a { color: var(--ink); text-decoration: none; }
.update-body h2 a:hover { color: var(--gold); }
.update-body p { margin: 0 0 12px; color: var(--muted-strong); max-width: 68ch; }
.update-body p:last-child { margin-bottom: 0; }

/* ---------- Documents ---------- */
.doc { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) 96px; }
.doc-head h1 { margin: 16px 0 0; font: 800 clamp(2.6rem, 6vw, 4.6rem)/1 var(--display); letter-spacing: -.035em; text-shadow: 0 4px 0 rgba(0,0,0,.45); }
.doc-date { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.doc-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; margin-top: 48px; }
.toc { position: sticky; top: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #151517, #111113); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); }
.toc-title { margin: 0 0 12px; font: 400 10px/1.2 var(--pixel); letter-spacing: .14em; text-transform: uppercase; color: #8d8d95; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 7px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 15.5px; line-height: 1.35; transition: color 140ms, background-color 140ms, box-shadow 140ms; }
.toc a:hover { color: var(--ink); background: linear-gradient(90deg, rgba(243,161,38,.08), rgba(255,255,255,.015)); box-shadow: inset 3px 0 0 var(--accent); }
.doc-body { min-width: 0; max-width: 900px; }
.doc-body > .intro { color: var(--muted-strong); font-size: 19px; }
.doc-body > ul.intro { padding: 0; list-style: none; }
.doc-body > ul.intro li { position: relative; padding: 5px 0 5px 22px; }
.doc-body > ul.intro li::before, .doc-body ul:not(.intro) li::before { content: ""; position: absolute; left: 0; top: .78em; width: 8px; height: 8px; background: var(--accent); box-shadow: 2px 2px 0 rgba(0,0,0,.45); }
.doc-section { margin-top: 56px; }
.doc-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; scroll-margin-top: 110px; font: 750 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--display); letter-spacing: -.02em; }
.doc-section h2::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--accent); box-shadow: 3px 3px 0 rgba(0,0,0,.45); }
.doc-body p, .doc-body li { color: var(--muted-strong); }
.doc-body ul:not(.intro) { list-style: none; padding: 0; }
.doc-body ul:not(.intro) li { position: relative; padding-left: 22px; margin: 6px 0; }
.doc-body ol:not(.rule-list) { padding-left: 26px; }
.doc-body ol:not(.rule-list) li { margin: 6px 0; padding-left: 4px; }
.doc-body ol:not(.rule-list) li::marker { color: var(--accent); font: 400 13px var(--pixel); }

/* Tables: panel cards with a blocky header row and the accent hover bar. */
.table { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #151517, #111113 180px); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); }
table { width: 100%; border-collapse: collapse; font-size: 16.5px; line-height: 1.55; }
th { text-align: left; padding: 14px 18px; background: #0e0e10; border-bottom: 1px solid var(--line); color: #8d8d95; font: 650 13px/1.3 var(--text); letter-spacing: .04em; }
td { padding: 14px 18px; vertical-align: top; color: var(--muted-strong); border-top: 1px solid var(--line-soft); }
tbody tr { transition: background-color 120ms, box-shadow 120ms; }
tbody tr:hover { background: linear-gradient(90deg, rgba(243,161,38,.055), rgba(255,255,255,.012) 60%); box-shadow: inset 3px 0 0 var(--accent); }
tr:first-child td { border-top: 0; }
td:first-child { color: var(--ink); font-weight: 650; }

/* ---------- Rules ---------- */
.rule-search { position: sticky; top: 72px; z-index: 10; margin: 0 0 28px; padding: 16px 0 14px; background: linear-gradient(180deg, var(--canvas) 78%, rgba(10,10,11,0)); }
.rule-search label { display: block; margin-bottom: 8px; color: #8d8d95; font: 650 14px/1.2 var(--text); }
.rule-search input { width: 100%; height: 54px; padding: 0 18px; border: 1px solid #2c2c32; border-radius: 10px; background: #0f0f11; color: var(--ink); font: inherit; font-size: 17px; box-shadow: inset 0 2px 0 rgba(0,0,0,.35); transition: border-color 140ms, box-shadow 140ms, background-color 140ms; }
.rule-search input::placeholder { color: #6c6c74; }
.rule-search input:hover { border-color: #3d3d44; }
.rule-search input:focus { outline: none; border-color: rgba(243,161,38,.7); background: #121214; box-shadow: inset 0 2px 0 rgba(0,0,0,.35), 0 0 0 3px rgba(243,161,38,.12); }
.rule-empty { margin: 14px 0 0; color: var(--muted); }
.rule-list { list-style: none; margin: 20px 0; padding: 6px 0; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #151517, #111113 220px); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); }
.rule { display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(190px, 270px); gap: 8px 22px; align-items: start; padding: 18px 22px; border-top: 1px solid var(--line-soft); transition: background-color 120ms, box-shadow 120ms; }
.rule:first-child { border-top: 0; }
.rule:hover { background: linear-gradient(90deg, rgba(243,161,38,.055), rgba(255,255,255,.012) 60%); box-shadow: inset 3px 0 0 var(--accent); }
.rule:target { background: linear-gradient(90deg, rgba(243,161,38,.12), transparent 75%); box-shadow: inset 3px 0 0 var(--accent); }
.rule.is-in { animation: list-item-in 220ms var(--ease) both; }
.rule-text { margin: 0; padding-top: 12px; color: var(--ink) !important; font-size: 17.5px; }

/* Inventory slot for the rule code. */
.slot { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #050506; border-radius: 4px; background: #232327; color: var(--ink); text-decoration: none; font: 700 15px/1 var(--pixel); letter-spacing: .02em; text-shadow: 2px 2px 0 rgba(0,0,0,.6);
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.1), inset -3px -3px 0 rgba(0,0,0,.45), 0 2px 0 rgba(0,0,0,.5); transition: transform 90ms, background-color 140ms; }
.slot:hover { background: #2d2d33; transform: translateY(-1px); }
.slot:active { transform: translateY(2px); }
.slot-G { color: var(--gold); }
.slot-S { color: #8fe3b2; }
.slot-W { color: #9fd0ff; }

.sanction { margin: 0; padding-top: 8px; font-size: 15.5px; line-height: 1.45; }
.sanction-main { display: inline-flex; align-items: flex-start; gap: 8px; padding: 6px 12px; border: 1px solid var(--tone-line); border-radius: 9px; background: var(--tone-bg); color: var(--tone); font-weight: 700; }
.sanction-main > i { flex: none; width: 7px; height: 7px; margin-top: .45em; background: currentColor; box-shadow: 0 0 6px currentColor; }
.sanction-more { display: block; margin-top: 8px; padding-left: 4px; color: var(--muted); font-size: 14.5px; }
.sanction-more span { display: block; margin-top: 2px; }
.sev-mute { --tone: #f0cd85; --tone-line: rgba(214,168,84,.4); --tone-bg: rgba(214,168,84,.08); }
.sev-ban { --tone: #ffb089; --tone-line: rgba(255,107,44,.42); --tone-bg: rgba(255,107,44,.08); }
.sev-perm, .sev-ip { --tone: #ff9a9a; --tone-line: rgba(239,91,91,.45); --tone-bg: rgba(239,91,91,.09); }
.sev-warn { --tone: #a9d6ff; --tone-line: rgba(124,192,255,.38); --tone-bg: rgba(124,192,255,.07); }
.sev-other { --tone: var(--muted-strong); --tone-line: #303036; --tone-bg: rgba(255,255,255,.035); }

/* Rule codes mentioned in text: a mini slot that links to the rule, with a hover card on mouse devices. */
.rule-ref { position: relative; display: inline-flex; align-items: center; margin: 0 1px; padding: 1px 6px 0; border: 1px solid #3a3a41; border-radius: 4px; background: #1e1e22; color: var(--gold); text-decoration: none; font: 700 .72em/1.5 var(--pixel); letter-spacing: .03em; vertical-align: .08em; box-shadow: inset 1px 1px 0 rgba(255,255,255,.08), inset -1px -1px 0 rgba(0,0,0,.4); transition: background-color 140ms, border-color 140ms, transform 90ms; }
.rule-ref:hover, .rule-ref:focus-visible { color: #ffd77a; background: #2a2a2f; border-color: rgba(243,161,38,.6); }
.rule-ref:active { transform: translateY(1px); }
.ref-card { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 10px); display: grid; gap: 8px; width: min(320px, 80vw); padding: 14px 16px; border: 1px solid #33333a; border-radius: 12px; background: linear-gradient(180deg, #1b1b1f, #141416); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 50px rgba(0,0,0,.55); color: var(--ink); font: 400 15px/1.5 var(--text); letter-spacing: 0; text-align: left; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s 160ms; }
.ref-card::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; background: #141416; border-right: 1px solid #33333a; border-bottom: 1px solid #33333a; transform: translate(-50%, -5px) rotate(45deg); }
h2 .rule-ref, h3 .rule-ref { font-size: .5em; padding: 3px 8px 2px; vertical-align: .3em; }
.ref-code { font: 700 13px/1 var(--pixel); color: var(--gold); letter-spacing: .04em; }
.ref-what { color: var(--ink); }
.ref-sanction { justify-self: start; padding: 4px 10px; border: 1px solid var(--tone-line); border-radius: 8px; background: var(--tone-bg); color: var(--tone); font-weight: 700; font-size: 14px; }
@media (hover: hover) {
  .rule-ref:hover .ref-card, .rule-ref:focus-visible .ref-card { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s; }
}
@media (hover: none), (max-width: 720px) { .ref-card { display: none; } }
.rule:target { animation: target-flash 1.6s ease-out; }
@keyframes target-flash { 0%, 30% { background: rgba(243,161,38,.18); } 100% { background: linear-gradient(90deg, rgba(243,161,38,.12), transparent 75%); } }

/* ---------- Toast (copy confirmation) ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid rgba(95,208,143,.35); border-radius: 12px; background: #141416; color: var(--ink); font-weight: 650; font-size: 15px; box-shadow: 0 18px 50px rgba(0,0,0,.5); transform: translateX(-50%); animation: toast-in 220ms cubic-bezier(.2,.8,.2,1) both; }
.toast::before { content: ""; width: 8px; height: 8px; background: var(--success); box-shadow: 0 0 8px var(--success); }

/* ---------- 404 ---------- */
.missing { max-width: 680px; margin: 0 auto; padding: 110px var(--gutter); }
.missing h1 { margin: 0; font: 800 clamp(2.4rem, 5vw, 3.6rem)/1.05 var(--display); letter-spacing: -.03em; }
.missing p { color: var(--muted); }

/* ---------- Footer ---------- */
.bottom { border-top: 1px solid var(--line-soft); background: rgba(10,10,11,.9); }
.bottom-inner { max-width: var(--wrap); margin: 0 auto; padding: 30px var(--gutter) 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.bottom-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 750 18px/1 var(--display); }
.bottom-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.bottom-links a { color: var(--muted); text-decoration: none; font-size: 15.5px; }
.bottom-links a:hover { color: var(--ink); }
.bottom-note { width: 100%; margin: 0; color: #6c6c74; font-size: 14px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 960px) {
  .doc-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { padding: 6px 12px; border: 1px solid var(--line); background: #0f0f11; font-size: 15px; }
  .toc a:hover { box-shadow: none; border-color: rgba(243,161,38,.5); }
  .rule-search { top: 0; position: static; }
  .rule { grid-template-columns: 58px minmax(0, 1fr); }
  .sanction { grid-column: 2; padding-top: 0; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 26px 22px 0; }
  .hero h1 { max-width: none; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-mascot { justify-self: end; margin: -4px -8px -26px 0; }
  .hero-mascot img { width: 150px; }
  .update { grid-template-columns: 1fr; gap: 12px; }
  .update-when { flex-direction: row; align-items: center; padding-top: 0; }
  .rule { grid-template-columns: 48px minmax(0, 1fr); gap: 8px 14px; padding: 16px; }
  .slot { width: 48px; height: 48px; font-size: 13px; }
  .rule-text { padding-top: 8px; font-size: 17px; }
  .doc-body > .intro { font-size: 18px; }
  .rule-list, .table { margin-left: calc(-1 * min(var(--gutter), 8px)); margin-right: calc(-1 * min(var(--gutter), 8px)); }
  .table { border: 0; background: none; box-shadow: none; overflow: visible; }
  .table table, .table tbody, .table tr, .table td { display: block; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table tr { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #151517, #111113); box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); }
  .table tbody tr:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 2px 0 rgba(0,0,0,.4); }
  .table td { padding: 4px 0; border: 0; }
  .table td:not(:first-child)::before { content: attr(data-label); display: block; color: #8d8d95; font-size: 13px; font-weight: 650; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
