/* ==========================================================================
   Greater Oakridge County — design system
   Warm campfire palette · Poppins italic display (matches the poster) · Inter body
   ========================================================================== */
:root {
  --bg: #0d0a08;
  --bg-2: #14100c;
  --bg-3: #1c1611;
  --surface: rgba(255, 238, 220, 0.045);
  --surface-2: rgba(255, 238, 220, 0.075);
  --surface-solid: #18130e;
  --border: rgba(255, 228, 200, 0.11);
  --border-strong: rgba(255, 228, 200, 0.22);
  --text: #f7efe6;
  --text-2: #d8c9b9;
  --muted: #a8968a;
  --ember: #f08a3c;
  --ember-2: #ffb36b;
  --ember-deep: #c25e1b;
  --oak: #9b4f17;
  --danger: #ef5a4c;
  --success: #4cc38a;
  --warning: #f0b429;
  --info: #6aa5ff;

  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(240, 138, 60, 0.35), 0 10px 40px -10px rgba(240, 138, 60, 0.45);
  --container: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --z-nav: 40;
  --z-modal: 60;
  --z-toast: 70;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(240, 138, 60, 0.4); color: #fff; }

:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ember); color: #1a0d03; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 26px; height: 26px; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-2);
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 52px); margin-top: 12px; }
.section-head p { color: var(--muted); max-width: 520px; margin: 10px 0 0; }
.text-muted { color: var(--muted); }
.ember-text { background: linear-gradient(100deg, var(--ember-2), var(--ember) 45%, #e0592a); -webkit-background-clip: text; background-clip: text; color: transparent; padding-inline: .04em .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; /* room for slanted letters on every wrapped line */ }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s, box-shadow .2s, transform .2s var(--ease);
  cursor: pointer; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn-primary { background: linear-gradient(180deg, #ff9e52, var(--ember) 60%, #e3762a); color: #1f0f03; box-shadow: 0 8px 24px -8px rgba(240, 138, 60, .7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:hover { box-shadow: 0 12px 34px -8px rgba(240, 138, 60, .9), inset 0 1px 0 rgba(255,255,255,.35); background: linear-gradient(180deg, #ffb06d, #f59547 60%, #ea7e33); }
.btn-ghost { background: rgba(255, 245, 235, .06); border-color: var(--border-strong); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255, 245, 235, .12); border-color: rgba(255, 228, 200, .35); }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: rgba(239, 90, 76, .12); border-color: rgba(239, 90, 76, .4); color: #ff9d92; }
.btn-danger:hover { background: rgba(239, 90, 76, .22); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.kbd, kbd { font: 500 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--muted); background: rgba(0,0,0,.25); }

/* ---------- Announcement ---------- */
.announce {
  position: relative; z-index: calc(var(--z-nav) + 1);
  background: linear-gradient(90deg, #4a1f08, #7a3410 50%, #4a1f08);
  color: #ffe6cf; font-size: 14px; text-align: center; padding: 9px 48px;
  border-bottom: 1px solid rgba(255, 180, 110, .25);
}
.announce a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.announce .announce-close { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 36px; min-width: 36px; color: #ffe6cf; }

/* ---------- Navigation ---------- */
.nav-wrap { position: sticky; top: var(--maint-banner-h, 0px); z-index: var(--z-nav); padding: 14px 16px 0; pointer-events: none; }
.nav {
  pointer-events: auto;
  width: min(var(--container), 100%); margin-inline: auto; height: 64px;
  display: flex; align-items: center; gap: 20px; padding: 0 10px 0 14px;
  border-radius: 20px; border: 1px solid transparent;
  transition: background-color .3s, border-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav-wrap.scrolled .nav, .nav-wrap.solid .nav {
  background: rgba(20, 15, 11, .72); border-color: var(--border);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px -15px rgba(0,0,0,.8);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; user-select: none; -webkit-user-select: none; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 2px calc(10px + var(--charge, 0) * 22px) rgba(240,138,60,calc(.35 + var(--charge, 0) * .65))) brightness(calc(1 + var(--charge, 0) * .55)); }
.brand-blown img { opacity: 0; transform: scale(1.8); transition: opacity .2s, transform .2s; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font: italic 800 16px/1.05 var(--font-display); text-transform: uppercase; letter-spacing: -0.02em; white-space: nowrap; }
.status-pill, .nav-actions .btn { white-space: nowrap; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.nav-links { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; font-size: 15px; position: relative;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; border-radius: 2px; background: var(--ember); box-shadow: 0 0 12px var(--ember); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.search-trigger { border-color: var(--border); padding: 0 10px 0 12px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.live { background: var(--success); box-shadow: 0 0 0 0 rgba(76,195,138,.6); animation: pulse 2s infinite; }
.dot.soon { background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.dot.off { background: var(--danger); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76,195,138,.55);} 70% { box-shadow: 0 0 0 8px rgba(76,195,138,0);} 100% { box-shadow: 0 0 0 0 rgba(76,195,138,0);} }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 940px); margin-top: calc(-1 * (var(--nav-h) + 6px));
  display: flex; align-items: center; padding: calc(var(--nav-h) + 60px) 0 120px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; transform: scale(1.06); animation: heroZoom 24s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(13,10,8,.94) 0%, rgba(13,10,8,.78) 38%, rgba(13,10,8,.25) 70%, rgba(13,10,8,.55) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13,10,8,0) 30%),
    radial-gradient(60% 50% at 45% 60%, rgba(240,138,60,.12), transparent 70%);
}
.embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border: 1.5px solid rgba(255,240,225,.6); border-radius: var(--radius-pill); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.2); backdrop-filter: blur(6px); }
.hero-kicker { font: italic 600 clamp(20px, 2.6vw, 34px)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: -0.02em; margin: 26px 0 10px; color: #fff; }
.hero h1 { font-size: clamp(54px, 9.4vw, 136px); text-shadow: 0 10px 50px rgba(0,0,0,.45); }
.hero-lead { margin: 26px 0 0; max-width: 620px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: var(--text-2); }
.hero-lead strong { color: #fff; font-style: italic; font-family: var(--font-display); text-transform: uppercase; font-weight: 700; letter-spacing: -0.01em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-features { display: grid; gap: 14px; }
.feature-glass {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,245,235,.16), rgba(255,245,235,.05));
  border: 1.5px solid rgba(255,240,225,.38);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
  transition: transform .3s var(--ease), border-color .3s, background-color .3s;
}
.feature-glass:hover { transform: translateX(-4px); border-color: rgba(255,200,150,.6); }
.feature-glass .fi { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; }
.feature-glass .fi .i { width: 28px; height: 28px; }
.feature-glass h3 { font: italic 800 16px/1.15 var(--font-display); text-transform: uppercase; letter-spacing: -0.02em; }
.feature-glass p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); color: #fff; animation: bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { border-color: var(--ember-2); color: var(--ember-2); }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-tight { padding: 70px 0; }

/* Status strip */
.status-strip { margin-top: -70px; position: relative; z-index: 2; }
.status-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.panel {
  background: linear-gradient(180deg, rgba(255,238,220,.06), rgba(255,238,220,.025));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.panel-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat-big { font: italic 800 clamp(36px, 4vw, 48px)/1 var(--font-display); letter-spacing: -0.03em; margin-top: 14px; }
.stat-big small { font-size: .45em; color: var(--muted); font-style: normal; font-weight: 600; letter-spacing: 0; }
.status-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--text-2); font-size: 14px; }
.status-meta span { display: inline-flex; align-items: center; gap: 6px; }
.meter { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); margin-top: 16px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ember-deep), var(--ember-2)); transition: width .8s var(--ease); }
.code-chip { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 8px 8px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); font: 500 18px var(--font-mono); letter-spacing: .08em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.countdown div { text-align: center; padding: 10px 4px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.countdown b { display: block; font: italic 800 26px/1 var(--font-display); }
.countdown span { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* Cinematic banner */
.cinema {
  position: relative; border-radius: 32px; overflow: hidden; min-height: 520px; isolation: isolate;
  display: flex; align-items: flex-end; border: 1px solid var(--border);
}
.cinema img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.cinema:hover img { transform: scale(1.03); }
.cinema::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(13,10,8,.96) 0%, rgba(13,10,8,.55) 45%, rgba(13,10,8,.05) 80%); }
.cinema-body { padding: clamp(28px, 5vw, 56px); width: 100%; }
.cinema h2 { font-size: clamp(36px, 6vw, 84px); max-width: 900px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.pillar { padding: 20px; border-radius: var(--radius); background: rgba(13,10,8,.55); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.pillar .i { color: var(--ember-2); }
.pillar h3 { font-size: 17px; margin: 12px 0 6px; }
.pillar p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

/* Department cards */
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dept-card {
  --c: var(--ember);
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}
.dept-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 55%); opacity: .6; transition: opacity .3s; pointer-events: none; }
.dept-card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(-3px); }
.dept-card:hover::before { opacity: 1; }
.dept-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.dept-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.dept-icon .i { width: 26px; height: 26px; }
.dept-card h3 { font-size: 19px; position: relative; }
.dept-card p { margin: 0; color: var(--muted); font-size: 15px; position: relative; flex: 1; }
.dept-short { font: 500 12px var(--font-mono); letter-spacing: .1em; color: var(--c); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.badge-ember { color: var(--ember-2); border-color: rgba(240,138,60,.35); background: rgba(240,138,60,.1); }
.badge-success { color: #7ee0ae; border-color: rgba(76,195,138,.35); background: rgba(76,195,138,.1); }
.badge-muted { color: var(--muted); }
.dept-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.badge-soon { color: #9cc3ff; border-color: rgba(106,165,255,.35); background: rgba(106,165,255,.1); }
.dept-announce { position: relative; display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); overflow-wrap: anywhere; }
.dept-announce .i { margin-top: 2px; color: var(--c); }
.dept-shout { background: rgba(0,0,0,.18); border-color: var(--border); }
.dept-shout span { min-width: 0; }
.dept-shout small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.dept-banner { position: relative; height: 112px; margin: -26px -26px 0; overflow: hidden; }
.dept-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dept-top-overlap { margin-top: -46px; align-items: flex-end; }
.dept-logo { position: relative; flex-shrink: 0; width: 68px; height: 68px; }
.dept-logo > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; border: 3px solid var(--surface-solid); background: var(--surface-solid); }
.dept-logo-icon { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--c); background: var(--surface-solid); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.dept-closed { position: relative; color: var(--muted); background: rgba(255, 245, 235, .04); border-color: var(--border); cursor: not-allowed; }
.dept-closed:hover { color: #ff9d92; background: rgba(239, 90, 76, .12); border-color: rgba(239, 90, 76, .45); }
.dept-closed:active { transform: none; }
.dept-actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }

/* Staff team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.team-card { overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.team-card .profile-banner { height: 84px; }
.team-card-main { display: grid; gap: 10px; padding: 0 20px 20px; }
.team-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -32px; position: relative; }
.team-card-head .avatar { width: 64px; height: 64px; font-size: 21px; border: 3px solid var(--surface-solid); box-sizing: content-box; }
.team-card h2 { font-size: 18px; margin: 4px 0 0; overflow-wrap: anywhere; }
.team-card h2 a:hover { color: var(--ember-2); }

/* Profiles */
img.avatar { object-fit: cover; display: block; background: var(--surface-solid); } /* solid, so a banner never shows through a transparent picture */
.profile-banner { height: 180px; background: linear-gradient(135deg, #3a1d0b, #160f0a); overflow: hidden; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-select: none; }
.profile-banner.adjusting { cursor: grab; touch-action: none; outline: 2px dashed var(--ember-2); outline-offset: -2px; }
.profile-banner.adjusting:active { cursor: grabbing; }
.banner-editor { display: grid; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(0,0,0,.18); }
.banner-editor p { margin: 0; font-size: 14px; color: var(--text-2); }
.banner-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 18px; }
.banner-slider { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.banner-slider input { width: 100%; height: 24px; margin: 0; accent-color: var(--ember); cursor: pointer; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-row .i { width: 14px; height: 14px; }
.account-badges { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.account-badges legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.account-badges[disabled] { opacity: .55; }
.badge-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-toggle { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s, border-color .15s; }
.badge-toggle:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.badge-toggle:has(input:checked) { color: var(--c); border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 14%, transparent); }
.badge-toggle:has(input:focus-visible) { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.account-badges[disabled] .badge-toggle { cursor: not-allowed; }
.profile-card { overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.profile-body { display: grid; gap: 14px; padding: 0 26px 26px; }
.profile-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -48px; position: relative; flex-wrap: wrap; }
.profile-head .avatar { width: 96px; height: 96px; font-size: 32px; border: 4px solid var(--surface-solid); box-sizing: content-box; }
.profile-body h1 { font-size: 32px; overflow-wrap: anywhere; }
.profile-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; font-size: 14px; }
.profile-handle { color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.profile-bio { margin: 0; color: var(--text-2); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.level-badge { color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.portfolio { display: grid; gap: 18px; justify-items: start; padding: 30px 0 90px; }
.portfolio .profile-card { width: 100%; }
.account { display: grid; gap: 18px; padding: 30px 0 90px; }
.account .dash-head { margin-bottom: 6px; }
.account .card-form + .card-form { margin-top: 0; }
.image-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.image-btn { cursor: pointer; }
.image-btn:focus-within { outline: 2px solid var(--ember-2); outline-offset: 3px; }
.input-static { display: flex; align-items: center; color: var(--text-2); font-family: var(--font-mono); background: rgba(0,0,0,.14); }
.auth-switch { margin: 0 !important; text-align: center; font-size: 14px; }
.auth-switch a { color: var(--ember-2); font-weight: 600; }

.welcome { display: grid; gap: 18px; width: min(860px, 100% - 40px); padding: 30px 0 90px; }
.welcome-head { display: grid; gap: 8px; justify-items: start; }
.welcome-head h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); overflow-wrap: anywhere; }
.welcome-head p { margin: 0; color: var(--text-2); line-height: 1.6; }
.welcome .card-form + .card-form, .welcome form + .card-form { margin-top: 0; }
.welcome-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.conn { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 8px 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.18); }
.conn-icon { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--ember-2); background: rgba(240,138,60,.1); flex-shrink: 0; }
.conn-icon:has(.conn-avatar) { width: 44px; height: 44px; border-radius: 50%; }
.conn-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--surface-2, #221610); }
.conn-handle { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.conn-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.conn-text { flex: 1; min-width: 0; display: grid; }
.conn-text small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.conn-text b { font-size: 14px; overflow-wrap: anywhere; }
.conn-id { font: 500 12px var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.conn-empty .conn-icon { color: var(--muted); background: var(--surface); }
.conn-empty b { color: var(--muted); font-weight: 500; }
.conn-block { display: grid; gap: 8px; align-content: start; }

.account-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) 44px; gap: 12px 14px; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.account-row:last-of-type { border-bottom: 0; }
.account-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-id b { display: block; overflow-wrap: anywhere; }
.account-id small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-conns, .account-bio { grid-column: 1 / -1; }
.account-bio { margin: 0; color: var(--text-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.account-more { margin: 0; padding: 14px 16px; font-size: 14px; }

.level-item { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; }
.level-item:focus-within { border-color: var(--border-strong); }
.level-top { display: flex; align-items: center; gap: 12px; }
.level-name { flex: 1; min-width: 0; }
.level-name .input { min-height: 44px; font-weight: 600; }
.level-top .badge { flex-shrink: 0; min-width: 92px; justify-content: center; }
.level-color { display: block; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; padding: 4px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); cursor: pointer; transition: box-shadow .2s; }
.level-color:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.level-color:focus-within { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.level-color input { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
.level-color input:focus { outline: none; }
.level-color input::-webkit-color-swatch-wrapper { padding: 0; }
.level-color input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.level-color input::-moz-color-swatch { border: 0; border-radius: 50%; }
.level-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; flex-shrink: 0; min-width: 136px; }
.level-action-slot { width: 44px; }
.level-actions .icon-btn { background: transparent; border-color: transparent; }
.level-actions .icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.level-actions .icon-btn:disabled { opacity: .3; cursor: default; }
.level-actions [data-remove]:hover { color: #ff9d92; background: rgba(239,90,76,.12); }

.level-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid var(--border); cursor: pointer; }
.level-switch-text b, .perm-text b, .level-note b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.level-switch-text small, .perm-text small, .level-note small { display: block; margin-top: 1px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.level-switch input, .app-switch input { flex-shrink: 0; position: relative; width: 42px; height: 24px; margin: 0; border-radius: var(--radius-pill); background: rgba(255,238,220,.14); cursor: pointer; appearance: none; -webkit-appearance: none; transition: background-color .2s; }
.level-switch input::after, .app-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .2s var(--ease); }
.level-switch input:checked, .app-switch input:checked { background: var(--ember); }
.level-switch input:checked::after, .app-switch input:checked::after { transform: translateX(18px); background: #1f0f03; }
.app-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--muted); cursor: pointer; }
.app-switch-label { color: var(--text-2); margin-right: 4px; }
.app-switch-closed, .app-switch-open { transition: color .2s; }
.app-switch:not(:has(input:checked)) .app-switch-closed { color: var(--text); font-weight: 600; }
.app-switch:has(input:checked) .app-switch-open { color: var(--text); font-weight: 600; }

.level-perms { margin: 0; padding: 0; border: 0; min-width: 0; }
.level-perms legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.perm-option { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.18); cursor: pointer; transition: border-color .15s, background-color .15s; }
.perm-option:hover { border-color: var(--border-strong); }
.perm-option:has(input:checked) { border-color: rgba(240,138,60,.5); background: rgba(240,138,60,.08); }
.perm-icon { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); background: var(--surface); transition: color .15s, background-color .15s; }
.perm-option:has(input:checked) .perm-icon { color: var(--ember-2); background: rgba(240,138,60,.14); }
.perm-text { flex: 1; min-width: 0; }
.level-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px dashed var(--border-strong); }
.level-note .i { margin-top: 2px; color: var(--c); }

/* Post cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s var(--ease), background-color .25s;
}
.post-card:hover { border-color: rgba(240,138,60,.45); transform: translateY(-4px); background: var(--surface-2); }
.post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #3a1d0b, #160f0a); position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-cover .placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.post-cover .placeholder img { width: 64px; height: 64px; opacity: .5; object-fit: contain; }
.post-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.post-card h3 { font-size: 20px; line-height: 1.25; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .read-more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--ember-2); font-weight: 600; font-size: 14px; }
.post-card .read-more .i { transition: transform .2s; }
.post-card:hover .read-more .i { transform: translateX(4px); }
.post-card.featured { grid-column: span 3; flex-direction: row; }
.post-card.featured .post-cover { aspect-ratio: auto; flex: 1.3; min-height: 340px; }
.post-card.featured .post-body { flex: 1; padding: 36px; justify-content: center; }
.post-card.featured h3 { font-size: clamp(26px, 3vw, 36px); }

/* Docs quick links */
.doc-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doc-link { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, background-color .2s; }
.doc-link:hover { border-color: rgba(240,138,60,.45); background: var(--surface-2); }
.doc-link .di { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(240,138,60,.12); color: var(--ember-2); flex-shrink: 0; }
.doc-link h3 { font-size: 16px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.doc-link p { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.doc-link small { color: var(--ember-2); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* CTA */
.cta-block {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 32px; padding: clamp(40px, 7vw, 90px) clamp(24px, 5vw, 60px); text-align: center;
  background: radial-gradient(80% 120% at 50% 120%, rgba(240,138,60,.45), transparent 60%), linear-gradient(180deg, #1d140d, #120d09);
  border: 1px solid rgba(240,138,60,.3);
}
.cta-block::after { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/img/coming-soon.webp') center / cover; opacity: .08; filter: blur(2px); }
.cta-block img.logo { width: 96px; height: 96px; margin: 0 auto 22px; filter: drop-shadow(0 10px 30px rgba(240,138,60,.5)); }
.cta-block h2 { font-size: clamp(34px, 6vw, 76px); }
.cta-block p { color: var(--text-2); max-width: 560px; margin: 18px auto 30px; font-size: 18px; }
.cta-block .discord-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px; border: 2px solid rgba(255,255,255,.75); border-radius: var(--radius-pill); font: 500 22px var(--font-body); margin-top: 18px; transition: border-color .2s, color .2s; }
.cta-block .discord-chip:hover { border-color: var(--ember-2); color: var(--ember-2); }

/* ---------- Page header ---------- */
.page-hero { position: relative; padding: 70px 0 50px; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ''; position: absolute; inset: -40% -10% 0; z-index: -1; background: radial-gradient(50% 60% at 20% 30%, rgba(240,138,60,.16), transparent 70%), radial-gradient(40% 50% at 90% 0%, rgba(155,79,23,.25), transparent 70%); }
.page-hero h1 { font-size: clamp(44px, 7vw, 92px); margin-top: 14px; }
.page-hero p { color: var(--text-2); font-size: 18px; max-width: 620px; margin: 18px 0 0; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 500; transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: #1f0f03; font-weight: 600; }
.input-icon { position: relative; display: block; }
.input-icon .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 42px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--border-strong); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background-color .2s; font-size: 15px;
}
.input::placeholder, .textarea::placeholder { color: #7d6d61; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(240,138,60,.22); background: rgba(0,0,0,.4); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a8968a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
.select { color-scheme: dark; }
.select option { background: var(--surface-solid); color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--text-2); }
.check input, .perm-option input {
  flex-shrink: 0; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--border-strong); background: rgba(0,0,0,.28) center / 14px no-repeat;
  cursor: pointer; appearance: none; -webkit-appearance: none; transition: background-color .15s, border-color .15s;
}
.check input:hover, .perm-option input:hover { border-color: var(--ember-2); }
.check input:checked, .perm-option input:checked {
  background-color: var(--ember); border-color: var(--ember);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%231f0f03' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { color: #ff9d92; font-size: 14px; display: flex; gap: 8px; align-items: center; }

/* ---------- Article / markdown ---------- */
.prose { color: var(--text-2); font-size: 17px; line-height: 1.8; max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); scroll-margin-top: 100px; }
.prose h2 { font-size: 28px; margin: 2.2em 0 .6em; padding-bottom: .4em; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 21px; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 17px; margin: 1.5em 0 .4em; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--ember-2); text-decoration: underline; text-decoration-color: rgba(255,179,107,.4); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--ember-2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--ember); }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); margin: 1.6em 0; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose code { font: 500 .88em var(--font-mono); padding: .15em .45em; border-radius: 6px; background: rgba(255,238,220,.08); color: #ffd1a8; }
.prose pre { background: #0a0806; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; margin: 1.4em 0; }
.prose pre code { background: none; padding: 0; color: var(--text-2); font-size: 14px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--ember); background: rgba(240,138,60,.07); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .callout { border-left-width: 3px; }
.prose .callout-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.prose .callout-note { border-color: var(--info); background: rgba(106,165,255,.08); } .prose .callout-note .callout-title { color: var(--info); }
.prose .callout-tip { border-color: var(--success); background: rgba(76,195,138,.08); } .prose .callout-tip .callout-title { color: var(--success); }
.prose .callout-warning { border-color: var(--warning); background: rgba(240,180,41,.08); } .prose .callout-warning .callout-title { color: var(--warning); }
.prose .callout-important { border-color: var(--danger); background: rgba(239,90,76,.08); } .prose .callout-important .callout-title { color: #ff8a7e; }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose .anchor { opacity: 0; margin-left: 8px; color: var(--muted); text-decoration: none; transition: opacity .2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }

/* Article page */
.article-hero { padding: 50px 0 0; }
.article-hero .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; min-height: 44px; transition: color .2s; }
.article-hero .back:hover { color: var(--text); }
.article-hero h1 { font-size: clamp(34px, 5.5vw, 64px); max-width: 960px; margin: 18px 0 20px; line-height: 1.04; }
.article-cover { margin: 40px 0 50px; border-radius: 28px; overflow: hidden; aspect-ratio: 21 / 9; border: 1px solid var(--border); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 60px; align-items: start; padding-bottom: 80px; }
.author { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--ember), var(--oak)); color: #1f0f03; font-size: 15px; flex-shrink: 0; }
.aside-card { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.share-row { display: flex; gap: 8px; }

/* ---------- Docs ---------- */
.docs-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; padding: 40px 0 90px; align-items: start; }
.docs-nav { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.docs-nav .input-icon { margin-bottom: 20px; }
.docs-group { margin-bottom: 22px; }
.docs-group h4 { font: 600 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 12px; }
.docs-group a { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-size: 15px; border-left: 2px solid transparent; transition: background-color .2s, color .2s; }
.docs-group a:hover { background: var(--surface); color: var(--text); }
.docs-group a.active { background: rgba(240,138,60,.1); color: var(--ember-2); border-left-color: var(--ember); border-radius: 0 10px 10px 0; font-weight: 600; }
.docs-content h1 { font-size: clamp(34px, 4.5vw, 52px); margin: 10px 0 14px; }
.docs-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.docs-summary { font-size: 19px; color: var(--text-2); margin: 0 0 14px; max-width: 70ch; }
.docs-updated { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); padding-bottom: 28px; margin-bottom: 34px; border-bottom: 1px solid var(--border); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 60px; }
.docs-pager a { padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; display: flex; flex-direction: column; gap: 4px; }
.docs-pager a:hover { border-color: rgba(240,138,60,.45); }
.docs-pager small { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.docs-pager b { font-weight: 600; color: var(--text); }
.docs-pager .next { text-align: right; align-items: flex-end; grid-column: 2; }
.toc { position: sticky; top: 100px; font-size: 14px; }
.toc h4 { font: 600 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; color: var(--muted); border-left: 1px solid transparent; transition: color .2s, border-color .2s; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--ember-2); border-left-color: var(--ember); }
.toc .lvl-3 a { padding-left: 26px; font-size: 13px; }
.docs-mobile-nav { display: none; }

/* ---------- Staff / dashboard ---------- */
.auth-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 40px 16px 80px; }
.auth-card { width: min(420px, 100%); padding: 36px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,238,220,.07), rgba(255,238,220,.02)); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-card img { width: 64px; height: 64px; margin-bottom: 18px; }
.auth-card h1 { font-size: 30px; }
.auth-card p { color: var(--muted); margin: 8px 0 26px; }
.auth-card form { display: grid; gap: 16px; }

.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 30px 0 90px; align-items: start; }
.dash-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.dash-user { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.dash-user b { display: block; font-size: 15px; }
.dash-user small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.dash-side a, .dash-side button.side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 15px; background: none; border: 0; text-align: left; width: 100%; transition: background-color .2s, color .2s; }
.dash-side a:hover, .dash-side button.side-link:hover { background: var(--surface-2); color: var(--text); }
.dash-side a.active { background: rgba(240,138,60,.12); color: var(--ember-2); }
.dash-side .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.side-divider { flex-shrink: 0; width: 100%; height: 0; margin: 8px 0; border: 0; border-top: 1px solid var(--border-strong); }
.dash-side button.side-signout { border: 1px solid rgba(239,90,76,.45); color: #ff9d92; transition: background-color .2s, border-color .2s, color .2s; }
.dash-side button.side-signout:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.dash-side button.side-signout:focus-visible { outline-color: var(--danger); }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 32px; }
.dash-head p { margin: 6px 0 0; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-card small { color: var(--muted); font-size: 13px; }
.stat-card b { display: block; font: italic 800 34px/1.1 var(--font-display); margin-top: 6px; }

.table-card { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.table-card .table-tools { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-card .table-tools .input-icon { flex: 1; min-width: 200px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.15); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 15px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: rgba(255,238,220,.03); }
.data-table .title-cell a { font-weight: 600; color: var(--text); }
.data-table .title-cell a:hover { color: var(--ember-2); }
.data-table .title-cell small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .i { width: 40px; height: 40px; color: var(--ember); opacity: .7; margin: 0 auto 14px; }
.empty h3 { color: var(--text); font-size: 20px; margin-bottom: 6px; }

.card-form { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 18px; }
.card-form h2 { font-size: 20px; }
.card-form .form-grid[hidden], .card-form .field[hidden] { display: none; }
.card-form + .card-form, form + .card-form { margin-top: 18px; }
.backup-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.backup-text { flex: 1 1 340px; min-width: 0; display: grid; gap: 8px; }
.backup-last { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.backup-row .btn { flex-shrink: 0; }
@media (max-width: 700px) {
  .backup-row { justify-content: center; }
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.color-input { height: 46px; width: 100%; padding: 4px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(0,0,0,.28); cursor: pointer; }

.dept-image-row { display: flex; align-items: center; gap: 12px; }
.dept-image-preview { flex-shrink: 0; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: rgba(0,0,0,.28); border: 1px solid var(--border-strong); }
.dept-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dept-image-banner { width: 150px; height: 56px; border-radius: 10px; }
.dept-image-logo { width: 56px; height: 56px; border-radius: 14px; }
.shouts-heading { margin: 26px 0 12px; font-size: 18px; overflow-wrap: anywhere; }
.shout-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.shout-row:last-child { border-bottom: 0; }
.shout-text { flex: 1; min-width: 0; }
.shout-text p { margin: 0 0 2px; overflow-wrap: anywhere; white-space: pre-line; }
.shout-text small { color: var(--muted); font-size: 13px; }

/* Department editor: quiet rows that open one at a time */
.dept-list { display: grid; gap: 8px; }
.dept-row { position: relative; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .2s; }
.dept-row:hover { border-color: var(--border-strong); }
.dept-row:has(.dept-more[open]) { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.dept-more summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 150px 10px 14px; border-radius: var(--radius); cursor: pointer; list-style: none; }
.dept-more summary::-webkit-details-marker { display: none; }
.dept-more-chevron { flex-shrink: 0; color: var(--muted); transition: transform .2s var(--ease); }
.dept-more[open] .dept-more-chevron { transform: rotate(90deg); }
.dept-row-tile { flex-shrink: 0; display: grid; place-items: center; overflow: hidden; width: 38px; height: 38px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.dept-row-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dept-row-text { min-width: 0; display: grid; gap: 1px; }
.dept-row-text b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-row-text small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-edit-actions { position: absolute; top: 10px; right: 8px; display: flex; gap: 0; opacity: .55; transition: opacity .15s; }
.dept-row:hover .dept-edit-actions, .dept-edit-actions:focus-within { opacity: 1; }
.dept-edit-actions .icon-btn { background: transparent; border-color: transparent; }
.dept-edit-actions .icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.dept-edit-actions .icon-btn:disabled { opacity: .3; cursor: default; }
.dept-edit-actions [data-remove]:hover { color: #ff9d92; background: rgba(239,90,76,.12); }
.dept-more-body { padding: 0 20px 6px; animation: fade .16s var(--ease); }
.dept-section { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--border); }
.dept-section-head h3 { margin: 0 0 4px; font: 600 14px var(--font-body); color: var(--text); }
.dept-section-head p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.dept-section-body { display: grid; gap: 14px; min-width: 0; }
.dept-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dept-field-name, .dept-field-wide { grid-column: span 1; }
.dept-field-wide { grid-column: 1 / -1; }
.dept-more-body .field { gap: 6px; }
.dept-more-body .field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.dept-more-body .input, .dept-more-body .textarea, .dept-more-body .icon-picker-trigger { min-height: 42px; padding-block: 8px; font-size: 14px; border-radius: 10px; border-color: var(--border); background: rgba(0,0,0,.16); }
.dept-more-body .textarea { min-height: 0; line-height: 1.5; }
.dept-more-body .input:focus, .dept-more-body .textarea:focus { border-color: var(--ember); }
.dept-more-body .icon-picker-tile { width: 26px; height: 26px; }
.dept-more-body .check { font-size: 14px; min-height: 36px; }
.dept-toggles { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; }
.dept-more-body .app-switch { font-size: 14px; min-height: 36px; }
.dept-more-body .dept-image-preview { border-color: var(--border); background: rgba(0,0,0,.16); }
.dept-more-body .dept-image-banner { width: 96px; height: 44px; }
.dept-more-body .dept-image-logo { width: 44px; height: 44px; border-radius: 10px; }

/* Maintenance */
.maint-mode .nav-wrap, .maint-mode .footer, .maint-mode .announce, .maint-mode .maint-banner { display: none !important; }
.maint { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 54px 20px; overflow: hidden; background: radial-gradient(900px 520px at 50% 108%, rgba(240,138,60,.3), transparent 70%), radial-gradient(700px 380px at 50% -8%, rgba(194,94,27,.17), transparent 70%), var(--bg, #0d0a08); }
.maint-bg { position: absolute; inset: 0; z-index: -2; background: url('/img/campfire.webp') center bottom / cover no-repeat; opacity: .12; mask-image: linear-gradient(to top, #000, transparent 75%); -webkit-mask-image: linear-gradient(to top, #000, transparent 75%); }
.maint-embers { position: absolute; inset: 0; overflow: hidden; }
.maint-embers i { position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%; background: #ffb36b; box-shadow: 0 0 10px 2px rgba(240,138,60,.85); animation: maintEmber linear infinite; }
@keyframes maintEmber {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(46px, -102vh) scale(.2); opacity: 0; }
}
.maint-tape { position: absolute; z-index: 1; top: 0; left: -100px; right: -100px; height: 16px; background: repeating-linear-gradient(-45deg, #f0a23c 0 22px, #17100c 22px 44px); box-shadow: 0 4px 20px rgba(0,0,0,.5); animation: maintTape 3.5s linear infinite; }
.maint-tape-bottom { top: auto; bottom: 0; animation-direction: reverse; }
@keyframes maintTape { to { transform: translateX(calc(-44px * 1.41421356)); } } /* exactly one stripe repeat, so the loop has no jump */
.maint-gear { position: absolute; z-index: -1; color: rgba(240,138,60,.13); animation: maintSpin 26s linear infinite; }
.maint-gear.g1 { width: 340px; left: -90px; top: 8%; }
.maint-gear.g2 { width: 210px; left: 186px; top: -46px; color: rgba(255,179,107,.09); animation-duration: 18s; animation-direction: reverse; }
.maint-gear.g3 { width: 400px; right: -130px; bottom: -70px; animation-duration: 32s; animation-direction: reverse; }
@keyframes maintSpin { to { transform: rotate(360deg); } }
.maint-exit { position: absolute; z-index: 2; top: 34px; right: 26px; }
.maint-flip { transform: rotate(180deg); }
.maint-inner { width: min(880px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.maint-logo { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 20px rgba(240,138,60,.42)); }
.maint-pill { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid rgba(240,162,60,.45); background: rgba(240,138,60,.11); color: var(--ember-2); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.maint-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: maintPulse 1.6s ease-in-out infinite; }
@keyframes maintPulse { 50% { opacity: .3; } }
.maint-title { margin: 14px 0 0; font: italic 800 clamp(34px, 6vw, 60px)/1.08 var(--font-display); letter-spacing: -.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.maint-message { max-width: 620px; margin: 10px 0 0; font-size: clamp(15px, 2vw, 17px); line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }
.maint-back { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.maint-back[hidden], .maint-reopened[hidden] { display: none; }
.maint-back b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.maint-reopened { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(62,207,120,.45); background: rgba(62,207,120,.1); font-weight: 600; }
.maint-game { width: 100%; margin-top: 20px; padding: 6px; border-radius: 20px; background: repeating-linear-gradient(-45deg, rgba(240,162,60,.8) 0 14px, #17100c 14px 28px); box-shadow: 0 24px 70px -20px rgba(240,120,40,.5), 0 18px 50px rgba(0,0,0,.6); }
.maint-game canvas { display: block; width: 100%; aspect-ratio: 16 / 5.6; border-radius: 15px; background: #120a10; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.maint-game canvas:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.maint-keys { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.maint-keys kbd { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); border-bottom-width: 2px; background: rgba(255,238,220,.06); font: 500 12px 'JetBrains Mono', monospace; color: var(--text-2); }
.maint-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.maint-signed-in { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.maint-signed-in b { color: var(--text-2); font-weight: 600; }
.maint-banner { position: sticky; top: 0; z-index: calc(var(--z-nav) + 2); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; min-height: 36px; padding: 7px 16px; text-align: center; font-size: 13px; font-weight: 600; color: #f1f1f3; background: #303035; border-bottom: 2px solid #5a5a60; animation: maintBannerFlash 1.6s ease-in-out infinite; }
.maint-banner > i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; animation: maintPulse 1.6s ease-in-out infinite; }
.maint-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@keyframes maintBannerFlash {
  0%, 100% { background: #303035; border-bottom-color: #5a5a60; }
  50% { background: #7a1f1f; border-bottom-color: #ff4d4d; }
}
.maint-status { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid rgba(62,207,120,.32); background: rgba(62,207,120,.07); transition: background-color .25s, border-color .25s; }
.maint-status.is-closed { border-color: rgba(240,162,60,.55); background: repeating-linear-gradient(-45deg, rgba(240,162,60,.075) 0 18px, transparent 18px 36px), rgba(240,138,60,.08); }
.maint-status-icon { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(62,207,120,.15); color: #6fe09b; }
.maint-status.is-closed .maint-status-icon { background: rgba(240,138,60,.18); color: var(--ember-2); }
.maint-status-text { flex: 1; min-width: 0; }
.maint-status-text h2 { font-size: 20px; }
.maint-status-text p { margin: 3px 0 0; font-size: 14px; color: var(--text-2); }
.maint-switch { flex-shrink: 0; }
.maint-rules ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.maint-rules li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.maint-rules li .i { flex-shrink: 0; margin-top: 3px; color: var(--ember-2); }
.maint-rules b { color: var(--text); font-weight: 600; }
@media (max-width: 700px) {
  .maint { padding: 42px 14px; place-items: start center; }
  .maint-exit { position: static; grid-row: 1; margin-bottom: 14px; }
  .maint-banner { display: block; min-height: 0; padding: 6px 12px; font-size: 12px; line-height: 1.35; }
  .maint-banner > i { display: none; }
  .maint-banner a { margin-left: 6px; }
  .maint-logo { width: 62px; height: 62px; }
  .maint-game canvas { aspect-ratio: 16 / 8; }
  .maint-gear.g1 { width: 220px; left: -100px; }
  .maint-gear.g2 { display: none; }
  .maint-gear.g3 { width: 260px; right: -110px; }
  .maint-status { flex-wrap: wrap; }
  .maint-switch { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .maint-gear, .maint-tape, .maint-embers i, .maint-pill i, .maint-banner, .maint-banner > i { animation: none; }
  .maint-banner { border-bottom-color: #ff4d4d; }
  .maint-embers { display: none; }
}

/* Roadwork Run: the game page and the gates that lead to it */
.arcade-inner { width: min(1180px, 100%, calc((100dvh - 190px) * 16 / 5.6)); min-width: min(100%, 620px); }
.arcade-back { margin-top: 16px; }
.game-gate { position: fixed; inset: 0; z-index: calc(var(--z-modal) - 2); overflow: hidden; }
.game-gate-panel { position: absolute; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, #1d120c, #120b08); transition: transform .3s cubic-bezier(.7, 0, 1, .55); }
.game-gate-panel.top { top: 0; transform: translateY(-105%); }
.game-gate-panel.bottom { top: 50%; transform: translateY(105%); }
/* One 44px strip cut in half: each gate shows its half of the same image, so the stripes line up where they meet. */
.game-gate-panel::after { content: ''; position: absolute; left: 0; right: 0; height: 22px; background: repeating-linear-gradient(-45deg, #f0a23c 0 26px, #17100c 26px 52px) no-repeat; background-size: 100% 44px; box-shadow: 0 0 30px rgba(240,138,60,.45); }
.game-gate-panel.top::after { bottom: -1px; height: 23px; background-position: 0 0; } /* the extra pixel hides any hairline at the seam */
.game-gate-panel.bottom::after { top: 0; background-position: 0 100%; clip-path: inset(0 0 -60px 0); } /* keeps its glow off the top half */
.game-gate.shut .game-gate-panel { transform: none; }
.game-gate.shut.open .game-gate-panel { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.game-gate.shut.open .game-gate-panel.top { transform: translateY(-105%); }
.game-gate.shut.open .game-gate-panel.bottom { transform: translateY(105%); }
.game-gate-hub { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle, #2a170c, #120b08); border: 5px solid var(--ember); box-shadow: 0 0 50px rgba(240,138,60,.65); transform: translate(-50%, -50%) scale(0) rotate(-140deg); }
.game-gate-hub img { width: 76px; height: 76px; object-fit: contain; }
.game-gate.shut .game-gate-hub { transform: translate(-50%, -50%) scale(1) rotate(0); transition: transform .34s cubic-bezier(.2, 1.5, .4, 1) .22s; }
.game-gate.shut.open .game-gate-hub { transform: translate(-50%, -50%) scale(0) rotate(140deg); transition: transform .24s ease-in; }
.game-gate-label { position: absolute; left: 0; right: 0; top: calc(50% + 86px); text-align: center; font: italic 800 clamp(26px, 4vw, 42px)/1.1 var(--font-display); letter-spacing: -.02em; text-transform: uppercase; color: #fff; opacity: 0; }
.game-gate.shut .game-gate-label { opacity: 1; transition: opacity .25s .3s; }
.game-gate.shut.open .game-gate-label { opacity: 0; transition: opacity .12s; }
.game-gate.thud { animation: gateThud .34s ease-out; }
@keyframes gateThud {
  20% { transform: translateY(-9px); }
  45% { transform: translateY(6px); }
  70% { transform: translateY(-3px); }
}

/* Jurisdiction key */
.jur-page { width: min(1640px, 100% - 40px); margin-inline: auto; padding: 28px 0 80px; }
.jur-head { display: flex; align-items: center; justify-content: center; gap: 20px; text-align: center; margin-bottom: 20px; }
.jur-head > img { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.jur-title { margin: 0; font: italic 800 clamp(30px, 3.4vw, 52px)/1.05 var(--font-display); letter-spacing: -.03em; text-transform: uppercase; }
.jur-head p { margin: 6px 0 0; font-size: 17px; color: var(--text-2); }
.jur-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.jur-col { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 12px; }
.jur-card { display: grid; grid-template-columns: clamp(76px, 6vw, 108px) minmax(0, 1fr) clamp(96px, 8.4vw, 150px); gap: 12px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.jur-badge { width: 100%; aspect-ratio: 1; object-fit: contain; }
.jur-card-text { min-width: 0; }
.jur-card h2 { margin: 0; font: 700 clamp(21px, 1.7vw, 27px)/1.1 var(--font-display); color: var(--c); }
.jur-card small { display: block; margin: 2px 0 8px; font-size: 13px; line-height: 1.25; color: var(--muted); }
.jur-card p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.3; }
.jur-svg { display: block; width: 100%; height: auto; }
.jur-map { min-width: 0; align-self: center; }
.jur-map .jur-svg { filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }

/* Legal Library */
.legal-library { padding-bottom: 90px; }
.legal-tools { display: grid; gap: 14px; }
.legal-tools .input-icon { max-width: 520px; }
.legal-count { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.legal-group { margin-top: 34px; }
.legal-group[hidden], .legal-row[hidden] { display: none; }
.legal-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.legal-group-icon { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ember-2); background: rgba(240,138,60,.1); border: 1px solid rgba(240,138,60,.25); }
.legal-group-head h2 { margin: 0; font-size: 21px; }
.legal-group-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.legal-list { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.legal-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px; border-bottom: 1px solid var(--border); transition: background-color .15s; }
.legal-row:last-child { border-bottom: 0; }
.legal-list .legal-row:has(~ .legal-row:not([hidden])) { border-bottom: 1px solid var(--border); }
.legal-row:hover { background: var(--surface-2); }
.legal-row-off { cursor: not-allowed; }
.legal-row-off:hover { background: none; }
.legal-row-off > * { opacity: .5; }
.legal-row-off .legal-num { color: var(--muted); }
.legal-num { font: 500 13px var(--font-mono); color: var(--ember-2); }
.legal-title { min-width: 0; font-weight: 500; font-size: 15px; overflow-wrap: anywhere; }
.legal-title .badge { height: 22px; margin-left: 6px; }
.legal-code { font: 500 12px var(--font-mono); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.legal-chevron { color: var(--muted); transition: transform .15s var(--ease); }
.legal-row:hover .legal-chevron { transform: translateX(3px); color: var(--ember-2); }
.legal-reader { padding: 40px 0 90px; }
.legal-reader-head { margin: 16px 0 22px; }
.legal-reader-head h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); overflow-wrap: anywhere; }
.legal-reader-meta { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.legal-paper { overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; }
body.legal-protected .legal-reader { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { body.legal-protected { display: none !important; } }
.docs-legal-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; margin-bottom: 20px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ember-2); background: rgba(240,138,60,.08); border: 1px solid rgba(240,138,60,.22); transition: background-color .2s; }
.docs-legal-link:hover { background: rgba(240,138,60,.15); }

.icon-picker { position: relative; }
.icon-picker-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 7px 12px 7px 8px; border-radius: 12px; text-align: left; cursor: pointer;
  background: rgba(0,0,0,.28); border: 1px solid var(--border-strong); font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.icon-picker-trigger:hover { background: rgba(0,0,0,.4); }
.icon-picker-trigger:focus-visible, .icon-picker-trigger[aria-expanded="true"] { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(240,138,60,.22); background: rgba(0,0,0,.4); }
.icon-picker-tile {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.icon-picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-picker-chevron { color: var(--muted); transition: transform .2s var(--ease); }
.icon-picker-trigger[aria-expanded="true"] .icon-picker-chevron { transform: rotate(180deg); }
.icon-picker-menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(340px, calc(100vw - 48px));
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: pop .16s var(--ease);
}
.icon-picker-menu[hidden] { display: none; }
.icon-picker.opens-up .icon-picker-menu { top: auto; bottom: calc(100% + 6px); }
.icon-picker.aligns-end .icon-picker-menu { left: auto; right: 0; }
.icon-picker-option {
  display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 9px 6px 6px; border-radius: 10px; text-align: left; font-size: 14px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-2); transition: background-color .15s, border-color .15s, color .15s;
}
.icon-picker-option:hover { background: var(--surface-2); color: var(--text); }
.icon-picker-option:focus-visible { outline: none; color: var(--text); background: var(--surface-2); border-color: var(--ember-2); }
.icon-picker-option[aria-selected="true"] { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.icon-picker-check { display: none; color: var(--c); }
.icon-picker-option[aria-selected="true"] .icon-picker-check { display: block; }

/* ---------- Editor ---------- */
.editor-bar {
  position: sticky; top: 84px; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin: 20px 0; border-radius: 18px;
  background: rgba(20,15,11,.85); border: 1px solid var(--border); backdrop-filter: blur(14px);
}
.editor-bar .spacer { flex: 1; }
.save-state { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state.dirty { color: var(--warning); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; padding-bottom: 80px; }
.editor-title { width: 100%; resize: none; overflow: hidden; display: block; background: transparent; border: 0; font: italic 800 clamp(28px, 4vw, 44px)/1.1 var(--font-display); letter-spacing: -0.03em; text-transform: uppercase; color: var(--text); padding: 6px 0 14px; }
.editor-title:focus { outline: none; }
.editor-title::placeholder { color: #5a4a3e; }
.md-editor { border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: rgba(0,0,0,.25); overflow: hidden; }
.md-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: rgba(255,238,220,.03); }
.md-toolbar .icon-btn { height: 38px; min-width: 38px; font-weight: 700; font-size: 14px; border-radius: 9px; }
.md-toolbar .divider { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.md-toolbar .tabs { margin-left: auto; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(0,0,0,.3); }
.md-toolbar .tabs button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.md-toolbar .tabs button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.md-panes { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.md-panes[data-mode="write"] { grid-template-columns: 1fr; } .md-panes[data-mode="write"] .md-preview { display: none; }
.md-panes[data-mode="preview"] { grid-template-columns: 1fr; } .md-panes[data-mode="preview"] .md-input { display: none; }
.md-input { width: 100%; min-height: 560px; resize: vertical; border: 0; background: transparent; padding: 22px; font: 400 15px/1.75 var(--font-mono); color: var(--text); tab-size: 2; }
.md-input:focus { outline: none; }
.md-preview { padding: 22px 26px; border-left: 1px solid var(--border); overflow: auto; max-height: 80vh; }
.md-preview .prose { font-size: 16px; }
.md-drop { outline: 2px dashed var(--ember); outline-offset: -8px; }
.cover-drop { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1.5px dashed var(--border-strong); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 14px; overflow: hidden; cursor: pointer; transition: border-color .2s, background-color .2s; background: rgba(0,0,0,.2); }
.cover-drop:hover { border-color: var(--ember); background: rgba(240,138,60,.05); }
.cover-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-drop .cover-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); }

/* ---------- Modal / search ---------- */
.search-modal, .modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.search-modal[hidden], .modal[hidden] { display: none; }
.search-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(5,3,2,.7); backdrop-filter: blur(6px); animation: fade .2s; }
.search-panel, .modal-panel { position: relative; width: min(640px, 100%); border-radius: 22px; background: #17120e; border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -20px rgba(0,0,0,.9); overflow: hidden; animation: pop .22s var(--ease); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.search-field .i { color: var(--muted); }
.search-field input { flex: 1; height: 62px; border: 0; background: transparent; font-size: 17px; }
.search-field input:focus { outline: none; }
.search-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.search-results .hint { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.search-item { display: flex; gap: 14px; padding: 12px 14px; border-radius: 12px; align-items: flex-start; }
.search-item[aria-selected="true"], .search-item:hover { background: var(--surface-2); }
.search-item .si { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(240,138,60,.12); color: var(--ember-2); flex-shrink: 0; }
.search-item b { display: block; font-size: 15px; }
.search-item small { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.search-item mark { background: rgba(240,138,60,.3); color: var(--text); border-radius: 3px; padding: 0 2px; }
.modal { align-items: center; padding-top: 16px; }
.modal-panel { width: min(440px, 100%); padding: 28px; }
.modal-panel h2 { font-size: 22px; }
.modal-panel p { color: var(--muted); margin: 10px 0 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Toasts ---------- */
/* ---------- Unsaved changes bar ---------- */
.unsaved-bar {
  position: fixed; left: 0; right: 0; bottom: 20px; z-index: calc(var(--z-modal) - 1); margin-inline: auto; width: fit-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 32px; padding: 10px 12px 10px 18px; border-radius: 16px;
  background: #201811; border: 1px solid var(--border-strong); box-shadow: 0 0 0 0 transparent, var(--shadow); animation: unsavedIn .25s var(--ease);
  transition: background-color .8s ease, border-color .8s ease, box-shadow .8s ease; /* easing back from red */
}
.unsaved-bar[hidden] { display: none; }
.unsaved-text { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.unsaved-text .i { color: var(--warning); transition: color .8s ease; }
.unsaved-msg { display: grid; }
.unsaved-msg > span { grid-area: 1 / 1; transition: opacity .5s ease; }
.unsaved-msg-alert, .unsaved-msg-return { opacity: 0; }
.unsaved-actions { display: flex; align-items: center; gap: 8px; }
/* Listing unsavedIn here too stops the slide-in replaying when the alert ends. */
.unsaved-bar.alert { background: #4a1612; border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger), 0 12px 40px -8px rgba(239,90,76,.6); animation: unsavedIn .25s var(--ease); transition-duration: .12s; }
.unsaved-bar.alert .unsaved-text .i { color: #ff9d92; transition-duration: .12s; }
.unsaved-bar.alert .unsaved-msg > span { opacity: 0; transition-duration: .12s; }
.unsaved-bar.alert:not(.returned) .unsaved-msg > .unsaved-msg-alert { opacity: 1; }
.unsaved-bar.returned .unsaved-msg > .unsaved-msg-return { opacity: 1; }
.unsaved-bar.alert.returned { animation: unsavedIn .25s var(--ease), unsavedReturn .5s var(--ease); }
.unsaved-bar.exploded { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease, visibility 0s .12s; }
.unsaved-sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: calc(var(--z-modal) - 1); pointer-events: none; }
.unsaved-bar .btn-quiet { transition: background-color .2s var(--ease), color .8s ease; }
.unsaved-bar.alert .btn-quiet { color: var(--text); transition-duration: .12s; }
@keyframes unsavedIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes unsavedReturn {
  from { opacity: 0; transform: scale(.85); }
}
body.has-unsaved #main { padding-bottom: 90px; }
body.has-unsaved .toast-stack { bottom: 92px; }

.toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: var(--z-toast); display: grid; gap: 10px; width: min(360px, calc(100% - 40px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #201811; border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; animation: pop .25s var(--ease); }
.toast.success .i { color: var(--success); } .toast.error .i { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s; }

/* ---------- Skeletons ---------- */
.skeleton { background: linear-gradient(90deg, rgba(255,238,220,.04), rgba(255,238,220,.09), rgba(255,238,220,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.page-loading { padding: 120px 0; display: grid; gap: 16px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(155,79,23,.07)); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font: 600 12px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer ul a { color: var(--text-2); font-size: 15px; display: inline-flex; min-height: 32px; align-items: center; transition: color .2s; }
.footer ul a:hover { color: var(--ember-2); }
.footer-about p { color: var(--muted); font-size: 15px; max-width: 340px; margin: 14px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Whitelisting steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 14px; align-content: start; }
.step-num { position: absolute; top: 18px; right: 22px; font: italic 800 42px/1 var(--font-display); color: rgba(255,238,220,.08); }
.step h3 { font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.mobile-only { display: none; }

/* ---------- Not found ---------- */
.not-found { text-align: center; padding: 120px 16px; }
.not-found h1 { font-size: clamp(80px, 16vw, 200px); }
.not-found p { color: var(--muted); margin: 10px 0 28px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .jur-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jur-map { grid-column: 1 / -1; grid-row: 1; width: min(760px, 100%); margin-inline: auto; }
  .jur-card { grid-template-columns: 92px minmax(0, 1fr) 120px; min-height: 150px; }
}
@media (max-width: 760px) {
  .jur-board { grid-template-columns: minmax(0, 1fr); }
  .jur-card { grid-template-columns: 72px minmax(0, 1fr) 92px; gap: 10px; }
}
@media (max-width: 1100px) {
  .docs-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .toc-col { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}
@media (max-width: 1060px) {
  .status-pill { display: none !important; }
  .search-trigger .kbd { display: none; }
  .nav { gap: 12px; }
  .nav-links a { padding: 0 12px; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-features { grid-template-columns: repeat(3, 1fr); }
  .feature-glass { grid-template-columns: 1fr; text-align: left; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .status-grid > :first-child { grid-column: 1 / -1; }
  .dept-grid, .post-grid, .doc-links { grid-template-columns: 1fr 1fr; }
  .post-card.featured { grid-column: span 2; flex-direction: column; }
  .post-card.featured .post-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .pillars { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .dash-user { width: 100%; }
  .dash-side a, .dash-side button.side-link { width: auto; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .editor-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .search-trigger .kbd { display: none; }
  .nav { position: relative; }
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px;
    background: rgba(20,15,11,.97); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { min-height: 48px; width: 100%; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: rgba(240,138,60,.12); color: var(--ember-2); }
  .docs-shell { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .docs-nav { display: none; }
  .docs-mobile-nav { display: block; }
  .status-pill { display: none !important; }
  .mobile-only { display: list-item; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { min-height: auto; padding-bottom: 110px; }
  .hero-features { grid-template-columns: 1fr; }
  .feature-glass { grid-template-columns: 48px 1fr; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .status-grid, .dept-grid, .post-grid, .doc-links { grid-template-columns: 1fr; }
  .account-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .account-level { grid-column: 1 / 2; grid-row: 2; }
  .level-top { flex-wrap: wrap; }
  .level-name { flex-basis: calc(100% - 56px); }
  .level-actions { min-width: 0; margin-left: auto; }
  .profile-body { padding: 0 18px 20px; }
  .post-card.featured { grid-column: auto; }
  .cinema { min-height: 620px; border-radius: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand-text small { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .jur-head { flex-direction: column; gap: 10px; }
  .jur-head > img { width: 60px; height: 60px; }
  .jur-head p { font-size: 15px; }
  .dept-section { grid-template-columns: 1fr; gap: 12px; }
  .dept-fields { grid-template-columns: 1fr; }
  .dept-more summary { padding-right: 14px; }
  .dept-row { display: grid; }
  .dept-edit-actions { position: static; justify-content: flex-end; padding: 0 8px 6px; }
  .legal-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .legal-code { display: none; }

  .md-panes { grid-template-columns: 1fr; }
  .md-panes[data-mode="split"] .md-preview { display: none; }
  .md-toolbar .tabs .split-tab { display: none; }
  .data-table .hide-sm { display: none; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager .next { grid-column: 1; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .editor-bar { top: 78px; }
  .nav-actions #navStaff { display: none; }
  .steps { grid-template-columns: 1fr; }
  .announce { font-size: 13px; padding: 8px 44px 8px 16px; justify-content: flex-start !important; text-align: left; }
  .announce > .i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
