/* raddish.io/news (Daily Raddish). Builds on /stats/stats.css: its tokens, fonts, top bar, .wrap, .page-head, footer. */
.news .eyebrow { font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); margin: 0 0 8px; }
.news-wrap { max-width: 760px; padding-bottom: 24px; }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.post-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.post-card h2 { margin: 6px 0 8px; font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent-soft); }
.post-card .summary { margin: 0; color: var(--muted); }
.empty { color: var(--muted); }

.kicker { font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-soft); margin: 0; }
.kicker a { color: inherit; text-decoration: none; }
.draft-tag { color: var(--orange); }
.draft-banner { border: 1px solid var(--orange); color: var(--orange); border-radius: 12px; padding: 10px 14px; margin: 16px 0; font-size: 14px; }

.post header { margin: 24px 0 8px; }
.post h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.03em; margin: 10px 0 12px; }
.post .dek { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 13px var(--mono); color: var(--muted); margin: 0; }
.byline b { color: var(--ink); font-weight: 600; }
.post-card .byline { margin-top: 12px; }
.avatar { border-radius: 50%; border: 1px solid var(--line); object-fit: cover; flex: none; }

.post-body { font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 14px; }
.post-body h2 { font-size: 22px; letter-spacing: -0.02em; margin: 30px 0 8px; }
.post-body h3 { font-size: 18px; margin: 24px 0 6px; }
.post-body a { color: var(--accent-soft); }
.post-body code { font-family: var(--mono); font-size: 0.88em; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.post-body blockquote { margin: 20px 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--ink); }
/* Pictures in the body (`![alt](file)`): full column width, never wider than the picture's own 600px layout. */
.post-figure { margin: 24px auto; max-width: 600px; }
.post-figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.post-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
/* X post cards (`::: x`): shaped like X's light embed, drawn by us with no script from X; the whole card links to the post. */
.post-body a.xcard { display: block; max-width: 550px; margin: 24px auto; padding: 16px 16px 12px; background: #fff; border: 1px solid #cfd9de; border-radius: 12px;
  color: #0f1419; text-decoration: none; font: 400 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.post-body a.xcard:hover { background: #f7f9f9; }
.post-body a.xcard:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 2px; }
.xcard-head { display: flex; align-items: center; gap: 10px; }
.xcard-pic { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; background: #cfd9de; }
.xcard-initial { display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #0f1419; text-transform: uppercase; }
.xcard-who { display: flex; flex-direction: column; min-width: 0; }
.xcard-name { display: flex; align-items: center; gap: 3px; min-width: 0; }
.xcard-name b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcard-check { width: 18px; height: 18px; flex: none; }
.xcard-handle { color: #536471; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcard-follow { color: #006fd6; font-weight: 700; }
.xcard-logo { margin-left: auto; align-self: flex-start; font-size: 26px; line-height: 1; color: #0f1419; }
.post-body .xcard-text { margin: 12px 0 0; padding: 0; border: 0; font-size: 17px; line-height: 1.32; color: #0f1419; overflow-wrap: anywhere; }
.post-body .xcard-text p { margin: 0 0 16px; }
.post-body .xcard-text p:last-child { margin-bottom: 0; }
.xcard-media { display: block; margin-top: 12px; border: 1px solid #cfd9de; border-radius: 16px; overflow: hidden; }
.xcard-media img { display: block; width: 100%; height: auto; }
.xcard-date { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #cfd9de; color: #536471; }
.xcard-date svg { width: 20px; height: 20px; flex: none; }
.xcard-actions { display: flex; gap: 22px; padding: 10px 0 8px; color: #536471; font-weight: 700; font-size: 14px; }
.xcard-actions > span { display: inline-flex; align-items: center; gap: 6px; }
.xcard-actions svg { width: 20px; height: 20px; }
.xcard-btn { display: block; margin-top: 4px; text-align: center; padding: 6px 16px; border: 1px solid #cfd9de; border-radius: 9999px; color: #006fd6; font-weight: 700; font-size: 14px; }
.post-body a.xcard:hover .xcard-btn { background: #e8f5fd; }
@media (max-width: 400px) { .xcard-copy { display: none !important; } }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin: 4px 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
/* Override the tracker's number tables (right-aligned, no wrapping, mono first column): prose tables wrap. */
.post-body th, .post-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: normal; }
.post-body td:first-child { font-family: var(--sans); font-weight: 600; color: var(--ink); min-width: 9em; }
.post-body th { font: 500 12px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.post-body tr:last-child td { border-bottom: 0; }

.back { margin: 32px 0 0; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }

/* --- Cards with a picture on the left (the original card look otherwise unchanged) --- */
.post-card.has-thumb { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: start; }
.thumb { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--navy); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-text { min-width: 0; }
.new-tag { color: var(--ok); }
.featured-tag { color: var(--orange); }
@media (max-width: 560px) {
  /* phones: headline first, then the picture full width, then the summary and byline */
  .post-card.has-thumb { display: flex; flex-direction: column; gap: 0; padding: 18px; }
  .post-card.has-thumb .card-text { display: contents; }
  .post-card.has-thumb .kicker { order: 1; }
  .post-card.has-thumb h2 { order: 2; }
  .post-card.has-thumb .thumb { order: 3; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; margin: 6px 0 12px; }
  .post-card.has-thumb .summary { order: 4; }
  .post-card.has-thumb .byline { order: 5; }
}

/* the post page's artwork */
.post-hero { margin: 20px 0 30px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--navy); }
.post-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* citations: raised numbers in the text, the Sources list at the end */
sup.cite { font-size: 0.68em; line-height: 0; vertical-align: super; margin-left: 1px; scroll-margin-top: 90px; }
sup.cite a { font: 600 1em var(--mono); color: var(--accent-soft); text-decoration: none; padding: 0 2px; border-radius: 4px; }
sup.cite a:hover, sup.cite a:focus-visible, sup.cite:target a { background: rgba(181,36,127,0.35); color: var(--ink); }
.cites { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.post-body .cites h2 { font: 500 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.cites ol { padding-left: 26px; margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.cites li { margin: 6px 0; padding: 2px 6px; border-radius: 8px; scroll-margin-top: 90px; }
.cites li::marker { font-family: var(--mono); color: var(--accent-soft); }
.cites li:target { background: rgba(181,36,127,0.18); color: var(--ink); }
.backref, .backref a { color: var(--accent-soft); text-decoration: none; font-size: 0.95em; }

/* --- The post editor (G9 draft preview only: news-editor.mjs) --- */
.editor-bar { margin: 16px 0; }
.editor-bar .btn, .editor-actions button { display: inline-block; font: 600 14px var(--sans); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; text-decoration: none; cursor: pointer; margin: 0 8px 8px 0; }
.editor-actions button.primary { background: var(--accent); border-color: var(--accent); }
.editor-bar .btn:hover, .editor-actions button:hover { border-color: var(--accent-soft); }
.saved-banner { border: 1px solid var(--ok); color: var(--ok); border-radius: 12px; padding: 10px 14px; margin: 16px 0; font-size: 14px; }
.editor { display: grid; gap: 14px; margin: 8px 0 24px; }
.editor label { display: grid; gap: 6px; font: 500 13px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.editor label.check { display: flex; align-items: center; gap: 8px; }
.editor .hint { font: 400 13px var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); }
.editor input, .editor textarea, .editor select { font: 400 16px var(--sans); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box; text-transform: none; letter-spacing: 0; }
.editor input[type=checkbox] { width: auto; }
.editor textarea.body-box { font: 400 15px/1.55 var(--mono); min-height: 60vh; resize: vertical; }
.editor input:focus, .editor textarea:focus, .editor select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.editor-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.editor-row .grow { grid-column: span 2; }
.editor-error { border: 1px solid #ff5d6c; color: #ff8a95; border-radius: 12px; padding: 10px 14px; margin: 0; }
.editor-notice { border: 1px solid var(--orange); color: var(--orange); border-radius: 12px; padding: 10px 14px; margin: 16px 0 0; font-size: 14px; }
.editor-help { font-size: 14px; color: var(--muted); }
.editor-help summary { cursor: pointer; color: var(--accent-soft); }
.editor-help code { font-size: 0.9em; }
.editor-below { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.theirs { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.5 var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
@media (max-width: 560px) { .editor-row .grow { grid-column: auto; } }
