/* dagcore.net's fonts (the site's own files, served here: the CSP allows 'self' only) */
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-wght.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-600.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
/* dagcore-node admin: the brand theme (tokens.css + theme.css, from the
   theme package; theme.css also keeps the live-panel components the
   mockups do not cover) plus what the live panel needs. Fonts are served
   from this binary (no Google Fonts: the CSP allows nothing external), and
   the few inline styles of the theme's mockups are classes here. */

/* Geist (one file per weight, Latin and Latin Extended) and Geist Mono
   (split by subset), from @fontsource; OFL, licences in fonts/. */
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url(fonts/geist-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url(fonts/geist-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url(fonts/geist-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 700; font-display: swap; src: url(fonts/geist-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url(fonts/geist-mono-latin-400-normal.woff2) format("woff2");
  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: "Geist Mono"; font-weight: 400; font-display: swap; src: url(fonts/geist-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url(fonts/geist-mono-latin-500-normal.woff2) format("woff2");
  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: "Geist Mono"; font-weight: 500; font-display: swap; src: url(fonts/geist-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

html, body { margin: 0; min-height: 100%; background: var(--bg-000); }
[hidden] { display: none !important; }

/* The mockups' style="" attributes, as classes. */
.u-tag-block { display: inline-flex; margin: 0 0 var(--space-4); }
.u-mt3 { margin-top: var(--space-3); }
.u-mb2 { margin-bottom: var(--space-2); }
.u-sans { font-family: var(--font-sans) !important; }
.u-p0 { padding: 0 !important; }
.u-wrap { white-space: normal !important; overflow-wrap: anywhere; }
.u-start { align-self: start; }

/* Page tabs (the live panel has nine pages; the mockup had one). */
.dc-nav { display: flex; flex-wrap: wrap; gap: 2px; padding: var(--space-4) var(--space-6) 0; border-bottom: 1px solid var(--line-strong); }
.dc-nav a { padding: var(--space-2) var(--space-3); color: var(--ink-muted); text-decoration: none; font: 600 13px/18px var(--font-sans);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dc-nav a:hover { color: var(--ink); }
.dc-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--admin); background: var(--data-soft); }
.dc-nav a:focus-visible, .dc-btn:focus-visible { outline: 2px solid var(--admin-fill); outline-offset: 2px; }

/* A page-wide notice (a node that cannot be reached, an error). */
.dc-notice { display: flex; gap: var(--space-2); align-items: center; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-weight: 600; }
.dc-notice.ok { background: var(--ok-bg); color: var(--ok); }
.dc-notice.warn { background: var(--warn-bg); color: var(--warn); }
.dc-notice.crit { background: var(--crit-bg); color: var(--crit); }

/* Raw JSON on the detail pages. */
.dc-json { margin: 0; padding: var(--space-3); background: var(--bg-200); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  font: 12px/18px var(--font-mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.dc-log.tall { max-height: 640px; }
.dc-log div { white-space: pre-wrap; overflow-wrap: anywhere; }
.dc-table td { overflow-wrap: anywhere; }
.dc-chart text { user-select: none; }
/* Donut centre: the number alone on its line, smaller than the theme's
   20px so the widest value ("1023.9") keeps clear of the ring; the unit
   under it. */
.dc-chart .center-big { font: 500 16px var(--font-mono); font-variant-numeric: tabular-nums; }
.dc-chart .center-unit { fill: var(--ink-faint); font: 500 11px var(--font-mono); letter-spacing: .04em; }
.dc-kv dd { overflow-wrap: anywhere; }
.dc-band .dc-btn.secondary + .dc-btn.secondary { margin-left: calc(-1 * var(--space-2)); }

/* A long id (libp2p peer id): shortened like a hash; the full value on
   hover (title) or, without a hover, by tapping it (<details>), and
   selectable in one go. */
.dc-id summary { cursor: pointer; list-style: none; font: 12px/18px var(--font-mono); color: var(--ink); white-space: nowrap; }
.dc-id summary::-webkit-details-marker { display: none; }
.dc-id summary::after { content: " +"; color: var(--ink-faint); }
.dc-id[open] summary::after { content: " \2212"; }
.dc-id__full { display: block; margin-top: var(--space-1); max-width: 30ch; font: 11px/16px var(--font-mono); color: var(--ink-muted);
  white-space: normal; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* KPI tiles of equal height: each fills its grid cell (the row stretches
   them), the sparkline or capacity bar sits on the tile's base whatever the
   lines of text above it, so a row's graphs share one line; a tile with no
   graph (node uptime) keeps the row's height with its detail line at the
   base. The text keeps at least space-1 above the graph. */
.dc-kpi { height: 100%; }
.dc-kpi > .dc-spark { margin-top: auto; }
.dc-kpi > .dc-kpi__sub:not(:last-child) { margin-bottom: var(--space-1); }
.dc-kpi > .dc-kpi__sub:last-child { margin-top: auto; }

/* Live indicator (Peers, Logs): countdown, a bar draining over the 5 s
   refresh interval, a pulse when fresh data has come in, grey when paused. */
.dc-live { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  background: var(--bg-100); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-muted); font-size: 12px; }
.dc-live::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--ok); flex: none; }
.dc-live.paused::before { background: var(--ink-faint); }
.dc-live.paused { color: var(--ink-faint); }
.dc-live__bar { position: relative; width: 36px; height: 3px; border-radius: 2px; background: var(--bg-200); overflow: hidden; }
.dc-live__bar i { position: absolute; inset: 0; background: var(--data); transform-origin: left center; animation: dc-drain 5s linear forwards; }
.dc-live.paused .dc-live__bar { visibility: hidden; }
.dc-live.pulse { animation: dc-flash .7s ease-out; }
.dc-live.pulse::before { animation: dc-ping .7s ease-out; }
@keyframes dc-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes dc-flash { from { background: var(--ok-bg); } to { background: var(--bg-100); } }
@keyframes dc-ping { from { box-shadow: 0 0 0 0 var(--ok); } to { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .dc-live.pulse, .dc-live.pulse::before, .dc-live__bar i { animation: none; } }

/* Charts with history: the projection (dashed, the data colour: a trend
   carried forward, not data). */
.dc-chart .proj { fill: none; stroke: var(--data); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dc-legend .lproj { width: 14px; height: 0; border-top: 2px dashed var(--data); border-radius: 0; }

/* Display preferences (under the page title): number & date format, time zone. */
.dc-prefs { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-top: var(--space-3); }
.dc-pref { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 14px; color: var(--ink-muted); }
.dc-pref .dc-input { height: 30px; max-width: 220px; padding: 0 var(--space-2); font: 12px/1 var(--font-sans); }
@media (max-width: 720px) { .dc-prefs { justify-content: stretch; } .dc-pref { flex: 1 1 0; min-width: 0; } .dc-pref .dc-input { max-width: none; width: 100%; } }

/* Peers map: land, graticule, our node and the peers, all through tokens.
   --map-land: the land a step off the card's background (light: a touch
   darker than --bg-200; dark: a touch lighter), so continents read
   without competing with the markers. */
:root { --map-land: #e7ebf0; }
[data-theme="dark"] { --map-land: #13233d; }
#peers-attrib a { color: var(--data); }
/* Peers map: land, graticule, our node and the peers, all through tokens. */
.dc-mapwrap { overflow: hidden; border-radius: var(--radius-md); background: var(--bg-100); }
.dc-map .map-land { fill: var(--map-land); stroke: var(--line-strong); stroke-width: .6px; }
.dc-map .map-grid { stroke: var(--grid); stroke-width: .5px; }
.dc-map .map-link { stroke: var(--data); stroke-opacity: .3; stroke-width: .8px; }
.dc-map .map-peer { cursor: pointer; }
.dc-map .map-peer circle { stroke: var(--bg-100); stroke-width: .4; }
.dc-map .map-peer.in circle { fill: var(--cat-1); }
.dc-map .map-peer.out circle { fill: var(--cat-2); }
.dc-map .map-peer.mixed circle { fill: var(--cat-3); }
.dc-map .map-peer.sel circle, .dc-map .map-peer:focus-visible circle { stroke: var(--ink); stroke-width: .7; }
.dc-map .map-peer:focus { outline: none; }
.dc-map .map-count { fill: var(--bg-100); font: 600 2.4px var(--font-mono); pointer-events: none; }
.dc-map .map-self circle { fill: var(--admin-fill); }
.dc-map .map-self .ring { fill: none; stroke: var(--admin-fill); stroke-width: .5; }
.dc-maplegend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; margin-top: var(--space-3); font-size: 12px; }
.dc-legend .l2 { background: var(--cat-2); }
.dc-legend .lself { background: var(--admin-fill); border-radius: var(--radius-pill); }
.dc-table--pick tbody tr { cursor: pointer; }
.dc-table--pick tbody tr.dc-row-sel td { background: var(--data-soft); }

/* Peers: this node (SELF) in the table, the detail panel and the map. */
.dc-chip.self { color: var(--admin); background: var(--data-soft); box-shadow: inset 0 0 0 1px var(--admin); }
.dc-selfhead { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.dc-table--pick tbody tr.dc-self-row td { border-bottom: 2px solid var(--line-strong); }
.dc-map .map-self { cursor: pointer; }
.dc-map .map-self.sel .ring { stroke-width: .9; }
.dc-map .map-self:focus { outline: none; }

/* Peers: the Connection card as tall as the map's (desktop, side by side):
   the map alone sets the row's height (the side card contributes none:
   height 0, min-height 100% of its grid area), the side card's content at
   the top, its hint at the base, denser rows; it scrolls inside only if
   it still does not fit. Stacked layouts keep their own heights. */
.dc-peers-side .dc-card__body { display: flex; flex-direction: column; min-height: 0; }
#peers-detail { flex: 1; display: flex; flex-direction: column; }
.dc-detail { flex: 1; display: flex; flex-direction: column; }
.dc-detail__hint { margin: var(--space-3) 0 0; padding-top: var(--space-3); }
.dc-detail .dc-kv__row { padding: 5px 0; min-height: 30px; }
@media (min-width: 1101px) {
  .dc-peers-side { height: 0; min-height: 100%; }
  .dc-peers-side .dc-card__body { overflow: auto; }
  .dc-detail__hint { margin-top: auto; }
}

/* Peers map zoom and pan: + / − / reset in the map's corner; wheel zoom
   at the cursor, drag to pan (vertical swipes still scroll the page). */
.dc-mapbox { position: relative; }
.dc-mapwrap { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dc-mapwrap.dragging { cursor: grabbing; }
.dc-mapctl { position: absolute; top: var(--space-2); right: var(--space-2); display: flex; flex-direction: column; gap: 4px; }
.dc-mapbtn { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-100); color: var(--ink);
  border: 1px solid var(--control-border); border-radius: var(--radius-sm); font: 600 15px/1 var(--font-sans); cursor: pointer; box-shadow: var(--shadow-card); }
.dc-mapbtn:hover { background: var(--bg-200); }
.dc-mapbtn svg.ic { width: 15px; height: 15px; }
.dc-mapbtn:focus-visible { outline: 2px solid var(--admin-fill); outline-offset: 2px; }
.dc-maphint { margin-left: auto; }

/* Key/value rows, each laid out on its own: label left, value right; a row
   that does not fit side by side is stacked (label, then the value across
   the full width). The theme's grid look (rule between rows, mono values)
   is kept. */
.dc-kv.dc-kv--rows { display: block; }
.dc-kv__row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-4); min-height: 38px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dc-kv__row:last-child { border-bottom: 0; }
.dc-kv--rows .dc-kv__row dt, .dc-kv--rows .dc-kv__row dd { padding: 0; min-height: 0; border-bottom: 0; }
.dc-kv--rows .dc-kv__row dt { flex: 1 1 auto; min-width: 0; }
.dc-kv--rows .dc-kv__row dd { flex: 0 0 auto; max-width: 100%; margin-left: auto; padding-left: 0; overflow-wrap: anywhere; } /* not enough room beside the label: onto the next line, right-aligned */
.dc-kv__row.wide { flex-direction: column; align-items: stretch; gap: 2px; }
.dc-kv__row.wide dd { margin-left: 0; justify-content: flex-start; text-align: left; }

/* Header: the alarm badge (a link to the Alarms page) and the watchdog's
   state, beside the overall state. */
.dc-alarmbadge { text-decoration: none; cursor: pointer; }
.dc-alarmbadge:focus-visible { outline: 2px solid var(--admin-fill); outline-offset: 2px; }
.dc-wdchip { white-space: nowrap; }
/* the session's time and the state's label never wrap: the instance name
   gives way first (it ends in an ellipsis) */
.dc-band__user, .dc-band__state-label { white-space: nowrap; }
.dc-band__id { flex: 1 1 auto; }
@media (max-width: 720px) { .dc-band__state { flex-wrap: wrap; } }

/* Overview: System resources as three radial gauges (the Disk donut's
   ring), the arc coloured by level through the status tokens. */
.dc-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.dc-gauge { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); min-width: 0; }
.dc-gauge .dc-chart { width: 100%; max-width: 150px; }
.dc-gauge__label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; color: var(--ink-muted); text-align: center; }
.dc-chart .seg.lvl-ok { stroke: var(--ok); } .dc-chart .seg.lvl-warn { stroke: var(--warn); } .dc-chart .seg.lvl-crit { stroke: var(--crit); }
.dc-chart .seg.lvl-rest { stroke: transparent; }
.dc-restrend { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.dc-restrend__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.dc-chart .line.s2 { stroke: var(--cat-2); stroke-width: 1.5; }
.dc-chart .line.s3 { stroke: var(--cat-3); stroke-width: 1.5; }
.dc-restrend .dc-legend .l2 { height: 3px; border-radius: 2px; width: 14px; }
.dc-restrend .dc-legend .l3 { height: 3px; border-radius: 2px; width: 14px; }
.dc-restrend .dc-legend .ldata { width: 14px; }
/* A donut card beside a taller card: its content centred in the height it
   is given (a donut cannot grow taller without growing wider). */
.dc-card__body:has(> .dc-disk--centre), .dc-card__body:has(> div > .dc-disk--centre) { display: flex; flex-direction: column; justify-content: center; }
.u-pad { padding: var(--space-4); margin: 0; }

/* Control (phase 2) */
.dc-ro.on { color: var(--admin); box-shadow: inset 0 0 0 1px var(--admin); background: var(--data-soft); }
.dc-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0; }
.dc-btn--secondary { background: var(--bg-100); color: var(--ink); border: 1px solid var(--control-border); }
.dc-btn--warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.dc-btn--crit { background: var(--crit-bg); color: var(--crit); border: 1px solid var(--crit); }
.dc-btn:disabled { opacity: .5; cursor: not-allowed; }
.dc-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-top: 6px solid var(--admin-fill);
  border-radius: var(--radius-md); background: var(--bg-100); color: var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.dc-dialog::backdrop { background: rgba(10, 13, 16, .55); }
.dc-dialog__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.dc-dialog__title { margin: 0; font: 600 18px/24px var(--font-sans); overflow-wrap: anywhere; }
.dc-dialog__body p { margin: 0; }
.dc-dialog__msg { color: var(--crit); min-height: 1em; }
.dc-dialog__actions { display: flex; justify-content: flex-end; gap: var(--space-2); }

@media (max-width: 720px) {
  .dc-nav { padding: var(--space-3) var(--space-4) 0; }
  #theme { display: none; }
}

/* Lag to quorum: zero = the tip (strong), above = behind the peers
   (amber), below = ahead of them (green), beyond the limit (red); a band
   from the lowest to the highest point of each interval, its median the
   line. */
/* The lag chart in the theme's language: the median in the logo's
   gradient with its glow, the interval's range a light blue band; red only
   for what goes over the limit (a state), the zone above it hatched. */
.dc-lag .lag-band { stroke: none; fill: var(--data); opacity: .13; }
.dc-lag .lag-band.over { fill: var(--crit); opacity: .18; }
.dc-lag .lag-band.partial { opacity: .07; }
.dc-lag .lag-glow { fill: none; stroke: var(--brand-bright); stroke-width: 9; opacity: .14; stroke-linejoin: round; stroke-linecap: round; }
.dc-lag .lag-med { fill: none; stroke: url(#dcLine); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.dc-lag .lag-med.over { stroke: var(--crit); }
.dc-lag .lag-med.partial { stroke-dasharray: 3 3; stroke-width: 1.75; }
.dc-lag .lag-zero { stroke: var(--ink-faint); stroke-width: 1; }
.dc-lag .lag-zero-label { fill: var(--ink); font: 600 11px var(--font-sans); }
.dc-lag .lag-side { fill: var(--ink-faint); font: 11px var(--font-sans); }
.dc-lag .lag-limit { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dc-lag .dot.over { fill: var(--crit); }
.dc-laglegend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); align-items: center; font-size: 12px; margin-top: var(--space-2); }
.dc-legend .llagmed { width: 16px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright)); }
.dc-legend .llagpart { width: 16px; height: 0; border-top: 2px dashed var(--data); border-radius: 0; }
.dc-legend .llagband { width: 16px; height: 10px; border-radius: 2px; background: var(--data); opacity: .25; }

/* The brand theme on the live panel. The band is navy now: what used it
   as a soft tint (active tab, selected row, self chip) takes data-soft
   instead (above). */
.dc-band .dc-chip.neutral { color: var(--on-night); background: transparent; box-shadow: inset 0 0 0 1px var(--on-night-muted); }
.dc-band__logo { height: 40px; }
/* The live panel's page head, tabs and grid sit in the theme's .dc-page
   (it gives the side padding); the tabs take none of their own there. */
.dc-page > .dc-nav { padding-left: 0; padding-right: 0; }
/* Links inside cards ("System page", "Logs", …) in the data colour, readable
   in both themes (the browser default blue is not, on the dark cards). */
.dc-card a { color: var(--data); }
/* Login (the "Pro" template): a card centred on navy, the overview's live
   DAG drawn faint along the bottom (LOGIN_DAG in app.js, from
   /api/v1/login-dag), refreshed while the page is shown. */
.dc-lp { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--brand-night); color: var(--on-night); }
.dc-lp::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--brand-deep), var(--brand-bright), var(--brand-cyan)); z-index: 2; }
.dc-lp__glow { position: absolute; left: 50%; top: 46%; width: 900px; height: 640px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-deep) 38%, transparent), transparent); pointer-events: none; }
.dc-lp__grid { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--on-night) 10%, transparent) 1px, transparent 1.2px); background-size: 24px 24px; pointer-events: none; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
/* The login's DAG: sized to its box by app.js (no clipping at any width),
   in colours that stand off the navy: cyan blue set, coral red set, the
   chain in the brand gradient, the edges a faint light. */
.dc-lp { --lp-blue: #5fe0f5; --lp-red: #ff8a65; --lp-edge: rgba(232, 240, 255, .22); }
.dc-lp .dc-dag { position: absolute; left: 0; right: 0; bottom: 0; height: 260px; background: transparent; border: 0; border-radius: 0; opacity: .85; }
.dc-lp .dc-dag svg.canvas { height: 100%; }
.dc-lp .dc-dag .gdot, .dc-lp .dc-dag .canvas > rect { fill: none; }
.dc-lp .dc-dag .e { stroke: var(--lp-edge); }
.dc-lp .dc-dag .e.chain { stroke: url(#dcChainWide); stroke-width: 3; }
.dc-lp .dc-dag .n.blue { fill: var(--lp-blue); stroke: var(--brand-night); stroke-width: 2; }
.dc-lp .dc-dag .n.red { fill: var(--lp-red); stroke: var(--brand-night); stroke-width: 2; }
.dc-lp .dc-dag .n.ours { fill: var(--on-night); stroke: var(--brand-night); }
.dc-lp .dc-dag .ours-ring { stroke: var(--on-night); }
.dc-lp .dc-dag .tip { fill: #ffffff; stroke: var(--brand-cyan); stroke-width: 3; }
.dc-lp .dc-dag .tip-halo { fill: var(--brand-cyan); opacity: .3; }
.dc-lp .dc-dag .pulse { stroke: var(--brand-cyan); }
.dc-lp .dc-dag .now, .dc-lp .dc-dag .tick, .dc-lp .dc-dag text { display: none; }

.dc-lp__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-8); }
.dc-lp__word { display: block; height: 34px; width: auto; }
.dc-lp__role { display: flex; align-items: center; gap: var(--space-3); font-size: 13px; color: var(--on-night-muted); }
.dc-lp__tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-3); background: var(--admin-fill); color: var(--admin-ink); border-radius: var(--radius-sm); font: 700 12px/1 var(--font-sans); letter-spacing: .18em; }
.dc-lp__tag svg.ic { width: 14px; height: 14px; stroke-width: 2.2; }

.dc-lp__main { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: var(--space-4) var(--space-4) var(--space-8); }
.dc-lp__card { width: 100%; max-width: 440px; background: var(--bg-100); color: var(--ink); border-radius: var(--radius-xl); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 80px -20px rgba(0,8,40,.65), 0 0 0 1px rgba(95,224,245,.10); overflow: hidden; }
.dc-lp__inst { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-6) var(--space-8) var(--space-4); }
.dc-lp__inst img { display: block; flex: none; }
.dc-lp__inst-name { margin: 0; font: 600 17px/22px var(--font-mono); }
.dc-lp__inst-sub { margin: 2px 0 0; display: flex; align-items: center; gap: var(--space-2); font-size: 12px; color: var(--ink-muted); }
.dc-lp__inst .dc-chip { margin-left: auto; }
.dc-lp__body { padding: var(--space-4) var(--space-8) var(--space-6); border-top: 1px solid var(--line); }
.dc-lp__h { margin: var(--space-2) 0 var(--space-1); font: 600 24px/30px var(--font-sans); letter-spacing: -.01em; }
.dc-lp__lead { margin: 0 0 var(--space-6); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.dc-lp__field { display: flex; flex-direction: column; gap: 6px; }
.dc-lp__label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; }
.dc-lp__label span { font-weight: 400; font-size: 12px; color: var(--ink-faint); }
.dc-lp__input { position: relative; }
.dc-lp__input .dc-input { width: 100%; height: 48px; padding-left: 42px; padding-right: 48px; font-size: 16px; letter-spacing: .28em; border-radius: var(--radius-md); }
.dc-lp__input .lead-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.dc-lp__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: pointer; }
.dc-lp__eye:hover { background: var(--bg-200); }
.dc-lp__hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--warn); }
.dc-lp__hint svg.ic { width: 14px; height: 14px; }
.dc-lp .dc-btn.primary { margin-top: var(--space-4); height: 48px; border-radius: var(--radius-md); }
.dc-lp .dc-msg { margin-top: var(--space-4); min-height: 0; }
.dc-lp .dc-msg.err { align-items: center; }
.dc-lp .dc-msg.err .cd { margin-left: auto; font: 500 13px/1 var(--font-mono); padding: 6px 8px; border-radius: var(--radius-sm); background: var(--bg-100); color: var(--crit); }
.dc-lp__foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-8) var(--space-6); font-size: 12px; color: var(--on-night-muted); }
.dc-lp__foot .dc-example { color: var(--on-night-muted); border-color: color-mix(in srgb, var(--on-night-muted) 60%, transparent); }

@media (max-width: 720px) {
  .dc-lp__top { padding: var(--space-6) var(--space-4) var(--space-3); }
  .dc-lp__word { height: 26px; }
  .dc-lp__role span.txt { display: none; }
  .dc-lp__main { padding: var(--space-2) var(--space-3) var(--space-6); }
  .dc-lp__inst, .dc-lp__body { padding-left: var(--space-4); padding-right: var(--space-4); }
  .dc-lp__foot { padding: var(--space-3) var(--space-4) var(--space-6); }
  .dc-lp .dc-dag { height: 180px; }
}
.dc-btn.primary[disabled] { background: var(--bg-200); color: var(--ink-faint); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: not-allowed; }

/* The charts' paint servers (index.html): an SVG of no size, its stops
   coloured from the tokens, so the gradients follow the theme. */
.dc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.dc-defs .s-deep { stop-color: var(--brand-deep); }
.dc-defs .s-bright { stop-color: var(--brand-bright); }
.dc-defs .s-cyan { stop-color: var(--brand-cyan); }
.dc-defs .s-area-top { stop-color: var(--brand-bright); stop-opacity: .32; }
.dc-defs .s-area-bot { stop-color: var(--brand-bright); stop-opacity: 0; }
.dc-defs .s-sweep-in { stop-color: var(--brand-cyan); stop-opacity: 0; }
.dc-defs .s-sweep-out { stop-color: var(--brand-bright); stop-opacity: .16; }
.dc-defs .gdot { fill: var(--line-strong); }
.dc-defs .hatch-line { stroke: var(--warn); stroke-width: 1; opacity: .35; }

/* The dashboard. The instrument as a grid item (the theme gives it a top
   margin of its own); the DAG drawn in once: a refresh moves it on without
   animating it again. */
.dc-grid .dc-inst { margin-top: 0; }
.dc-dag.settled .e, .dc-dag.settled .n, .dc-dag.settled .ours-ring { animation: none; opacity: 1; stroke-dashoffset: 0; }
.dc-pipe__node.crit { border-color: var(--crit); color: var(--crit); }
.dc-pipe__node.neutral { border-color: var(--control-border); color: var(--ink-muted); }
.dc-spark .seg.off { fill: var(--bg-200); }
.dc-spark .cap-warn { fill: var(--warn); }
.dc-chart .area, .dc-spark .area { fill: url(#dcArea); }
.dc-chart .hitbox { fill: transparent; }
.dc-chart .off { opacity: 0; }
.dc-tl__strip i.none { background: var(--line); opacity: 1; }
.dc-log div.w, .dc-log div.e { color: var(--ink); }
.dc-log .m { color: var(--data); white-space: pre; }
.dc-ovlog { max-height: none; }
.dc-radar { max-width: 320px; margin: 0 auto; }
.dc-legend--center { justify-content: center; margin-top: var(--space-2); }
.dc-chart rect.c1 { fill: url(#dcNode); }
.dc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; animation: dc-blink 2s ease-in-out infinite; }
.dc-tail { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); }
.dc-ovlog div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .dc-dot { animation: none; } }
/* The band's background runs the full width; its content keeps to the page's
   width (.dc-page: at most 1440px, centred, the same side padding). */
.dc-band { padding-left: max(var(--space-6), calc((100% - 1440px) / 2 + var(--space-6))); padding-right: max(var(--space-6), calc((100% - 1440px) / 2 + var(--space-6))); }
@media (max-width: 720px) { .dc-band { padding-left: var(--space-4); padding-right: var(--space-4); } }
/* The band's state chips at one height (the overall state is a large chip;
   the watchdog's and the alarms' take its height). */
.dc-band__state .dc-chip { height: 30px; padding: 0 var(--space-3); font-size: 12px; }
/* Phone: the logo and Log out on the first row, the state under them. */
@media (max-width: 720px) {
  .dc-band .dc-btn.secondary + .dc-btn.secondary.dc-band__logout { order: 2; margin-left: auto; }
  .dc-band__state { order: 3; flex: 1 1 100%; flex-wrap: wrap; }
}

/* Section headings on the System page: a little air and a hairline between
   the groups of cards. */
.dc-section { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.dc-section:first-child { padding-top: 0; border-top: 0; }
.dc-section__title { margin: 0; font: 600 13px/18px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.dc-section__sub { font-size: 12px; color: var(--ink-faint); }
.dc-chart .line.s4 { stroke: var(--cat-4); stroke-width: 1.5; }
.dc-inst.dc-inst--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dc-inst.dc-inst--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* narrower: four cells two by two (the theme's three-column borders undone) */
@media (max-width: 1180px) {
  .dc-inst.dc-inst--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-inst--4 .dc-inst__cell, .dc-inst--2 .dc-inst__cell { border-right: 1px solid var(--line); border-bottom: 0; }
  .dc-inst--4 .dc-inst__cell:nth-child(2n), .dc-inst--2 .dc-inst__cell:last-child { border-right: 0; }
  .dc-inst--4 .dc-inst__cell:nth-last-child(n+3) { border-bottom: 1px solid var(--line); }
}
.u-nowrap { white-space: nowrap; }
/* Peers: a slow peer (ping above SLOW_PING_MS) has its row tinted; the picked row keeps its own */
.dc-table--pick tbody tr.dc-row-slow td { background: color-mix(in srgb, var(--warn-bg) 45%, var(--bg-100)); }
.dc-table--pick tbody tr.dc-row-slow.dc-row-sel td { background: var(--data-soft); }

/* State colours for a split whose parts must not be confused (the Dials
   card): green, red, yellow, blue, as fills (the theme's --warn is a text
   colour, too dark for a fill: a brighter yellow here). */
:root { --fill-ok: #2f9e44; --fill-crit: #d63a2f; --fill-warn: #f0b400; --fill-info: var(--data); }
[data-theme="dark"] { --fill-ok: #3fe08a; --fill-crit: #f4a29c; --fill-warn: #f2c66d; --fill-info: var(--data); }
.dc-chart .seg.k-ok { stroke: var(--fill-ok); } .dc-disk__sw.k-ok { background: var(--fill-ok); }
.dc-chart .seg.k-crit { stroke: var(--fill-crit); } .dc-disk__sw.k-crit { background: var(--fill-crit); }
.dc-chart .seg.k-warn { stroke: var(--fill-warn); } .dc-disk__sw.k-warn { background: var(--fill-warn); }
.dc-chart .seg.k-info { stroke: var(--fill-info); } .dc-disk__sw.k-info { background: var(--fill-info); }
.dc-chart rect.k-ok { fill: var(--fill-ok); } .dc-chart rect.k-info { fill: var(--fill-info); }
.dc-legend .k-ok { background: var(--fill-ok); } .dc-legend .k-info { background: var(--fill-info); }
/* the connection manager's low water: the trim's floor, quieter than its high water */
.dc-chart .thresh-low { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dc-chart .thresh-low-label { fill: var(--ink-muted); font: 600 11px var(--font-sans); }
.dc-chart rect.k-warn { fill: var(--fill-warn); } .dc-chart rect.k-crit { fill: var(--fill-crit); }
.dc-legend .k-warn { background: var(--fill-warn); } .dc-legend .k-crit { background: var(--fill-crit); }

/* Alarms & watchdog: one card per condition the watchdog tracks */
.dc-conds { display: flex; flex-direction: column; gap: var(--space-3); }
.dc-cond { border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-md); background: var(--bg-200); padding: var(--space-3) var(--space-4); }
.dc-cond--warn { border-left-color: var(--warn); }
.dc-cond--crit { border-left-color: var(--crit); }
.dc-cond__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.dc-cond__name { font-weight: 600; color: var(--ink); }
.dc-cond__tag { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--bg-100); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dc-cond__msg { margin-top: var(--space-3); color: var(--ink); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.dc-cond__msg ul { margin: var(--space-1) 0 0; padding-left: var(--space-4); }
.dc-cond__msg li { margin: 2px 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }

/* dagcore.net/node: the overall state badges, moved from the panel's band to a row under the site's header */
.dc-staterow { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin: 0 0 var(--space-3); }
.dc-intro h1 { margin: 0; font: 600 20px/28px var(--font-sans); color: var(--ink); }
.dc-intro p { margin: 2px 0 0; max-width: 72ch; color: var(--ink-muted); font-size: 13px; line-height: 20px; }
.dc-pagehead h2#page-title { margin: 0; font: 600 24px/30px var(--font-sans); letter-spacing: -.01em; }
.dc-staterow .dc-band__state { color: var(--ink-muted); }
