/* News.NetWorkXXIII.de status page: additions on top of https://NetWorkXXIII.de/site.css.
   Uses the main site's tokens only. Red stays reserved for the brand; the chart series colours below
   are the one exception to "no hex values", validated for colour-vision deficiencies on --panel. */

:root {
  --series-1: #338ced;
  --series-2: #e76624;
  --series-3: #00a888;
  --series-4: #d28e05;
  --series-5: #e24d8b;
  --series-6: #0aac23;
  --series-7: #9887ef;
  --series-8: #eb6263;
}

main { padding-block: 8px 48px; }
section.wrap { scroll-margin-top: 16px; }
.page-head { padding-block: 28px 12px; display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: .02em; overflow-wrap: anywhere; }
.page-head p { margin: 0; }
.lead { font-size: 17px; margin: 0 0 8px; max-width: 70ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; border-bottom: 1px solid var(--line); margin: 36px 0 16px; }
.section-head .section-title { border: 0; margin: 0; padding-bottom: 8px; }
.section-head p { margin: 0 0 8px; }
.section-title { font-size: 22px; letter-spacing: .04em; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.block-title { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.block .block-title + .small { margin-top: 0; }
.block ul + .block-title { margin-top: 20px; }
.block { margin-bottom: 28px; min-width: 0; }
.block > p { max-width: 75ch; }
.notice { margin: 8px 0 20px; padding: 10px 14px; border-left: 3px solid var(--warn); background: var(--panel); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mono { overflow-wrap: anywhere; }

nav.main.news-nav { margin-right: auto; }
nav.main.news-nav a { display: inline-flex; align-items: center; min-height: 44px; }

.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 32px; }

/* headline figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--panel-grad); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.stat-label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--fg); }
.stat-value .pill { font-size: 13px; padding: 3px 9px; vertical-align: middle; }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th { font-family: var(--mono); font-weight: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg2); }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data tfoot td, table.data tfoot th { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
table.data .n { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mid { font-family: var(--mono); font-size: 13px; white-space: normal; overflow-wrap: anywhere; min-width: 18ch; }
table.data .empty { color: var(--muted); text-align: center; padding: 18px 12px; white-space: normal; }
table.data th[scope="row"] { font-weight: normal; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: baseline; }
.state { display: inline-flex; align-items: center; gap: 6px; }

/* charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px 32px; }
.chart { margin: 0; position: relative; min-width: 0; }
.chart figcaption { display: grid; gap: 2px; margin-bottom: 8px; }
.chart .chart-title { font-size: 14px; color: var(--fg); }
.chart .chart-sub { font-size: 13px; color: var(--muted); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.chart .bar { transition: opacity .15s; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus-visible { outline: none; }
.chart .hit:focus-visible, .chart .hit.active { fill: color-mix(in srgb, var(--fg) 7%, transparent); }
.chart .empty-msg { fill: var(--muted); font-family: var(--body-face); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; }
.chart-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.tip { position: absolute; z-index: 2; pointer-events: none; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; min-width: 150px; box-shadow: 0 6px 18px rgb(0 0 0 / .35); }
.tip[hidden] { display: none; }
.tip .tip-head { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-bottom: 4px; }
.tip .tip-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .tip-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.tip .tip-row span { display: inline-flex; align-items: center; color: var(--muted); }
.tip .line-key { display: inline-block; width: 12px; height: 2px; margin-right: 6px; border-radius: 1px; }
details.chart-table { margin-top: 8px; font-size: 13px; }
details.chart-table summary { cursor: pointer; color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
details.chart-table .table-scroll { max-height: 320px; overflow: auto; margin-top: 6px; }

/* spool meters */
.buffers { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.buffer { display: grid; grid-template-columns: 3ch 1fr auto; gap: 4px 12px; align-items: center; font-size: 14px; }
.buffer .name { font-family: var(--mono); color: var(--muted); }
.buffer .meter { height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 16%, var(--panel)); overflow: hidden; }
.buffer .meter span { display: block; height: 100%; background: var(--accent); border-radius: 2px; min-width: 2px; }
.buffer .val { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; text-align: right; }
.buffer .detail { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); margin-top: -2px; }

/* counters */
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; }
.counters div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.counters dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.counters dd { margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }

/* lists and snippets */
.raw-list, .facts, .peer-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.raw-list a { font-family: var(--mono); }
.facts li::marker, .raw-list li::marker, .peer-list li::marker { color: var(--muted); }
.snippets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.snippet { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; display: flex; flex-direction: column; }
.snippet figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); min-height: 44px; }
.snippet pre { margin: 0; padding: 12px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--fg); flex: 1; }
.snippet .btn { padding: 6px 10px; min-height: 36px; }

@media (max-width: 640px) {
  header.top .wrap { grid-template-columns: auto 1fr; }
  nav.main.news-nav { flex-wrap: nowrap; justify-content: flex-end; gap: 0; margin-right: 0; }
  nav.main.news-nav a { padding-inline: 7px; font-size: 12px; letter-spacing: .05em; }
  .counters { grid-template-columns: 1fr; }
  .stat-value { font-size: 22px; }
}

@media (forced-colors: active) {
  .key, .line-key, .buffer .meter span, .chart .bar { forced-color-adjust: none; }
}
