:root {
  --ink: #26281f;
  --ink-soft: #6b7060;
  --paper: #f6f4ec;
  --panel: #fffdf7;
  --line: #e5e1d3;
  --line-soft: #eeeadd;
  --accent: #2f6b4f;
  --accent-deep: #24523d;
  --accent-soft: #e7f0e9;
  --danger: #a33a2e;
  --danger-soft: #f7e7e4;
  --amber: #8a6d1a;
  --amber-soft: #f5ecd2;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Charter, Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-soft: 0 1px 2px rgba(38, 40, 31, 0.05), 0 4px 14px rgba(38, 40, 31, 0.05);
  --shadow-lift: 0 2px 4px rgba(38, 40, 31, 0.06), 0 10px 26px rgba(38, 40, 31, 0.09);
  --reading-font: var(--serif);
  --reading-size: 17px;
  --reading-spacing: normal;
}

/* Reading font: chosen per reader, remembered only in their browser. Every
   option is a face already on the device, never fetched from a font host.
   Sizes are tuned per face so each reads at the same visual weight. */
html[data-reading-font='sans'] { --reading-font: var(--sans); --reading-size: 16.5px; }
html[data-reading-font='comfort'] {
  --reading-font: Verdana, 'DejaVu Sans', Geneva, Tahoma, sans-serif;
  --reading-size: 16px;
  --reading-spacing: 0.012em;
}
html[data-reading-font='mono'] { --reading-font: var(--mono); --reading-size: 15px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, #f2efe4 0%, var(--paper) 220px);
  font-size: 15px;
  line-height: 1.55;
}

::selection { background: var(--accent-soft); }

/* Block numbers are doorways into the /block/N explorer pages. */
.block-link { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.block-link:hover { border-bottom-style: solid; }
.block-chip {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 0;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  text-decoration: none;
}
.block-chip:hover { background: var(--accent); color: var(--panel); }
.anchor-confirmed { color: var(--accent); }
.anchor-pending { color: var(--ink-soft); }
.anchor-alarm { color: var(--danger); font-weight: 600; }

a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 13px 22px;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.language-select {
  margin-left: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--sans);
}
.language-select:hover { border-color: var(--accent); color: var(--ink); }
#registrations-button.has-attention,
#desk-button.has-attention {
  border-color: var(--amber);
  color: var(--amber);
  font-weight: 650;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; font-family: var(--serif); letter-spacing: 0.1px; color: var(--ink); text-decoration: none; cursor: pointer; }
.brand:hover .brand-name { color: var(--accent-deep); }
.brand-mark { font-size: 21px; filter: saturate(1.1); }

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

.verify-badge {
  font-size: 12.5px;
  font-weight: 650;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.verify-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15); }
.verify-badge.invalid { background: var(--danger-soft); color: var(--danger); }
.verify-badge.invalid::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(163, 58, 46, 0.15); }

.audit-link { color: var(--ink-soft); font-size: 13px; text-decoration: none; border-bottom: 1px dotted var(--ink-soft); transition: color 0.15s ease, border-color 0.15s ease; }
.audit-link:hover { color: var(--accent); border-color: var(--accent); }

/* Buttons */

.primary-button {
  background: linear-gradient(180deg, #37785a, var(--accent));
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(36, 82, 61, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(36, 82, 61, 0.3); }
.primary-button:active { transform: translateY(0); }

.secondary-button {
  background: var(--panel);
  color: var(--accent-deep);
  border: 1px solid var(--accent);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.secondary-button:hover { background: var(--accent-soft); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.secondary-button:active { transform: translateY(0); }

.mini-button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-family: var(--sans);
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.mini-button:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }

/* Layout */

.layout { display: flex; min-height: calc(100vh - 59px); }

.sidebar {
  width: 292px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 12px 40px;
  overflow-y: auto;
}

.tree-node { user-select: none; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.13s ease, box-shadow 0.13s ease;
}
.tree-row:hover { background: var(--paper); }
.tree-row.selected { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.tree-toggle { width: 14px; text-align: center; color: var(--ink-soft); font-size: 11px; flex-shrink: 0; }
.tree-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count { font-size: 11px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line-soft); border-radius: 999px; padding: 1px 7px; }
.tree-children { margin-left: 16px; border-left: 1px solid var(--line-soft); padding-left: 4px; }

.content { flex: 1; padding: 30px 38px 90px; max-width: 920px; margin: 0 auto; min-width: 0; }
.content h2 { font-family: var(--serif); font-size: 26px; margin: 6px 0 14px; letter-spacing: 0.1px; }
.content h3 { font-family: var(--serif); font-size: 19px; }

.breadcrumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; transition: color 0.15s ease; }
.breadcrumbs a:hover { color: var(--accent); }

/* Cards */

.entry-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.entry-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.entry-card h3 { margin: 0 0 5px; font-size: 17.5px; font-family: var(--serif); }
.entry-meta { font-size: 12.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2.5px 8px;
  border-radius: 999px;
  vertical-align: 2px;
}
.badge.superseded { background: var(--danger-soft); color: var(--danger); }
.badge.latest { background: var(--accent-soft); color: var(--accent-deep); }
.badge.gated, .badge.withheld { background: var(--amber-soft); color: var(--amber); }

/* Entry view */

.entry-view {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 40px 30px;
  box-shadow: var(--shadow-soft);
}
.entry-view h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; font-family: var(--serif); letter-spacing: 0.1px; }

.notice {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin: 16px 0;
}
.notice.superseded { background: var(--danger-soft); color: var(--danger); }
.notice.gated { background: var(--amber-soft); color: var(--amber); }
.notice a { color: inherit; font-weight: 600; }

.provenance {
  margin-top: 28px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  word-break: break-all;
}
.provenance div { margin-bottom: 5px; }
.provenance div:last-child { margin-bottom: 0; }

.article-body {
  font-family: var(--reading-font);
  font-size: var(--reading-size);
  letter-spacing: var(--reading-spacing);
  line-height: 1.75;
  max-width: 66ch;
}
.article-body h1, .article-body h2, .article-body h3 { margin: 26px 0 10px; line-height: 1.3; }
.article-body h1 { font-size: 24px; }
.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 17.5px; }
.article-body p { margin: 12px 0; }
.article-body code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 6px;
}
.article-body pre {
  background: #262b21;
  color: #eaeee2;
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.article-body pre code { background: none; border: none; color: inherit; padding: 0; }
.article-body ul { margin: 12px 0; padding-left: 26px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--accent); text-underline-offset: 3px; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow-soft); margin: 8px 0; }

/* Reading tools: the "Read in" font pills above every entry. Each pill is
   labeled in its own face, so the row previews the choices. */
.reading-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 2px;
}
.reading-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: var(--sans);
  margin-right: 2px;
}
.font-choice {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.font-choice:hover { border-color: var(--accent); color: var(--ink); }
.font-choice[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}
.font-choice-serif { font-family: var(--serif); }
.font-choice-sans { font-family: var(--sans); }
.font-choice-comfort { font-family: Verdana, 'DejaVu Sans', Geneva, Tahoma, sans-serif; font-size: 12px; }
.font-choice-mono { font-family: var(--mono); font-size: 12px; }

/* Philosophy view: principles and contrasts */
.principle-row { margin: 10px 0; max-width: 72ch; line-height: 1.6; }
.principle-row strong { color: var(--accent-deep); }
.contrast-row { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.contrast-row:last-child { border-bottom: none; }
.contrast-elsewhere {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 72ch;
}
.contrast-elsewhere::before { content: 'Elsewhere: '; font-weight: 650; letter-spacing: 0.04em; }
.contrast-here {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  max-width: 72ch;
}
.contrast-here::before { content: 'Here: '; font-weight: 700; color: var(--accent-deep); font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.04em; }

/* Mission strip: the library introducing itself, root view only */
.mission-strip {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 18px 44px 14px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}
.mission-line {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 62ch;
}
.mission-offerings { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mission-offering {
  flex: 1 1 260px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--sans);
}
.mission-offering:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.mission-offering strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}
.mission-offering span { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; }
.mission-offering em { font-style: normal; font-size: 12.5px; font-weight: 650; color: var(--accent-deep); }
.mission-pillars { display: flex; gap: 10px; flex-wrap: wrap; }
.mission-pillar {
  flex: 1 1 180px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--sans);
}
.mission-pillar:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.mission-pillar strong {
  display: block;
  color: var(--accent-deep);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.mission-pillar span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; display: block; }
.mission-dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.mission-dismiss:hover { color: var(--ink); }
.footer-tagline {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  margin-bottom: 6px;
}

/* Provenance signals: advisory AI-pattern analysis, reader- or writer-triggered */
.signals-panel, .editor-signals {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
}
.signals-panel h3 { margin: 0 0 6px; font-family: var(--serif); }
.signal-headline { font-weight: 600; margin: 10px 0 4px; }
.signal-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 8px 0 14px;
}
.signal-bar-ai { background: var(--amber); }
.signal-bar-original { background: var(--accent); }
.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 13.5px;
}
.signal-label { font-weight: 600; }
.signal-score { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.signal-evidence { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.signal-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.55;
}

/* Forms */

.add-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: var(--shadow-soft);
}
.add-form h2 { margin-top: 0; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.12);
}
.form-field textarea { min-height: 220px; font-family: var(--mono); font-size: 13px; }
.form-field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.form-errors { color: var(--danger); background: var(--danger-soft); border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; }

.immutability-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-soft); }

.empty-state { color: var(--ink-soft); padding: 34px 0; font-family: var(--serif); font-style: italic; font-size: 15.5px; }

/* Search */

.search-bar {
  display: flex;
  gap: 10px;
  padding: 11px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.search-bar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.search-bar input:focus { outline: none; border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.12); }

.filters-panel[hidden] { display: none; }
.filters-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  align-items: end;
  box-shadow: inset 0 6px 8px -8px rgba(38, 40, 31, 0.12);
}
.filter-field label { display: block; font-size: 11.5px; font-weight: 650; letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 5px; color: var(--ink-soft); }
.filter-field input, .filter-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
}
.filter-actions { display: flex; gap: 8px; }

.search-summary { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.6; }
.snippet { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.55; font-family: var(--serif); }
.snippet mark { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; padding: 0 3px; border-radius: 4px; }

.topic-description {
  font-size: 15px;
  font-family: var(--serif);
  color: var(--ink-soft);
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-soft);
}

/* View header and close */

.view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.view-header h2 { margin: 0; }
.close-button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.close-button:hover { color: var(--danger); border-color: var(--danger); transform: rotate(90deg); }

/* Topic picker suggestions */

.topic-suggestions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.topic-suggestion-note { font-size: 12.5px; color: var(--ink-soft); width: 100%; }
.topic-suggestion-note.new-topic { color: var(--accent-deep); font-weight: 600; }

/* Tabs */

.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab-button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-button:hover { color: var(--accent-deep); }
.tab-button.active { color: var(--accent-deep); border-bottom-color: var(--accent); }

.tab-bar.subtabs { border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; gap: 2px; }
.tab-bar.subtabs .tab-button { font-size: 12.5px; padding: 7px 12px; margin-bottom: -1px; }

/* Join pitch */

.pitch-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.pitch-panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pitch-panel:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pitch-cta { margin-top: 12px; font-size: 13px; font-weight: 650; color: var(--accent-deep); }
.pitch-panel:hover .pitch-cta { text-decoration: underline; text-underline-offset: 3px; }
.pitch-panel h4 { margin: 0 0 12px; font-family: var(--serif); font-size: 16.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pitch-chip {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.pitch-chip.amber { background: var(--amber-soft); color: var(--amber); }
.pitch-list { list-style: none; margin: 0; padding: 0; }
.pitch-list li { padding-left: 24px; position: relative; margin-bottom: 9px; font-size: 13.5px; line-height: 1.55; }
.pitch-list li::before { content: '✓'; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }

/* Panels shared by organize, join, registrations, transparency */

.organize-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.organize-card h3 { margin-top: 0; font-family: var(--serif); }
.organize-card h4 { font-family: var(--serif); }
.organize-card .hint { font-size: 12.5px; color: var(--ink-soft); }
.organize-note {
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.organize-note.error { background: var(--danger-soft); color: var(--danger); }
.order-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 6px;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.order-row:hover { border-color: var(--accent); }
.order-row .order-name { flex: 1; }
.order-row .order-name div { margin-bottom: 2px; }
.governance-history { font-size: 12.5px; color: var(--ink-soft); font-family: var(--mono); line-height: 1.7; padding-left: 20px; }
.governance-history li { margin-bottom: 5px; }

details summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); margin: 8px 0 6px; transition: color 0.15s ease; }
details summary:hover { color: var(--accent); }

/* Share */

.share-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; align-items: center; }
.share-link { text-decoration: none; display: inline-block; }

/* Markdown editor */

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 9px 9px 0 0;
}
.form-field .editor-toolbar + textarea { border-radius: 0 0 9px 9px; margin-top: 0; }
.editor-preview {
  border: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
  background: var(--panel);
  padding: 14px 18px;
  min-height: 220px;
}
.editor-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; flex-wrap: wrap; }

/* Comments */

.comments-section { margin-top: 32px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.comment-node {
  border-left: 3px solid var(--line);
  padding: 10px 14px;
  margin-top: 12px;
  background: var(--paper);
  border-radius: 0 10px 10px 0;
}
.comment-header { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.comment-header a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.comment-header a:hover { text-decoration: underline; }
.comment-body {
  font-family: var(--reading-font);
  font-size: calc(var(--reading-size) - 2.5px);
  letter-spacing: var(--reading-spacing);
  line-height: 1.6;
}
.comment-body p { margin: 6px 0; }
.comment-actions { margin-top: 6px; display: flex; gap: 6px; }

/* Reader notice and footers */

.reader-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 11px 22px;
  background: linear-gradient(180deg, #edf3ec, var(--accent-soft));
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  border-bottom: 1px solid var(--line);
}
.reader-notice a { color: var(--accent-deep); font-weight: 600; }
.reader-notice button { flex-shrink: 0; }
/* display:flex would defeat the hidden attribute (same trap as the filters
   panel); once the Terms are accepted the banner must actually go away. */
.reader-notice[hidden] { display: none; }

.site-footer {
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}
.site-footer a { color: var(--accent); }

.sidebar-footer { margin-top: 20px; padding: 12px 9px; border-top: 1px dashed var(--line); }
.sidebar-footer a { color: var(--accent-deep); font-size: 13px; font-weight: 600; text-decoration: none; transition: color 0.15s ease; }
.sidebar-footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Scrollbars, subtle */

.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

@media (max-width: 900px) {
  .content { padding: 24px 24px 70px; }
  .content h2 { font-size: 23px; }
}

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .content { padding: 18px 16px 60px; }
  .entry-view { padding: 22px 18px; }
  .entry-view h1 { font-size: 24px; }
  .article-body { font-size: 16px; }
  .filters-panel { grid-template-columns: repeat(2, 1fr); }
  .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .top-bar { padding: 10px 14px; }
  .brand { font-size: 17px; }
  .top-actions { gap: 6px 8px; }
  .primary-button { padding: 8px 12px; font-size: 13px; }
  .secondary-button { padding: 7px 11px; font-size: 12.5px; }
  .verify-badge { font-size: 11.5px; padding: 4px 9px 4px 7px; }
  .audit-link { font-size: 12px; }
  .search-bar { padding: 9px 14px; }
  .filters-panel { grid-template-columns: 1fr; padding: 12px 14px; }
  .reader-notice { padding: 10px 14px; font-size: 12.5px; }
  .tab-button { padding: 10px 12px; }
  .mini-button { padding: 7px 12px; }
  .font-choice { padding: 5px 12px; }
  .mission-strip { padding: 14px 36px 12px 14px; }
  .content { padding: 14px 12px 50px; }
  .content h2 { font-size: 21px; }
  .entry-view { padding: 18px 14px; }
  .entry-view h1 { font-size: 21px; }
  .organize-card { padding: 16px 16px; }
  .add-form { padding: 18px 16px; }
  .tab-button { padding: 8px 10px; font-size: 12.5px; }
  .share-row .mini-button { padding: 4px 8px; font-size: 12px; }
}

/* Sign-in: the key file drop zone. */
.key-drop-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 26px 18px;
  text-align: center;
  background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.key-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.key-drop-zone.key-loaded {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* The account menu: one chip for everything personal. */
.account-menu { position: relative; }
.account-menu[hidden] { display: none; }
.account-chip.has-attention { border-color: var(--amber); color: var(--amber); }
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
.account-dropdown[hidden] { display: none; }
.account-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 9px 12px;
  border-radius: 7px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.account-dropdown button:hover { background: var(--accent-soft); }
.account-dropdown button.has-attention { color: var(--amber); font-weight: 600; }
.account-dropdown .account-signout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
  color: var(--ink-soft);
}

/* Footer navigation: links on their own row, channels set apart. */
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; align-items: center; }
.footer-nav a { font-weight: 600; }
.footer-nav-sep { width: 1px; height: 14px; background: var(--line); }
