/* sgit newsroom: the look of sgit.ai. Warm off-white, near-black ink, one blue accent, a serif for
   headings, system sans for text, monospace eyebrows. System fonts only: nothing is fetched. */
:root {
  --bg: #faf7f2; --paper: #fffdf9; --ink: #1b1a17; --muted: #6b665c; --rule: #e4ddd0;
  --accent: #1f4fd1; --accent-soft: #e8eefc; --warn: #9a3412; --warn-soft: #fdf0e6; --ok: #166534;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16150f; --paper: #1d1c16; --ink: #ece8df; --muted: #a39d90; --rule: #34322a;
          --accent: #8fb0ff; --accent-soft: #1f2640; --warn: #fdba74; --warn-soft: #3a2616; --ok: #86efac; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); overflow-wrap: anywhere; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a.ext.live { text-decoration: none; margin-left: .25em; font-size: .85em; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; font-weight: 600; margin: 1.6em 0 .5em; }
h1 { font-size: 2.1rem; margin-top: .4em; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; }
header.top { background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px 16px; }
header.top .brand { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); text-decoration: none; font-weight: 700; }
header.top .brand em { color: var(--accent); font-style: normal; }
header.top .ver { font: 12px var(--mono); color: var(--muted); margin-left: .6em; }
header.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .9rem; }
header.top nav a { color: var(--muted); text-decoration: none; }
header.top nav a.on, header.top nav a:hover { color: var(--accent); }
main { max-width: 980px; margin: 0 auto; padding: 16px 16px 40px; }
footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; padding: 12px 16px 30px; text-align: center; }
.eyebrow { font: 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 0; }
.lede { font-size: 1.12rem; color: var(--ink); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .num { text-align: right; }
.crumbs { font-size: .88rem; color: var(--muted); } .jump { font-size: .95rem; }
pre { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 12px; overflow-x: auto; font: 13.5px/1.5 var(--mono); }
pre.raw { white-space: pre-wrap; }
code { font-family: var(--mono); font-size: .88em; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0 .25em; }
pre code { border: 0; padding: 0; background: none; }
code.key { word-break: break-all; font-size: .75em; }
blockquote { margin: 1em 0; padding: .2em 1em; border-left: 3px solid var(--accent); background: var(--paper); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
img { max-width: 100%; height: auto; }
.table { overflow-x: auto; margin: 1em 0; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; background: var(--paper); }
th, td { border: 1px solid var(--rule); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--bg); font-weight: 600; }
tr[hidden] { display: none; }
.provenance { margin-top: 3em; border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: var(--paper);
  border-radius: 6px; padding: 10px 14px; font-size: .88rem; }
.provenance h2 { font: 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.provenance dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0; }
.provenance dt { color: var(--muted); } .provenance dd { margin: 0; } .provenance ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 600px) { .provenance dl { grid-template-columns: 1fr; } .provenance dd { margin-bottom: 6px; } h1 { font-size: 1.7rem; } }
.unreviewed-banner { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 6px 12px; font-size: .9rem; }
.unreviewed { color: var(--warn); }
.tag { display: inline-block; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; background: var(--accent-soft);
  color: var(--accent); border-radius: 10px; padding: 1px 8px; vertical-align: middle; }
.honest { background: var(--accent-soft); border-radius: 6px; padding: 12px 16px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 4px 16px 10px; margin: 14px 0; }
.card h3 { margin-top: .6em; }
.btn { display: inline-block; border: 1px solid var(--accent); border-radius: 6px; padding: 3px 10px; text-decoration: none; margin: 2px 6px 2px 0; font-size: .92rem; }
ul.list { padding-left: 1.1em; } ul.list li { margin: .25em 0; } ul.list.big li { margin: .5em 0; }
ul.files { padding-left: 1.1em; font-size: .92rem; }
.front { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .front { grid-template-columns: 1fr 260px; } .front .side { order: 2; } .front .lead { order: 1; } }
.side { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 4px 16px; font-size: .92rem; align-self: start; }
.side ul { padding-left: 1.1em; }
.counts { background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 2px 14px; margin: 12px 0; }
.counts h3 { margin-top: .6em; font-size: 1.05rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters input, .filters select { font: inherit; font-size: .95rem; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px;
  background: var(--paper); color: var(--ink); max-width: 100%; }
.filters input { flex: 1 1 220px; }
ol.results li { margin: .7em 0; }
details.toc { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; margin: 10px 0; font-size: .9rem; }
details.toc ul { list-style: none; padding-left: 0; margin: 6px 0; } details.toc li.l2 { padding-left: 1em; } details.toc li.l3 { padding-left: 2em; }
.pager { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin: 10px 0; flex-wrap: wrap; }
.signal-route { font: 14px var(--mono); }
.dead { border-bottom: 1px dotted var(--muted); }
.flowwrap { overflow-x: auto; margin: 16px 0; }
svg.flow { width: 100%; min-width: 640px; height: auto; }
svg.flow .desk { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
svg.flow a:hover .desk { fill: var(--accent-soft); }
svg.flow .dname { font: 600 14px var(--serif); fill: var(--ink); }
svg.flow .dwhat { font: 11px var(--sans); fill: var(--muted); }
svg.flow .edge { fill: none; stroke: var(--muted); stroke-width: 1.3; }
svg.flow .arrowhead { fill: var(--muted); }
.concept { border-top: 1px solid var(--rule); } .concept h2 { margin-top: 1em; }
article.source h1:first-child { margin-top: .3em; }

/* ---- the reading list (reading room, new-pages page) and the feedback bar ------------------------ */
main.wide { max-width: 1240px; }
[hidden] { display: none !important; }
.rl { margin: 16px 0 40px; }
.rl-filters { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rl-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rl-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid #d8cfbf; border-radius: 8px; background: var(--bg); }
.rl-search input { border: 0; outline: none; flex: 1; font: inherit; font-size: 15px; background: transparent; color: var(--ink); min-width: 0; }
.rl-tabs { display: flex; gap: 4px; padding: 4px; background: #f1ece2; border-radius: 10px; overflow-x: auto; }
.rl-tabs button { height: 36px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: #57524a; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.rl-tabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.rl-tabs .c, .rl-chips .c { font: 12px var(--mono); opacity: .75; margin-left: 3px; }
.rl-chiprow { display: flex; gap: 18px; flex-wrap: wrap; }
.rl-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rl-chips .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.rl-chips button { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid #d8cfbf; background: #fff; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.rl-chips button.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.rl-body { display: flex; gap: 28px; align-items: flex-start; margin-top: 18px; }
.rl-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.rl-shown { margin: 0; font-size: 14px; color: var(--muted); }
.rl-day h3 { margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; font-size: 1.25rem; }
.rl-n { font: 12px var(--mono); font-weight: 400; color: var(--muted); }
.rl-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); overflow: hidden; }
.rl-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 10px 10px 14px; border-top: 1px solid #efe9de; cursor: pointer; }
.rl-row:first-child { border-top: 0; }
.rl-row.sel { background: var(--accent-soft); }
.rl-dot { width: 8px; height: 8px; margin-top: 9px; border-radius: 4px; flex-shrink: 0; background: var(--accent); border: 1px solid var(--accent); }
.rl-row.read .rl-dot { background: transparent; border-color: #cfc6b6; }
.rl-time { width: 44px; flex-shrink: 0; font: 13px var(--mono); color: var(--muted); padding-top: 3px; }
.rl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rl-title { font-family: var(--serif); font-size: 1.06rem; line-height: 1.35; font-weight: 600; color: var(--ink); text-decoration: none; }
.rl-title:hover { color: var(--accent); text-decoration: underline; }
.rl-row.read .rl-title { font-weight: 500; color: #57524a; }
.rl-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.rl-site { font: 12px var(--mono); padding: 1px 7px; border-radius: 4px; background: #ece7dd; color: #3b3832; }
.rl-site.s-sgit { background: #e8eefc; color: #1f3fa8; } .rl-site.s-rm { background: #fbeadc; color: #8a3210; }
.rl-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--accent); }
.rl-flag svg { width: 14px; height: 14px; }
.rl-flag.changed { font: 11px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
.rl-acts { display: flex; gap: 2px; flex-shrink: 0; }
.ib { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 0; background: transparent; color: #8a8375; cursor: pointer; }
.ib:hover { background: #f1ece2; }
.ib[data-act=star].on, .ib[data-a=star].on { color: #b45309; background: #fdf3e3; } .ib[data-act=star].on svg path, .ib[data-a=star].on svg path { fill: currentColor; }
.ib[data-act=up].on, .ib[data-a=up].on { color: var(--accent); background: #eef2fd; }
.ib[data-act=down].on, .ib[data-a=down].on { color: var(--warn); background: var(--warn-soft); }
.rl-empty { padding: 28px; text-align: center; border: 1px dashed #d8cfbf; border-radius: 10px; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0; font: inherit; cursor: pointer; }
.rl-side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
.rl-sel { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rl-sel.empty > :not(.rl-hint) { display: none; } .rl-sel:not(.empty) .rl-hint { display: none; }
.rl-hint { color: var(--muted); font-size: 14px; margin: 0; }
.rl-sel .ttl { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.rl-sel .mt { font-size: 13px; color: var(--muted); }
.row2 { display: flex; gap: 8px; }
.btn-p { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; border: 0; }
.btn-p:hover { color: #fff; filter: brightness(1.1); }
.btn-s { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid #d8cfbf; background: #fff; color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; cursor: pointer; }
.btn-s.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-s[data-a=up].on { border-color: var(--accent); background: var(--accent); }
.btn-s[data-a=down].on { border-color: var(--warn); background: var(--warn); }
.btn-s.grow { flex: 1; }
.rl-sel label, .fb-note label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.rl-sel textarea, .fb-note textarea, .rl-merge textarea { font: inherit; font-size: 14px; line-height: 1.45; padding: 10px 12px; border: 1px solid #d8cfbf; border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; }
.memo { border-style: dashed; }
.memo.rec { border: 1px solid #c2410c; background: #fdf0e6; color: #7c2d12; font-weight: 600; }
.memos { list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.memos audio { width: 100%; height: 32px; }
.rl-dev { background: #1b1a17; color: #f4efe6; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rl-dev .eb { display: flex; justify-content: space-between; font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #c9c1b3; }
.rl-dev .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rl-dev .stats b { display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.rl-dev .stats span { font-size: 12px; color: #c9c1b3; }
.rl-dev .note { font-size: 13px; color: #c9c1b3; margin: 0; }
.rl-dev .copy { min-height: 48px; border-radius: 8px; border: 0; background: #f4efe6; color: #1b1a17; font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rl-dev .ghost { flex: 1; min-height: 40px; border-radius: 8px; border: 1px solid #5a554b; background: transparent; color: #f4efe6; font: inherit; font-size: 13px; cursor: pointer; }
.rl-dev pre { margin: 0; max-height: 280px; overflow: auto; padding: 12px; border: 0; border-radius: 8px; background: #2a2823; color: #e8e1d4; font-size: 11.5px; white-space: pre-wrap; }
.rl-dev a { color: #c9d6ff; }
.rl-merge { display: flex; flex-direction: column; gap: 8px; }
.rl-dev .status { font-size: 13px; color: #f4efe6; margin: 0; min-height: 1em; }
.rl-dev .mini { display: none; }
@media (max-width: 899px) {
  .rl-body { display: block; }
  .rl-side { position: static; width: auto; }
  .rl-time { display: none; }
  .rl-acts .ib[data-act=up], .rl-acts .ib[data-act=down] { display: none; }
  .rl-row { padding: 12px; }
  .rl-sel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-radius: 16px 16px 0 0; max-height: 88vh; overflow-y: auto;
            box-shadow: 0 -8px 30px rgba(0,0,0,.25); transform: translateY(105%); transition: transform .2s ease; }
  html.rl-sheet-open .rl-sel { transform: none; }
  .rl-sel.empty { display: none; }
  .rl-dev { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; border-radius: 12px 12px 0 0; padding: 10px 14px 14px;
            max-height: 85vh; overflow-y: auto; box-shadow: 0 -6px 20px rgba(0,0,0,.2); }
  html.rl-sheet-open .rl-dev { display: none; }
  body:has([data-rl]) { padding-bottom: 76px; }
  .rl-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; min-width: 0; max-width: 100%; }
  .rl-chips button { flex-shrink: 0; }
  .rl-chiprow { flex-direction: column; gap: 10px; min-width: 0; }
  .rl-filters, .rl { min-width: 0; max-width: 100%; }
  .rl-dev:not(.open) > :not(.mini) { display: none; }
  .rl-dev .mini { display: flex; align-items: center; gap: 12px; }
  .rl-dev .mini div { flex: 1; font-size: 13px; color: #c9c1b3; } .rl-dev .mini b { display: block; color: #f4efe6; font-size: 14px; }
  .rl-dev .mini .copy { padding: 0 14px; min-height: 44px; }
}
@media (min-width: 900px) { .only-narrow { display: none !important; } }
.fb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; margin: 8px 0 4px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; font-size: 13px; }
.fb-bar .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 6px 0 4px; }
.fb-bar .btn-s { min-height: 40px; }
.fb-bar .sp { flex: 1; }
.fb-note { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.fb-bar .changed { font: 11px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
@media (prefers-color-scheme: dark) {
  .rl-chips button, .btn-s, .rl-sel textarea, .fb-note textarea, .rl-search { background: var(--paper); color: var(--ink); border-color: var(--rule); }
  .rl-tabs { background: #26241d; } .rl-tabs button { color: var(--muted); } .rl-tabs button.on { background: var(--paper); color: var(--ink); }
  .rl-row.read .rl-title { color: var(--muted); } .rl-row { border-top-color: var(--rule); } .ib:hover { background: #26241d; }
  .rl-site { background: #2c2a23; color: var(--ink); } .rl-site.s-sgit { background: #1f2640; color: #b9c9ff; } .rl-site.s-rm { background: #3a2616; color: #fdba74; }
}

/* ---- a source document sits on its own sheet of paper, so it is clearly the source, not the newsroom */
article.source { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 28px 36px 32px;
  box-shadow: 0 1px 2px rgba(27,26,23,.06), 0 8px 24px rgba(27,26,23,.06); margin: 12px 0 8px; }
article.source > :first-child { margin-top: 0; }
article.source blockquote, article.source pre, article.source table, article.source code { background: #faf8f4; }
@media (max-width: 600px) { article.source { padding: 18px 16px 20px; margin: 10px -8px; border-radius: 8px; } }
@media (prefers-color-scheme: dark) { article.source { background: #211f19; box-shadow: none; }
  article.source blockquote, article.source pre, article.source table, article.source code { background: #1a1914; } }
@media (max-width: 899px) {
  .rl-dev .mini { gap: 8px; } .rl-dev .mini div { min-width: 0; }
  .rl-dev .mini .ghost { flex: 0 0 auto; padding: 0 12px; min-height: 44px; }
  .rl-dev .mini .copy { flex: 0 0 auto; }
}

/* ---- vaults: cards, and a vault's app framed inside the newsroom ---------------------------------- */
ul.vcards { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.vcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vhead { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.vname { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.vwhat { margin: 0; font-size: .95rem; color: #3b3832; }
.vmeta { font-size: 13px; color: var(--muted); }
.vcard .btn-s, .vault-app { min-height: 38px; font-size: 13px; }
details.vkey summary { font-size: 13px; color: var(--muted); cursor: pointer; }
details.vkey code { display: block; margin-top: 6px; }
.vault-banner { background: #1b1a17; color: #f4efe6; border-radius: 12px; padding: 18px 22px; margin: 8px 0 10px; }
.vault-banner h1 { color: #fff; margin: 6px 0 4px; font-size: 1.9rem; }
.vault-banner p { margin: 6px 0; color: #e8e1d4; }
.vault-banner .vmeta { color: #c9c1b3; } .vault-banner code { background: #2a2823; border-color: #3a372f; color: #f4efe6; }
.vault-banner a { color: #c9d6ff; } .vault-banner details.vkey summary { color: #c9c1b3; }
.vb-tag { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: #f4efe6; color: #1b1a17; border-radius: 12px; padding: 3px 10px; }
.vb-tag svg { width: 14px; height: 14px; }
.vb-note { font-size: 14px; }
.vault-frame { border: 3px solid #1b1a17; border-radius: 12px; overflow: hidden; background: #fff; margin: 10px 0; }
.vf-top { display: flex; align-items: center; gap: 6px; background: #1b1a17; padding: 6px 10px 8px; }
.vf-dot { width: 10px; height: 10px; border-radius: 5px; background: #5a554b; }
.vf-addr { margin-left: 8px; font: 12px var(--mono); color: #c9c1b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-frame iframe { display: block; width: 100%; height: 82vh; min-height: 520px; border: 0; background: #fff; }

/* ---- the front page as a news magazine; cards; diagrams ------------------------------------------ */
.masthead { text-align: center; border-bottom: 3px double var(--ink); padding: 6px 0 12px; margin-bottom: 18px; }
.masthead h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0; letter-spacing: -.01em; }
.dateline { font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.kicker { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.by { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.unrev { color: var(--warn); }
.dek { margin: 6px 0 0; color: #3b3832; }
.fp-top { display: grid; grid-template-columns: 1fr; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .fp-top { grid-template-columns: 2fr 1fr; } }
.lead-story h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.12; margin: 4px 0 8px; }
.lead-story h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.lead-story h2 a:hover, .card h3 a:hover { color: var(--accent); text-decoration: underline; }
.lead-story .dek { font-size: 1.15rem; }
.fp-tops { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .fp-tops { border-left: 1px solid var(--rule); padding-left: 20px; } }
.fp-tops .card { border: 0; background: none; padding: 0 0 12px; border-bottom: 1px solid var(--rule); border-radius: 0; }
.fp-body { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 8px; }
@media (min-width: 900px) { .fp-body { grid-template-columns: 1fr 300px; } }
.fp-sec h2 { font-size: 1.35rem; border-top: 2px solid var(--ink); padding-top: 8px; margin: 22px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.fp-sec h2 .more, a.more { font: 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.card h3 { margin: 2px 0 0; font-size: 1.12rem; line-height: 1.3; }
.card-s h3 { font-size: 1.02rem; }
.fp-rail { display: flex; flex-direction: column; gap: 18px; }
.fp-rail section { border-top: 2px solid var(--ink); padding-top: 6px; }
.fp-rail h3 { font-size: 1.05rem; margin: 4px 0 8px; }
.fp-rail ul { padding-left: 1.1em; margin: 0 0 6px; font-size: .93rem; } .fp-rail ul.plain { list-style: none; padding: 0; }
.fp-rail ul.plain li { margin: 0 0 8px; } .briefs li { margin-bottom: 8px; }
figure.diagram { margin: 18px 0; padding: 12px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow-x: auto; }
figure.diagram pre.mermaid { background: none; border: 0; margin: 0; padding: 0; text-align: center; white-space: pre; }
figure.diagram svg { max-width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { figure.diagram { background: #1d1c16; } .dek { color: var(--ink); } }

/* ---- the back office: issues kanban ------------------------------------------------------------- */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 12px; }
.ik-col h2 { font-size: 1.1rem; border-top: 2px solid var(--ink); padding-top: 8px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.ik-n { font: 12px var(--mono); color: var(--muted); }
.ik-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ik-card { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid #cfc6b6; border-radius: 8px; padding: 8px 10px; font-size: .93rem; }
.ik-card.pri-high { border-left-color: var(--warn); } .ik-card.pri-medium { border-left-color: var(--accent); }
.ik-card.type-epic { background: var(--accent-soft); }
.ik-num { font: 12px var(--mono); color: var(--muted); }
.ik-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ik-epic { display: inline-block; margin-top: 4px; font: 11px var(--mono); color: var(--accent); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .9rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }

/* ---- pieces: the byline block and the sheet -------------------------------------------------------- */
.byline { margin: 4px 0 10px; }
.byline h1 { margin: 4px 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; }
.byline .dek { font-size: 1.15rem; margin: 0 0 12px; max-width: 46em; }
.byline-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px 20px; font-size: .9rem; color: var(--ink);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; }
.byline-who .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.byline-mission { margin: 2px 0 0; font-size: .85rem; color: var(--muted); font-style: italic; }
article.piece { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 28px 36px 32px; margin: 12px 0 8px;
  box-shadow: 0 1px 2px rgba(27,26,23,.06), 0 8px 24px rgba(27,26,23,.06); max-width: 52em; }
article.piece > :first-child { margin-top: 0; }
@media (max-width: 600px) { article.piece { padding: 18px 16px 20px; margin: 10px -8px; border-radius: 8px; } }
@media (prefers-color-scheme: dark) { article.piece { background: #211f19; box-shadow: none; } }

/* ---- the view switch, and what the reader's view hides --------------------------------------------- */
.views { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
.views .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.views button { font: inherit; font-size: 12px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid #d8cfbf; background: var(--paper); color: var(--ink); cursor: pointer; }
.views button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.views-read { margin-left: 8px; color: var(--muted); text-decoration: none; }
html.view-mine .rd.is-read { display: none !important; }
.hidden-clue { font: 12px var(--mono); color: var(--muted); padding: 6px 0; }
.hidden-clue a { color: var(--accent); }
html.view-mine .rd.is-read + .hidden-clue, .hidden-clue[hidden] { display: none; }
.rd.is-read .kicker::after { content: " · read"; color: var(--muted); }

/* ---- the front page, the approved layout -------------------------------------------------------- */
.masthead { text-align: center; padding: 8px 0 0; margin-bottom: 14px; border-bottom: 0; }
.masthead h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0; letter-spacing: -.015em; line-height: 1; }
.dateline { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 8px 0; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink);
  font: 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #3b3832; }
.band { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; padding: 8px 0 4px; font-size: 14px; font-weight: 600; }
.band a { text-decoration: none; color: var(--ink); } .band a:hover { color: var(--accent); }
.review-line { margin: 0 0 18px; padding: 8px 14px; border-radius: 8px; background: #f1ece2; font-size: 13px; color: #3b3832; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review-line a { font-weight: 600; }
.fp-top { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .fp-top { grid-template-columns: 2fr 1fr; gap: 32px; } .fp-side { border-left: 1px solid var(--rule); padding-left: 24px; } }
.lead-story h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.08; margin: 4px 0 8px; letter-spacing: -.01em; }
.lead-story h2 a, .card h3 a, .persp h2 a, .sig a, .ed { color: var(--ink); text-decoration: none; }
.lead-story h2 a:hover, .card h3 a:hover, .persp h2 a:hover, .sig a:hover { color: var(--accent); text-decoration: underline; }
.lead-story .dek { font-size: 1.15rem; }
.lead-map { margin: 14px 0 0; }
.lead-map figure.diagram { margin: 0; }
.lead-map figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.also { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.also-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.also-item a { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.25; color: var(--ink); text-decoration: none; }
.also-item a:hover { color: var(--accent); } .also-item span { display: block; font-size: 13px; color: var(--muted); }
.fp-side { display: flex; flex-direction: column; gap: 20px; }
.persp h2 { font-size: 1.55rem; line-height: 1.15; margin: 2px 0 6px; }
.persp .dek { font-size: .95rem; } .more-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.sigs { border-top: 2px solid var(--ink); padding-top: 8px; }
.sigs h3, .fp-rail h3, .week h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 1.15rem; margin: 4px 0 8px; }
.sig { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #efe9de; }
.sig:last-child { border-bottom: 0; }
.sig .route { font: 11px var(--mono); color: var(--muted); } .sig a { font-weight: 600; line-height: 1.35; font-size: .95rem; }
.week { margin: 24px 0 0; border-top: 2px solid var(--ink); padding-top: 8px; }
.week h2 { font-size: 1.35rem; }
.eds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.ed { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; }
.ed.today { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.ed-d { font: 11px var(--mono); color: var(--muted); } .ed.today .ed-d { color: var(--accent); }
.ed-bar { display: block; height: 6px; border-radius: 3px; background: #ece7dd; overflow: hidden; } .ed-bar span { display: block; height: 100%; background: var(--accent); }
.ed-t { font-family: var(--serif); font-weight: 600; line-height: 1.3; font-size: .95rem; }
.fp-body { margin-top: 8px; }
.fp-sec h2 { font-size: 1.35rem; }
.fp-rail section { border-top: 2px solid var(--ink); padding-top: 6px; }
.rr-item { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #efe9de; font-size: .92rem; }
.rr-item .t { width: 40px; flex-shrink: 0; font: 12px var(--mono); color: var(--muted); }
.rr-item a { font-weight: 500; line-height: 1.35; color: var(--ink); text-decoration: none; } .rr-item a:hover { color: var(--accent); }
.rr-item .m { display: block; font: 11px var(--mono); color: var(--muted); } .rr-item .m.s-sgit { color: #1f3fa8; } .rr-item .m.s-rm { color: #8a3210; }
.open-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.open-tiles a { display: flex; flex-direction: column; padding: 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.open-tiles a b { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; } .open-tiles a span { font-size: 12px; color: var(--muted); }
.open-tiles a.warm { background: var(--warn-soft); border-color: #f0cdb3; color: var(--warn); } .open-tiles a.warm span { color: var(--warn); }
.desk-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid #efe9de; }
.desk-row span { font: 12px var(--mono); color: var(--muted); text-align: right; }
@media (prefers-color-scheme: dark) { .review-line { background: #26241d; color: var(--ink); } .dateline { color: var(--muted); } .rr-item .m.s-sgit { color: #b9c9ff; } .rr-item .m.s-rm { color: #fdba74; } }

/* ---- markable sections, the source badge, sortable tables ---------------------------------------- */
section.sec { position: relative; padding: 4px 0 8px; border-bottom: 1px solid var(--rule); }
section.sec .rd-read { float: right; margin: 6px 0 6px 12px; font: inherit; font-size: 12px; min-height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid #d8cfbf; background: var(--paper); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
section.sec .rd-read.on { background: var(--ink); color: #fff; border-color: var(--ink); }
section.sec.is-read h3 { color: var(--muted); }
.open-tiles.wide4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); margin: 12px 0 8px; }
.src-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -12px -20px 18px; padding: 8px 14px; background: #fbeadc; border-bottom: 1px solid #f0cdb3; border-radius: 10px 10px 0 0; font-size: 13px; color: #7c2d12; }
.src-badge .src-dot { width: 10px; height: 10px; border-radius: 5px; background: #c2410c; flex-shrink: 0; }
.src-badge .src-what { flex-basis: 100%; font-size: 12px; color: #9a3412; }
.src-badge a { color: #7c2d12; }
@media (max-width: 600px) { .src-badge { margin: -6px -6px 14px; } }
@media (prefers-color-scheme: dark) { .src-badge { background: #3a2616; color: #fdba74; border-color: #5a3a24; } .src-badge .src-what, .src-badge a { color: #fdba74; } }
.img-missing { display: inline-block; padding: 2px 8px; border: 1px dashed #b9ae9a; border-radius: 6px; font-size: .9em; }
table.sortable th { cursor: pointer; user-select: none; } table.sortable th.sorted::after { content: " \25BE"; color: var(--accent); }
table.sortable th[data-asc="1"].sorted::after { content: " \25B4"; }
.brief-block article.piece { max-width: none; }
.msg { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 14px; margin: 10px 0; }
.msg.incoming { border-left-color: var(--ok, #2a7); }
.mono { font-family: var(--mono); }
.msg h3 { margin: 4px 0 6px; }

/* ---- the side pane: peek, notes, chat ------------------------------------------------------------ */
:root { --pane-w: 420px; }
.pane-rail { position: fixed; right: 0; top: 40%; z-index: 30; display: flex; flex-direction: column; gap: 4px; }
.pane-rail button { writing-mode: vertical-rl; transform: rotate(180deg); font: inherit; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 6px; min-width: 30px;
  border: 1px solid var(--rule); border-right: 0; border-radius: 0 8px 8px 0; background: var(--paper); color: var(--muted); cursor: pointer; }
.pane-rail button.on, .pane-rail button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
html.pane-open .pane-rail { right: var(--pane-w); }
.pane { position: fixed; top: 0; right: 0; bottom: 0; width: var(--pane-w); max-width: 92vw; z-index: 31; background: var(--paper); border-left: 1px solid var(--rule);
  box-shadow: -8px 0 24px rgba(27,26,23,.08); display: none; flex-direction: column; }
html.pane-open .pane { display: flex; }
html.pane-open main { margin-right: var(--pane-w); max-width: none; padding-left: 24px; padding-right: 24px; }
html.pane-open .fp-body, html.pane-open .fp-top { grid-template-columns: 1fr; }
.pane-handle { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; }
.pane-handle:hover { background: var(--accent-soft); }
body.dragging { user-select: none; cursor: col-resize; }
.pane-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.pane-tabs { display: flex; gap: 4px; }
.pane-tabs button { font: inherit; font-size: 13px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.pane-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pane-close { font: 20px/1 var(--sans); border: 0; background: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; }
.pane-body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pane-hint { margin: 0; font-size: 13px; color: var(--muted); }
.peek-bar { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.peek-bar .peek-title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
iframe.peek { flex: 1; min-height: 60vh; border: 1px solid var(--rule); border-radius: 8px; background: #fff; width: 100%; }
.peek-btn { font: 12px var(--mono); border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 3px; vertical-align: baseline; }
.peek-btn:hover { text-decoration: underline; }
.fb-bar.in-pane { flex-direction: column; align-items: stretch; margin: 0; }
.fb-bar.in-pane .sp { display: none; } .fb-bar.in-pane .btn-s, .fb-bar.in-pane .ib { justify-content: flex-start; }
.chat-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40vh; }
.chat-msg { padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; max-width: 95%; }
.chat-msg.user { align-self: flex-end; background: var(--ink); color: #fff; }
.chat-msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--rule); }
.chat-msg.sys { align-self: center; color: var(--muted); font-size: 12px; text-align: center; }
.chat-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #d8cfbf; border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; }
.chat-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; } .chat-row .btn-p { flex: 0 0 auto; padding: 0 16px; min-height: 38px; }
.chat-tier { font: 12px var(--mono); color: var(--muted); }
.chat-key summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.chat-key label { display: block; margin: 6px 0; } .chat-key input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #d8cfbf; border-radius: 6px; }
@media (prefers-color-scheme: dark) { .chat-form textarea, .chat-key input { background: var(--paper); color: var(--ink); border-color: var(--rule); } iframe.peek { background: #1d1c16; } }

html.embedded header.top, html.embedded footer, html.embedded .pane-rail, html.embedded .pane, html.embedded details.toc { display: none !important; }
html.embedded main { padding-top: 8px; }
.bcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; margin: 10px 0; }
.bcard { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; font-size: .92rem; }
.bcard .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.twin { margin-top: 24px; border-top: 2px solid var(--ink); padding-top: 8px; }
.twin h3 { font-size: 1rem; margin: 12px 0 4px; } .twin ul { margin: 0; padding-left: 1.1em; font-size: .92rem; }
.rl-site.s-nr { background: #e6f2ea; color: #166534; }
.shots { margin: 8px 0 10px; }
.shots .lbl { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.shot-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 4px; }
.shot { flex: 0 0 200px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--muted); font: 11px var(--mono); }
.shot img { width: 200px; height: 125px; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.shot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
