/* 2008 portal chrome, 2026 layout: blue by day, the colours of Synthwave '84
   by night. The scheme follows the system unless scheme.js has set
   data-scheme on the root from the reader's choice. */

:root {
    color-scheme: light dark;
    --sans: "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", "DejaVu Sans", Verdana, sans-serif;
    --display: "Trebuchet MS", "Lucida Grande", "DejaVu Sans", sans-serif;
    --mono: "DejaVu Sans Mono", Menlo, Consolas, ui-monospace, monospace;
    --desk: #dfe6ee;
    --page: #ffffff;
    --card: #ffffff;
    --panel-a: #fbfcfd;
    --panel-b: #e9eef3;
    --rule: #c9d4df;
    --rule-soft: #e3e9ef;
    --rule-hover: #8fb3d6;
    --btn-rule: #9fb6cc;
    --ink: #1d2733;
    --ink-soft: #5a6878;
    --ink-faint: #8a97a6;
    --head: #14304d;
    --head-2: #1f4a75;
    --link: #2f6aa3;
    --label: #2f6aa3;
    --strong: #1f4a75;
    --on-strong: #ffffff;
    --strong-a: #2a5f93;
    --strong-b: #3b78b3;
    --on-pressed: #ffffff;
    --neon: #2f6aa3;
    --mast-a: #14304d;
    --mast-b: #1f4a75;
    --mast-ink: #ffffff;
    --mast-rule: #1f4a75;
    --logo-shadow: 0 1px 0 rgba(0, 0, 0, .35);
    --dial: radial-gradient(circle at 35% 30%, #fff, #cfe0f1 60%, #8fb3d6);
    --dial-hand: #14304d;
    --tab-bg: linear-gradient(#4f82b3, #2f6aa3 50%, #285d90 51%, #2a6398);
    --tab-bg-hover: linear-gradient(#5c90c2, #3a77b2 50%, #326ca3 51%, #3570a8);
    --tab-ink: #ffffff;
    --badge-top: #fff8c9;
    --badge-bot: #fde58a;
    --badge-rule: #e0bd3e;
    --badge-ink: #6b4b00;
    --tick: #6b4b00;
    --bar-a: #5c90c2;
    --bar-b: #2f6aa3;
    --ok: #2e8b3e;
    --ok-bg: #e4f4e3;
    --ok-rule: #b9dfb9;
    --warn: #b7791f;
    --warn-bg: #fdf3dc;
    --warn-rule: #f0d79d;
    --note-ink: #7a5310;
    --bad: #c0392b;
    --bad-bg: #fbe5e2;
    --bad-rule: #efb9b2;
    --zebra: #f7f9fb;
    --well: #f3f6f9;
    --hover-bg: #eaf2fa;
    --shine: #ffffff;
    --sheet-shadow: 0 2px 10px rgba(20, 48, 77, .08);
    --glow: none;
    --plot-filter: none;
    --plot-blend: normal;
}

:root[data-scheme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
    :root:not([data-scheme="light"]) {
        --desk: #171520;
        --page: #262335;
        --card: #241b2f;
        --panel-a: #34294f;
        --panel-b: #2a2139;
        --rule: #4a4072;
        --rule-soft: #352c52;
        --rule-hover: #ff7edb;
        --btn-rule: #5a4d8a;
        --ink: #f4f0ff;
        --ink-soft: #b9b3d9;
        --ink-faint: #848bbd;
        --head: #ff7edb;
        --head-2: #fede5d;
        --link: #36f9f6;
        --label: #b893ce;
        --strong: #f92aad;
        --on-strong: #171520;
        --strong-a: #ff7edb;
        --strong-b: #f92aad;
        --on-pressed: #171520;
        --neon: #f92aad;
        --mast-a: #171520;
        --mast-b: #3a1a5e;
        --mast-ink: #ffffff;
        --mast-rule: #f92aad;
        --logo-shadow: 0 0 10px rgba(249, 42, 173, .8), 0 0 2px rgba(255, 255, 255, .4);
        --dial: linear-gradient(#fede5d, #ff7edb 60%, #f92aad);
        --dial-hand: #241b2f;
        --tab-bg: linear-gradient(#4a3a7a, #3a2d63 50%, #2f2452 51%, #34295a);
        --tab-bg-hover: linear-gradient(#5a4890, #463777 50%, #3a2d63 51%, #40326c);
        --tab-ink: #f4f0ff;
        --badge-top: #fede5d;
        --badge-bot: #f97e72;
        --badge-rule: #c96a4a;
        --badge-ink: #2a1039;
        --tick: #fede5d;
        --bar-a: #36f9f6;
        --bar-b: #03b8c9;
        --ok: #72f1b8;
        --ok-bg: rgba(114, 241, 184, .12);
        --ok-rule: rgba(114, 241, 184, .4);
        --warn: #fede5d;
        --warn-bg: rgba(254, 222, 93, .10);
        --warn-rule: rgba(254, 222, 93, .4);
        --note-ink: #fede5d;
        --bad: #fe4450;
        --bad-bg: rgba(254, 68, 80, .14);
        --bad-rule: rgba(254, 68, 80, .45);
        --zebra: rgba(255, 255, 255, .035);
        --well: rgba(255, 255, 255, .06);
        --hover-bg: rgba(255, 126, 219, .14);
        --shine: rgba(255, 255, 255, .07);
        --sheet-shadow: 0 0 24px rgba(249, 42, 173, .14);
        --glow: 0 0 10px rgba(255, 126, 219, .55);
        --plot-filter: invert(1) hue-rotate(180deg);
        --plot-blend: screen;
    }
}

:root[data-scheme="dark"] {
    color-scheme: dark;
    --desk: #171520;
    --page: #262335;
    --card: #241b2f;
    --panel-a: #34294f;
    --panel-b: #2a2139;
    --rule: #4a4072;
    --rule-soft: #352c52;
    --rule-hover: #ff7edb;
    --btn-rule: #5a4d8a;
    --ink: #f4f0ff;
    --ink-soft: #b9b3d9;
    --ink-faint: #848bbd;
    --head: #ff7edb;
    --head-2: #fede5d;
    --link: #36f9f6;
    --label: #b893ce;
    --strong: #f92aad;
    --on-strong: #171520;
    --strong-a: #ff7edb;
    --strong-b: #f92aad;
    --on-pressed: #171520;
    --neon: #f92aad;
    --mast-a: #171520;
    --mast-b: #3a1a5e;
    --mast-ink: #ffffff;
    --mast-rule: #f92aad;
    --logo-shadow: 0 0 10px rgba(249, 42, 173, .8), 0 0 2px rgba(255, 255, 255, .4);
    --dial: linear-gradient(#fede5d, #ff7edb 60%, #f92aad);
    --dial-hand: #241b2f;
    --tab-bg: linear-gradient(#4a3a7a, #3a2d63 50%, #2f2452 51%, #34295a);
    --tab-bg-hover: linear-gradient(#5a4890, #463777 50%, #3a2d63 51%, #40326c);
    --tab-ink: #f4f0ff;
    --badge-top: #fede5d;
    --badge-bot: #f97e72;
    --badge-rule: #c96a4a;
    --badge-ink: #2a1039;
    --tick: #fede5d;
    --bar-a: #36f9f6;
    --bar-b: #03b8c9;
    --ok: #72f1b8;
    --ok-bg: rgba(114, 241, 184, .12);
    --ok-rule: rgba(114, 241, 184, .4);
    --warn: #fede5d;
    --warn-bg: rgba(254, 222, 93, .10);
    --warn-rule: rgba(254, 222, 93, .4);
    --note-ink: #fede5d;
    --bad: #fe4450;
    --bad-bg: rgba(254, 68, 80, .14);
    --bad-rule: rgba(254, 68, 80, .45);
    --zebra: rgba(255, 255, 255, .035);
    --well: rgba(255, 255, 255, .06);
    --hover-bg: rgba(255, 126, 219, .14);
    --shine: rgba(255, 255, 255, .07);
    --sheet-shadow: 0 0 24px rgba(249, 42, 173, .14);
    --glow: 0 0 10px rgba(255, 126, 219, .55);
    --plot-filter: invert(1) hue-rotate(180deg);
    --plot-blend: screen;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 13px/1.45 var(--sans);
    color: var(--ink);
    background:
        linear-gradient(var(--mast-a), var(--mast-b) 89px, var(--mast-rule) 89px, var(--mast-rule) 92px, var(--desk) 92px) no-repeat,
        var(--desk);
}

a { color: var(--link); }

/* --- masthead ---------------------------------------------------------- */

.masthead {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    color: var(--mast-ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
}

.logo .dial {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--dial);
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .3);
    position: relative;
}

.logo .dial::before,
.logo .dial::after {
    content: "";
    position: absolute;
    left: 14px;
    bottom: 15px;
    width: 2px;
    background: var(--dial-hand);
    transform-origin: bottom center;
    border-radius: 1px;
}

.logo .dial::before { height: 10px; transform: rotate(40deg); }
.logo .dial::after { height: 7px; transform: rotate(-70deg); }

.logo b {
    font: bold 22px/1 var(--display);
    letter-spacing: -.5px;
    text-shadow: var(--logo-shadow);
}


.masthead nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* the dark switch, "powerline mode"; scheme.js unhides it */
.scheme:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mast-ink);
    font-size: 11px;
    opacity: .85;
    cursor: pointer;
}

.scheme input { margin: 0; accent-color: var(--neon); }

.tabs {
    display: flex;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tabs a {
    display: block;
    padding: 8px 16px 9px;
    border-radius: 6px 6px 0 0;
    color: var(--tab-ink);
    text-decoration: none;
    font-weight: bold;
    background: var(--tab-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
}

.tabs a:hover { background: var(--tab-bg-hover); }

.tabs a.on {
    color: var(--head-2);
    background: var(--page);
    text-shadow: none;
    box-shadow: none;
}

/* --- page sheet -------------------------------------------------------- */

.sheet {
    max-width: 1180px;
    margin: 0 auto 32px;
    background: var(--page);
    border: 1px solid var(--rule);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--sheet-shadow);
}

/* server switcher, one pill per server with its state dot */
.servers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(var(--panel-a), var(--panel-b));
    border-bottom: 1px solid var(--rule);
}

.servers a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
}

.servers a:hover { border-color: var(--rule-hover); }

.servers a.on {
    background: var(--strong);
    border-color: var(--strong);
    color: var(--on-strong);
    font-weight: bold;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 20%, transparent);
}

.dot.warn { background: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 22%, transparent); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 22%, transparent); }

.body { padding: 20px 24px 28px; }

/* --- server heading ---------------------------------------------------- */

.server-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

.server-head h1 {
    text-shadow: var(--glow);
    margin: 0;
    font: bold 26px/1.1 var(--display);
    letter-spacing: -.5px;
    color: var(--head);
}

.server-head .what {
    margin: 4px 0 0;
    color: var(--ink-soft);
}

/* sub-tabs: status / about */
.subtabs {
    display: flex;
    gap: 2px;
    margin: 14px 0 0;
    border-bottom: 2px solid var(--strong);
}

.subtabs a {
    padding: 5px 14px;
    border: 1px solid var(--rule);
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(var(--panel-a), var(--panel-b));
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
}

.subtabs a.on {
    background: var(--strong);
    border-color: var(--strong);
    color: var(--on-strong);
}

.subtabs .fresh {
    margin-left: auto;
    align-self: center;
    font-size: 11px;
    color: var(--ink-faint);
}

/* the digg badge: paper clock weight as the headline number */
.badge {
    width: 108px;
    text-align: center;
    font-family: var(--display);
}

.badge .count {
    display: block;
    padding: 10px 0 6px;
    border: 1px solid var(--badge-rule);
    border-radius: 6px 6px 0 0;
    background: linear-gradient(var(--badge-top), var(--badge-bot));
    box-shadow: inset 0 1px 0 var(--shine);
    color: var(--badge-ink);
}

.badge .count b {
    display: block;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -1px;
}

.badge .count small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge .rank {
    display: block;
    padding: 4px 0;
    border: 1px solid var(--rule);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(var(--panel-a), var(--panel-b));
    color: var(--head-2);
    font: bold 11px var(--sans);
    text-decoration: none;
}

/* --- neofetch facts ---------------------------------------------------- */

/* four columns of three rows, filled column by column */
.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 0 28px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--rule-soft);
    border-radius: 6px;
    background: linear-gradient(var(--panel-a), var(--panel-b));
}

.facts div {
    display: grid;
    grid-template-columns: 6.5em 1fr;
    column-gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted var(--rule);
    align-items: baseline;
}

/* one label over three values: takes a whole column and shares its rows */
.facts .tall {
    grid-row: span 3;
    grid-template-rows: subgrid;
    padding: 0;
}

.facts .tall dt,
.facts .tall dd { padding: 4px 0; }

.facts .tall dd {
    grid-column: 2;
    border-bottom: 1px dotted var(--rule);
}

.facts .tall dd:last-child { border-bottom: 0; }

.facts dt {
    font-weight: bold;
    color: var(--label);
}

.facts dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.facts dd small { color: var(--ink-faint); font-family: var(--sans); }

/* a value the pipeline does not collect yet; mockup only */
.pill {
    display: inline-block;
    padding: 0 7px;
    border-radius: 9px;
    font: bold 10px/16px var(--sans);
    text-transform: uppercase;
    letter-spacing: .5px;
    vertical-align: 1px;
}

.pill.ok { color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-rule); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-rule); }
.pill.bad { color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-rule); }

/* --- period switch ----------------------------------------------------- */

.section-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 12px;
}

.section-bar h2 {
    text-shadow: var(--glow);
    margin: 0;
    font: bold 15px var(--display);
    color: var(--head);
}

.section-bar .note { color: var(--ink-faint); font-size: 11px; }

.periods {
    display: inline-flex;
    border: 1px solid var(--btn-rule);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 0 var(--shine);
}

.periods button {
    padding: 4px 12px;
    border: 0;
    border-left: 1px solid var(--btn-rule);
    background: linear-gradient(var(--panel-a), var(--panel-b));
    color: var(--head-2);
    font: bold 12px var(--sans);
    cursor: pointer;
}

.periods button:first-child { border-left: 0; }

.periods button[aria-pressed="true"] {
    background: linear-gradient(var(--strong-a), var(--strong-b));
    color: var(--on-pressed);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3);
}

/* --- cards ------------------------------------------------------------- */

.grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.card {
    margin: 0;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--card);
    overflow: hidden;
}

.card > header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 10px;
    background: linear-gradient(var(--panel-a), var(--panel-b));
    border-bottom: 1px solid var(--rule);
}

.card > header h3 {
    margin: 0;
    font: bold 12px var(--sans);
    color: var(--head);
}

.card > header span { font-size: 11px; color: var(--ink-faint); }

/* Plots are drawn dark on white. By night they are inverted with their hues
   kept, and screened onto the card so the white ground takes its colour. */
img.inv {
    filter: var(--plot-filter);
    mix-blend-mode: var(--plot-blend);
}

/* A graph with a copy drawn for the dark scheme comes as two images; the
   scheme shows one. Both are lazy, so the hidden one is never fetched.
   These outrank the layout rules below, which also set display. */
img.dk { display: none !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-scheme="light"]) img.lt { display: none !important; }
    :root:not([data-scheme="light"]) img.dk { display: block !important; }
}
:root[data-scheme="dark"] img.lt { display: none !important; }
:root[data-scheme="dark"] img.dk { display: block !important; }

.card img {
    display: block;
    width: 100%;
    height: auto;
}

.card figcaption {
    padding: 6px 10px 8px;
    font-size: 11px;
    color: var(--ink-soft);
    border-top: 1px solid var(--rule-soft);
}

/* MRTG strips are pixel art on a 500 x 175 grid: whole-number scale only */
.strips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.strips .card img {
    width: 500px;
    height: 175px;
    margin: 6px auto;
    image-rendering: pixelated;
}

/* --- about page -------------------------------------------------------- */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 28px;
    margin-top: 18px;
}

.spec {
    margin: 0;
    border-top: 2px solid var(--strong);
}

.spec div {
    display: grid;
    grid-template-columns: 7.5em 1fr;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--rule-soft);
}

.spec div:nth-child(even) { background: var(--zebra); }
.spec dt { font-weight: bold; color: var(--label); }
.spec dd { margin: 0; }
.spec dd small { display: block; color: var(--ink-faint); font-size: 11px; }

.gallery .hero {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(20, 48, 77, .12);
}

.gallery .thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.gallery .thumbs button {
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.gallery .thumbs button[aria-pressed="true"] { border-color: var(--neon); }

.gallery .caption {
    margin: 6px 2px 0;
    font-size: 11px;
    color: var(--ink-soft);
}

.gallery .hero a { display: block; width: 100%; height: 100%; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the large frame shows the whole photo: a portrait one gets bars */
.gallery .hero { background: var(--mast-a); }
.gallery .hero img { object-fit: contain; }

/* stand-in for a server with no photos yet */
.photo {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    font: bold 12px var(--sans);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 10px, transparent 10px 20px),
        linear-gradient(135deg, var(--c1), var(--c2));
}

.notes {
    margin-top: 26px;
    padding-top: 6px;
    border-top: 2px solid var(--strong);
    max-width: 78ch;
}

.notes h2 {
    font: bold 15px var(--display);
    color: var(--head);
    margin: 10px 0 6px;
}

.notes h3 {
    font-size: 13px;
    margin: 18px 0 4px;
    color: var(--head-2);
}

.notes p { margin: 0 0 10px; }
.notes code { font: 12px var(--mono); background: var(--hover-bg); padding: 0 3px; border-radius: 3px; }

.log {
    margin: 0;
    padding: 0;
    list-style: none;
}

.log li {
    display: grid;
    grid-template-columns: 7em 1fr;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px dotted var(--rule);
}

.log time { font: 12px var(--mono); color: var(--ink-soft); }

/* --- overview ---------------------------------------------------------- */

.lede h1 {
    text-shadow: var(--glow);
    margin: 0;
    font: bold 26px/1.1 var(--display);
    letter-spacing: -.5px;
    color: var(--head);
}

.lede h1 time { font-variant-numeric: tabular-nums; }

.tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 0;
}

.tile {
    padding: 9px 12px 10px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: linear-gradient(var(--panel-a), var(--panel-b));
    box-shadow: inset 0 1px 0 var(--shine);
}

.tile span {
    display: block;
    font: bold 10px var(--sans);
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--label);
}

.tile b {
    display: block;
    margin-top: 2px;
    font: bold 22px/1.15 var(--display);
    letter-spacing: -.5px;
    color: var(--head);
}

.tile small {
    display: block;
    font-size: 11px;
    color: var(--ink-soft);
}

/* the front page: ranked servers on the left, ensemble plots on the rail */
.front {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* a plot beside a wide table: equal halves */
.front.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.front .section-bar { min-height: 26px; }
.section-bar .label {
    margin: 0 -6px 0 auto;
    font: bold 12px var(--sans);
    color: var(--ink-soft);
}

.ranked {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--strong);
}

.ranked li {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 150px;
    gap: 14px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--rule-soft);
    align-items: start;
}

.ranked li:hover { background: var(--zebra); }

.ranked .badge { width: 72px; }
.ranked .badge .count { padding: 8px 0 5px; }
.ranked .badge .count b { font-size: 19px; letter-spacing: -.5px; }
.ranked .badge .count small { font-size: 9px; }
.ranked .badge .rank { font-size: 10px; padding: 3px 0; }

/* a server that is measured but has no vote, and the observer itself */
.ranked .badge.off .count {
    border-color: var(--rule);
    background: linear-gradient(var(--panel-a), var(--panel-b));
    color: var(--ink-soft);
}

.ranked h3 {
    margin: 0;
    font: bold 16px/1.2 var(--display);
    letter-spacing: -.2px;
}

.ranked h3 a { text-decoration: none; }
.ranked h3 a:hover { text-decoration: underline; }

.ranked .what {
    margin: 2px 0 7px;
    color: var(--ink-soft);
}

.ranked .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 14px;
    margin: 0;
    font-size: 11px;
    color: var(--ink-soft);
}

.ranked .meta b {
    font: 12px var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* forces the counts onto their own line in every row */
.ranked .meta .brk { flex-basis: 100%; height: 0; }

.ranked .links {
    margin: 7px 0 0;
    font-size: 11px;
    color: var(--ink-faint);
}

.ranked .thumb {
    display: block;
    border: 1px solid var(--rule);
    border-radius: 4px;
    overflow: hidden;
    background: var(--card);
}

.ranked .thumb:hover { border-color: var(--rule-hover); }

.ranked .thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.ranked .thumb.none {
    aspect-ratio: 5 / 3;
    display: grid;
    place-items: center;
    color: var(--ink-faint);
    padding: 0 12px;
    font-size: 11px;
    text-align: center;
    text-decoration: none;
    background: var(--zebra);
}

.rail {
    display: grid;
    gap: 16px;
}

.rail .section-bar { margin-bottom: -4px; }

/* weight now as a bar, the 24 h mean as a tick; full width is the 50% cap */
.share {
    margin: 0;
    padding: 8px 10px;
    list-style: none;
}

.share li {
    display: grid;
    grid-template-columns: 3.2em minmax(0, 1fr) 3.6em;
    gap: 8px;
    align-items: center;
    padding: 2px 0;
    font-size: 12px;
}

.share .bar {
    position: relative;
    height: 12px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--well);
}

.share .bar i {
    display: block;
    height: 100%;
    background: linear-gradient(var(--bar-a), var(--bar-b));
}

.share .bar u {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    margin-left: -1px;
    background: var(--tick);
}

.share b {
    font: 12px var(--mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.card .log { padding: 4px 10px 6px; }
.card .log li { grid-template-columns: 4em 1fr; font-size: 12px; }
.card .log li:last-child { border-bottom: 0; }

/* --- tables and the history calendar ----------------------------------- */

.section-bar.first { margin-top: 0; }
.tiles.first { margin-top: 0; }

/* a line's colour beside its name in a card header */
.key {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px 0 6px;
    border-radius: 1px;
    background: var(--c);
}

/* a legend key takes the colour its line has in the dark copy of the graph */
@media (prefers-color-scheme: dark) {
    :root:not([data-scheme="light"]) .key { background: var(--d, var(--c)); }
}
:root[data-scheme="dark"] .key { background: var(--d, var(--c)); }
.card > header h3 a { color: inherit; text-decoration: none; }
.card > header h3 a:hover { text-decoration: underline; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

table.data th {
    padding: 5px 8px;
    text-align: right;
    font: bold 10px var(--sans);
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--label);
    border-bottom: 1px solid var(--rule);
}

table.data td {
    padding: 5px 8px;
    text-align: right;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    border-bottom: 1px solid var(--rule-soft);
}

table.data th:first-child,
table.data td:first-child,
table.data th.l,
table.data td:has(a) { text-align: left; }

table.data td:has(a) { font-family: var(--sans); }
table.data tr:nth-child(odd) td { background: var(--zebra); }
table.data tr:last-child td { border-bottom: 0; }
table.data a { text-decoration: none; }
table.data a:hover { text-decoration: underline; }

.cal {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}

.cal caption {
    padding: 8px 10px 6px;
    font: bold 13px var(--display);
    color: var(--head);
}

.cal caption a { display: inline; padding: 0 6px; text-decoration: none; }
.cal th { padding: 4px 0; font: bold 10px var(--sans); color: var(--label); text-transform: uppercase; }
.cal td { padding: 0; border: 1px solid var(--rule-soft); }
.cal tr th:first-child { width: 12%; background: var(--well); border: 1px solid var(--rule-soft); }
.cal a { display: block; padding: 8px 0; text-decoration: none; }
.cal a:hover { background: var(--hover-bg); }
.cal a.on { background: var(--strong); color: var(--on-strong); font-weight: bold; }
.cal td.none { padding: 8px 0; color: var(--ink-faint); }
.none { color: var(--ink-faint); }

/* --- footer ------------------------------------------------------------ */

.foot {
    max-width: 1180px;
    margin: -20px auto 28px;
    padding: 0 20px;
    font-size: 11px;
    color: var(--ink-soft);
    display: flex;
    justify-content: space-between;
}

@media (max-width: 900px) {
    .grid2, .about, .front, .front.even { grid-template-columns: 1fr; }
    .masthead { flex-direction: column; align-items: flex-start; }
    .tabs { overflow-x: auto; max-width: 100%; }
    .body { padding: 16px 12px 22px; }
    .strips { grid-template-columns: 1fr; }
    .strips .card img { width: 100%; height: auto; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .facts { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
    .ranked li { grid-template-columns: 72px minmax(0, 1fr); }
    .ranked .thumb { display: none; }
}
