:root {
  color-scheme: dark;
  --bg: #02060a;
  --bg-soft: #071018;
  --surface: rgba(4, 13, 20, .91);
  --surface-2: rgba(7, 20, 29, .88);
  --surface-strong: rgba(2, 8, 13, .97);
  --line: rgba(112, 201, 244, .22);
  --line-strong: rgba(112, 201, 244, .38);
  --text: #f5f9fc;
  --muted: #8da4b1;
  --cyan: #36e6f4;
  --blue: #258dff;
  --green: #73ff4f;
  --red: #ff4c60;
  --gold: #ffc83c;
  --purple: #c667ff;
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
body::selection { color: #fff; background: rgba(54, 230, 244, .25); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code { font-family: "Cascadia Code", Consolas, monospace; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.12em; height: 1.12em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.skip-link { position: fixed; z-index: 999; left: 16px; top: -80px; padding: 10px 14px; border-radius: 8px; background: #fff; color: #000; transition: top .2s ease; }
.skip-link:focus { top: 16px; }

.page-backdrop { position: fixed; z-index: -3; inset: 0; overflow: hidden; background: #02060a; }
.page-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  filter: saturate(.96) contrast(1.08) brightness(.72);
  transform: scale(1.02);
}
.page-shade {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 4, 7, .34) 0%, rgba(1, 5, 9, .59) 29%, rgba(2, 7, 11, .87) 70%, #02060a 100%),
    radial-gradient(circle at 11% 31%, rgba(255, 58, 44, .14), transparent 34%),
    radial-gradient(circle at 89% 31%, rgba(38, 124, 255, .16), transparent 36%),
    radial-gradient(circle at 50% 11%, rgba(255, 205, 120, .08), transparent 34%);
}
.page-shade::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 62%); opacity: .45; }

.content-shell { width: min(1460px, calc(100% - 48px)); margin-inline: auto; }
.content-shell--narrow { width: min(920px, calc(100% - 48px)); }
.content-shell--medium { width: min(1100px, calc(100% - 48px)); }
.forum-main { min-height: calc(100vh - 180px); padding-top: 112px; }
.page-content { padding-top: 24px; padding-bottom: 72px; }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #9cc9da; font-size: 10px; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(115,255,79,.8); }

/* Header */
.topbar {
  position: fixed;
  z-index: 100;
  top: 16px;
  left: 50%;
  width: min(1460px, calc(100% - 34px));
  min-height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 0 18px;
  border: 1px solid rgba(94, 190, 235, .31);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(3, 11, 18, .94), rgba(1, 6, 10, .88));
  box-shadow: 0 18px 65px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(20px) saturate(145%);
  transition: top .22s ease, background .22s ease, border-color .22s ease;
}
.topbar.scrolled { top: 8px; background: rgba(2, 8, 13, .97); border-color: rgba(76, 197, 244, .43); }
.topbar::before, .topbar::after { content: ""; position: absolute; top: -1px; width: 29%; height: 2px; }
.topbar::before { left: 0; background: linear-gradient(90deg, var(--red), transparent); }
.topbar::after { right: 0; background: linear-gradient(270deg, var(--blue), transparent); }
.brand-mini { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-emblem { position: relative; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; border: 1px solid rgba(104,195,255,.42); background: #020407; box-shadow: 0 0 0 3px rgba(20,91,143,.1); }
.brand-emblem::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border-top: 1px solid rgba(255,76,96,.75); border-right: 1px solid rgba(49,154,255,.75); pointer-events: none; }
.brand-emblem img { width: 100%; height: 100%; object-fit: cover; }
.brand-emblem--small { width: 39px; height: 39px; }
.brand-emblem--large { width: 74px; height: 74px; }
.brand-emblem--error { width: 92px; height: 92px; }
.brand-wordmark { display: flex; flex-direction: column; align-items: flex-start; min-width: 175px; line-height: 1; }
.brand-wordmark__row { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.brand-wordmark__fox, .brand-wordmark b { font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif; font-size: 16px; font-weight: 1000; letter-spacing: .02em; }
.brand-wordmark__fox { display: inline-flex; text-shadow: 1px 1px 0 #000; }
.brand-letter--f { color: #39cfff; }
.brand-letter--o { color: #ffd83e; }
.brand-letter--x { color: #ff4055; }
.brand-wordmark b { background: linear-gradient(90deg, #d7ff58 0%, #8dff48 28%, #42f04e 58%, #0b8f3b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-wordmark small { margin-top: 5px; color: #72a1b7; font-size: 7px; font-weight: 850; letter-spacing: .27em; }
.nav { display: flex; align-items: stretch; justify-content: center; min-width: 0; }
.nav a { position: relative; min-height: 74px; display: flex; align-items: center; gap: 8px; padding: 0 clamp(12px, 1.6vw, 26px); color: #c4d0d7; font-size: 12px; font-weight: 820; text-transform: uppercase; white-space: nowrap; transition: color .2s ease, background .2s ease; }
.nav a .icon { color: #8196a1; font-size: 17px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.025); }
.nav a:hover .icon, .nav a.active .icon { color: var(--cyan); }
.nav a.active { color: var(--cyan); }
.nav a.active::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--cyan); }
.user-actions { display: flex; align-items: center; gap: 8px; }
.login-chip, .user-chip { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(115,255,79,.52); border-radius: 10px; padding: 8px 14px; background: rgba(34,110,31,.12); color: #bdffae; font-size: 12px; font-weight: 900; text-transform: uppercase; transition: border-color .2s ease, background .2s ease; }
.login-chip:hover { background: rgba(55,150,44,.18); border-color: rgba(115,255,79,.75); }
.user-chip { border-color: color-mix(in srgb, var(--user-accent) 55%, transparent); color: #d8f2ff; background: rgba(31,105,145,.12); text-transform: none; }
.logout-form { margin: 0; }
.logout-form button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(126,160,177,.23); border-radius: 9px; background: rgba(5,16,23,.68); color: #8ba3af; cursor: pointer; }
.logout-form button:hover { color: #fff; border-color: rgba(255,76,96,.45); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 9px; border: 1px solid rgba(73,179,229,.27); border-radius: 9px; background: rgba(6,19,28,.75); cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; border-radius: 5px; background: #cfe8f2; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { position: fixed; z-index: 89; inset: 0; display: none; border: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(5px); }

.install-banner { position: fixed; z-index: 95; left: 50%; top: 104px; transform: translateX(-50%); width: min(650px, calc(100% - 36px)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid rgba(255,200,60,.42); border-radius: 12px; background: rgba(25,19,6,.91); color: #ffe7a0; box-shadow: 0 14px 45px rgba(0,0,0,.55); }
.install-banner > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold); }
.install-banner div { display: grid; gap: 2px; }
.install-banner b { font-size: 12px; text-transform: uppercase; }
.install-banner small { color: #baa979; }
.install-banner a { padding: 8px 12px; border: 1px solid rgba(255,211,83,.38); border-radius: 8px; font-weight: 800; }

.flash { position: fixed; z-index: 130; top: 104px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 36px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(3,13,20,.96); color: #dcecf3; box-shadow: 0 18px 55px rgba(0,0,0,.55); }
.flash--success { border-color: rgba(115,255,79,.4); color: #cfffbe; }
.flash--error { border-color: rgba(255,76,96,.46); color: #ffd1d7; }
.flash button { border: 0; background: none; color: inherit; font-size: 20px; cursor: pointer; }

/* Buttons and common panels */
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 17px; border: 1px solid rgba(105,173,207,.31); border-radius: 10px; background: rgba(8,24,34,.76); color: #d6e7ee; cursor: pointer; font-size: 12px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(87,213,245,.55); background: rgba(10,34,47,.9); }
.button--primary { border-color: rgba(54,230,244,.58); background: linear-gradient(180deg, rgba(25,139,157,.33), rgba(6,57,70,.46)); color: #c9fbff; }
.button--danger { border-color: rgba(255,76,96,.45); color: #ffc8cf; background: rgba(112,24,36,.2); }
.button--wide { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.panel, .side-panel, .topic-panel, .editor-panel, .reply-panel, .admin-section { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(5,16,24,.94), rgba(2,9,14,.95)); box-shadow: var(--shadow); }
.form-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.form-alert--error { border: 1px solid rgba(255,76,96,.4); background: rgba(112,24,36,.18); color: #ffd0d6; }

/* Forum home */
.forum-hero { width: min(1460px, calc(100% - 48px)); min-height: 430px; margin: 0 auto 42px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); align-items: end; gap: 30px; padding: 72px 68px 54px; border: 1px solid rgba(91,181,225,.25); border-radius: 24px; background: linear-gradient(110deg, rgba(2,9,14,.9), rgba(2,10,16,.6) 56%, rgba(5,18,27,.84)), radial-gradient(circle at 24% 20%, rgba(44,158,201,.17), transparent 35%); box-shadow: 0 35px 100px rgba(0,0,0,.55); overflow: hidden; position: relative; }
.forum-hero::before { content: "FORUM / COMMUNITY"; position: absolute; right: 42px; top: 36px; color: rgba(144,203,225,.08); font-size: clamp(34px, 5.7vw, 86px); font-weight: 1000; letter-spacing: -.045em; white-space: nowrap; }
.forum-hero__content { position: relative; z-index: 1; max-width: 760px; }
.forum-hero h1 { margin: 18px 0 13px; font-family: "Arial Black", "Segoe UI Black", Impact, sans-serif; font-size: clamp(44px, 6vw, 84px); line-height: .94; letter-spacing: -.055em; text-transform: uppercase; }
.forum-hero h1 span { display: block; background: linear-gradient(90deg, #ecfaff 0%, #69dcff 36%, #64ff62 74%, #d2ff57 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.forum-hero__content > p { max-width: 650px; margin: 0; color: #afc3ce; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.forum-hero__status { position: relative; z-index: 1; align-self: end; padding: 22px; border: 1px solid rgba(102,190,232,.24); border-radius: 16px; background: rgba(2,11,17,.76); backdrop-filter: blur(14px); }
.status-kicker { display: block; margin-bottom: 11px; color: #6f8e9d; font-size: 9px; font-weight: 900; letter-spacing: .22em; }
.forum-hero__status > strong { display: flex; align-items: center; gap: 9px; color: #bfffad; font-size: 13px; letter-spacing: .08em; }
.forum-hero__status > strong i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px rgba(115,255,79,.75); }
.forum-hero__status dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 20px 0 0; border: 1px solid rgba(104,170,200,.15); border-radius: 10px; overflow: hidden; }
.forum-hero__status dl div { padding: 13px 10px; background: rgba(255,255,255,.018); text-align: center; }
.forum-hero__status dt { color: #7894a2; font-size: 9px; text-transform: uppercase; }
.forum-hero__status dd { margin: 5px 0 0; font-size: 20px; font-weight: 900; }

.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 24px; padding-bottom: 80px; }
.forum-content { min-width: 0; display: grid; gap: 30px; }
.forum-section { min-width: 0; }
.section-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 4px 11px; border-bottom: 1px solid rgba(114,188,219,.2); }
.section-header > div { display: flex; align-items: baseline; gap: 11px; }
.section-header h2 { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.section-index { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.section-header > span { color: #6f8996; font-size: 11px; text-transform: uppercase; }
.category-list { display: grid; gap: 10px; margin-top: 12px; }
.category-card { position: relative; min-height: 106px; display: grid; grid-template-columns: minmax(0, 1fr) 155px 230px 38px; align-items: center; gap: 18px; padding: 15px 15px 15px 18px; border: 1px solid rgba(107,185,220,.18); border-radius: 14px; background: linear-gradient(90deg, rgba(5,18,27,.94), rgba(3,12,19,.88)); overflow: hidden; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.category-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--category-accent); }
.category-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--category-accent) 38%, transparent); background: linear-gradient(90deg, rgba(7,24,35,.97), rgba(4,14,21,.92)); }
.category-card__main { min-width: 0; display: flex; align-items: center; gap: 16px; }
.category-icon, .category-banner__icon { width: 56px; height: 56px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--category-accent) 36%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--category-accent) 8%, rgba(4,14,21,.9)); color: var(--category-accent); font-size: 23px; }
.category-copy { min-width: 0; display: grid; gap: 7px; }
.category-copy strong { font-size: 16px; }
.category-copy small { color: #849ca8; font-size: 12px; line-height: 1.5; }
.category-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.category-counts span { color: #708895; font-size: 9px; text-align: center; text-transform: uppercase; }
.category-counts b { display: block; margin-bottom: 3px; color: #dcebf2; font-size: 17px; }
.category-latest { min-width: 0; display: grid; gap: 6px; padding-left: 16px; border-left: 1px solid rgba(117,178,204,.14); }
.category-latest a { overflow: hidden; color: #c8dce5; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.category-latest span { color: #69818d; font-size: 10px; }
.empty-note { color: #617986 !important; }
.category-arrow, .topic-open { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(101,169,199,.16); border-radius: 9px; color: #708995; transition: color .2s ease, border-color .2s ease; }
.category-card:hover .category-arrow, .topic-row:hover .topic-open { color: var(--category-accent, var(--cyan)); border-color: currentColor; }

.forum-sidebar { display: grid; gap: 18px; position: sticky; top: 105px; }
.side-panel { overflow: hidden; box-shadow: 0 20px 65px rgba(0,0,0,.34); }
.side-panel > header { display: flex; align-items: center; gap: 11px; padding: 17px; border-bottom: 1px solid rgba(111,180,210,.16); background: rgba(255,255,255,.012); }
.side-panel > header > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(69,194,231,.24); border-radius: 9px; color: var(--cyan); background: rgba(38,160,193,.07); }
.side-panel > header div { display: grid; gap: 3px; }
.side-panel > header b { font-size: 13px; text-transform: uppercase; letter-spacing: .055em; }
.side-panel > header small { color: #6e8996; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.latest-list { display: grid; }
.latest-list > a { display: grid; grid-template-columns: 8px minmax(0,1fr); align-items: center; gap: 11px; padding: 13px 17px; border-bottom: 1px solid rgba(110,173,201,.1); transition: background .18s ease; }
.latest-list > a:hover { background: rgba(255,255,255,.025); }
.latest-list > a:last-child { border-bottom: 0; }
.latest-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.latest-list a > span:last-child { min-width: 0; display: grid; gap: 5px; }
.latest-list b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.latest-list small { color: #6f8793; font-size: 10px; }
.network-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(112,180,210,.1); }
.network-stats div { padding: 15px 17px; background: #051019; }
.network-stats span { display: block; color: #69838f; font-size: 9px; text-transform: uppercase; }
.network-stats b { display: block; margin-top: 4px; font-size: 20px; }
.network-panel > p { margin: 0; padding: 13px 17px; color: #78939f; font-size: 11px; }
.network-panel > p a { color: var(--cyan); font-weight: 800; }
.rules-panel ol { margin: 0; padding: 15px 18px 18px 38px; color: #8da5b0; font-size: 11px; line-height: 1.65; }
.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 36px; color: #8ba2ad; text-align: center; }
.empty-state > span { font-size: 34px; color: #4b7486; }
.empty-state h2 { margin: 0; color: #dcebf2; font-size: 20px; }
.empty-state p { margin: 0; }
.empty-state--small { min-height: 110px; padding: 22px; font-size: 12px; }

/* Breadcrumbs and banners */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: #6e8793; font-size: 11px; }
.breadcrumbs .icon { font-size: 9px; color: #4e6874; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs span { color: #b7c9d1; }
.category-banner, .topic-banner, .admin-hero, .profile-hero, .search-hero, .page-hero { position: relative; display: flex; align-items: center; gap: 22px; margin-bottom: 20px; padding: 28px 30px; border: 1px solid rgba(102,187,224,.24); border-radius: 18px; background: linear-gradient(110deg, rgba(4,15,23,.96), rgba(4,14,21,.82)); overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.38); }
.category-banner::before, .topic-banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--category-accent); }
.category-banner > div { min-width: 0; flex: 1; }
.category-banner h1, .topic-banner h1, .admin-hero h1, .profile-hero h1, .search-hero h1, .page-hero h1 { margin: 6px 0 7px; font-size: clamp(28px, 4vw, 46px); letter-spacing: -.035em; }
.category-banner p, .topic-banner p, .admin-hero p, .search-hero p, .page-hero p { margin: 0; color: #8ea6b2; line-height: 1.55; }

/* Topic lists */
.topic-panel { overflow: hidden; box-shadow: 0 22px 70px rgba(0,0,0,.38); }
.topic-panel__header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid rgba(112,184,214,.17); }
.topic-panel__header > div { display: flex; align-items: baseline; gap: 10px; }
.topic-panel__header b { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.topic-panel__header span, .topic-panel__header small { color: #708995; font-size: 10px; }
.topic-panel__header > a { display: flex; align-items: center; gap: 7px; color: #8db2c1; font-size: 11px; }
.topic-list { display: grid; }
.topic-row { min-height: 80px; display: grid; grid-template-columns: 42px minmax(0,1fr) 150px 160px 38px; align-items: center; gap: 14px; padding: 11px 16px; border-bottom: 1px solid rgba(105,171,199,.105); background: rgba(255,255,255,.006); transition: background .18s ease; }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: rgba(255,255,255,.022); }
.topic-row.is-pinned { background: rgba(255,200,60,.025); }
.topic-state { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(77,174,213,.2); border-radius: 10px; background: rgba(43,142,180,.06); color: #62bfdc; }
.is-pinned .topic-state { color: var(--gold); border-color: rgba(255,200,60,.26); background: rgba(255,200,60,.06); }
.is-locked .topic-state { color: #8a9ca5; }
.topic-copy { min-width: 0; display: grid; gap: 6px; }
.topic-copy > a { overflow: hidden; color: #e8f2f6; font-size: 14px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.topic-copy > span { color: #6c8490; font-size: 10px; }
.topic-copy > span a { color: #91b9c8; }
.topic-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.topic-metrics span { display: flex; align-items: center; justify-content: center; gap: 5px; color: #637c88; font-size: 11px; }
.topic-metrics b { color: #adc1ca; }
.topic-last { min-width: 0; display: grid; gap: 4px; }
.topic-last b { overflow: hidden; color: #a9c2cd; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topic-last span { color: #627985; font-size: 9px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.pagination a, .pagination strong, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(105,174,205,.2); border-radius: 8px; background: rgba(5,16,23,.8); color: #879da8; font-size: 11px; }
.pagination strong { border-color: rgba(54,230,244,.5); color: var(--cyan); background: rgba(36,151,172,.12); }
.pagination span { border-color: transparent; background: transparent; }

/* Topic page/posts */
.topic-banner { justify-content: space-between; }
.topic-banner__main { min-width: 0; }
.topic-flags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.topic-flags span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid rgba(255,200,60,.25); border-radius: 6px; color: #efd37e; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.topic-banner__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 0 0 auto; }
.topic-banner__stats > span { min-width: 94px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 7px; align-items: center; padding: 11px 13px; border: 1px solid rgba(98,175,207,.18); border-radius: 11px; background: rgba(255,255,255,.014); }
.topic-banner__stats .icon { grid-row: 1 / 3; color: var(--cyan); font-size: 20px; }
.topic-banner__stats b { font-size: 18px; }
.topic-banner__stats small { color: #68818d; font-size: 9px; text-transform: uppercase; }
.moderator-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; padding: 8px 12px 8px 17px; border: 1px solid rgba(198,103,255,.25); border-radius: 12px; background: rgba(45,17,61,.21); }
.moderator-bar > span { display: flex; align-items: center; gap: 8px; color: #dfb7f7; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.moderator-bar > div { display: flex; gap: 7px; }
.moderator-bar form { margin: 0; }
.moderator-bar button { min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(190,128,229,.25); border-radius: 8px; background: rgba(72,31,93,.24); color: #d5b3e8; cursor: pointer; font-size: 10px; }
.moderator-bar button.danger { border-color: rgba(255,76,96,.3); color: #ffbac3; background: rgba(110,22,36,.2); }
.posts-list { display: grid; gap: 14px; }
.forum-post { display: grid; grid-template-columns: 190px minmax(0,1fr); border: 1px solid rgba(106,181,213,.2); border-radius: 16px; background: linear-gradient(180deg, rgba(4,15,23,.96), rgba(2,10,15,.96)); overflow: hidden; box-shadow: 0 18px 55px rgba(0,0,0,.33); }
.post-author { padding: 22px 18px; border-right: 1px solid rgba(107,177,207,.15); background: rgba(255,255,255,.012); text-align: center; }
.user-avatar { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto; border: 1px solid color-mix(in srgb, var(--user-accent) 55%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--user-accent) 12%, #041018); color: #effcff; font-size: 28px; font-weight: 950; box-shadow: inset 0 0 18px rgba(255,255,255,.025); }
.user-avatar--small { width: 28px; height: 28px; margin: 0; border-radius: 7px; font-size: 12px; }
.user-avatar--tiny { width: 28px; height: 28px; display: inline-grid; margin: 0 8px 0 0; border-radius: 7px; font-size: 11px; vertical-align: middle; }
.author-name { display: block; margin-top: 12px; color: #e5f2f7; font-size: 14px; font-weight: 850; }
.role-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 8px; border: 1px solid rgba(113,184,213,.22); border-radius: 6px; color: #9eb4bf; background: rgba(60,105,123,.08); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.role-badge--admin { border-color: rgba(255,76,96,.34); color: #ffb2bd; background: rgba(120,28,42,.15); }
.role-badge--moderator { border-color: rgba(198,103,255,.36); color: #e3b8ff; background: rgba(87,31,119,.16); }
.user-title { display: block; margin-top: 8px; color: #7e98a4; font-size: 10px; }
.post-author dl { display: grid; gap: 7px; margin: 18px 0 0; }
.post-author dl div { display: flex; justify-content: space-between; gap: 8px; color: #617b87; font-size: 9px; }
.post-author dd { margin: 0; color: #9db3bd; }
.post-content { min-width: 0; display: flex; flex-direction: column; padding: 19px 22px 16px; }
.post-content > header { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid rgba(108,175,203,.12); color: #667f8b; font-size: 9px; }
.post-content > header a { color: var(--cyan); font-weight: 850; }
.post-content > header span { margin-left: auto; }
.post-body { min-height: 130px; padding: 22px 2px; color: #c9d9e0; font-size: 14px; line-height: 1.75; word-break: break-word; }
.post-body strong { color: #f7fbfd; }
.post-body blockquote { margin: 16px 0; padding: 13px 16px; border-left: 3px solid var(--cyan); background: rgba(31,139,161,.08); color: #a9c3ce; }
.post-body pre { max-width: 100%; overflow: auto; margin: 16px 0; padding: 15px; border: 1px solid rgba(105,177,206,.18); border-radius: 10px; background: #02080d; color: #b8e7cf; white-space: pre-wrap; }
.post-signature { padding-top: 13px; border-top: 1px solid rgba(108,175,203,.11); color: #6f8994; font-size: 10px; line-height: 1.5; }
.post-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.post-actions a, .post-actions button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #718d99; cursor: pointer; font-size: 10px; }
.post-actions a:hover, .post-actions button:hover { color: var(--cyan); }
.post-actions form { margin: 0; }
.forum-post.is-deleted { opacity: .66; }
.reply-panel { margin-top: 22px; padding: 22px; box-shadow: 0 20px 65px rgba(0,0,0,.36); }
.reply-panel > header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.reply-panel > header > span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(54,230,244,.25); border-radius: 10px; color: var(--cyan); background: rgba(38,151,173,.07); }
.reply-panel h2 { margin: 0 0 4px; font-size: 17px; }
.reply-panel p { margin: 0; color: #718a96; font-size: 11px; }
.locked-message, .login-to-reply { display: flex; align-items: center; gap: 15px; }
.locked-message > .icon, .login-to-reply > span { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(109,161,183,.2); border-radius: 11px; color: #8199a4; }
.locked-message div, .login-to-reply div { flex: 1; display: grid; gap: 4px; }
.locked-message span { color: #718a95; font-size: 11px; }

/* Forms/editors */
.editor-panel { padding: 26px; }
.editor-panel > header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.editor-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--category-accent, var(--cyan)) 38%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--category-accent, var(--cyan)) 8%, #041018); color: var(--category-accent, var(--cyan)); font-size: 23px; }
.editor-panel h1 { margin: 5px 0 5px; font-size: 28px; }
.editor-panel header p { margin: 0; color: #758e99; font-size: 12px; }
.editor-form, .setup-form, .edit-profile-panel form, .admin-form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #9eb3bd; font-size: 11px; font-weight: 750; }
label small { color: #657e89; font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid rgba(105,178,208,.22); border-radius: 9px; outline: none; background: rgba(1,8,12,.83); color: #e6f2f6; padding: 11px 12px; font-size: 13px; transition: border-color .18s ease, background .18s ease; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { border-color: rgba(54,230,244,.55); background: rgba(2,12,18,.96); }
.editor-help { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #647e8a; font-size: 9px; }
.editor-help code { padding: 2px 4px; border: 1px solid rgba(105,175,204,.15); border-radius: 4px; color: #8db5c5; background: rgba(255,255,255,.02); }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid--db { grid-template-columns: 1.2fr .55fr 1.2fr 1fr; }
.span-2 { grid-column: span 2; }
.check-row { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.check-row input { width: 18px; height: 18px; }

/* Auth */
.auth-main { display: grid; align-items: center; padding: 132px 24px 70px; }
.auth-shell { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 470px; align-items: stretch; border: 1px solid rgba(100,188,225,.25); border-radius: 22px; background: rgba(2,9,14,.88); box-shadow: 0 35px 100px rgba(0,0,0,.58); overflow: hidden; }
.auth-promo { position: relative; padding: 70px 62px; background: linear-gradient(120deg, rgba(6,24,34,.78), rgba(2,10,15,.9)); overflow: hidden; }
.auth-promo::after { content: "FOX"; position: absolute; right: -20px; bottom: -52px; color: rgba(93,190,225,.055); font-family: "Arial Black", Impact, sans-serif; font-size: 220px; line-height: 1; }
.auth-promo h1 { position: relative; z-index: 1; margin: 19px 0 18px; font-size: clamp(42px, 5.2vw, 70px); line-height: .98; letter-spacing: -.055em; text-transform: uppercase; }
.auth-promo h1 span { color: #7cff5a; }
.auth-promo > p { position: relative; z-index: 1; max-width: 540px; color: #91a9b4; font-size: 14px; line-height: 1.75; }
.auth-features { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 30px; }
.auth-features span { display: flex; align-items: center; gap: 9px; color: #aec2cb; font-size: 11px; }
.auth-features .icon { color: var(--cyan); }
.auth-card { padding: 40px; border-left: 1px solid rgba(105,177,207,.16); background: rgba(2,9,14,.96); }
.auth-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 26px; }
.auth-brand div { display: grid; gap: 5px; }
.auth-brand b { font-size: 20px; }
.auth-brand span { color: #66818d; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 20px; padding: 4px; border: 1px solid rgba(99,174,205,.17); border-radius: 10px; background: rgba(255,255,255,.015); }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: #718b97; cursor: pointer; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.auth-tabs button.active { background: rgba(43,151,179,.14); color: var(--cyan); }
.auth-form { display: none; gap: 14px; }
.auth-form.active { display: grid; }
.auth-note { margin: 0 0 3px; padding: 10px 12px; border: 1px solid rgba(255,200,60,.18); border-radius: 8px; background: rgba(255,200,60,.04); color: #a8955e; font-size: 10px; line-height: 1.5; }
.auth-footer-note { margin: 18px 0 0; color: #5f7884; font-size: 9px; text-align: center; }

/* Profile */
.profile-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; }
.user-avatar--hero { width: 98px; height: 98px; margin: 0; border-radius: 22px; font-size: 40px; }
.profile-main .role-badge { margin-top: 0; }
.profile-main h1 { margin: 7px 0 5px; }
.profile-main p { margin: 0; color: #849ca7; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 150px); gap: 1px; margin: 0; border: 1px solid rgba(105,175,204,.15); border-radius: 12px; overflow: hidden; }
.profile-stats div { padding: 12px 14px; background: rgba(255,255,255,.012); }
.profile-stats dt { color: #657f8a; font-size: 8px; text-transform: uppercase; }
.profile-stats dd { margin: 5px 0 0; color: #d6e7ed; font-size: 13px; font-weight: 800; }
.profile-grid { display: grid; grid-template-columns: minmax(0,1fr) 350px; align-items: start; gap: 20px; }
.profile-content, .profile-sidebar { display: grid; gap: 18px; }
.profile-sidebar { position: sticky; top: 105px; }
.profile-about, .activity-panel { padding: 22px; }
.profile-about header, .activity-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.profile-about h2, .activity-panel h2 { margin: 0; font-size: 15px; text-transform: uppercase; }
.profile-about p { margin: 0; color: #a4b8c1; line-height: 1.7; }
.activity-panel header span { color: #6d8792; font-size: 10px; }
.compact-topic-list { display: grid; }
.compact-topic-list > a { min-height: 62px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(107,174,202,.11); }
.compact-topic-list > a:last-child { border-bottom: 0; }
.compact-topic-list > a:hover b { color: var(--cyan); }
.compact-topic-list > a > span:first-child { min-width: 0; display: grid; gap: 5px; }
.compact-topic-list b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-topic-list small { overflow: hidden; color: #6e8792; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compact-topic-list > a > .icon { color: #55717e; }
.identity-panel dl { margin: 0; padding: 8px 17px 17px; }
.identity-panel dl div { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid rgba(106,172,201,.1); }
.identity-panel dt { color: #637c87; font-size: 8px; text-transform: uppercase; }
.identity-panel dd { margin: 0; color: #b4c8d1; font-size: 11px; }
.uuid-value { overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 9px !important; }
.edit-profile-panel form { padding: 15px 17px 18px; }

/* Search */
.search-hero { justify-content: space-between; }
.search-hero > div { max-width: 470px; }
.search-box { width: min(520px, 48%); min-height: 54px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 5px 5px 5px 15px; border: 1px solid rgba(54,230,244,.3); border-radius: 12px; background: rgba(1,8,13,.72); }
.search-box .icon { color: var(--cyan); }
.search-box input { border: 0; background: transparent; padding: 9px 0; }
.search-box button { height: 42px; border: 1px solid rgba(54,230,244,.35); border-radius: 8px; background: rgba(32,143,165,.18); color: #bff9ff; padding: 0 16px; cursor: pointer; font-size: 11px; font-weight: 850; }
.search-results { margin-top: 18px; }
.search-tips { padding: 28px; }
.search-tips h2 { margin: 0 0 20px; }
.search-tips > div { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid rgba(106,173,201,.11); }
.search-tips > div span { color: var(--cyan); font-size: 11px; font-weight: 900; }
.search-tips > div p { margin: 0; color: #8ca3ae; }

/* Admin */
.admin-hero { justify-content: space-between; }
.admin-hero .role-badge { margin: 0; padding: 8px 11px; }
.admin-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 22px; }
.admin-metrics > div { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border: 1px solid rgba(106,178,208,.18); border-radius: 13px; background: rgba(4,15,22,.91); }
.admin-metrics span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(54,230,244,.18); border-radius: 10px; color: var(--cyan); }
.admin-metrics b { font-size: 22px; }
.admin-metrics small { color: #667f8b; font-size: 9px; text-transform: uppercase; }
.admin-section { margin-bottom: 22px; padding: 22px; }
.admin-section > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(106,174,202,.14); }
.admin-section > header > div { display: flex; align-items: center; gap: 11px; }
.admin-section > header span { color: var(--cyan); font-size: 10px; font-weight: 900; }
.admin-section h2 { margin: 0; font-size: 17px; text-transform: uppercase; }
.admin-section > header p { margin: 0; color: #6f8994; font-size: 10px; }
.admin-create, .admin-category { border: 1px solid rgba(106,175,204,.16); border-radius: 11px; background: rgba(255,255,255,.009); }
.admin-create { margin-bottom: 12px; }
.admin-create summary, .admin-category summary { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 11px 14px; cursor: pointer; list-style: none; }
.admin-create summary::-webkit-details-marker, .admin-category summary::-webkit-details-marker { display: none; }
.admin-create summary { color: var(--cyan); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.admin-form { padding: 15px; border-top: 1px solid rgba(106,174,202,.12); }
.admin-category-list { display: grid; gap: 8px; }
.admin-category summary > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 5px; }
.admin-category summary b { font-size: 12px; }
.admin-category summary small { color: #69828d; font-size: 9px; }
.admin-category summary > .icon { color: #607b87; transition: transform .2s ease; }
.admin-category[open] summary > .icon { transform: rotate(90deg); }
.admin-category.is-inactive { opacity: .62; }
.table-wrap { overflow: auto; border: 1px solid rgba(106,175,204,.14); border-radius: 11px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.admin-table th, .admin-table td { padding: 11px 12px; border-bottom: 1px solid rgba(106,175,204,.1); text-align: left; font-size: 10px; }
.admin-table th { color: #6d8792; background: rgba(255,255,255,.012); text-transform: uppercase; }
.admin-table td { color: #9fb4bd; }
.admin-table td > a { display: inline-flex; align-items: center; font-weight: 800; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr.is-muted { opacity: .55; }
.inline-form { display: flex; align-items: center; gap: 5px; }
.inline-form select { min-width: 110px; padding: 7px; }
.inline-form button, .table-action { border: 1px solid rgba(103,178,208,.2); border-radius: 6px; background: rgba(28,100,128,.12); color: #9ec4d2; cursor: pointer; padding: 7px 8px; font-size: 9px; }
.compact-topic-list--admin > a { grid-template-columns: minmax(0,1fr) auto auto; }
.topic-mini-stats { color: #718b96; font-size: 9px; }

/* Installation and errors */
.install-main { padding-bottom: 80px; }
.page-hero--compact { margin: 0 auto 20px; width: min(920px, calc(100% - 48px)); }
.setup-form { padding: 26px; }
.form-section { display: flex; align-items: flex-start; gap: 13px; margin-top: 14px; padding-top: 22px; border-top: 1px solid rgba(106,174,202,.14); }
.form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section > span { color: var(--cyan); font-size: 10px; font-weight: 900; }
.form-section h2 { margin: 0 0 4px; font-size: 17px; }
.form-section p { margin: 0; color: #718b96; font-size: 10px; }
.success-panel { padding: 42px; text-align: center; }
.success-panel .panel-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 16px; border: 1px solid rgba(115,255,79,.35); border-radius: 16px; color: var(--green); font-size: 28px; background: rgba(55,154,44,.08); }
.success-panel h2 { margin: 0 0 10px; }
.success-panel p { max-width: 640px; margin: 0 auto 20px; color: #8da5b0; line-height: 1.65; }
.success-panel .button-row { justify-content: center; }
.error-main { min-height: 100vh; display: grid; place-items: center; padding: 130px 24px 70px; }
.error-card { position: relative; width: min(650px,100%); padding: 54px; border: 1px solid rgba(105,183,215,.25); border-radius: 22px; background: rgba(2,9,14,.94); box-shadow: 0 35px 100px rgba(0,0,0,.58); text-align: center; overflow: hidden; }
.error-code { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); color: rgba(105,194,226,.055); font-size: 150px; font-weight: 1000; }
.error-card .brand-emblem { margin: 0 auto 20px; }
.error-card h1 { position: relative; margin: 0 0 11px; font-size: 34px; }
.error-card p { position: relative; margin: 0 auto 22px; color: #8ca4af; line-height: 1.65; }
.error-card .button-row { justify-content: center; }

/* Footer */
.footer { position: relative; width: min(1460px, calc(100% - 48px)); min-height: 110px; margin: 0 auto 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 22px 26px; border: 1px solid rgba(105,182,214,.18); border-radius: 17px; background: rgba(2,9,14,.91); overflow: hidden; }
.footer-ghost { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); color: rgba(123,193,221,.04); font-size: 70px; font-weight: 1000; white-space: nowrap; }
.footer-brand { position: relative; display: flex; align-items: center; gap: 11px; }
.footer-brand div { display: grid; gap: 4px; }
.footer-brand b { font-size: 13px; }
.footer-brand span { color: #617985; font-size: 9px; }
.footer-center { position: relative; display: flex; align-items: center; gap: 8px; color: #718a95; font-size: 10px; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(115,255,79,.65); }
.footer-links { position: relative; display: flex; justify-content: flex-end; gap: 16px; color: #718a95; font-size: 10px; }
.footer-links a:hover { color: var(--cyan); }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: auto auto 1fr auto; }
  .nav-toggle { display: block; order: 2; }
  .nav { position: fixed; z-index: 101; top: 92px; right: 17px; width: min(340px, calc(100vw - 34px)); display: none; padding: 10px; border: 1px solid rgba(95,181,218,.3); border-radius: 13px; background: rgba(2,9,14,.98); box-shadow: 0 24px 70px rgba(0,0,0,.65); }
  body.nav-open .nav { display: grid; }
  body.nav-open .nav-backdrop { display: block; }
  .nav a { min-height: 48px; border-radius: 8px; padding: 0 14px; }
  .nav a.active::after { left: 0; right: auto; top: 20%; bottom: 20%; width: 3px; height: auto; }
  .user-actions { justify-self: end; }
  .forum-layout, .profile-grid { grid-template-columns: minmax(0,1fr) 320px; }
  .category-card { grid-template-columns: minmax(0,1fr) 125px 38px; }
  .category-latest { display: none; }
  .topic-row { grid-template-columns: 42px minmax(0,1fr) 120px 38px; }
  .topic-last { display: none; }
  .form-grid--db { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr 430px; }
  .auth-promo { padding: 58px 45px; }
}

@media (max-width: 900px) {
  .content-shell, .content-shell--narrow, .content-shell--medium, .forum-hero, .footer { width: min(100% - 28px, 1460px); }
  .forum-main { padding-top: 102px; }
  .brand-wordmark { min-width: 0; }
  .brand-wordmark small { display: none; }
  .forum-hero { min-height: 0; grid-template-columns: 1fr; padding: 60px 34px 34px; }
  .forum-hero__status { width: 100%; }
  .forum-layout, .profile-grid { grid-template-columns: 1fr; }
  .forum-sidebar, .profile-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .rules-panel { grid-column: 1 / -1; }
  .category-card { grid-template-columns: minmax(0,1fr) 110px 34px; }
  .forum-post { grid-template-columns: 150px minmax(0,1fr); }
  .post-author { padding: 18px 12px; }
  .profile-hero { grid-template-columns: auto minmax(0,1fr); }
  .profile-stats { grid-column: 1 / -1; width: 100%; grid-template-columns: repeat(4,1fr); }
  .search-hero { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-promo { min-height: 360px; }
  .auth-card { border-left: 0; border-top: 1px solid rgba(105,177,207,.16); }
  .admin-metrics { grid-template-columns: 1fr 1fr; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer-center { display: none; }
}

@media (max-width: 680px) {
  .topbar { min-height: 66px; top: 8px; width: calc(100% - 16px); padding: 0 10px; gap: 8px; }
  .brand-emblem { width: 42px; height: 42px; }
  .brand-wordmark__fox, .brand-wordmark b { font-size: 13px; }
  .user-chip span:last-child, .login-chip span { display: none; }
  .user-chip, .login-chip { width: 40px; min-width: 40px; padding: 6px; }
  .logout-form { display: none; }
  .nav { top: 82px; right: 8px; width: calc(100vw - 16px); }
  .flash { top: 84px; }
  .forum-main { padding-top: 88px; }
  .page-content { padding-top: 16px; padding-bottom: 48px; }
  .forum-hero { width: calc(100% - 16px); margin-bottom: 24px; padding: 48px 22px 24px; border-radius: 18px; }
  .forum-hero::before { display: none; }
  .forum-hero h1 { font-size: 42px; }
  .forum-hero__content > p { font-size: 13px; }
  .hero-actions .button { flex: 1; }
  .forum-hero__status dl { grid-template-columns: 1fr 1fr 1fr; }
  .content-shell, .content-shell--narrow, .content-shell--medium, .footer { width: calc(100% - 16px); }
  .forum-sidebar, .profile-sidebar { grid-template-columns: 1fr; }
  .rules-panel { grid-column: auto; }
  .section-header { align-items: flex-end; }
  .category-card { grid-template-columns: minmax(0,1fr) 32px; min-height: 94px; padding: 13px; }
  .category-icon { width: 48px; height: 48px; font-size: 19px; }
  .category-counts { display: none; }
  .category-copy small { font-size: 10px; }
  .category-banner, .topic-banner, .admin-hero, .profile-hero, .search-hero, .page-hero { padding: 22px 18px; border-radius: 14px; }
  .category-banner { align-items: flex-start; flex-wrap: wrap; }
  .category-banner__icon { width: 48px; height: 48px; }
  .category-banner .button { width: 100%; }
  .topic-row { grid-template-columns: 38px minmax(0,1fr) 32px; gap: 10px; padding: 10px 11px; }
  .topic-metrics { display: none; }
  .topic-copy > a { font-size: 12px; }
  .topic-state { width: 36px; height: 36px; }
  .topic-banner { align-items: flex-start; flex-direction: column; }
  .topic-banner__stats { width: 100%; }
  .topic-banner__stats > span { flex: 1; }
  .moderator-bar { align-items: flex-start; flex-direction: column; }
  .moderator-bar > div { width: 100%; flex-wrap: wrap; }
  .forum-post { grid-template-columns: 1fr; }
  .post-author { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; border-right: 0; border-bottom: 1px solid rgba(107,177,207,.15); text-align: left; }
  .post-author .user-avatar { width: 48px; height: 48px; margin: 0; border-radius: 11px; font-size: 18px; grid-row: 1 / 3; }
  .post-author .author-name { margin: 0; }
  .post-author .role-badge { margin: 0; justify-self: end; }
  .post-author .user-title { margin: 0; }
  .post-author dl { display: none; }
  .post-content { padding: 15px; }
  .post-body { min-height: 90px; padding: 18px 0; font-size: 13px; }
  .reply-panel { padding: 17px; }
  .login-to-reply { align-items: flex-start; flex-wrap: wrap; }
  .login-to-reply .button { width: 100%; }
  .editor-panel { padding: 18px; }
  .editor-panel > header { align-items: flex-start; }
  .form-grid, .form-grid--db { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .editor-help { align-items: flex-start; flex-direction: column; gap: 6px; }
  .form-actions .button { flex: 1; }
  .profile-hero { grid-template-columns: auto minmax(0,1fr); }
  .user-avatar--hero { width: 68px; height: 68px; border-radius: 16px; font-size: 26px; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .search-box { grid-template-columns: auto minmax(0,1fr); }
  .search-box button { grid-column: 1 / -1; width: 100%; }
  .auth-main { padding: 95px 8px 45px; }
  .auth-promo { min-height: 310px; padding: 42px 24px; }
  .auth-promo h1 { font-size: 42px; }
  .auth-card { padding: 26px 20px; }
  .admin-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-section { padding: 16px; }
  .admin-section > header { align-items: flex-start; flex-direction: column; }
  .admin-category summary { padding: 9px; }
  .footer { grid-template-columns: 1fr; padding: 18px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; }
  .footer-ghost { display: none; }
  .error-card { padding: 45px 20px; }
}

@media (max-width: 680px) {
  .page-backdrop img { object-position: 50% 40%; transform: scale(1.055); }
  .page-shade {
    background:
      linear-gradient(180deg, rgba(1,4,7,.4) 0%, rgba(1,5,9,.67) 30%, rgba(2,7,11,.91) 72%, #02060a 100%),
      radial-gradient(circle at 10% 27%, rgba(255,58,44,.11), transparent 34%),
      radial-gradient(circle at 90% 27%, rgba(38,124,255,.13), transparent 36%);
  }
  html[data-theme="light"] .page-backdrop img { opacity: .12; }
}

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


/* Forum navigation additions */
.latest-hero, .members-hero { justify-content: space-between; }
.latest-hero > div, .members-hero > div { min-width: 0; flex: 1; }
.member-total { min-width: 130px; display: grid; justify-items: end; gap: 2px; }
.member-total b { font-size: 30px; line-height: 1; }
.member-total span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topic-state[style*="--topic-accent"] { border-color: color-mix(in srgb, var(--topic-accent) 35%, transparent); color: var(--topic-accent); background: color-mix(in srgb, var(--topic-accent) 8%, transparent); }

/* Profile theme selector */
.theme-panel { overflow: hidden; }
.theme-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 15px 17px 10px; }
.theme-switcher button { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; padding: 11px; border: 1px solid rgba(105,178,208,.2); border-radius: 10px; background: rgba(255,255,255,.012); color: #78919d; cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.theme-switcher button:hover { transform: translateY(-1px); border-color: rgba(54,230,244,.42); }
.theme-switcher button.active { border-color: rgba(54,230,244,.55); background: rgba(29,142,163,.13); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(54,230,244,.07); }
.theme-switcher button > .icon { font-size: 20px; }
.theme-switcher button span { min-width: 0; display: grid; gap: 3px; }
.theme-switcher button b { color: currentColor; font-size: 11px; }
.theme-switcher button small { overflow: hidden; color: #657f8b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.theme-panel > p { margin: 0; padding: 0 17px 17px; color: #617b87; font-size: 9px; line-height: 1.5; }

/* Members directory */
.member-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.member-card { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto; align-items: center; gap: 12px 15px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(5,16,24,.94), rgba(2,9,14,.95)); box-shadow: 0 16px 50px rgba(0,0,0,.3); transition: transform .18s ease, border-color .18s ease, background .18s ease; overflow: hidden; }
.member-card::before { content: ""; position: absolute; left: 0; top: 16%; bottom: 16%; width: 3px; border-radius: 0 3px 3px 0; background: var(--user-accent); }
.member-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--user-accent) 45%, transparent); background: linear-gradient(180deg, rgba(7,22,31,.98), rgba(3,12,18,.98)); }
.member-card .user-avatar { width: 58px; height: 58px; margin: 0; border-radius: 14px; font-size: 22px; grid-row: 1 / 3; }
.member-card__main { min-width: 0; display: grid; gap: 5px; }
.member-card__main .role-badge { width: max-content; margin: 0; }
.member-card__main > b { overflow: hidden; color: #e6f2f7; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.member-card__main > small { overflow: hidden; color: #718a96; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-card__stats { display: flex; flex-wrap: wrap; gap: 10px; color: #69828e; font-size: 8px; text-transform: uppercase; }
.member-card__stats b { color: #a9c2cd; }
.member-card__seen { justify-self: end; color: #5f7884; font-size: 8px; }
.member-empty { grid-column: 1 / -1; }

/* Light theme */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4f7;
  --bg-soft: #f7fafb;
  --surface: rgba(255,255,255,.95);
  --surface-2: rgba(247,251,253,.95);
  --surface-strong: rgba(255,255,255,.985);
  --line: rgba(30,96,125,.17);
  --line-strong: rgba(21,113,151,.3);
  --text: #13242e;
  --muted: #5f7480;
  --cyan: #087f96;
  --blue: #146dcc;
  --green: #2b9638;
  --red: #d73b4c;
  --gold: #a66d00;
  --purple: #8847b2;
  --shadow: 0 22px 60px rgba(35,66,82,.13);
}
html[data-theme="light"], html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] body::selection { color: #fff; background: rgba(8,127,150,.28); }
html[data-theme="light"] .page-backdrop img { opacity: .16; filter: saturate(.58) contrast(.92) brightness(1.38); }
html[data-theme="light"] .page-shade { background: linear-gradient(180deg, rgba(247,251,253,.78), rgba(238,244,247,.92) 45%, #eef4f7 100%), radial-gradient(circle at 12% 27%, rgba(210,62,48,.055), transparent 31%), radial-gradient(circle at 88% 27%, rgba(30,112,208,.075), transparent 34%), radial-gradient(circle at 50% 12%, rgba(50,157,196,.09), transparent 42%); }
html[data-theme="light"] .page-shade::after { opacity: .28; background-image: linear-gradient(rgba(31,80,101,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(31,80,101,.04) 1px, transparent 1px); }
html[data-theme="light"] .topbar,
html[data-theme="light"] .topbar.scrolled,
html[data-theme="light"] .footer,
html[data-theme="light"] .nav,
html[data-theme="light"] .flash { background: rgba(255,255,255,.94); border-color: rgba(24,111,149,.2); box-shadow: 0 16px 48px rgba(35,66,82,.13); }
html[data-theme="light"] .nav a { color: #435b68; }
html[data-theme="light"] .nav a:hover { color: #102630; background: rgba(8,127,150,.055); }
html[data-theme="light"] .nav a .icon { color: #617985; }
html[data-theme="light"] .brand-wordmark__fox { text-shadow: none; }
html[data-theme="light"] .brand-wordmark small { color: #537180; }
html[data-theme="light"] .brand-emblem { background: #071017; }
html[data-theme="light"] .user-chip { color: #214654; background: rgba(29,126,161,.08); }
html[data-theme="light"] .login-chip { color: #2b7130; background: rgba(43,150,56,.08); }
html[data-theme="light"] .logout-form button,
html[data-theme="light"] .nav-toggle { background: rgba(239,246,249,.95); color: #506a77; }
html[data-theme="light"] .nav-toggle span { background: #35515f; }
html[data-theme="light"] .panel,
html[data-theme="light"] .side-panel,
html[data-theme="light"] .topic-panel,
html[data-theme="light"] .editor-panel,
html[data-theme="light"] .reply-panel,
html[data-theme="light"] .admin-section,
html[data-theme="light"] .category-banner,
html[data-theme="light"] .topic-banner,
html[data-theme="light"] .admin-hero,
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .search-hero,
html[data-theme="light"] .page-hero,
html[data-theme="light"] .forum-post,
html[data-theme="light"] .auth-shell,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .error-card,
html[data-theme="light"] .member-card { background: rgba(255,255,255,.94); border-color: var(--line); box-shadow: var(--shadow); }
html[data-theme="light"] .forum-hero { background: linear-gradient(110deg, rgba(255,255,255,.95), rgba(246,251,253,.88) 58%, rgba(239,247,250,.93)), radial-gradient(circle at 24% 20%, rgba(44,158,201,.12), transparent 35%); border-color: rgba(35,118,151,.19); box-shadow: var(--shadow); }
html[data-theme="light"] .forum-hero::before { color: rgba(20,93,122,.055); }
html[data-theme="light"] .forum-hero h1 { color: #102630; }
html[data-theme="light"] .forum-hero__content > p,
html[data-theme="light"] .category-banner p,
html[data-theme="light"] .topic-banner p,
html[data-theme="light"] .admin-hero p,
html[data-theme="light"] .search-hero p,
html[data-theme="light"] .page-hero p,
html[data-theme="light"] .profile-main p { color: #5b717d; }
html[data-theme="light"] .forum-hero__status { background: rgba(255,255,255,.7); border-color: rgba(35,118,151,.18); }
html[data-theme="light"] .forum-hero__status dl,
html[data-theme="light"] .profile-stats { border-color: rgba(35,118,151,.14); }
html[data-theme="light"] .forum-hero__status dl div,
html[data-theme="light"] .profile-stats div { background: rgba(227,240,246,.55); }
html[data-theme="light"] .forum-hero__status dt,
html[data-theme="light"] .profile-stats dt { color: #667c87; }
html[data-theme="light"] .forum-hero__status dd,
html[data-theme="light"] .profile-stats dd { color: #17313d; }
html[data-theme="light"] .button { background: rgba(255,255,255,.82); color: #25424f; border-color: rgba(26,107,141,.23); }
html[data-theme="light"] .button:hover { background: #fff; border-color: rgba(8,127,150,.45); }
html[data-theme="light"] .button--primary { color: #075d70; background: linear-gradient(180deg, rgba(52,192,213,.17), rgba(17,137,158,.12)); }
html[data-theme="light"] .category-card,
html[data-theme="light"] .topic-row,
html[data-theme="light"] .admin-create,
html[data-theme="light"] .admin-category { background: rgba(255,255,255,.72); border-color: rgba(31,104,134,.14); }
html[data-theme="light"] .category-card:hover,
html[data-theme="light"] .topic-row:hover,
html[data-theme="light"] .member-card:hover { background: #fff; }
html[data-theme="light"] .category-copy strong,
html[data-theme="light"] .topic-copy > a,
html[data-theme="light"] .latest-list b,
html[data-theme="light"] .empty-state h2,
html[data-theme="light"] .author-name,
html[data-theme="light"] .post-body strong,
html[data-theme="light"] .member-card__main > b { color: #16303c; }
html[data-theme="light"] .category-copy small,
html[data-theme="light"] .category-latest span,
html[data-theme="light"] .latest-list small,
html[data-theme="light"] .network-stats span,
html[data-theme="light"] .topic-copy > span,
html[data-theme="light"] .topic-last span,
html[data-theme="light"] .post-content > header,
html[data-theme="light"] .post-signature,
html[data-theme="light"] .compact-topic-list small,
html[data-theme="light"] .member-card__main > small,
html[data-theme="light"] .member-card__seen { color: #607783; }
html[data-theme="light"] .category-latest a,
html[data-theme="light"] .topic-copy > span a,
html[data-theme="light"] .topic-last b,
html[data-theme="light"] .topic-metrics b,
html[data-theme="light"] .identity-panel dd,
html[data-theme="light"] .profile-about p,
html[data-theme="light"] .member-card__stats b { color: #375563; }
html[data-theme="light"] .side-panel > header,
html[data-theme="light"] .topic-panel__header,
html[data-theme="light"] .post-content > header,
html[data-theme="light"] .compact-topic-list > a,
html[data-theme="light"] .identity-panel dl div,
html[data-theme="light"] .topic-row,
html[data-theme="light"] .search-tips > div { border-color: rgba(31,104,134,.11); }
html[data-theme="light"] .post-author { background: rgba(231,241,246,.5); border-color: rgba(31,104,134,.12); }
html[data-theme="light"] .post-body { color: #243e4a; }
html[data-theme="light"] .post-body blockquote { background: rgba(8,127,150,.07); color: #3f5d69; }
html[data-theme="light"] .post-body pre { background: #edf4f6; color: #24553e; }
html[data-theme="light"] .user-avatar { background: color-mix(in srgb, var(--user-accent) 10%, #f4f9fb); color: #17313d; }
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .search-box { background: rgba(255,255,255,.92); color: #17313d; border-color: rgba(29,105,136,.22); }
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus { background: #fff; }
html[data-theme="light"] label { color: #4b6571; }
html[data-theme="light"] label small,
html[data-theme="light"] .editor-help,
html[data-theme="light"] .auth-brand span,
html[data-theme="light"] .auth-footer-note,
html[data-theme="light"] .theme-panel > p,
html[data-theme="light"] .theme-switcher button small { color: #647b86; }
html[data-theme="light"] .auth-promo { background: linear-gradient(120deg, rgba(242,249,251,.9), rgba(232,243,247,.95)); }
html[data-theme="light"] .auth-promo > p,
html[data-theme="light"] .auth-features span { color: #526d79; }
html[data-theme="light"] .auth-card { border-color: rgba(31,104,134,.12); }
html[data-theme="light"] .auth-tabs,
html[data-theme="light"] .theme-switcher button { background: rgba(232,242,246,.55); border-color: rgba(31,104,134,.14); }
html[data-theme="light"] .theme-switcher button { color: #526d79; }
html[data-theme="light"] .theme-switcher button.active { color: #087f96; background: rgba(8,127,150,.1); }
html[data-theme="light"] .pagination a,
html[data-theme="light"] .pagination strong,
html[data-theme="light"] .pagination span { background: rgba(255,255,255,.82); color: #516a76; border-color: rgba(31,104,134,.15); }
html[data-theme="light"] .footer-brand span,
html[data-theme="light"] .footer-center,
html[data-theme="light"] .footer-links { color: #607783; }
html[data-theme="light"] .footer-ghost { color: rgba(20,93,122,.045); }
html[data-theme="light"] .nav-backdrop { background: rgba(22,43,53,.35); }

@media (max-width: 1000px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .latest-hero, .members-hero { align-items: flex-start; flex-wrap: wrap; }
  .latest-hero .button { width: 100%; }
  .member-total { min-width: 0; justify-items: start; }
  .member-grid { grid-template-columns: 1fr; }
  .theme-switcher { grid-template-columns: 1fr; }
}

/* Background stacking hotfix — v1.2.1
   The backdrop previously used negative z-index values and was painted
   behind the opaque page canvas in some browsers. */
body {
  position: relative;
  isolation: isolate;
  background: transparent;
}

.page-backdrop {
  z-index: 0;
  pointer-events: none;
}

.page-shade {
  z-index: 1;
  pointer-events: none;
}

.forum-main,
.footer {
  position: relative;
  z-index: 2;
}

html[data-theme="light"] body {
  background: transparent;
}

/* Topbar active line clip hotfix — v1.2.2 */
.topbar {
  overflow: hidden;
}

.nav a.active::after {
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
}

/* Topbar decorative lines inset hotfix — v1.2.3 */
.topbar::before,
.topbar::after {
  top: 0;
  width: calc(29% - 16px);
  height: 2px;
  pointer-events: none;
}

.topbar::before {
  left: 16px;
  border-radius: 0 999px 999px 0;
}

.topbar::after {
  right: 16px;
  border-radius: 999px 0 0 999px;
}

/* Logo display refinement — v1.2.6 */
.brand-emblem {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-emblem::after {
  display: none;
}

.brand-emblem img {
  object-fit: contain;
  filter: saturate(1.08) contrast(1.08) drop-shadow(0 0 7px rgba(42, 151, 255, .24));
}

.topbar .brand-emblem {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.topbar .brand-emblem img {
  transform: scale(1.06);
}

@media (max-width: 680px) {
  .topbar .brand-emblem {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .topbar .brand-emblem img {
    transform: scale(1.04);
  }
}

