/* The style of every page of logchart. One file, written by hand; no page carries a style of its own.
   The charts are inline SVG whose elements take their colours from the classes below. */

:root {
    /* The colours of logchart itself, taken from its icon: the slate of the screen and the sky blue of its bars. They are for the
       frame of a page (the bar at the top, the navigation, the headings, the buttons), never for a figure: no chart, table or map
       takes them, so they stand apart from the colours of the series and of the states. The page is a cool grey under the cards,
       and the cards (--surface) are what they were, so that every ratio against the card below holds as written. */
    --brand: #2c3e50;
    --brand-ink: #1f3347;      /* a heading: 11.5:1 against the page */
    --brand-sky: #29a8e0;      /* the line under the bar at the top: a line, never text */
    --brand-on: #ffffff;
    --brand-soft: #c5d3e0;     /* text on the bar that is not its name: 7.2:1 against --brand */
    --field-edge: #6e7f93;     /* the edge of a field of a form: 4.1:1 against white */
    --nav-wash: #e3ecf5;       /* the current item of the navigation */
    --nav-hover: #e9eef3;
    --page: #eef2f5;
    --surface: #fcfcfb;
    --ink: #0b0b0b;
    --ink-2: #52514e;
    --muted: #6b6a65;
    --hairline: #e1e0d9;
    --axis: #c3c2b7;
    --wash: #f1f0ec;
    /* The ground of a row of the rest of a table, apart from the named rows (requirements L-RST, D104). */
    --rest: #f4f3ef;
    --link: #1c5cab;
    --accent: #2a78d6;
    /* The mark of a column head that sorts, when the table is not sorted by it: 3.46:1 against the card. */
    --sort-mark: #8a8880;
    /* The colours of the series of a chart, in a fixed order: a series keeps its colour by its place. Each is at least
       3:1 against the card (--surface), no two are green, and none is yellow: a yellow dark enough for 3:1 is an olive
       that cannot be told from the green, and a dark amber is the colour of the states (requirements D105). Ten colours since D173:
       the ninth and the tenth are a purple and a navy, each with its ratio in its comment, and each at least 24 apart from the
       others by distance in CIE Lab (the two closest of the first eight are 22 apart). */
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --series-3: #14895f;   /* green, 4.29:1 */
    --series-4: #6d5bd0;   /* violet, 5.04:1 */
    --series-5: #c2588a;   /* pink, 4.05:1 */
    --series-6: #7a5230;   /* brown, 6.65:1 */
    --series-7: #00838f;   /* teal, 4.41:1 */
    --series-8: #e34948;   /* red, 3.85:1 */
    --series-9: #a233b5;   /* purple, 5.56:1 */
    --series-10: #26398f;  /* navy, 9.91:1 */
    /* The grey of the part of the rest of a donut (requirements D173), no colour of a series: 3.15:1 against the card. */
    --part-rest: #918f88;
    /* The eighteen colours of the classes of a map (requirements D270, which amends D257 and D269): a ramp of one hue, a blue of hue
       250 in CIE LCh(ab), from very light (lightness 90) to very dark (24), the seven stops #c7e7ff #92cbf0 #56afe0 #0593c8 #0275a0
       #00597b #013e57 interpolated in CIE Lab to eighteen steps of about 4 to 5 apart (ΔE76). A map of n classes takes n of them,
       neighbours at most 3 apart round --map-13, and from seven classes on spread from the first to the last (D271, MapDrawing.colour). The rule of 3:1 against the card is the series' and not the map's: the
       lighter colours are below it, on purpose, and the ground of a map is the card. Each is its contrast against the card; none is a
       colour of a series (the nearest, series 7, is 21.5 apart, from --map-13) and none is amber. */
    --map-1: #c7e7ff;   /* 1.25:1 */
    --map-2: #b5ddfa;   /* 1.39:1 */
    --map-3: #a2d3f4;   /* 1.55:1 */
    --map-4: #8fc9ef;   /* 1.74:1 */
    --map-5: #7bbfe9;   /* 1.95:1 */
    --map-6: #66b6e4;   /* 2.18:1 */
    --map-7: #50acdd;   /* 2.47:1 */
    --map-8: #3ca2d5;   /* 2.79:1 */
    --map-9: #2098cc;   /* 3.18:1 */
    --map-10: #048ec1;  /* 3.62:1 */
    --map-11: #0383b3;  /* 4.17:1 */
    --map-12: #0278a5;  /* 4.83:1 */
    --map-13: #016e97;  /* 5.56:1 */
    --map-14: #01648a;  /* 6.41:1 */
    --map-15: #005b7d;  /* 7.33:1 */
    --map-16: #005170;  /* 8.48:1 */
    --map-17: #014763;  /* 9.82:1 */
    --map-18: #013e57;  /* 11.19:1 */
    --partial-edge: #b26a00;
    --partial-fill: #fff5dc;
    --partial-shade: #fbe7b8;
    /* The lines of the hatching of a day whose value is partial, on --partial-fill (requirements L-SHD, D106). */
    --partial-hatch: #e8c77a;
    /* A warning on the operator pages, apart from a failure: 5.8:1 on --partial-fill (requirements L-OPS, D112). */
    --warn: #8a5300;
    --bad: #b3261e;
    --bad-fill: #fdecea;
}

* {
    box-sizing: border-box;
}

html {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--page);
}

body {
    margin: 0;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
    font-weight: normal;
}

/* A date, or a range of two dates, is never broken over two lines, at any width: a list of ranges may break between two
   ranges (requirements L-DAT, D110). The page writes each in this element; its characters are those of the date. */
.date {
    white-space: nowrap;
}

/* A text for a screen reader only. */
.unseen {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The first stop of every page: a link past the navigation and the period bar, seen when it has the focus. */
.skip {
    position: absolute;
    top: -200px;
    left: 8px;
    z-index: 10;
    padding: 8px 14px;
    border-radius: 6px;
    background: var(--link);
    color: #fff;
    font-weight: 600;
}

.skip:focus {
    top: 8px;
}

/* Where the skip link and the anchor of a period lead: it takes the focus without a ring of its own. */
#figures:focus,
#content:focus {
    outline: none;
}

/* The bar at the top and the frame of a page */

.top {
    position: relative;
    /* Above the panel of the period, so that the card of the sites is never under it. */
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px 20px;
    min-height: 52px;
    padding: 8px 24px;
    background: var(--brand);
    border-bottom: 3px solid var(--brand-sky);
    color: var(--brand-on);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--brand-on);
}

.brand img {
    display: block;
}

.brand:hover {
    text-decoration: none;
}

.top-site {
    color: var(--brand-on);
}

/* The site, and where an account has more than one, the way to another: the name with a mark that opens a card of the sites.
   It is a details element, so it opens without a script; each site leads to the same page and period where it has it. */
.site-pick {
    position: relative;
}

.site-pick > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
}

.site-pick > summary::-webkit-details-marker {
    display: none;
}

/* The mark that the name opens a list: a small triangle drawn by its borders, pointing down, and up while the card is open. */
.site-pick > summary::after {
    content: "";
    border: 5px solid transparent;
    border-top-color: currentColor;
    border-bottom-width: 0;
    margin-top: 2px;
}

.site-pick[open] > summary::after {
    border-top-width: 0;
    border-bottom-width: 5px;
    border-bottom-color: currentColor;
    margin-top: -2px;
}

.site-pick > summary:hover,
.site-pick[open] > summary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}

.site-pick > summary:focus-visible {
    outline: 2px solid var(--brand-sky);
    outline-offset: 2px;
}

.site-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 280px;
    max-width: min(420px, calc(100vw - 32px));
    max-height: min(420px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 6px 0;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(11, 11, 11, 0.18);
    color: var(--ink);
}

.site-panel-head {
    margin: 0;
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--hairline);
    font-weight: 600;
}

.site-panel ul {
    margin: 0;
    padding: 6px 0 0;
    list-style: none;
}

.site-panel a {
    display: block;
    padding: 7px 16px;
    color: var(--ink-2);
}

.site-panel a:hover,
.site-panel a:focus-visible {
    background: var(--nav-hover);
    color: var(--ink);
    text-decoration: none;
}

.site-panel a[aria-current] {
    background: var(--nav-wash);
    box-shadow: inset 3px 0 0 var(--link);
    color: var(--ink);
    font-weight: 600;
}

/* Who is logged in, with the button that logs out, at the right of the bar */

.top-account {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 0 auto;
}

.top-name {
    color: var(--brand-soft);
}

.top-account button {
    font: inherit;
    padding: 3px 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    background: transparent;
    color: var(--brand-on);
    cursor: pointer;
}

.top-account button:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* A button that takes the reader on: in the colour of a link, with an arrow drawn after its words */

.go {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    font-weight: 600;
    padding: 9px 18px;
    border: 1px solid var(--link);
    border-radius: 6px;
    background: var(--link);
    color: #fff;
    cursor: pointer;
}

.go::after {
    content: "\203A";
    /* The arrow is drawn, not read: a browser that knows the second form gives a screen reader nothing for it. */
    content: "\203A" / "";
    font-size: 20px;
    line-height: 1;
    margin-top: -2px;
}

.go:hover {
    background: #174d90;
    border-color: #174d90;
}

/* The login: a heading that says what to do, a wide field, a button that goes on */

.login {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 440px;
    margin-bottom: 20px;
}

.login label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--brand-ink);
    font-weight: 600;
}

.login input {
    font: inherit;
    font-weight: normal;
    padding: 10px 12px;
    border: 1px solid var(--field-edge);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

.login input::placeholder {
    color: #6b7280;
}

.login input:focus {
    outline: 2px solid var(--link);
    outline-offset: 1px;
    border-color: var(--link);
}

.login .go {
    align-self: flex-start;
}

/*
 * The code from the mail. The page has one field for it; the script of the code (code.js) shows six boxes in its place, one figure
 * to a box, and keeps the field, hidden, as what the form sends. Without the script the field is there as it is, a little wider
 * than a code.
 */
.code-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.code-label {
    color: var(--brand-ink);
    font-weight: 600;
}

.login input.code {
    width: 12ch;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 20px;
    letter-spacing: 0.2em;
}

/* The six boxes, with a wider gap after the third, as a code is read in two halves. */
.code-boxes {
    display: flex;
    gap: 8px;
}

.login input.code-box {
    width: 48px;
    height: 56px;
    padding: 0;
    text-align: center;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 24px;
    font-weight: 600;
}

.login input.code-box:nth-child(3) {
    margin-right: 10px;
}

/* The form of the step of the code is as wide as the boxes, so that "Log in" stands under the last box. */
.login-code {
    max-width: 338px;
}

/* Back on the left, on on the right, as a step of a form */
.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.back::before {
    content: "\2039";
    content: "\2039" / "";
    margin-right: 8px;
    font-size: 20px;
    line-height: 1;
}

.back {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

/* Only the words are underlined under the pointer, not the arrow. */
.back:hover {
    text-decoration: none;
}

.back:hover > span {
    text-decoration: underline;
}

/* The second step of the login: where the code went, and the way to ask for another */

.sent {
    max-width: 520px;
    margin: 0 0 20px;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}

.sent strong {
    color: var(--ink);
}

/* What the login page says about where the reader is: logged out, or a page that waits behind the login */
.said,
.waits {
    max-width: 520px;
    padding: 10px 14px;
    background: var(--nav-wash);
    border-left: 4px solid var(--link);
    border-radius: 6px;
}

/* No code: what to do, behind a question that opens it */
.login-help {
    max-width: 440px;
    color: var(--ink-2);
}

.login-help > summary {
    color: var(--link);
    cursor: pointer;
}

.login-help p {
    margin: 10px 0;
}

.login-again button {
    font: inherit;
    padding: 5px 12px;
    border: 1px solid var(--axis);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

/*
 * The pages of the login: a card in the middle of the page, on a band of the colour of the bar at the top whose lower edge curves
 * down towards the middle. The layout puts the heading and the content of such a page in the card (the model's card); the bar at
 * the top stands on the band.
 */
body.card-page {
    background:
        radial-gradient(ellipse 80% 300px at 50% 0, var(--brand) 0 99%, transparent 100%) no-repeat,
        var(--page);
}

.card-page .top {
    background: transparent;
    border-bottom: 0;
}

.page-card {
    max-width: 440px;
    margin: 32px auto 48px;
    padding: 32px 36px 28px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(20, 35, 50, 0.18);
}

.page-card h1 {
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.page-card .sent {
    text-align: center;
}

.page-card .login,
.page-card .login-code,
.page-card .login-help {
    max-width: none;
}

/* The button that goes on is as wide as the card. */
.page-card .login .go {
    align-self: stretch;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 8px;
}

.page-card .code-field {
    align-items: center;
}

.page-card .login-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.page-card .back {
    align-self: center;
}

.page-card .login-help {
    margin-top: 4px;
    text-align: center;
}

.page-card .login-help .login-again {
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .page-card {
        margin-top: 16px;
        padding: 24px 16px 20px;
    }

    .login input.code-box {
        width: 40px;
        height: 50px;
    }
}

.frame {
    display: flex;
    align-items: flex-start;
    /* As wide as the window, up to a limit: at 1440 the tables of the operator page and the comparison fit. The limit is
       1760px (D206, 1600px before): on a window of 1920px a row of three donuts then has room for each legend beside its ring. */
    max-width: 1760px;
    margin: 0 auto;
}

.side {
    flex: 0 0 240px;
    padding: 24px 12px 24px 24px;
}

.side-group {
    margin-bottom: 24px;
}

.side h2 {
    margin: 0 0 6px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4f6478;
}

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

.side a {
    display: block;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--ink-2);
}

.side a:hover {
    background: var(--nav-hover);
    color: var(--ink);
    text-decoration: none;
}

/* The newest day the site has figures of, under the navigation: small, in the ink of the notes (requirements 4.8.6). */
.up-to-date {
    margin: 0 0 0 8px;
    font-size: 12px;
    color: var(--muted);
}

/* The page that is open: a light blue with an edge in the colour of a link, the one place of the navigation with colour. */
.side a[aria-current] {
    background: var(--nav-wash);
    box-shadow: inset 3px 0 0 var(--link);
    color: var(--brand-ink);
    font-weight: 600;
}

main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 24px;
}

h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 650;
    line-height: 1.2;
    color: var(--brand-ink);
}

h2 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 650;
}

h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
}

/* The period. One bar: an arrow to the period before, the name of the period, which opens a panel to choose another, and an
   arrow to the period after; the days of the period beside it. The panel has the shortcuts on the left and on the right a
   calendar of two months and the form of a first and a last day. It is a details element, so it opens without a script. */

/* The panel is placed against the whole bar, so that it is never wider than the content column: where two months and the
   shortcuts do not fit side by side, the second month goes under the first. */
.period {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.period-bar {
    display: inline-flex;
    align-items: stretch;
    min-height: 38px;
    background: #fff;
    border: 1px solid var(--axis);
    border-radius: 8px;
}

.period-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    font-size: 20px;
    line-height: 1;
    color: var(--ink-2);
}

.period-step:hover,
.period-step:focus-visible {
    background: var(--wash);
    color: var(--link);
    text-decoration: none;
}

.period-step:first-child {
    border-radius: 7px 0 0 7px;
}

.period-step:last-child {
    border-radius: 0 7px 7px 0;
}

.period-step-none {
    color: var(--hairline);
}

.period-pick > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 14px;
    border-left: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
}

.period-pick > summary::-webkit-details-marker {
    display: none;
}

.period-pick > summary:hover,
.period-pick[open] > summary {
    background: var(--wash);
}

/* A calendar drawn by the style sheet: a frame with a heavier top and two rings above it. */
.period-icon {
    position: relative;
    flex: none;
    width: 14px;
    height: 13px;
    margin-top: 2px;
    border: 1.5px solid currentColor;
    border-top-width: 4px;
    border-radius: 2.5px;
}

.period-icon::before,
.period-icon::after {
    content: "";
    position: absolute;
    top: -7px;
    width: 1.5px;
    height: 5px;
    border-radius: 1px;
    background: currentColor;
}

.period-icon::before {
    left: 2px;
}

.period-icon::after {
    right: 2px;
}

.period-name {
    font-size: 16px;
    font-weight: 650;
}

/* The own name of a period that is a shortcut, behind the name of the shortcut: "Last quarter · Q3 2026". */
.period-code {
    color: var(--muted);
}

.period-code::before {
    content: "\00b7";
    margin-right: 8px;
}

.period-range {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.period-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    display: flex;
    gap: 0;
    width: max-content;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(11, 11, 11, 0.12);
}

.period-shortcuts {
    display: flex;
    flex-direction: column;
    min-width: 13rem;
    padding: 12px;
    border-right: 1px solid var(--hairline);
}

.period-shortcuts ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.period-shortcuts li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--ink);
}

.period-shortcuts li a:hover,
.period-shortcuts li a:focus-visible {
    background: var(--wash);
    color: var(--link);
    text-decoration: none;
}

.period-shortcuts li a[aria-current] {
    background: #e3edf9;
    color: var(--link);
    font-weight: 600;
}

.period-default {
    padding: 0 6px;
    border-radius: 4px;
    background: var(--wash);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: normal;
}

.period-all {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--hairline);
}

.period-all > summary {
    padding: 5px 10px;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.period-all .presets {
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 0 10px;
}

.period-choose {
    min-width: 0;
    padding: 12px 16px 14px;
}

.period-calendar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.period-month-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 2px 0 8px;
    font-size: 16px;
    font-weight: 650;
}

.period-month-name a {
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--ink);
}

.period-month-name a:hover,
.period-month-name a:focus-visible {
    background: var(--wash);
    color: var(--link);
    text-decoration: none;
}

.period-month-name a[aria-current] {
    color: var(--link);
}

/* What the script adds to the head of a month: the list of its years, and the arrows that turn the calendar, before the first
   month and after the last. They stand hidden in the page and the script shows them. */
.period-month {
    position: relative;
}

.period-year {
    margin-left: 2px;
    padding: 2px 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.period-year:hover,
.period-year:focus-visible {
    background: var(--wash);
}

/* Where the browser lets a page draw the list of a select (Chrome 135 and later), the list of years is a card like the panel: the
   years centred, the one shown marked as a period of the calendar is, and no tick. Elsewhere it is the browser's own list. */
@supports (appearance: base-select) {
    .period-year,
    .period-year::picker(select) {
        appearance: base-select;
    }

    .period-year {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 6px 2px 8px;
        font-weight: 650;
    }

    .period-year:open {
        background: var(--wash);
    }

    /* A chevron, drawn as two sides of a square turned on its corner: down when closed, up when open. */
    .period-year::picker-icon {
        content: "";
        width: 6px;
        height: 6px;
        margin: 0 2px 3px 4px;
        border-right: 2px solid var(--ink-2);
        border-bottom: 2px solid var(--ink-2);
        rotate: 45deg;
        transition: rotate 0.15s, margin 0.15s;
    }

    .period-year:open::picker-icon {
        margin: 3px 2px 0 4px;
        rotate: 225deg;
    }

    .period-year::picker(select) {
        max-height: 15rem;
        margin-top: 4px;
        padding: 6px;
        border: 1px solid var(--hairline);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 8px 28px rgba(11, 11, 11, 0.12);
        overflow-y: auto;
    }

    .period-year option {
        justify-content: center;
        min-width: 5rem;
        padding: 5px 14px;
        border-radius: 6px;
        font-size: 15px;
        font-weight: normal;
        cursor: pointer;
    }

    .period-year option::checkmark {
        display: none;
    }

    .period-year option:hover,
    .period-year option:focus-visible {
        background: var(--wash);
        color: var(--link);
    }

    .period-year option:checked {
        background: #e3edf9;
        color: var(--link);
        font-weight: 650;
    }
}

.period-turn {
    position: absolute;
    top: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.period-turn[data-turn="-1"] {
    left: 0;
}

.period-turn[data-turn="1"] {
    right: 0;
}

.period-turn:hover,
.period-turn:focus-visible {
    background: var(--wash);
    color: var(--link);
}

.period-turn:disabled {
    opacity: 0.4;
    cursor: default;
}

.period-turn[hidden],
.period-year[hidden] {
    display: none;
}

/* A week to a row: its number, then Monday to Sunday. */
.period-grid {
    display: grid;
    grid-template-columns: 2.6rem repeat(7, 2.4rem);
    row-gap: 3px;
    font-variant-numeric: tabular-nums;
}

.period-weekday,
.period-week-head {
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hairline);
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.period-week {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    border-right: 1px solid var(--axis);
    background: var(--wash);
    font-size: 12px;
    color: var(--ink-2);
}

/* Only a week that is a link takes the colour of one; the last week of the year 9999 is text (`ended`). */
a.period-week:hover,
a.period-week:focus-visible,
.period-week.current {
    color: var(--link);
    text-decoration: none;
}

.period-week.current {
    font-weight: 650;
}

.period-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.1rem;
    color: var(--ink);
}

/* A day of the calendar is a link; a cell before the first or after the last day of a month is none, and takes no mark. */
a.period-day:hover,
a.period-day:focus-visible {
    outline: 1px solid var(--link);
    outline-offset: -1px;
    border-radius: 6px;
    text-decoration: none;
}

/* The days of the period as one band, its first and last day filled. */
.period-day.in,
.period-day.between {
    background: #e3edf9;
}

.period-day.first,
.period-day.chosen {
    border-radius: 6px 0 0 6px;
}

.period-day.last {
    border-radius: 0 6px 6px 0;
}

.period-day.first.last {
    border-radius: 6px;
}

.period-day.first,
.period-day.last,
.period-day.chosen {
    background: var(--link);
    color: #fff;
    font-weight: 600;
}

/* While two clicks choose a period, the period of the page steps back for the one being chosen. The script marks the calendar
   with the class picking for it, so that no rule asks :has() of a calendar whose days change their classes at every move of the
   pointer. */
.period-calendar.picking .period-day.in:not(.between) {
    background: transparent;
}

.period-calendar.picking .period-day.first:not(.chosen),
.period-calendar.picking .period-day.last:not(.chosen) {
    background: #e3edf9;
    color: var(--ink);
    font-weight: normal;
}

.period-calendar.picking .period-day.first:not(.between):not(.chosen),
.period-calendar.picking .period-day.last:not(.between):not(.chosen) {
    background: transparent;
}

.period-day.today {
    box-shadow: inset 0 0 0 1.5px var(--axis);
    border-radius: 50%;
}

.period-day.today.in,
.period-day.today.first,
.period-day.today.last {
    box-shadow: inset 0 0 0 1.5px #fff;
}

.period-hint {
    margin: 12px 0 8px;
    font-size: 13px;
    color: var(--muted);
}

.period-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.period-form label {
    color: var(--ink-2);
}

.period-form input,
.period-form button {
    font: inherit;
    padding: 4px 8px;
    border: 1px solid var(--axis);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

.period-form button {
    padding: 4px 14px;
    background: var(--link);
    border-color: var(--link);
    color: #fff;
    cursor: pointer;
}

.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 14px;
}

.preset-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.preset-name {
    min-width: 4.5em;
    margin-right: 4px;
    color: var(--muted);
}

/* A preset behind "All shortcuts" is a quiet chip: the ink of the notes in a hairline frame on white, the colour of a link
   when pointed at or in focus. The current preset keeps its filled chip. */
.presets a {
    padding: 2px 7px;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-2);
    white-space: nowrap;
}

.presets a:hover,
.presets a:focus-visible {
    background: var(--wash);
    color: var(--link);
    text-decoration: none;
}

.presets a[aria-current] {
    border-color: var(--link);
    background: var(--link);
    color: #fff;
}

/* What a page says about its period before any figure */

.notice {
    margin: 0 0 16px;
    padding: 14px 18px;
    border: 2px solid var(--partial-edge);
    border-left-width: 10px;
    border-radius: 8px;
    background: var(--partial-fill);
}

.notice h2 {
    font-size: 18px;
}

.notice h2:not(:first-child) {
    margin-top: 14px;
}

.notice p {
    margin: 0 0 8px;
}

/* A line of the notice, one per thing that is the matter (requirements D92). */
.notice p:last-child {
    margin-bottom: 0;
}

/* A period of which nothing is stored says so in plain text, without a box (requirements 4.8.6). */
.notice-nothing {
    margin: 0 0 16px;
    color: var(--ink-2);
}

.notice-nothing p {
    margin: 0 0 6px;
}

/* A period that is not over: nothing went wrong, so it does not look like lost data. */
.notice-running {
    border-color: var(--axis);
    border-left-color: var(--link);
    background: var(--surface);
}

.notice-problem {
    border-color: var(--bad);
    background: var(--bad-fill);
}

/* The line that counts the days on the operator pages is read first (requirements L-OPS, D112): in ink, a count of days that
   went wrong in red and of days with a warning or built another way in amber (below). */
.coverage {
    margin: 0 0 20px;
    color: var(--ink);
    font-size: 15px;
}


/* The breadcrumbs above a drilled table (D158): the section, then each level that was chosen, each a link back to it but the
   last, which is the page itself. The mark between two steps is drawn here, so it is no text of the page. */
.crumbs {
    margin: 0 0 16px;
    font-size: 15px;
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crumbs li {
    overflow-wrap: anywhere;
}

.crumbs li + li::before {
    content: "\203A";
    margin: 0 8px;
    color: var(--muted);
}

.crumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
}

/* A section: notes, charts, tables */

.report-section {
    margin-bottom: 32px;
}

.report-section > h2 a {
    color: var(--ink);
}

.note {
    max-width: 78ch;
    margin: 0 0 12px;
    color: var(--ink-2);
}

/*
 * The tabs of a drilled page whose tables fall in two groups or more (requirements D222): one group shows at a time, without a script.
 * A tab is a link to the anchor of its panel, so the open tab is in the address, and a refresh or a shared link opens on it; the panel
 * that is the target of the address is shown, and the first when no panel is, as on a page opened at #figures. The link of the panel
 * shown is marked by its place, one rule per place up to the most tabs a page shows (Views.MAX_TABS), as the switches of a legend are
 * one rule per colour; a screen reader hears ", shown" behind its name, a text of the style sheet that the eye does not see. The panel
 * that a link opens takes the focus and is named by its tab, and a panel that is not shown is not there for a screen reader either. The
 * rules read the classes of the page and nothing else, so they are for every section.
 */
.tab-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    border-bottom: 1px solid var(--axis);
}

.tab {
    position: relative;
    display: inline-block;
    margin-bottom: -1px;
    padding: 8px 14px;
    border-bottom: 3px solid transparent;
    color: var(--ink-2);
    font-weight: 600;
}

.tab:hover {
    color: var(--link);
    text-decoration: none;
    border-bottom-color: var(--axis);
}

.tab:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

/*
 * A panel is hidden only in a browser that knows :has() (@supports): a browser that does not (Firefox before 121, Safari before 15.4,
 * Chrome before 105) would drop a rule that names :has() whole, and so show the tab links and no table. There every panel stays shown,
 * one after the other, and a tab is a link down to its panel. With :has(), a panel is shown when it is the target of the address, or
 * holds the target of the address (a fragment that names an element in a panel), and the first when nothing in the tabs is the target.
 * The rule of :target stands apart from the ones with :has(), so that it holds in every browser that knows :target.
 */
@supports selector(:has(*)) {
    .tabs > .tab-panel {
        display: none;
        /* The panel a link opens comes into view below its tabs, so that they stay in view. */
        scroll-margin-top: 72px;
    }

    .tabs > .tab-panel:target {
        display: block;
    }

    .tabs > .tab-panel:has(:target),
    .tabs:not(:has(:target)) > .tab-panel:first-of-type {
        display: block;
    }
}

.tab-panel:focus {
    outline: none;
}

/* The marks need :has() as well; without it they are dropped, and every panel is shown (above). */
.tabs:not(:has(:target)) > .tab-list li:first-child > .tab,
.tabs:has(> .tab-panel:nth-of-type(1):target, > .tab-panel:nth-of-type(1) :target) > .tab-list li:nth-child(1) > .tab,
.tabs:has(> .tab-panel:nth-of-type(2):target, > .tab-panel:nth-of-type(2) :target) > .tab-list li:nth-child(2) > .tab,
.tabs:has(> .tab-panel:nth-of-type(3):target, > .tab-panel:nth-of-type(3) :target) > .tab-list li:nth-child(3) > .tab,
.tabs:has(> .tab-panel:nth-of-type(4):target, > .tab-panel:nth-of-type(4) :target) > .tab-list li:nth-child(4) > .tab,
.tabs:has(> .tab-panel:nth-of-type(5):target, > .tab-panel:nth-of-type(5) :target) > .tab-list li:nth-child(5) > .tab,
.tabs:has(> .tab-panel:nth-of-type(6):target, > .tab-panel:nth-of-type(6) :target) > .tab-list li:nth-child(6) > .tab {
    color: var(--ink);
    border-bottom-color: var(--link);
}

.tabs:not(:has(:target)) > .tab-list li:first-child > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(1):target, > .tab-panel:nth-of-type(1) :target) > .tab-list li:nth-child(1) > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(2):target, > .tab-panel:nth-of-type(2) :target) > .tab-list li:nth-child(2) > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(3):target, > .tab-panel:nth-of-type(3) :target) > .tab-list li:nth-child(3) > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(4):target, > .tab-panel:nth-of-type(4) :target) > .tab-list li:nth-child(4) > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(5):target, > .tab-panel:nth-of-type(5) :target) > .tab-list li:nth-child(5) > .tab::after,
.tabs:has(> .tab-panel:nth-of-type(6):target, > .tab-panel:nth-of-type(6) :target) > .tab-list li:nth-child(6) > .tab::after {
    content: ", shown";
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.table,
.chart {
    margin: 0 0 20px;
    padding: 14px 16px 12px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(31, 51, 71, 0.07);
}

/*
 * A table shown as tiles (requirements 4.8.6): a tile per row, its label in small capitals, its figure large, the line under it small. Tables
 * of tiles that follow each other are one grid. A group of at most four tiles stands in one column beside the charts above it, the charts
 * on the left; a larger group stands as a grid above them. The rules read what a table holds and how the section shows it, and name no
 * section, table or column.
 */
.tiles-block {
    margin: 0 0 20px;
}

.tiles-beside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 20px;
    align-items: start;
}

.tiles-charts > .chart {
    margin-bottom: 0;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tiles-beside .tile-grid {
    grid-template-columns: 1fr;
}


.tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(31, 51, 71, 0.07);
    scroll-margin-top: 24px;
}

.tile-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4f6478;
}

.tile-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--brand-ink);
    font-variant-numeric: tabular-nums;
}

.tile-sub {
    font-size: 12px;
    color: var(--muted);
}

/* Tables that stand beside each other where the width allows, and one under the other where it does not: a card starts from 320px,
   or 480px for a table of five columns or more, and the cards of a row share what is left, so that three narrow tables stand in one row
   at 1440 and wide ones two to a row. */
.table-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    margin: 0 0 20px;
}

.table-row > .table {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
}

.table-row > .table:has(th:nth-child(5)) {
    flex-basis: 480px;
}

@media (max-width: 900px) {
    .tiles-beside {
        grid-template-columns: 1fr;
    }
}

/*
 * Donuts that follow each other in a section stand side by side where the width allows, and one under the other where it does
 * not (requirements D174): a row of cards that wraps. The rule is for every section and names none; each card is as wide as its
 * share of the row, and in a row of two at least wide enough for a donut with its legend beside it, else its legend wraps below
 * the drawing.
 */
.chart-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
}

.chart-row > .chart {
    flex: 1 1 28rem;
    min-width: 0;
}

/*
 * A row of three charts or more has narrower cards (requirements D204, as Niels answered its review), so that three stand side by
 * side in the content column of a window of 1440 px (1,152 px: three cards of 18rem, 270 px, with two gaps of 16 px fit with room
 * to spare, and grow to share it); a legend then stands under its ring. A row of two keeps the 28rem above. The rule reads how many
 * charts the row holds and nothing else, so it is for every section.
 */
.chart-row:has(> .chart:nth-child(3)) > .chart {
    flex-basis: 18rem;
}

.block-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 16px;
    margin-bottom: 12px;
}

/* The title of a table or a chart, a size above its cells (requirements L-TTL, D108). */
.block-head h3 {
    font-size: 17px;
}

.scroll {
    overflow-x: auto;
}

table.figures {
    width: 100%;
    /* Separate borders, so that the border of a cell that stays in view moves with it. */
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.figures th,
.figures td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--hairline);
    text-align: left;
    vertical-align: top;
}

.figures th {
    border-bottom-color: var(--axis);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    vertical-align: bottom;
}

.figures td {
    white-space: nowrap;
}

/* The first column of every table stays in view while the others scroll sideways: it is what names a row. */
.figures th:first-child,
.figures td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    box-shadow: inset -1px 0 0 var(--hairline);
}

/* A text too long for one line: a path or a referrer that a scanner sent. It is broken where it has to be. */
.wrap {
    display: inline-block;
    min-width: 28ch;
    max-width: 64ch;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

/* A table whose every column is text (it has no data-sortable; today the tables of About these figures) puts its columns at the
   same places as every other such table: its first column takes a fixed share of the width, and every cell breaks its text over
   lines within its column. */
.figures:not([data-sortable]) {
    table-layout: fixed;
}

.figures:not([data-sortable]) th:first-child {
    width: 28%;
}

.figures:not([data-sortable]) td {
    white-space: normal;
    overflow-wrap: break-word;
}

.figures:not([data-sortable]) .wrap {
    display: inline;
    min-width: 0;
    max-width: none;
}

.figures .num {
    text-align: right;
    white-space: nowrap;
}

/* A table fills its card, its columns spread over its width, at every width (requirements L-WID, D170, which amends D102). The
   head of a column of figures stays on one line, with its sort mark beside it, and the column is as wide as its head needs
   where that is wider than its figures; in a card too narrow for that the table scrolls sideways inside it, its first column
   in view. A head of a column of figures is a cell of the class num, which does not break (above), and its sort button, which
   may, is kept on one line here. The tables of the operator pages whose cells say the state of a day or a file (.says) keep what
   they had: the head of a column of figures may break over lines there, also without the script. */
.figures:has(.says) th.num {
    white-space: normal;
}

.figures:not(:has(.says)) th.num .sort {
    white-space: nowrap;
}

/* A day of the operator pages stored complete with a warning, or built another way: an amber row, also its first column,
   which stays in view (requirements L-OPS, D112). It is the colour of the row a link leads to (below). It stands before the
   rules of a hovered row, which have the same weight, so that a warned row shows the wash under the pointer as a red row does. */
.figures tbody tr.warned,
.figures tbody tr.warned > td:first-child {
    background: var(--partial-fill);
}

.figures tbody tr:hover {
    background: var(--wash);
}

.figures tbody tr.attention > td:first-child {
    background: var(--bad-fill);
}

.figures tbody tr:hover > td:first-child {
    background: var(--wash);
}

/* The row of the rest of a table, which holds what no row of the table names, stands apart from the named rows, still where
   it stands, above the total: in the ink of the notes on a grey of its own, also its first column, with a rule in the colour
   of the axis above the first of them (requirements L-RST, D104). The page writes the class from the flag of the row in the
   records, never from its name. Under the pointer it shows the wash as any row does. */
.figures tbody tr.rest > td {
    color: var(--ink-2);
    background: var(--rest);
}

.figures tbody tr:not(.rest) + tr.rest > td {
    border-top: 1px solid var(--axis);
}

.figures tbody tr.rest:hover > td {
    background: var(--wash);
}

.figures tfoot td {
    border-top: 2px solid var(--axis);
    border-bottom: 0;
    font-weight: 650;
}

.figures .none td,
p.none {
    color: var(--muted);
    font-style: italic;
}

.sort {
    /* A head of a column may break over lines, so that a table fits where its words allow it. */
    white-space: normal;
    text-align: inherit;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* The mark of a column that sorts: seen, and a little smaller than the head (requirements L-SRT, D109). */
.sort::after {
    content: " \2195";
    color: var(--sort-mark);
    font-size: 0.85em;
}

[aria-sort="ascending"] .sort::after {
    content: " \2191";
    color: var(--ink);
}

[aria-sort="descending"] .sort::after {
    content: " \2193";
    color: var(--ink);
}

/* The lines of the operator page that say what its tables hold. A table of a section has no footnote on its page. */
.footnote {
    max-width: 96ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* The notes per table on the page of About these figures (D280): per section its title, and per table its notes in paragraphs. */
.notes-heading {
    margin: 32px 0 4px;
}

.help-section {
    margin: 0 0 28px;
}

.help-section > h3 a {
    color: var(--ink);
}

/* As wide as the cards of the tables above it, its text filling the card (D280, which amends the 78 characters of D111), and a
   link that leads here lands 16px below the top of the window (requirements L-HLP). */
.help-table {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    scroll-margin-top: 16px;
}

.help-table > h4 {
    margin: 0 0 6px;
}

.help-table > p {
    margin: 0 0 8px;
    color: var(--ink-2);
}

.help-table > p:last-child {
    margin-bottom: 0;
}

/* The place a link to the notes of a table leads to is marked by an edge on its left and a border in the colour of a link,
   and takes the focus without a ring of its own. */
.help-table:target {
    border-color: var(--link);
    box-shadow: inset 4px 0 0 var(--link);
}

.help-table:focus {
    outline: none;
}

/* Charts */

/* The legend stands below the chart area, outside its scroll, so that it stays in view on a phone. */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: var(--ink-2);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.key {
    display: inline-block;
    width: 16px;
    height: 3px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: middle;
}

.legend-bars .key,
.legend-donut .key {
    width: 10px;
    height: 10px;
}

/* What the legend says of a series or a part next to its label: the share of a part of a donut, the value of the 100% of a line. */
.legend-detail {
    margin-left: 6px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/*
 * The legend of a line chart of more than one series is a row of switches (requirements D175): each name is the label of a checkbox that
 * is visually hidden and can be focused, so the mouse and the keyboard (Tab, then Space) both work, and no script is needed. While its box
 * is not checked the line and the dots of its series are not drawn, and its name in the legend looks switched off: faded, struck through,
 * its swatch hollow. The axis keeps the scale the server drew it with, so a hidden line does not stretch the others. A donut and a bar
 * chart have none.
 */
.legend-switch {
    position: relative;
}

.switch {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.legend-switch label {
    display: inline-block;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    cursor: pointer;
}

.legend-switch label:hover {
    background: var(--wash);
}

.switch:focus-visible + label {
    outline: 2px solid var(--link);
    outline-offset: 1px;
}

.switch:not(:checked) + label {
    color: var(--muted);
    text-decoration: line-through;
}

.switch:not(:checked) + label .key {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--muted);
}

.chart:has(.sw1:not(:checked)) .scroll .s1,
.chart:has(.sw2:not(:checked)) .scroll .s2,
.chart:has(.sw3:not(:checked)) .scroll .s3,
.chart:has(.sw4:not(:checked)) .scroll .s4,
.chart:has(.sw5:not(:checked)) .scroll .s5,
.chart:has(.sw6:not(:checked)) .scroll .s6,
.chart:has(.sw7:not(:checked)) .scroll .s7,
.chart:has(.sw8:not(:checked)) .scroll .s8,
.chart:has(.sw9:not(:checked)) .scroll .s9,
.chart:has(.sw10:not(:checked)) .scroll .s10 {
    display: none;
}

/*
 * A donut (requirements D171): a square drawing that keeps its size, with its legend beside it where there is room and below it
 * where there is not. The legend is a column, one part to a line, with the share of the part behind its name. A part is filled in
 * the colour of the series of its place, as a bar is (below), with a line in the colour of the card between two parts; the total
 * of the parts stands in the middle of the hole.
 */
.donut-frame {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 40px;
}

.donut {
    flex: none;
    display: block;
}

.donut .part {
    stroke: var(--surface);
    stroke-width: 1.5;
}

.donut .part:hover {
    opacity: 0.8;
}

.donut-total,
.donut-caption {
    text-anchor: middle;
    font-variant-numeric: tabular-nums;
}

.donut-total {
    fill: var(--ink);
    font-size: 20px;
    font-weight: 600;
}

/* A long total takes a smaller size, so that it stays inside the hole, which is 128px wide. */
.donut-total-long {
    font-size: 16px;
}

.donut-total-longer {
    font-size: 13px;
}

.donut-caption {
    fill: var(--muted);
    font-size: 13px;
}

.legend-donut {
    flex-direction: column;
    flex-wrap: nowrap;
    margin: 0;
    font-size: 14px;
}

/*
 * A chart is as wide as its card, and its text keeps its size (requirements 4.7.4, after
 * Niels's review). Its drawing has no view box of its own: a label, a dot and a tick are in pixels, and stand across at a
 * share of the width. The labels of the vertical axis, or of the bars, are a column of their own on the left
 * (.plot-side). The lines and the bars are drawn in a drawing that is stretched across the width (.plot-drawing), and a
 * line keeps the width of its stroke. A bar chart keeps a least width at every width, and scrolls sideways in its card
 * where that is wider; a line chart has none above 600px (requirements L-LIN, D107), and on a phone it keeps the least
 * width of a bar chart (below).
 */
.plot-frame {
    display: flex;
    min-width: 720px;
}

/* Room on the right for the label of the last day, and for the value at the tip of the longest bar. */
.plot-frame-line {
    min-width: 0;
    padding-right: 24px;
}

.plot-frame-bars {
    padding-right: 96px;
}

.plot-side {
    display: block;
    flex: none;
    overflow: visible;
}

.plot {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    overflow: visible;
}

.plot-drawing {
    overflow: visible;
}

.plot-frame .grid {
    stroke: #eceae4;
    stroke-width: 1;
}

.plot-frame .axis {
    stroke: var(--axis);
    stroke-width: 1;
}

.plot-frame .tick {
    fill: var(--muted);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.plot-frame .tick-y,
.plot-frame .bar-label {
    text-anchor: end;
}

.plot-frame .tick-x {
    text-anchor: middle;
}

.plot-frame .bar-label {
    fill: var(--ink-2);
}

.plot-frame .value {
    fill: var(--ink-2);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.plot-frame .line {
    fill: none;
    stroke-width: 2.5px;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.plot-frame .dot {
    stroke: var(--surface);
    stroke-width: 2;
}

.plot .hit {
    fill: transparent;
}

/*
 * A map (docs/architecture.md, section 11.10; D228, D253, D257, D270): a drawing of its own in a view box of degrees of plate carrée, as wide
 * as its card and half as high, its labels of degrees in pixels in a column on its left and a row under it, at shares of its height and
 * width, so that they keep their size. Its cells are filled in the colour of their class; the lines of the degrees and the coastlines keep
 * the width of their stroke however large a degree is drawn.
 */
.map-frame {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto 20px;
}

.map-side {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    overflow: visible;
}

.map {
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--axis);
}

.map-bottom {
    grid-column: 2;
    grid-row: 2;
    display: block;
    overflow: visible;
}

.map-frame .tick {
    fill: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.map-frame .tick-y {
    text-anchor: end;
}

.map-frame .tick-x {
    text-anchor: middle;
}

/* The ground of a map, where no cell is shown, is the card (D270), which the legend names. */
.map-ground {
    fill: var(--surface);
}

.map-grid {
    fill: none;
    stroke: var(--hairline);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

/* The coastlines (D261, D270): the one path of the symbol the page holds once keeps its width and its joins; the colour and the width of
   its stroke come from the use that names it, which they are inherited from: first a wide edge in the colour of the card, then the line
   over it, so that a coast reads over a light cell and over a dark one. */
.coast {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.coast-halo {
    stroke: var(--surface);
    stroke-width: 2.6;
}

.coast-line {
    stroke: var(--ink-2);
    stroke-width: 1;
}

.map .m1, .map-swatch.m1 { fill: var(--map-1); background: var(--map-1); }
.map .m2, .map-swatch.m2 { fill: var(--map-2); background: var(--map-2); }
.map .m3, .map-swatch.m3 { fill: var(--map-3); background: var(--map-3); }
.map .m4, .map-swatch.m4 { fill: var(--map-4); background: var(--map-4); }
.map .m5, .map-swatch.m5 { fill: var(--map-5); background: var(--map-5); }
.map .m6, .map-swatch.m6 { fill: var(--map-6); background: var(--map-6); }
.map .m7, .map-swatch.m7 { fill: var(--map-7); background: var(--map-7); }
.map .m8, .map-swatch.m8 { fill: var(--map-8); background: var(--map-8); }
.map .m9, .map-swatch.m9 { fill: var(--map-9); background: var(--map-9); }
.map .m10, .map-swatch.m10 { fill: var(--map-10); background: var(--map-10); }
.map .m11, .map-swatch.m11 { fill: var(--map-11); background: var(--map-11); }
.map .m12, .map-swatch.m12 { fill: var(--map-12); background: var(--map-12); }
.map .m13, .map-swatch.m13 { fill: var(--map-13); background: var(--map-13); }
.map .m14, .map-swatch.m14 { fill: var(--map-14); background: var(--map-14); }
.map .m15, .map-swatch.m15 { fill: var(--map-15); background: var(--map-15); }
.map .m16, .map-swatch.m16 { fill: var(--map-16); background: var(--map-16); }
.map .m17, .map-swatch.m17 { fill: var(--map-17); background: var(--map-17); }
.map .m18, .map-swatch.m18 { fill: var(--map-18); background: var(--map-18); }

/* The legend of a map (D270): under the line that says what its classes are of, a bar of its classes side by side, from the fewest
   requests per 1,000 km² to the most, each swatch of one width, so that a step reads the same on every map, narrower where the card is;
   under the bar the labels of its bounds that are powers of ten, each in the swatch of the class it ends and put under its right edge,
   where the bound lies, with a tick; then the ground. A screen reader reads the classes in words from a list of its own. The swatches
   keep their colours on paper. */
.map-legend-head {
    margin: 10px 0 0;
    color: var(--ink-2);
    font-size: 13px;
}

.map-scale {
    display: flex;
    max-width: 100%;
    margin: 6px 0 0;
    padding: 0 2.5rem 20px 0;
}

.map-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    vertical-align: middle;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.map-scale .map-swatch {
    position: relative;
    flex: 0 1 2.25rem;
    width: auto;
    height: 12px;
}

/* A bar that labels every bound, which only a map of five classes or fewer does (fewer than two of its bounds are powers of ten), has
   wider swatches, so that two labels of five digits or more, one swatch apart, do not meet (D271; MapDrawingTest sets the widths of the
   labels against these). The bar keeps room on its right for half the last label, which hangs past its end, also where it fills its card
   and its swatches shrink. */
.map-scale-every .map-swatch {
    flex-basis: 5.5rem;
}

.map-scale-label {
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 5px;
    transform: translateX(50%);
    color: var(--ink-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}

.map-scale-label::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 4px;
    border-left: 1px solid var(--ink-2);
}

.map-ground-key {
    margin: 4px 0 0;
    color: var(--ink-2);
    font-size: 13px;
}

.map-swatch-ground {
    margin-right: 6px;
    border: 1px solid var(--axis);
    background: var(--surface);
}

/* A map can be zoomed and moved (D260): the script map.js puts three buttons above it, quiet, in the colour of a link, behind a hint in
   the ink of the notes, and the map takes the focus, with a visible ring, for the keys. A button at the end of what it does stays where it
   is and in the focus, greyed. The map follows the mouse or a pen that drags it; on a touch screen one finger moves it sideways while the
   browser scrolls the page up and down, and two fingers pinch. Without the script none of this is there. */
.map-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
}

.map-hint {
    margin-right: 4px;
    color: var(--ink-2);
    font-size: 13px;
}

.map-button {
    padding: 2px 9px;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    background: #fff;
    color: var(--link);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.map-button:hover {
    background: var(--wash);
}

.map-button:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 1px;
}

.map-button[aria-disabled="true"] {
    background: #fff;
    color: var(--muted);
    cursor: default;
}

.map-zoomable .map {
    cursor: grab;
    touch-action: pan-y;
}

.map-zoomable .map.map-dragging {
    cursor: grabbing;
}

.map:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

/* The days of a chart without a value (not stored, not over) are solid amber; the days whose value is partial (incomplete,
   out of date) are hatched in the same amber, so the line can be followed through them (requirements L-SHD, D106). The
   hatching is a pattern that the page holds once, in an SVG of its own that takes no room; a hatched stretch names it. */
.plot .shaded-gone {
    fill: var(--partial-shade);
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.shade-part-ground {
    fill: var(--partial-fill);
}

.shade-part-line {
    stroke: var(--partial-hatch);
    stroke-width: 2.5;
}

/* The caption above a chart that shades days: a key per look, each with its swatch. */
.shaded-note {
    margin: 0 0 8px;
    color: var(--ink-2);
    font-size: 13px;
}

.shaded-item {
    white-space: nowrap;
    margin-right: 14px;
}

.key.shaded-key {
    width: 12px;
    height: 12px;
    border: 1px solid var(--partial-edge);
    background: var(--partial-shade);
}

.key.shaded-key-part {
    background: repeating-linear-gradient(135deg, var(--partial-fill) 0 2px, var(--partial-hatch) 2px 4px);
}

.plot .hit:hover {
    fill: rgba(11, 11, 11, 0.06);
}

.plot .bar:hover {
    opacity: 0.8;
}

.s1 .line { stroke: var(--series-1); }
.s2 .line { stroke: var(--series-2); }
.s3 .line { stroke: var(--series-3); }
.s4 .line { stroke: var(--series-4); }
.s5 .line { stroke: var(--series-5); }
.s6 .line { stroke: var(--series-6); }
.s7 .line { stroke: var(--series-7); }
.s8 .line { stroke: var(--series-8); }
.s9 .line { stroke: var(--series-9); }
.s10 .line { stroke: var(--series-10); }

/* The area under the curve of the first series of a line chart (requirements 4.8.6): a light fill in the colour of that series. */
.plot-frame .area {
    stroke: none;
    opacity: 0.14;
}

.s1 .area { fill: var(--series-1); }

.s1 .dot, .s1 .bar, .s1 .part { fill: var(--series-1); }
.s2 .dot, .s2 .bar, .s2 .part { fill: var(--series-2); }
.s3 .dot, .s3 .bar, .s3 .part { fill: var(--series-3); }
.s4 .dot, .s4 .bar, .s4 .part { fill: var(--series-4); }
.s5 .dot, .s5 .bar, .s5 .part { fill: var(--series-5); }
.s6 .dot, .s6 .bar, .s6 .part { fill: var(--series-6); }
.s7 .dot, .s7 .bar, .s7 .part { fill: var(--series-7); }
.s8 .dot, .s8 .bar, .s8 .part { fill: var(--series-8); }
.s9 .dot, .s9 .bar, .s9 .part { fill: var(--series-9); }
.s10 .dot, .s10 .bar, .s10 .part { fill: var(--series-10); }
/* A part of the rest of a donut: grey, and no colour of a series (requirements D173). */
.part-rest .part { fill: var(--part-rest); }

.key.s1 { background: var(--series-1); }
.key.s2 { background: var(--series-2); }
.key.s3 { background: var(--series-3); }
.key.s4 { background: var(--series-4); }
.key.s5 { background: var(--series-5); }
.key.s6 { background: var(--series-6); }
.key.s7 { background: var(--series-7); }
.key.s8 { background: var(--series-8); }
.key.s9 { background: var(--series-9); }
.key.s10 { background: var(--series-10); }
.key.part-rest { background: var(--part-rest); }

/* The list of sites */

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

.site-list li {
    margin-bottom: 8px;
}

.site-list a {
    display: block;
    max-width: 520px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-left: 4px solid var(--link);
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
}

.site-list a:hover {
    background: var(--nav-wash);
    text-decoration: none;
}

/* The operator page */

/* A page that only an operator gets says so, in one line under its heading. */
.operator-only {
    margin: -6px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

/* The latest days: a block per site, and the way to it from the list of sites. */
.latest {
    margin: 0 0 32px;
}

.latest > .block-head h2 {
    margin: 0;
}

.latest > .coverage {
    margin-bottom: 12px;
}

.to-latest {
    margin: 20px 0 0;
    max-width: 520px;
}

/* The way from a notice to Status, which only an operator's notice has. */
.notice .to-status {
    margin-top: 10px;
}

/* Red is for what failed: a day not ingested, incomplete or out of date, a log file that could not be read, and the count of
   such days. Amber is for what asks for a look and lost nothing: a warning of a day stored complete, a day built another way
   than the configuration of today would, and their counts (requirements L-OPS, D112, D121). */
.state-bad,
.count-bad {
    color: var(--bad);
    font-weight: 600;
}

.count-warn,
.warning {
    color: var(--warn);
    font-weight: 600;
}

/* The state of a day or a file with what is said of it: the reason, the warnings, how it was built. */
.says {
    min-width: 16em;
    max-width: 36em;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* On a screen of 1600px or more the files a day was built from fit one line. At 1440 the other columns leave the state too
   little room for them. */
@media (min-width: 1600px) {
    .says {
        max-width: 60em;
    }
}

/* A table of the operator pages fits its column (requirements L-OPS, D112): a cell of text, as the name of a log file, its
   source or the time it was read, may break over lines where its words allow it, at a space or after a hyphen, and a date
   stays whole. A figure keeps its line. Above a phone only: on a phone these tables are as U-KEY built them. */
@media (min-width: 601px) {
    .figures:has(.says) td:not(.num) {
        white-space: normal;
    }
}

.says > div {
    margin-top: 2px;
}

.detail {
    color: var(--ink-2);
    font-size: 13px;
}

.attention {
    background: var(--bad-fill);
}

/* A day and the log files it was built from point at each other: the row a link leads to stands out. */
.anchor {
    scroll-margin-top: 24px;
}

.figures tr:has(.anchor:target) > td {
    background: var(--partial-fill);
}

/* A narrow screen: the navigation lies above the page, its items wrapped over lines so that every one is in view */

@media (max-width: 900px) {
    .frame {
        display: block;
    }

    .side {
        padding: 8px 12px 0;
    }

    .side-group {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin-bottom: 4px;
    }

    .side h2 {
        flex: 0 0 auto;
        margin: 0;
    }

    .side ul {
        display: flex;
        flex: 1 1 0;
        flex-wrap: wrap;
        min-width: 0;
        gap: 2px;
    }

    .side li {
        white-space: nowrap;
    }

    .side a {
        padding: 2px 7px;
    }

    main {
        padding: 12px;
    }

    .top {
        padding: 10px 12px;
    }

    h1 {
        font-size: 22px;
    }
}

/* A phone: the panel of the period takes the width, and the first column of a table takes at most part of the width */
@media (max-width: 600px) {
    .top {
        gap: 4px 12px;
    }

    .top-site,
    .top-account button {
        white-space: nowrap;
    }

    .site-pick {
        position: static;
    }

    .site-panel {
        left: 12px;
        right: 12px;
        min-width: 0;
        max-width: none;
    }

    .top-account {
        min-width: 0;
    }

    .top-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .side {
        font-size: 14px;
    }

    .side-group {
        gap: 6px;
    }

    .side ul {
        gap: 0 2px;
    }

    .side a {
        padding: 1px 6px;
    }

    /* The panel of the period takes the width of the content column, its shortcuts above the calendar. */
    .period-panel {
        right: 0;
        flex-direction: column;
        width: auto;
        max-width: none;
    }

    .period-shortcuts {
        border-right: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .period-shortcuts ul {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 4px;
    }

    .table,
    .chart {
        padding: 12px 10px 10px;
    }

    .figures th,
    .figures td {
        padding: 6px 8px;
    }

    .figures th:first-child,
    .figures td:first-child {
        min-width: 7em;
        max-width: 38vw;
        white-space: normal;
        overflow-wrap: break-word;
    }

    .figures td:first-child .wrap {
        min-width: 0;
    }

    .says {
        min-width: 0;
        width: 48vw;
    }

    /* A line chart keeps its least width, and scrolls sideways in its card, as a bar chart does. */
    .plot-frame-line {
        min-width: 720px;
    }
}

@media print {
    .side,
    .page-card .login-help,
    .top-account,
    .site-panel,
    .site-pick > summary::after,
    .skip,
    .period-step,
    .period-panel,
    .sort::after,
    .map-controls {
        display: none;
    }

    html {
        background: #fff;
    }

    /* The band of a page of the login is a background, which paper may leave out: the bar at the top in ink. */
    .card-page .top,
    .card-page .brand {
        color: var(--ink);
    }

    .table,
    .chart {
        break-inside: avoid;
        border: 0;
        padding: 0;
    }

    .plot-frame {
        min-width: 0;
    }

    /* On paper every tab of a drilled page is there, one after the other (D222). */
    .tab-list {
        display: none;
    }

    .tabs > .tab-panel {
        display: block;
    }
}
