/* data.nlf.no: one look for every page. Aeronautical chart: cool paper, ink, chart blue; magenta only for what is in force */
@font-face {
    font-family: 'Atkinson Hyperlegible';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Atkinson Hyperlegible';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
}

:root {
    color-scheme: light;
    --paper: #f7f9fb;
    --sheet: #ffffff;
    --ink: #13222f;
    --muted: #546676;
    --rule: #d3dce5;
    --blue: #1d4f91;
    --blue-soft: #e6eef8;
    --magenta: #a8326e;
    --magenta-soft: #f8e9f1;
    --code-bg: #eef2f6;
    --font: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
    --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --paper: #0e1a24;
        --sheet: #13222f;
        --ink: #e5ecf2;
        --muted: #9fb0bf;
        --rule: #2a3c4c;
        --blue: #8db8f0;
        --blue-soft: #1a3350;
        --magenta: #ea7cb4;
        --magenta-soft: #3a1c2d;
        --code-bg: #182b3a;
    }
}

* {
    box-sizing: border-box;
}
html {
    font-family: var(--font);
    font-size: 112.5%;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
}
a {
    color: var(--blue);
    text-underline-offset: 0.15em;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}
code,
pre {
    font-family: var(--mono);
    font-size: 0.86em;
}
:not(pre) > code {
    background: var(--code-bg);
    padding: 0.08em 0.3em;
    border-radius: 4px;
    /* Long addresses break rather than push the page wider than a phone */
    overflow-wrap: anywhere;
}

.page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2.2rem 1.25rem 4rem;
}
.masthead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 0.9rem;
    border-bottom: 2px solid var(--ink);
}
.wordmark {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}
.masthead span {
    color: var(--muted);
    font-size: 0.9rem;
}

h1 {
    font-size: 2.35rem;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 2.2rem 0 0.8rem;
}
.lead {
    font-size: 1.12rem;
    color: var(--muted);
    margin: 0 0 2rem;
    max-width: 38rem;
}
h2 {
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 3.2rem 0 0.6rem;
}
h3 {
    font-size: 1.05rem;
    margin: 1.8rem 0 0.5rem;
}
p,
ul {
    max-width: 40rem;
}

/* The try-it strip: a flight progress strip, the aerodrome in its own box */
.strip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    border: 2px solid var(--ink);
    background: var(--sheet);
    border-radius: 6px;
    overflow: hidden;
}
.strip label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-right: 2px solid var(--ink);
    font-size: 0.8rem;
    color: var(--muted);
}
.strip input {
    font: 700 1.9rem/1 var(--font);
    letter-spacing: 0.12em;
    width: 6.2ch;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 0.1rem 0 0;
    text-transform: uppercase;
}
.strip input:focus-visible {
    outline: none;
}
.strip label:focus-within {
    background: var(--blue-soft);
}
.strip .request {
    display: flex;
    align-items: center;
    padding: 0 0.9rem;
    min-width: 0;
    overflow-x: auto;
}
.strip .request code {
    background: none;
    padding: 0;
    white-space: nowrap;
    font-size: 0.92rem;
}
.strip button {
    font: 700 1rem var(--font);
    border: 0;
    border-left: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    padding: 0 1.2rem;
    cursor: pointer;
}
.strip button:hover {
    background: var(--blue);
}
.strip button:disabled {
    opacity: 0.6;
    cursor: progress;
}
.result {
    margin-top: 1rem;
}
.result[hidden] {
    display: none;
}
.result .summary {
    margin: 0 0 0.6rem;
}
.notams {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    max-width: none;
}
.notams li {
    padding: 0.7rem 0.9rem;
    border-left: 4px solid var(--blue);
    background: var(--sheet);
    margin-bottom: 0.5rem;
    border-radius: 0 4px 4px 0;
}
.notams li.active {
    border-left-color: var(--magenta);
}
.notams .head {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    flex-wrap: wrap;
}
.notams strong {
    font-size: 1rem;
}
.status {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
}
.active .status {
    background: var(--magenta-soft);
    color: var(--magenta);
}
.notams .when {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.15rem 0 0;
}
details {
    margin-top: 0.4rem;
}
summary {
    cursor: pointer;
    color: var(--blue);
}
pre {
    background: var(--code-bg);
    padding: 0.9rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
    line-height: 1.45;
    max-height: 28rem;
}
.error {
    color: var(--magenta);
    font-weight: 700;
}

/* Endpoints */
.endpoint {
    display: inline-flex;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-wrap: anywhere;
    gap: 0.6rem;
    align-items: baseline;
    font-family: var(--mono);
    font-size: 1rem;
    background: var(--code-bg);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
}
.endpoint b {
    color: var(--blue);
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.92rem;
    margin: 0.4rem 0 1rem;
}
.table-wrap {
    overflow-x: auto;
}
th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.45rem 0.6rem 0.45rem 0;
    border-bottom: 1px solid var(--rule);
}
th {
    font-weight: 700;
    border-bottom: 2px solid var(--rule);
}
td:first-child {
    white-space: nowrap;
}
.note {
    border-left: 4px solid var(--magenta);
    padding: 0.6rem 0.9rem;
    background: var(--magenta-soft);
    border-radius: 0 4px 4px 0;
}
footer {
    margin-top: 4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 34rem) {
    html {
        font-size: 106%;
    }
    h1 {
        font-size: 1.85rem;
    }
    .strip {
        grid-template-columns: auto 1fr;
    }
    .strip .request {
        grid-column: 1 / -1;
        grid-row: 2;
        border-top: 2px solid var(--ink);
        padding: 0.5rem 0.9rem;
    }
    .strip button {
        padding: 0.8rem 1rem;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .result:not([hidden]) {
        animation: appear 0.25s ease-out;
    }
    @keyframes appear {
        from {
            opacity: 0;
        }
    }
}

/* The way back to the overview from a page under it */
.crumbs {
    margin: 1.6rem 0 0;
    font-size: 0.95rem;
}

/* The overview: the data there is, one after the other */
.datasets {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: none;
    border-top: 2px solid var(--ink);
}
.datasets > li {
    padding: 1.4rem 0 1.5rem;
    border-bottom: 1px solid var(--rule);
}
.datasets h2 {
    margin: 0 0 0.35rem;
}
.datasets h2 a {
    color: var(--ink);
    text-decoration-thickness: 2px;
}
.datasets h2 a:hover {
    color: var(--blue);
}
.datasets p {
    margin: 0 0 0.7rem;
}
.datasets .endpoints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin: 0 0 0.8rem;
}
.datasets .endpoints code {
    background: var(--code-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}