:root {
  --bg: #fff;
  --ink: #121212;
  --ink-2: #363636;
  --muted: #5a5a5a;
  --faint: #727272;
  --rule: #dfdfdf;
  --rule-strong: #121212;
  --chip: #f3f3f3;
  --accent: #326891;
  --red: #d0021b;
  --red-ink: #a3001a;
  --warn-bg: #fff8e6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Dark theme: follows the system unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --ink: #f2f2f2; --ink-2: #dcdcdc; --muted: #b0b0b0; --faint: #9a9a9a;
    --rule: #333; --rule-strong: #e6e6e6; --chip: #222; --accent: #78a9d1;
    --red: #ff4d5e; --red-ink: #ff6b7a; --warn-bg: #2a2412;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --ink: #f2f2f2; --ink-2: #dcdcdc; --muted: #b0b0b0; --faint: #9a9a9a;
    --rule: #333; --rule-strong: #e6e6e6; --chip: #222; --accent: #78a9d1;
    --red: #ff4d5e; --red-ink: #ff6b7a; --warn-bg: #2a2412;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { display: block; max-width: 100%; }
code { font-family: var(--mono); font-size: .85em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ico { width: 1em; height: 1em; fill: currentColor; vertical-align: -.12em; }
.muted { color: var(--faint); }

/* Editions bar */
.editions { border-bottom: 1px solid var(--rule); }
.editions-in { display: flex; justify-content: center; gap: 22px; padding-top: 7px; padding-bottom: 7px; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .07em; }
.editions a { color: var(--faint); }
.editions a:hover { color: var(--ink); text-decoration: none; }
.editions a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); padding-bottom: 2px; }
.editions [data-domestic-name] { text-transform: none; letter-spacing: 0; font-weight: 500; }
.edition-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -10px auto 22px; font: 13px var(--sans); color: var(--muted); }
.edition-note strong { color: var(--ink); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.edition-note a { margin-left: auto; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.picker-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 18px; background: var(--chip); font: 15px var(--sans); }
.picker-suggest .btn-primary { margin-left: auto; }
.picker-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 20px; }
.edition-src { flex-basis: 100%; font-size: 12px; color: var(--faint); order: 3; }
.has-local { color: var(--red); font-size: 9px; vertical-align: 3px; margin-left: 3px; }
.picker-legend { font: 13px var(--sans); margin: 18px 0 0; }
.picker-grid a { display: block; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }

/* Masthead */
.masthead { padding-top: 18px; }
.mast-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; }
.mast-side { display: flex; flex-direction: column; font-family: var(--sans); font-size: 12px; color: var(--ink-2); gap: 2px; padding-bottom: 10px; }
.mast-side strong { font-weight: 700; color: var(--ink); }
.mast-side.right { align-items: flex-end; text-align: right; }
.logo { font-family: var(--display); font-weight: 900; font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -.01em; color: var(--ink); text-align: center; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.rss-link { color: var(--ink); font-weight: 600; font-family: var(--sans); }
.mast-tools { display: flex; align-items: center; gap: 14px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px 4px 8px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.theme-toggle .to-light, :root[data-theme="dark"] .theme-toggle .to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .to-dark { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .to-light { display: inline; }
}
.mast-search { display: flex; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
.mast-search input { width: min(380px, 100%); font: 13px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 7px 10px; }
.mast-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* Section nav */
.nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule-strong); box-shadow: 0 3px 0 -2px var(--bg), 0 4px 0 -2px var(--rule-strong); margin-bottom: 24px; }
.nav-in { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; padding-top: 10px; padding-bottom: 10px; font-family: var(--sans); font-size: 13px; font-weight: 500; }
.nav a { color: var(--ink-2); white-space: nowrap; }
.nav a.on { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Story parts */
.kicker { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.summary { color: var(--muted); margin: 6px 0 8px; font-size: 15px; line-height: 1.45; }
.meta { font-family: var(--sans); font-size: 11px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.meta .src { font-weight: 700; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cve { font-family: var(--mono); font-size: 11px; background: var(--chip); color: var(--ink-2); padding: 2px 6px; border-radius: 2px; }
.cve.more { font-family: var(--sans); }
h1, h2, h3 { margin: 0; font-family: var(--serif); }
.label { font-family: var(--sans); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border-top: 1px solid var(--rule-strong); padding-top: 8px; margin-bottom: 14px; }
.label small { font-weight: 500; color: var(--faint); text-transform: none; letter-spacing: 0; margin-left: 6px; }

/* Front page top block */
.top { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); gap: 0; border-bottom: 1px solid var(--rule-strong); padding-bottom: 24px; margin-bottom: 28px; }
.top-main { padding-right: 24px; border-right: 1px solid var(--rule); }
.top-side { padding-left: 24px; }
.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.lead h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -.005em; }
.lead .summary { font-size: 16px; }
.lead-img img, .second-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--chip); }
.seconds { display: grid; grid-template-columns: 1fr 1fr; padding-top: 20px; }
.second { padding-right: 20px; }
.second + .second { padding-right: 0; padding-left: 20px; border-left: 1px solid var(--rule); }
.second-img { margin-bottom: 10px; }
.second h3 { font-size: 20px; line-height: 1.2; font-weight: 700; }
.brief { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.brief:first-of-type { padding-top: 0; }
.sidebar .brief h3 { font-size: 16px; }
.brief:last-child { border-bottom: 0; }
.brief h3 { font-size: 17px; line-height: 1.25; font-weight: 600; margin-bottom: 6px; }

/* Stream + sidebar */
.body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0; }
.stream { padding-right: 28px; border-right: 1px solid var(--rule); min-width: 0; }
.sidebar { padding-left: 28px; }
.section-head { border-bottom: 1px solid var(--rule-strong); padding-bottom: 14px; margin-bottom: 8px; }
.section-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 700; }
.section-head p { font-family: var(--sans); font-size: 13px; color: var(--faint); margin: 8px 0 0; }
.section-head .dek { font-family: var(--serif); font-size: 18px; color: var(--muted); max-width: 680px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.row:first-of-type { padding-top: 4px; }
.row h3 { font-size: 21px; line-height: 1.22; font-weight: 700; }
.row-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--chip); }
.row:not(:has(.row-img)) { grid-template-columns: 1fr; }
.empty { font-style: italic; color: var(--muted); padding: 30px 0; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; font-family: var(--sans); font-size: 13px; color: var(--faint); }
.pager a { color: var(--ink); font-weight: 700; }

.box { margin-bottom: 30px; }
.subscribe p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.subscribe code { display: block; background: var(--chip); padding: 8px 10px; word-break: break-all; }
.btns { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-family: var(--sans); font-size: 12px; }
.btns button, .btns a { font: 600 12px var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--rule-strong); border-radius: 3px; padding: 5px 10px; cursor: pointer; }
.btns button:hover, .btns a:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.cve-list { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.cve-list li { counter-increment: c; display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: 12px; color: var(--faint); }
.cve-list li::before { content: counter(c); font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink); width: 18px; }
.cve-list li > a:first-of-type { font-family: var(--mono); font-size: 13px; color: var(--ink); font-weight: 600; }
.cve-list .nvd { margin-left: auto; color: var(--accent); }

/* Feeds page */
.page { max-width: 860px; margin: 0 auto; }
.feed-block { margin: 30px 0; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.feed-list li > div:first-child { min-width: 0; }
.feed-list strong { font-size: 17px; }
.feed-list .muted { font-family: var(--sans); font-size: 12px; margin-left: 6px; }
.feed-list code { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.feed-list .btns { margin: 0; flex-shrink: 0; }
.howto table { border-collapse: collapse; width: 100%; font-size: 15px; }
.howto td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.howto td:first-child { white-space: nowrap; width: 90px; }
.howto a { color: var(--accent); overflow-wrap: anywhere; }

/* Footer */
.footer { border-top: 1px solid var(--rule-strong); margin-top: 40px; padding: 26px 0 40px; }
.logo-sm { font-size: 28px; display: inline-block; }
.footer-in { display: flex; justify-content: space-between; gap: 30px; margin-top: 10px; font-family: var(--sans); font-size: 12px; color: var(--faint); }
.footer-in p { margin: 0; max-width: 620px; line-height: 1.6; }
.footer-links { display: flex; gap: 18px; flex-shrink: 0; }
.footer-links a { color: var(--ink-2); font-weight: 600; }

/* Breaking news banner */
.breaking { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: -12px 0 24px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.breaking:hover { text-decoration: none; }
.breaking:hover .breaking-title { text-decoration: underline; }
.breaking-label { color: var(--red); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; gap: 7px; }
.breaking-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .breaking-label::before { animation: none; } }
.breaking-title { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ink); }
.breaking-latest { font-size: 14px; color: var(--ink-2); flex-basis: 100%; }
.breaking-latest time { color: var(--red-ink); font-weight: 600; margin-right: 6px; }
.breaking-more { font-size: 12px; font-weight: 700; color: var(--ink); margin-left: auto; }

/* Kickers for our own reporting */
.kicker.own { color: var(--red-ink); }
.kicker-sep { margin: 0 6px; color: var(--faint); font-size: 11px; }
.lead:not(:has(.lead-img)) { grid-template-columns: 1fr; }
.lead:not(:has(.lead-img)) h2 { font-size: clamp(28px, 3.4vw, 42px); }

/* Article page */
.article { max-width: 720px; margin: 10px auto 0; }
.article-head h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; margin: 6px 0 12px; }
.article-head .dek { font-size: 21px; line-height: 1.4; color: var(--muted); margin: 0 0 16px; }
.byline { font-family: var(--sans); font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 14px; border-top: 1px solid var(--rule); padding-top: 12px; margin: 0; }
.byline strong { color: var(--ink); }
.article-img { margin: 24px 0; }
.article-img img { width: 100%; }
.article-body { font-size: 19px; line-height: 1.65; margin-top: 24px; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font-size: 26px; margin: 1.4em 0 .5em; line-height: 1.2; }
.article-body h3, .article-body h4 { font-family: var(--sans); font-size: 18px; margin: 1.3em 0 .4em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote { margin: 1.2em 0; padding-left: 18px; border-left: 3px solid var(--ink); font-style: italic; color: var(--ink-2); }
.article-body pre { background: var(--chip); padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.article-body code { background: var(--chip); padding: 1px 4px; }
.article-body pre code { background: none; padding: 0; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body li { margin-bottom: .35em; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.article-foot { border-top: 1px solid var(--rule); margin-top: 30px; padding-top: 14px; }

/* Live updates timeline */
.live-on { color: var(--red); }
.timeline { list-style: none; margin: 26px 0 0; padding: 0; border-left: 2px solid var(--red); }
.timeline li { position: relative; padding: 0 0 26px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.timeline time { font-family: var(--sans); font-size: 12px; color: var(--faint); }
.timeline time strong { color: var(--red-ink); }
.timeline h2 { font-size: 21px; line-height: 1.3; margin-top: 4px; font-weight: 700; }
.timeline h2 a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.timeline .meta { margin-top: 4px; }

/* Story page (external article) */
.story { max-width: 720px; margin: 10px auto 0; }
.story-head h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; font-weight: 700; margin: 6px 0 14px; }
.story-img { margin: 22px 0; }
.story-img img { width: 100%; max-height: 420px; object-fit: cover; background: var(--chip); }
.story-summary { font-size: 20px; line-height: 1.6; margin: 22px 0; }
.story-summary p { margin: 0 0 10px; }
.story-note { font: 13px var(--sans); color: var(--faint); }
.story-facts { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.story-facts > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.label-sm { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-right: 6px; }
.chip { font: 600 12px var(--sans); padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; }
.chip:hover { border-color: var(--ink); text-decoration: none; }
.story-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 10px; padding: 22px; background: var(--chip); }
.btn-big { font-size: 16px; padding: 13px 22px; }
.story-url { flex-basis: 100%; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.story-url code { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.story-go .story-note { flex-basis: 100%; margin: 0; }
.story-related { margin-top: 34px; }

/* Leaving-site page */
.leave { max-width: 680px; margin: 30px auto 10px; }
.leave h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 4px 0 12px; }
.leave .dek { font-size: 18px; color: var(--muted); }
.leave-story { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 0; margin: 22px 0; }
.leave-story h2 { font-size: 22px; line-height: 1.25; margin-top: 6px; }
.leave .label { margin-top: 24px; }
.leave-url { display: block; background: var(--warn-bg); border: 1px solid var(--rule); padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere; line-height: 1.5; }
.leave-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 12px; }
.leave-count { font-family: var(--sans); font-size: 13px; color: var(--faint); }
.leave-count button { font: 600 13px var(--sans); background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.btn-primary, .btn-secondary { display: inline-block; font: 700 14px var(--sans); padding: 10px 18px; border-radius: 3px; cursor: pointer; border: 1px solid var(--ink); text-align: center; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-primary:hover, .btn-secondary:hover { text-decoration: none; opacity: .85; }

/* Admin */
.admin-bar { border-bottom: 1px solid var(--rule-strong); padding: 12px 0; }
.admin-bar-in { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.admin-tag { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--red-ink); }
.admin-bar nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font: 600 13px var(--sans); }
.admin-bar nav form { margin: 0; }
.admin-bar nav button, .link, .link-danger { font: 600 13px var(--sans); background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.link-danger { color: var(--red-ink); }
.admin-main { padding-top: 26px; padding-bottom: 60px; }
.admin-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; font-family: var(--sans); font-size: 13px; }
.admin-head h1 { font-size: 32px; }
.flash { font: 600 14px var(--sans); background: var(--chip); border-left: 3px solid var(--ink); padding: 10px 14px; }
.form-errors { font: 14px var(--sans); border-left: 3px solid var(--red); background: var(--warn-bg); padding: 8px 14px; margin-bottom: 18px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font: 600 13px var(--sans); }
.form label small { font-weight: 400; color: var(--faint); }
.form label.check { flex-direction: row; align-items: baseline; gap: 8px; font-weight: 500; flex-wrap: wrap; }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea { font: 15px var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 3px; padding: 9px 10px; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form .input-headline { font: 700 24px var(--serif) !important; }
.form .input-body { font: 16px/1.6 var(--serif) !important; }
.form button { align-self: flex-start; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-inline .grow { flex: 1 1 220px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; }
.form-side { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.form-preview { max-height: 160px; object-fit: cover; border: 1px solid var(--rule); }
.auth-box { max-width: 420px; margin: 30px auto; }
.auth-box h1 { font-size: 30px; margin-bottom: 10px; }
.auth-box .muted { font: 14px var(--sans); margin-bottom: 20px; }
.admin-section { margin-bottom: 36px; }
.section-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-row .label { flex: 1; }
.section-row .btn-primary { font-size: 12px; padding: 6px 12px; }
.admin-table { width: 100%; border-collapse: collapse; font: 14px var(--sans); }
.admin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule-strong); }
.admin-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.admin-table td.actions { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.admin-table td.actions form { margin: 0; }
.admin-table td.actions a { font-weight: 600; }
.pill { display: inline-block; font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 3px 7px; border-radius: 2px; background: var(--chip); color: var(--ink-2); }
.pill.on { background: var(--ink); color: var(--bg); }
.pill.live { background: var(--red); color: #fff; }
.admin-list { list-style: none; margin: 0; padding: 0; font: 14px var(--sans); }
.admin-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.admin-list li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.admin-list code { color: var(--muted); overflow-wrap: anywhere; }
.admin-list form { margin: 0; }
.admin-list.compact li { padding: 8px 0; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.form-inline .full { flex: 1 1 100%; }
.picked-story { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--chip); border-left: 3px solid var(--red); font: 14px var(--sans); }
.picked-story strong { font-family: var(--serif); font-size: 16px; line-height: 1.3; }
.btn-small { font-size: 12px !important; padding: 5px 10px !important; white-space: nowrap; }
.stories-filter { margin-bottom: 8px; }
.stories-count { font: 13px var(--sans); margin: 0 0 10px; }
.auto-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 30px; }
.small-head { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 0 0 6px; }
.small-head:not(:first-child) { margin-top: 20px; }
.muted.small { font: 12px/1.5 var(--sans); margin: 0; }
.label .pill { margin-left: 8px; vertical-align: 2px; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }
.add-admin { margin-top: 14px; font: 14px var(--sans); }
.add-admin summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
@media (max-width: 900px) {
  .form-grid, .cols-3 { grid-template-columns: 1fr; }
  .admin-table thead { display: none; }
  .admin-table tr { display: block; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .admin-table td { display: block; border: 0; padding: 3px 0; }
  .admin-table td.actions { justify-content: flex-start; }
}

/* 404 page */
.notfound { max-width: 680px; margin: 30px auto 0; text-align: center; }
.notfound-code { font-family: var(--display); font-weight: 900; font-size: clamp(90px, 18vw, 160px); line-height: .9; margin: 0; letter-spacing: -.02em; }
.notfound h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 14px 0 10px; }
.notfound .dek { font-size: 18px; color: var(--muted); margin: 0 auto 24px; max-width: 520px; }
.notfound-search { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.notfound-search input { flex: 1; min-width: 0; font: 15px var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 3px; padding: 9px 12px; }
.notfound-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.notfound-links { font: 600 13px var(--sans); margin: 16px 0 36px; }
.notfound-latest { text-align: left; }

/* Cookie notice */
.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--bg); border-top: 1px solid var(--rule-strong); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.cookie-notice[hidden] { display: none; }
.cookie-in { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.cookie-in p { margin: 0; font: 13px/1.5 var(--sans); color: var(--ink-2); flex: 1; }
.cookie-in p a { text-decoration: underline; color: var(--ink); }
.cookie-in .btn-primary { flex-shrink: 0; padding: 8px 18px; font-size: 13px; }
@media (max-width: 680px) { .cookie-in { flex-direction: column; align-items: stretch; gap: 10px; } }

/* Responsive */
@media (max-width: 980px) {
  .top { grid-template-columns: 1fr; }
  .top-main { padding-right: 0; border-right: 0; }
  .top-side { padding-left: 0; padding-top: 24px; }
  .body { grid-template-columns: 1fr; }
  .stream { padding-right: 0; border-right: 0; }
  .sidebar { padding-left: 0; padding-top: 30px; border-top: 1px solid var(--rule-strong); margin-top: 10px; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .mast-grid { grid-template-columns: 1fr; text-align: center; }
  .mast-side { display: none; }
  .mast-side.right { display: flex; align-items: center; padding-bottom: 0; }
  .mast-side.right .rss-link { display: none; }
  .nav-in { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .lead { grid-template-columns: 1fr; }
  .lead-img { order: -1; }
  .seconds { grid-template-columns: 1fr; }
  .second, .second + .second { padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .second:first-child { border-top: 0; padding-top: 0; }
  .row { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
  .row h3 { font-size: 18px; }
  .row .summary { display: none; }
  .footer-in { flex-direction: column; }
  .feed-list li { flex-direction: column; align-items: flex-start; }
}
