/*
 * GeoPulseWeb (ADR 0056).
 *
 * The colours are the application's tokens.css, under the same names as CSS custom properties
 * (-color-ink becomes --color-ink), so a colour means the same here as in the application and the
 * PDF report. The dark theme redefines the same names when the system asks for it; nothing else needs
 * to know which theme is on.
 *
 * The shapes follow the course pages of course-kit (theme/doc.scss): a light menu, a light band with a
 * box beside the title, small capitals in mono above headings, square cards with a stroke on top, and
 * the kit's three typefaces, kept in /fonts/ (ADR 0057).
 *
 * Nothing is loaded from other sites, and no style is set inline: the pages are served with a
 * Content-Security-Policy that allows neither.
 */

/* --- Typefaces (SIL Open Font License 1.1, the licences in /fonts/) ---------------------------- */

/* Source Sans 3 for text, variable 200-900. */
@font-face {
    font-family: "Source Sans 3"; font-style: normal; font-display: swap; font-weight: 200 900;
    src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Sans 3"; font-style: normal; font-display: swap; font-weight: 200 900;
    src: url("/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Source Sans 3"; font-style: italic; font-display: swap; font-weight: 200 900;
    src: url("/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Source Sans 3"; font-style: italic; font-display: swap; font-weight: 200 900;
    src: url("/fonts/source-sans-3-latin-ext-wght-italic.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Archivo for headings, variable 100-900. */
@font-face {
    font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
    src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900;
    src: url("/fonts/archivo-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono for the small capitals and the figures in tables, 400 and 600. */
@font-face {
    font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
    src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
    src: url("/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 600;
    src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light dark;

    /* The page under everything, and the band and the menu a shade darker, as the kit's paper and panel. */
    --color-paper:       #F9FBFB;
    --color-band:        #EEF3F4;

    --color-canvas:      #F2F5F6;
    --color-surface:     #FFFFFF;
    --color-surface-2:   #E9EEF0;
    --color-surface-3:   #DCE4E8;

    --color-ink:         #15222A;
    --color-ink-2:       #3D525E;
    --color-muted:       #647986;

    --color-border:      #D8E1E6;
    --color-border-2:    #BECCD4;

    --color-accent:      #0E5C74;
    --color-accent-hover:#0B4B5F;
    --color-accent-soft: #E2F0F4;
    --color-on-accent:   #FFFFFF;

    --color-crit:        #A32318;

    /* A point's status (ADR 0020): the plain token fills the shape, the -ink one is for words. */
    --status-alert:      #C4461A;
    --status-alert-ink:  #B23C12;
    --status-watch:      #E0A21F;
    --status-watch-ink:  #7A5200;
    --status-stable:     #2F6DB0;
    --status-stable-ink: #2F6DB0;
    --status-unknown:    #7C8A94;
    --status-unknown-ink:#647986;
    --status-reference:  #56697A;

    /* Data series, as in the charts of the application: orange the daily median, dark blue the GAM. */
    --plot-daily-median: #C2570F;
    --plot-gam:          #123F63;

    /* Square corners, as on the course pages. */
    --radius:            0;
    --gutter:            16px;
    --font-body:    "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-display: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-mono:    "IBM Plex Mono", Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-paper:       #0D1418;
        --color-band:        #121C21;

        --color-canvas:      #0D1418;
        --color-surface:     #141E24;
        --color-surface-2:   #1B282F;
        --color-surface-3:   #24333B;

        --color-ink:         #E3EDF2;
        --color-ink-2:       #B6C8D2;
        --color-muted:       #8399A6;

        --color-border:      #24343D;
        --color-border-2:    #33474F;

        --color-accent:      #58B6D0;
        --color-accent-hover:#7BC8DD;
        --color-accent-soft: #12313C;
        --color-on-accent:   #0D1418;

        --color-crit:        #F09A8E;

        --status-alert:      #F08A5D;
        --status-alert-ink:  #F08A5D;
        --status-watch:      #F2C14E;
        --status-watch-ink:  #F2C14E;
        --status-stable:     #6FA8DC;
        --status-stable-ink: #6FA8DC;
        --status-unknown:    #8399A6;
        --status-unknown-ink:#8399A6;
        --status-reference:  #9DB0BB;

        --plot-daily-median: #F0A35E;
        --plot-gam:          #D6E6F5;
    }
}

/* --- Base ------------------------------------------------------------------------------------ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

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

a:hover {
    color: var(--color-accent-hover);
}

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.6rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    margin: 0 0 12px;
}

/* A section's heading stands under a rule, as on the course pages. */
h2 {
    font-size: 1.4rem;
    border-top: 2px solid var(--color-ink);
    padding-top: 0.5rem;
    margin: 0 0 0.8rem;
}

/* Small capitals above a title or a card: what kind of thing it is, or when. */
.overlinje {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
}

p {
    margin: 0 0 12px;
}

p:last-child {
    margin-bottom: 0;
}

.innhold {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* The symbols the status marks use: in the page, but taking no room. */
.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Top bar --------------------------------------------------------------------------------- */

/* The menu across the top, light as on the course pages; the page you are on is underlined. */
.topp {
    background: var(--color-band);
    border-bottom: 1px solid var(--color-border);
}

.topp .innhold {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 28px;
    min-height: 60px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.merke {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-ink);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.12rem;
}

.merke:hover {
    color: var(--color-ink);
}

.merke img {
    width: 30px;
    height: 30px;
    display: block;
}

.merke .sted {
    color: var(--color-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

.meny {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
}

.meny a:not(.knapp) {
    padding: 6px 10px;
    border-bottom: 2px solid transparent;
    color: var(--color-ink-2);
    text-decoration: none;
}

.meny a:not(.knapp):hover {
    color: var(--color-accent);
}

.meny a[aria-current="page"] {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: 600;
}

/* The user and the way out, or in, at the right end of the menu. */
.meny .hoyre {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.bruker {
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* --- Buttons --------------------------------------------------------------------------------- */

.knapp {
    display: inline-block;
    padding: 0.5rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    line-height: 1.3;
}

.knapp:hover {
    background: var(--color-accent-hover);
    color: var(--color-on-accent);
}

.knapp.stille {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-border-2);
}

.knapp.stille:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
}

/* --- The band -------------------------------------------------------------------------------- */

/* The title of a page with a box beside it, on a band a shade darker than the page. */
.band {
    position: relative;
    overflow: hidden;
    background: var(--color-band);
    border-bottom: 1px solid var(--color-border);
}

.band .innhold {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 28px 56px;
    align-items: end;
    padding-top: 44px;
    padding-bottom: 42px;
}

.band h1 {
    margin: 0.45rem 0 0.9rem;
}

.band .ingress {
    font-size: 1.16rem;
    font-weight: 300;
    max-width: 56ch;
}

.band .avsender {
    margin-top: 16px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* The slope and the pulse of the icon, drawn large and faint behind the band. */
.band .skraning {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 75%;
    pointer-events: none;
}

.skraning .grunn {
    fill: var(--color-accent);
    fill-opacity: 0.04;
}

.skraning .linje {
    fill: none;
    stroke: var(--color-accent);
    stroke-opacity: 0.16;
    stroke-width: 2;
    stroke-linecap: round;
}

.skraning .puls {
    fill: none;
    stroke: var(--color-accent);
    stroke-opacity: 0.2;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The box beside the title: white, with the accent on top. */
.boks {
    display: grid;
    gap: 10px;
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    padding: 16px 18px 18px;
    font-size: 0.95rem;
}

.boks p {
    margin: 0;
}

.boks .knapp {
    justify-self: start;
}

/* --- Sections and cards ---------------------------------------------------------------------- */

.seksjon {
    padding-top: 40px;
}

.sidetittel {
    padding-top: 36px;
}

.sidetittel h1 {
    margin-top: 0.35rem;
}

.sidetittel p {
    color: var(--color-ink-2);
    font-size: 1.08rem;
    font-weight: 300;
    max-width: 60ch;
}

/* The content right under a title needs less room than a section after another. */
.sidetittel + .seksjon {
    padding-top: 12px;
}

/* The parts of the site, one card each: the title's link covers the card. */
.trykkbokser {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    padding-top: 40px;
}

.trykkboks {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-ink);
    padding: 14px 18px 16px;
}

.trykkboks:hover {
    border-color: var(--color-accent);
}

.trykkboks:focus-within {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.trykkboks h2 {
    border-top: 0;
    padding-top: 0;
    margin: 0;
    font-size: 1.2rem;
}

.trykkboks h2 a {
    color: var(--color-ink);
    text-decoration: none;
}

.trykkboks h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.trykkboks h2 a:focus-visible {
    outline: none;
}

.trykkboks p {
    margin: 0;
    color: var(--color-ink-2);
    font-size: 0.93rem;
}

/* The five marks in a row, on the card that leads to them. */
.merkerad {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.merkerad .statusmerke {
    margin-top: 0;
}

.melding {
    background: var(--color-accent-soft);
    border-left: 3px solid var(--color-accent);
    padding: 12px 16px;
    color: var(--color-ink);
}

.tekst-smal {
    max-width: 44em;
}

/* --- Status marks (ADR 0020) ------------------------------------------------------------------ */

.statusmerke {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    overflow: visible;
}

.status-varsel    { fill: var(--status-alert); }
.status-oppsikt   { fill: var(--status-watch); stroke: var(--status-watch-ink); stroke-width: 1; }
.status-stabil    { fill: var(--status-stable); }
.status-ukjent    { fill: none; stroke: var(--status-unknown); stroke-width: 1.5; }
.status-referanse { fill: var(--status-reference); }

/* The limits on «Om», as a small table that stays readable on a phone. */
.grenser {
    border-collapse: collapse;
    margin: 12px 0 0;
    width: 100%;
    max-width: 36em;
}

.grenser th,
.grenser td {
    text-align: left;
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

/* Column names in small capitals, as in the tables of the course pages. */
.grenser th {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-muted);
    border-bottom: 1.5px solid var(--color-border-2);
    vertical-align: bottom;
}

.grenser .merke-celle {
    width: 28px;
}

/* The name of the status stays on one line; the limit beside it wraps instead. */
.grenser td:nth-child(2) {
    white-space: nowrap;
}

/* --- The status pages the job writes (ADR 0056, ADR 0057) ------------------------------------ */

/* The five counts in the box of Oversikt, a row each: the mark and the name, the number at the right. */
.tellinger {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tellinger li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border);
}

.tellinger li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.telling-navn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.telling-navn .statusmerke {
    margin-top: 0;
}

.telling-tall {
    grid-row: span 2;
    align-self: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.telling-detalj {
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

/* «Funn i kjøringen» as cards, the stroke at the left in the colour of what each is about. */
.funnkort {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.funnkort li {
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--status-stable);
    padding: 12px 16px 14px;
}

.funnkort strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
}

.funnkort p {
    margin: 4px 0 0;
    color: var(--color-ink-2);
    font-size: 0.93rem;
}

.funnkort .funn-alert     { border-left-color: var(--status-alert); }
.funnkort .funn-watch     { border-left-color: var(--status-watch); }
.funnkort .funn-stale     { border-left-color: var(--color-crit); }
.funnkort .funn-change    { border-left-color: var(--color-accent); }
.funnkort .funn-info      { border-left-color: var(--status-stable); }
.funnkort .funn-reference { border-left-color: var(--status-reference); }

/* The table of the overview. */
.tabell-ramme {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.punkter {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
}

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

.punkter thead th {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-muted);
    border-bottom: 1.5px solid var(--color-border-2);
    vertical-align: bottom;
    white-space: nowrap;
}

.punkter tbody th {
    font-weight: 600;
    white-space: nowrap;
}

.punkter tbody tr:last-child th,
.punkter tbody tr:last-child td {
    border-bottom: 0;
}

.status-celle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.status-celle .statusmerke {
    margin-top: 0;
}

.merknad {
    color: var(--color-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* On a phone each row stands as a card: the point as its title, then each cell with its column's name. */
@media (max-width: 640px) {
    .tabell-ramme {
        overflow: visible;
        background: none;
        border: 0;
    }

    .punkter,
    .punkter tbody {
        display: block;
    }

    .punkter thead {
        display: none;
    }

    .punkter tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 12px;
        padding: 8px 0;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
    }

    .punkter th,
    .punkter td,
    .punkter tbody tr:last-child th,
    .punkter tbody tr:last-child td {
        display: flex;
        gap: 12px;
        padding: 4px 16px;
        border: 0;
    }

    .punkter td::before {
        content: attr(data-label);
        flex: 0 0 40%;
        color: var(--color-muted);
        font-size: 0.85rem;
    }

    .punkter tbody th {
        order: -1;
        font-size: 1.1rem;
        padding-bottom: 6px;
    }

    .punkter td:empty {
        display: none;
    }
}

/* --- The map and the charts of the status page (ADR 0056, trinn 3) --------------------------- */

/*
 * Inline SVG: sizes below are in the figure's own units, so they shrink with it. On a phone the words
 * and the marks are set larger, so they stay as large on the screen as on a PC.
 */

.figurtekst {
    color: var(--color-muted);
    font-size: 0.9rem;
    max-width: 52em;
}

.kart-ramme {
    max-width: 860px;
}

.kart {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font-family: var(--font-body);
    overflow: hidden;
}

.kart-flate {
    fill: var(--color-surface);
}

/* Kartverket's map in grey, faint enough for the prisms to stand out; darkened in the dark theme, as in the
   application (ADR 0025). */
.kart-bakgrunn {
    opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
    .kart-bakgrunn {
        filter: invert(1) brightness(0.75) contrast(0.9);
        opacity: 0.55;
    }
}

/* The key under the map: the status marks and an arrow. */
.kart-forklaring {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 10px 0 0;
    padding: 0;
    color: var(--color-ink-2);
    font-size: 0.9rem;
}

.kart-forklaring li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kart-forklaring .statusmerke {
    margin-top: 0;
}

.pilmerke {
    width: 24px;
    height: 12px;
    stroke: var(--color-ink-2);
    stroke-width: 2;
    fill: var(--color-ink-2);
}

.kart-rute {
    stroke: var(--color-surface-3);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.kart-rutetekst {
    fill: var(--color-muted);
    font-size: 11px;
}

.kart-pil {
    stroke-width: 2;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.kart-pilhode {
    stroke: none;
}

.kart-pil.pil-varsel   { stroke: var(--status-alert-ink); }
.kart-pil.pil-oppsikt  { stroke: var(--status-watch-ink); }
.kart-pil.pil-stabil   { stroke: var(--status-stable); }
.kart-pil.pil-ukjent   { stroke: var(--color-muted); }
.kart-pilhode.pil-varsel  { fill: var(--status-alert-ink); }
.kart-pilhode.pil-oppsikt { fill: var(--status-watch-ink); }
.kart-pilhode.pil-stabil  { fill: var(--status-stable); }
.kart-pilhode.pil-ukjent  { fill: var(--color-muted); }

.kart-navn {
    fill: var(--color-ink);
    font-size: 13px;
    font-weight: 600;
    paint-order: stroke;
    stroke: var(--color-surface);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.kart a:hover .kart-navn,
.kart a:focus .kart-navn {
    fill: var(--color-accent);
}

.kart-skala line {
    stroke: var(--color-ink);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.kart-skala text,
.kart-tegn {
    fill: var(--color-ink-2);
    font-size: 12px;
}

.kart-nord {
    fill: var(--color-ink);
    font-size: 12px;
    font-weight: 700;
}

.grafer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.graf {
    margin: 0;
    padding: 12px 14px 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    scroll-margin-top: 16px;
}

.graf:target {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.graf figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.graf figcaption .statusmerke {
    margin-top: 0;
}

.graf figcaption span {
    color: var(--color-ink-2);
    font-size: 0.9rem;
}

.graf-svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: var(--font-body);
}

.graf-flate {
    fill: none;
    stroke: var(--color-border);
    vector-effect: non-scaling-stroke;
}

.graf-rute {
    stroke: var(--color-surface-2);
    vector-effect: non-scaling-stroke;
}

.graf-null {
    stroke: var(--color-border-2);
    stroke-width: 1.2;
    vector-effect: non-scaling-stroke;
}

.graf-tekst {
    fill: var(--color-muted);
    font-size: 12px;
}

.graf-linje {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

/* The series as in Analyse: the daily median orange, the GAM trend dark blue over its band of ± 2 SE. */
.graf-median {
    stroke: var(--plot-daily-median);
    stroke-width: 1.4;
}

.graf-gam {
    stroke: var(--plot-gam);
    stroke-width: 2.2;
}

.graf-band {
    fill: var(--plot-gam);
    fill-opacity: 0.16;
    stroke: none;
}

/* What each line is, above the chart. */
.graf-forklaring {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    margin: 0 0 4px;
    padding: 0;
    color: var(--color-ink-2);
    font-size: 0.85rem;
}

.graf-forklaring li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.strek {
    display: inline-block;
    width: 18px;
    height: 0;
    border-top: 2px solid;
}

.strek-median {
    border-color: var(--plot-daily-median);
}

.strek-gam {
    border-top-width: 3px;
    border-color: var(--plot-gam);
}

.graf-forklaring .band {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    background: var(--plot-gam);
    opacity: 0.2;
}

/* About one point a week carries its day and value for the pointer, shown when the pointer is over it. */
.graf-punkt {
    fill: transparent;
}

.graf-punkt:hover {
    fill: var(--plot-daily-median);
}

@media (max-width: 640px) {
    .kart-navn {
        font-size: 24px;
        stroke-width: 5px;
    }

    .kart-merke {
        transform: scale(1.6);
    }

    /* On a phone the grid's numbers run into one another; the scale bar tells the distances. */
    .kart-rutetekst {
        display: none;
    }

    .kart-skala text,
    .kart-tegn,
    .kart-nord {
        font-size: 20px;
    }

    .grafer {
        grid-template-columns: 1fr;
    }

    .graf-tekst {
        font-size: 19px;
    }
}

/* --- Footer ---------------------------------------------------------------------------------- */

.bunn {
    margin-top: 56px;
    background: var(--color-band);
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.9rem;
}

.bunn .innhold {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 18px;
    padding-bottom: 22px;
}

/* --- Small screens --------------------------------------------------------------------------- */

/* The box goes under the title. */
@media (max-width: 767px) {
    .band .innhold {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 32px;
        padding-bottom: 32px;
    }
}

@media (max-width: 560px) {
    .meny .hoyre {
        margin-left: 0;
    }

    .meny .bruker {
        display: none;
    }

    .trykkboks {
        padding: 12px 14px 14px;
    }
}
