/* ============================================================
   fcc.cc / The Commons
   Editorial aesthetic. Newsprint warmth, ink black, one red.
   ============================================================ */

:root {
  /* surfaces — aliased to v2 inline tokens (fcc-theme-boot.js).
     Fallbacks mirror editorial-tokens dark-mode defaults so first-paint
     (before boot.js sets inline values) renders in the v2 dark palette
     instead of the old cream. fcc-editorial-tokens.css overrides per
     data-mode after this declaration. */
  --paper:    var(--bg, #0c0d0f);
  --paper-2:  var(--panel, #111214);
  --paper-3:  var(--panel-2, #1a1c1f);
  --rule:     var(--border, #2a2a2a);
  --rule-2:   color-mix(in srgb, var(--border, #2a2a2a) 70%, transparent);

  /* ink hierarchy — defer to editorial-tokens (keyed off data-mode). */
  --ink:      var(--text, #e5e5e5);
  --ink-2:    #c4cad6;
  --ink-3:    var(--text-dim, #9aa3b2);
  --ink-4:    #6b7280;

  /* accent — overridden by editorial-tokens per data-mode. */
  --accent:      #c7d2fe;
  --accent-2:    #e0e7ff;
  --accent-wash: rgba(199, 210, 254, 0.12);

  /* support */
  --ochre:    oklch(0.62  0.12  75);
  --ivy:      oklch(0.42  0.08 155);

  /* type */
  --serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: 32px;
  --maxw: 1280px;
  --density: 1;
}

[data-density="cozy"]   { --density: 1.15; }
[data-density="compact"]{ --density: 0.85; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* Reserve vertical space for commons-shell.js / commons-footer mounts so
   the page doesn't bounce downward when defer'd scripts replace these
   placeholders at DOMContentLoaded. Matched only while the placeholder
   is still empty — once outerHTML swaps in the real element, the
   selector stops matching and natural content height takes over. */
[data-commons-shell][data-notopbar]:empty { display: block; }
[data-commons-shell="nav"][data-notopbar]:empty,
[data-commons-shell="subnav"][data-notopbar]:empty {
  min-height: calc(clamp(48px, 7vw, 92px) + 161px);
}
[data-commons-footer]:empty { display: block; min-height: 292px; }

/* Reserve the final site-header height so the ecosystem-nav going from
   empty to populated at DOMContentLoaded (when fcc-econav.js runs)
   doesn't push site-header + masthead + main down by ~19px. */
body[data-commons-page] .site-header { min-height: 46px; }

/* -------------------------------------------------------------
   MASTHEAD
   ------------------------------------------------------------- */

.topbar {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 20px;
  color: var(--ink-2);
}
.topbar-inner .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.topbar-inner .onair { display: inline-flex; align-items: center; }
.topbar-inner .onair .dot {
  width: 6px; height: 6px; margin-right: 0;
  box-shadow: 0 0 0 0 var(--accent);
  animation: onair-pulse 2.4s ease-in-out infinite;
}
@keyframes onair-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 55%, transparent); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 0%, transparent); opacity: 0.7; }
}
.topbar-inner .sep { color: var(--rule-2); }
.topbar-inner .right { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.topbar a:hover { color: var(--ink); }

.masthead {
  border-bottom: 3px double var(--ink);
  padding: 28px var(--gutter) 22px;
  text-align: center;
  background: var(--paper);
}
.masthead .eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(48px, 7vw, 92px);
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink);
}
.masthead h1 .amp { color: var(--accent); font-style: italic; font-weight: 500; padding: 0 4px; }
.masthead .sub {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.masthead .sub span.bullet { color: var(--rule-2); }

/* section nav (tabs) */
.nav {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: stretch;
  gap: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav .tab {
  padding: 14px 18px;
  color: var(--ink-2);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .12s, border-color .12s;
}
.nav .tab:hover { color: var(--ink); text-decoration: none; }
.nav .tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav .tab .count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0;
  font-weight: 400;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 2px;
}
.nav .tab[aria-current="page"] .count { background: var(--accent-wash); color: var(--accent); }

.nav-inner .spacer { flex: 1; }
.nav .search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px;
  color: var(--ink-3);
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.nav .search input {
  border: 0; background: transparent; outline: none; font: inherit; color: var(--ink);
  width: 180px;
}
.nav .search input::placeholder { color: var(--ink-4); }

/* Music tab — discovery affordance for the Listening block. */
.music-tab-wrap {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.nav .tab-music { gap: 8px; }
.nav .tab-new {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--paper);
  line-height: 1.2;
  animation: music-pulse 2.2s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.12); opacity: .78; }
}
.music-tip {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  max-width: calc(100vw - 24px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 30px 10px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  z-index: 50;
  animation: music-tip-in .28s ease-out;
}
.music-tip[hidden] { display: none; }
.music-tip-leaving { animation: music-tip-out .18s ease-in both; }
.music-tip-arrow {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--paper);
  border-left: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
}
.music-tip-text strong { display: block; margin-bottom: 2px; }
.music-tip-close {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: 0;
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  font-family: var(--sans);
}
.music-tip-close:hover { color: var(--ink); }
@keyframes music-tip-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}
@keyframes music-tip-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0);     }
  to   { opacity: 0; transform: translateX(-50%) translateY(-2px);  }
}

/* When #listening is jumped to, flash an accent ring to confirm target. */
#listening { scroll-margin-top: 72px; }
.listening-flash { animation: listening-flash 1.8s ease-out; }
@keyframes listening-flash {
  0%   { box-shadow: 0 0 0 0 var(--accent), 0 0 0 0 rgba(0,0,0,0); }
  20%  { box-shadow: 0 0 0 3px var(--accent), 0 0 18px rgba(0,0,0,0.15); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .nav .tab-new { animation: none; }
  .music-tip, .music-tip-leaving { animation: none; }
  .listening-flash { animation: none; }
}

/* -------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(36px * var(--density)) var(--gutter) 80px;
}
.cols {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
}
@media (max-width: 940px) {
  .cols { grid-template-columns: 1fr; }
  .sidebar { border-top: 1px solid var(--rule); padding-top: 32px; margin-top: 16px; }
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: calc(20px * var(--density));
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.section-head .hint {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.meta .by { color: var(--ink-2); }
.meta .dot-sep::before { content: "·"; margin: 0 8px; color: var(--rule-2); }

/* -------------------------------------------------------------
   COMPOSER (shared, top of column)
   ------------------------------------------------------------- */
.composer {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  margin-bottom: calc(28px * var(--density));
}
.composer .avatar { width: 44px; height: 44px; }
.composer textarea {
  resize: none;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  min-height: 52px;
  width: 100%;
}
.composer textarea::placeholder { color: var(--ink-4); font-style: italic; }
.composer .row2 {
  grid-column: 2 / -1;
  display: flex; align-items: center; gap: 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
  margin-top: 8px;
}
.composer .tools { display: flex; gap: 14px; color: var(--ink-3); font-family: var(--sans); font-size: 12px; }
.composer .tools button:hover { color: var(--ink); }
.composer .count { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-left: auto; }
.composer .post-btn {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  padding: 8px 16px;
}
.composer .post-btn:hover:not(:disabled) { background: var(--accent); }
.composer .post-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.composer textarea:disabled,
.composer textarea[readonly] { cursor: pointer; color: var(--ink-3); }
.composer-feedback {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  margin-right: auto;
}
.composer-feedback.error { color: oklch(0.6 0.2 25); }
.composer-feedback.success { color: var(--accent); }
.composer .count.over { color: oklch(0.6 0.2 25); }

/* Photo button in composer row */
.composer-tool {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-3); background: transparent;
  border: 1px solid var(--rule); padding: 6px 10px; border-radius: 4px;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.composer-tool:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-3); }
.composer-tool:disabled { opacity: 0.5; cursor: not-allowed; }
.composer-tool-icon { width: 16px; height: 16px; }

/* Visibility dropdown */
.composer-vis {
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--rule); padding: 6px 8px; border-radius: 4px;
  cursor: pointer;
}
.composer-vis:hover { border-color: var(--ink-3); }

/* Image preview above the row */
.composer-preview {
  grid-column: 2 / -1;
  position: relative;
  max-width: 280px;
  margin-top: 10px;
}
.composer-preview img {
  width: 100%; height: auto;
  border-radius: 6px; border: 1px solid var(--rule);
  display: block;
}
.composer-preview-remove {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  border: 0; cursor: pointer;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.composer-preview-remove:hover { background: rgba(0, 0, 0, 0.9); }

/* ── Video embed placeholder (Dispatch) ─────────────────────────────── */
/* Shows a lightweight thumbnail + play button. The real iframe is only
   loaded on click, so page load doesn't hit YouTube/Vimeo. */
.video-embed {
  position: relative;
  margin-top: 10px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  max-width: 560px;
}
.video-embed:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.video-embed-thumb {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-color: #111;
}
.video-embed-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: opacity 0.15s;
}
.video-embed-play svg {
  width: 68px; height: 48px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.video-embed:hover .video-embed-play svg path[fill="#212121"] {
  fill: #e62117;
  opacity: 1;
}
.video-embed.is-playing { cursor: default; }
.video-embed iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* avatar */
.avatar {
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  user-select: none;
  border: 1px solid var(--rule);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.md { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.has-image { background: var(--paper-2); padding: 0; overflow: hidden; }
.avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* chips for handle color variety (subtle ink tints, not rainbow) */
.avatar[data-tint="1"] { background: oklch(0.88 0.04 85); }
.avatar[data-tint="2"] { background: oklch(0.86 0.05 65); }
.avatar[data-tint="3"] { background: oklch(0.88 0.04 45); }
.avatar[data-tint="4"] { background: oklch(0.86 0.05 135); }
.avatar[data-tint="5"] { background: oklch(0.88 0.04 200); }
.avatar[data-tint="6"] { background: oklch(0.86 0.05 260); }
.avatar[data-tint="7"] { background: oklch(0.88 0.04 325); }

/* -------------------------------------------------------------
   SHOUT — micro-post stream
   ------------------------------------------------------------- */
.shout {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: calc(22px * var(--density)) 0;
  border-bottom: 1px solid var(--rule);
}
.shout:last-child { border-bottom: 0; }
.shout .head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 13px;
  margin-bottom: 4px;
}
.shout .head .name { font-weight: 600; color: var(--ink); }
.shout .head .handle { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.shout .head .time { color: var(--ink-4); font-family: var(--mono); font-size: 11px; }
.shout .head .pin {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.shout .body {
  font-family: var(--serif); font-size: 18px; line-height: 1.5;
  color: var(--ink);
  margin: 2px 0 10px;
  text-wrap: pretty;
}
.shout .body .tag { color: var(--accent); font-family: var(--sans); font-size: 13px; }
.shout .body .link { text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.shout .attach {
  margin: 10px 0 8px;
  border: 1px solid var(--rule);
  background: repeating-linear-gradient(45deg, var(--paper-2) 0 10px, var(--paper-3) 10px 11px);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}
.shout .actions {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-3);
}
.shout .actions button {
  display: inline-flex; align-items: center; gap: 6px;
  color: inherit;
  transition: color .12s;
}
.shout .actions button:hover { color: var(--ink); }
.shout .actions button.active { color: var(--accent); }
.shout .actions .ico { width: 14px; height: 14px; display: inline-block; }
.shout .actions .num { font-family: var(--mono); font-weight: 500; }

/* -------------------------------------------------------------
   FORUM
   ------------------------------------------------------------- */
.forum-rooms {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.forum-room {
  background: var(--paper);
  padding: 14px 16px;
  cursor: pointer;
  transition: background .12s;
}
.forum-room:hover { background: var(--paper-2); }
.forum-room[aria-current="true"] { background: var(--paper-2); border-left: 3px solid var(--accent); padding-left: 13px; }
.forum-room .name { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.forum-room .desc { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.forum-room .stats { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-top: 6px; }

.thread {
  padding: calc(18px * var(--density)) 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 72px 110px;
  gap: 22px;
  align-items: start;
  cursor: pointer;
}
.thread:hover { background: var(--paper-2); }
.thread:last-child { border-bottom: 0; }
.thread .t-title {
  font-family: var(--serif); font-weight: 600; font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}
.thread .t-title:hover { text-decoration: underline; }
.thread .t-meta {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-top: 4px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.thread .t-meta .room-tag {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid currentColor; padding: 1px 6px;
}
.thread .t-count {
  text-align: right;
  font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink);
}
.thread .t-count small { display: block; font-family: var(--sans); font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-3); margin-top: 2px; }
.thread .t-last {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  text-align: right;
}
.thread .t-last .by { display: block; color: var(--ink-2); font-family: var(--sans); font-size: 12px; font-weight: 500; margin-bottom: 2px; }

@media (max-width: 640px) {
  .thread { grid-template-columns: 1fr auto; }
  .thread .t-last { grid-column: 1 / -1; text-align: left; }
}

/* thread detail view */
.thread-view { }
.thread-view .hero {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 22px;
  margin-bottom: 28px;
}
.thread-view h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 8px 0 12px;
  text-wrap: balance;
}
.thread-view .back {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.thread-view .back:hover { color: var(--accent); }

.post {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.post .who { font-family: var(--sans); font-size: 13px; }
.post .who .avatar { margin-bottom: 10px; }
.post .who .name { font-weight: 600; color: var(--ink); font-size: 14px; }
.post .who .title { color: var(--ink-3); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.post .who .joined { font-family: var(--mono); color: var(--ink-4); font-size: 10px; margin-top: 8px; }
.post .when { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-bottom: 8px; }
.post .content {
  font-family: var(--serif); font-size: 17px; line-height: 1.65; color: var(--ink);
  text-wrap: pretty;
}
.post .content p { margin: 0 0 14px; }
.post .content blockquote {
  margin: 16px 0; padding: 8px 0 8px 20px;
  border-left: 3px solid var(--rule-2);
  color: var(--ink-2); font-style: italic;
}
.post .content code {
  font-family: var(--mono); font-size: 14px;
  background: var(--paper-2); padding: 1px 6px; border: 1px solid var(--rule);
}
.post .foot {
  margin-top: 12px;
  display: flex; gap: 20px; align-items: center;
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
}
.post .foot button:hover { color: var(--ink); }
.post .foot .vote { display: inline-flex; align-items: center; gap: 4px; }
.post .foot .vote .v-btn { padding: 2px 6px; font-family: var(--mono); font-weight: 700; }
.post .foot .vote .v-btn:hover { color: var(--accent); }
.post .foot .vote .num { font-family: var(--mono); font-weight: 600; color: var(--ink); min-width: 20px; text-align: center; }

@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; gap: 14px; }
  .post .who { display: flex; align-items: center; gap: 12px; }
  .post .who .avatar { margin-bottom: 0; }
}

/* -------------------------------------------------------------
   CHAT
   ------------------------------------------------------------- */
.chat {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  height: calc(100vh - 300px);
  min-height: 500px;
}
.chat-rooms {
  background: var(--paper);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  padding: 18px 0;
}
.chat-rooms h3 {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 18px 8px;
}
.chat-rooms h3:not(:first-child) { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 18px; }
.chat-room {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  font-family: var(--sans); font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.chat-room:hover { background: var(--paper-2); color: var(--ink); }
.chat-room[aria-current="true"] { background: var(--paper-2); color: var(--ink); font-weight: 600; border-left: 3px solid var(--accent); padding-left: 15px; }
.chat-room .hash { color: var(--ink-4); font-family: var(--mono); font-weight: 400; }
.chat-room .unread {
  margin-left: auto;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  background: var(--accent); color: var(--paper);
  padding: 1px 6px; border-radius: 10px;
}
.chat-room .presence {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
}
.chat-room .presence.live { background: oklch(0.65 0.15 145); box-shadow: 0 0 0 3px oklch(0.65 0.15 145 / 0.15); }

.chat-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}
.chat-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 14px;
  background: var(--paper);
}
.chat-header .room-name { font-family: var(--serif); font-weight: 700; font-size: 20px; }
.chat-header .room-hash { color: var(--ink-4); font-family: var(--mono); font-weight: 400; font-size: 16px; }
.chat-header .topic { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.chat-header .presence-count {
  margin-left: auto;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
}
.chat-header .presence-count::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.65 0.15 145);
  box-shadow: 0 0 0 3px oklch(0.65 0.15 145 / 0.15);
}

.chat-log {
  overflow-y: auto;
  padding: 18px 22px;
  background: var(--paper);
}
.chat-msg {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 6px 0;
}
.chat-msg + .chat-msg.same-author { padding-top: 2px; }
.chat-msg.same-author .avatar-slot { visibility: hidden; height: 0; }
.chat-msg.same-author .head { display: none; }
.chat-msg .head {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--sans); font-size: 13px;
  margin-bottom: 2px;
}
.chat-msg .head .name { font-weight: 600; color: var(--ink); }
.chat-msg .head .time { color: var(--ink-4); font-family: var(--mono); font-size: 10px; }
.chat-msg .body {
  font-family: var(--serif); font-size: 16px; line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}
.chat-msg.system .body {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  font-style: italic;
  padding: 4px 0;
  grid-column: 1 / -1;
  border-left: 2px solid var(--rule-2);
  padding-left: 12px;
}

.chat-day {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 8px;
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
}
.chat-day::before, .chat-day::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.chat-compose {
  border-top: 1px solid var(--rule);
  padding: 12px 22px 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  background: var(--paper);
}
.chat-compose input {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 10px 14px;
  font-family: var(--serif); font-size: 15px;
  color: var(--ink);
  outline: none;
  border-radius: 0;
}
.chat-compose input:focus { border-color: var(--ink); background: var(--paper); }
.chat-compose button {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  padding: 0 18px;
  background: var(--ink); color: var(--paper);
}
.chat-compose button:hover { background: var(--accent); }

@media (max-width: 720px) {
  .chat { grid-template-columns: 1fr; }
  .chat-rooms { display: none; }
}

/* -------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------- */
.sidebar { font-family: var(--sans); font-size: 14px; }
.sidebar h3 {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
}
.sidebar .block { margin-bottom: 32px; }

.trend {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.trend:last-child { border-bottom: 0; }
.trend .rank { font-family: var(--serif); font-weight: 300; font-size: 28px; color: var(--ink-4); line-height: 1; min-width: 28px; }
.trend .tag {
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  color: var(--ink);
  display: block;
}
.trend .count {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3);
}

.member {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.member:last-child { border-bottom: 0; }
.member .name { font-size: 13px; font-weight: 600; color: var(--ink); }
.member .handle { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.member .follow {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600;
  color: var(--ink); border: 1px solid var(--ink); padding: 4px 8px;
}
.member .follow:hover { background: var(--ink); color: var(--paper); }
.member .follow.following { background: var(--paper-2); border-color: var(--rule-2); color: var(--ink-3); }

.manifesto {
  font-family: var(--serif); font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.manifesto em { color: var(--ink); font-style: italic; }
.manifesto .signoff {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 10px;
}

.rules-list { margin: 0; padding: 0; list-style: none; }
.rules-list li {
  font-family: var(--serif); font-size: 14px; color: var(--ink-2);
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule);
  display: grid; grid-template-columns: 20px 1fr; gap: 10px;
}
.rules-list li:last-child { border-bottom: 0; }
.rules-list li .n { font-family: var(--mono); font-size: 11px; color: var(--ink-4); padding-top: 2px; }

/* small status list */
.now {
  display: grid; gap: 6px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.now .row { display: flex; justify-content: space-between; }
.now .row .k { color: var(--ink-3); }
.now .row .v { color: var(--ink); }

/* -------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------- */
.footer {
  border-top: 3px double var(--ink);
  padding: 32px var(--gutter);
  background: var(--paper);
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 12px; color: var(--ink); }
.footer ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: 13px; color: var(--ink-2); }
.footer li { padding: 4px 0; }
.footer li a:hover { color: var(--accent); }
.footer .wordmark { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 32px; letter-spacing: -0.02em; color: var(--ink); }
.footer .tagline { font-family: var(--serif); font-size: 14px; color: var(--ink-2); max-width: 32ch; margin-top: 8px; }
.footer .colophon { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-top: 16px; }
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

/* -------------------------------------------------------------
   TWEAKS PANEL
   ------------------------------------------------------------- */
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 340px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  z-index: 100;
  font-family: var(--sans);
  font-size: 13px;
}
.tweaks-panel.wide { width: 360px; }
.tweaks-panel .body { overflow-y: auto; padding: 0 !important; }
.t-section { border-bottom: 1px solid var(--rule); }
.t-section:last-child { border-bottom: 0; }
.t-section-head {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.t-section-head:hover { background: var(--paper-2); }
.t-section.open .t-section-head { background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.t-section-head .chev { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.t-section-body { padding: 14px; display: grid; gap: 12px; }
.t-input {
  width: 100%;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  outline: none;
  border-radius: 0;
  box-sizing: border-box;
}
.t-input:focus { border-color: var(--ink); }
textarea.t-input { font-family: var(--serif); font-size: 13px; line-height: 1.4; resize: vertical; }
.tweaks-panel .head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.tweaks-panel .head h4 {
  margin: 0; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
}
.tweaks-panel .body { padding: 14px; display: grid; gap: 14px; }
.tweaks-panel .field { display: grid; gap: 6px; }
.tweaks-panel .field > label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.tweaks-panel .seg {
  display: flex; border: 1px solid var(--rule-2);
}
.tweaks-panel .seg button {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px; font-weight: 500;
  color: var(--ink-2);
  border-right: 1px solid var(--rule-2);
}
.tweaks-panel .seg button:last-child { border-right: 0; }
.tweaks-panel .seg button.on { background: var(--ink); color: var(--paper); }
.tweaks-panel .swatches { display: flex; gap: 8px; }
.tweaks-panel .sw {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--rule-2);
  cursor: pointer;
  position: relative;
}
.tweaks-panel .sw.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.tweaks-panel .close {
  color: var(--paper); font-family: var(--mono); font-size: 14px;
}

/* utility icons drawn as unicode or svg paths (tiny, allowed as simple shapes) */
.ico-heart, .ico-reply, .ico-boost, .ico-share, .ico-bookmark { display: inline-block; }


/* -------------------------------------------------------------
   TOPBAR WIDGETS (bell / envelope + dropdowns)
   ------------------------------------------------------------- */
.topbar-widget { position: relative; display: inline-flex; }
.topbar-widget .widget-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px;
  color: var(--ink-2);
  border: 0; background: transparent;
  cursor: pointer;
  padding: 0;
}
.topbar-widget .widget-btn:hover { color: var(--ink); }
.topbar-widget.open .widget-btn { color: var(--accent); }
.topbar-widget .widget-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--paper);
  font: 700 9px/14px var(--mono);
  text-align: center;
  letter-spacing: 0;
}
.widget-panel {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: 360px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 20px 40px -20px oklch(0 0 0 / 0.25);
  z-index: 80;
  font-family: var(--sans);
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}
.widget-panel::before {
  content: "";
  position: absolute;
  top: -6px; right: 12px;
  width: 10px; height: 10px;
  background: var(--paper);
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
  transform: rotate(45deg);
}
.widget-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rule);
}
.widget-title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); }
.widget-sub { font: 500 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.widget-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.widget-item {
  padding: 12px 16px;
  border-bottom: 1px dotted var(--rule);
  cursor: pointer;
  position: relative;
}
.widget-item:hover { background: var(--paper-2); }
.widget-item.unread::before {
  content: "";
  position: absolute; left: 6px; top: 18px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.widget-item.dm { display: flex; gap: 10px; }
.widget-dm-body { flex: 1; min-width: 0; }
.widget-item-top {
  display: flex; align-items: baseline; gap: 8px; justify-content: space-between;
  margin-bottom: 3px;
}
.widget-kind {
  font: 600 9px/1.4 var(--mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}
.widget-kind[data-kind="dispatch"] { color: var(--accent); }
.widget-kind[data-kind="forum"]    { color: oklch(0.40 0.10 260); }
.widget-kind[data-kind="chat"]     { color: oklch(0.42 0.10 155); }
.widget-kind[data-kind="system"]   { color: var(--ink-3); }
.widget-ago { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; white-space: nowrap; }
.widget-item-title { font: 500 13px/1.4 var(--sans); color: var(--ink); }
.widget-dm-preview {
  font: 400 12px/1.4 var(--sans); color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.widget-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  display: flex; justify-content: flex-end;
}
.linklike {
  background: transparent; border: 0; padding: 0;
  color: var(--accent);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.linklike:hover { color: var(--ink); }
.linklike.tiny { font-size: 11px; color: var(--ink-3); }
.linklike.tiny:hover { color: var(--accent); }
.linklike.danger { color: oklch(0.50 0.16 27); }
.linklike.tiny.dismiss { font-family: var(--mono); text-decoration: none; padding: 0 4px; font-size: 16px; line-height: 1; }

/* -------------------------------------------------------------
   SUBNAV (inbox / messages shell)
   ------------------------------------------------------------- */
.subnav { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.subnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans);
}
.subnav-links { display: flex; gap: 4px; }
.subnav-link {
  background: transparent; border: 0; padding: 4px 10px;
  font: 500 13px/1 var(--sans); color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
}
.subnav-link.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.subnav-link:hover { color: var(--ink); }

.full { max-width: var(--maxw); margin: 0 auto; }

/* -------------------------------------------------------------
   INBOX PAGE
   ------------------------------------------------------------- */
.inbox { font-family: var(--sans); }
.inbox-head { margin-bottom: 24px; border-bottom: 1px solid var(--ink); padding-bottom: 22px; }
.inbox-title-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.inbox-eyebrow {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.inbox-title {
  font-family: var(--serif); font-weight: 600; font-size: 48px; line-height: 1;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.inbox-sub {
  margin-top: 12px;
  font: 400 14px/1.5 var(--serif);
  font-style: italic;
  color: var(--ink-2);
  max-width: 540px;
}
.inbox-segmented {
  display: flex;
  border: 1px solid var(--ink);
}
.inbox-segmented .seg-btn {
  background: var(--paper); border: 0;
  padding: 8px 14px;
  font: 500 12px/1 var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  border-right: 1px solid var(--ink);
  letter-spacing: 0.02em;
}
.inbox-segmented .seg-btn:last-child { border-right: 0; }
.inbox-segmented .seg-btn.on { background: var(--ink); color: var(--paper); }
.inbox-segmented .seg-btn:hover:not(.on) { color: var(--ink); background: var(--paper-2); }

.inbox-body { }
.inbox-filterbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--rule);
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 5px 12px;
  border-radius: 999px;
  font: 500 11px/1.2 var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.02em;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-count {
  font: 700 9px/1 var(--mono);
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--accent); color: var(--paper);
  letter-spacing: 0;
}
.chip.on .chip-count { background: var(--paper); color: var(--ink); }
.inbox-note { font: 400 13px/1.5 var(--serif); font-style: italic; color: var(--ink-2); }

.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-empty { padding: 40px 0; color: var(--ink-3); font-style: italic; text-align: center; font-family: var(--serif); }
.notif {
  display: flex; gap: 16px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px dotted var(--rule);
  position: relative;
  transition: background 120ms;
}
.notif:hover { background: var(--paper-2); }
.notif.unread { background: color-mix(in oklch, var(--accent-wash) 35%, var(--paper) 65%); }
.notif.unread::before {
  content: "";
  position: absolute; left: 6px; top: 22px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.notif-main { flex: 1; min-width: 0; }
.notif-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.notif-kind {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}
.notif-kind[data-kind="dispatch"] { color: var(--accent); }
.notif-kind[data-kind="forum"]    { color: oklch(0.40 0.10 260); }
.notif-kind[data-kind="chat"]     { color: oklch(0.42 0.10 155); }
.notif-kind[data-kind="system"]   { color: var(--ink-3); }
.notif-ago { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; }
.notif-new {
  font: 600 9px/1 var(--mono);
  padding: 2px 5px;
  border: 1px solid var(--accent);
  color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.notif-title { font: 600 15px/1.4 var(--serif); color: var(--ink); margin-bottom: 4px; }
.notif-body { font: 400 13px/1.55 var(--sans); color: var(--ink-2); }
.notif-meta {
  margin-top: 6px;
  font: 400 11px/1.4 var(--mono);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.notif-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }

/* -------------------------------------------------------------
   DM SUMMARY (inside inbox)
   ------------------------------------------------------------- */
.dm-summary { list-style: none; padding: 0; margin: 0; }
.dm-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px dotted var(--rule);
  cursor: pointer;
  position: relative;
}
.dm-row:hover { background: var(--paper-2); }
.dm-row.unread { background: color-mix(in oklch, var(--accent-wash) 35%, var(--paper) 65%); }
.dm-row.unread::before {
  content: "";
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.dm-row-body { flex: 1; min-width: 0; }
.dm-row-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.dm-row-name { font: 600 14px/1 var(--serif); color: var(--ink); }
.dm-row-handle { font: 500 11px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.02em; }
.dm-row-at { margin-left: auto; font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; }
.dm-row-preview {
  font: 400 13px/1.4 var(--sans); color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-row-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: var(--accent); color: var(--paper);
  font: 700 10px/20px var(--mono); text-align: center; letter-spacing: 0;
}

/* -------------------------------------------------------------
   SETTINGS
   ------------------------------------------------------------- */
.settings-note {
  font: 400 13px/1.6 var(--serif); font-style: italic;
  color: var(--ink-2);
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 2px solid var(--accent);
  margin-bottom: 24px;
}
.settings-note-sm { font: 400 11px/1.4 var(--sans); color: var(--ink-3); margin-top: 2px; }
.settings-group { margin-bottom: 28px; }
.settings-heading {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 6px; margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
}
.settings-rows { list-style: none; padding: 0; margin: 0; }
.settings-row, .settings-account-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule);
  gap: 16px;
}
.settings-label { font: 500 14px/1.3 var(--sans); color: var(--ink); }
.settings-dangerzone { margin-top: 32px; }

.toggle {
  position: relative;
  width: 36px; height: 20px;
  border: 1px solid var(--rule-2);
  background: var(--paper-2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 140ms;
  padding: 0;
  flex-shrink: 0;
}
.toggle .knob {
  position: absolute; top: 1px; left: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink);
  transition: all 140ms;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on .knob { left: 17px; background: var(--paper); }

/* -------------------------------------------------------------
   DM (two-pane)
   ------------------------------------------------------------- */
.dm { font-family: var(--sans); }
.dm-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 20px;
}
.dm-head-actions { padding-top: 6px; }
.dm-disclosure {
  margin-top: 10px;
  font: 400 13px/1.55 var(--serif); font-style: italic;
  color: var(--ink-2);
  max-width: 620px;
}

.dm-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  min-height: 600px;
}
@media (max-width: 820px) {
  .dm-layout { grid-template-columns: 1fr; }
}
.dm-list {
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  background: var(--paper-2);
}
.dm-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.dm-search span { color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.dm-search input {
  flex: 1;
  border: 0; background: transparent;
  font: 400 13px/1 var(--sans); color: var(--ink);
  outline: 0;
}
.dm-list-inner { list-style: none; padding: 0; margin: 0; flex: 1; overflow: auto; }
.dm-li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px dotted var(--rule);
  cursor: pointer;
  position: relative;
}
.dm-li:hover { background: var(--paper-3); }
.dm-li.active { background: var(--paper); box-shadow: inset 3px 0 0 var(--accent); }
.dm-li.unread .dm-li-name { font-weight: 700; }
.dm-li-body { flex: 1; min-width: 0; }
.dm-li-top { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; margin-bottom: 2px; }
.dm-li-name { font: 500 13px/1.2 var(--serif); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-li-at { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; white-space: nowrap; }
.dm-li-preview {
  font: 400 11.5px/1.35 var(--sans); color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-li-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--accent); color: var(--paper);
  font: 700 9px/18px var(--mono); text-align: center;
}
.dm-li-empty { padding: 20px; text-align: center; color: var(--ink-3); font-style: italic; font-family: var(--serif); font-size: 13px; }
.dm-new {
  background: transparent;
  border: 0; border-top: 1px solid var(--rule);
  padding: 12px;
  font: 500 12px/1 var(--sans); color: var(--accent);
  cursor: pointer;
  text-align: left;
}
.dm-new:hover { background: var(--paper); color: var(--ink); }

.dm-thread { display: flex; flex-direction: column; min-width: 0; }
.dm-thread-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.dm-thread-who { flex: 1; }
.dm-thread-name { font: 600 16px/1.2 var(--serif); color: var(--ink); }
.dm-thread-handle { font: 500 11px/1.4 var(--mono); color: var(--ink-3); letter-spacing: 0.02em; }
.dm-thread-status {
  font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
}
.dm-online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.58 0.15 155);
  animation: onair-pulse 2.4s ease-in-out infinite;
}

.dm-scroller {
  flex: 1; overflow: auto;
  padding: 20px 28px;
  background: var(--paper-2);
  max-height: 540px;
}
.dm-day {
  text-align: center;
  font: 500 10px/1 var(--mono); color: var(--ink-3);
  letter-spacing: 0.16em; text-transform: uppercase;
  margin: 12px 0 18px;
}
.dm-msg {
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--paper);
  border-left: 2px solid var(--rule-2);
  max-width: 80%;
}
.dm-msg.mine {
  margin-left: auto;
  border-left: 0;
  border-right: 2px solid var(--accent);
  background: color-mix(in oklch, var(--accent-wash) 40%, var(--paper) 60%);
}
.dm-msg-meta {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px;
}
.dm-msg.mine .dm-msg-meta { justify-content: flex-end; }
.dm-msg-from { font: 600 12px/1 var(--serif); color: var(--ink); }
.dm-msg-at { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; }
.dm-msg-body {
  font: 400 14px/1.55 var(--serif);
  color: var(--ink);
  text-wrap: pretty;
}

.dm-compose {
  border-top: 1px solid var(--rule);
  padding: 12px 20px;
  background: var(--paper);
}
.dm-compose textarea {
  width: 100%;
  resize: none;
  border: 0; background: transparent;
  font: 400 14px/1.5 var(--serif); color: var(--ink);
  outline: 0;
}
.dm-compose-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted var(--rule);
}
.dm-compose-hint { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.dm-send {
  background: var(--ink); color: var(--paper);
  border: 0; padding: 6px 16px;
  font: 500 12px/1 var(--sans); letter-spacing: 0.04em;
  cursor: pointer;
}
.dm-send:hover { background: var(--accent); }
.dm-send:disabled { background: var(--rule-2); cursor: not-allowed; }

/* Midnight paper adjustments for widgets */
.paper-midnight .widget-panel { box-shadow: 0 20px 40px -20px oklch(0 0 0 / 0.6); }
.paper-midnight .notif.unread,
.paper-midnight .dm-row.unread { background: color-mix(in oklch, var(--accent-wash) 18%, var(--paper-2) 82%); }
.paper-midnight .dm-msg.mine { background: color-mix(in oklch, var(--accent-wash) 20%, var(--paper-2) 80%); }


/* =============================================================
   BLOG — feed + post detail
   ============================================================= */
.blog-feed { }
.blog-filters {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.blog-filters .spacer { flex: 1; }
.blog-filter {
  border: 1px solid var(--rule);
  background: transparent;
  padding: 4px 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 2px;
}
.blog-filter:hover { border-color: var(--ink-3); color: var(--ink); }
.blog-filter.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.blog-write {
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  padding: 6px 12px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 2px;
}
.blog-write:hover { background: var(--accent); border-color: var(--accent); }

.blog-cover {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  line-height: 0;
}
.blog-cover.sm { width: 96px; height: 96px; }
.blog-cover.md { width: 100%; aspect-ratio: 3/2; }
.blog-cover.lg { width: 100%; aspect-ratio: 24/10; }

/* Lead article — editorial hero */
.blog-lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--ink);
  cursor: pointer;
}
.blog-lead:hover .blog-lead-title { color: var(--accent); }
.blog-lead-body { }
.blog-lead-title {
  font: 700 36px/1.1 var(--serif);
  margin: 10px 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.blog-lead-dek {
  font: 400 18px/1.45 var(--serif);
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 60ch;
  text-wrap: pretty;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 28px;
}
.blog-card {
  cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.blog-card-kicker .kicker {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-card-date { color: var(--ink-3); }
.blog-card-title {
  font: 600 20px/1.2 var(--serif);
  margin: 4px 0 4px;
  color: var(--ink);
  text-wrap: balance;
}
.blog-card-dek {
  font: 400 14px/1.45 var(--serif);
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.blog-card-byline {
  display: flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--sans);
  color: var(--ink-3);
  margin-top: 4px;
}
.blog-card-byline .dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-3); margin: 0 2px;
}
.blog-card-byline .byline-link { color: var(--ink); }
.blog-card-byline .byline-handle { font-family: var(--mono); color: var(--ink-3); font-size: 11px; margin-left: 2px; }
.blog-card-read { color: var(--ink-3); }

.byline-link { cursor: pointer; text-decoration: none; }
.byline-link:hover { color: var(--accent); }

/* Post detail */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.blog-post .back {
  display: inline-block;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 20px;
}
.blog-post .back:hover { color: var(--accent); }
.blog-post-head { margin-bottom: 24px; }
.blog-post-kicker {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.blog-post-kicker .kicker {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-post-title {
  font: 700 44px/1.08 var(--serif);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.blog-post-dek {
  font: 400 21px/1.4 var(--serif);
  font-style: italic;
  color: var(--ink-2);
  margin: 0 0 24px;
  max-width: 58ch;
  text-wrap: pretty;
}
.blog-post-byline {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.blog-post-author {
  font: 600 15px/1.2 var(--sans);
  color: var(--ink);
}
.blog-post-author .byline-handle {
  font: 500 12px/1 var(--mono);
  color: var(--ink-3);
  margin-left: 8px;
}
.blog-post-meta {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin-top: 4px;
}
.blog-post .blog-cover.lg { margin: 24px 0 28px; }
.blog-post-body {
  font: 400 18px/1.62 var(--serif);
  color: var(--ink);
}
.blog-post-body .lede {
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
}
.blog-post-body .lede::first-letter {
  font-size: 3.4em;
  float: left;
  line-height: 0.92;
  padding: 6px 10px 0 0;
  font-weight: 700;
  font-family: var(--serif);
}
.blog-post-body p { margin: 0 0 1.1em; }
.blog-post-body h2 {
  font: 700 24px/1.2 var(--serif);
  margin: 1.6em 0 0.5em;
  color: var(--ink);
}
.blog-post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.4em 0;
  padding: 0.1em 1em;
  font-style: italic;
  color: var(--ink-2);
}
.blog-post-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--rule);
}
.blog-post-body ul { padding-left: 22px; margin: 0 0 1.2em; }
.blog-post-body li { margin: 0 0 0.4em; }

.blog-post-foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}
.blog-post-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.blog-post-actions button {
  border: 1px solid var(--rule);
  background: transparent;
  padding: 6px 12px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
}
.blog-post-actions button:hover { border-color: var(--accent); color: var(--accent); }
.blog-post-sign {
  font: 400 13px/1.5 var(--serif);
  font-style: italic;
  color: var(--ink-3);
  margin: 0 0 24px;
}
.blog-post-more h4 {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.blog-post-more ul { list-style: none; margin: 0; padding: 0; }
.blog-post-more li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.blog-post-more li:last-child { border-bottom: 1px solid var(--rule); }
.blog-post-more a {
  font: 600 16px/1.25 var(--serif);
  color: var(--ink);
  cursor: pointer;
  flex: 1;
}
.blog-post-more a:hover { color: var(--accent); }
.blog-post-more-date {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Responsive: stack blog grid on narrow screens */
@media (max-width: 820px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-lead-title { font-size: 28px; }
  .blog-post-title { font-size: 34px; }
  .blog-post-dek { font-size: 18px; }
}

/* =============================================================
   PROFILE
   ============================================================= */
.profile-view {
  max-width: 860px;
  margin: 0 auto;
}
.profile-view .back {
  display: inline-block;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 16px;
}
.profile-view .back:hover { color: var(--accent); }

.profile-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 20px;
}
.profile-identity { display: flex; gap: 18px; align-items: flex-start; }
.avatar.xl {
  width: 88px; height: 88px; font-size: 30px; font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.profile-meta-line {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.profile-name {
  font: 700 34px/1.05 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 2px;
}
.profile-handle {
  font: 500 14px/1 var(--mono);
  color: var(--ink-3);
  margin-bottom: 8px;
}
.profile-title {
  font: 400 14px/1.4 var(--serif);
  font-style: italic;
  color: var(--ink-2);
}
.profile-actions {
  display: flex; gap: 8px; align-items: flex-start;
}
.profile-btn {
  border: 1px solid var(--rule);
  background: transparent;
  padding: 7px 14px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
}
.profile-btn:hover { border-color: var(--ink); }
.profile-btn.primary {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.profile-btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.profile-btn.following {
  background: var(--paper-2);
  color: var(--ink-2);
  border-color: var(--rule);
}
.profile-btn.ghost { padding: 7px 10px; }

.profile-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 4px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule);
}
.profile-stats > div { display: flex; flex-direction: column; gap: 2px; }
.profile-stats dt {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.profile-stats dd {
  font: 600 18px/1 var(--serif);
  color: var(--ink);
  margin: 0;
}

/* Also-on-FCC card */
.also-on-fcc {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.also-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.also-on-fcc h4 {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 3px;
}
.also-sub {
  font: 400 12px/1.3 var(--serif);
  font-style: italic;
  color: var(--ink-3);
}
.also-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.also-card {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 2px;
  min-height: 72px;
}
.also-card:hover { border-color: var(--ink); }
.also-site {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.also-val {
  font: 600 13px/1.25 var(--serif);
  color: var(--ink);
  margin-top: auto;
}
.also-label {
  font: 400 10px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* Profile tabs */
.profile-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
  overflow-x: auto;
}
.profile-tab {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.profile-tab:hover { color: var(--ink); }
.profile-tab.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.profile-tab .count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-left: 4px;
  font-weight: 500;
}

.profile-empty {
  padding: 28px;
  text-align: center;
  font: 400 14px/1.5 var(--serif);
  font-style: italic;
  color: var(--ink-3);
  border: 1px dashed var(--rule);
  border-radius: 2px;
}

/* Shout tab */
.profile-shout {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.profile-shout-time {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.profile-shout-body {
  font: 400 16px/1.5 var(--serif);
  color: var(--ink);
}

/* Forum tab */
.profile-forum section + section { margin-top: 22px; }
.profile-sub {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.profile-thread-list { list-style: none; margin: 0; padding: 0; }
.profile-thread-list li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.profile-thread-list li:last-child { border-bottom: 1px solid var(--rule); }
.profile-thread-title {
  font: 600 16px/1.3 var(--serif);
  color: var(--ink);
  cursor: pointer;
  display: block;
}
.profile-thread-title:hover { color: var(--accent); }
.profile-thread-meta {
  display: flex; gap: 12px; align-items: center;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Blog tab on profile */
.profile-blog { display: flex; flex-direction: column; gap: 18px; }
.profile-blog-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  cursor: pointer;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.profile-blog-item:hover .blog-card-title { color: var(--accent); }
.profile-blog-item .blog-cover.md { aspect-ratio: 3/2; }

/* Wall tab */
.profile-wall-composer {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.profile-wall-label {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.profile-wall-composer textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 10px;
  font: 400 15px/1.5 var(--serif);
  color: var(--ink);
  resize: vertical;
}
.profile-wall-composer textarea:focus { outline: 1px solid var(--accent); }
.profile-wall-tools {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  margin-top: 8px;
}
.profile-wall-tools .count { font: 500 11px/1 var(--mono); color: var(--ink-3); }
.profile-wall-tools .post-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 6px 14px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 2px;
}
.profile-wall-tools .post-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.profile-wall-list { list-style: none; margin: 0; padding: 0; }
.profile-wall-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.profile-wall-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  font: 500 13px/1.2 var(--sans);
  color: var(--ink);
}
.profile-wall-head .byline-handle {
  font: 500 11px/1 var(--mono);
  color: var(--ink-3);
  margin-left: 4px;
}
.profile-wall-when {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
}
.profile-wall-body {
  font: 400 15px/1.5 var(--serif);
  color: var(--ink);
  margin-top: 4px;
}

@media (max-width: 820px) {
  .profile-head { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .also-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-blog-item { grid-template-columns: 1fr; }
}

/* Clickable handles throughout the app */
.avatar-link { cursor: pointer; display: inline-block; }
.name-link, .handle-link {
  cursor: pointer;
  text-decoration: none;
}
.name-link:hover, .handle-link:hover { color: var(--accent); }
.handle-link { color: var(--ink-3); }


/* -------------------------------------------------------------
   CURATED — auto-pop posts from sibling fcc.cc pages
   Near-identical to .shout, with a subtle accent-wash left rail
   and a small byline flag.
   ------------------------------------------------------------- */
.shout.curated {
  position: relative;
  padding-left: 18px;
  margin-left: -10px;
  border-left: 2px solid var(--accent-wash);
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--accent-wash) 35%, transparent) 0, transparent 24px);
}
html[data-mode="dark"] .shout.curated {
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--accent-wash) 55%, transparent) 0, transparent 24px);
}

.shout.curated .curated-mark {
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shout.curated .curated-head {
  align-items: center;
  gap: 8px;
  position: relative;
}
.shout.curated .curated-eyebrow {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
}
.shout.curated .curated-head .name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.shout.curated .curated-flag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-wash);
  background: color-mix(in oklab, var(--accent-wash) 60%, var(--paper));
  padding: 1px 6px;
  border-radius: 2px;
  cursor: help;
}
.shout.curated .curated-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 2px 0 6px;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* Per-post ⋯ menu */
.curated-menu-wrap { margin-left: auto; position: relative; }
.curated-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  color: var(--ink-4);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.curated-menu-btn:hover {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--rule);
}

.curated-menu-backdrop {
  position: fixed; inset: 0;
  z-index: 40;
}
.curated-menu {
  position: absolute;
  top: 28px; right: 0;
  z-index: 41;
  width: 240px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 13px;
}
.curated-menu button {
  width: 100%;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.curated-menu button:hover { background: var(--paper-2); }
.curated-menu button .hint {
  font-size: 11px;
  color: var(--ink-4);
  font-family: var(--mono);
}
.curated-menu button.with-sub {
  flex-direction: row; align-items: center; justify-content: space-between;
  gap: 8px;
}
.curated-menu button.with-sub .chev {
  font-family: var(--mono);
  color: var(--ink-3);
  transition: transform 0.12s;
}
.curated-menu button.with-sub.open .chev { transform: rotate(90deg); color: var(--accent); }
.curated-menu .sep {
  height: 1px;
  background: var(--rule);
  margin: 4px 0;
}
.curated-menu-sub {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  max-height: 240px;
  overflow-y: auto;
}
.curated-menu-sub button { padding: 7px 12px 7px 22px; }
.curated-menu-sub button.current {
  color: var(--accent);
  font-weight: 600;
  position: relative;
}
.curated-menu-sub button.current::before {
  content: "●";
  position: absolute;
  left: 10px; top: 7px;
  font-size: 10px;
}

/* section-head extra hint link */
.section-head .hint-link {
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 3px;
  font-family: var(--mono);
}
.section-head .hint-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* -------------------------------------------------------------
   TWEAKS — Dispatch section additions
   ------------------------------------------------------------- */
.tweaks-panel .t-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  padding: 4px 2px 2px;
  text-wrap: pretty;
}
.tweaks-panel .seg.vert {
  flex-direction: column;
  border: 1px solid var(--rule-2);
}
.tweaks-panel .seg.vert button {
  flex: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px;
  padding: 9px 12px;
  border-right: 0;
  border-bottom: 1px solid var(--rule-2);
  text-align: left;
}
.tweaks-panel .seg.vert button:last-child { border-bottom: 0; }
.tweaks-panel .seg.vert button.on { background: var(--ink); color: var(--paper); }
.tweaks-panel .seg.vert .src-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
.tweaks-panel .seg.vert .src-blurb {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.3;
}
.tweaks-panel .seg.vert button.on .src-blurb { color: var(--paper-2); }


/* -------------------------------------------------------------
   BLOG — coverless variants
   When a post has no cover image, render a text-forward
   editorial treatment instead of a striped placeholder.
   ------------------------------------------------------------- */

/* Feed card side rail (md size) */
.blog-cover.coverless {
  background: transparent;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3/2;
}
.blog-cover.coverless .coverless-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 2px solid var(--accent);
  position: relative;
}
.blog-cover.coverless .coverless-rule {
  display: block;
  width: 28px; height: 1px;
  background: var(--ink);
  margin-bottom: 6px;
}
.blog-cover.coverless .coverless-label {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  margin-bottom: 6px;
}
.blog-cover.coverless .coverless-slug {
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* Subtle decorative mark behind the label */
.blog-cover.coverless .coverless-inner::after {
  content: "¶";
  position: absolute;
  right: 10px; top: 8px;
  font: 400 44px/1 var(--serif);
  font-style: italic;
  color: var(--rule-2);
  pointer-events: none;
}

.blog-card.no-cover:hover .blog-cover.coverless .coverless-inner {
  background: var(--paper-3);
  border-left-color: var(--accent);
}

/* Lead post (hero) — typographic masthead */
.blog-lead.no-cover .blog-lead-masthead {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 4px;
}
.blog-lead.no-cover .blog-lead-masthead-kicker {
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 10px;
}
.blog-lead.no-cover .blog-lead-masthead-slug {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  justify-self: end;
}
.blog-lead.no-cover .blog-lead-masthead-rule { display: none; }
.blog-lead.no-cover .blog-lead-body { padding-top: 2px; }

/* Post detail — ornamental rule break in place of cover */
.blog-post-nocover {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 28px 0 32px;
}
.blog-post-nocover .nocover-rule {
  height: 1px;
  background: var(--rule);
}
.blog-post-nocover .nocover-mark {
  font: 400 22px/1 var(--serif);
  font-style: italic;
  color: var(--ink-3);
}

/* All theme tokens now flow from fcc-theme-boot.js (inline) +
   fcc-editorial-tokens.css (data-mode). The legacy `data-paper`
   declarative blocks that used to live here were removed because
   they were competing with the v2 stack and producing wrong-direction
   ink on the masthead. See `:root` aliases at the top of this file. */

/* Skip link — WCAG-friendly hidden-until-focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  z-index: 100;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* Auth link in topbar right rail */
.topbar .auth-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.topbar .auth-link.primary:hover { color: var(--accent); }

/* Topbar and nav — responsive fallbacks for narrow screens */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px 16px; }
  .topbar-inner .right { margin-left: 0; width: 100%; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
  .nav-inner { flex-wrap: wrap; gap: 0 2px; padding: 0 16px; }
  .nav .tab { padding: 12px 10px; font-size: 12px; }
  .nav-inner .spacer { display: none; }
}

/* Places list — sidebar block linking out to sibling community surfaces */
.place-list { display: grid; gap: 2px; }
.place {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer;
  transition: padding-left 0.1s ease, color 0.1s ease;
}
.place:last-child { border-bottom: 0; }
.place:hover {
  padding-left: 6px;
  text-decoration: none;
}
.place .place-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.place:hover .place-name { color: var(--accent); }
.place .place-desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}

/* Listening — sidebar audio-session widget. Reads state from both the
   music bridge (fcc:music:bridge:v1) and pods bridge (fcc:pods:bridge:v1)
   and renders into the right sidebar on /community/. */
.listening-block .listening-idle-hint {
  margin: 0 0 10px 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.listening-launchers { margin-top: 0; }
.listening-block[data-source] .listening-launchers { display: none; }
/* When a source is active on /community/, also hide the in-content
   "Nothing playing" hint block so the widget reads cleanly. */
.listening-block[data-source] .listening-idle { display: none; }
.listening-active {
  padding: 10px 0 12px 0;
  border-bottom: 1px dashed var(--rule);
  margin-bottom: 10px;
}
.listening-now {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: flex-start;
}
.listening-cover {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--card-bg, rgba(0, 0, 0, 0.05));
}
.listening-now-text {
  flex: 1 1 auto;
  min-width: 0; /* allow children with ellipsis to shrink below content size */
}
.listening-source {
  display: inline-block;
  font-family: var(--mono, var(--sans));
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
  margin-bottom: 8px;
}
.listening-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 2px;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listening-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.listening-time {
  font-family: var(--mono, var(--sans));
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.listening-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.listening-controls .lb-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.listening-controls .lb-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.listening-controls .lb-btn.lb-btn-play {
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-color: var(--accent);
  color: var(--accent);
}
.listening-controls .lb-btn.lb-btn-play:hover {
  background: var(--accent);
  color: var(--paper, #fff);
}
.listening-open {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  text-decoration: none;
}
.listening-open:hover { color: var(--accent); }
.listening-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.listening-actions .listening-open { margin: 0; }
.listening-share {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.listening-share:hover { color: var(--accent); }

/* Discovery strip — rotating pick card shown in the idle state of the
   Listening block. Clicking a Radio pick plays inline; Podcast picks
   deep-link to /pods/ (stage 3 will add inline episode play). */
.listening-suggest {
  margin: 0 0 14px 0;
}
.listening-suggest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono, var(--sans));
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.listening-suggest-nav {
  display: inline-flex;
  gap: 2px;
}
.listening-suggest-nav-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: color 0.1s, border-color 0.1s;
}
.listening-suggest-nav-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.listening-suggest-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.listening-suggest-cover {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--card-bg, rgba(0, 0, 0, 0.05));
  display: block;
}
.listening-suggest-cover--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ink-3);
}
.listening-suggest-text {
  flex: 1 1 auto;
  min-width: 0;
}
.listening-suggest-badge {
  display: inline-block;
  font-family: var(--mono, var(--sans));
  font-size: 9px;
  letter-spacing: 0.09em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0 4px;
  margin-bottom: 3px;
}
.listening-suggest-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listening-suggest-meta {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.listening-suggest-action {
  font-family: var(--sans);
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.listening-suggest-action:hover {
  background: var(--accent);
  color: var(--paper, #fff);
}

/* On /community/, suppress the two floating audio-bridge docks. The
   sidebar's Listening widget is the canonical surface there; rendering
   the docks too doubles the UI and visually clutters the Dispatch.
   Scoped via data-commons-page="community" so other Commons pages
   (chat/forum/blog/shout/timeline) keep the docks as usual. */
body[data-commons-page="community"] #fccMusicRemote,
body[data-commons-page="community"] #fccPodsRemote {
  display: none !important;
}

/* Floating Listen Dock (FLD) — bottom-right player that mirrors the
   sidebar Listening widget when something is playing. The sidebar block
   stays as the canonical surface; the dock makes playback evident as
   the user scrolls long Dispatch threads, and is the primary surface
   on mobile where the sidebar drops below the fold.

   .fld-media holds either the cover image (audio) or, in the future,
   a <video> element — keep this slot DOM-stable so video can drop in
   without restructuring. */
.fld {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.10);
  font-family: var(--sans);
  color: var(--ink);
  overflow: hidden;
  transition: transform 180ms ease, opacity 180ms ease;
}
.fld[hidden] { display: none; }
.fld[data-fld-collapsed="true"] .fld-body { display: none; }
.fld[data-fld-collapsed="true"] .fld-bar-toggle::before { content: "▴"; }
.fld[data-fld-collapsed="false"] .fld-bar-toggle::before { content: "▾"; }
.fld-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--paper-2, var(--paper));
  border-bottom: 1px solid var(--rule);
  cursor: default;
}
.fld[data-fld-collapsed="true"] .fld-bar { border-bottom: 0; }
.fld-bar-source {
  font-family: var(--mono, var(--sans));
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 1px 5px;
  flex: 0 0 auto;
}
.fld-bar-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fld-bar-play {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.fld-bar-play:hover {
  background: var(--accent);
  color: var(--paper);
}
.fld-bar-toggle,
.fld-bar-close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.1s, background 0.1s;
}
.fld-bar-toggle:hover,
.fld-bar-close:hover {
  color: var(--ink);
  background: rgba(127, 127, 127, 0.10);
}
.fld-body {
  padding: 10px 12px 12px;
}
.fld-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper-2, rgba(127, 127, 127, 0.06));
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.fld-media[hidden] { display: none; }
.fld-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fld-cover[hidden] { display: none; }
.fld-cover--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--ink-3);
}
.fld-info {
  margin-bottom: 8px;
}
.fld-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fld-meta {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fld-time {
  font-family: var(--mono, var(--sans));
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 4px;
}
.fld-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.fld-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.fld-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.fld-btn[hidden] { display: none; }
.fld-btn.fld-play {
  width: 34px;
  height: 34px;
  font-size: 13px;
  border-color: var(--accent);
  color: var(--accent);
}
.fld-btn.fld-play:hover {
  background: var(--accent);
  color: var(--paper);
}
.fld-upnext {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
}
.fld-upnext[hidden] { display: none; }
.fld-upnext-label {
  font-family: var(--mono, var(--sans));
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 0 0 auto;
}
.fld-upnext-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fld-upnext-play {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s, background 0.1s;
}
.fld-upnext-play:hover {
  border-color: var(--accent);
  color: var(--paper);
  background: var(--accent);
}
@media (max-width: 640px) {
  .fld {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
  }
  .fld-media { aspect-ratio: 21 / 9; }
}

/* Dispatch list — wraps the .shout cards loaded from /api/community/now */
.dispatch-state {
  padding: 40px 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-3);
  font-size: 15px;
}
.dispatch-state.error { color: var(--accent); }
.dispatch-actions {
  display: flex;
  justify-content: center;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 8px;
}
.dispatch-more {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.dispatch-more:hover {
  background: var(--ink);
  color: var(--paper);
}
.dispatch-more:disabled {
  opacity: 0.5;
  cursor: wait;
}

.hidden { display: none !important; }

/* Source tag on dispatch items — badge by source (forum / blog / shout / huddle) */
.shout .source-tag {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  color: var(--ink-3);
}
.shout .source-tag[data-source="forum"] { color: oklch(0.42 0.10 260); }
.shout .source-tag[data-source="blog"]  { color: oklch(0.44 0.10 155); }
.shout .source-tag[data-source="shout"],
.shout .source-tag[data-source="huddle"] { color: var(--accent); }
html[data-mode="dark"] .shout .source-tag[data-source="forum"] { color: oklch(0.75 0.10 260); }
html[data-mode="dark"] .shout .source-tag[data-source="blog"]  { color: oklch(0.72 0.10 155); }

/* Title of a dispatch item (forum thread title, blog post title) */
.shout .item-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  margin: 6px 0 4px;
  text-wrap: pretty;
  display: block;
}
.shout .item-title:hover { color: var(--accent); text-decoration: underline; }

/* Context label (room name, blog tag) — under item title */
.shout .item-context {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 4px;
}

/* Topbar bell / envelope widgets — visible only to signed-in users.
   Baseline `hidden` is set on the <a> in commons-shell.js; JS reveals
   them after /api/me/unread-counts confirms the user is authed. The
   [hidden] selector needs to win over the base .commons-widget rule
   (both are specificity (0,1,1)) — CSS source order handles that, but
   we also spell display:none explicitly so no other rule leaks in. */
.commons-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--ink-2);
  transition: color 120ms;
}
.commons-widget[hidden] { display: none !important; }
.commons-widget:hover { color: var(--ink); text-decoration: none; }
.commons-widget.has-unread { color: var(--accent); }
.commons-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--paper);
  font: 700 9px/14px var(--mono);
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--paper);
}
.commons-badge[hidden] { display: none; }

/* Inline image attached to a Dispatch item (shout + huddle image_url) */
.shout .dispatch-image {
  display: block;
  margin: 10px 0 8px;
  max-width: 560px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  line-height: 0;
}
.shout .dispatch-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
}
.shout .dispatch-image:hover { border-color: var(--ink-3); }

/* ============================================================
   PENNY PRESS — unified topbar (.umb) and home masthead (.mast)
   Mounted via <div data-commons-shell="topbar"></div>. Replaces the
   legacy .topbar + .fcc-meta-bar + econav pill row site-wide. The
   .masthead block above still powers the community "The Commons"
   wordmark; .mast below is the home variant.
   ============================================================ */

.umb {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}
.umb-inner {
  max-width: var(--maxw, 1280px);
  margin: 0 auto;
  padding: 10px var(--gutter, 32px);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.umb-onair {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: umb-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes umb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.umb-date     { color: var(--ink-2); }
.umb-version,
.umb-updated  { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.umb-sep      { color: var(--rule); user-select: none; }
.umb-spacer   { flex: 1; }
.umb-theme {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
}
.umb-theme-dots { display: flex; gap: 7px; }
.umb-theme-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  cursor: pointer;
}
.umb-theme-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.umb-theme-dot[data-on="true"] {
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 1px var(--accent);
  border-color: var(--accent);
}
.umb-theme-dot[data-tone="penny"]     { background: #d4593f; }
.umb-theme-dot[data-tone="ochre"]     { background: #d4a445; }
.umb-theme-dot[data-tone="ivy"]       { background: #4f8a5a; }
.umb-theme-dot[data-tone="newsprint"] { background: #efe7d6; }
.umb-theme-dot[data-tone="paper"]     { background: #ffffff; }

.umb-home     { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-decoration: none; }
.umb-home:hover { color: var(--ink); }
.umb-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; color: var(--ink-2); position: relative;
  text-decoration: none;
}
.umb-icon:hover { color: var(--ink); }
.umb-icon svg { width: 16px; height: 16px; }
.umb-badge {
  position: absolute; top: -2px; right: 0;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 9px/14px var(--mono);
  text-align: center;
}
.umb-user {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-transform: uppercase;
  text-decoration: none;
}
.umb-user:hover { border-color: var(--ink-2); }

/* Mobile: collapse the high-density middle into just the essential dot +
   theme dots + icons + user chip. README open-question #3 — design's
   reference CSS doesn't ship a mobile pass; this is a minimal no-overflow
   fallback, not the final polished mobile layout. */
@media (max-width: 720px) {
  .umb-inner {
    padding: 8px 16px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
  }
  .umb-version,
  .umb-updated,
  .umb-sep,
  .umb-theme > span:first-child {
    display: none;
  }
}

/* ============================================================
   Home masthead — site-level "fcc.cc" italic wordmark.
   Community keeps the existing .masthead emitted by commons-shell.js;
   .mast is its home counterpart with eyebrow + tagline + Field Bulletin
   plate.
   ============================================================ */
.mast {
  border-bottom: 3px double var(--ink);
  padding: 28px var(--gutter, 32px) 22px;
  background: var(--paper);
  text-align: center;
}
.mast-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.mast-eyebrow .accent { color: var(--accent); font-weight: 600; }
.mast-eyebrow .sep    { color: var(--rule); margin: 0 10px; }
.mast h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(56px, 7vw, 96px);
  letter-spacing: -0.025em;
  line-height: 0.95;
  color: var(--ink);
}
.mast .tagline {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
}
.mast .tagline-strip {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; justify-content: center; gap: 22px; flex-wrap: wrap;
}
.mast .tagline-strip .bullet { color: var(--rule); }

