/* feeds – newsprint paper, ink, and one signal colour (burnt orange, the RSS colour taken darker); amber/red for problems. Archivo. */
@font-face { font-family: Archivo; src: url(fonts/archivo-latin.woff2) format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Archivo; src: url(fonts/archivo-latin-ext.woff2) format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f5f3ef; --sheet: #ffffff; --ink: #1d2321; --muted: #636b68; --rule: #e2ded6; --rule-strong: #c9c3b8;
  --signal: #b34a10; --signal-soft: #f8e9df; --amber: #946000; --amber-soft: #f8efd9; --red: #b3261e; --red-soft: #fbe6e4;
  --ok: #2c7a45; --ok-soft: #e3f1e7; --radius: 6px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171614; --sheet: #211f1c; --ink: #ebe7e1; --muted: #a39d94; --rule: #36322d; --rule-strong: #4d4740;
    --signal: #f08a4b; --signal-soft: #3a2518; --amber: #e7b24a; --amber-soft: #3a2d14; --red: #f0827a; --red-soft: #3d1c1a;
    --ok: #6fcf8e; --ok-soft: #1b3324; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171614; --sheet: #211f1c; --ink: #ebe7e1; --muted: #a39d94; --rule: #36322d; --rule-strong: #4d4740;
  --signal: #f08a4b; --signal-soft: #3a2518; --amber: #e7b24a; --amber-soft: #3a2d14; --red: #f0827a; --red-soft: #3d1c1a;
  --ok: #6fcf8e; --ok-soft: #1b3324; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 Archivo, system-ui, sans-serif; background: var(--paper); color: var(--ink); }
a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-stretch: 112%; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; margin-top: 1.2em; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

header.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-stretch: 125%; font-size: 19px; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { padding: 6px 12px; border-radius: 99px; color: var(--muted); font-weight: 600; }
nav.main a.on { background: var(--signal-soft); color: var(--signal); }
nav.main a:hover { text-decoration: none; color: var(--ink); }
.top .spacer { flex: 1; }
.jobs-pill { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.jobs-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

main.page { max-width: 1320px; margin: 0 auto; padding: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.card.link { color: inherit; display: block; transition: border-color .15s; }
.card.link:hover { border-color: var(--signal); text-decoration: none; }
.card .dom { font-weight: 700; font-stretch: 112%; font-size: 17px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 26px; font-weight: 750; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); }
.stat.warn .v { color: var(--amber); }
.stat.bad .v { color: var(--red); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 18px 0 14px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--signal); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

button, .btn { font: inherit; font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--rule-strong);
  background: var(--sheet); color: var(--ink); cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--ink); }
button.primary { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
button.danger { color: var(--red); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); color: var(--ink); }
textarea { width: 100%; min-height: 120px; font-family: ui-monospace, monospace; font-size: 12.5px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.f input, label.f textarea, label.f select { color: var(--ink); }
form.stack { display: grid; gap: 12px; }

.table-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--paper); position: sticky; top: 0; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--signal-soft) 45%, transparent); }
td.url { max-width: 420px; word-break: break-all; }
td.url .sub { color: var(--muted); font-size: 12px; }
.clickable { cursor: pointer; }

.tag { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 99px; background: var(--paper); border: 1px solid var(--rule); color: var(--muted); margin: 1px 2px 1px 0; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tag.sig { background: var(--signal-soft); border-color: transparent; color: var(--signal); }
.tag.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.tag.bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.tag.lang { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: lowercase; letter-spacing: .02em; }

.meter { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.meter i { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: var(--rule); position: relative; overflow: hidden; }
.meter i b { position: absolute; inset: 0 auto 0 0; background: var(--signal); }
.meter.risk i b { background: var(--amber); }
.meter.risk.high i b { background: var(--red); }

.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(120px, 260px) 1fr 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar .track { height: 10px; background: var(--rule); border-radius: 5px; overflow: hidden; }
.bar .track b { display: block; height: 100%; background: var(--signal); }
.bar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; }
.note { background: var(--signal-soft); border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; }
.note.warn { background: var(--amber-soft); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

dialog { border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); color: var(--ink); padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgb(0 0 0 / .35); }
dialog .dh { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--sheet); }
dialog .db { padding: 16px 18px; }
dl.kv { display: grid; grid-template-columns: 190px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sheet); padding: 10px 16px; border-radius: var(--radius); font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); }

body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-box { width: 100%; max-width: 400px; background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--signal); border-radius: var(--radius); padding: 28px; }
.auth-box h1 { font-size: 26px; }
.auth-box form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.auth-box label { font-size: 14px; color: var(--muted); }
.auth-box button { background: var(--ink); color: var(--sheet); border: 0; padding: 10px; }

@media (max-width: 700px) {
  header.top { padding: 10px 16px; gap: 10px; }
  main.page { padding: 16px; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { margin-top: 6px; }
  .bar { grid-template-columns: 110px 1fr 50px; }
  h1 { font-size: 23px; }
}
.jobs-pill[hidden] { display: none; }

/* ---- feeds additions ---- */
nav.main { overflow-x: auto; scrollbar-width: none; }
nav.main a { white-space: nowrap; }
.kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dot-s { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); vertical-align: 1px; margin-right: 6px; }
.dot-s.ok { background: var(--ok); } .dot-s.failing { background: var(--amber); } .dot-s.blocked { background: var(--red); } .dot-s.gone { background: var(--muted); }
.feedlist { display: grid; gap: 0; }
.feedlist .it { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.feedlist .it:last-child { border-bottom: 0; }
.feedlist .it a.t { color: var(--ink); font-weight: 600; }
.feedlist .it a.t:hover { color: var(--signal); }
.feedlist .m { font-size: 12.5px; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.article-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; max-height: 520px; overflow: auto; background: var(--paper); border-radius: var(--radius); padding: 14px 16px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 40px; }
.spark i { flex: 1; background: var(--signal); opacity: .8; border-radius: 1px 1px 0 0; min-height: 1px; }
.secret { font-family: ui-monospace, monospace; font-size: 13px; background: var(--paper); border: 1px dashed var(--signal); border-radius: var(--radius); padding: 10px 12px; word-break: break-all; user-select: all; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
pre.code { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.diff del { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
.diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; }
iframe.mail { width: 100%; height: 560px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
h1 .sub { font-weight: 400; color: var(--muted); font-size: .6em; font-stretch: 100%; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 700px) { header.top .spacer { display: none; } nav.main { order: 3; width: 100%; } td.url { max-width: 220px; } .hide-m { display: none; } }
dl.endpoints { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); margin: 12px 0; }
dl.endpoints code, td code, .kv code { word-break: break-all; }
.filters select, .filters input { max-width: 100%; }
@media (max-width: 700px) { nav.main { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; } dl.endpoints { grid-template-columns: 1fr; } .filters input[type=search] { min-width: 0 !important; width: 100%; } }
@media (max-width: 700px) { table.settings tr { display: grid; grid-template-columns: 1fr; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  table.settings td { display: block; width: auto !important; border: 0; padding: 3px 10px; } table.settings input { width: 100%; } }
/* ---- charts (dataviz reference palette, validated on #fff and #211f1c) ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948; --critical: #d03b3b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767; } }
:root[data-theme="dark"] { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767; }
.chart { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h3 { margin: 0; }
.chart-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i, .chart-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart-plot svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart-plot .grid { stroke: var(--rule); stroke-width: 1; }
.chart-plot .axis { stroke: var(--rule-strong); stroke-width: 1; }
.chart-plot .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-plot .dlabel { fill: var(--ink); font-size: 12px; font-weight: 650; }
.chart-plot .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-plot .dot { stroke: var(--sheet); stroke-width: 2; }
.chart-tip { position: absolute; z-index: 10; pointer-events: none; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 6px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: 0 4px 14px rgb(0 0 0 / .14); min-width: 140px; white-space: nowrap; }
.chart-tip .tt-h { font-weight: 700; margin-bottom: 4px; }
.chart-tip .tt-sum { border-top: 1px solid var(--rule); margin-top: 4px; padding-top: 4px; }
.chart-table { max-height: 300px; overflow: auto; }
.hbars { display: grid; gap: 4px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 64px; gap: 10px; align-items: center; font-size: 13px; padding: 2px 0; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 10px; }
.hbar .track b { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.hbar:hover { background: color-mix(in srgb, var(--signal-soft) 50%, transparent); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 14px; margin-top: 14px; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 6px 12px; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.seg a.on { background: var(--ink); color: var(--sheet); }
.seg a:hover { text-decoration: none; }
header.top { gap: 16px; }
nav.main { gap: 0; }
nav.main a { padding: 6px 9px; font-size: 14.5px; }

/* item images */
.gallery .lead { display: block; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.gallery .lead img { display: block; width: 100%; max-height: 440px; object-fit: contain; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.gallery .thumb { display: block; aspect-ratio: 1; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.gallery .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery a:hover { border-color: var(--signal); }
/* public start page (today's items, no login) */
main.page.public { max-width: 980px; }
.public-head { margin-bottom: 6px; }
.public-head p { margin: 0; }
header.top .login { margin-left: auto; }
a.btn:hover { text-decoration: none; border-color: var(--ink); }
.public .filters input[type=search] { flex: 1 1 260px; min-width: 200px; }
.public .feedlist .it a.t { overflow-wrap: anywhere; }
.more-row { justify-content: center; padding-top: 12px; }
.more-row:has(button[hidden]) { display: none; }
.public .card { padding-top: 6px; }
@media (max-width: 700px) { .public .filters select { flex: 1 1 140px; min-width: 0; } }
