/* ==========================================================================
   griefbot.net — the website: account pages, forum, pricing and dashboard.
   One stylesheet (this was dashboard/style.css). Brand: the eye mark's azure
   (#4fa2ff) on near-black. Inter for the interface, Chakra Petch for page
   titles. Post bodies read at 16px / 1.6; chrome is 14px.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #050507;
  --bg-2: #0a0b0f;

  --surface: rgba(18, 19, 26, 0.72);
  --surface-2: rgba(28, 29, 39, 0.70);
  --solid: #0e0f15;
  --solid-2: #14151d;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);

  --text: #e9e9f1;
  --muted: #9a9cab;
  --faint: #6c6e7d;

  /* --accent-2 is the logo's own #4FA2FF and carries text and highlights;
     --accent is the same hue darkened so white still reads on a filled
     button. The -rgb pairs let every wash tint from one place. */
  --accent: #176dcf;
  --accent-rgb: 23, 109, 207;
  --accent-2: #4fa2ff;
  --accent-2-rgb: 79, 162, 255;
  --accent-soft: rgba(var(--accent-rgb), 0.15);

  --good: #54d07d;
  --good-rgb: 84, 208, 125;
  --warn: #e5a03c;
  --warn-rgb: 229, 160, 60;
  --danger: #ff6b71;
  --danger-rgb: 255, 107, 113;
  --mod: #b79cff;
  --mod-rgb: 183, 156, 255;
  /* Name tiers past staff: lifetime gold, premium aqua. Both sit apart from
     the status colours (good / warn) they appear next to. */
  --lifetime: #f5c84c;
  --lifetime-rgb: 245, 200, 76;
  --premium: #3fd8d0;
  --premium-rgb: 63, 216, 208;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 55px -25px rgba(0, 0, 0, 0.85);
  --shadow-accent: 0 14px 34px -14px rgba(var(--accent-rgb), 0.75);

  --nav-h: 60px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Chakra Petch", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  /* Reserve the scrollbar gutter whether the bar is drawn or not: a short
     page and a long one line their content up on the same vertical axis,
     and opening a modal (which hides the scrollbar) doesn't shift it. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1000px 560px at 88% -12%, rgba(var(--accent-rgb), 0.16), transparent 58%),
    radial-gradient(760px 520px at -5% 0%, rgba(var(--accent-rgb), 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a.link, .prose a, .muted a.link { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(var(--accent-2-rgb), 0.45); }
a.link:hover, .prose a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--danger); }
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.ic { flex: none; vertical-align: -0.15em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }

/* The GriefBot eye. The PNG's alpha carries the whole design -- the soft halo
   included -- so masking the accent gradient with it paints the mark in the
   brand accent and gets the glow for free. The artwork sits on a square
   canvas (--mark) with transparent margins: the ink spans 82.3% x 42.8% of it.
   Never crop that canvas (the halo would draw a visible rectangle); pull the
   empty margin back with negative margins instead. */
.mark {
  --mark: 64px;
  position: relative;
  flex: none;
  width: var(--mark);
  height: var(--mark);
  margin: calc(var(--mark) * -0.208) calc(var(--mark) * -0.107);
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  -webkit-mask: url("/dashboard/griefbot-eye.png") center / contain no-repeat;
          mask: url("/dashboard/griefbot-eye.png") center / contain no-repeat;
}
/* The in-game menu's logo shine (menu.cpp LogoSweep), transcribed: a white
   band crossing the ink span once every 3.4s, clipped by the mask. */
.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 38.2%,
    rgba(255, 255, 255, 0.30) 50%,
    rgba(255, 255, 255, 0) 61.8%);
  transform: translateX(-84.9%) skewX(-24deg);
  opacity: 0;
  animation: mark-sweep 3.4s linear infinite;
  pointer-events: none;
}
@keyframes mark-sweep {
  0%    { transform: translateX(-84.9%) skewX(-24deg); opacity: 0; }
  6.9%  { opacity: 0; }
  20.8% { opacity: 1; }
  79.2% { opacity: 1; }
  93.1% { opacity: 0; }
  100%  { transform: translateX(84.9%) skewX(-24deg); opacity: 0; }
}
.brand h1 { font-size: 16px; line-height: 1.2; }
.brand .sub, .brand .muted { font-size: 12px; color: var(--muted); }
/* Same face, size and line box as the front page's .brand (site/site.css):
   the wordmark must not shrink when you click from the home page into the
   forum or the dashboard. */
.brand-name { font: 700 19px/1 var(--font-display); letter-spacing: 0.01em; }
.brand-sm .mark { --mark: 40px; }

/* ---------- top navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topnav-in {
  height: 100%;
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
}
.topnav .brand .mark { --mark: 52px; }
.topnav-links { display: flex; align-items: center; gap: 4px; }
.topnav-links a, .menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.topnav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.topnav-links a[aria-current="page"] { color: #fff; background: var(--accent-soft); }
.topnav-links a[aria-current="page"] .ic { color: var(--accent-2); }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.bell {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 10px; color: var(--muted);
}
.bell:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.bell.has-new { color: var(--text); }
.bell-n {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* <details> menus: account menu and the phone menu. */
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 4px 8px; border-radius: 10px; color: var(--muted);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.acct-name { font-weight: 600; color: var(--text); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 230px; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--solid); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-pop button {
  width: 100%; justify-content: flex-start; border: 0; background: none; font: inherit; cursor: pointer;
  box-shadow: none;
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head strong { display: block; }
.menu-head span { font-size: 12px; }
.menu-form { margin: 0; }
.pop-form { display: flex; flex-direction: column; gap: 6px; padding: 6px; margin: 0; }
.pop-form + .pop-form { border-top: 1px solid var(--line); }
.pop-form label { margin: 0; font-size: 12.5px; }
.pop-form input, .pop-form select { min-height: 38px; padding: 7px 10px; font-size: 13px; }
.pop-form button { width: 100%; justify-content: flex-start; }
.mod-menu > summary.button, .report-menu > summary { color: var(--muted); }
.mod-menu .menu-pop, .report-menu .menu-pop { min-width: 250px; }
.post-foot .menu > summary { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.nav-mobile { display: none; }

/* Forum search in the top bar; "/" focuses it. */
.nav-search {
  position: relative; display: flex; align-items: center; margin: 0;
  width: 220px; transition: width 0.2s;
}
.nav-search:focus-within { width: 300px; }
.nav-search > .ic { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.nav-search input { min-height: 38px; padding: 7px 34px 7px 33px; font-size: 13px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.nav-search kbd {
  position: absolute; right: 9px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 5px;
  color: var(--faint); font: 600 11px/18px var(--font-mono); pointer-events: none;
}
.nav-search:focus-within kbd { display: none; }
.menu-search { padding: 4px 4px 8px; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
.menu-search input { min-height: 40px; font-size: 14px; }

/* Build status: a dot and a word in the top bar, the same pair on pages. */
.status-badge {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 30px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
a.status-badge:hover { border-color: var(--line-strong); color: var(--text); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.st-ok .st-dot, .st-ok .st-big { background: var(--good); box-shadow: 0 0 0 3px rgba(var(--good-rgb), 0.18); }
.st-updating .st-dot, .st-updating .st-big { background: var(--warn); box-shadow: 0 0 0 3px rgba(var(--warn-rgb), 0.18); }
.st-down .st-dot, .st-down .st-big { background: var(--danger); box-shadow: 0 0 0 3px rgba(var(--danger-rgb), 0.18); }
.status-badge.st-ok { color: var(--good); }
.status-badge.st-updating { color: var(--warn); }
.status-badge.st-down { color: var(--danger); }
.status-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.status-strip p { flex: 1; min-width: 220px; color: var(--muted); font-size: 13.5px; }
.status-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.status-head h2 { font-family: var(--font-display); font-size: 24px; }
.status-head .muted { margin-top: 4px; max-width: 70ch; }
.st-big { flex: none; width: 16px; height: 16px; margin-top: 8px; border-radius: 50%; background: var(--faint); }
.status-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--text); font-weight: 500; }
.build-notes { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.status-admin { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.status-admin .field-hint { margin-top: 0; }
.build-notes li + li { margin-top: 2px; }

/* ---------- release notes (/releases, /releases/<version>) ---------- */
.rel-month { font-size: 15px; margin: 28px 0 12px; }
.rel-all { margin-top: 12px; }
.rel-list .rel-month:first-child { margin-top: 0; }
.rel-rows { list-style: none; padding: 0; }
.rel-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; gap: 4px 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.rel-row:first-child { border-top: 0; }
.rel-date { font: 500 13px/1.4 var(--font-mono); color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rel-what h3 { font-size: 15px; }
.rel-what h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rel-what p { margin-top: 3px; overflow-wrap: anywhere; }
.rel-items { list-style: none; padding: 0; }
.rel-items > li + li { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.rel-name { display: inline; font-size: 17px; }
.rel-name a:hover { color: var(--accent-2); }
.rel-where { margin-left: 10px; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.rel-desc { margin-top: 4px; max-width: 75ch; color: var(--muted); font-size: 15px; }
.rel-text { font-size: 15px; }
.rel-more { color: var(--muted); }
.rel-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.rel-step { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 0.15s; }
.rel-step:hover { border-color: var(--line-strong); }
.rel-step span { font-size: 12.5px; }
.rel-step time { color: var(--muted); font-size: 13px; }
.rel-step.rel-next { grid-column: 2; text-align: right; }
@media (max-width: 560px) {
  .rel-row { grid-template-columns: 1fr; }
  .rel-steps { grid-template-columns: 1fr; }
  .rel-step.rel-next { grid-column: auto; text-align: left; }
  .rel-where { display: block; margin: 2px 0 0; white-space: normal; }
}

.announce {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px; text-align: center;
  background: rgba(var(--warn-rgb), 0.1); border-bottom: 1px solid rgba(var(--warn-rgb), 0.28);
  color: var(--warn); font-weight: 500;
}
.imp-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 8px 20px; text-align: center;
  background: rgba(var(--danger-rgb), 0.12); border-bottom: 1px solid rgba(var(--danger-rgb), 0.35);
  color: var(--text); font-weight: 500;
}
.imp-bar > .ic { color: var(--danger); }

/* ---------- page containers ---------- */
.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 70px; flex: 1; }
.page-narrow { max-width: 460px; padding-top: 48px; }
.page-mid { max-width: 820px; }

.admin-shell { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1440px; width: 100%; margin: 0 auto; }
.admin-side {
  position: sticky; top: var(--nav-h); align-self: start;
  height: calc(100vh - var(--nav-h)); overflow-y: auto;
  padding: 20px 12px; border-right: 1px solid var(--line);
}
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a {
  display: flex; align-items: center; gap: 11px;
  min-height: 42px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.admin-nav a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.admin-nav a[aria-current="page"] {
  background: var(--accent-soft); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.3);
}
.admin-nav a[aria-current="page"] .ic { color: var(--accent-2); }
.admin-main { min-width: 0; padding: 28px 32px 70px; }

/* ---------- page head ---------- */
.pagehead { margin-bottom: 22px; }
.pagehead-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.pagehead p { margin-top: 6px; max-width: 70ch; }
.pagehead-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumb-sep { color: var(--faint); }
.section-title { font-size: 15px; font-weight: 650; margin: 28px 0 12px; display: flex; align-items: center; gap: 9px; }
.section-title .ic { color: var(--accent-2); }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  min-height: 44px; padding: 10px 14px; margin-bottom: -1px;
  color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent-2); }
.tabs a[aria-current="page"] .ic { color: var(--accent-2); }
/* In-page sub-tabs (dashboard release page): same look as the page tabs,
   just sized a touch smaller so they read as a secondary strip. The tabs
   are driven by app.js via location.hash. */
.tabs-inpage { margin-bottom: 20px; }
.tabs-inpage a { min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
[data-tabpanel][hidden] { display: none; }

/* ---------- KPI / stat cards (dashboard) ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .val { font-size: 28px; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; }
.stat .sub { color: var(--faint); font-size: 12px; margin-top: 4px; }

/* ---------- grid + cards ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 16px; }
.grid.flush { margin-top: 0; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }

/* Sibling spacing: every block that visually behaves like a card gets a 16px
   gap when it follows another block of the same family. The .card + .card
   rule above only catches adjacent cards; these fill the gaps between
   different-shaped siblings (kpi strip, grid, table box, pager, forum list,
   notification list) so the page reads as one steady rhythm. */
.kpis + .card,
.kpis + .grid,
.kpis + .table-wrap,
.kpis + .pager,
.kpis + .cat-list,
.kpis + .thread-list,
.kpis + .notif-list,
.kpis + .forum-group,
.kpis + .tabs,
.card + .kpis,
.card + .grid,
.card + .table-wrap,
.card + .pager,
.card + .cat-list,
.card + .thread-list,
.card + .notif-list,
.grid + .card,
.grid + .kpis,
.grid + .grid,
.grid + .table-wrap,
.grid + .pager,
.grid + .cat-list,
.grid + .thread-list,
.grid + .notif-list,
.grid + .forum-group,
.table-wrap + .card,
.table-wrap + .kpis,
.table-wrap + .grid,
.table-wrap + .pager,
.table-wrap + .table-wrap,
.pager + .card,
.pager + .grid,
.pager + .kpis,
.pager + .table-wrap,
.pager + .section-title,
.cat-list + .cat-list,
.cat-list + .pager,
.thread-list + .pager,
.notif-list + .pager {
  margin-top: 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic { color: var(--accent-2); }
.card-head p { width: 100%; margin-top: -8px; }
.card.danger-zone { border-color: rgba(var(--danger-rgb), 0.3); }
.card.danger-zone .card-head h2 .ic { color: var(--danger); }

.bigver { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.kv { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.kv .row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* Definition lists: label / value pairs that state facts. */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* ---------- forms ---------- */
label, .label {
  display: block; color: var(--muted);
  font-size: 13px; font-weight: 500; margin: 14px 0 7px;
}
.field:first-child > label, .card > form > label:first-child { margin-top: 0; }
/* Side-by-side fields keep one label line, whichever is first. */
.form-row > .field > label, .form-row > .field > .label { margin-top: 14px; }
.field-hint { color: var(--faint); font-size: 12.5px; margin-top: 6px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: rgba(0, 0, 0, 0.5);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: rgba(var(--danger-rgb), 0.7);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 220px; }
select { cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none; }
input[type="file"] { padding: 9px 11px; color: var(--muted); }
input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 6px 11px; border-radius: 8px; margin-right: 11px;
  cursor: pointer; font: inherit;
}
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; color: var(--text); font-size: 14px; font-weight: 400; cursor: pointer; }
.check input { margin-top: 2px; }
.check .faint { display: block; font-size: 12.5px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.field-err { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--danger); font-size: 13px; font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.err-summary {
  margin-bottom: 18px; padding: 14px 16px;
  border: 1px solid rgba(var(--danger-rgb), 0.45); border-left-width: 4px; border-radius: 12px;
  background: rgba(var(--danger-rgb), 0.07);
}
.err-summary:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.err-summary h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--danger); margin-bottom: 6px; }
.err-summary ul { padding-left: 22px; }
.err-summary a { color: var(--text); text-decoration: underline; }

/* ---------- buttons ---------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit; font-weight: 550;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, filter 0.15s;
}
button:hover, .button:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.13); color: #fff; }
button:active, .button:active { transform: translateY(1px); }
button:disabled, .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
button.is-busy { position: relative; color: transparent !important; }
button.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.primary {
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  border-color: transparent; color: #fff;
  box-shadow: var(--shadow-accent);
}
.primary:hover { filter: brightness(1.08); border-color: transparent; background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; }
.ghost { background: transparent; }
.danger { background: transparent; border-color: rgba(var(--danger-rgb), 0.35); color: var(--danger); }
.danger:hover { background: rgba(var(--danger-rgb), 0.12); border-color: var(--danger); color: #fff; }
.danger.solid { background: rgba(var(--danger-rgb), 0.85); color: #fff; border-color: transparent; }
.btn-sm { min-height: 36px; padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.btn-icon { min-width: 36px; padding: 7px; }
.block { width: 100%; }
.inline-form { display: inline-flex; margin: 0; }
.split { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.grow { flex: 1; min-width: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions.end { justify-content: flex-end; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  color: var(--muted); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
/* "6 Oct 2026" is one value: a narrow column scrolls the table, it does not stack the date. */
tbody td time { white-space: nowrap; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: none; }
td .stack, .stack { display: block; }
td .stack .muted, td .stack .faint { display: block; font-size: 12px; margin-top: 2px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.empty { text-align: center; color: var(--muted); padding: 28px 14px; }
tr.is-new { background: rgba(var(--accent-rgb), 0.10); }
tr.is-new:hover { background: rgba(var(--accent-rgb), 0.14); }

/* Release notes are operator free text: line breaks typed into the textarea
   are meaningful. pre-line honours them while collapsing pasted indentation;
   the loader's own notes pane makes the same promise. */
.notes { white-space: pre-line; overflow-wrap: anywhere; }
td.notes { min-width: 22ch; max-width: 46ch; }
.dl-meta .v.notes { max-width: 52ch; font-weight: 500; line-height: 1.5; }

.cell-form { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.cell-form input, .cell-form select { width: auto; min-height: 36px; padding: 7px 10px; font-size: 13px; }
.cell-form label { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.edit-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.edit-form .field { display: flex; flex-direction: column; gap: 5px; }
.edit-form .mini { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.edit-form input, .edit-form select { width: auto; min-height: 38px; padding: 8px 10px; font-size: 13px; }

/* ---------- pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 550; line-height: 1.6; white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.active, .pill.success, .pill.good { color: var(--good); border-color: rgba(var(--good-rgb), 0.3); background: rgba(var(--good-rgb), 0.1); }
.pill.admin { color: var(--accent-2); border-color: rgba(var(--accent-2-rgb), 0.35); background: rgba(var(--accent-rgb), 0.13); }
.pill.mod { color: var(--mod); border-color: rgba(var(--mod-rgb), 0.35); background: rgba(var(--mod-rgb), 0.1); }
.pill.fail, .pill.bad { color: var(--danger); border-color: rgba(var(--danger-rgb), 0.3); background: rgba(var(--danger-rgb), 0.1); }
.pill.warn { color: var(--warn); border-color: rgba(var(--warn-rgb), 0.3); background: rgba(var(--warn-rgb), 0.1); }
.pill.dim { color: var(--faint); }

/* ---------- alerts ---------- */
.flash, .notice, .error, .callout {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px; border-radius: 12px;
  margin-bottom: 18px; font-weight: 500;
  border: 1px solid;
}
.flash .ic, .callout .ic { margin-top: 2px; }
.flash-ok, .notice { color: var(--good); background: rgba(var(--good-rgb), 0.08); border-color: rgba(var(--good-rgb), 0.28); }
.flash-error, .error { color: var(--danger); background: rgba(var(--danger-rgb), 0.08); border-color: rgba(var(--danger-rgb), 0.3); }
.flash-info, .callout { color: var(--text); background: rgba(var(--accent-rgb), 0.08); border-color: rgba(var(--accent-rgb), 0.3); }
.flash-info .ic, .callout .ic { color: var(--accent-2); }
/* A flash is a one-off message, a callout stays: the flash gets a dismiss
   button (app.js) and a heavier left edge so the two never read the same. */
.flash { border-left-width: 3px; }
.flash > span { flex: 1 1 auto; }
.flash-x { flex: none; margin: -4px -6px -4px 0; padding: 4px; min-height: 0; border: 0; background: none; color: inherit; opacity: 0.7; border-radius: 6px; }
.flash-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.flash-x[hidden] { display: none; }
.callout.warn { background: rgba(var(--warn-rgb), 0.08); border-color: rgba(var(--warn-rgb), 0.3); }
.callout.warn .ic { color: var(--warn); }
.callout p + p { margin-top: 6px; }
.callout strong { font-weight: 650; }

/* ---------- avatars (initial on the member's chosen colour) ---------- */
.av {
  --av: 32px;
  flex: none; display: inline-grid; place-items: center;
  width: var(--av); height: var(--av); border-radius: 50%;
  font-size: calc(var(--av) * 0.44); font-weight: 700; line-height: 1; color: #fff;
  background: var(--av-bg, #3a3c48);
  user-select: none;
}
.av-24 { --av: 24px; }
.av-32 { --av: 32px; }
.av-40 { --av: 40px; }
.av-64 { --av: 64px; }
.av-96 { --av: 96px; }
.av-x { --av-bg: #2a2b33; color: var(--faint); }
.av-c0 { --av-bg: #176dcf; }
.av-c1 { --av-bg: #0e8f8f; }
.av-c2 { --av-bg: #2f9a52; }
.av-c3 { --av-bg: #7c8a1c; }
.av-c4 { --av-bg: #b07510; }
.av-c5 { --av-bg: #c2531f; }
.av-c6 { --av-bg: #c43a4b; }
.av-c7 { --av-bg: #b0357f; }
.av-c8 { --av-bg: #8a46c2; }
.av-c9 { --av-bg: #5a56d6; }
.av-c10 { --av-bg: #4a5568; }
.av-c11 { --av-bg: #7a5c45; }
.av-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.av-pick label { margin: 0; cursor: pointer; position: relative; }
.av-pick input { position: absolute; opacity: 0; }
.av-pick .av { --av: 44px; box-shadow: 0 0 0 2px transparent; transition: box-shadow 0.15s; }
.av-pick input:checked + .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-2); }
.av-pick input:focus-visible + .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff; }
/* An uploaded picture (lib/avatars.php): same circle, same sizes as the initial. */
img.av-img { display: inline-block; object-fit: cover; }
.av-upload { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.av-upload .av { --av: 96px; }
.av-upload-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.av-upload-actions .form-actions { margin-top: 0; }

/* Names, coloured by tier (gb_name_tier): admin, moderator, lifetime,
   premium; members stay text colour. The same colour marks the tier's pill. */
.ulink { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text); }
a.ulink:hover { text-decoration: underline; }
.uname { font-weight: 650; }
.ulink-admin { color: var(--accent-2); }
.ulink-moderator { color: var(--mod); }
.ulink-lifetime { color: var(--lifetime); }
.ulink-premium { color: var(--premium); }
.ulink-gone { color: var(--faint); font-style: italic; font-weight: 500; }
/* Inside post text (a library card's author) the tier still wins over link blue. */
.prose a.ulink { text-decoration: none; color: var(--text); }
.prose a.ulink-admin { color: var(--accent-2); }
.prose a.ulink-moderator { color: var(--mod); }
.prose a.ulink-lifetime { color: var(--lifetime); }
.prose a.ulink-premium { color: var(--premium); }
.pill.tier-lifetime { color: var(--lifetime); border-color: rgba(var(--lifetime-rgb), 0.35); background: rgba(var(--lifetime-rgb), 0.1); }
.pill.tier-premium { color: var(--premium); border-color: rgba(var(--premium-rgb), 0.35); background: rgba(var(--premium-rgb), 0.1); }

/* ---------- pager ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 20px 0 0; }
.pg {
  display: inline-grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
}
a.pg:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.pg.cur { color: #fff; background: var(--accent-soft); border-color: rgba(var(--accent-rgb), 0.45); }
.pg.dis { opacity: 0.35; }
.pg.gap { border-color: transparent; }

/* ---------- dialog (destructive confirmations) ---------- */
dialog.dlg {
  width: min(480px, calc(100vw - 32px));
  padding: 0; border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--solid); color: var(--text); box-shadow: var(--shadow);
}
dialog.dlg::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.dlg-body { padding: 22px; }
.dlg-body h2 { font-size: 17px; display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.dlg-body h2 .ic { color: var(--danger); }
.dlg-body p { color: var(--muted); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translateX(-50%);
  padding: 10px 16px; border-radius: 10px;
  background: var(--solid-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-weight: 550;
}

/* ---------- error page ---------- */
.errpage { text-align: center; padding: 36px 26px; }
.errcode { display: block; font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--accent-2); line-height: 1; margin-bottom: 10px; }
.errpage h1 { font-size: 21px; margin-bottom: 8px; }
.errpage .row-actions { justify-content: center; margin-top: 22px; }

/* ---------- sign-in / signup ---------- */
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 22px; }
.auth-brand .mark { --mark: 120px; }
.auth-brand h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); }
.auth-alt a { color: var(--accent-2); font-weight: 600; }

/* ---------- member area bits ---------- */
.hero { position: relative; overflow: hidden; padding: 26px; }
.hero::before {
  content: ""; position: absolute; top: -40%; right: -10%;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.24), transparent 65%);
  pointer-events: none;
}
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.hero h2 { font-size: 22px; margin-top: 8px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 26px; margin: 18px 0 20px; }
.dl-meta .k { color: var(--muted); font-size: 12px; }
.dl-meta .v { font-weight: 600; margin-top: 4px; }
.big-dl { width: 100%; padding: 14px; font-size: 15px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { font-family: var(--font-mono); font-size: 13px; }
.recovery-codes { font-size: 16px; line-height: 1.9; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: #08090c; color: var(--text); letter-spacing: 0.06em; }
.code-chip {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.profile-head .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.profile-bio { margin-top: 18px; }
.profile-invited { margin-top: 8px; }

/* ---------- forum ---------- */
.cat-list, .thread-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cat-row, .thread-row {
  display: grid; align-items: center; gap: 16px;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.cat-row:first-child, .thread-row:first-child { border-top: 0; }
.cat-row { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 260px); }
.thread-row { grid-template-columns: minmax(0, 1fr) 90px minmax(0, 220px); }
.cat-row:hover, .thread-row:hover { background: rgba(255, 255, 255, 0.02); }
.cat-name, .thread-title { font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
a.cat-name:hover, a.thread-title:hover { color: var(--accent-2); }
.cat-desc { color: var(--muted); margin-top: 3px; font-size: 13px; }
.cat-flags, .thread-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; margin-left: 6px; }
.cat-counts, .thread-counts { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.4; }
.cat-counts strong, .thread-counts strong { color: var(--text); font-weight: 600; }
.cat-last, .thread-last { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--muted); }
.cat-last > div, .thread-last > div { min-width: 0; }
.cat-last a.t { display: block; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-last a.t:hover { color: var(--accent-2); }
.thread-meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.thread-row.is-unread .thread-title { font-weight: 700; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-right: 6px; vertical-align: middle; }
.new-count { color: var(--accent-2); font-weight: 600; font-size: 12.5px; }
.thread-row.is-pinned { background: rgba(var(--accent-rgb), 0.04); }
/* ---------- shoutbox (forum front page) ---------- */
.shoutbox .card-head { margin-bottom: 12px; }
.shout-rule { font-size: 12.5px; }
.shout-frame { position: relative; }
.shout-list {
  list-style: none; margin: 0; padding: 6px 0;
  min-height: 64px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  font-size: 14px;
}
.shout-list:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.shout { display: flex; align-items: baseline; gap: 10px; padding: 4px 12px; line-height: 1.5; }
.shout:hover { background: rgba(255, 255, 255, 0.03); }
.shout time { flex: none; min-width: 38px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.shout-who { flex: none; }
.shout-who .ulink { display: inline; }
.shout-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shout-text a:not(.mention) { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(var(--accent-2-rgb), 0.45); }
.shout-text .mention { color: var(--accent-2); font-weight: 600; }
.shout-text code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }
.shout-text .spoiler { background: #2a2b33; color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; }
.shout-text .spoiler.shown, .shout-text .spoiler:focus { color: inherit; background: rgba(255, 255, 255, 0.07); }
.shout.mentions-me { background: rgba(var(--accent-rgb), 0.12); box-shadow: inset 2px 0 0 var(--accent-2); }
.shout-del { flex: none; align-self: center; opacity: 0; transition: opacity 0.12s; }
.shout:hover .shout-del, .shout-del:focus-within { opacity: 1; }
.shout-del button { min-height: 0; padding: 3px; border: 0; border-radius: 6px; background: none; color: var(--faint); }
.shout-del button:hover { background: rgba(var(--danger-rgb), 0.14); color: var(--danger); }
.shout-empty { padding: 18px 12px; color: var(--faint); text-align: center; }
.shout-jump {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: var(--solid-2); border-color: var(--accent); color: var(--text);
  box-shadow: var(--shadow);
}
.shout-jump:active { transform: translateX(-50%) translateY(1px); }
.shout-form { display: flex; gap: 8px; margin-top: 12px; }
.shout-form input { flex: 1; min-width: 0; }
.shout-err { margin-top: 8px; }
.shout-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); }
.shout-online { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; color: var(--faint); font-size: 12.5px; }
.shout-online .ic { align-self: center; }
.shout-online strong { color: var(--muted); }
.shout-online .ulink { display: inline; }
.shoutbox + .forum-group { margin-top: 16px; }
@media (hover: none) { .shout-del { opacity: 1; } }
/* Phones: time and name on one line, the message under them at full width. */
@media (max-width: 560px) {
  .shout { flex-wrap: wrap; row-gap: 0; }
  .shout-del { order: 1; margin-left: auto; }
  .shout-text { order: 2; flex-basis: 100%; }
}

.forum-group { margin-top: 26px; }
.forum-group:first-child { margin-top: 0; }
.forum-group > h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 10px; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.flag.pinned { color: var(--accent-2); }
.flag.locked { color: var(--warn); }
.flag.deleted { color: var(--danger); }

.post {
  display: grid; grid-template-columns: 170px minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.post + .post { margin-top: 14px; }
.post:target { border-color: rgba(var(--accent-2-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.post.is-deleted { opacity: 0.75; border-style: dashed; }
.post-side { padding: 18px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.post-side .ulink { overflow-wrap: anywhere; }
.post-side .faint { font-size: 12px; line-height: 1.5; }
.post-title { font-size: 12px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.post-main { display: flex; flex-direction: column; min-width: 0; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.post-head a.permalink { color: var(--faint); font-variant-numeric: tabular-nums; }
.post-head a.permalink:hover { color: var(--text); }
.post-body { padding: 16px 18px; flex: 1; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 10px 18px; flex-wrap: wrap; }
.post-foot .row-actions { gap: 4px; }
.post-foot button, .post-foot .button { min-height: 36px; padding: 6px 10px; font-size: 13px; background: transparent; border-color: transparent; color: var(--muted); }
.post-foot button:hover, .post-foot .button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.mod-note { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: 13px; font-weight: 500; padding: 12px 18px 0; }
.edited-note { color: var(--faint); font-size: 12.5px; }

/* Rendered member text (posts, bios). 16px / 1.6 for reading. */
.prose { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.prose p { margin: 0 0 0.85em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 700; }
.prose del { color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); }
.prose pre { margin: 0 0 0.85em; padding: 12px 14px; border-radius: 10px; background: #08090c; border: 1px solid var(--line); overflow-x: auto; }
.prose pre code { padding: 0; background: none; font-size: 13.5px; line-height: 1.55; white-space: pre; }
.prose blockquote { margin: 0 0 0.85em; padding: 10px 14px; border-left: 3px solid rgba(var(--accent-2-rgb), 0.5); background: rgba(255, 255, 255, 0.03); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose blockquote cite { display: block; font-style: normal; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.prose .mention { color: var(--accent-2); font-weight: 600; text-decoration: none; }
.prose .spoiler { background: #2a2b33; color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; transition: color 0.15s, background 0.15s; }
.prose .spoiler:hover, .prose .spoiler:focus, .prose .spoiler.shown { color: inherit; background: rgba(255, 255, 255, 0.07); }
.prose ul, .prose ol { margin: 0 0 0.85em 1.4em; padding: 0; }
.prose li { margin: 0.2em 0; }
.prose li:last-child { margin-bottom: 0; }
.prose ul:last-child, .prose ol:last-child { margin-bottom: 0; }
.prose h3 { font-size: 1.15em; font-weight: 700; margin: 1em 0 0.4em; }
.prose h4 { font-size: 1em; font-weight: 700; margin: 0.9em 0 0.35em; }
.prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose .img-link { display: inline-block; max-width: 100%; margin: 0 0 0.85em; line-height: 0; }
.prose .img-link:last-child { margin-bottom: 0; }
.prose .img-link img { display: block; max-width: min(100%, 640px); max-height: 480px; border-radius: 10px; border: 1px solid var(--line); background: #08090c; }

.composer textarea { min-height: 180px; font-size: 15px; }
.composer-help { color: var(--faint); font-size: 12.5px; margin-top: 8px; }
.composer-help code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.reply-box { margin-top: 22px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.searchbar { display: flex; gap: 8px; max-width: 520px; width: 100%; }

/* ---------- notifications ---------- */
.notif-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.is-unread { background: rgba(var(--accent-rgb), 0.06); }
.notif-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--accent-2); }
.notif-text { flex: 1; min-width: 0; }
.notif-text a.t { color: var(--text); font-weight: 600; }
.notif-text a.t:hover { text-decoration: underline; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 24px 22px; }
.plan.is-featured { border-color: rgba(var(--accent-2-rgb), 0.55); box-shadow: 0 0 0 1px rgba(var(--accent-2-rgb), 0.25), var(--shadow); }
.plan-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-price { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-per { color: var(--muted); font-size: 13px; }
.plan-desc { color: var(--muted); flex: 1; }
.plan-flair { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.plan-flair .uname { font-size: 14px; overflow-wrap: anywhere; }
.plan form { margin-top: 4px; }
.providers { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-opt { position: relative; margin: 0; }
.provider-opt input { position: absolute; opacity: 0; }
.provider-opt span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); font-weight: 550; cursor: pointer;
}
.provider-opt input:checked + span { border-color: var(--accent-2); background: var(--accent-soft); }
.provider-opt input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.plan-pick { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick:hover { border-color: var(--line-strong); }
.plan-check { display: none; align-items: center; gap: 6px; color: var(--accent-2); font-weight: 600; font-size: 13px; }
.plan-pick:has(input:checked) { border-color: var(--accent-2); box-shadow: 0 0 0 1px rgba(var(--accent-2-rgb), 0.5), var(--shadow); }
.plan-pick:has(input:checked) .plan-check { display: inline-flex; }
.plan-pick:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.checkout-box { margin-top: 18px; }
.order-sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.order-sum .total { font-size: 18px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- invite tree ---------- */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 18px; padding-left: 14px; border-left: 1px solid var(--line); }
.tree li { padding: 5px 0; }

/* ---------- footer ---------- */
.sitefoot { border-top: 1px solid var(--line); margin-top: auto; }
.sitefoot-in { max-width: 1280px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.sitefoot nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.sitefoot nav a:hover { color: var(--text); }

/* ---------- composer (gb_forum_composer) ---------- */
.composer-box > label { margin-top: 0; }
.composer-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  padding: 6px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.025);
}
.composer-tabs { display: flex; gap: 2px; padding-right: 8px; border-right: 1px solid var(--line); }
.composer-tabs button, .composer-tools button {
  min-height: 34px; padding: 5px 10px; font-size: 13px; border-color: transparent; background: transparent; color: var(--muted);
}
.composer-tools button { padding: 5px 8px; }
.composer-tabs button[aria-selected="true"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.composer-tabs button:hover, .composer-tools button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.composer-tools { display: flex; flex-wrap: wrap; gap: 2px; }
.composer-tools.is-off { opacity: 0.4; }
.composer-kbd { margin-left: auto; font-size: 12px; white-space: nowrap; padding-right: 6px; }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }
.composer-preview {
  min-height: 180px; padding: 12px 14px; overflow-wrap: anywhere;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.25);
}
.composer-preview:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.composer-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; color: var(--accent-2); font-size: 13px; }
.link-btn { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { background: none; border: 0; color: var(--text); }

/* @-mention suggestions under the caret */
.mention-pop {
  position: fixed; z-index: 90; min-width: 200px; max-width: 280px; margin: 0; padding: 4px; list-style: none;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--solid); box-shadow: var(--shadow);
}
.mention-pop li { display: flex; align-items: center; gap: 1px; padding: 7px 10px; border-radius: 7px; color: var(--faint); cursor: pointer; }
.mention-pop li[aria-selected="true"], .mention-pop li:hover { background: rgba(var(--accent-rgb), 0.18); }
.mention-pop .uname { font-weight: 600; }
.mention-pop .ulink-member { color: var(--text); }

/* ---------- thread tags, list tools, the new-posts rule ---------- */
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; margin-right: 8px; vertical-align: middle;
  border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.75; text-decoration: none;
  color: var(--tag); background: rgba(var(--tag-rgb), 0.14); border: 1px solid rgba(var(--tag-rgb), 0.35);
}
a.tag-chip:hover { background: rgba(var(--tag-rgb), 0.26); color: var(--tag); }
.tag-chip[aria-current] { background: rgba(var(--tag-rgb), 0.32); border-color: rgba(var(--tag-rgb), 0.7); }
.tag-chip.is-all { --tag: var(--muted); --tag-rgb: 160, 166, 180; }
.tag-chip .tag-n { font-weight: 600; opacity: 0.7; }
.tag-c-grey { --tag: #9aa0ad; --tag-rgb: 154, 160, 173; }
.tag-c-red { --tag: #ff7b80; --tag-rgb: 229, 72, 77; }
.tag-c-orange { --tag: #f0a04b; --tag-rgb: 224, 134, 42; }
.tag-c-yellow { --tag: #e8c54a; --tag-rgb: 217, 178, 42; }
.tag-c-green { --tag: #5fd47b; --tag-rgb: 63, 185, 80; }
.tag-c-teal { --tag: #4fd0c0; --tag-rgb: 43, 179, 163; }
.tag-c-blue { --tag: #6ea6ff; --tag-rgb: 74, 143, 240; }
.tag-c-purple { --tag: #b48cff; --tag-rgb: 155, 108, 232; }
.tag-c-pink { --tag: #f07bc0; --tag-rgb: 228, 90, 168; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter .tag-chip { margin-right: 0; }
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: -6px 0 14px; }
.list-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.list-sort select { width: auto; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 13px; }
.list-sort [data-autosubmit-button][hidden] { display: none; }
.title-row .field.grow { flex: 1 1 320px; }
.new-rule {
  display: flex; align-items: center; gap: 10px; margin: 14px 0;
  color: var(--accent-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.new-rule::before, .new-rule::after { content: ""; flex: 1; border-top: 1px solid rgba(var(--accent-2-rgb), 0.5); }
.new-rule span { display: inline-flex; align-items: center; gap: 5px; }
.watch-btn[aria-pressed="true"] { color: var(--accent-2); background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-2-rgb), 0.35); }
.copy-link { min-height: 0; padding: 2px 4px; border: 0; background: none; color: var(--faint); border-radius: 5px; }
.copy-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* ---------- the 2FA set-up code ---------- */
.qr-box { display: inline-block; margin: 4px 0 14px; padding: 8px; border-radius: 12px; background: #fff; line-height: 0; }
.qr-box .qr { display: block; }

/* ---------- devices on Security ---------- */
.hwid-hint { margin-top: 10px; }

/* ---------- legal pages ---------- */
.prose.legal { font-size: 15px; max-width: 76ch; }
.prose.legal h3 { margin-top: 1.4em; }
mark.fill { background: rgba(var(--warn-rgb), 0.25); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* ---------- the bell's dropdown ---------- */
.notif-menu[hidden] { display: none; }
.notif-menu > summary.bell { list-style: none; cursor: pointer; }
.notif-menu > summary::-webkit-details-marker { display: none; }
.notif-pop { min-width: 380px; max-width: 92vw; padding: 0; overflow: hidden; }
.notif-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.notif-pop-head .menu-form { width: auto; }
.notif-pop-head button { width: auto; justify-content: center; }
.notif-pop-list { border: 0; border-radius: 0; background: none; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.notif-pop-list .notif { padding: 10px 12px; font-size: 13.5px; }
.notif-pop-list .notif-ic { width: 28px; height: 28px; }
.notif-pop .notif-empty { padding: 18px 12px; text-align: center; }
.notif-pop-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.notif-pop-all:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

/* ---------- members directory ---------- */
.member-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 90px 90px 130px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: 0; }
.member-row:hover { background: rgba(255, 255, 255, 0.02); }
.member-who { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.member-who .faint { flex-basis: 100%; font-size: 12.5px; }
.member-who .post-title { font-size: 12.5px; color: var(--muted); }
.member-stat { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.member-stat strong { color: var(--text); font-weight: 600; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px rgba(var(--good-rgb), 0.25); }
.members-search input[type="search"] { width: 220px; min-height: 36px; padding: 6px 10px; font-size: 13px; }

/* ---------- latest activity, solved, helpful ---------- */
.latest-row { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); }
.cat-chip { display: inline-flex; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.7; }
.cat-chip:hover { color: var(--text); border-color: var(--line-strong); }
.flag.solved { color: var(--good); }
.post.is-answer { border-color: rgba(var(--good-rgb), 0.45); box-shadow: 0 0 0 1px rgba(var(--good-rgb), 0.18), var(--shadow); }
.post-head-r { display: inline-flex; align-items: center; gap: 12px; }
.answer-jump {
  display: flex; align-items: center; gap: 12px; margin: 0 18px 12px; padding: 10px 14px;
  border: 1px solid rgba(var(--good-rgb), 0.35); border-radius: 10px; background: rgba(var(--good-rgb), 0.07);
}
.answer-jump:hover { border-color: var(--good); }
.answer-k { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--good); font-weight: 700; font-size: 13px; }
.answer-v { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.answer-v strong { color: var(--text); }
.answer-go { flex: none; color: var(--good); }
.post-foot-l { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.post-foot .helpful-btn[aria-pressed="true"] { color: var(--accent-2); background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-2-rgb), 0.35); }
.helpful-n { min-width: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); font-size: 12px; line-height: 18px; text-align: center; }
.helpful-count { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--muted); font-size: 13px; }
.post-foot .solve-btn:hover { color: var(--good); border-color: rgba(var(--good-rgb), 0.4); background: rgba(var(--good-rgb), 0.08); }

/* ---------- library (lib/community/library.php) ---------- */
.lib-filter { margin-top: 18px; }
.lib-count { margin: 16px 0 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cfg-card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
}
.prose .cfg-card { margin: 0 0 0.85em; max-width: 560px; }
.cfg-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cfg-card-head > .ic { color: var(--accent-2); }
.cfg-title { font-size: 15px; }
.cfg-desc { color: var(--muted); }
.prose .cfg-card p { margin: 0; }
.cfg-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.cfg-tag { padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 12px; line-height: 1.7; }
.cfg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--faint); font-size: 12.5px; }
.cfg-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.cfg-code-k { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.cfg-code code { font-family: var(--font-mono); font-size: 14px; color: var(--text); letter-spacing: 0.02em; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.cfg-code .button, .cfg-code button { margin-left: auto; }
.cfg-code .button + .button, .cfg-code button + .button { margin-left: 0; }
.cfg-how { color: var(--faint); font-size: 12.5px; }
.cfg-card.is-gone { flex-direction: row; align-items: center; color: var(--faint); border-style: dashed; }
.loader-facts { margin: 16px 0 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .acct-name { display: none; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .nav-search { width: 150px; }
  .nav-search:focus-within { width: 220px; }
  .topnav-links a { padding: 8px 10px; }
}
@media (max-width: 900px) {
  /* Narrower, not gone: the phone menu with its own search only appears
     at 768px, and the bar must keep a search in between. */
  .nav-search { width: 120px; }
  .nav-search:focus-within { width: 180px; }
  .nav-search kbd { display: none; }
}
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }
  .admin-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { white-space: nowrap; }
  .admin-main { padding: 22px 16px 60px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .cat-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .cat-last { display: none; }
}
@media (max-width: 768px) {
  .topnav-links { display: none; }
  .nav-mobile { display: block; }
  .acct-name { display: none; }
  .nav-search { display: none; }
  .composer-kbd { display: none; }
  .latest-row { grid-template-columns: 1fr; }
  .answer-jump { margin: 0 16px 12px; }
  .thread-row { grid-template-columns: minmax(0, 1fr) auto; }
  .thread-last { display: none; }
  .post { grid-template-columns: 1fr; }
  .post-side { flex-direction: row; align-items: center; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 8px 10px; }
  .post-side .av { --av: 32px; }
  .post-body { padding: 14px 16px; }
  .page { padding: 22px 16px 60px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .hide-xs { display: none !important; }
  .notif-pop { position: fixed; left: 8px; right: 8px; top: calc(var(--nav-h) + 6px); min-width: 0; max-width: none; }
  .member-row { grid-template-columns: 40px minmax(0, 1fr); }
  .member-stat { display: none; }
  .members-search input[type="search"] { width: 100%; }
  .list-sort { width: 100%; flex-wrap: wrap; }
  .cat-row { grid-template-columns: 1fr; gap: 6px; }
  .cat-counts { text-align: left; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .copy-row { flex-direction: column; }
  .pagehead h1 { font-size: 22px; }
  .topnav-in { padding: 0 12px; gap: 10px; }
  .topnav .status-badge { padding: 3px 8px; }
  .topnav .status-badge .st-word { display: none; }
  .lib-grid { grid-template-columns: 1fr; }
  .composer-tabs { border-right: 0; padding-right: 0; }
}
/* The wordmark stays on phones like it does on the front page; only below
   360px, where it would collide with the status dot, bell and account menu,
   does the eye carry the brand alone. */
@media (max-width: 360px) {
  .topnav .brand-name { display: none; }
}
@media (pointer: coarse) {
  .btn-sm, .post-foot button, .post-foot .button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark::after { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
