/* ─────────────────────────────────────────────
   ELIX WEB — Bone paper (design handoff: "Elix Web.html")
   Warm bone ground · white paper sheets for posts and cards
   Lavender accent · sky secondary · deep-lavender signals ·
   citron highlight. All type rides on Noto Sans TC; mono carries
   handles, DIDs and structural labels.
   Light is canonical on :root; dark ("Ink") arrives from the system
   preference or an explicit scene theme.
   ───────────────────────────────────────────── */
:root {
  color-scheme: light;
  --background: #F4F3EC;
  --background-soft: #ECEAE0;
  --surface: #FFFFFF;
  --surface-raised: #ECEAE0;
  --surface-deep: #E2DFD2;
  --border: #D8D3C4;
  --border-soft: #E6E2D6;
  --border-strong: #C6BFAC;
  --muted-fill: #E2DFD2;
  --accent: #C9AEEB;
  --lavender: #2846A8;
  --highlight: #EBE21C;
  --warning: #9A4A24;
  --danger: #9A4A24;
  --success: #6FB2E8;
  --sky: #6FB2E8;
  --text: #2A2A0A;
  --muted: #625F3C;
  --faint: #9C9974;
  --on-accent: #ffffff;
  --glow: 0 0 18px color-mix(in oklab, var(--accent) 20%, transparent);
  --serif: "Noto Sans TC", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif-en: "Noto Sans TC", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Noto Sans TC", ui-sans-serif, system-ui, sans-serif;
  --sans: "Noto Sans TC", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    Menlo, monospace;
  font-family: var(--sans);
}

/* Paper theme — explicit selection (wins inside a dark system) */
.forum-shell[data-theme="light"] {
  color-scheme: light;
  --background: #F4F3EC;
  --background-soft: #ECEAE0;
  --surface: #FFFFFF;
  --surface-raised: #ECEAE0;
  --surface-deep: #E2DFD2;
  --border: #D8D3C4;
  --border-soft: #E6E2D6;
  --border-strong: #C6BFAC;
  --muted-fill: #E2DFD2;
  --accent: #C9AEEB;
  --lavender: #2846A8;
  --highlight: #EBE21C;
  --warning: #9A4A24;
  --danger: #9A4A24;
  --success: #6FB2E8;
  --sky: #6FB2E8;
  --text: #2A2A0A;
  --muted: #625F3C;
  --faint: #9C9974;
  --on-accent: #ffffff;
  --glow: 0 0 18px color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Ink theme — explicit selection */
.forum-shell[data-theme="dark"] {
  color-scheme: dark;
  --background: #17130A;
  --background-soft: #1F1A0E;
  --surface: #14131A;
  --surface-raised: #1F1A0E;
  --surface-deep: #2A2413;
  --border: #362E17;
  --border-soft: #221D10;
  --border-strong: #4A4020;
  --muted-fill: #2A2413;
  --accent: #D9C6F2;
  --lavender: #5C82E0;
  --highlight: #F5EE3A;
  --warning: #C97B52;
  --danger: #C97B52;
  --success: #8FC4F5;
  --sky: #8FC4F5;
  --text: #F4EEDA;
  --muted: #B7AD8E;
  --faint: #726B4F;
  --on-accent: #17130A;
  --glow: 0 0 20px color-mix(in oklab, var(--accent) 34%, transparent);
}

/* Ink theme — auto: follow the system */
@media (prefers-color-scheme: dark) {
  :root,
  .forum-shell[data-theme="auto"] {
    color-scheme: dark;
    --background: #17130A;
    --background-soft: #1F1A0E;
    --surface: #14131A;
    --surface-raised: #1F1A0E;
    --surface-deep: #2A2413;
    --border: #362E17;
    --border-soft: #221D10;
    --border-strong: #4A4020;
    --muted-fill: #2A2413;
    --accent: #D9C6F2;
    --lavender: #5C82E0;
    --highlight: #F5EE3A;
    --warning: #C97B52;
    --danger: #C97B52;
    --success: #8FC4F5;
    --sky: #8FC4F5;
    --text: #F4EEDA;
    --muted: #B7AD8E;
    --faint: #726B4F;
    --on-accent: #17130A;
    --glow: 0 0 20px color-mix(in oklab, var(--accent) 34%, transparent);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Content that must reach assistive tech without being drawn — the feed's
   page heading, which the design deliberately does not show. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: none;
}

a:hover {
  color: var(--lavender);
}

.focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

/* ── About / FAQ ───────────────────────────── */
.faq-page { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 84px; }
.faq-hero { padding: 34px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.faq-hero h1 { margin-bottom: 12px; font-size: clamp(32px, 5vw, 50px); }
.faq-hero p { max-width: 630px; font-size: 17px; }
.faq-hero .primary-action { display: inline-flex; margin-top: 8px; }
.faq-start { margin: 26px 0; padding: 28px 32px; border-radius: 20px; background: var(--surface-raised); }
.faq-start h2 { font-size: 20px; }
.faq-start ol { display: grid; gap: 16px; margin: 0; padding-left: 24px; }
.faq-start li { padding-left: 6px; color: var(--text); }
.faq-start li strong, .faq-start li span { display: block; }
.faq-start li span { margin-top: 3px; color: var(--muted); line-height: 1.55; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.faq-list summary { padding: 19px 22px; color: var(--text); cursor: pointer; font-weight: 650; }
.faq-list details p { margin: 0; padding: 0 22px 20px; }
.faq-nerds { margin-top: 28px; padding: 16px 20px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); }
.faq-nerds summary { color: var(--text); cursor: pointer; font-weight: 650; }
.faq-nerds > p { margin: 14px 0; }
.faq-nerds dl { display: grid; gap: 10px; margin: 0; }
.faq-nerds dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.faq-nerds dt { color: var(--text); font-family: var(--mono); font-size: 12px; }
.faq-nerds dd { margin: 0; line-height: 1.55; }
.faq-nerd-question { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.faq-nerd-question summary { color: var(--text); cursor: pointer; font-weight: 650; }
.faq-nerd-question p { margin: 12px 0 0; }
@media (max-width: 640px) { .faq-page { width: min(100% - 24px, 760px); padding: 28px 0 82px; } .faq-hero, .faq-start { padding: 24px; } }

/* ── Shell ─────────────────────────────────── */
.forum-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
}

/* ── Top bar (wtop) ────────────────────────── */
.command-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 13px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 6;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-lockup:hover {
  color: var(--text);
}

.elix-mark {
  width: 34px;
  height: 34px;
  color: var(--text);
  flex-shrink: 0;
}

.elix-mark path {
  stroke: currentColor;
  stroke-width: 9;
  stroke-linecap: round;
  fill: none;
}

.elix-mark circle {
  fill: currentColor;
}

.elix-mark__center {
  fill: var(--accent) !important;
}

.brand-word {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-host {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
  margin-left: 2px;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: var(--background-soft);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  width: min(460px, 100%);
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
}

.command-context {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.command-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.command-nav a,
.route-links a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

.command-nav a[aria-current="page"],
.command-nav a:hover,
.route-links a:hover {
  color: var(--text);
  font-weight: 600;
}

.route-title,
.label-mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}

.route-title {
  white-space: nowrap;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  color: var(--text);
}

.session-chip span {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.session-chip strong {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--success);
  text-transform: uppercase;
}

.session-chip.is-anonymous span {
  font-weight: 500;
  color: var(--muted);
}

.session-chip.is-anonymous strong {
  color: var(--faint);
}

.header-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--background);
  border: 1px solid var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
}

.header-action:hover,
.primary-action:hover {
  opacity: 0.88;
  color: var(--background);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
}

.secondary-action:hover {
  color: var(--text);
  border-color: var(--text);
}

.danger-action,
.header-action.is-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.danger-action:hover,
.header-action.is-danger:hover {
  background: var(--danger);
  color: var(--background);
}

/* ── Main surface ──────────────────────────── */
.forum-main {
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── Three-column social layout ────────────── */
.cols {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 30px;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 26px 26px 60px;
  align-items: start;
}

/* Left rail */
.rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
  position: sticky;
  top: 84px;
  min-width: 0;
}

.rail-label {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--faint);
  text-transform: uppercase;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
}

.rail-nav a:hover {
  background: var(--background-soft);
  color: var(--text);
}

.rail-nav a[aria-current="page"] {
  background: var(--background-soft);
  font-weight: 700;
}

.rail-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.rail-icon path,
.rail-icon rect,
.rail-icon circle {
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.rail-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-block span,
.rail-muted {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  padding: 3px 12px;
}

/* Board rows in the rail (hash tile + meta) */
.rail-board-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 8px;
  border-radius: 9px;
  color: var(--text);
}

.rail-board-row:hover {
  background: var(--background-soft);
  color: var(--text);
}

.rail-board-row .hashav {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--lavender);
  border: none;
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  flex-shrink: 0;
}

.rail-board-row .meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.rail-board-row .meta .n {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-board-row .meta .h {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right rail cards — white paper sheets */
.side-panel,
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--surface);
}

.side-panel .section-label {
  margin-bottom: 12px;
}

.side-panel a {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.side-panel a:first-of-type {
  border-top: none;
}

.side-panel a:hover {
  color: var(--accent);
}

.thread-context-rail .thread-board-card {
  padding-top: 18px;
  padding-bottom: 18px;
}

.thread-board-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.thread-board-meta {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.side-panel span {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
}

.side-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  padding: 0 6px;
}

.card h2,
.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
}

/* ── Feed column ───────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: min(680px, 100%);
  margin: 0 auto;
}

.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--border);
}

.feed-head h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}

.feed-head p {
  font-family: var(--serif);
  font-size: 14px;
  margin: 0;
}

.permission-copy {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
  white-space: nowrap;
  padding-top: 6px;
}

/* Mobile focus surface, reused as the center feed canvas on desktop. */
.mobile-focus-stage {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

/* The revised handoff has no tab row above the feed, so the scene switcher,
   its help copy, the swipe coachmark and the two-panel track are gone; the
   feed renders as a single stream. */
.scene-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 0;
}

.scene-meta-row,
.personal-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.scene-meta-row {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.personal-board-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.personal-board-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.forum-list {
  display: flex;
  flex-direction: column;
}

.signed-pill {
  display: inline-flex;
  align-items: center;
  border: 1.5px dashed var(--accent);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--accent);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-2deg);
}

.scene-inline-action {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.mobile-compose-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--highlight);
  box-shadow: 0 0 0 3px var(--lavender);
  font-size: 28px;
  line-height: 1;
  z-index: 8;
}

/* Compose row (Threads-style inline) */
.compose {
  display: grid;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.compose-prompt {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.compose-prompt p {
  flex: 1;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--faint);
  margin: 0;
}

.thread-draft-form {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
}

.thread-draft-form .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.thread-draft-form h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.35;
}

.thread-draft-label {
  display: grid;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.thread-draft-label input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
}

.thread-draft-label input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thread-draft-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.thread-signing-review {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 88%, var(--accent) 12%);
}

.thread-signing-review p {
  margin: 6px 0 12px;
}

.thread-signing-review dl,
.thread-signing-review dl div {
  margin: 0;
}

.thread-signing-review dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) 1fr;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--rule-soft, #e9e9e9);
}

.thread-signing-review dt {
  color: var(--ink-muted, #666);
}

.thread-signing-review dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-deep);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  flex-shrink: 0;
}

.compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 52px;
}

.compose-actions button,
.compose-actions a:not(.primary-action) {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}

.compose-actions span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.compose-actions .primary-action {
  min-width: 0;
}

/* Post card (Threads-style) — white paper sheet on yellow ground */
.post {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 14px;
  margin: 0 -4px;
  border-radius: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.post-source {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 11px;
}

.post-author .avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.post-author strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.post-author span {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
}

.post-body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.post-actions button,
.post-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
}

.post-actions button:hover,
.post-actions a:hover {
  background: var(--background-soft);
  color: var(--text);
}

.post-actions span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.signed-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px dashed var(--accent);
  border-radius: 5px;
  padding: 1px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  white-space: nowrap;
  transform: rotate(-2deg);
}

.empty-state {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--faint);
  padding: 14px 4px;
}

/* ── Board page ────────────────────────────── */
.board-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
}

.board-head .heading h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.board-head .heading p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 4px;
}

.permission-state {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.permission-state .lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.permission-state .val {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--lavender);
  font-weight: 600;
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: middle;
}

.gate-requirement {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--accent);
}

.gate-blocked {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.gate-blocked .primary-action:disabled {
  opacity: 0.45;
}

.gate-blocked p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--warning);
  margin: 0;
}

/* Thread list (board threads) */
.thread-list {
  border: none;
  border-radius: 0;
  padding: 0;
}

.thread-list .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 4px 10px;
}

.thread-list .head h3 {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.thread-list ul,
.directory ul,
.scope-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 17px 14px;
  margin: 0 -4px 4px;
  border-radius: 16px;
  background: var(--surface);
}

.board-thread-row:hover {
  background: var(--background-soft);
}

.board-thread-link {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  color: var(--text);
  overflow-wrap: normal;
  text-decoration: none;
}

.board-thread-link:hover,
.board-thread-link:focus-visible {
  color: var(--text);
}

.board-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-deep);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 17px;
  flex-shrink: 0;
}

.board-thread-row.is-signed .board-thread-avatar {
  background: var(--accent);
  color: var(--on-accent);
}

.board-thread-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.board-thread-board {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--background-soft);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-thread-status {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}

.board-thread-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}

.board-thread-by,
.thread-hd-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
}

.thread-title-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}

.thread-title-link:hover,
.thread-title-link:focus-visible {
  text-decoration: underline;
}

.thread-identity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.did-handle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pk-pill {
  display: inline-flex;
  align-items: center;
  border: 1.5px dashed var(--accent);
  border-radius: 5px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  white-space: nowrap;
  transform: rotate(-2deg);
}

.board-thread-time,
.thread-time,
.thread-post-time,
.thread-reply-time {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

.board-thread-tools {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.post-tombstone {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--faint);
  margin: 0;
}

.locked-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--warning);
  border-radius: 999px;
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warning);
  vertical-align: middle;
}

.locked-banner {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--warning);
  margin: 4px 0 0;
}

.locked-no-reply {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
}

.thread-detail .back-link {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.thread-detail .back-link:hover,
.thread-detail .back-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.thread-detail-shell {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 4px 18px;
}

.thread-hd {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border);
}

.thread-crumb {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--success);
}

.thread-hd h1 {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  color: var(--text);
}

.thread-conversation {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.thread-op {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  padding: 22px 0 14px;
}

.thread-post-lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.thread-op-avatar,
.thread-reply-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--serif);
}

.thread-op-avatar {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px;
}

.thread-reply-avatar {
  background: var(--surface-deep);
  color: var(--muted);
  font-size: 17px;
}

.thread-reply-avatar.is-anonymous {
  background: var(--background-soft);
  color: var(--faint);
  font-family: var(--mono);
}

.thread-line {
  width: 2px;
  flex: 1;
  min-height: 18px;
  background: var(--border);
}

.thread-post-content,
.thread-reply-content {
  min-width: 0;
}

.thread-post-top,
.thread-reply-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 6px;
}

.thread-author,
.thread-reply-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.thread-source {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
}

.thread-source-strong {
  color: var(--text);
  font-weight: 600;
}

.thread-body-copy p,
.thread-reply-body p {
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.72;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}

.thread-body-copy p:last-child,
.thread-reply-body p:last-child {
  margin-bottom: 0;
}

.thread-action-row,
.thread-mini-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.thread-action,
.thread-mini-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 3px 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

.thread-action:hover,
.thread-action:focus-visible,
.thread-mini-action:hover,
.thread-mini-action:focus-visible {
  color: var(--text);
}

.thread-action-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.thread-action-icon path {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.thread-reply-composer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border-soft);
}

.thread-composer-field {
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background-soft);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 13.5px;
  text-align: left;
}

.thread-composer-field:hover,
.thread-composer-field:focus-visible {
  color: var(--muted);
}

.thread-composer-send {
  min-height: 36px;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0 15px;
  background: var(--text);
  color: var(--background);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.thread-replies {
  padding-top: 16px;
}

.thread-replies-head {
  margin-bottom: 2px;
}

.thread-replies-head h3 {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.thread-reply-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  padding: 16px 0;
}

.thread-reply-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 64px;
  bottom: -8px;
  width: 2px;
  background: var(--border-soft);
}

.thread-reply-item.is-removed .thread-reply-content {
  padding: 2px 0;
}

.thread-reply-name.is-anonymous {
  color: var(--muted);
}

.thread-mini-actions {
  gap: 10px;
  margin-top: 9px;
}

.thread-mini-action {
  font-size: 11.5px;
}

.thread-mini-action .thread-action-icon {
  width: 15px;
  height: 15px;
}

/* ── Directory (boards page) ───────────────── */
.directory-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.directory {
  border: none;
  border-radius: 0;
  padding: 8px 0 0;
}

.directory h3 {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.directory li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}

.directory li a {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.directory li a:hover {
  color: var(--accent);
}

.directory li .descr {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.directory li .perm {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender);
}

.directory li .perm.read {
  color: var(--faint);
}

/* ── External (fediverse) section ──────────── */
.external-section {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}

.external-section .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.external-origin-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.external-disclaimer {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--faint);
  margin: 8px 0 4px;
}

.external-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.external-item {
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}

.external-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.external-origin {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.external-body {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 4px;
}

.external-actor {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  margin: 0;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--faint);
}

.compliance-badge.is-compatible {
  border-color: var(--success);
  color: var(--success);
}

.compliance-badge.is-unknown {
  border-color: var(--border);
  color: var(--faint);
}

/* ── Reporting ─────────────────────────────── */
.report-control {
  margin-top: 4px;
}

.report-trigger {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  cursor: pointer;
  list-style: none;
}

.report-trigger:hover {
  color: var(--warning);
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background-soft);
}

.report-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.report-field span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.report-field select,
.report-field textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13.5px;
}

.report-note-hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--faint);
  margin: 0;
}

/* ── Moderation console ────────────────────── */
.moderation-console .feed-head p {
  max-width: 62ch;
}

.moderation-state {
  margin-top: 20px;
}

.moderation-forbidden h3 {
  color: var(--warning);
}

.moderation-queue,
.moderation-audit {
  margin-top: 20px;
}

.moderation-board-group {
  padding: 10px 0;
}

.moderation-report {
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}

.moderation-report-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.moderation-report-meta .target-kind {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.moderation-report-meta code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.moderation-report-meta .ago {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
  margin-left: auto;
}

.reason-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--warning);
  border-radius: 999px;
  padding: 1px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warning);
}

.moderation-note,
.moderation-reporter {
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--muted);
  margin: 6px 0 0;
}

.moderation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.moderation-action-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.moderation-action-btn.is-primary {
  border-color: var(--text);
  color: var(--text);
}

.moderation-action-btn:hover {
  background: var(--background-soft);
}

.moderation-audit ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.moderation-audit-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}

.moderation-audit-entry code {
  font-family: var(--mono);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.moderation-audit-entry .ago {
  margin-left: auto;
  color: var(--faint);
}

/* ── Info banners / notices ────────────────── */
.info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--background-soft);
}

.info-banner .icon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lavender);
  margin-top: 6px;
  flex-shrink: 0;
}

.info-banner strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.info-banner span {
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.info-banner.is-warning .icon,
.info-banner.is-danger .icon {
  background: var(--warning);
}

.info-banner.is-success .icon {
  background: var(--success);
}

/* ── Login (QR → app) ──────────────────────── */
.login-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  width: 100%;
  min-height: 520px;
  border-bottom: 1px solid var(--border);
}

.qr-block {
  background: var(--background-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  text-align: center;
}

.qr-block .label-mono {
  color: var(--muted);
}

.qr-hint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.6;
}

.challenge-payload-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 220px;
  min-height: 220px;
  border-radius: 10px;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 20px;
  justify-content: center;
}

.challenge-payload-preview strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.challenge-payload-preview span {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
  overflow-wrap: anywhere;
}

.qr-code {
  width: 160px;
  height: 160px;
  shape-rendering: crispEdges;
}

.login-page {
  border: none;
  border-radius: 0;
  padding: 44px 46px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.login-page .section-label {
  color: var(--success);
}

/* Sign-in / generate-challenge buttons ride the accent (btn-gen in design) */
.login-page .primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--glow);
}

.login-page h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.login-page > p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
}

.challenge-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 6px 0 0;
}

.challenge-details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}

.challenge-details dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  flex-shrink: 0;
}

.challenge-details dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

.challenge-details code {
  font-family: var(--mono);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.scope-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.scope-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid var(--border-soft);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.scope-list li::after {
  content: "✓";
  margin-left: auto;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

.scope-empty {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--faint);
}

/* ── Settings (sessions page) ──────────────── */
.settings-home {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 30px 26px 60px;
  display: flex;
  flex-direction: column;
}

.settings-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-bottom: 14px;
}

.settings-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-align: center;
}

.settings-done {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  justify-self: end;
}

.settings-identity-hero {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-avatar svg {
  width: 34px;
  height: 34px;
}

.settings-avatar svg path,
.settings-avatar svg circle {
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
}

.settings-identity-hero h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.settings-identity-hero p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.settings-edit {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.settings-group {
  margin-top: 26px;
}

.settings-group-label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  padding-bottom: 10px;
  margin: 0;
}

.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 15px;
  align-items: center;
  padding: 16px 2px;
  border-top: 1px solid var(--border-soft);
}

.settings-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
}

.settings-row-icon svg {
  width: 20px;
  height: 20px;
}

.settings-row-icon svg path,
.settings-row-icon svg circle {
  stroke: currentColor;
  stroke-width: 1.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-row-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
}

.settings-row-title em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
  text-transform: uppercase;
  margin-left: 4px;
}

.settings-row-detail {
  font-family: var(--serif);
  font-size: 13.5px;
  color: var(--muted);
}

.settings-row-value {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.settings-row-value.is-danger {
  color: var(--danger);
}

.language-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 22px;
  padding: 0 4px;
}

.language-option {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--background-soft);
}

.settings-chevron {
  color: var(--faint);
  font-size: 13px;
}

.pk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  color: var(--accent);
  border: 1.5px dashed var(--accent);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 5px;
  transform: rotate(-2deg);
}

/* Theme picker (Paper / Ink / Auto) */
.theme-option-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.theme-option {
  flex: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  align-items: stretch;
  text-align: center;
}

.theme-option.is-selected {
  border-color: var(--lavender);
  box-shadow: 0 0 0 2px rgba(201, 174, 235, 0.5);
}

.theme-swatch {
  display: block;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.theme-swatch.is-light {
  background: #f4f8f7;
}

.theme-swatch.is-dark {
  background: #0d1b2a;
  border-color: #0d1b2a;
}

.theme-swatch.is-auto {
  background: #f4f8f7;
}

.theme-swatch.is-auto::after {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  right: -18px;
  width: 60%;
  background: #0d1b2a;
  transform: skewX(-20deg);
}

.settings-session-card {
  margin-top: 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.settings-version {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
  margin: 30px 0 0;
}

/* ── Not found ─────────────────────────────── */
.not-found-page {
  width: min(560px, calc(100% - 52px));
  margin: 40px auto;
}

.route-links {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

/* ── Footer ────────────────────────────────── */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.app-footer a {
  color: var(--faint);
}

.app-footer a:hover {
  color: var(--text);
}

/* ── Mobile tab bar ────────────────────────── */
.mobile-tabbar {
  display: none;
  align-items: center;
  padding: 8px 8px 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--background);
  position: sticky;
  bottom: 0;
  z-index: 6;
}

.mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10.5px;
}

.mobile-tab[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.mobile-tab:hover {
  color: var(--text);
}

.mobile-tab .elix-mark,
.mobile-icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.mobile-icon path,
.mobile-icon rect,
.mobile-icon circle {
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* ── Tablet · 768–1023 ─────────────────────── */
@media (max-width: 1023px) {
  .cols {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
    padding: 22px 22px 50px;
  }

  .right-rail {
    display: none;
  }

  .rail-nav a {
    justify-content: center;
    padding: 11px;
  }

  .rail-nav a span {
    display: none;
  }

  .rail-label,
  .rail-block {
    display: none;
  }

  .searchbox {
    width: min(320px, 100%);
  }

  .command-nav {
    display: none;
  }

  .login-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .qr-block {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 30px;
  }

  .login-page {
    padding: 28px 26px;
  }

  .login-page h2 {
    font-size: 26px;
  }

  .board-thread-row {
    display: block;
    gap: 8px;
  }

  .board-thread-tools {
    justify-content: flex-start;
    padding-left: 57px;
  }
}

/* Legacy contract breakpoint — keep tablet rules coherent below 900px too. */
@media (max-width: 900px) {
  .route-title {
    display: none;
  }
}

/* ── Mobile · <768 ─────────────────────────── */
@media (max-width: 767px) {
  .cols {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 16px 76px;
  }

  .rail {
    display: none;
  }

  .command-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }

  .searchbox {
    display: none;
  }

  .brand-host {
    display: none;
  }

  .elix-mark {
    width: 26px;
    height: 26px;
  }

  .feed {
    width: 100%;
  }

  .feed-head h1 {
    font-size: 20px;
  }

  .board-head .heading h1 {
    font-size: 26px;
  }

  .thread-hd h1 {
    font-size: 32px;
  }

  .thread-detail-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .thread-op,
  .thread-reply-item,
  .thread-reply-composer {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
  }

  .thread-reply-composer {
    grid-template-areas:
      "avatar field"
      ". send";
  }

  .thread-reply-composer .thread-reply-avatar {
    grid-area: avatar;
  }

  .thread-composer-field {
    grid-area: field;
  }

  .thread-composer-send {
    grid-area: send;
    width: fit-content;
  }

  .thread-op-avatar,
  .thread-reply-avatar,
  .board-thread-avatar {
    width: 38px;
    height: 38px;
  }

  .board-thread-link {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
  }

  .board-thread-tools {
    padding-left: 49px;
  }

  .thread-reply-item:not(:last-child)::after {
    left: 18px;
    top: 58px;
  }

  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .app-footer {
    padding-bottom: 84px;
  }

  .settings-home {
    padding: 18px 16px 90px;
  }

  .settings-identity-hero {
    grid-template-columns: 56px 1fr auto;
    gap: 13px;
    padding-bottom: 18px;
  }

  .settings-avatar {
    width: 56px;
    height: 56px;
  }

  .settings-identity-hero h2 {
    font-size: 19px;
  }

  .settings-group {
    margin-top: 18px;
  }

  .login-page {
    padding: 24px 16px;
  }

  .qr-block {
    padding: 26px 16px;
  }

  .challenge-payload-preview {
    width: 190px;
    min-height: 190px;
  }

  .qr-code {
    width: 140px;
    height: 140px;
  }

  .thread-list li {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .thread-list li .av {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .thread-list li .meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .theme-option-row {
    flex-wrap: wrap;
  }
}

/* Legacy 560px contract point — tab bar must be revealed at the smallest sizes. */
@media (max-width: 560px) {
  /* The design shows the tab bar on every mobile screen, the feed included. */
  .mobile-tabbar {
    display: flex;
  }
}

/* ── Darkroom neon signal — display type & signal treatments ────────── */
h1,
h2,
h3,
h4,
.forum-shell .brand,
.legal-header .legal-home {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

.forum-shell a {
  text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
}

.forum-shell button:focus-visible,
.forum-shell a:focus-visible,
.forum-shell input:focus-visible,
.forum-shell textarea:focus-visible,
.forum-shell select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ─────────────────────────────────────────────
   DESIGN LAYER — "Elix Web.html" structures
   The bone ground carries the page; posts, cards and rails sit on
   it as white paper sheets. Everything below is the handoff's
   component anatomy: icon rail, lane+body post, icon action row,
   compose strip, board banner, and the five-cell mobile tab bar.
   ───────────────────────────────────────────── */
.forum-shell {
  background: var(--background);
}

.forum-main,
.command-header {
  background-color: var(--background);
}

.card,
.compose,
.scene-panel,
.post,
.side-panel {
  background-color: var(--surface);
}

.command-header {
  border-bottom: 1px solid var(--border);
}

.brand-word,
.elix-mark {
  color: var(--text);
}

.brand-word {
  font-weight: 600;
}

.elix-mark__center {
  fill: var(--accent) !important;
}

.brand-host,
.label-mono,
.section-label,
.rail-label {
  color: var(--faint);
}

.searchbox {
  background: var(--background-soft);
  border-color: var(--border-soft);
  gap: 10px;
}

.searchbox .elix-icon {
  color: var(--faint);
  flex-shrink: 0;
}

/* Buttons — the accent pill is the design's primary key. */
.primary-action,
.btn-signin {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.primary-action:hover,
.btn-signin:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  opacity: 0.9;
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
}

.secondary-action {
  color: var(--muted);
  border-color: var(--border-strong);
}

.secondary-action:hover {
  color: var(--text);
  background: var(--background-soft);
  border-color: var(--text);
}

.route-links a:hover,
.side-panel a:hover,
.scene-inline-action:hover {
  color: var(--lavender);
}

/* Header context cluster */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--background-soft);
  color: var(--text);
}

.icon-btn.is-upcoming {
  color: var(--faint);
}

.ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.session-chip {
  background: var(--surface);
  border-color: var(--border);
  padding: 4px 11px 4px 4px;
}

.session-chip .av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lavender);
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  flex-shrink: 0;
}

.session-chip .who {
  font-size: 13.5px;
  font-weight: 600;
}

.session-chip .tier,
.session-chip.is-anonymous strong {
  color: var(--sky);
}

.permission-copy {
  color: var(--lavender);
}

/* ── Left rail — icon nav + board rows ─────── */
.rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.rail-item:hover {
  background: var(--background-soft);
  color: var(--text);
}

.rail-item[aria-current="page"] {
  background: var(--background-soft);
  font-weight: 700;
  color: var(--text);
}

.rail-item.is-upcoming {
  color: var(--faint);
  cursor: default;
}

.rail-item .rail-icon,
.rail-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: currentColor;
}

.rail-board-row:hover {
  background: var(--background-soft);
}

.rail-board-row .hashav,
.hashav {
  background: var(--lavender);
  color: #fff;
  border-color: transparent;
}

.rail-board-row .ago,
.follow-row .ago {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.rail-boards {
  gap: 2px;
}

/* ── Cards ─────────────────────────────────── */
.card,
.side-panel {
  border-color: var(--border);
  border-radius: 16px;
}

.side-panel .trend {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--border-soft);
  text-decoration: none;
}

.side-panel .trend:first-of-type {
  border-top: none;
}

.side-panel .trend .tag {
  display: block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--sky);
}

.side-panel .trend .n {
  display: block;
  margin-top: 1px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
}

.mini-promise {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}

.mini-promise:first-of-type {
  margin-top: 0;
}

.mini-promise .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.mini-promise .dot.is-moss {
  background: var(--sky);
}

.mini-promise .dot.is-accent {
  background: var(--accent);
}

.mini-promise .tx {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.mini-promise .tx b {
  color: var(--text);
  font-weight: 600;
}

.feed-head {
  border-bottom-color: var(--border);
}

.swipe-coachmark {
  background: var(--background-soft);
  border-color: var(--border);
}

.signed-pill {
  background: var(--surface);
}

.forum-notice,
.forum-error {
  background: var(--background-soft);
}

/* ── Post card — lane + body (design anatomy) ─ */
.post {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  padding: 18px 14px;
  margin: 0 -4px 4px;
  border-radius: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.post .lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.post .av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-deep);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 17px;
  flex-shrink: 0;
}

.post.signed .av {
  background: var(--accent);
  color: #fff;
}

.post .thread-line {
  flex: 1;
  width: 2px;
  min-height: 8px;
  border-radius: 2px;
  background: var(--border);
}

.post .body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.post .row1 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.post .row1 .handle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.post .row1 .handle .seal {
  display: inline-flex;
  color: var(--accent);
}

.post .row1 .when {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--faint);
  white-space: nowrap;
}

.post .src {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
}

.post .src .b {
  color: var(--sky);
}

.post .heading {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.post .text {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.post .text p {
  margin: 0 0 8px;
}

.post .text p:last-child {
  margin-bottom: 0;
}

/* Icon action row */
.post .actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  margin-left: -6px;
  flex-wrap: wrap;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-family: var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.act .elix-icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.act .c {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.act:hover {
  background: var(--background-soft);
  color: var(--text);
}

.act.is-static {
  cursor: default;
  color: var(--faint);
}

.act.is-static:hover {
  background: none;
}

.act.is-static .elix-icon {
  color: var(--faint);
}

/* ── Compose strip ─────────────────────────── */
.compose {
  border-radius: 16px;
  padding: 16px 14px;
}

.compose-prompt .hint,
.compose-prompt p {
  font-family: var(--sans);
  font-style: italic;
  font-size: 16px;
  color: var(--faint);
}

.compose .avatar,
.compose .av {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.avatar,
.hashav {
  border-color: transparent;
}

/* ── Board banner ──────────────────────────── */
.board-head {
  gap: 12px;
  padding: 28px 4px 20px;
}

.board-head .heading h1 {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
}

.board-head .heading p {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.permission-state .val {
  color: var(--lavender);
  font-weight: 600;
}

/* Board thread rows sit as paper sheets, like posts. */
.board-thread-row {
  background: var(--surface);
  border-radius: 16px;
  border-bottom: none;
  margin: 0 -4px 4px;
  padding: 17px 14px;
}

.board-thread-row:hover {
  background: var(--background-soft);
}

.board-thread-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.board-thread-status .d {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sky);
  flex-shrink: 0;
}

.board-thread-status .d.new {
  background: var(--highlight);
}

.board-thread-row.is-signed .board-thread-avatar {
  background: var(--accent);
  color: #fff;
}

.board-thread-title {
  font-family: var(--sans);
}

.directory li a:hover {
  color: var(--lavender);
}

/* ── Mobile tab bar — five cells + centre key ─ */
.mobile-tab.is-upcoming {
  color: var(--faint);
  cursor: default;
}

.mobile-tab.center {
  flex: 0 0 auto;
  width: 52px;
  height: 38px;
  margin: 0 8px;
  border: none;
  border-radius: 13px;
  background: var(--accent);
  color: var(--highlight);
  box-shadow: 0 0 0 3px var(--lavender);
  gap: 0;
}

.mobile-tab.center:hover {
  color: var(--highlight);
}

.mobile-tab.center .mobile-icon {
  width: 23px;
  height: 23px;
}

/* The design carries navigation in the rail (desktop/tablet) and the tab bar
   (mobile), so the header nav only surfaces on pages that render no rail. */
@media (min-width: 768px) {
  .command-nav,
  .route-title {
    display: none;
  }

  .forum-shell[data-page-id="login"] .command-nav,
  .forum-shell[data-page-id="sessions"] .command-nav,
  .forum-shell[data-page-id="faq"] .command-nav,
  .forum-shell[data-page-id="about"] .command-nav,
  .forum-shell[data-page-id="not-found"] .command-nav,
  .forum-shell[data-page-id="unknown"] .command-nav {
    display: flex;
  }
}

/* ── Tablet · 768–1023: icons-only rail ────── */
@media (max-width: 1023px) {
  .rail {
    align-items: center;
    gap: 6px;
  }

  .rail-item {
    justify-content: center;
    padding: 11px;
    width: 44px;
  }

  .rail-item span {
    display: none;
  }

  .rail-label,
  .rail-boards {
    display: none;
  }
}

/* ── Mobile · <768 ─────────────────────────── */
@media (max-width: 767px) {
  .post {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 16px 12px;
  }

  .post .av {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .post .text {
    font-size: 15px;
  }

  .post .heading {
    font-size: 16px;
  }

  .board-head .heading h1 {
    font-size: 26px;
  }

  .icon-btn,
  .btn-signin {
    display: none;
  }

  /* On mobile the handoff composes from the tab bar's centre key, so the feed
     is posts only — no compose strip and no floating action button. */
  .compose,
  .mobile-compose-fab {
    display: none;
  }
}
