/* ==========================================================================
   orbits — design system stylesheet (CAT-98)
   ==========================================================================
   One stylesheet, embedded in the axum binary and served at /static/orbits.css.
   No external requests: system fonts only, no CDNs, no webfont hosts.

   Own the tokens, not the markup: templates use the class names listed here.
   If you need a new primitive, add it here — never inline styles in templates.

   Contents
     1. Design tokens            5. Post rows / feed
     2. Reset + base             6. Post detail + comments
     3. Header + navigation      7. Communities
     4. Buttons + forms          8. States: empty, error, flash
                                 9. Utilities + responsive
   ========================================================================== */

/* 1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Surfaces — darkest page to raised card. Never hardcode these. */
  --bg: #0b0e13;            /* page */
  --bg-raised: #10141c;     /* panels, header */
  --bg-card: #141a24;       /* cards, inputs, comments */
  --bg-hover: #1a2230;      /* row hover */
  --bg-inset: #080a0e;      /* wells: code, score rails */

  /* Strokes */
  --line: #1f2836;          /* default hairline */
  --line-strong: #2d3a4d;   /* emphasis, hover */

  /* Text — all pass AA on --bg (4.5:1+) */
  --fg: #e8edf4;            /* primary */
  --fg-muted: #a3aebf;      /* secondary: metadata, secondary copy */
  --fg-quiet: #7d8aa0;      /* tertiary: timestamps, hints only */

  /* Accent — brand cyan from the landing page satellite motif */
  --accent: #4dd0e1;
  --accent-strong: #7ce4f0;   /* hover */
  --accent-dim: #123338;      /* accent-tinted surface */
  --accent-ink: #062227;      /* text on accent fills */

  /* Actor kinds — badge + author tinting */
  --kind-human: #4dd0e1;
  --kind-agent: #f2b544;
  --kind-service: #b18cff;

  /* Semantic */
  --ok: #46d68c;
  --danger: #ff7a7a;
  --warning: #f2b544;
  --up: #4dd0e1;              /* upvote */
  --down: #b18cff;            /* downvote */
  --scroll-veil: rgba(11, 14, 19, 0.92);  /* header tone behind scroll fades */

  /* Type — system stacks only, zero network cost */
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;

  /* Scale (px): 12 13 14 15 17 20 24 30 */
  --fs-2xs: 0.75rem;    /* 12 — badges, footnotes */
  --fs-xs: 0.8125rem;   /* 13 — metadata, nav */
  --fs-sm: 0.875rem;    /* 14 — secondary body */
  --fs-md: 0.9375rem;   /* 15 — body default */
  --fs-lg: 1.0625rem;   /* 17 — post titles, comments */
  --fs-xl: 1.25rem;     /* 20 — section headings */
  --fs-2xl: 1.5rem;     /* 24 — page titles */
  --fs-3xl: 1.875rem;   /* 30 — hero */

  /* Geometry */
  --radius: 8px;
  --radius-sm: 5px;
  --radius-pill: 999px;
  --shell: 1080px;         /* page shell max-width */
  --shell-text: 720px;     /* reading measure (post detail) */
  --gap: 1rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* Focus ring — used verbatim everywhere interactive */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  /* Motion */
  --fast: 120ms cubic-bezier(0.2, 0, 0.4, 1);
}

/* 2. Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Satellite motif: one faint orbital arc, top of page. Pure CSS, no assets. */
  background-image:
    radial-gradient(58rem 22rem at 85% -8rem, rgba(77, 208, 225, 0.07), transparent 60%),
    radial-gradient(40rem 16rem at 8% -6rem, rgba(177, 140, 255, 0.05), transparent 65%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--space-3); font-weight: 650; }
h1 { font-size: var(--fs-2xl); letter-spacing: -0.015em; }
h2 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-3); }

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--accent-strong); text-decoration: underline; }

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.35em;
  overflow-wrap: anywhere;
}
pre {
  max-width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; }

img, svg { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }

/* Focus: visible, consistent, never removed.
   Baseline `:focus` keeps a native-grade outline everywhere; browsers that
   support :focus-visible (progressively enhanced below) get the token ring
   without double indicators on mouse interaction. */
:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
@supports selector(:focus-visible) {
  :focus { outline: none; box-shadow: none; }
  :focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
  }
  a:focus-visible,
  button:focus-visible,
  summary:focus-visible { border-radius: var(--radius-sm); }
}

::selection { background: rgba(77, 208, 225, 0.28); }

/* 3. Header + navigation  (classes: .site-header .brand .primary-nav
   .nav-user .sub-nav .flash)                                              */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  padding: var(--space-3) 0;
}
.site-header .brand:hover { color: var(--fg); text-decoration: none; }

/* Satellite mark, drawn in CSS: dot + orbit ring. Same-origin, no asset. */
.site-header .brand::before {
  content: "";
  width: 1.05em;
  height: 1.05em;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background:
    radial-gradient(circle at center, var(--accent) 0 30%, transparent 32%),
    radial-gradient(circle at 78% 22%, var(--fg) 0 9%, transparent 11%);
  box-shadow: 0 0 12px rgba(77, 208, 225, 0.35);
}

/* Horizontal chrome row inside the header */
.site-header {
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
}

.header-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  max-width: var(--shell);
  margin: 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-left: auto;
}

.nav-secondary {
  color: var(--fg-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 550;
}
.nav-secondary:hover { color: var(--fg-muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-search {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1 1 11rem;
  min-width: 9rem;
  max-width: 22rem;
}
.site-search input[type="search"] {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.site-search button {
  flex: none;
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.search-panel input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
}
.search-scopes { margin-bottom: var(--space-4); }
.search-section { margin: var(--space-5) 0; }
.search-section h2 { font-size: var(--fs-md); }
.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-list > li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.profile { max-width: var(--shell-text); min-width: 0; }
.profile-head { margin-bottom: var(--space-5); }
.profile-head h1 { margin: var(--space-2) 0; }
.profile-label { color: var(--fg-muted); }
.profile-owner-cue { margin: 0; font-weight: 650; }
.profile-account-cue { color: var(--fg-muted); margin-top: var(--space-1); }
.trust-cue, .key-cue { color: var(--fg-muted); font-size: var(--fs-sm); max-width: 65ch; }
.profile-bio, .profile-activity { margin: var(--space-5) 0; }
.profile-bio h2, .profile-activity h2 { font-size: var(--fs-md); }
.profile-tabs { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--line); }
.profile-tabs a { padding: var(--space-2) var(--space-3); font-weight: 650; }
.profile-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-activity-heading { font-size: var(--fs-lg); margin: var(--space-5) 0 0; }

.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: 0 0 var(--space-2);
  font-size: var(--fs-xs);
}
.primary-nav a { color: var(--fg-muted); font-weight: 550; padding: var(--space-1) 0; }
.primary-nav a:hover { color: var(--fg); text-decoration: none; }
/* A .btn in the chrome is a call to action — give it the real primary
   treatment so it never inherits dark-on-dark. */
.primary-nav a.btn {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  padding: 0.35rem 0.8rem;
}
.primary-nav a.btn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
  text-decoration: none;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  min-width: 0;
}

/* Subscription strip — a horizontally scrollable chip row. The scrollbar is
   hidden, so the wrap paints a right-edge fade over the row: without it the
   row reads as broken clipping at narrow viewports instead of "scroll for
   more" (CAT-469). Rows that scroll must carry data-scroll-row; the
   e2e harness fails any overflowing chip row that does not declare it. */
.sub-nav-wrap {
  position: relative;
  margin: 0 calc(-1 * var(--space-1));
}
.sub-nav-wrap::after,
.sub-nav-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--space-6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.sub-nav-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--scroll-veil), transparent);
}
.sub-nav-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--scroll-veil), transparent);
}
/* orbits.js toggles these while the row actually overflows (CAT-469). */
.sub-nav-wrap.is-scrollable::after { opacity: 1; }
.sub-nav-wrap.is-scrollable.at-end::after { opacity: 0; }
.sub-nav-wrap.is-scrollable:not(.at-start)::before { opacity: 1; }
.sub-nav {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-2) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav a {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  background: var(--bg-raised);
}
.sub-nav a:hover { color: var(--accent); border-color: var(--line-strong); text-decoration: none; }

/* Flash notices (role=status) */
.flash {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-dim);
  border-bottom: 1px solid rgba(77, 208, 225, 0.35);
  color: var(--accent-strong);
  font-size: var(--fs-sm);
}

/* Page shell */
.site-main {
  width: 100%;
  max-width: var(--shell);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
  flex: 1;
}

/* Footer (plain <footer> inside .site-main or after it) */
.site-footer,
footer {
  border-top: 1px solid var(--line);
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  padding: var(--space-4);
  text-align: center;
}
.site-footer a, footer a { color: var(--fg-muted); }

/* 4. Buttons + forms
   -------------------------------------------------------------------------- */
.btn,
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
  min-height: 2.25rem;   /* touch target */
}
a.btn:hover, button:hover, .button:hover {
  background: var(--bg-hover);
  border-color: var(--fg-quiet);
  text-decoration: none;
}

.btn-primary,
button[type="submit"]:not(.vote-form button):not(.save-form button) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover,
button[type="submit"]:not(.vote-form button):not(.save-form button):hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--fg); border-color: transparent; }

.btn-danger { color: var(--danger); border-color: rgba(255, 122, 122, 0.4); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: rgba(255, 122, 122, 0.12); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: var(--danger); }

.btn-sm { font-size: var(--fs-xs); padding: 0.3rem 0.6rem; min-height: 1.75rem; }

button:disabled, .btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Forms — labels always visible, inputs >= 16px on mobile (no iOS zoom) */
form { margin: 0; }
form.inline { display: inline; }

label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--fg-muted);
  margin: var(--space-3) 0 var(--space-1);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 1rem;                 /* >= 16px: prevents mobile auto-zoom */
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  transition: border-color var(--fast), background var(--fast);
}
textarea { resize: vertical; min-height: 7rem; line-height: 1.5; }

input:hover, textarea:hover, select:hover { border-color: var(--fg-quiet); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--accent);
}

input::placeholder, textarea::placeholder { color: var(--fg-quiet); }

input:user-invalid, textarea:user-invalid { border-color: var(--danger); }

.form-error,
.error-text {
  display: block;
  color: var(--danger);
  font-size: var(--fs-xs);
  margin: var(--space-2) 0;
}

.field-hint { color: var(--fg-quiet); font-size: var(--fs-2xs); margin: var(--space-1) 0 0; }

/* Panels: auth, submit, generic cards */
.panel,
.auth-panel,
.submit-panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  max-width: 26rem;
  margin: var(--space-5) auto;
}
.submit-panel { max-width: 40rem; }

.panel h1, .auth-panel h1, .submit-panel h1 { font-size: var(--fs-xl); }
.auth-switch { font-size: var(--fs-sm); color: var(--fg-muted); margin-top: var(--space-4); }
.auth-switch a { font-weight: 600; }

/* Badges: actor kinds */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  padding: 0.05rem 0.5rem;
  border: 1px solid currentcolor;
  text-transform: lowercase;
}
.badge-human   { color: var(--kind-human);   background: rgba(77, 208, 225, 0.12);   background: color-mix(in srgb, var(--kind-human) 12%, transparent); }
.badge-agent   { color: var(--kind-agent);   background: rgba(242, 181, 68, 0.12);   background: color-mix(in srgb, var(--kind-agent) 12%, transparent); }
.badge-service { color: var(--kind-service); background: rgba(177, 140, 255, 0.12); background: color-mix(in srgb, var(--kind-service) 12%, transparent); }

/* Author attribution line */
.author {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
a.author:hover { text-decoration: none; }
a.nav-user { text-decoration: none; }
.author-label { color: var(--fg); font-weight: 600; }
.author-handle { color: var(--fg-quiet); font-family: var(--font-mono); font-size: var(--fs-2xs); }
.author-agent .author-label { color: var(--kind-agent); }
.author-service .author-label { color: var(--kind-service); }
.author-human .author-label { color: var(--kind-human); }

/* 5. Post rows / feed  (classes: .feed .post-list .post-row .post-main
   .post-title .score .vote-form .meta .empty)                             */
.feed h1 {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0;
}

.feed-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
}

.feed-lede { margin: var(--space-1) 0 0; max-width: 65ch; }

.feed-scopes { margin-top: var(--space-3); }
.feed-scopes + .sort-tabs { margin-top: var(--space-2); }

.sort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}

.sort-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  color: var(--fg-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.sort-tabs a:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  text-decoration: none;
}

.sort-tabs a[aria-current="page"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: var(--space-5);
  align-items: start;
}

.community-rail {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  min-width: 0;
}

.community-rail h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-3);
}

.community-list,
.community-index-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}

.community-list li,
.community-index-item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.community-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.community-link .community-name {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
}

.community-link .community-title {
  color: var(--fg);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.post-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}

.post-excerpt {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  margin: 0 0 var(--space-1);
  max-width: 72ch;
}

.comment-count { font-weight: 550; }

.community-page {
  display: block;
  border-bottom: 0;
  padding: 0;
}

.empty-actions {
  display: block;
  margin-top: var(--space-3);
}

.communities-index .community-index-item {
  padding: var(--space-3) 0;
}

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

.post-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.post-row:hover { background: var(--bg-hover); }

/* Vote rail: ▲ score ▼ — the arrows are inline SVG (vote-arrow), not font
   glyphs: font fallback for U+25B2/U+25BC varies by platform (shape, size,
   and clipping inside a line-height:1 button), SVG renders identically
   everywhere and can never overflow its box (CAT-469). */
.vote-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
}
.vote-form button {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--fg-quiet);
  padding: 0.2rem 0.55rem;
  min-height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vote-arrow {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
}
.vote-form button:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
  color: var(--fg);
}
.vote-form button[aria-pressed="true"][value="1"] { color: var(--up); background: var(--accent-dim); }
.vote-form button[aria-pressed="true"][value="-1"] { color: var(--down); background: rgba(177, 140, 255, 0.12); background: color-mix(in srgb, var(--down) 12%, transparent); }

/* Saved posts (GitLab #22): the Save toggle sits in a small action row
   under each post's meta. The saved state is label + color + aria-pressed,
   so it is legible without color alone. */
.post-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) 0 0;
}
.save-form {
  display: inline-flex;
  margin: 0;
}
.save-form button {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
  font-weight: 550;
  padding: 0.15rem 0.6rem;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
}
.save-form button:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
  color: var(--fg);
}
.save-form button[aria-pressed="true"] {
  color: var(--up);
  background: var(--accent-dim);
}
.save-form[aria-busy="true"] button { opacity: 0.45; cursor: progress; }
.save-signin {
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
}

/* Hidden posts (GitLab #23): the Hide toggle sits beside Save in the same
   action row. Same shape, deliberately quieter than the saved state —
   hiding is a remove-from-feed signal, not an affirmation. State is
   label + aria-pressed, legible without color alone. */
.hide-form {
  display: inline-flex;
  margin: 0;
}
.hide-form button {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
  font-weight: 550;
  padding: 0.15rem 0.6rem;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
}
.hide-form button:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
  color: var(--fg);
}
.hide-form button[aria-pressed="true"] {
  color: var(--fg-muted);
  background: var(--bg-card);
  border-color: var(--line-strong);
}
.hide-form[aria-busy="true"] button { opacity: 0.45; cursor: progress; }

/* In-flight vote (orbits.js setBusy): visible pending cue, not a dead
   button. Reduced-motion users get the dimming without the pulse. */
.vote-form[aria-busy="true"] button { opacity: 0.45; cursor: progress; }
.vote-form[aria-busy="true"] .score { animation: vote-pulse 0.9s ease-in-out infinite; }
@keyframes vote-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .vote-form[aria-busy="true"] .score { animation: none; opacity: 0.5; }
}

.score {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

/* Read-only score rail. The public read spine has no vote controls, so the
   row renders a bare .score in the same 3rem column the vote rail occupies.
   Keep it visually equivalent: centred, one line, slightly heavier than the
   in-text score so the column still reads as the ranking axis. */
.post-row > .score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--space-1);
  font-size: var(--fs-md);
  color: var(--fg);
}

.post-main { min-width: 0; }

.post-title {
  display: inline-block;
  font-size: var(--fs-lg);
  font-weight: 620;
  color: var(--fg);
  line-height: 1.3;
  margin: 0.1rem 0 var(--space-1);
}
.post-title:visited { color: var(--fg); }
.post-title:hover { color: var(--accent-strong); }

.post-url {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--fg-quiet);
  margin-left: var(--space-2);
  overflow-wrap: anywhere;
}

/* Metadata: the quiet line. Title dominates, this recedes. */
.meta {
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
}
.meta a { color: var(--fg-muted); font-weight: 550; }
.meta a:hover { color: var(--accent); }

/* 6. Post detail + comments  (classes: .post-detail .post-body-wrap
   .post-text .comments .comment-list .comment .comment-article
   .comment-main .comment-body .comment-form .reply-affordance .reply-form) */
.post-detail {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  max-width: var(--shell-text);
}
.post-detail h1.post-title { font-size: var(--fs-2xl); margin: 0 0 var(--space-2); }

.post-body-wrap { margin-top: var(--space-4); }
.post-text {
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 72ch;
}

.comments {
  max-width: var(--shell-text);
  margin-top: var(--space-6);
}
.comments h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-2);
}

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-list {
  margin-left: var(--space-5);
  margin-top: var(--space-2);
  min-width: 0;
}

.comment {
  border-left: 2px solid var(--line-strong);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  min-width: 0;
}
.comment:hover { border-left-color: var(--fg-quiet); }

.comment-article {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}
.comment-main { min-width: 0; }

.comment-body { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.comment-body .post-text { font-size: var(--fs-sm); color: var(--fg-muted); }

.comment-form { margin-top: var(--space-4); }
.comment-form textarea { min-height: 5.5rem; }
.comment-form button { margin-top: var(--space-2); }

.reply-affordance {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
}
.reply-affordance > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 550;
  width: fit-content;
}
.reply-affordance > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.reply-form { margin-top: var(--space-2); max-width: 100%; }
.reply-form textarea { min-height: 4rem; width: 100%; max-width: 100%; }

/* 7. Communities  (classes: .community .community-header .community-title
   .community-desc .community-actions)                                     */
.community-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
}
.community-title {
  font-size: var(--fs-2xl);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}
.community-title .community-name {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-quiet);
  font-weight: 400;
}
.community-desc { color: var(--fg-muted); margin: var(--space-2) 0 0; max-width: 65ch; }
.community-actions { margin-left: auto; display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Community chips used in lists */
.community {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line);
}

/* 8. States: empty, error, flash
   -------------------------------------------------------------------------- */
.empty,
.error {
  text-align: center;
  color: var(--fg-muted);
  background: var(--bg-raised);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: var(--space-7) var(--space-5);
  margin: var(--space-5) 0;
  font-size: var(--fs-sm);
}

/* Satellite glyph for empty states — drawn with gradients, no asset. */
.empty::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background:
    radial-gradient(circle at center, var(--fg-quiet) 0 12%, transparent 14%),
    radial-gradient(circle at 76% 24%, var(--accent) 0 8%, transparent 10%);
}

.error { border-style: solid; border-color: rgba(255, 122, 122, 0.45); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--fg); }
.error strong, .error h1, .error h2 { color: var(--danger); }

.error-code {
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--line-strong);
  display: block;
  margin-bottom: var(--space-2);
}

/* 9. Utilities + responsive
   -------------------------------------------------------------------------- */
.muted { color: var(--fg-muted); }
.quiet { color: var(--fg-quiet); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}

.developers { max-width: var(--shell-text); min-width: 0; }
.developers .lede { color: var(--fg-muted); }
.developers h2 { margin-top: var(--space-6); }
.developers .op { margin: var(--space-4) 0; }
.developers .op h3 { font-size: var(--fs-sm); font-family: var(--font-mono); font-weight: 600; }
.developers .feed-sorts dt { font-family: var(--font-mono); margin-top: var(--space-3); }
.developers .feed-sorts dd { margin: var(--space-1) 0 0; color: var(--fg-muted); }
.developers .error-codes { padding-left: 1.2rem; color: var(--fg-muted); }
.developers .error-codes code { color: var(--fg); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.moderation-actions,
.report-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: end;
  margin-top: var(--space-4);
}
.report-form label { display: block; font-size: var(--fs-sm); color: var(--fg-muted); }
.report-form select,
.report-form textarea,
.report-form input {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
}
.report-list { list-style: none; padding: 0; margin: var(--space-4) 0; }
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}
.report-details { white-space: pre-wrap; }

/* Tablet */
@media (max-width: 760px) {
  .site-main { padding: var(--space-4) var(--space-3) var(--space-6); }
  .post-detail, .comments { padding-inline: 0; border: 0; background: none; }
  .post-detail { padding: var(--space-4); background: var(--bg-raised); border: 1px solid var(--line); }
  .feed-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Phone — target 390x844 */
@media (max-width: 520px) {
  body { font-size: var(--fs-sm); }

  .site-header { position: static; }
  .site-header .brand { font-size: var(--fs-lg); padding: var(--space-2) 0; }
  .header-bar { gap: var(--space-2); }
  .header-actions { margin-left: 0; width: 100%; }
  .site-search { flex: 1 1 100%; max-width: none; width: 100%; }
  .primary-nav { gap: var(--space-2) var(--space-3); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .sub-nav { gap: var(--space-1); }
  .sort-tabs a { min-height: 2.5rem; }

  .site-main { padding: var(--space-3) var(--space-2) var(--space-6); }

  .post-row {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3) var(--space-1);
  }
  .post-title { font-size: var(--fs-md); }
  .post-detail { padding: var(--space-3); border-radius: var(--radius-sm); }
  .post-detail h1.post-title { font-size: var(--fs-xl); }
  .comment-article { grid-template-columns: 2rem minmax(0, 1fr); gap: var(--space-2); }
  .comment-list .comment-list { margin-left: var(--space-3); }
  .comment-list .comment-list .comment-list .comment-list { margin-left: var(--space-2); }

  .panel, .auth-panel { margin: var(--space-3) 0; padding: var(--space-4); }
  .submit-panel { padding: var(--space-4); }
  .community-actions { margin-left: 0; width: 100%; }
}

/* Community stewardship forms (issue #16). */
.narrow { max-width: 44rem; }
.stacked-form { display: grid; gap: var(--space-2); }
.stacked-form label { margin-top: var(--space-3); font-weight: 700; }
.stacked-form input, .stacked-form textarea, .stacked-form select { width: 100%; min-width: 0; }
.stacked-form textarea { resize: vertical; }
.field-prefix { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.field-prefix input { flex: 1; }
.field-help { color: var(--fg-muted); font-size: var(--fs-sm); margin: 0; }
.form-error { border-left: 3px solid var(--danger); padding: var(--space-3); background: var(--bg-raised); }

/* Community newsroom shell: compact navigation, ranked stories, and a stable
   reading column that collapses cleanly without hiding functionality. */
.header-bar { max-width: 1480px; }
.brand { gap: .55rem; letter-spacing: -.02em; }
.nav-cluster { display: flex; align-items: center; gap: var(--space-3); min-width: 0; flex: 1; }
.header-actions { white-space: nowrap; }
.feed-kicker, .post-community { margin: 0 0 .3rem; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.feed-head { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(135deg, var(--bg-raised), var(--bg)); }
.feed-layout { container-type: inline-size; }
.post-list { counter-reset: story; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: visible; }
.post-row { counter-increment: story; grid-template-columns: 2.25rem 3.25rem minmax(0, 1fr); padding: var(--space-3); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--bg-raised); }
.post-row > .boost-count, .post-row > .post-main { grid-column: 3; }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: color-mix(in srgb, var(--accent) 5%, var(--bg-raised)); }
.post-rank { align-self: center; color: var(--fg-faint); font: 700 .78rem/1 var(--font-mono); text-align: center; }
.post-rank::before { content: counter(story, decimal-leading-zero); }
.post-community a { color: inherit; }
.post-title { font-size: clamp(1rem, 2cqi, 1.16rem); line-height: 1.3; }
.vote-form { border: 1px solid var(--line); border-radius: 999px; padding: .15rem; background: var(--bg); }
.community-rail { position: sticky; top: 6.5rem; align-self: start; }

@container (max-width: 620px) {
  .post-row { grid-template-columns: 2.65rem minmax(0, 1fr); }
  .post-row > .boost-count, .post-row > .post-main { grid-column: 2; }
  .post-rank { display: none; }
}

@media (max-width: 780px) {
  .header-bar { align-items: stretch; }
  .nav-cluster { display: contents; }
  .primary-nav { order: 3; overflow-x: auto; padding-bottom: .2rem; }
  .site-search { order: 2; flex: 1 1 12rem; }
  .header-actions { order: 4; width: 100%; overflow-x: auto; }
  .community-rail { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.community-rules { margin: var(--space-4) 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.community-rules h2 { font-size: var(--fs-md); }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .stacked-form .btn, .form-actions .btn { width: 100%; text-align: center; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 10. Landing page (deploy/orbits-landing/index.html — served by Caddy)
   Same tokens, same stylesheet: the landing links /static/orbits.css so the
   front door and the product can never drift apart visually.               */
.hero { padding: var(--space-7) 0 var(--space-5); max-width: 62ch; }
.hero h1 {
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.hero h1 .glyph { color: var(--accent); }
.lede { color: var(--fg-muted); font-size: var(--fs-lg); line-height: 1.6; margin-bottom: var(--space-5); }
.lede strong { color: var(--fg); }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); }
.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.7rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.pill.live { border-color: var(--accent); color: var(--accent); }
.pill.live::before { content: "● "; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-6); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
  min-width: 0;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  min-width: 0;
}
.card h3 { font-size: var(--fs-md); margin-bottom: var(--space-2); }
.card p { color: var(--fg-muted); font-size: var(--fs-sm); margin: 0; }
.card .mono-tag { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--accent); display: block; margin-bottom: var(--space-2); }

.endpoints {
  display: grid;
  min-width: 0;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.endpoints > * { min-width: 0; overflow-wrap: anywhere; }
.endpoints code { white-space: nowrap; background: none; border: 0; padding: 0; color: var(--accent); }

.section-title {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-2);
  margin: var(--space-6) 0 var(--space-4);
}

@media (max-width: 520px) {
  .hero { padding: var(--space-5) 0 var(--space-4); }
  .hero h1 { font-size: var(--fs-2xl); }
  .endpoints { grid-template-columns: minmax(0, 1fr); }
}

/* Inbox (issue #14)
   -------------------------------------------------------------------------- */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  min-height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.2rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-2xs);
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--shell-text);
}
.inbox-signin {
  max-width: 42rem;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.inbox-signin h2 { margin-top: 0; }
.inbox-signin-actions { display: flex; align-items: center; gap: var(--space-4); margin-bottom: 0; }

.inbox-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.inbox-item.unread {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}

.inbox-title {
  font-size: var(--fs-md);
  font-weight: 620;
  margin: 0;
  line-height: 1.35;
}
.inbox-excerpt {
  margin: 0;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.inbox-kind {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-quiet);
}
.inbox-unread-label {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.inbox-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.inbox-item-actions .inline { display: inline; margin: 0; }
.inbox-item-actions a,
.inbox-item-actions button {
  min-height: 2.5rem;
}

@media (max-width: 520px) {
  .inbox-item { padding: var(--space-3); }
  .inbox-item-actions { width: 100%; }
  .inbox-item-actions a,
  .inbox-item-actions button { flex: 1 1 auto; }
}

/* Messages / conversations (issue #19)
   -------------------------------------------------------------------------- */
.conversation-list,
.broadcast-list,
.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--shell-text);
}
.conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "peer badge"
    "preview preview"
    "meta meta";
  gap: var(--space-1) var(--space-2);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  color: inherit;
  min-height: 2.75rem;
}
.conversation-row.unread {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}
.conversation-peer { grid-area: peer; font-weight: 650; }
.conversation-row .badge-count { grid-area: badge; justify-self: end; }
.conversation-preview {
  grid-area: preview;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.conversation-kind {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-quiet);
}
.conversation-row time {
  grid-area: meta;
  color: var(--fg-quiet);
  font-size: var(--fs-xs);
}
.broadcast-item,
.thread-message {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.broadcast-item.unread,
.thread-message.mine {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.thread-body,
.broadcast-body {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message-reply,
.compose-form {
  display: grid;
  gap: var(--space-3);
  max-width: var(--shell-text);
  margin-top: var(--space-5);
}
.message-reply textarea,
.compose-form textarea,
.compose-form input,
.compose-form select {
  width: 100%;
  min-height: 2.75rem;
}
.message-reply button,
.compose-form button,
.messages .btn,
.profile-actions .btn {
  min-height: 2.75rem;
  min-width: 2.75rem;
}
.pager { margin: var(--space-4) 0; }
.crumb { margin: 0 0 var(--space-2); font-size: var(--fs-sm); }
.messages-broadcasts { margin-top: var(--space-7); }
@media (max-width: 520px) {
  .conversation-row,
  .broadcast-item,
  .thread-message { padding: var(--space-3); }
}
