/* duxb — cool paper, cobalt ink, and one bold idea: every community wears its own colour tile. */

:root {
  --bg: #F2F3F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --ink: #171A31;
  --ink-2: #3B4060;
  --muted: #646B88;
  --line: #E1E4EE;
  --line-2: #CDD2E1;
  --brand: #3346D3;
  --brand-ink: #FFFFFF;
  --brand-soft: #E8EBFD;
  --up: #F2542D;
  --down: #6E56CF;
  --ok: #0E8A6B;
  --ok-soft: #E2F4EE;
  --warn: #B4235A;
  --warn-soft: #FBE7EF;
  --feedback: #0E8A6B;
  --shadow: 0 1px 2px rgba(23, 26, 49, .06), 0 8px 24px -12px rgba(23, 26, 49, .18);
  --r: 12px;
  --r-sm: 8px;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0E1C; --surface: #14172A; --surface-2: #1A1E34; --ink: #E9EBF6; --ink-2: #C3C7DD; --muted: #8E94B4;
    --line: #242944; --line-2: #333A5C; --brand: #7D8BFF; --brand-ink: #0C0E1C; --brand-soft: #1E2450;
    --up: #FF7A55; --down: #9C88FF; --ok: #3CC79D; --ok-soft: #10302A; --warn: #F2719E; --warn-soft: #3A1426; --feedback: #3CC79D;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0E1C; --surface: #14172A; --surface-2: #1A1E34; --ink: #E9EBF6; --ink-2: #C3C7DD; --muted: #8E94B4;
  --line: #242944; --line-2: #333A5C; --brand: #7D8BFF; --brand-ink: #0C0E1C; --brand-soft: #1E2450;
  --up: #FF7A55; --down: #9C88FF; --ok: #3CC79D; --ok-soft: #10302A; --warn: #F2719E; --warn-soft: #3A1426; --feedback: #3CC79D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.tiny { width: 14px; height: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inline { display: inline; }
.linklike { color: var(--brand); font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn .i { width: 17px; height: 17px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { color: var(--brand-ink); filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-danger { background: var(--warn-soft); color: var(--warn); }
.btn-join { background: var(--ink); color: var(--surface); min-width: 84px; }
.btn-join:hover { color: var(--surface); filter: brightness(1.2); }
.btn-joined { background: transparent; border-color: var(--line-2); color: var(--ink); min-width: 84px; }
.btn-joined:hover { border-color: var(--warn); color: var(--warn); }
.btn-feedback { background: var(--feedback); color: #fff; }
.btn-feedback:hover { color: #fff; filter: brightness(1.08); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }
.dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--up); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; max-width: 1440px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); position: relative; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; border-radius: 3px; }
.logo-mark::before { left: 7px; top: 7px; width: 8px; height: 16px; background: var(--brand-ink); }
.logo-mark::after { left: 16px; top: 7px; width: 7px; height: 7px; background: #FFB547; border-radius: 50%; }
.logo-word { font: 800 25px/1 var(--display); letter-spacing: -.04em; }
.search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 16px 0 42px; outline: none; }
.search input:focus { border-color: var(--brand); background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.me-chip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 999px; font-weight: 600; font-size: 14px; list-style: none; cursor: pointer; }
.me-chip::-webkit-details-marker { display: none; }
.me-chip:hover { background: var(--surface-2); }
.only-narrow { display: none; }

/* ---------- menus (details/summary) ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; z-index: 50; display: grid; gap: 1px; }
.menu-up .menu-pop { left: 0; right: auto; }
.menu-pop > a, .menu-pop > button, .menu-pop form > button, .mod-remove-btns button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 14px; text-align: left; color: var(--ink); }
.menu-pop > a:hover, .menu-pop > button:hover, .menu-pop form > button:hover, .mod-remove-btns button:hover { background: var(--surface-2); color: var(--ink); }
.menu-pop .danger { color: var(--warn); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu-sep { font-size: 12px; color: var(--muted); padding: 10px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; font-weight: 600; }
.menu-sep span { font-weight: 400; }
.menu-label { display: block; font-size: 12px; color: var(--muted); padding: 6px 10px 4px; }
.menu-pop select { width: calc(100% - 12px); margin: 0 6px 4px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 8px; font-size: 13px; }
.mod-remove-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); max-width: 1440px; margin: 0 auto; }
.shell-bare { grid-template-columns: 1fr; }
.rail { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 18px 14px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.rail-nav, .rail-list { display: grid; gap: 2px; }
.rail-nav a, .rail-list a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; font-weight: 500; color: var(--ink-2); }
.rail-nav a:hover, .rail-list a:hover { background: var(--surface); color: var(--ink); }
.rail-nav a.on, .rail-list a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.rail-list a > span:not(.tile) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rail-h { font: 600 12px/1 var(--text); color: var(--muted); padding: 18px 12px 6px; letter-spacing: .02em; }
.rail-create { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; border: 1.5px dashed var(--line-2); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.rail-create:hover { border-color: var(--brand); color: var(--brand); }
.rail-feedback { margin-top: auto; display: grid; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--ok-soft); color: var(--ink); font-size: 13px; }
.rail-feedback strong { font-family: var(--display); font-size: 15px; color: var(--feedback); }
.rail-feedback:hover { color: var(--ink); outline: 1.5px solid var(--feedback); }
.rail-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 12px 0; font-size: 12px; color: var(--muted); }
.main { min-width: 0; padding: 24px 28px 96px; }
.scrim { display: none; }

/* ---------- columns ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 24px; max-width: 1100px; margin: 0 auto; align-items: start; }
.col-side { display: grid; gap: 16px; position: sticky; top: calc(var(--top-h) + 20px); }
.narrow { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.narrow.wide { max-width: 980px; }
.wide-page { max-width: 1100px; margin: 0 auto; display: grid; gap: 18px; }
.page-head { display: grid; gap: 4px; margin-bottom: 4px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.page-head p { color: var(--muted); }
.page-head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-h { font-size: 20px; font-weight: 650; margin: 24px 0 10px; }

/* ---------- tiles & avatars (the signature) ---------- */
.tile { --c: var(--brand); display: inline-grid; place-items: center; flex: none; background: var(--c); color: #fff; font: 800 12px/1 var(--display); letter-spacing: -.02em; border-radius: 30%; overflow: hidden; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-xs { width: 22px; height: 22px; font-size: 9px; }
.tile-sm { width: 32px; height: 32px; font-size: 12px; }
.tile-md { width: 44px; height: 44px; font-size: 16px; }
.tile-lg { width: 64px; height: 64px; font-size: 24px; }
.tile-xl { width: 92px; height: 92px; font-size: 34px; border: 4px solid var(--surface); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); }
.av { --h: 230; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: hsl(var(--h) 55% 55%); color: #fff; font-weight: 700; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-xs { width: 22px; height: 22px; font-size: 11px; }
.av-sm { width: 30px; height: 30px; font-size: 13px; }
.av-lg { width: 64px; height: 64px; font-size: 26px; }
.av-xl { width: 88px; height: 88px; font-size: 36px; border: 4px solid var(--surface); }
.av-gone { background: var(--line-2); }

/* ---------- composer & sort ---------- */
.composer { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.composer:hover { border-color: var(--line-2); color: inherit; }
.composer-field { flex: 1; height: 38px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.composer-ico { color: var(--muted); display: grid; place-items: center; width: 36px; height: 36px; }
.sortbar { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.sortbar > a, .sort-t > summary { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.sortbar > a:hover, .sort-t > summary:hover { background: var(--surface); color: var(--ink); }
.sortbar > a.on { background: var(--ink); color: var(--surface); }
.sort-t > summary { border: 1px solid var(--line-2); color: var(--ink); }
.sort-t .menu-pop { left: 0; right: auto; min-width: 160px; }
.mini-sort { display: flex; gap: 2px; }
.mini-sort a { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mini-sort a.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }

/* ---------- feed rows ---------- */
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; padding: 12px 14px 8px 8px; border-top: 1px solid var(--line); position: relative; }
.row:first-child { border-top: 0; }
.row[data-href] { cursor: pointer; }
.row:hover { background: var(--surface-2); }
.row.is-pinned { background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 8%, transparent), transparent 40%); }
.row-comment, .note-row { grid-template-columns: minmax(0, 1fr); padding-left: 18px; }
.note-row.is-unread { box-shadow: inset 3px 0 0 var(--brand); }
.row-comm { grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 14px 16px; }
.row-body { min-width: 0; display: grid; gap: 6px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.meta a { color: var(--ink-2); }
.meta a:hover { color: var(--brand); }
.meta-comm { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink) !important; }
.row-title { font: 650 18px/1.3 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.row-title a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.excerpt { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.badge .i { width: 12px; height: 12px; }
.badge-nsfw { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-pin, .badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-removed { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-elect { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge-recall { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-restore, .badge-unban { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.flair { --fc: var(--brand); display: inline-block; vertical-align: 3px; font: 600 11.5px/1 var(--text); padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--fc) 14%, transparent); color: var(--fc); letter-spacing: 0; }

/* votes */
.vote { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 2px; }
.vote button { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.vote button .i { width: 20px; height: 20px; stroke-width: 1.7; }
.vote .v-up:hover { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.vote .v-down:hover { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.v-score { font-weight: 700; font-size: 13.5px; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.vote.is-up .v-up, .vote.is-up .v-score { color: var(--up); }
.vote.is-up .v-up .i { fill: currentColor; }
.vote.is-down .v-down, .vote.is-down .v-score { color: var(--down); }
.vote.is-down .v-down .i { fill: currentColor; }
.vote.bump .v-score { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.25); } }
.vote-comment { flex-direction: row; gap: 2px; padding: 0; }
.vote-comment button { width: 28px; height: 28px; }
.vote-comment button .i { width: 17px; height: 17px; }

/* actions */
.actions, .cm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-left: -8px; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; }
.act:hover { background: var(--line); color: var(--ink); }
.act.is-on { color: var(--brand); }
.act.is-on .i { fill: currentColor; }

/* media */
.media { position: relative; margin: 4px 0 2px; border-radius: 10px; overflow: hidden; background: #0d0f1a; max-height: 540px; display: grid; place-items: center; border: 1px solid var(--line); }
.media img { max-height: 540px; width: auto; max-width: 100%; height: auto; object-fit: contain; }
.feed .media, .feed .media img { max-height: 440px; }
.media.is-blurred img { filter: blur(28px) saturate(.6); transform: scale(1.1); }
.reveal { position: absolute; inset: auto; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: rgba(13,15,26,.75); color: #fff; font-weight: 600; font-size: 14px; }
.media:not(.is-blurred) .reveal { display: none; }
.is-blurred-text { filter: blur(5px); cursor: pointer; user-select: none; }
.linkcard { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); max-width: 560px; }
.linkcard:hover { border-color: var(--brand); color: inherit; }
.linkcard-ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.linkcard-txt { display: grid; min-width: 0; flex: 1; font-size: 13px; }
.linkcard-txt span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* crossposts */
.xpost { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); margin: 2px 0; }
.row:hover .xpost { border-color: var(--ink-2); }
.xpost-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--muted); }
.xpost-tag .i { width: 14px; height: 14px; }
.xpost-title { font: 650 16px/1.3 var(--display); }
.xpost-stats { font-size: 12.5px; color: var(--muted); }
.xpost-gone { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.xpost-preview { pointer-events: none; }
.xposts ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.xposts li a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.xposts li a:hover { background: var(--surface-2); }
.xposts .panel-h { display: flex; gap: 8px; align-items: center; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.panel-h { font-size: 15px; font-weight: 650; }
.panel p { font-size: 14px; color: var(--ink-2); }
.panel-more { font-size: 13px; font-weight: 600; color: var(--brand); }
.panel-hero { background: var(--ink); color: var(--surface); border: 0; padding: 20px; }
.panel-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.panel-hero p { color: color-mix(in srgb, var(--surface) 75%, transparent); }
.panel-hero .btn-primary { background: var(--surface); color: var(--ink); }
.panel-hero .btn-ghost { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 35%, transparent); }
.panel-feedback { background: var(--ok-soft); border-color: transparent; color: var(--ink); }
.panel-feedback:hover { color: var(--ink); outline: 1.5px solid var(--feedback); }
.panel-feedback > .i { width: 28px; height: 28px; color: var(--feedback); }
.panel-feedback strong { font: 650 17px/1.25 var(--display); }
.panel-feedback span:not(.btn) { font-size: 14px; color: var(--ink-2); }
.panel-comm { border-top: 4px solid var(--c); }
.comm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.comm-list a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.comm-list a:hover { background: var(--surface-2); color: inherit; }
.comm-list span { display: grid; line-height: 1.25; font-size: 14px; }
.comm-list small { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0; }
.stats div { display: grid; }
.stats dt { font-size: 12px; color: var(--muted); order: 2; }
.stats dd { margin: 0; font: 700 17px/1.2 var(--display); }
.rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.rules li::marker { color: var(--muted); font-weight: 700; }
.mods, .stewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.mods li { display: flex; justify-content: space-between; gap: 8px; }
.stewards li { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.stewards li:last-child { border-bottom: 0; }
.stewards li > div { display: grid; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink-2); font-size: 14px; }
.note a { color: var(--brand); font-weight: 600; }
.note .i { margin-top: 2px; color: var(--brand); }

/* ---------- community header ---------- */
.comm-head { --c: var(--brand); max-width: 1100px; margin: -24px auto 20px; }
.comm-banner { height: 128px; background-color: var(--c); background-size: cover; background-position: center; border-radius: 0 0 var(--r) var(--r);
  background-image: radial-gradient(circle at 85% -20%, rgba(255,255,255,.28), transparent 45%), repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px); }
.comm-id { display: flex; align-items: flex-start; gap: 16px; padding: 0 16px; margin-top: -36px; }
.comm-names { flex: 1; min-width: 0; padding-top: 50px; }
.comm-names h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.comm-names p { color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comm-cta { display: flex; gap: 8px; padding-top: 52px; }
.comm-tabs { display: flex; gap: 4px; padding: 14px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.comm-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.comm-tabs a.on { color: var(--ink); border-color: var(--c); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; }
.count-vote { background: var(--brand); color: var(--brand-ink); }

.panel-start { border-left: 4px solid var(--c); margin-bottom: 12px; }
.panel-start h2 { font-size: 18px; font-weight: 700; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.checklist li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; font-size: 14px; }
.checklist li::before { content: counter(s); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; }
.checklist li.done::before { content: "✓"; background: var(--ok); color: #fff; border-color: transparent; }
.checklist li a, .checklist .linklike { font-weight: 650; color: var(--ink); justify-self: start; }
.checklist li.done a { text-decoration: line-through; color: var(--muted); }
.checklist span { color: var(--muted); }

/* ---------- post page & comments ---------- */
.post-full { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 10px 8px; }
.post-title { font-size: 26px; font-weight: 750; letter-spacing: -.02em; overflow-wrap: anywhere; }
.md { font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; display: grid; gap: 10px; }
.md a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.md blockquote { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.md pre { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; font-size: 13px; }
.md code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md pre code { background: none; padding: 0; }
.md ul, .md ol { margin: 0; padding-left: 22px; }
.md h3, .md h4, .md h5 { font-size: 17px; }
.md hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.md-small { font-size: 14px; }
.spoiler { background: var(--ink); color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; transition: color .15s; }
.spoiler.shown, .spoiler:focus { color: var(--surface); }
.comments { margin-top: 16px; display: grid; gap: 14px; }
.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.comments-head h2 { font-size: 17px; font-weight: 650; }
.join-convo { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.join-convo span { flex: 1; font-weight: 600; }
.cform { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.cform:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cform textarea { width: 100%; border: 0; outline: none; resize: vertical; padding: 12px 14px; min-height: 96px; background: transparent; display: block; }
.cform-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; background: var(--surface-2); border-top: 1px solid var(--line); }
.cform-bar .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cform-btns { display: flex; gap: 6px; flex: none; margin-left: auto; }
.thread { display: grid; gap: 4px; }
.cm { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; position: relative; }
.cm-line { grid-row: 1; width: 22px; position: relative; cursor: pointer; margin-top: 28px; }
.cm-line::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); border-radius: 2px; }
.cm-line:hover::before { background: var(--brand); }
.cm-main { min-width: 0; display: grid; gap: 4px; padding: 4px 0; }
.cm > .cm-main > .cm-meta { margin-left: -30px; }
.cm-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cm-author { font-weight: 700; color: var(--ink); }
.cm-time:hover { text-decoration: underline; }
.tag-op { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 5px; }
.cm-body { font-size: 15px; }
.cm-kids { display: grid; gap: 2px; }
.cm-kids:empty { display: none; }
.cm-collapsed-note { display: none; }
.cm.collapsed > .cm-main > :not(.cm-meta) { display: none; }
.cm.collapsed > .cm-line { margin-top: 0; }
.cm.collapsed .cm-collapsed-note { display: inline; font-weight: 600; }
.cm.is-gone .cm-body { font-size: 14px; }
.cm.flash-focus > .cm-main { background: color-mix(in srgb, var(--brand) 9%, transparent); border-radius: 8px; }
.cm .cform { margin: 6px 0; }
.cm .cm-kids .cm-kids .cm-kids .cm-kids .cm-kids .cm-kids .cm-kids .cm-kids { margin-left: -30px; }
.empty-small { color: var(--muted); padding: 14px 4px; font-size: 14px; }
.edit-post { display: grid; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.edit-post textarea, .cm-edit textarea { width: 100%; border: 0; padding: 12px; min-height: 140px; background: var(--surface); outline: none; resize: vertical; }
.cm-edit { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.cm-edit textarea { min-height: 90px; }

/* ---------- forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.form { display: grid; gap: 16px; }
.form.compact { gap: 10px; }
.form-h { font-size: 18px; font-weight: 700; }
.form-h:not(:first-child) { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 6px; position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field > label, .label { font-weight: 600; font-size: 14px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .form textarea, .form input[type=search] {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field select { height: 44px; }
.field textarea { resize: vertical; min-height: 44px; }
.hint { font-size: 13px; color: var(--muted); }
.hint.ok { color: var(--ok); font-weight: 600; }
.hint.bad { color: var(--warn); font-weight: 600; }
.counter { position: absolute; right: 2px; top: 0; font-size: 12px; color: var(--muted); }
.comm-pick { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.comm-pick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.comm-pick .prefix { padding-left: 12px; color: var(--muted); font-weight: 700; }
.comm-pick input { border: 0 !important; box-shadow: none !important; padding-left: 2px !important; }
.errors { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 500; }
.errors ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.errors .i { margin-top: 1px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.toggle input:checked { background: var(--brand); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle a { color: var(--brand); font-weight: 600; }
.toggles { display: flex; gap: 20px; flex-wrap: wrap; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px; height: 40px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.drop { display: grid; place-items: center; min-height: 200px; border: 2px dashed var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface-2); position: relative; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--brand); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-empty { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.drop-empty strong { color: var(--ink); }
.drop-empty .i { width: 32px; height: 32px; color: var(--brand); }
.drop-preview { max-height: 380px; width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; height: 32px; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; height: 44px; }
.seg label { flex: 1; display: grid; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--surface); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 30%; background: var(--c); cursor: pointer; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); transition: transform .12s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); transform: scale(.92); }
.swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 4px; }
.upload-row { display: flex; align-items: center; gap: 14px; }
.upload-row input[type=file] { font-size: 13px; }
.gov-note { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--brand-soft); font-size: 14px; color: var(--ink-2); }
.gov-note .i { width: 24px; height: 24px; color: var(--brand); margin-top: 2px; }
.gov-note strong { color: var(--ink); }

/* create community */
.create-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; max-width: 1040px; margin: 0 auto; align-items: start; }
.create-preview { position: sticky; top: calc(var(--top-h) + 24px); display: grid; gap: 8px; }
.preview-card { --c: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: grid; gap: 12px; padding-bottom: 16px; }
.preview-band { height: 84px; background: var(--c); background-image: radial-gradient(circle at 85% -20%, rgba(255,255,255,.28), transparent 45%), repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px); transition: background-color .25s; }
.preview-id { display: flex; align-items: flex-start; gap: 12px; padding: 0 16px; margin-top: -40px; }
.preview-id .tile { background: var(--c); color: #fff; border: 4px solid var(--surface); }
.preview-id div { display: grid; padding-top: 44px; min-width: 0; }
.preview-id strong { font: 750 19px/1.2 var(--display); overflow-wrap: anywhere; }
.preview-id span { color: var(--muted); font-size: 13px; font-weight: 600; }
.preview-card p { padding: 0 16px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.preview-row { display: flex; align-items: center; gap: 10px; padding: 0 16px; }

/* auth */
.auth { min-height: calc(100vh - var(--top-h) - 120px); display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: min(440px, 100%); padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--brand); font-weight: 600; }

/* directory */
.chip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip-link { flex: none; height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; background: var(--surface); }
.chip-link.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dir-card { --c: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; align-content: start; position: relative; overflow: hidden; }
.dir-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.dir-link { display: flex; align-items: center; gap: 12px; }
.dir-names { display: grid; min-width: 0; }
.dir-names strong { font-family: var(--display); font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.dir-names small { color: var(--muted); font-size: 12.5px; }
.dir-card p { font-size: 14px; color: var(--ink-2); min-height: 2.6em; }
.dir-card form { justify-self: start; }
.comm-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.comm-strip a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }

/* profile */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.profile-head > div { flex: 1; }
.profile-head h1 { font-size: 28px; font-weight: 800; }
.tabs-line { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs-line a { padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs-line a.on { color: var(--ink); border-color: var(--brand); }
.search-big { display: flex; gap: 8px; margin-bottom: 12px; }
.search-big input { flex: 1; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 18px; background: var(--surface); outline: none; }
.search-big input:focus { border-color: var(--brand); }
.search-big .btn { height: 44px; }

/* mod & governance */
.queue-item { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.queue-why { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.queue-title { font-weight: 650; font-size: 15px; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.queue-actions .mod-remove { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.queue-actions .mod-remove .menu-label { display: none; }
.queue-actions .mod-remove select { height: 32px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 10px; background: var(--surface); font-size: 13px; max-width: 240px; }
.queue-actions .mod-remove-btns { display: flex; gap: 6px; }
.queue-actions .mod-remove-btns button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; font-size: 13px; width: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plain-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.plain-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.plain-list li > a { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.plain-list li .muted { flex: 1; }
.gov-intro { --c: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 10px; border-left: 5px solid var(--c); }
.gov-intro h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.gov-intro p { color: var(--ink-2); max-width: 62ch; }
.gov-facts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gov-facts li { display: grid; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.gov-facts strong { font: 750 20px/1.2 var(--display); }
.gov-facts span { font-size: 12.5px; color: var(--muted); }
.gov-card { display: grid; gap: 10px; border-left: 4px solid var(--warn); }
.poll { display: grid; gap: 10px; margin-bottom: 12px; }
.poll:target { box-shadow: 0 0 0 2px var(--brand); }
.poll-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.poll h3 { font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.poll h3 a { color: var(--brand); }
.poll-statement { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line-2); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
.poll-statement cite { font-style: normal; font-size: 12.5px; color: var(--muted); }
.tally { display: grid; gap: 6px; }
.tally-bar { height: 10px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.tally-bar span { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 999px; transition: width .3s; }
.tally-bar i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.tally-nums { display: flex; gap: 16px; font-size: 13px; }
.ballot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gov-log { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gov-log li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.gov-log li:first-child { border-top: 0; }
.gov-log time { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.gov-log a { font-weight: 600; }
.gov-log li.is-overturned p:first-child { text-decoration: line-through; text-decoration-color: var(--muted); }
.recall summary { display: inline-flex; width: auto; }
.recall form { margin-top: 8px; }
.recall textarea { min-height: 80px; }

/* admin */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.stat-tiles div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; }
.stat-tiles dt { font-size: 12.5px; color: var(--muted); order: 2; }
.stat-tiles dd { margin: 0; font: 800 26px/1.1 var(--display); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.inline-search { display: flex; gap: 6px; }
.inline-search input { height: 32px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 12px; background: var(--surface); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr.is-banned td { opacity: .6; }
.row-actions { display: flex; gap: 6px; }

/* misc */
.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 40px 24px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty h3 { font-size: 20px; font-weight: 700; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.empty-page { padding: 64px 24px; }
.empty-page h1 { font-size: 28px; font-weight: 800; }
.pager { display: flex; justify-content: center; gap: 10px; padding: 18px 0; }
.flash { display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto 16px; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 14px; }
.flash-error { background: var(--warn-soft); color: var(--warn); }
.flash span { flex: 1; }
.flash-x { color: inherit; opacity: .7; }
.prose { display: grid; gap: 12px; line-height: 1.65; }
.prose h1 { font-size: 30px; font-weight: 800; }
.prose h2 { font-size: 20px; margin-top: 10px; }
.prose ol, .prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose a { color: var(--brand); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--warn); color: #fff; }

/* feedback FAB: the always-visible way to suggest improvements */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 45; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--feedback); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--feedback) 70%, transparent), 0 2px 6px rgba(0,0,0,.15); }
.fab:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.06); }
.fab .i { width: 22px; height: 22px; stroke-width: 2; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cols { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 1020px) {
  .shell { grid-template-columns: 1fr; }
  .only-narrow { display: inline-grid; }
  .rail { position: fixed; left: 0; top: var(--top-h); bottom: 0; width: 290px; height: auto; background: var(--bg); z-index: 60; transform: translateX(-100%); transition: transform .22s ease; border-right: 1px solid var(--line); }
  body.drawer-open .rail { transform: none; }
  body.drawer-open .scrim { display: block; position: fixed; inset: var(--top-h) 0 0; background: rgba(10, 12, 25, .45); z-index: 55; }
}
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .col-side { position: static; }
  .create-wrap { grid-template-columns: 1fr; }
  .create-preview { position: static; order: -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .gov-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --top-h: 56px; }
  body { font-size: 15px; }
  .top-in { gap: 6px; padding: 0 10px; }
  .logo-word { display: none; }
  .search input { height: 38px; padding-left: 38px; }
  .hide-sm { display: none !important; }
  .btn-feedback span { display: none; }
  .btn-feedback { width: 38px; padding: 0; height: 38px; }
  .main { padding: 16px 16px 96px; }
  .feed { border-radius: 10px; margin: 0 -8px; }
  .row { grid-template-columns: 38px minmax(0, 1fr); padding: 10px 10px 6px 4px; }
  .row-title { font-size: 16.5px; }
  .post-full { grid-template-columns: 36px minmax(0, 1fr); padding: 12px 12px 8px 2px; margin: 0 -8px; }
  .post-title { font-size: 21px; }
  .comm-head { margin: -16px -16px 16px; }
  .comm-banner { height: 92px; border-radius: 0; }
  .comm-id { margin-top: -28px; gap: 12px; flex-wrap: wrap; }
  .tile-xl { width: 68px; height: 68px; font-size: 25px; }
  .comm-names h1 { font-size: 22px; }
  .comm-names { flex-basis: calc(100% - 84px); padding-top: 40px; }
  .comm-cta { width: 100%; padding-top: 4px; }
  .comm-cta form, .comm-cta .btn-join { flex: 1; }
  .comm-cta .btn { width: 100%; }
  .page-head h1 { font-size: 25px; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .auth-card { padding: 22px; }
  .gov-log li { grid-template-columns: 1fr; gap: 4px; }
  .cform-bar .muted { display: none; }
  .fab { right: 16px; bottom: 16px; height: 48px; padding: 0 16px 0 14px; font-size: 14px; }
  .cm-line { width: 16px; }
  .cm { grid-template-columns: 16px minmax(0, 1fr); column-gap: 6px; }
  .cm-line::before { left: 7px; }
  .cm > .cm-main > .cm-meta { margin-left: -22px; }
  .cm .cm-kids .cm-kids .cm-kids .cm-kids .cm-kids { margin-left: -22px; }
}
@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .fab span { display: none; }
  .fab { width: 50px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.field-link { float: right; font-weight: 500; font-size: 13px; color: var(--brand); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye .i { width: 19px; height: 19px; }
.pw-eye[aria-pressed="true"] { color: var(--brand); }

/* instant avatar upload */
.avup { display: flex; align-items: center; gap: 18px; }
.avup-face { --h: 230; position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; cursor: pointer; background: hsl(var(--h) 55% 55%); color: #fff; font-weight: 700; isolation: isolate; }
.avup-lg .avup-face { width: 96px; height: 96px; font-size: 38px; }
.avup-xl .avup-face { width: 88px; height: 88px; font-size: 36px; box-shadow: 0 0 0 4px var(--surface); }
.avup-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avup-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avup-initial { line-height: 1; }
.avup-overlay { position: absolute; inset: 0; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 2px; background: rgba(12, 14, 28, .55); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.avup-overlay .i { width: 22px; height: 22px; }
.avup-face:hover .avup-overlay, .avup-face:focus-within .avup-overlay, .avup.is-over .avup-overlay { opacity: 1; }
.avup-face:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
.avup.is-over .avup-face { outline: 2px dashed var(--brand); outline-offset: 4px; }
.avup-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.avup-ring circle { fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .25s ease, stroke .2s, opacity .3s; opacity: 0; }
.avup.is-uploading .avup-ring circle, .avup.is-done .avup-ring circle { opacity: 1; }
.avup.is-done .avup-ring circle { stroke: var(--ok); }
.avup.is-uploading .avup-img { filter: brightness(.75) saturate(.8); }
.avup.is-uploading .avup-face { cursor: progress; }
.avup.is-done .avup-face { animation: avpop .35s ease; }
@keyframes avpop { 50% { transform: scale(1.05); } }
.avup-text { display: grid; gap: 4px; min-width: 0; }
.avup-text strong { font-size: 14px; }
.avup-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.btn-text { background: none; color: var(--muted); padding: 0 10px; }
.btn-text:hover { color: var(--warn); }
.profile-head > .avup { flex: none; }
.form > .form-h:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.avup-overlay { background: rgba(12, 14, 28, .62); }
