/*
 * orbital.css — Datasphere "Orbital Instrument" design system primitives
 *
 * Layered on top of DaisyUI. DaisyUI is the single source of truth for the
 * palette: every colour lives in the theme definitions in tailwind/input.css
 * and nowhere else. The custom properties below are aliases onto the variables
 * DaisyUI emits, so changing a theme colour, or adding a whole new theme,
 * needs no edit here.
 *
 * What remains in this file is the parts DaisyUI does not cover: the
 * instrument-panel primitives (corner ticks, scanlines, rails, readouts) and
 * two tokens with no DaisyUI equivalent, noted where they are declared.
 *
 * Everything below sits in one `@layer utilities` block, the layer Tailwind's
 * utilities are in, and this file loads after output.css. So a rule here and a
 * Tailwind utility on the same element are settled by specificity and then by
 * order, as they were before Tailwind 4 began putting its CSS in layers; left
 * unlayered, every rule here would beat every utility whatever its specificity,
 * and `hover:text-primary` on an element styled here would never apply. Rules
 * here still beat daisyUI's, which sit in sublayers of utilities. Add new
 * rules above the closing brace at the end of the file: one written after it
 * is unlayered, and a check fails on it.
 */
@layer utilities {

/* ============================================================
   PALETTE ALIASES
   DaisyUI emits its theme colours as custom properties on the [data-theme]
   root (--color-base-100, --color-primary, and so on). Aliasing them means one block covers every
   theme instead of one block per theme repeating the same hex values, which
   is how the two definitions previously drifted apart on --error.
   ============================================================ */

[data-theme] {
    --base:      var(--color-base-100);
    --surface:   var(--color-base-200);
    --surface-2: var(--color-base-300);
    --ink:       var(--color-base-content);
    --signal:    var(--color-primary);
    --pulse:     var(--color-accent);
    --error:     var(--color-error);

    /* No DaisyUI token corresponds to these two.

       --ink-dim is body text at reduced emphasis. It is mixed from the theme's
       own content and base colours rather than pinned to a hex value, so it
       follows the theme instead of needing a new hex per theme. 66% was
       measured, not guessed: against --surface-2, the dimmest background it
       sits on, it gives 5.33:1 on the dark theme and 4.93:1 on the light one,
       both clear of WCAG AA (4.5:1). Re-measure if the theme colours move.

       --grid is the hairline used for rules and borders: the content colour at
       low alpha, so it reads correctly on light and dark alike. */
    --ink-dim:   color-mix(in oklch, var(--color-base-content) 66%, var(--color-base-100));
    --grid:      color-mix(in oklab, var(--color-base-content) 10%, transparent);
}

/* ============================================================
   GLOBAL BODY POLISH
   ============================================================ */

body {
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Text selection uses signal-orange — the visual signature of the brand. */
::selection {
    background: var(--signal);
    color: var(--base);
}

/* ============================================================
   .viewfinder
   Draws four 1px corner-bracket marks on a positioned container.
   Brackets are composed via two pseudo-elements, each carrying
   two corners using clip-path on a border-box outline.
   ============================================================ */

.viewfinder {
    position: relative;
}

.viewfinder::before,
.viewfinder::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: currentColor;
    z-index: 1;
}

/* Top-left + bottom-right corners */
.viewfinder::before {
    background:
        /* top-left horizontal */
        linear-gradient(currentColor, currentColor) 0 0 / 14px 1px no-repeat,
        /* top-left vertical */
        linear-gradient(currentColor, currentColor) 0 0 / 1px 14px no-repeat,
        /* bottom-right horizontal */
        linear-gradient(currentColor, currentColor) 100% 100% / 14px 1px no-repeat,
        /* bottom-right vertical */
        linear-gradient(currentColor, currentColor) 100% 100% / 1px 14px no-repeat;
}

/* Top-right + bottom-left corners */
.viewfinder::after {
    background:
        /* top-right horizontal */
        linear-gradient(currentColor, currentColor) 100% 0 / 14px 1px no-repeat,
        /* top-right vertical */
        linear-gradient(currentColor, currentColor) 100% 0 / 1px 14px no-repeat,
        /* bottom-left horizontal */
        linear-gradient(currentColor, currentColor) 0 100% / 14px 1px no-repeat,
        /* bottom-left vertical */
        linear-gradient(currentColor, currentColor) 0 100% / 1px 14px no-repeat;
}

/* ============================================================
   .readout
   A quiet label: small, dim, in the body face and in the case it
   was written in. It was a mono capitals "telemetry" label until
   #1048.
   ============================================================ */

.readout {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink-dim);
}

/* Footer column headers. .readout is the right voice for the links under a
   header, so the header takes the full ink colour, a heavier weight and a
   larger size to read as the heading of its column instead. */
.footer-heading {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

/* .unit resets text-transform for a unit sitting inside an uppercasing
   context. SI prefixes are case-sensitive: "m" is metre, "M" is mega, and an
   uppercase transform silently turns the former into the latter unless the
   unit is wrapped and released from it. .readout itself no longer uppercases
   (#1048). Wrap the unit in <span class="unit">…</span> wherever it sits
   inside such an ancestor, and write the correct case in the markup
   underneath. */
.unit {
    text-transform: none;
}

/* ============================================================
   .measure-strip
   A single row: LABEL | big-mono-number | unit
   Used for hero stats. Children should be: .measure-strip__label,
   .measure-strip__value, .measure-strip__unit
   ============================================================ */

.measure-strip {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.measure-strip__label {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    line-height: 1;
}

.measure-strip__value {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.measure-strip__unit {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    line-height: 1;
}

/* The home page's figures (#1431): the value first and large, then the one
   thing it measures, with no unit word to read as a second count. The markup
   keeps the label first (dt before dd) for screen readers; the column is
   reversed for the eye. A unit the value needs, "m", sits beside it, smaller. */
.measure-strip--figure {
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--grid);
}

.measure-strip--figure .measure-strip__value {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

/* A date is smaller than a count, but sits on the same baseline so the labels line up. */
.measure-strip--figure .measure-strip__value--tight {
    display: flex;
    align-items: flex-end;
    min-height: clamp(2rem, 4vw, 2.75rem);
    padding-top: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.15;
}

.measure-strip--figure .measure-strip__label {
    line-height: 1.35;
    max-width: 16ch;
}

.measure-strip__suffix {
    margin-left: 0.3rem;
    font-size: 0.45em;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--ink-dim);
}

/* ============================================================
   .grid-bg
   Subtle 1px crosshatch at 24x24px grid using two overlapping
   linear-gradients. Atmospheric reference to map/instrument grids.
   ============================================================ */

.grid-bg {
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ============================================================
   .tick-rule
   A 1px horizontal rule with a 4px-tall, 1px-wide tick at each
   end — like an engineering drawing dimension line.
   ============================================================ */

/* The zero default lives on the element selector, not on .tick-rule. Both this
   file and Tailwind's utilities are single-class specificity, and this file
   loads second, so a `margin: 0` here silently beat every my-8 and mt-10 passed
   at the call site. Forty-one of them were being ignored, which is why rules sat
   hard against the text above and below them. A bare element selector scores
   lower than any utility class, so the zero default still applies and a margin
   utility now wins. */
hr {
    margin: 0;
}

.tick-rule {
    position: relative;
    height: 1px;
    background-color: var(--grid);
    border: none;
}

.tick-rule::before,
.tick-rule::after {
    content: '';
    position: absolute;
    top: -3px;       /* centre the 7px tick on the 1px line */
    width: 1px;
    height: 7px;
    background-color: var(--ink-dim);
}

.tick-rule::before { left: 0; }
.tick-rule::after  { right: 0; }

/* ============================================================
   .scan
   Single very-faint horizontal gradient band that scrolls from
   top to bottom over 8 seconds. Use only on the hero — once,
   sparingly. Opacity 0.06 so it reads as atmosphere, not UI.
   ============================================================ */

@keyframes scan-sweep {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.scan {
    overflow: hidden;
}

/* Only the decorative scanline is non-interactive; the previous rule put
   pointer-events:none on the whole .scan section, which disabled clicks on the
   hero buttons. */
.scan::before {
    content: '';
    pointer-events: none;
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--ink),
        transparent
    );
    opacity: 0.06;
    animation: scan-sweep 8s linear infinite;
    z-index: 2;
}

[data-theme="AD_Theme_Light"] .scan::before {
    opacity: 0.10;
}

/* Respect the OS-level reduced-motion preference: stop the scanline sweep
   entirely rather than merely slowing it, since it is purely decorative. */
@media (prefers-reduced-motion: reduce) {
    .scan::before {
        animation: none;
    }
}

/* ============================================================
   NAV: underline-grow hover effect
   Applied via .nav-link class — underline grows left to right
   in 200ms using a background-size transition.
   ============================================================ */

.nav-link {
    position: relative;
    text-decoration: none;
    background-image: linear-gradient(var(--signal), var(--signal));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: left bottom;
    transition: background-size 200ms ease-out;
}

.nav-link:hover {
    background-size: 100% 1px;
}

/* ============================================================
   #244: DaisyUI .btn brand treatment
   Mono label, uppercase, tracked -- the typographic half of the button
   identity that DaisyUI's own theme variables (see --radius-field etc. in
   tailwind/input.css) cannot express, since DaisyUI has no per-theme
   font/case setting. Applied once to DaisyUI's own .btn class, so a plain
   `btn btn-primary`/`btn btn-outline`/`btn btn-ghost` is already on-brand
   with no per-component CSS to keep in sync -- the replacement for
   .btn-signal/.btn-ghost-line below, which are being converted at each
   call site page by page (#244) and removed once nothing references them.
   ============================================================ */
.btn {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
}

/* ============================================================
   BUTTON OVERRIDES (legacy -- being replaced by the DaisyUI .btn
   treatment above, page by page; see #244)
   Signal-orange squared buttons. Hover inverts ink/bg.
   These add specificity over DaisyUI defaults without removing
   existing DaisyUI utility classes.
   ============================================================ */

.btn-signal {
    background-color: var(--signal);
    color: var(--base);
    border: 1px solid var(--signal);
    border-radius: 0;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    transition: background-color 150ms ease, color 150ms ease;
    padding: 0.5rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

/* .readout pins its colour to --ink-dim, which is a mid tone chosen to sit on a
   surface, not on the signal orange of a filled button. A label wrapped in
   .readout inside one came out orange-on-orange. Let the button decide instead;
   outline variants are unaffected because they set no background. */
.btn-signal .readout,
.btn-signal:hover .readout {
    color: inherit;
}

.btn-signal:hover {
    background-color: var(--ink);
    color: var(--base);
    border-color: var(--ink);
}

[data-theme="AD_Theme_Light"] .btn-signal:hover {
    background-color: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
}

/* A switched-off button must look switched off: Signing's Continue to sign, while documents are drafting, was
   drawn in full colour and read as clickable (stage walk, 9 Nov). Faded as .dash-btn-block[disabled] is; no
   pointer events, so the hover colours of every variant (filled or outline) stay off. */
.btn-signal:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
   SEARCH PAGE ADDITIONS
   Appended by the search-page redesign pass.
   ============================================================ */

/*
 * .result-card
 * Full viewfinder card for search results.
 * Hover shifts the corner brackets (currentColor) to --signal.
 * No transform, no shadow — precision instrument aesthetic.
 */
.result-card {
    color: var(--ink-dim);
    transition: color 150ms ease;
}
.result-card:hover {
    color: var(--signal);
}

/* ============================================================
   DASHBOARD ADDITIONS
   ============================================================ */

/* .dash-shell — root grid for dashboard. CSS-only collapse via [data-collapsed]. */
.dash-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
    background: var(--base);
    transition: grid-template-columns 200ms ease;
}
.dash-shell[data-collapsed="true"] { grid-template-columns: 56px 1fr; }

/* Below the tablet breakpoint there isn't room for the rail beside the
   content at all — the rail's navigation is already reachable through the
   hamburger drawer in the site header, so below this width it is dropped
   entirely rather than squeezed in in either its expanded or icon-only
   form, and the content takes the full viewport width. */
@media (max-width: 768px) {
    .dash-shell,
    .dash-shell[data-collapsed="true"],
    .dash-shell[data-collapsed="false"] {
        grid-template-columns: 1fr;
    }
}

/* .dash-rail — left navigation column */
.dash-rail {
    background: var(--surface);
    border-inline-end: 1px solid var(--grid);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100vh - 64px);
}

/* Below the tablet breakpoint the rail is dropped entirely: its navigation is
   already reachable through the hamburger drawer in the site header, and there
   is no room for it beside the content at 390px. This has to come after the
   base rule above rather than sit with the grid change further up, because an
   equally specific `display: flex` later in the file would otherwise win and
   the rail would keep rendering, stacked above the content. */
@media (max-width: 768px) {
    .dash-rail { display: none; }
}
.dash-rail__inner {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.5rem;
}
.dash-rail__inner::-webkit-scrollbar { width: 4px; }
.dash-rail__inner::-webkit-scrollbar-thumb { background: var(--grid); }

/* .dash-rail__group — heading above a stack of nav items */
.dash-rail__group { margin-bottom: 1rem; }
.dash-rail__heading {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    padding: 0.5rem 0.75rem 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity 150ms ease;
}
.dash-shell[data-collapsed="true"] .dash-rail__heading { opacity: 0; height: 0.5rem; padding: 0; }

/* .dash-rail__item — single nav link (icon + label) */
.dash-rail__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.45rem 0.75rem;
    color: var(--ink-dim);
    font-size: 0.8125rem;
    text-decoration: none;
    border-inline-start: 2px solid transparent;
    white-space: nowrap;
    transition: color 150ms ease, background 150ms ease, border-inline-start-color 150ms ease;
    position: relative;
}

/* Sign-out is a POST form, so the item is a button dressed as the links around it. */
.dash-rail__form { margin: 0; }
button.dash-rail__item {
    width: 100%;
    background: none;
    border-top: 0;
    border-bottom: 0;
    border-inline-end: 0;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}

/* A child of the item above it: indented and a size down, instead of a dash typed into the label. */
.dash-rail__item--sub {
    padding-left: 2rem;
}

.dash-rail__item--sub .label {
    font-size: 0.75rem;
}
.dash-rail__item:hover {
    color: var(--ink);
    background: var(--surface-2);
}
.dash-rail__item.is-active {
    color: var(--signal);
    border-inline-start-color: var(--signal);
    background: rgba(243, 146, 0, 0.04);
}
.dash-rail__item .icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    stroke: currentColor;
}
.dash-rail__item .label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 150ms ease;
}
.dash-shell[data-collapsed="true"] .dash-rail__item .label { opacity: 0; }
.dash-rail__divider {
    border: none;
    border-top: 1px solid var(--grid);
    margin: 0.75rem 0.25rem;
}

/* Top-of-rail user block */
.dash-rail__user {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--grid);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.dash-rail__avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    background: var(--surface-2);
    color: var(--signal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 700;
}
.dash-rail__id { display: flex; flex-direction: column; min-width: 0; transition: opacity 150ms ease; }
.dash-rail__id .who {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-rail__id .role {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--signal);
}
.dash-shell[data-collapsed="true"] .dash-rail__id { opacity: 0; }

/* Toggle button at bottom of rail */
.dash-rail__toggle {
    border: none;
    background: transparent;
    border-top: 1px solid var(--grid);
    padding: 0.625rem;
    color: var(--ink-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    transition: color 150ms ease;
}
.dash-rail__toggle:hover { color: var(--signal); }
.dash-rail__toggle svg { width: 14px; height: 14px; stroke: currentColor; transition: transform 200ms ease; }
.dash-shell[data-collapsed="true"] .dash-rail__toggle svg { transform: rotate(180deg); }
.dash-shell[data-collapsed="true"] .dash-rail__toggle .label { display: none; }

/* .side-tray — the site-wide hamburger drawer's panel
   (section_templates/sidebar.html). Reuses the dash-rail__* item/heading/
   divider/user classes above so the tray reads as the same navigation
   component as the dashboard rail (.dash-rail), not a second visual
   language for the same links — the tray is what carries dashboard
   navigation below the 768px breakpoint where .dash-rail hides itself
   (#276), so the two have to look like one thing (#226). Sized and made
   scrollable itself, since daisyUI's drawer-side does neither on its own. */
.side-tray {
    background: var(--surface);
    min-height: 100vh;
    width: 17rem;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
    border-inline-end: 1px solid var(--grid);
}
.side-tray__inner { flex: 1 1 auto; }

/* .dash-main — main content area */
.dash-main {
    background: var(--base);
    min-height: calc(100vh - 64px);
    padding: 0;
    overflow-x: hidden;
}

/* Reusable page header for partials */
.dash-page {
    padding: 2.5rem 2rem;
    max-width: 80rem;
    margin: 0 auto;
}
.dash-page__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--grid);
    flex-wrap: wrap;
}
.dash-page__title {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-weight: 300;
    font-size: 2.5rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0.25rem 0 0;
}
.dash-page__to { color: var(--signal); }
.dash-page__sub {
    font-size: 0.875rem;
    color: var(--ink-dim);
    margin: 0.5rem 0 0;
    max-width: 38rem;
}

/* Card wrapper */
.dash-card {
    background: var(--surface);
    border: 1px solid var(--grid);
    padding: 1.25rem;
    position: relative;
}
.dash-card--bare { background: transparent; }
/* Cards in one row are one height, so a short card ends level with its neighbour instead of leaving a hole in the page. */
.widget-cell > .dash-card { height: 100%; }

/* Form fields, themed (manual rendering replaces crispy DaisyUI) */
.dash-field { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
/* A field the page folds away stays folded: the display rule above would otherwise override [hidden]. */
.dash-field[hidden] { display: none; }
.dash-field > label, .dash-field__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-dim);
}
.dash-field input[type="text"],
.dash-field input[type="email"],
.dash-field input[type="url"],
.dash-field input[type="password"],
.dash-field input[type="number"],
.dash-field select,
.dash-field textarea,
.dash-input {
    background: var(--base);
    color: var(--ink);
    border: 1px solid var(--grid);
    padding: 0.5rem 0.75rem;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.875rem;
    border-radius: 0;
    width: 100%;
    transition: border-color 150ms ease;
}
.dash-field input:focus,
.dash-field select:focus,
.dash-field textarea:focus,
.dash-input:focus {
    outline: none;
    border-color: var(--signal);
}
/* Native <select> gets a custom mono caret and loses the browser chrome. */
.dash-field select,
.ds-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
        linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) 55%,
        calc(100% - 0.75rem) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-inline-end: 2rem;
    cursor: pointer;
}
.dash-field select:focus,
.ds-select:focus {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--signal) 50%),
        linear-gradient(135deg, var(--signal) 50%, transparent 50%);
}
.dash-field select option,
.ds-select option {
    background: var(--surface-2);
    color: var(--ink);
}

.dash-field .helptext, .dash-field__help {
    font-size: 0.6875rem;
    color: var(--ink-dim);
}
.dash-field .errorlist, .dash-field__error {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--error);
    font-size: 0.75rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Tables */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--grid);
    text-align: start;
}
.dash-table td {
    padding: 0.875rem 0.75rem;
    color: var(--ink);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--grid);
}
/* The name column is the one that can afford to be narrow: it holds prose and
   can break anywhere, where the action column holds a fixed-width button that
   cannot. Without this the table borrowed width from the buttons instead and
   the row grew past the card (#849). */
.dash-table td[data-col="asset"] { overflow-wrap: anywhere; }

/* .dash-table--stack — opt-in mobile behaviour for tables with more columns
   than a narrow viewport can hold (eg. an actions column with more than one
   button). Below the breakpoint each row becomes its own card, stacked
   top-to-bottom, instead of a table that has to scroll sideways. Columns
   that need a label to stay legible on their own line get one from
   data-label; the rest are self-explanatory (a name, a chip, a button). */
@media (max-width: 640px) {
    .dash-table--stack thead { display: none; }
    .dash-table--stack,
    .dash-table--stack tbody { display: block; width: 100%; }
    .dash-table--stack tr {
        display: block;
        border: 1px solid var(--grid);
        padding: 0.875rem 1rem;
        margin: 0 0 0.75rem;
    }
    .dash-table--stack tr:last-child { margin-bottom: 0; }
    .dash-table--stack td {
        display: block;
        border: none;
        padding: 0.25rem 0;
        text-align: left !important;
    }
    .dash-table--stack td[data-col="asset"] { font-weight: 600; padding-top: 0; }
    .dash-table--stack td[data-col="size"]::before {
        content: attr(data-label) ": ";
        color: var(--ink-dim);
        font-size: 0.8125rem;
    }
    .dash-table--stack td[data-col="action"] { padding-top: 0.5rem; padding-bottom: 0; }
    .dash-table--stack td[data-col="action"] a:first-child { margin-left: 0 !important; }
}
.dash-table tr:hover td { background: var(--surface); }

/* The chosen tab or filter in a row of ghost buttons (invitation sections and states). */
.internal-shell .btn-ghost-line.is-active { border-color: var(--signal); background: var(--signal); color: var(--base); }
.dash-card__note strong { color: var(--ink); font-weight: 600; }

/* Alert callouts */
.dash-alert {
    border: 1px solid var(--signal);
    padding: 0.75rem 1rem;
    color: var(--signal);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-alert--success { border-color: var(--pulse); color: var(--pulse); }
.dash-alert--danger { border-color: var(--error); color: var(--error); }

/* Badge readout chips */
/* Dashboard cards: a plain title, one figure, a note (#1048). */
.dash-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.dash-card__title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.4rem; color: var(--ink); margin: 0; }
.dash-card__more { color: var(--ink-dim); font-size: 0.8125rem; text-decoration: none; }
.dash-card__more:hover { color: var(--signal); }
.dash-card__note { color: var(--ink-dim); font-size: 0.8125rem; margin: 0.25rem 0 0; }
/* The second selector outranks .dash-card__title + p, which took the figure's gap under the Spend title down to 0.5rem (#1084). */
.spend-total, .dash-card__title + .spend-total { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 2rem; font-weight: 600; color: var(--ink); margin: 0.75rem 0 0; line-height: 1.1; }
.spend-total__currency { font-size: 0.875rem; font-weight: 400; color: var(--ink-dim); }
.spend-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--grid); }
.spend-windows dt { color: var(--ink-dim); font-size: 0.8125rem; }
.spend-windows dd { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 1.05rem; margin: 0.25rem 0 0; }
.dash-card__more--below { display: inline-block; margin-top: 0.75rem; }
.dash-card__count { color: var(--ink-dim); font-size: 0.8125rem; white-space: nowrap; }
.dash-card__head + .dash-card__note { margin-top: 0.75rem; }
.dash-card__note + .dash-card__note { margin-top: 1rem; }

/* Ranked or bucketed bars: name left, figure right, a thin track under both. */
.dash-bars { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; }
.dash-bars__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.dash-bars__name { color: var(--ink); font-size: 0.9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bars__value { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink-dim); flex-shrink: 0; }
.dash-bars__track { height: 4px; background: var(--grid); margin-top: 0.375rem; position: relative; }
.dash-bars__fill { position: absolute; inset: 0 auto 0 0; background: var(--signal); }

.dash-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.dash-list__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--grid); }
.dash-list__main { min-width: 0; }
.dash-list__name { color: var(--ink); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list__meta { color: var(--ink-dim); font-size: 0.8125rem; }
.dash-list__actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.dash-list__button { padding: 0.3rem 0.7rem; font-size: 0.75rem; cursor: pointer; }
.dash-list__button--quiet { background: none; border: 1px solid var(--grid); color: var(--ink-dim); }
.dash-list__button--quiet:hover { border-color: var(--error); color: var(--error); }

.orders-table__scroll { margin-top: 1rem; overflow-x: auto; max-width: 100%; }
.orders-table { table-layout: fixed; }
.orders-table th, .orders-table td { overflow-wrap: break-word; }
.orders-table th:nth-child(1) { width: 20%; }
.orders-table th:nth-child(2) { width: 38%; }
.orders-table th:nth-child(3) { width: 28%; }
.orders-table th:nth-child(4) { width: 14%; text-align: right; }
.orders-table td[data-col="total"] { text-align: right; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); }
.orders-table__line { font-size: 0.8125rem; color: var(--ink); margin-bottom: 0.25rem; }
.orders-table__supplier { margin-left: 0.5rem; color: var(--ink-dim); }

.coverage-map { margin-top: 1rem; aspect-ratio: 2 / 1; border: 1px solid var(--grid); background: var(--base); overflow: hidden; }
.coverage-map svg { width: 100%; height: 100%; display: block; }
.coverage-map__legend { list-style: none; padding: 0; margin: 0.875rem 0 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }

/* Spend is four figures and nothing else, so it runs the width of the page as a strip: the total on the left, the three windows beside it. Half a column left it a tall card with an empty floor. */
@media (min-width: 1024px) {
    .widget-cell[data-widget-key="spending_summary"] { grid-column: 1 / -1; }
    .spend-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2.5rem; align-items: end; }
    .spend-card .spend-windows { margin: 0; padding: 0 0 0 2.5rem; border-top: 0; border-left: 1px solid var(--grid); }
}

/* A page that is a column of cards. */
.dash-page--stack > .dash-card + .dash-card { margin-top: 1.5rem; }
/* A row of cards in the column (the wallet's balance and payment card) keeps the column's gap above and below. */
.dash-card-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .dash-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-page--stack > .dash-card + .dash-card,
.dash-page--stack > .dash-card-row + .dash-card,
.dash-page--stack > .dash-card + .dash-card-row { margin-top: 1.5rem; }
/* The Organisation Wallet's figures are a <dl>, not a card: keep the column's gap above the card that follows them. */
.dash-page--stack > .dash-facts + .dash-card { margin-top: 1.5rem; }
/* A page whose cards or sections are split by a closed <dialog>: the general sibling combinator spaces each card or section that follows another, which the adjacent rules above miss. */
.dash-page--gapped > :is(.dash-card, section) ~ :is(.dash-card, section) { margin-top: 1.5rem; }
.dash-card__head--actions { align-items: center; flex-wrap: wrap; }
.dash-card__head + form, .dash-card__head + div, .dash-card__head + table { margin-top: 1rem; }
/* A class on a table cell loses to .dash-table th and .dash-table td, and a
   button modifier here loses to .btn-ghost-line further down, so each rule
   below that meets one names it as a second selector (#1084). */
.dash-table__end, .dash-table th.dash-table__end { text-align: right; }
.dash-table__dim, .dash-table td.dash-table__dim { color: var(--ink-dim); }
.dash-table__actions { display: inline-flex; gap: 0.5rem; }
.inline-form { display: inline; }
.btn-ghost-line--dim, .btn-ghost-line.btn-ghost-line--dim { color: var(--ink-dim); }
.card-number { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.dash-form__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.dash-form__actions--ruled { padding-top: 1rem; border-top: 1px solid var(--grid); }
.dash-modal { background: rgba(0, 0, 0, 0.55); }
/* A long form in a modal (the supplier controls, the add-user form) scrolls inside the card, not off the screen. */
.dash-modal__card { max-width: 32rem; margin: 8vh auto 0; background: var(--surface-2); border: 1px solid var(--grid); max-height: 90vh; overflow-y: auto; }
.dash-modal__card--wide { width: 100%; max-width: 40rem; }
.dash-modal__card--table { width: 100%; max-width: 64rem; }
/* A dialog taller than the window scrolls inside its card, and its actions row stays on screen (client onboarding's Add users). */
/* The margin here replaces the one set on .dash-modal__card earlier in this file, so the card sits centred. */
.dash-modal__card { max-height: calc(100dvh - 4rem); overflow-y: auto; overscroll-behavior: contain; margin: 2rem auto; }
.dash-modal .dash-form__actions { position: sticky; bottom: 0; background: var(--surface-2); }
.stripe-card-field { background: var(--base); border: 1px solid var(--grid); padding: 0.75rem; min-height: 2.75rem; }

/* Clearance, licence and account-security pages: a plain card title instead
   of a mono eyebrow, plus the label/value pairs, tier cards and passkey
   list those pages need that nothing above already covers (#1048). */
.dash-page--narrow { max-width: 64rem; }

/* Organisation profile as settings: a header, then titled groups of hairline-ruled rows with the label and its line at
   the left and the values at the right (#1066). The shared KYC cards and the photo field sit flat inside a row. */
.dash-settings__head { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.dash-settings__logo { width: 7rem; height: 7rem; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface-2); border: 1px solid var(--grid); font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 3rem; color: var(--signal); }
.dash-settings__logo img { width: 100%; height: 100%; object-fit: cover; }
.dash-settings__id { flex: 1 1 14rem; min-width: 0; }
.dash-settings__link { display: block; margin-top: 0.5rem; font-size: 0.9375rem; color: var(--ink-dim); overflow-wrap: anywhere; }
.dash-settings__chip { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--ink-dim); }
.dash-settings__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.dash-settings { margin-bottom: 2.5rem; }
.dash-settings__title { padding-bottom: 0.875rem; border-bottom: 1px solid var(--grid); }
.dash-settings__title h2 { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.5rem; color: var(--ink); margin: 0; }
.dash-settings__title p { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--ink-dim); }
.dash-settings__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem 2.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--grid); }
.dash-settings__name { font-size: 0.9375rem; font-weight: 500; color: var(--ink); margin: 0; }
.dash-settings__line { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--ink-dim); }
.dash-settings__fields { min-width: 0; }
.dash-settings__fields .dash-field:last-child { margin-bottom: 0; }
.dash-settings__item { display: flex; flex-direction: column; gap: 0.125rem; margin: 0 0 1rem; }
.dash-settings__item:last-child { margin-bottom: 0; }
.dash-settings__fields .dash-field__value { margin-top: 0; }
.dash-settings__fields .dash-card { background: none; border: 0; padding: 0; margin: 0; }
.dash-settings__fields legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dash-settings__fields fieldset { min-width: 0; padding: 0; border: 0; }
.dash-settings__fields fieldset.dash-field { padding-top: 0.75rem; border-top: 1px solid var(--grid); }
.dash-settings__fields fieldset.dash-field:first-of-type { padding-top: 0; border-top: 0; }
.dash-settings > .dash-card { margin: 1.25rem 0 0; }
@media (max-width: 767px) {
    .dash-settings__row { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 0; }
    .dash-settings__logo { width: 5rem; height: 5rem; font-size: 2rem; }
    .dash-settings__actions { margin-left: 0; }
}
.dash-page--compact { max-width: 56rem; }
.dash-page__head--bare { border-bottom: none; margin-bottom: 1.25rem; }
.dash-section-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.75rem; margin: 0.25rem 0 0; color: var(--ink); }
.dash-card__title--signal { color: var(--signal); }
.dash-field__value { font-size: 1.125rem; color: var(--ink); margin: 0.25rem 0 0; }
.dash-prose { color: var(--ink); font-size: 0.875rem; }
.dash-details-summary { cursor: pointer; font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;  color: var(--ink-dim); font-size: 0.8125rem; }
.dash-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1rem; }
.dash-feature-list { margin-top: 1rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8125rem; color: var(--ink); }
.dash-btn-blocks { margin-top: 1.1rem; }
.dash-btn-block { width: 100%; justify-content: center; }
.dash-btn-block[disabled] { opacity: 0.5; cursor: not-allowed; }
.dash-tier-file-label { font-size: 0.7rem; display: block; margin-bottom: 0.4rem; }
.dash-tier-file { width: 100%; font-size: 0.75rem; color: var(--ink); margin-bottom: 0.75rem; }
/* Second selectors outrank .btn-ghost-line further down and .dash-card input (#1084). */
.btn-ghost-line--danger, .btn-ghost-line.btn-ghost-line--danger { border-color: var(--error); color: var(--error); }
.dash-passkey { border: 1px solid var(--grid); padding: 0.75rem 0.875rem; }
.dash-passkey__label { color: var(--ink); font-size: 0.9375rem; }
.dash-passkey-input, .dash-card .dash-passkey-input { background: var(--base); color: var(--ink); border: 1px solid var(--grid); padding: 0.375rem 0.5rem; font-size: 0.8125rem; flex: 1 1 auto; min-width: 6rem; }
.dash-passkey-add-input, .dash-card .dash-passkey-add-input { background: var(--base); color: var(--ink); border: 1px solid var(--grid); padding: 0.5rem 0.625rem; font-size: 0.875rem; flex: 1 1 12rem; }

/* A fact as a label over its value. */
.dash-facts { margin-top: 0; }
.dash-card__title + .dash-facts { margin-top: 0.875rem; }
.dash-facts dt { color: var(--ink-dim); font-size: 0.8125rem; }
.dash-facts dd { margin-left: 0; }
.dash-facts__value { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.4rem; color: var(--ink); margin: 0.125rem 0 0; }
.dash-facts__value--signal { color: var(--signal); }
/* .dash-alert sets display, which beats the user agent's [hidden] rule. */
.dash-alert[hidden] { display: none; }
.dash-card__title + form, .dash-card__title + .dash-field { margin-top: 1rem; }
.dash-card__note + .btn-signal, .dash-card__note + .dash-alert, .dash-card__note + div { margin-top: 1rem; }

/* API keys, tasking, archive and organisation-member pages: a plain card
   title in place of a mono eyebrow, compact filter bars, inline mono form
   fields and the key/member rows those pages need (#1048). */
.dash-card__head--top { align-items: flex-start; }
.dash-card__note--wide { max-width: 36rem; }
.dash-card__note--inline { margin: 0; }
/* Second selectors outrank .dash-card input, .dash-table td and .btn-ghost-line further down (#1084). */
.dash-input-mono, .dash-card .dash-input-mono { background: var(--base); color: var(--ink); border: 1px solid var(--grid); padding: 0.5rem 0.625rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; }
.dash-facts__value--mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 500; }
.dash-facts__value--pulse { color: var(--pulse); }
.dash-mono--pulse, .dash-table td.dash-mono--pulse { color: var(--pulse); }
.btn-ghost-line--revoke, .btn-ghost-line.btn-ghost-line--revoke { font-size: 0.6875rem; color: var(--pulse); border-color: var(--pulse); }
.dash-filter-bar { padding: 0.875rem 1rem; margin-bottom: 1rem; }
.dash-filter-bar__row { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }
.dash-filter-bar__search { position: relative; flex: 1 1 14rem; min-width: 10rem; }
/* The filter bar sits in a .dash-card, whose input and select rule outranked these (#1084). */
.dash-filter-bar__input, .dash-card .dash-filter-bar__input { width: 100%; background: transparent; border: 1px solid var(--grid); padding: 0.375rem 0.625rem; font-size: 0.8125rem; color: var(--ink); }
.dash-filter-bar__group { display: flex; align-items: center; gap: 0.375rem; }
.dash-filter-bar__select, .dash-card .dash-filter-bar__select { background: transparent; border: 1px solid var(--grid); padding: 0.375rem 0.5rem; font-size: 0.8125rem; color: var(--ink); }
.dash-filter-bar__label, .dash-filter-bar__clear, .dash-filter-bar__apply { white-space: nowrap; }
.dash-card--flush { padding: 0; }
.dash-empty { padding: 2.5rem; text-align: center; border: 1px dashed var(--grid); }
.dash-empty--tight { padding: 2.5rem; text-align: center; }
.dash-member-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.dash-member-avatar { width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--grid); flex: 0 0 80px; }
.dash-member-avatar--placeholder { background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.5rem; color: var(--signal); }
.dash-member-info { min-width: 0; }
.dash-member-name { color: var(--ink); margin: 0; }
.dash-member-email { color: var(--ink-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; margin: 0.25rem 0; }
.dash-member-country { margin: 0.5rem 0 0; }
.readout--signal { color: var(--signal); }
.dash-member-facts { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.dash-member-facts dd { margin-top: 0.25rem; }
.dash-role-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.25rem; }
.dash-role-edit, .btn-ghost-line.dash-role-edit { padding: 0.25rem 0.5rem; }
.dash-role-list { display: flex; flex-direction: column; gap: 0.375rem; }
.dash-role-checkbox { display: flex; gap: 0.5rem; align-items: center; color: var(--ink); font-size: 0.8125rem; }
.dash-role-save { margin-top: 0.5rem; padding: 0.25rem 0.75rem; }
.dash-library-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--grid); }
/* In a .dash-table cell these lose to .dash-table td, so they name it too; --dim stays last so it still wins (#1084). */
.dash-mono-sm, .dash-table td.dash-mono-sm { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink); }
.dash-mono-xs, .dash-table td.dash-mono-xs { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; color: var(--ink-dim); }
.dash-mono--dim, .dash-table td.dash-mono--dim { color: var(--ink-dim); }

/* Basket and checkout (partials/basket_table.html). Figures are mono; words are not. */
.basket-page { max-width: 80rem; margin: 0 auto; padding: 2rem 1rem; }
.basket-error { padding: 0.85rem 1rem; }
.basket-error__text { color: var(--signal); font-size: 0.875rem; }
.basket-link { color: var(--signal); }
.basket-link--small { font-size: 0.75rem; }
/* On a phone the table is wider than its card; without this the price and the remove control were off the edge and unreachable. */
.basket-table-wrap { overflow-x: auto; }
.basket-table__end { text-align: right; }
.basket-table__thumb-cell { width: 6rem; }
.basket-table__remove-cell { width: 3rem; }
.basket-table__panel-cell { padding-top: 0; border-top: none; }
.basket-thumb { width: 5rem; height: 3.75rem; overflow: hidden; border: 1px solid var(--grid); }
.basket-thumb--empty { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 8px 8px; }
.basket-thumb__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.basket-product { color: var(--ink); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; margin: 0; }
.basket-product--link { text-decoration: none; border-bottom: 1px solid var(--grid); }
.basket-meta { color: var(--ink-dim); font-size: 0.8125rem; margin: 0; }
.basket-amount { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.basket-amount--vat { color: var(--ink-dim); font-size: 0.8rem; }
.basket-amount--price { color: var(--pulse); font-weight: 700; font-size: 0.875rem; }
.basket-amount__note { display: block; font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-weight: 400; font-size: 0.75rem; color: var(--ink-dim); }
.basket-remove { background: transparent; border: 1px solid var(--grid); color: var(--ink-dim); font-size: 0.75rem; line-height: 1; padding: 0.35rem 0.5rem; cursor: pointer; }
.basket-remove:hover { border-color: var(--error); color: var(--error); }
.basket-panel { border: 1px solid var(--grid); padding: 0.6rem 0.8rem; }
.basket-panel__summary { cursor: pointer; color: var(--ink-dim); font-size: 0.8125rem; }
.basket-panel__form { margin-top: 0.75rem; }
.basket-added { color: var(--pulse); font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.basket-choice { display: grid; grid-template-columns: 1fr 14rem; gap: 0.5rem 1rem; align-items: start; margin-bottom: 0.7rem; }
.basket-choice__label { color: var(--ink); font-size: 0.8125rem; margin: 0; }
.basket-choice__note { color: var(--ink-dim); font-size: 0.75rem; margin: 0.15rem 0 0; }
.basket-select { width: 100%; padding: 0.35rem 0.5rem; background: var(--base-200); color: var(--ink); border: 1px solid var(--base-content); }
.basket-select--pay { margin-bottom: 0.85rem; padding: 0.4rem 0.5rem; }
.basket-check { display: flex; gap: 0.5rem; font-size: 0.75rem; color: var(--ink-dim); margin-bottom: 0.85rem; cursor: pointer; }
.basket-check--offer { font-size: 0.8125rem; color: var(--ink); margin-bottom: 0.5rem; }
.basket-check__box { accent-color: var(--signal); margin-top: 0.15rem; }
.basket-check__more { display: block; margin-top: 0.3rem; }
.basket-disclaimer { color: var(--ink-dim); font-size: 0.75rem; margin: 0.6rem 0 0.5rem; }
.basket-heading { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.25rem; color: var(--ink); margin: 0 0 0.75rem; }
.basket-summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; align-items: baseline; margin: 0 0 1rem; }
.basket-summary dt { color: var(--ink-dim); font-size: 0.8125rem; }
.basket-summary dd { margin: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 0.875rem; }
.basket-total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 0.875rem; border-top: 1px solid var(--grid); }
.basket-total__label { color: var(--ink-dim); font-size: 0.875rem; }
.basket-total__amount { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 700; color: var(--signal); font-size: 1.5rem; }
.basket-note { color: var(--ink-dim); font-size: 0.75rem; margin: 0.4rem 0 0; }
.basket-note--centre { margin-top: 0.75rem; text-align: center; }
.basket-pay { margin-top: 1rem; }
.basket-pay__label { display: block; font-size: 0.75rem; color: var(--ink-dim); margin-bottom: 0.3rem; }
.basket-empty__text { color: var(--ink-dim); font-size: 0.875rem; margin-bottom: 1.25rem; }

/* Model card and provenance pages: a centred column of cards (#1048). */
.dash-page--model-card { max-width: 60rem; margin: 0 auto; padding: 2rem 1rem; }
.dash-page--provenance { max-width: 70rem; margin: 0 auto; padding: 2rem 1rem; }
.dash-card--flagged { border-left: 3px solid var(--ink-dim); }
.dash-card__title + pre { margin-top: 0.75rem; }

/* Provenance lineage tree. A row's indent is its depth times 1.5rem, set inline
   from the node's depth, the one inline style the template keeps. */
.provenance-tree { list-style: none; margin: 1rem 0 0; padding: 0; }
.provenance-tree__row { padding: 0.4rem 0; border-top: 1px solid var(--grid); }
.provenance-tree__glyph { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink-dim); }
.provenance-step { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--grid); }
.provenance-step__head { margin: 0; color: var(--ink); }

/* A plain link in signal colour, no underline (identifiers, thumbnail URLs). */
.dash-link { color: var(--signal); text-decoration: none; }

/* Docs, API credentials, order detail and tasking review (#1048 slice 11). */
.readout--tight { font-size: 0.75rem; }

.docs-link--signal { color: var(--signal); }
/* The second selector outranks .docs-section a, which turned the step cards signal-coloured (#1084). */
.docs-step--link, .docs-section .docs-step--link { text-decoration: none; color: inherit; }
.docs-faq-list { border-color: var(--grid); }
.docs-faq-term { font-weight: 600; }

.dash-card .dash-card__credential-input {
    flex: 1;
    background: var(--base);
    color: var(--ink);
    border: 1px solid var(--grid);
    padding: 0.625rem 0.75rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.875rem;
    border-radius: 0;
}
.dash-card .dash-card__credential-input--signal { color: var(--signal); border-color: var(--signal); }
.dash-card__mono-value { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); margin-top: 0.5rem; }

.order-line__supplier { color: var(--ink-dim); font-size: 0.8125rem; }
/* Second selectors outrank .dash-table td and .order-status-note further down (#1084). */
.order-line__size, .dash-table td.order-line__size { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink-dim); font-size: 0.8125rem; }
.order-price-cell { text-align: right; font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.order-status-note--tight, .order-status-note.order-status-note--tight { margin-bottom: 0.85rem; }
.order-empty-note { padding: 2rem; text-align: center; color: var(--ink-dim); font-size: 0.875rem; }
.order-derived-note { padding: 1.5rem; color: var(--ink-dim); font-size: 0.875rem; }
.order-cta { margin-top: 0.85rem; }

.tasking-review-page { max-width: 72rem; margin: 0 auto; padding: 2rem 1rem; }
.tasking-review-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 2rem; color: var(--ink); margin: 0.25rem 0 1.5rem; }
.tasking-review-list { display: flex; flex-direction: column; gap: 0.75rem; }
.tasking-review-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tasking-review-card__title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.25rem; color: var(--ink); margin: 0; }
.tasking-review-status { border: 1px solid var(--grid); color: var(--ink); padding: 0.3rem 0.6rem; }
.tasking-review-card__meta { margin: 0.35rem 0 0.75rem; }
.tasking-review-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.tasking-review-field { display: flex; flex-direction: column; gap: 0.25rem; color: var(--ink-dim); }
.dash-card .tasking-review-select { background: transparent; border: 1px solid var(--grid); color: var(--ink); padding: 0.4rem; }
.dash-card .tasking-review-input { background: transparent; border: 1px solid var(--grid); color: var(--ink); padding: 0.4rem; }
.dash-card .tasking-review-input--price { width: 8rem; }
.dash-card .tasking-review-input--ref { width: 10rem; }
.tasking-review-submit { padding: 0.45rem 1rem; }

/* STAC upload item and collection pages: metadata tables and collapsible
   raw-data blocks inside a flush (zero-padding) card (#1048). */
.dash-card__section-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--grid); }
.dash-card__section-head--split { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.stac-table__key { color: var(--ink-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; width: 14rem; }
.stac-table__key--narrow { width: 12rem; }
.stac-table__value--wrap { word-break: break-all; }
.stac-table__aside { color: var(--ink-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem; }
.stac-table--panel { background: var(--base); }
.stac-details { border-bottom: 1px solid var(--grid); }
.stac-details:last-child { border-bottom: none; }
.stac-details__summary { padding: 0.75rem 1.25rem; cursor: pointer; color: var(--ink); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8rem; user-select: none; }
.stac-details__pre { margin: 0; padding: 1rem 1.25rem; background: var(--base); border-top: 1px solid var(--grid); color: var(--ink-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; overflow-x: auto; max-height: 30rem; }
.stac-map-wrap { padding: 1rem 1.25rem; }
.stac-map { height: 38vh; width: 100%; border: 1px solid var(--grid); }
.stac-pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1rem; border-top: 1px solid var(--grid); }
.stac-pagination__btn { padding: 0.25rem 0.625rem; }
.stac-pagination__btn[disabled] { opacity: 0.35; }
.stac-pagination__count { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0.18em; color: var(--ink-dim); }
.stac-pagination__count strong { color: var(--signal); font-weight: 700; }
.stac-empty { padding: 1.5rem; text-align: center; }

.status-checked { color: var(--ink-dim); font-size: 0.875rem; margin: 1.5rem 0 1rem; }
.dash-card__title + p { margin-top: 0.5rem; }

.order-ref { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--signal); text-decoration: none; }

/* Public catalogue pages (#1048 slice 9) */
.readout--ink { color: var(--ink); }
.readout--pulse { color: var(--pulse); }
.readout--grid { color: var(--grid); }
.rule-bottom { border-bottom: 1px solid var(--grid); }
.pp-panel-frame { border: 1px solid var(--grid); }
.pp-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--ink); }
.pp-subtitle { font-size: 1.75rem; color: var(--ink); }
.code-pre { white-space: pre-wrap; }

/* Stripe Connect dashboard partial (#1048 slice 10) — colour/border frames
   that were repeated inline across status panels. */
.pulse-frame { border-color: var(--pulse); color: var(--pulse); }
.signal-frame { border-color: var(--signal); }
.grid-frame { border-color: var(--grid); }
.grid-frame-dashed { border-color: var(--grid); border-style: dashed; }
.pulse-border-left { border-color: var(--pulse); }
.grid-border-top { border-color: var(--grid); }
.grid-border-bottom { border-color: var(--grid); }

/* Dataset products page (#1048 slice 11). */
.mono-face { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.measure-strip__value--platform { font-size: 1.25rem; font-weight: 400; line-height: 1.2; padding-top: 0.25rem; }
.bg-signal-solid { background: var(--signal); color: var(--base); }
/* The page-wide #map rules set the map height by id, 420px, so the second selector names it too (#1084). */
.dataset-map-frame, #map.dataset-map-frame { height: 480px; }
.hero-scrim { background: linear-gradient(to bottom, rgba(10, 11, 13, 0.72) 0%, rgba(10, 11, 13, 0.55) 50%, rgba(10, 11, 13, 0.80) 100%); }
.hero-scrim--left { background: linear-gradient(to right, rgba(10, 11, 13, 0.78) 0%, rgba(10, 11, 13, 0.35) 42%, transparent 68%); }
.hero-display--home { font-size: clamp(2.5rem, 6vw, 4.5rem); color: var(--ink); max-width: 15ch; }
.btn-signal--outline { background: transparent; color: var(--ink); border-color: var(--ink-dim); }
.carousel-strip { pointer-events: none; }
.carousel-caption { pointer-events: auto; color: var(--ink-dim); }
/* The credit a backdrop's licence asks for, as text beside the picture (#1208): the
   Copernicus Sentinel terms want their notice wherever such a picture is shown. Its
   own ground keeps it legible over any picture: this text on this ground laid over
   pure white is 6.6:1, over pure black 16.2:1, so WCAG AA holds at this size. */
.backdrop-credit { width: fit-content; max-width: 32rem; padding: 0.125rem 0.375rem; font-size: 0.6875rem; line-height: 1.45; color: #e6e7ea; background: rgba(10, 11, 13, 0.72); }
.backdrop-credit--corner { position: absolute; right: 1rem; bottom: 1rem; z-index: 10; max-width: min(32rem, calc(100% - 2rem)); text-align: right; }
.measure-strip__value--tight { font-size: 1.1rem; padding-top: 0.45rem; }
.card-tile { aspect-ratio: 4 / 3; outline-color: var(--signal); }
.card-tile--square { aspect-ratio: 1 / 1; }
.card-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.card-tile-scrim { background: linear-gradient(to top, rgba(10, 11, 13, 0.92) 0%, rgba(10, 11, 13, 0.45) 45%, transparent 75%); z-index: 2; }
.card-tile-scrim--tight { background: linear-gradient(to top, rgba(10, 11, 13, 0.85) 0%, transparent 60%); }
.card-tile-title { font-size: 1.1rem; color: var(--ink); }
.provider-banner { background: var(--surface-2); border-bottom: 1px solid var(--grid); }
.provider-avatar { background: var(--base); border-color: var(--grid); }
.provider-brand-plate { background: #fff; }
.provider-spec-card { background: var(--surface); border-color: var(--grid); }
.provider-spec-item { border-color: var(--grid); }
.provider-figure { border-color: var(--grid); }
.provider-figcaption { border-top: 1px solid var(--grid); }
.registry-panel { border-color: var(--grid); }

/* Supplier widgets, orders list, organisation roles, registry, providers index (#1048 slice 13). */
.swidget-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.swidget-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.4rem; color: var(--ink); margin: 0.25rem 0 0; }
.inventory-metrics { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; }
.inventory-figure { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 1.4rem; margin: 0.25rem 0 0; }
.inventory-figure--signal { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--signal); font-size: 1.05rem; margin: 0.25rem 0 0; }
.inventory-rule { margin: 1rem 0 0.75rem; }
.inventory-spark { width: 100%; height: 56px; display: block; margin-top: 0.25rem; }
.top-collections-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; }
.top-collections-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.top-collections-label { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.top-collections-name { color: var(--ink); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-collections-count { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--signal); font-size: 0.875rem; }
.top-collections-bar { height: 4px; background: var(--grid); margin-top: 0.375rem; position: relative; }
.top-collections-fill { position: absolute; inset: 0 auto 0 0; background: var(--signal); }
.top-collections-revenue { margin-top: 0.25rem; }
.top-collections-empty { margin-top: 1rem; }

/* User dashboard weights: titles 500, figures 600, labels 500. Scoped to the dashboard shell because the
   same classes also set the staff console, licensing, MFA and public pages, which keep their own weights. */
.dash-shell:not(.dash-shell--console) .dash-card__title,
.dash-shell:not(.dash-shell--console) .swidget-title { font-weight: 500; }
.dash-shell:not(.dash-shell--console) .revenue-figure,
.dash-shell:not(.dash-shell--console) .inventory-figure,
.dash-shell:not(.dash-shell--console) .inventory-figure--signal { font-weight: 600; }
.dash-shell:not(.dash-shell--console) .readout,
.dash-shell:not(.dash-shell--console) .measure-strip__label,
.dash-shell:not(.dash-shell--console) .dash-bars__name,
.dash-shell:not(.dash-shell--console) .top-collections-name { font-weight: 500; }
.orders-card { padding: 0; margin-bottom: 1.25rem; }
/* #1118 set these as inline styles; #1119 moved them here (Ryan: classes carrying
   #1118's values). Named with the card so they outrank .dash-table td. */
.orders-card .dash-table td { vertical-align: baseline; }
.orders-line { font-size: 0.8125rem; color: var(--ink); margin-bottom: 0.2rem; }
.orders-line-provider { display: block; }
.dash-table td.orders-total { text-align: right; font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--pulse); font-weight: 700; font-size: 0.875rem; }
.orders-pager { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
.orders-pager-status { align-self: center; }
.orders-empty { text-align: center; padding: 3rem 1.5rem; border: 1px dashed var(--grid); }
.orders-empty-title { margin-bottom: 0.75rem; }
.orders-empty-note { color: var(--ink-dim); font-size: 0.875rem; margin-bottom: 1.25rem; }
.org-role-actions { display: flex; gap: 0.5rem; }
.dash-card--flush { padding: 0; }
.org-role-panel-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--grid); }
.dash-table td.org-role-dim { color: var(--ink-dim); }
.dash-table td.org-role-ids { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; color: var(--ink-dim); }
.org-role-empty { padding: 1.5rem; text-align: center; color: var(--ink-dim); }
.org-role-members { list-style: none; margin: 0; padding: 0.5rem 1.25rem; }
.org-role-member { padding: 0.375rem 0; color: var(--ink); font-size: 0.8125rem; }
.org-role-member-empty { padding: 0.75rem 0; color: var(--ink-dim); }
.org-role-back { margin-top: 1rem; }

/* ============================================================
   Providers page (#1431)
   The page has depth from the theme's own colours: a warm signal glow
   at the top right, a faint ink shadow at the bottom left and the map
   grid fading out from the glow. Nothing is pinned to a hex value, so
   it reads on the light theme and the dark one alike.
   ============================================================ */
.providers-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(60rem 30rem at 88% -6%, color-mix(in oklch, var(--signal) 16%, transparent), transparent 70%),
        radial-gradient(44rem 26rem at -8% 104%, color-mix(in oklch, var(--ink) 7%, transparent), transparent 70%),
        linear-gradient(180deg, var(--surface) 0%, var(--base) 26rem);
}
.providers-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 85% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 55% at 85% 0%, #000 0%, transparent 75%);
}
/* The head of the provider application and its receipt: a form's title and what
   happens to what you send, read in full ink before the form (#1048). */
.providers-head { display: grid; gap: 1rem; margin-bottom: 3.5rem; }
.providers-head__title {
    margin: 0;
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.providers-head__lede { margin: 0; max-width: 52ch; font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }

/* Cards sitting side by side are level, because a grid item fills its row. A row is as tall as its tallest
   card and no more, so a card alone on a row is not stretched to the height of the other rows. The card fills
   its cell. */
.supplier-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.supplier-grid > li { display: flex; min-width: 0; }
@media (min-width: 768px) { .supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .supplier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.supplier-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
    background: color-mix(in oklch, var(--surface) 92%, transparent);
    border: 1px solid var(--grid);
    box-shadow: 0 22px 44px -30px rgb(0 0 0 / 0.55);
    transition: border-color 200ms ease, transform 280ms cubic-bezier(.22,.61,.36,1);
}
.supplier-card:hover { border-color: color-mix(in oklch, var(--signal) 60%, var(--grid)); transform: translateY(-2px); }
.supplier-card:hover .supplier-card__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* The banner: one of the provider's scenes with its logo, name and location laid over the foot, in light
   text on a dark scrim so they read over any picture on either theme. No credit is set on it; the picture
   and its credit are on the provider's profile. A provider with no scene gets the same banner as a
   plate, its mark on the map grid under a faint signal glow. */
.supplier-card__banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    padding: 0.875rem 1.25rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--grid);
}
.supplier-card__banner--plate {
    background:
        radial-gradient(22rem 12rem at 100% 0%, color-mix(in oklch, var(--signal) 12%, transparent), transparent 70%),
        linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
        var(--surface-2);
}
.supplier-card__scene { position: absolute; inset: 0; overflow: hidden; }
.supplier-card__scene::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(10, 11, 13, 0.55) 0%, transparent 26%),
        linear-gradient(to top, rgba(10, 11, 13, 0.85) 0%, rgba(10, 11, 13, 0.4) 40%, transparent 72%);
}
.supplier-card__scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.supplier-card:hover .supplier-card__scene-img { transform: scale(1.03); }
/* Where and when the scene was taken, small and at the top, clear of the logo, name and location. */
.supplier-card__scene-caption { position: absolute; z-index: 1; top: 0.625rem; left: 0.875rem; right: 0.875rem; margin: 0; font-size: 0.6875rem; line-height: 1.4; color: #e6e7ea; text-shadow: 0 1px 3px rgba(10, 11, 13, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.supplier-card__ident { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.supplier-card__mark {
    flex: none;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--base);
    border: 1px solid var(--grid);
    box-shadow: 0 8px 18px -10px rgb(0 0 0 / 0.6);
}
.supplier-card__mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.supplier-card__mark--plate { background: #fff; padding: 0.6rem; }
.supplier-card__monogram { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 1.75rem; font-weight: 300; color: var(--ink); }
.supplier-card__name { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.75rem; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.supplier-card__location { margin: 0.2rem 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-dim); }
.supplier-card__banner:not(.supplier-card__banner--plate) .supplier-card__name { color: #f4f5f7; text-shadow: 0 1px 6px rgba(10, 11, 13, 0.55); }
.supplier-card__banner:not(.supplier-card__banner--plate) .supplier-card__location { color: rgba(230, 231, 234, 0.85); }

.supplier-card__body { flex: 1; display: flex; flex-direction: column; gap: 0.875rem; padding: 1rem 1.25rem 0; }
.supplier-card__tagline { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--ink-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.supplier-card__kinds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.supplier-card__kinds li { padding: 0.3rem 0.5rem; font-size: 0.75rem; line-height: 1; color: var(--ink); border: 1px solid color-mix(in oklch, var(--signal) 45%, var(--grid)); }
.supplier-card__fleet { margin: 0; border-top: 1px solid var(--grid); }
.supplier-card__fleet > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--grid); }
.supplier-card__fleet dt { font-size: 0.8125rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.supplier-card__fleet dd { margin: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; line-height: 1.5; color: var(--ink-dim); }
/* A sensor type linked to the page on the company website that explains it. */
.eo-guide-link { color: var(--signal); text-decoration: none; border-bottom: 1px dashed currentColor; white-space: nowrap; }
.eo-guide-link:hover, .eo-guide-link:focus-visible { border-bottom-style: solid; }
.supplier-card__open { display: flex; align-items: center; gap: 0.4rem; padding: 1.125rem 1.25rem; font-size: 0.8125rem; color: var(--signal); }
.supplier-card:hover .supplier-card__open svg { transform: translateX(3px); }
.supplier-card__open svg { transition: transform 280ms cubic-bezier(.22,.61,.36,1); }

@media (prefers-reduced-motion: reduce) {
    .supplier-card, .supplier-card__scene-img, .supplier-card__open svg { transition: none; }
    .supplier-card:hover, .supplier-card:hover .supplier-card__scene-img, .supplier-card:hover .supplier-card__open svg { transform: none; }
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--grid);
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    white-space: nowrap;
    color: var(--ink-dim);
}
.dash-chip--signal { border-color: var(--signal); color: var(--signal); }
.dash-chip--pulse { border-color: var(--pulse); color: var(--pulse); }
.dash-chip--alert { border-color: var(--error); color: var(--error); }

/* Ghost button */
.btn-ghost-line {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--grid);
    border-radius: 0;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* A squeezed table column used to break "Download all" over two lines and
       push the button past the card edge (#849). The label is two short words
       on a fixed-width control, so it never wants a line break. */
    white-space: nowrap;
    transition: border-color 150ms ease, color 150ms ease;
}
.btn-ghost-line:hover { border-color: var(--signal); color: var(--signal); }

/* Welcome quick-link tile */
.dash-tile {
    display: block;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--grid);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
    position: relative;
}
.dash-tile:hover { border-color: var(--signal); color: var(--signal); }
.dash-tile__head {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    margin-bottom: 0.5rem;
}
.dash-tile__title {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-weight: 400;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: inherit;
}
.dash-tile__body { font-size: 0.8125rem; color: var(--ink-dim); }

/* Console overview: a loud strip for queues with work in them, quiet figures after it. */
.dash-action-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.dash-action {
    display: grid; gap: 0.25rem; padding: 1.25rem 1.5rem;
    background: var(--surface); border: 1px solid var(--grid); border-left: 4px solid var(--error);
    color: var(--ink); text-decoration: none;
}
a.dash-action:hover { border-color: var(--error); }
.dash-action__count { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 2.5rem; line-height: 1; }
.dash-action__label { font-weight: 600; }
.dash-action__hint { font-size: 0.8125rem; color: var(--ink-dim); }
/* Operator home: the queue card (internal/_ui/_queue_card.html), its badge and the alert list. */
.console-queue-card { display: grid; gap: 0.25rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--grid); color: var(--ink); text-decoration: none; }
a.console-queue-card:hover { border-color: var(--error); }
.console-queue-card--over { border-left-color: var(--error); }
.console-queue-card__title { font-weight: 600; }
.console-queue-card__count { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 2.5rem; line-height: 1; }
.console-queue-card__age { font-size: 0.8125rem; color: var(--ink-dim); }
.console-badge { display: inline-block; width: fit-content; padding: 0 0.4rem; border: 1px solid var(--grid); font-size: 0.75rem; color: var(--ink-dim); }
.console-badge--bad { border-color: var(--error); color: var(--error); }
/* The border is the theme's tone. The text is that tone mixed 25% toward the content colour, because at full strength
   it falls below 4.5:1 on the card and modal surfaces in one theme (success and info in the dark theme, warning in the
   light). Mixed, it is at least 4.8:1 on every surface a badge sits on, in both themes. Re-measure if the theme moves. */
.console-badge--ok { border-color: var(--color-success); color: color-mix(in oklab, var(--color-success) 75%, var(--ink)); }
.console-badge--warn { border-color: var(--color-warning); color: color-mix(in oklab, var(--color-warning) 75%, var(--ink)); }
.console-badge--info { border-color: var(--color-info); color: color-mix(in oklab, var(--color-info) 75%, var(--ink)); }
.console-badge--neutral { border-color: var(--grid); color: var(--ink-dim); }
.console-alert-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.25rem; font-size: 0.875rem; }
.dash-quiet { font-size: 0.8125rem; color: var(--ink-dim); margin-bottom: 1rem; }
.dash-quiet a { text-decoration: underline; }
/* A note in the error colour, on its own line under a name. */
.dash-note-bad { display: block; font-size: 0.75rem; color: var(--error); }
/* A "+N more" expander: a pointer, and space under the summary while it is open. */
.dash-more > summary { cursor: pointer; }
.dash-more[open] > summary { margin-bottom: 0.25rem; }
.dash-counters { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; font-size: 0.875rem; color: var(--ink-dim); }
.dash-counters a:hover { color: var(--signal); }
.dash-counters__count { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 0.25rem; }

/* ============================================================
   FORM CONTROL SYSTEM — .ds-form / .ds-input / .ds-select / .ds-file / .ds-radio-seg
   One instrument-grade treatment for every text control, native
   <select>, file input, and radio/checkbox group. Works on both
   hand-written markup (use the .ds-* classes) and framework-rendered
   markup such as crispy/DaisyUI (wrap the <form> in .ds-form and the
   descendant controls are restyled without touching field logic).
   Themed via the same CSS custom properties as the rest of orbital.
   ============================================================ */

/* -- Text-ish controls ------------------------------------------------ */
.ds-input,
.ds-form input[type="text"],
.ds-form input[type="email"],
.ds-form input[type="password"],
.ds-form input[type="number"],
.ds-form input[type="url"],
.ds-form input[type="tel"],
.ds-form input[type="search"],
.ds-form input[type="date"],
.ds-form input:not([type]),
.ds-form textarea,
.ds-form select {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--ink-dim);
    border-radius: 2px;
    padding: 0.5rem 0.75rem;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    width: 100%;
    caret-color: var(--signal);
    box-shadow: none;
    transition: border-color 150ms ease;
}
.ds-input:focus,
.ds-form input:focus,
.ds-form textarea:focus,
.ds-form select:focus {
    outline: none;
    border-color: var(--signal);
    box-shadow: none;
}
.ds-input::placeholder,
.ds-form input::placeholder,
.ds-form textarea::placeholder { color: var(--ink-dim); opacity: 0.7; }
.ds-form textarea { resize: vertical; min-height: 6rem; }

/* Crispy/DaisyUI leave a wrapping .form-control; keep it block-level. */
.ds-form .form-control { display: block; margin-bottom: 1rem; }

/* -- Field labels: mono "// LABEL" readout ---------------------------- */
.ds-form label:not(.ds-label-plain) {
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    display: inline-block;
    margin-bottom: 0.375rem;
}
/* Form field labels: plain mono micro-labels. The leading "// " marker was
   removed site-wide because, applied to every label, it read as a machine
   theming everything uniformly rather than a designed choice. */
.ds-form label.ds-mark::before,
.ds-form .form-control > label:not(.ds-label-plain):not(.ds-mark)::before,
.ds-form div[id^="div_id_"] > label::before {
    content: "";
}
/* Crispy renders the required marker as a bare asterisk; keep it subtle. */
.ds-form .asteriskField { color: var(--signal); margin-inline-start: 0.15em; }

/* -- Amendment lines (templates/client/onboarding/_amendment_form.html) -----
   Each line is a folded panel whose summary reads back what it asks; the
   disclosure triangle gives way to a chevron that turns as the fold opens. */
.amend-fold > summary { list-style: none; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.8125rem; color: var(--ink-dim); user-select: none; }
.amend-fold > summary::-webkit-details-marker { display: none; }
.amend-fold > summary::marker { content: ""; }
.amend-fold > summary::before {
    content: ""; flex: none; width: 0.4rem; height: 0.4rem; margin-inline: 0.15rem 0.1rem;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg); transition: transform 150ms ease;
}
.amend-fold[open] > summary::before { transform: rotate(45deg); }
.amend-fold > summary:hover, .amend-fold[open] > summary { color: var(--ink); }
.amend-fold > summary:focus-visible { outline: 1px solid var(--signal); outline-offset: 2px; }
.amend-fold > .lp-amend { margin-top: 0.875rem; }
.lp-amend__lines { list-style: none; margin: 0 0 0.875rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.lp-amend__line { background: var(--surface); border: 1px solid var(--grid); border-radius: 2px; }
.lp-amend__line > summary { padding: 0.6rem 0.85rem; min-width: 0; }
.lp-amend__line[open] > summary { border-bottom: 1px solid var(--grid); }
.lp-amend__count { flex: none; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.lp-amend__gist { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); }
.lp-amend__line[open] .lp-amend__gist { display: none; }
.lp-amend__fields { display: flex; flex-wrap: wrap; gap: 0 1rem; padding: 0.85rem 0.85rem 0.25rem; }
.lp-amend__fields > .dash-field { flex: 1 1 10rem; margin-bottom: 0.75rem; }
.lp-amend__fields > .dash-field + .dash-field { flex: 3 1 16rem; }
.lp-amend__fields > .lp-amend__change { flex-basis: 100%; }
.ds-form.lp-amend label.dash-field__label { display: flex; flex-direction: column; gap: 0.375rem; width: 100%; margin: 0; }
/* Two classes, so the form's controls keep the platform's field style and select caret inside a card, where
   ".dash-card select" further down would otherwise reset them to bare boxes. */
.ds-form.lp-amend select, .ds-form.lp-amend textarea {
    background-color: var(--base); border: 1px solid var(--grid); border-radius: 2px; color: var(--ink);
    padding: 0.5rem 0.75rem; font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.875rem; font-weight: 400; line-height: 1.4;
}
.ds-form.lp-amend select {
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%), linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
    background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.75rem) 55%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-inline-end: 2rem;
}
.ds-form.lp-amend select:focus, .ds-form.lp-amend textarea:focus { border-color: var(--signal); }
.ds-form.lp-amend select:focus {
    background-image: linear-gradient(45deg, transparent 50%, var(--signal) 50%), linear-gradient(135deg, var(--signal) 50%, transparent 50%);
}
.ds-form.lp-amend textarea { min-height: 5.5rem; resize: vertical; }
.lp-amend__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.lp-amend__actions .btn-ghost-line { margin-top: 0; }

/* -- Help + error text ------------------------------------------------ */
.ds-form .helptext,
.ds-form small,
.ds-form .form-text {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: var(--ink-dim);
}
.ds-form .errorlist,
.ds-form .invalid-feedback,
.ds-form .text-error {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    color: var(--error);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
}

/* -- Native <select> caret (see also .dash-field select) -------------- */
.ds-select,
.ds-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
        linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) 55%,
        calc(100% - 0.75rem) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-inline-end: 2rem;
    cursor: pointer;
}
.ds-select:focus,
.ds-form select:focus {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--signal) 50%),
        linear-gradient(135deg, var(--signal) 50%, transparent 50%);
}
.ds-select option,
.ds-form select option { background: var(--surface-2); color: var(--ink); }

/* -- File input: render the native control as a bracketed ghost button */
.ds-form input[type="file"] {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--ink-dim);
    width: 100%;
}
.ds-form input[type="file"]::file-selector-button {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink-dim);
    border-radius: 2px;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    padding: 0.45rem 1rem;
    margin-inline-end: 0.75rem;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
}
.ds-form input[type="file"]::file-selector-button:hover {
    border-color: var(--signal);
    color: var(--signal);
}

/* -- Checkbox / single radio: squared, signal-accented ---------------- */
.ds-form input[type="checkbox"],
.ds-form input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--signal);
    cursor: pointer;
}

/* -- Radio GROUP as a bracketed segmented control --------------------- */
/* Markup:
   <div class="ds-radio-seg">
     <label><input type="radio" name=".." value=".."><span>LABEL</span></label>
     ...
   </div>                                                                */
.ds-radio-seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.25rem;
}
.ds-radio-seg--wrap {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
}
.ds-radio-seg > label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.7rem 0.6rem;
    border: 1px solid var(--grid);
    background: var(--base);
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    color: var(--ink-dim);
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.ds-radio-seg > label:hover { border-color: var(--ink-dim); color: var(--ink); }
/* Hide the native dot but keep it accessible/focusable. */
.ds-radio-seg > label input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    inset: 0;
    cursor: pointer;
}
.ds-radio-seg > label:has(input:checked) {
    border-color: var(--signal);
    background: color-mix(in srgb, var(--signal) 8%, var(--base));
    color: var(--signal);
    box-shadow: inset 0 0 0 1px var(--signal);
}
.ds-radio-seg > label:has(input:focus-visible) {
    outline: 1px solid var(--signal);
    outline-offset: 2px;
}

/* ============================================================
   ACCESSIBILITY: FOCUS VISIBILITY
   The .dash-field / .ds-form controls above set outline: none and
   rely only on a border-colour change, which is not enough contrast
   for keyboard users tabbing across a dark instrument background.
   This adds a high-contrast, colour-independent focus ring to every
   interactive element site-wide, on top of (not instead of) the
   existing border-colour treatment.
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
}

/* ============================================================
   ACCESSIBILITY: SKIP TO MAIN CONTENT
   Visually hidden until the link receives keyboard focus, per the
   standard sr-only-until-focus pattern. Placed first in <body> in
   base_templates/base.html, targets <main id="main-content">.
   ============================================================ */
.skip-link {
    position: absolute;
    top: -3rem;
    inset-inline-start: 0.5rem;
    z-index: 100;
    background: var(--signal);
    color: var(--base);
    padding: 0.65rem 1.1rem;
    font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
    font-size: 0.8125rem;
    text-decoration: none;
    border-radius: 0;
    transition: top 150ms ease;
}
.skip-link:focus {
    top: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Right-to-left support                                              */
/* Layout mirrors automatically because the stylesheet uses CSS       */
/* logical properties (inline-start/end). Only genuinely physical     */
/* anchoring needs an explicit override here.                         */
/* ------------------------------------------------------------------ */
[dir="rtl"] .ds-select,
[dir="rtl"] select.ds-select {
    /* The dropdown chevron is drawn with a physically right-anchored
       background gradient; flip it to the left edge. */
    background-position:
        1.05rem 55%,
        0.75rem 55%;
}

[dir="rtl"] .scan::before {
    /* The scanline sweeps left-to-right; mirror its direction. */
    transform: scaleX(-1);
}

/* ============================================================================ * Page & component styles — centralised from template <style> blocks (#546). * Appended to the END of orbital.css so these rules keep the cascade position * the inline <style> blocks had: they rendered after this file and won. * Colours that map onto the theme variables defined above use them, so these * styles follow the active data-theme (AD_Theme / AD_Theme_Light). * ==========================================================================*/

/* ---- templates/partials/access_panel.html ---- */
.pop-download-btn--disabled { opacity: 0.5; pointer-events: none; }
/* ---- templates/partials/dashboard/country_change_form.html ---- */
#id_requested_country, #id_reason, #id_supporting_document {
        background: var(--base) !important; color: var(--ink) !important;
        border: 1px solid var(--grid) !important; padding: 0.5rem 0.75rem !important;
        font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 0.875rem !important;
        border-radius: 0 !important; width: 100% !important;
    }
    #id_reason { resize: vertical; min-height: 7rem; line-height: 1.5; }
/* ---- templates/partials/dashboard/customise_drawer.html ---- */
.customise-drawer__toggle { position: absolute; left: -9999px; opacity: 0; }
.customise-drawer__scrim {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0; pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 80;
}
.customise-drawer {
    position: fixed; top: 0; right: 0; height: 100vh;
    width: min(420px, 92vw);
    background: var(--surface);
    border-left: 1px solid var(--grid);
    transform: translateX(100%);
    transition: transform 220ms ease;
    z-index: 81;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.customise-drawer__toggle:checked ~ .customise-drawer__scrim { opacity: 1; pointer-events: auto; }
.customise-drawer__toggle:checked ~ .customise-drawer { transform: translateX(0); }
.customise-drawer__head {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--grid);
    position: relative;
}
.customise-drawer__title {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    font-weight: 300;
    font-size: 1.6rem;
    color: var(--ink);
    margin: 0.25rem 0 0;
}
.customise-drawer__sub { font-size: 0.8125rem; color: var(--ink-dim); margin: 0.5rem 0 0; }
.customise-drawer__close {
    position: absolute; top: 0.75rem; right: 0.75rem;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-dim); font-size: 1.5rem; cursor: pointer;
    border: 1px solid var(--grid);
}
.customise-drawer__close:hover { color: var(--signal); border-color: var(--signal); }
.customise-drawer__list { list-style: none; margin: 0; padding: 0.75rem 0.5rem; overflow-y: auto; flex: 1; }
.customise-drawer__row {
    display: grid;
    grid-template-columns: 24px 28px 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.625rem 1rem;
    border: 1px solid transparent;
    cursor: grab;
}
.customise-drawer__row:hover { border-color: var(--grid); background: var(--base); }
.customise-drawer__row.is-dragging { opacity: 0.4; }
.customise-drawer__handle {
    color: var(--ink-dim); font-family: 'IBM Plex Mono', ui-monospace, monospace;
    user-select: none;
}
.customise-drawer__check input { margin: 0; cursor: pointer; }
.customise-drawer__meta { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.customise-drawer__name { color: var(--ink); font-size: 0.9rem; }
.customise-drawer__role { font-size: 0.625rem; }
.customise-drawer__foot {
    border-top: 1px solid var(--grid);
    padding: 0.875rem 1.5rem;
    display: flex; align-items: center; gap: 0.75rem;
}
/* ---- templates/partials/dashboard/order_detail.html ---- */
.order-head { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:0.75rem; margin-bottom: 1.5rem; }
    .order-status-note { padding: 1.1rem 1.4rem; border: 1px dashed var(--grid); margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--ink-dim); }
    .order-section-title { font-size: 0.8125rem;   color: var(--ink-dim); margin: 0 0 0.6rem; }
    .asset-row-actions { white-space: nowrap; }
    .asset-row-actions a { margin-left: 0.75rem; }
/* ---- templates/partials/dashboard/organisation_invite.html ---- */
/* The console's Role select takes .dash-input instead, so this mono rule leaves it alone (#1637). */
#id_invitee_email, #id_invitee_role:not(.dash-input) {
            background: var(--base) !important; color: var(--ink) !important;
            border: 1px solid var(--grid) !important; padding: 0.5rem 0.75rem !important;
            font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 0.875rem !important;
            border-radius: 0 !important; width: 100% !important;
        }
/* The console's invitation form reuses the field id but takes the console's input font (#1637). */
[data-invite-fields] #id_invitee_email {
            font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif !important;
        }
/* ---- templates/partials/dashboard/organisation_profile.html ---- */
#id_name, #id_slug, #id_description, #id_url, #id_country, #id_profile_image {
            background: var(--base) !important; color: var(--ink) !important;
            border: 1px solid var(--grid) !important; padding: 0.5rem 0.75rem !important;
            font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif !important; font-size: 0.875rem !important;
            border-radius: 0 !important; width: 100% !important;
        }
        #id_description { min-height: 6rem; font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif !important; }
/* ---- templates/partials/dashboard/organisation_user_edit.html ---- */
#id_organisation_role {
        background: var(--base) !important; color: var(--ink) !important;
        border: 1px solid var(--grid) !important; padding: 0.375rem 0.625rem !important;
        font-family: 'IBM Plex Mono', ui-monospace, monospace !important; font-size: 0.8125rem !important;
        border-radius: 0 !important;
    }
/* ---- templates/partials/dashboard/profile_security.html ---- */
#id_old_password, #id_new_password1, #id_new_password2 {
            background: var(--base) !important;
            color: var(--ink) !important;
            border: 1px solid var(--grid) !important;
            padding: 0.5rem 0.75rem !important;
            font-family: 'IBM Plex Mono', ui-monospace, monospace !important;
            font-size: 0.875rem !important;
            border-radius: 0 !important;
            width: 100% !important;
        }
        #passwordForm ul { color: var(--ink-dim); font-size: 0.6875rem; padding-left: 1rem; }
/* ---- templates/partials/dashboard/profile_settings.html, and the sign-in, registration and commercial
   forms: every field of one form is drawn by this rule, so none is darker or larger than its neighbours. ---- */
#id_first_name, #id_last_name, #id_date_of_birth, #id_email, #id_username, #id_password, #id_password_confirm, #id_company,
#commercial_contact_form #id_message {
            background: var(--base) !important;
            color: var(--ink) !important;
            border: 1px solid var(--grid) !important;
            padding: 0.5rem 0.75rem !important;
            font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif !important;
            font-size: 0.875rem !important;
            border-radius: 0 !important;
            width: 100% !important;
        }
        #id_first_name:focus, #id_last_name:focus, #id_email:focus, #id_username:focus, #id_password:focus,
        #id_password_confirm:focus, #id_company:focus, #commercial_contact_form #id_message:focus {
            outline: none;
            border-color: var(--signal) !important;
            caret-color: var(--signal);
        }
        /* File input rendered as a bracketed ghost button. */
        #id_profile_image {
            font-family: 'IBM Plex Mono', ui-monospace, monospace;
            font-size: 0.75rem;
            color: var(--ink-dim);
            width: 100%;
        }
        #id_profile_image::file-selector-button {
            background: transparent;
            color: var(--ink);
            border: 1px solid var(--ink-dim);
            border-radius: 2px;
            font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
            font-size: 0.8125rem;
            padding: 0.45rem 1rem;
            margin-right: 0.75rem;
            cursor: pointer;
            transition: border-color 150ms ease, color 150ms ease;
        }
        #id_profile_image::file-selector-button:hover {
            border-color: var(--signal);
            color: var(--signal);
        }
/* ---- templates/partials/nl_interpreted.html ---- */
.nl-summary {
        padding: 0.75rem 0.85rem; margin-bottom: 0.75rem;
        border: 1px solid var(--grid); border-radius: 0.5rem;
        background: var(--surface);
    }
    .nl-summary__query {
        font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem;
        color: var(--ink-dim); margin-bottom: 0.4rem; word-break: break-word;
    }
    .nl-summary__row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
    .nl-chip {
        font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.68rem;
        letter-spacing: 0.03em; color: var(--ink); background: var(--surface-2);
        border: 1px solid var(--grid); padding: 0.2rem 0.5rem;
    }
    /* The theme's error colour rather than a fixed #ff6b6b, which read at
       1.85:1 on the light theme's chip, too faint for the "not found" chip (#1065). */
    .nl-warning { color: var(--error); }
    .nl-error {
        font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem;
        color: var(--error); padding: 0.75rem 0.85rem; margin-bottom: 0.75rem;
        border: 1px solid #ff6b6b; border-radius: 0.5rem; background: var(--surface);
    }
    .nl-error__query { display: block; margin-top: 0.4rem; color: var(--ink-dim); word-break: break-word; }
    .nl-held-items { margin-top: 0.5rem; }
    .nl-held-items__label { display: block; margin-bottom: 0.3rem; }
    .nl-held-items ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
    .nl-held-items li {
        font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem;
        color: var(--ink-dim);
    }
/* ---- templates/partials/product_order_panel.html ---- */
.pop-order-panel__grid { display: grid; grid-template-columns: 1fr; }
    @media (min-width: 480px) {
        .pop-order-panel__grid { grid-template-columns: 1fr 1.3fr; align-items: start; }
        .pop-order-panel__downloads { border-left: 1px solid var(--grid); }
    }
    .pop-order-panel__downloads { padding: 1rem; }
    .pop-download-all { margin-top: 0.5rem; }
/* ---- templates/partials/rotating_reasons.html ---- */
.benefit-stage { position: relative; min-height: 8rem; }
      #benefit-text {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 380ms ease, transform 380ms ease;
      }
      #benefit-text.swap-out {
        opacity: 0;
        transform: translateY(-12px);
      }
      #benefit-text.swap-in {
        opacity: 0;
        transform: translateY(12px);
      }
      #benefit-progress {
        max-width: none;
      }
/* ---- templates/partials/search_form.html ---- */
{% comment %}
        #244: this block used to be a whole second, hand-rolled instrument
        design system (custom range-slider thumbs, custom date-input chrome,
        custom collapse markers) duplicating DaisyUI's own range/input/collapse
        components. What's left is only what DaisyUI genuinely has no
        component for: the browser's own calendar-picker-indicator icon,
        which every browser renders as a fixed dark glyph regardless of
        page theme and which neither Tailwind nor DaisyUI touches.
    {% endcomment %}
    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator {
        filter: invert(0.6); cursor: pointer;
    }
    [data-theme="AD_Theme_Light"] input[type="date"]::-webkit-calendar-picker-indicator,
    [data-theme="AD_Theme_Light"] input[type="time"]::-webkit-calendar-picker-indicator {
        filter: invert(0.3);
    }

    {% comment %}
        .ds-choice-grid styles form.providers/form.sensor_type's own output --
        Django's default CheckboxSelectMultiple widget template, which this
        partial doesn't control the markup of (no class hooks to add DaisyUI's
        checkbox to individual inputs without a custom widget, out of scope
        here). Kept as scoped, non-overriding CSS -- a layout/typography rule
        for markup DaisyUI has no component for, not a competing
        reimplementation of one it does, so it doesn't have the .ds-form
        cascade problem.
    {% endcomment %}
    .ds-choice-grid ul { list-style: none; margin: 0; padding: 0;
        display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.35rem 0.75rem; }
    .ds-choice-grid li { margin: 0; }
    .ds-choice-grid label {
        display: flex; align-items: center; gap: 0.45rem; cursor: pointer;
        font-family: 'IBM Plex Mono', ui-monospace, monospace;
        font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink);
        text-transform: none;
    }
    .ds-choice-grid input[type="checkbox"] { width: 0.95rem; height: 0.95rem; accent-color: var(--signal); cursor: pointer; }

    /* form.clip_to_aoi -- same reasoning as .ds-choice-grid above: Django's
       own BooleanField widget render, no class hook available without a
       custom widget. Otherwise falls back to the browser's native (blue)
       checkbox accent rather than the theme's. */
    input[name="clip_to_aoi"] { accent-color: var(--signal); cursor: pointer; width: 1rem; height: 1rem; }

    /* Range sliders (#1432). DaisyUI paints the filled part of a .range as a
       very wide shadow thrown off the handle and clipped to the input's own
       height, so the fill is always exactly as tall as the handle and the
       track reads as a thick bar. This keeps DaisyUI's input and replaces
       only the parts that drew the fill: the track is a 4px rule, the fill is
       the same rule in the theme's primary up to the handle, and the handle
       is a larger dot ringed in the page colour. WebKit has no pseudo-element
       for the filled part, so its track takes a hard-stopped gradient read
       from --ds-range-p (0 to 1), which static/js/csp_handlers.js keeps
       current; Firefox fills its own track with ::-moz-range-progress. The
       gradient stops are offset by half the handle, because a handle's
       centre travels the track less one handle's width. Both pseudo-element
       sets are written out because a browser drops a whole rule that holds a
       selector it does not know. */
    input[type="range"].range {
        --ds-range-p: 0;
        --ds-range-thumb: 1rem;
        --ds-range-track: 4px;
        --ds-range-fill: var(--signal);
        --ds-range-rest: color-mix(in oklab, var(--color-base-content) 22%, transparent);
        height: var(--ds-range-thumb);
        overflow: visible;
    }
    input[type="range"].range::-webkit-slider-runnable-track {
        height: var(--ds-range-track); border-radius: var(--ds-range-track);
        background: linear-gradient(to right,
            var(--ds-range-fill) calc(var(--ds-range-thumb) / 2 + (100% - var(--ds-range-thumb)) * var(--ds-range-p)),
            var(--ds-range-rest) 0);
    }
    input[type="range"].range::-webkit-slider-thumb {
        box-sizing: border-box; width: var(--ds-range-thumb); height: var(--ds-range-thumb);
        border: 2px solid var(--base); border-radius: 50%;
        background: var(--ds-range-fill); box-shadow: none;
    }
    input[type="range"].range::-moz-range-track {
        height: var(--ds-range-track); border-radius: var(--ds-range-track); background: var(--ds-range-rest);
    }
    input[type="range"].range::-moz-range-progress {
        height: var(--ds-range-track); border-radius: var(--ds-range-track); background: var(--ds-range-fill);
    }
    input[type="range"].range::-moz-range-thumb {
        box-sizing: border-box; width: var(--ds-range-thumb); height: var(--ds-range-thumb);
        border: 2px solid var(--base); border-radius: 50%;
        background: var(--ds-range-fill); box-shadow: none;
    }
    input[type="range"].range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--signal); }
    input[type="range"].range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--signal); }
/* ---- templates/partials/stac_metadata.html ---- */
.pp-stac-ext { border-top: 1px solid var(--grid); }
    .pp-stac-ext > summary {
        list-style: none; cursor: pointer; padding: 0.6rem 1rem;
        font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;
        display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    }
    .pp-stac-ext > summary::-webkit-details-marker { display: none; }
    .pp-stac-ext[open] > summary { color: var(--signal); border-bottom: 1px solid var(--grid); }
    .pp-stac-ext__arrow { display: inline-block; transition: transform 150ms ease; }
    .pp-stac-ext[open] > summary .pp-stac-ext__arrow { transform: rotate(90deg); }
/* ---- templates/pages/api_docs.html ---- */
.api-shell {
        display: grid;
        grid-template-columns: 16rem minmax(0, 1fr);
        gap: 3rem;
        max-width: 80rem;
        margin: 0 auto;
        padding: 4rem 1.5rem 6rem;
    }
    @media (max-width: 1024px) {
        /* minmax(0, 1fr), not 1fr: a grid item is as wide as its content at least, so a code
           block's longest line widened the page past a phone's screen (#1204). */
        .api-shell { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
        .api-toc { position: static; max-height: none; }
    }

    .api-toc {
        position: sticky;
        top: 6rem;
        align-self: start;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
        border-left: 1px solid var(--grid);
        padding: 0.25rem 1rem;
    }
    .api-toc__heading { color: var(--signal); margin-bottom: 1rem; }
    .api-toc a {
        display: block;
        padding: 0.4rem 0;
        color: var(--ink-dim);
        text-decoration: none;
        transition: color 150ms ease;
    }
    .api-toc a:hover { color: var(--signal); }

    .api-section { padding-top: 2rem; }
    .api-section + .api-section { border-top: 1px solid var(--grid); margin-top: 3rem; }
    .api-section h2 {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 400;
        font-size: clamp(2rem, 4vw, 2.75rem);
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 1.25rem;
    }
    .api-section h3 {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 500;
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
    }
    .api-section p, .api-section li { line-height: 1.65; }
    .api-section p, .api-section ul { margin-bottom: 1rem; }
    .api-section ul { padding-left: 1.25rem; }
    .api-section ul li { list-style: disc; }
    .api-section a { color: var(--signal); text-decoration: none; border-bottom: 1px dashed currentColor; }

    /* Endpoint card */
    .endpoint {
        margin: 1.25rem 0 2rem;
        border: 1px solid var(--grid);
    }
    .endpoint__head {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
        background: rgba(255, 255, 255, 0.02);
        border-bottom: 1px solid var(--grid);
        flex-wrap: wrap;
    }
    .endpoint__method {
        font-family: var(--font-mono, monospace);
        font-size: 0.8125rem;
        padding: 4px 10px;
        border: 1px solid currentColor;
    }
    .endpoint__method--get    { color: #22c55e; }
    .endpoint__method--post   { color: #3b82f6; }

    .endpoint__path {
        font-family: var(--font-mono, monospace);
        font-size: 0.95rem;
        color: var(--ink);
        word-break: break-all;
    }
    .endpoint__auth {
        margin-left: auto;
        font-family: var(--font-mono, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
    }
    .endpoint__body { padding: 1rem 1.25rem; }
    .endpoint__body p { font-size: 0.95rem; }

    .endpoint__params {
        margin: 1rem 0;
        font-family: var(--font-mono, monospace);
        font-size: 0.85rem;
    }
    .endpoint__params dt {
        color: var(--signal);
        font-weight: 600;
        margin-top: 0.5rem;
    }
    .endpoint__params dd {
        color: var(--ink-dim);
        padding-left: 1rem;
    }

    pre.api-code {
        background: rgba(0, 0, 0, 0.45);
        border: 1px solid var(--grid);
        padding: 1rem;
        overflow-x: auto;
        font-family: var(--font-mono, ui-monospace, monospace);
        font-size: 0.8rem;
        line-height: 1.55;
        margin: 1rem 0;
    }
    pre.api-code code { color: var(--ink); }
    .api-section code:not(pre code) {
        font-family: var(--font-mono, monospace);
        font-size: 0.85em;
        padding: 0.1rem 0.35rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--grid);
    }


    .api-status-table {
        width: 100%;
        margin: 1rem 0;
        border-collapse: collapse;
        font-family: var(--font-mono, monospace);
        font-size: 0.85rem;
    }
    .api-status-table th, .api-status-table td {
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--grid);
        text-align: left;
    }
    .api-status-table th {
        background: rgba(255, 255, 255, 0.03);
        font-size: 0.8125rem;
        color: var(--ink-dim);
    }
/* ---- templates/pages/changelog.html ---- */
/* Stack of monthly logs in the readout/viewfinder idiom.
       Mono labels, signal accent, tick rules between months. */
    .changelog-shell {
        max-width: 56rem;
        margin: 0 auto;
        padding: 4rem 1.5rem 6rem;
    }
    .changelog-meter {
        display: flex;
        align-items: baseline;
        gap: 1rem;
        flex-wrap: wrap;
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--grid);
    }
    .changelog-meter .signal { color: var(--signal); }

    .changelog-month {
        margin-top: 3rem;
    }
    .changelog-month__head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
        margin-bottom: 1.25rem;
    }
    .changelog-month__title {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 300;
        font-size: clamp(1.875rem, 4vw, 2.75rem);
        line-height: 1.05;
        letter-spacing: -0.02em;
    }
    .changelog-month__count {
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
    }

    .changelog-list {
        list-style: none;
        margin: 0;
        padding: 0;
        border-top: 1px solid var(--grid);
    }
    .changelog-row {
        display: grid;
        grid-template-columns: 7rem 5.5rem 1fr;
        gap: 1rem;
        padding: 0.75rem 0.25rem;
        border-bottom: 1px solid var(--grid);
        align-items: baseline;
    }
    @media (max-width: 640px) {
        .changelog-row {
            grid-template-columns: 1fr;
            gap: 0.25rem;
            padding: 1rem 0.25rem;
        }
    }
    .changelog-row__date,
    .changelog-row__sha {
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.7rem;
        letter-spacing: 0.08em;
        color: var(--ink-dim);
        white-space: nowrap;
    }
    .changelog-row__sha {
        color: var(--signal);
    }
    .changelog-row__subject {
        font-size: 0.95rem;
        line-height: 1.45;
        color: var(--ink, inherit);
        word-break: break-word;
    }

    .changelog-empty {
        margin-top: 4rem;
        padding: 2rem;
        text-align: center;
        color: var(--ink-dim);
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
    }
/* ---- templates/pages/collections/detail.html ---- */
#map, .ol-viewport {
      width: 100%;
      height: 340px;
      background: var(--base);
      border: 1px solid var(--grid);
    }
/* ---- templates/pages/collections/index.html ---- */
#map, .ol-viewport {
      width: 100%;
      height: 420px;
      background: var(--base);
      border: 1px solid var(--grid);
    }
    .collection-card-highlight {
      border-color: var(--signal) !important;
    }

/* ---- templates/pages/dataset_products.html ---- */
.dataset-map .ol-viewport {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  /* Filter rail slide */
  .filter-rail {
    transition: transform 280ms cubic-bezier(.22,.61,.36,1), opacity 200ms ease;
  }
  .filter-rail.is-closed {
    opacity: 0;
    transform: translateX(-12px);
    pointer-events: none;
  }
  /* Result grid stagger */
  @keyframes lock-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .result-grid > article {
    opacity: 0;
    animation: lock-in 360ms cubic-bezier(.22,.61,.36,1) forwards;
  }
  .result-grid > article:nth-child(1) { animation-delay: 20ms; }
  .result-grid > article:nth-child(2) { animation-delay: 60ms; }
  .result-grid > article:nth-child(3) { animation-delay: 100ms; }
  .result-grid > article:nth-child(4) { animation-delay: 140ms; }
  .result-grid > article:nth-child(5) { animation-delay: 180ms; }
  .result-grid > article:nth-child(6) { animation-delay: 220ms; }
  .result-grid > article:nth-child(n+7) { animation-delay: 260ms; }
  @media (prefers-reduced-motion: reduce) {
    .result-grid > article { opacity: 1; animation: none; }
  }
  /* Tighter form controls inside filter rail */
  .filter-rail input[type="text"],
  .filter-rail input[type="date"],
  .filter-rail input[type="number"],
  .filter-rail select {
    background: var(--surface-2, transparent) !important;
    border: 1px solid var(--grid) !important;
    color: var(--ink) !important;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
    width: 100% !important;
    border-radius: 0 !important;
  }
  .filter-rail input[type="checkbox"] {
    accent-color: var(--signal);
    margin-right: 0.4rem;
  }
  .filter-rail label {
    font-size: 0.8rem;
    color: var(--ink);
  }
/* ---- templates/pages/docs.html ---- */
.docs-shell {
        display: grid;
        grid-template-columns: 16rem minmax(0, 1fr);
        gap: 3rem;
        max-width: 80rem;
        margin: 0 auto;
        padding: 4rem 1.5rem 6rem;
    }
    @media (max-width: 1024px) {
        .docs-shell { grid-template-columns: 1fr; gap: 1.5rem; }
        .docs-toc { position: static; max-height: none; }
    }

    .docs-toc {
        position: sticky;
        top: 6rem;
        align-self: start;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
        border-left: 1px solid var(--grid);
        padding: 0.25rem 1rem;
    }
    .docs-toc__heading {
        color: var(--signal);
        margin-bottom: 1rem;
    }
    .docs-toc a {
        display: block;
        padding: 0.4rem 0;
        color: var(--ink-dim);
        text-decoration: none;
        transition: color 150ms ease;
    }
    .docs-toc a:hover { color: var(--signal); }

    .docs-section { padding-top: 2rem; }
    .docs-section + .docs-section { border-top: 1px solid var(--grid); margin-top: 3rem; }
    .docs-section__eyebrow {
        font-family: var(--font-mono, monospace);
        font-size: 0.8125rem;
        color: var(--signal);
        margin-bottom: 0.75rem;
    }
    .docs-section h2 {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 400;
        font-size: clamp(2rem, 4vw, 2.75rem);
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 1.25rem;
    }
    .docs-section h3 {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 500;
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
    }
    .docs-section p, .docs-section li { line-height: 1.65; }
    .docs-section p, .docs-section ul, .docs-section ol { margin-bottom: 1rem; }
    .docs-section ul, .docs-section ol { padding-left: 1.25rem; }
    .docs-section ul li { list-style: disc; }
    .docs-section ol li { list-style: decimal; }
    .docs-section a { color: var(--signal); text-decoration: none; border-bottom: 1px dashed currentColor; }

    .docs-callout {
        margin: 1.5rem 0;
        padding: 1rem 1.25rem;
        border-left: 2px solid var(--signal);
        background: rgba(243, 146, 0, 0.05);
        font-size: 0.95rem;
    }
    .docs-callout strong { color: var(--signal); }

    .docs-step-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
        margin: 1.5rem 0;
    }
    .docs-step {
        padding: 1rem 1.25rem;
        border: 1px solid var(--grid);
        position: relative;
    }
    .docs-step__num {
        font-family: var(--font-mono, monospace);
        font-size: 0.65rem;
        letter-spacing: 0.25em;
        color: var(--signal);
        margin-bottom: 0.4rem;
    }
    .docs-step h3 { font-weight: 600; margin-bottom: 0.25rem; font-size: 1rem; }
    .docs-step p { font-size: 0.9rem; color: var(--ink-dim); margin: 0; }

    .docs-kv {
        display: grid;
        grid-template-columns: 12rem 1fr;
        gap: 0.5rem 1.5rem;
        font-size: 0.95rem;
        margin: 1rem 0 1.5rem;
    }
    .docs-kv__k {
        font-family: var(--font-mono, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
        padding-top: 0.25rem;
    }
    @media (max-width: 640px) {
        .docs-kv { grid-template-columns: 1fr; gap: 0.15rem 0; }
        .docs-kv__k { padding-top: 1rem; }
    }
/* ---- templates/pages/feed.html ---- */
#map, .ol-viewport {
      width: 100%;
      height: 420px;
      background: var(--base);
      border: 1px solid var(--grid);
    }
    .feed-card-highlight {
      border-color: var(--signal) !important;
    }
    .feed-thumb {
      width: 100%;
      aspect-ratio: 16 / 10;
      object-fit: cover;
      background: var(--surface-2);
      display: block;
    }

/* ---- templates/pages/home.html ---- */

    /* Carousel transition handled by JS */
    .carousel_img {
        transition: opacity 800ms ease-in;
    }
/* ---- templates/pages/login.html ---- */
.auth-hero-bg {
    background: linear-gradient(135deg,
      hsl(220, 20%, 4%) 0%,
      hsl(220, 18%, 7%) 25%,
      hsl(28, 60%, 8%) 55%,
      hsl(30, 70%, 11%) 75%,
      hsl(32, 80%, 14%) 100%
    );
    background-size: 300% 300%;
    animation: heroShift 18s ease infinite;
  }
  @keyframes heroShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .auth-hero-bg { animation: none; }
  }
  .star-field {
    background-image:
      radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
      radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 40% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,0.25) 0%, transparent 100%),
      radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.15) 0%, transparent 100%),
      radial-gradient(1px 1px at 60% 85%, rgba(255,255,255,0.25) 0%, transparent 100%),
      radial-gradient(1px 1px at 35% 65%, rgba(255,255,255,0.15) 0%, transparent 100%),
      radial-gradient(2px 2px at 48% 48%, rgba(243,146,0,0.15) 0%, transparent 100%),
      radial-gradient(2px 2px at 72% 22%, rgba(243,146,0,0.1) 0%, transparent 100%);
  }
/* ---- templates/pages/order_processing.html ---- */
.op-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 2rem; }
    .op-card {
        text-align: center; max-width: 30rem; padding: 2.75rem 2rem;
        border: 1px solid var(--line, rgba(255, 255, 255, 0.12)); border-radius: 1rem;
    }
    .op-title { font-size: 1.5rem; margin: 0 0 1.75rem; }
    .op-spinner {
        width: 3.5rem; height: 3.5rem; margin: 0 auto 1.5rem;
        border: 4px solid rgba(243, 146, 0, 0.25);
        border-top-color: var(--signal, #f39200);
        border-radius: 50%;
        animation: op-spin 0.9s linear infinite;
    }
    .op-note { color: var(--muted, #9aa3ad); margin: 0 0 1.25rem; }
    .op-continue { font-size: 0.9rem; }
    @keyframes op-spin { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) { .op-spinner { animation: none; } }
/* ---- templates/pages/checkout_pay.html ---- */
.cp-wrap { max-width: 44rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
    .cp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
    .cp-title { font-size: 1.5rem; margin: 0; }
    .cp-embed { min-height: 30rem; }
    .cp-note { color: var(--muted, #9aa3ad); margin: 0; }
/* ---- templates/pages/password_reset/password_reset_done.html ---- */
.auth-hero-bg {
    background: linear-gradient(135deg,
      hsl(220, 20%, 4%) 0%,
      hsl(220, 18%, 7%) 25%,
      hsl(28, 60%, 8%) 55%,
      hsl(30, 70%, 11%) 75%,
      hsl(32, 80%, 14%) 100%
    );
    background-size: 300% 300%;
    animation: heroShift 18s ease infinite;
  }
  @keyframes heroShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .auth-hero-bg { animation: none; }
  }
  .star-field {
    background-image:
      radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
      radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 40% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,0.25) 0%, transparent 100%),
      radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(2px 2px at 48% 48%, rgba(243,146,0,0.15) 0%, transparent 100%);
  }
/* ---- templates/pages/password_reset/password_reset_form.html ---- */
.auth-hero-bg {
    background: linear-gradient(135deg,
      hsl(220, 20%, 4%) 0%,
      hsl(220, 18%, 7%) 25%,
      hsl(28, 60%, 8%) 55%,
      hsl(30, 70%, 11%) 75%,
      hsl(32, 80%, 14%) 100%
    );
    background-size: 300% 300%;
    animation: heroShift 18s ease infinite;
  }
  @keyframes heroShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @media (prefers-reduced-motion: reduce) {
    .auth-hero-bg { animation: none; }
  }
  .star-field {
    background-image:
      radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
      radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 40% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 55% 60%, rgba(255,255,255,0.25) 0%, transparent 100%),
      radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.2) 0%, transparent 100%),
      radial-gradient(1px 1px at 60% 85%, rgba(255,255,255,0.25) 0%, transparent 100%),
      radial-gradient(2px 2px at 48% 48%, rgba(243,146,0,0.15) 0%, transparent 100%);
  }
/* The strip under the form on a phone: .star-field replaces .auth-hero-bg's gradient with its stars, which left the
   white caption on the page's own ground. It has the dark theme's base colour under the stars. */
.auth-hero-bg.star-field { background-color: var(--color-base-100); }
/* ---- templates/pages/product_page.html ---- */
/* Download-panel tab: mono telemetry label with signal underline on active */
    .download_nav_item {
      font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;
      font-size: 0.8125rem;
      color: var(--ink-dim);
      padding: 0.55rem 0.9rem;
      border-bottom: 2px solid transparent;
      background: transparent;
      cursor: pointer;
      transition: color 150ms ease, border-color 150ms ease;
    }
    .download_nav_item:hover { color: var(--ink); }
    .download_nav_item.is-active-tab {
      color: var(--signal);
      border-bottom-color: var(--signal);
    }
    .code-surface {
      background: var(--surface-2);
      border: 1px solid var(--grid);
    }
    .code-surface code {
      font-family: 'IBM Plex Mono', ui-monospace, monospace;
      color: var(--ink);
    }
/* ---- templates/pages/purchase_success.html ---- */
.ps-wrap { max-width: 44rem; margin: 3rem auto; padding: 0 1rem; }
    .ps-card { border: 1px solid var(--grid); background: var(--surface); }
    .ps-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--grid); display: flex; align-items: center; gap: 0.75rem; }
    .ps-tick { width: 1.5rem; height: 1.5rem; stroke: var(--pulse); flex: none; }
    .ps-body { padding: 0.5rem 1.5rem 1.25rem; }
    .ps-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--grid); }
    .ps-row:last-child { border-bottom: none; }
    .ps-row dt { color: var(--ink-dim); font-size: 0.85rem; }
    .ps-row dd { margin: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.85rem; color: var(--ink); }
    .ps-total dd { color: var(--signal); font-weight: 700; }
    .ps-next { padding: 1rem 1.5rem; border-top: 1px solid var(--grid); background: var(--surface-2); }
    .ps-next ul { margin: 0; }
    .ps-next li { font-size: 0.86rem; color: var(--ink-dim); margin-bottom: 0.35rem; padding-left: 1rem; position: relative; }
    .ps-next li:last-child { margin-bottom: 0; }
    .ps-next li::before { content: "—"; position: absolute; left: 0; color: var(--signal); }
    .ps-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; padding: 1.1rem 1.5rem 1.25rem; }
    .ps-ghost { background: transparent; color: var(--ink); border: 1px solid var(--grid); }
/* ---- templates/pages/registry.html ---- */
@keyframes lock-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .registry-grid > article {
    opacity: 0;
    animation: lock-in 480ms cubic-bezier(.22,.61,.36,1) forwards;
  }
  .registry-grid > article:nth-child(1)  { animation-delay: 30ms; }
  .registry-grid > article:nth-child(2)  { animation-delay: 80ms; }
  .registry-grid > article:nth-child(3)  { animation-delay: 130ms; }
  .registry-grid > article:nth-child(4)  { animation-delay: 180ms; }
  .registry-grid > article:nth-child(5)  { animation-delay: 230ms; }
  .registry-grid > article:nth-child(6)  { animation-delay: 280ms; }
  .registry-grid > article:nth-child(n+7) { animation-delay: 330ms; }
  @media (prefers-reduced-motion: reduce) {
    .registry-grid > article { opacity: 1; animation: none; }
  }

/* ---- templates/pages/result_dataset_page.html ---- */
.pp-shell { max-width: 78rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
    .pp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grid); margin-bottom: 1.25rem; }
    .pp-head__id { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 1rem; }
    .pp-head__crumb { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    .pp-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
    @media (min-width: 900px) { .pp-grid { grid-template-columns: 1.4fr 1fr; } }

    /* Fixed aspect-ratio so the figure reserves its footprint before the image
       arrives — matches .pp-figure__none below, so there's no layout shift
       whichever state (loading/loaded/empty) is showing. */
    .pp-figure { border: 1px solid var(--grid); background: var(--base); overflow: hidden; aspect-ratio: 16/9; max-height: 30rem; }
    .pp-figure img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .pp-figure__none { aspect-ratio: 16/9; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 12px 12px; }
    .pp-map { height: 16rem; border: 1px solid var(--grid); margin-top: 1rem; }
    .pp-map #map, .pp-map .ol-viewport { width: 100%; height: 100%; background: var(--base); }

    .pp-panel { border: 1px solid var(--grid); background: var(--surface); }
    .pp-panel__head { padding: 0.7rem 1rem; border-bottom: 1px solid var(--grid); display:flex; justify-content:space-between; align-items:center; }
    .pp-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--grid); }
    .pp-spec { background: var(--surface); padding: 0.7rem 1rem; }
    .pp-spec__k { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    .pp-spec__v { color: var(--ink); font-size: 0.9rem; margin-top: 0.2rem; }

    .pp-price { padding: 1rem; }
    .pp-price__row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.35rem 0; }
    .pp-price__k { color: var(--ink-dim); font-size: 0.8rem; }
    .pp-price__v { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 0.85rem; }
    .pp-price__total { border-top: 1px solid var(--grid); margin-top: 0.4rem; padding-top: 0.7rem; }
    .pp-price__total .pp-price__v { color: var(--signal); font-weight: 700; font-size: 1.35rem; }
    .pp-addbtn { width: 100%; justify-content: center; margin-top: 0.85rem; }
    .pp-error { font-size: 0.75rem; color: var(--error); text-align: center; margin-top: 0.6rem; }

    /* Child items strip */
    .pp-items { margin-top: 2rem; }
    .pp-items__scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 12rem; gap: 0.75rem; overflow-x: auto; padding: 0.5rem 0 1rem; scrollbar-width: thin; }
    .pp-item-card { border: 1px solid var(--grid); background: var(--surface); text-decoration: none; display: flex; flex-direction: column; transition: border-color 150ms ease; }
    .pp-item-card:hover { border-color: var(--signal); }
    .pp-item-card__thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--base); }
    .pp-item-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
    .pp-item-card__noimg { width: 100%; height: 100%; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 9px 9px; }
    .pp-item-card__b { padding: 0.5rem 0.6rem; }
    .pp-item-card__id { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.6rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pp-item-card__meta { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.55rem; color: var(--ink-dim); margin-top: 0.25rem; }
/* ---- templates/pages/result_item_page.html ---- */
.pp-shell { max-width: 78rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
    .pp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grid); margin-bottom: 1.25rem; }
    .pp-head__id { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 1rem; }
    .pp-head__crumb { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    /* Bare `1fr`/`1fr 1fr` tracks default to min-width: auto, so a long
       unwrapped value (a STAC property with no spaces to break on) sets the
       track's minimum to that value's full width instead of the space
       actually available -- on .pp-grid that squeezed the imagery/map
       column; on .pp-specs it would do the same to a neighbouring spec.
       minmax(0, ...) lets both shrink below their content's natural width,
       which only works if the content itself is then allowed to wrap --
       see .pp-spec__v below. */
    .pp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    @media (min-width: 900px) { .pp-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

    /* Fixed aspect-ratio so the figure reserves its footprint before the image
       arrives — matches .pp-figure__none below, so there's no layout shift
       whichever state (loading/loaded/empty) is showing. */
    .pp-figure { border: 1px solid var(--grid); background: var(--base); overflow: hidden; aspect-ratio: 16/9; max-height: 30rem; }
    .pp-figure img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .pp-figure__none { aspect-ratio: 16/9; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 12px 12px; }
    /* No provider imagery is ever fetched for a withheld item -- this is a
       generic pattern, not the real preview blurred client-side. */
    .pp-figure__locked {
        width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
        background: repeating-linear-gradient(135deg, rgba(243,146,0,0.12) 0 8px, rgba(243,146,0,0.04) 8px 16px), var(--surface-2);
        color: var(--ink-dim); text-align: center; padding: 1rem;
    }
    .pp-figure__lockicon { width: 2rem; height: 2rem; stroke: var(--ink-dim); }
    .pp-figure__locked p { font-size: 0.85rem; max-width: 24ch; margin: 0; }
    .pp-map { height: 16rem; border: 1px solid var(--grid); margin-top: 1rem; }
    .pp-map #map, .pp-map .ol-viewport { width: 100%; height: 100%; background: var(--base); }
    /* "Image" / "On map" (#1066): a two-button choice above the picture. "On map" hides
       the picture and gives its room to the map, which then carries it. */
    .pp-view { display: inline-flex; margin-bottom: 0.75rem; border: 1px solid var(--grid); }
    .pp-view[hidden], .pp-figure[hidden] { display: none; }
    .pp-view__btn { padding: 0.35rem 0.9rem; background: transparent; color: var(--ink-dim); border: 0; cursor: pointer; font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem; }
    .pp-view__btn + .pp-view__btn { border-left: 1px solid var(--grid); }
    .pp-view__btn:hover { color: var(--ink); }
    .pp-view__btn:focus-visible { outline: 2px solid #F39200; outline-offset: -2px; }
    .pp-view__btn[aria-pressed="true"] { background: #F39200; color: #1a1a1a; }
    .pp-map--lead { height: min(30rem, 60vh); margin-top: 0; }

    .pp-panel { border: 1px solid var(--grid); background: var(--surface); }
    .pp-panel__head { padding: 0.7rem 1rem; border-bottom: 1px solid var(--grid); }
    .pp-specs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--grid); }
    .pp-spec { background: var(--surface); padding: 0.7rem 1rem; min-width: 0; }
    .pp-spec__k { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    .pp-spec__v { color: var(--ink); font-size: 0.9rem; margin-top: 0.2rem; overflow-wrap: anywhere; }

    .pp-price { padding: 1rem; }
    .pp-price__row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.35rem 0; }
    .pp-price__k { color: var(--ink-dim); font-size: 0.8rem; }
    .pp-price__v { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 0.85rem; }
    .pp-price__total { border-top: 1px solid var(--grid); margin-top: 0.4rem; padding-top: 0.7rem; }
    .pp-price__total .pp-price__v { color: var(--signal); font-weight: 700; font-size: 1.35rem; }
    .pp-addbtn { width: 100%; justify-content: center; margin-top: 0.85rem; }
    .pp-error { font-size: 0.75rem; color: var(--error); text-align: center; margin-top: 0.6rem; }
/* ---- templates/pages/search.html ---- */
/* #213: the natural-language query used to run the full width of the page
       above both columns; it now lives at the top of the filter panel instead,
       so the whole panel reads as one chat-style side panel — describe the
       search, see what it was understood as, then adjust the filters that
       came back from it, all in the same column. This is a single exchange,
       not a running conversation: there is no message history, no follow-up
       turns and no new state on the server, only the same one-shot interpret
       call #201-#203 already wired up, restyled and moved. A proper multi-turn
       chat would be a materially bigger piece of work than this issue asked
       for. */
    /* #1432. The shell runs the full width of the window. <main> has no side
       padding, so the shell takes no margin either: a negative one pushed it
       0.5rem past each edge and made the page scroll sideways. Its height is
       what is left below the navbar, which the map script
       measures into --search-shell-h; the fallback is the navbar's 5rem and
       its 1px rule, for the moment before the script runs. It was
       calc(100vh - 4rem), which is less than the navbar takes, so the bottom
       of the map, and the basemap switcher on it, sat under the fold. */
    .search-shell { width: auto; height: var(--search-shell-h, calc(100vh - 5rem - 1px)); }
    @media (max-width: 900px) { .search-shell { height: auto; } }

    /* No gap between the columns: the 1px gap showed the page behind it as a
       second line beside the panel's own right border and the border the
       shared #map rule used to put round the map. The panel's border is the
       one divider. */
    .search-body {
        display: grid; grid-template-columns: clamp(30rem, 28vw, 36rem) 1fr; gap: 0; min-height: 0; height: 100%;
        transition: grid-template-columns 150ms ease;
    }
    @media (max-width: 1100px) { .search-body { grid-template-columns: 26rem 1fr; } }
    @media (max-width: 900px) { .search-body { grid-template-columns: 1fr; height: auto; } }

    /* Filter panel collapse — state persisted client-side (see the script
       below), so it survives a reload rather than resetting every visit. */
    .search-body.filters-collapsed { grid-template-columns: 2.75rem 1fr; }
    .search-body.filters-collapsed .search-panel__head { justify-content: center; padding-inline: 0; }
    .search-body.filters-collapsed .search-panel__chat,
    .search-body.filters-collapsed .search-panel__head-text,
    .search-body.filters-collapsed .search-panel__body,
    .search-body.filters-collapsed .search-panel__foot { display: none; }
    .search-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
    .search-panel__toggle {
        flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
        width: 1.6rem; height: 1.6rem; padding: 0;
        background: transparent; border: 1px solid var(--grid); color: var(--ink-dim); cursor: pointer;
        transition: color 150ms ease, border-color 150ms ease;
    }
    .search-panel__toggle:hover { color: var(--signal); border-color: var(--signal); }
    .search-panel__toggle svg { transition: transform 150ms ease; }
    .search-body.filters-collapsed .search-panel__toggle svg { transform: rotate(180deg); }

    /* Chat-style compose box, docked at the top of the side panel. */
    .search-panel__chat {
        flex: 0 0 auto;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--grid);
        background: var(--surface);
    }
    .search-query-bar__form { display: flex; gap: 0.5rem; align-items: center; }
    .search-query-bar__input {
        flex: 1 1 auto; border-radius: 999px !important;
    }
    /* Square, at the input's own height. .btn carries min-height: 3rem, which
       the old 2.2rem height could not beat, so the control came out 35px wide
       by 48px tall -- a pill on its end. .btn also wraps its flex line, so the
       spinner and the magnifier could not sit side by side in 35px and the
       spinner stacked above the icon (#853). */
    .search-query-bar__send {
        flex: 0 0 auto; width: 3rem; height: 3rem; min-height: 3rem;
        border-radius: 999px; flex-wrap: nowrap;
        display: flex; align-items: center; justify-content: center; padding: 0;
    }
    /* Idle is the default state, and it is display:none rather than opacity 0
       so the spinner claims no space in the button either. htmx puts
       .htmx-request on the hx-indicator target itself; while it is there the
       spinner takes the magnifier's place rather than sitting beside it. */
    .search-query-bar__spinner { display: none; }
    .search-query-bar__spinner.htmx-request { display: inline-block; }
    .search-query-bar__spinner.htmx-request + svg { display: none; }

    .search-panel {
        display: flex; flex-direction: column; height: 100%;
        border-right: 1px solid var(--grid); background: var(--base); overflow: hidden;
    }
    .search-panel__head { padding: 0.9rem 1rem; border-bottom: 1px solid var(--grid); }
    .search-panel__body { flex: 1 1 auto; overflow-y: auto; padding: 0 1rem; scrollbar-width: thin; }
    .search-panel__foot { padding: 0.85rem 1rem; border-top: 1px solid var(--grid); }

    .search-map-wrap { position: relative; min-height: 0; }
    /* One column: the map first, since drawing an area is the first step and the filters were pushing it about 1300px down a phone */
    @media (max-width: 900px) { .search-map-wrap { height: 60vh; order: -1; } }
    /* border: 0 because the bare "#map, .ol-viewport" rules further up this
       file, written for the collections maps, give every map a 1px border,
       which on this page was a second line down the panel's edge (#1432). */
    .search-map-wrap .ol-viewport { width: 100%; height: 100%; background: var(--base); border: 0; }
    /* Scoped: written bare, this rule won the cascade on every page with a
       #map and collapsed the product, feed and collections maps to the
       height of a parent that has none (#1030). */
    .search-map-wrap #map { position: relative; width: 100%; height: 100%; border: 0; }
    /* The map is a tab stop so that a click gives it focus, which is what
       turns the scroll wheel over to zooming. Focus has to show, and an
       outline on #map would be painted under the viewport that fills it, so
       the ring is a pseudo-element laid over the top. */
    .search-map-wrap #map:focus { outline: none; }
    .search-map-wrap #map:focus-visible::after {
        content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
        border: 2px solid var(--signal);
    }

    .search-map-overlay {
        position: absolute; top: 0; left: 0; z-index: 1000;
        background: var(--surface-2); border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid);
        padding: 4px 10px; display: inline-flex; align-items: center; gap: 10px; pointer-events: none;
    }
    .search-loading {
        position: absolute; inset: 0; z-index: 5000; display: none;
        align-items: center; justify-content: center; background: color-mix(in srgb, var(--base) 55%, transparent);
    }
    .search-loading[data-on="1"] { display: flex; }

    /* Map toolbar (#567, regrouped in #858): three clusters at the top
       right of every AOI map, with a gap between them -- zoom, draw, place.
       Each control is an icon on its own in a 2.25rem square, the same for
       all nine (#1432); the captions that used to sit under the icons set
       the width of the whole toolbar by the longest of them, and now live in
       the tooltip, with the accessible name on the button.

       Fixed white background and dark ink rather than the themed
       var(--surface)/var(--ink) pair, which inverts under the dark theme and
       would stop matching the map's own controls (#472); the tooltip and the
       toast below are themed, because they sit over the map rather than in
       the control strip.

       !important throughout the button rules: ol.css ships a
       same-specificity ".ol-control button" rule (1.375em square, padding 0,
       line-height .4em) and loads after this stylesheet, since ol/css.html
       renders inside Head_Extras below the <link> for this file in
       base.html, so it wins every shared property by source order alone. The
       zoom cluster is OpenLayers' own two buttons moved into this toolbar,
       so they carry .ol-zoom-in / .ol-zoom-out as well and are hit by that
       rule directly. */
    .ds-map-toolbar {
        top: 0.5em; right: 0.5em;
        display: flex; flex-direction: column; gap: 10px;
    }
    .ds-map-toolbar__group {
        display: flex; flex-direction: column;
        background: #fff; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }
    /* Not overflow:hidden, which would clip the tooltips out of existence. */
    .ds-map-toolbar__item { position: relative; display: block; }
    .ds-map-toolbar__item + .ds-map-toolbar__item .ds-map-toolbar__btn {
        border-top: 1px solid rgba(0,0,0,0.15);
    }
    .ds-map-toolbar__btn {
        /* display and the flex alignment carry !important too: ol.css's
           ".ol-control button { display: block }" otherwise wins by source
           order and the icon sits at the left edge of a block button (#1013). */
        display: flex !important; align-items: center !important; justify-content: center !important;
        width: 2.25rem !important; height: 2.25rem !important; min-height: 0 !important;
        padding: 0 !important; margin: 0 !important;
        background: #fff; color: #1a1a1a; border: none; cursor: pointer;
    }
    .ds-map-toolbar__icon { width: 18px; height: 18px; flex: none; }
    .ds-map-toolbar__btn:hover:not(:disabled) { background: #f4f4f4; }
    .ds-map-toolbar__btn:focus-visible { outline: 2px solid #F39200; outline-offset: -2px; }
    /* Active while that tool is the one drawing. Both selectors, because
       ":hover:not(:disabled)" above outranks a lone attribute selector and
       would otherwise wash the active tool back to grey under the pointer
       that just chose it. */
    .ds-map-toolbar__btn[aria-pressed="true"],
    .ds-map-toolbar__btn[aria-pressed="true"]:hover:not(:disabled) {
        background: #F39200; color: #1a1a1a;
    }
    /* Reshape and clear before an area exists, and locate while a fix is in
       flight. The disabled attribute does the work; this only shows it. */
    .ds-map-toolbar__btn:disabled { opacity: 0.4; cursor: default; }
    .ds-map-toolbar__btn--busy .ds-map-toolbar__icon,
    .ds-upload-control--busy .ds-map-toolbar__icon {
        animation: ds-map-spin 0.8s linear infinite;
    }
    @keyframes ds-map-spin { to { transform: rotate(360deg); } }

    /* Tooltip: the one-line explanation of what a control does, to the left
       of the toolbar. opacity rather than display or visibility, because the
       button names it with aria-describedby and a hidden element is dropped
       from the accessibility tree, taking the description with it. */
    .ds-map-toolbar__tip {
        position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
        z-index: 2; width: max-content; max-width: 15rem;
        background: var(--surface-2); border: 1px solid var(--grid); color: var(--ink);
        padding: 5px 8px; font-size: 0.72rem; line-height: 1.35;
        letter-spacing: normal; text-transform: none; text-align: left; white-space: normal;
        opacity: 0; pointer-events: none; transition: opacity 120ms ease;
    }
    .ds-map-toolbar__tip-name { display: block; font-size: 0.78rem; font-weight: 600; }
    .ds-map-toolbar__item:hover .ds-map-toolbar__tip,
    .ds-map-toolbar__btn:focus-visible + .ds-map-toolbar__tip { opacity: 1; }
    @media (prefers-reduced-motion: reduce) {
        .ds-map-toolbar__tip { transition: none; }
    }

    /* The file input the two upload buttons open; never shown, the button in
       front of it is the control. */
    .ds-upload-control__input { display: none; }
    .ds-upload-control__error {
        position: absolute; top: 0; right: calc(100% + 8px); z-index: 3;
        background: var(--surface-2); border: 1px solid var(--grid); color: var(--error);
        padding: 4px 8px; font-size: 0.72rem; max-width: 200px; white-space: normal;
        text-transform: none; letter-spacing: normal;
    }

    /* Quiet status line for a request that could not be met -- a refused or
       failed location fix (#858). Top centre, in the same slot as the
       empty-state hint below, which the script hides while a toast is up.
       Not the foot of the map: .search-map-wrap runs past the bottom of the
       viewport on a normal window, so a message anchored there lands behind
       the cookie banner or off screen entirely. */
    .ds-map-toast {
        position: absolute; left: 50%; top: 2.6em; transform: translateX(-50%);
        z-index: 1200; max-width: min(24rem, 70%);
        background: var(--surface-2); border: 1px solid var(--grid); color: var(--ink);
        padding: 6px 12px; font-size: 0.78rem; line-height: 1.4; text-align: center;
    }

    /* Empty-state hint (#858): what to do on a map with nothing drawn on it.
       Top centre, under the zoom/area readout and clear of the toolbar it is
       pointing at. */
    .search-map-hint {
        position: absolute; top: 2.6em; left: 50%; transform: translateX(-50%); z-index: 1100;
        display: flex; align-items: flex-start; gap: 0.6rem;
        max-width: min(26rem, calc(100% - 10rem));
        background: var(--surface-2); border: 1px solid var(--grid);
        padding: 0.6rem 0.7rem;
    }
    /* display:flex above beats the user agent's own [hidden] rule, so the
       script's `hidden` attribute would otherwise show as a fully visible
       hint on every page where there is already an area drawn. */
    .search-map-hint[hidden] { display: none; }
    .search-map-hint__text { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--ink); }
    .search-map-hint__dismiss {
        flex: none; background: none; border: none; padding: 2px; cursor: pointer;
        color: var(--ink-dim); line-height: 0;
    }
    .search-map-hint__dismiss:hover { color: var(--ink); }

    /* OpenLayers basemap style switcher (#567): a plain button group,
       bottom-right, where Leaflet's layer-selector control used to sit. */
    .ds-style-switcher {
        bottom: 0.5em; right: 0.5em; display: flex; overflow: hidden;
        border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }
    /* !important throughout: OpenLayers' own ol.css ships a same-specificity
       ".ol-control button" rule (fixed 1.375em square, padding:0, font-size:
       inherit) loaded after this stylesheet (ol/css.html renders inside
       Head_Extras, below the <link> for this file in base.html), so it wins
       the cascade on shared properties by source order alone. These buttons
       carry real English labels (RECT/DARK/LIGHT/...), not icons, and need
       their own size instead of ol.css's icon-button square. */
    .ds-style-switcher button {
        font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.65rem !important;
        background: rgba(255,255,255,0.85); color: #1a1a1a; padding: 0.35em 0.6em !important;
        cursor: pointer; white-space: nowrap; flex-shrink: 0; width: auto !important; height: auto !important;
        /* !important: ol.css's own ".ol-control button" rule ships
           line-height: .4em, sized for its square icon buttons, and wins
           the cascade on this shared property by source order alone (same
           reasoning as the other !importants on this button). Left
           un-overridden, the switcher's real English labels (DARK/LIGHT/
           STREET) render squashed into a ~4px line box and read as clipped
           to their top slivers, e.g. "DA LI ST" (#567 review). */
        line-height: normal !important;
    }
    .ds-style-switcher button + button { border-left: 1px solid rgba(0,0,0,0.15); }
    .ds-style-switcher button:hover { background: #fff; }
    .ds-style-switcher button[aria-pressed="true"] { background: #F39200; color: #1a1a1a; }

    /* Repositions OpenLayers' default top-left zoom control to top-right,
       matching where Leaflet's zoomControl used to sit (map.js).
       !important throughout: ol.css's own same-specificity ".ol-zoom"
       rule (top/left) is loaded after this stylesheet (see the note
       above .ds-style-switcher button), so it otherwise wins the
       cascade by source order alone and the control never actually
       moves -- on search.html that left it sitting under the
       top-left zoom/AOI readout overlay, invisible (#567). */
    .ol-control--top-right { top: 0.5em !important; right: 0.5em !important; left: auto !important; }

    /* OpenLayers' default Attribution control shares the built-in
       bottom-right slot with the style switcher above, so the switcher's
       opaque background hides the attribution toggle entirely (#567).
       Move attribution to bottom-left instead, which no other control
       occupies on any map page. Same !important reasoning as above:
       ol.css's own ".ol-attribution" rule (bottom/right) loads after
       this stylesheet. */
    .ol-attribution { left: 0.5em !important; right: auto !important; text-align: left !important; }
/* ---- templates/pages/search_results.html ---- */
.rs-shell { width: 100%; max-width: 100%; padding: 0 1rem 2rem; overflow-x: clip; }

    /* Tabs */
    .rs-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--grid); margin-bottom: 0.75rem; }
    .rs-tab {
        font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;
        padding: 0.7rem 1.1rem; border: 1px solid var(--grid); border-bottom: none;
        background: transparent; text-decoration: none; margin-right: -1px;
    }
    .rs-tab:hover { color: var(--ink); }
    .rs-tab--active { color: var(--signal); background: var(--surface); box-shadow: inset 0 2px 0 var(--signal); }

    /* Save-search tab (#212): a third tab alongside Items/Datasets, pushed to
       the right of the bar rather than sitting left with the other two, since
       it is an action on the search rather than a way of viewing its results.
       Built on <details>/<summary> so opening it needs no script: the summary
       is the tab-looking clickable label and the box that drops down from it
       is the disclosed content, both handled by the browser. */
    .rs-tab-save { position: relative; margin-left: auto; }
    .rs-tab-save > summary { list-style: none; cursor: pointer; }
    .rs-tab-save > summary::-webkit-details-marker,
    .rs-tab-save > summary::marker { display: none; content: ""; }
    .rs-tab-save[open] > summary { color: var(--signal); background: var(--surface); box-shadow: inset 0 2px 0 var(--signal); }
    .rs-tab-save__panel {
        position: absolute; top: 100%; right: 0; z-index: 20; min-width: 20rem;
        display: flex; gap: 0.5rem; align-items: center;
        padding: 0.7rem; margin-top: -1px;
        border: 1px solid var(--grid); background: var(--surface);
    }
    .rs-tab-save__panel input[type="text"] { flex: 1 1 auto; }

    /* Filter bar */
    .rs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.5rem 0 0.6rem; }
    .rs-count { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    .rs-count b { color: var(--signal); }

    /* Live banner, shown only while suppliers are still being searched. */
    .rs-live { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
               padding: 0.6rem 0.85rem; margin-bottom: 0.75rem;
               border: 1px solid var(--grid); background: var(--surface); }
    .rs-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal);
                    animation: rs-live-pulse 1.5s ease-out infinite; flex: none; }
    @keyframes rs-live-pulse { 0% { box-shadow: 0 0 0 0 rgba(243,146,0,0.5); }
                               70% { box-shadow: 0 0 0 8px rgba(243,146,0,0); }
                               100% { box-shadow: 0 0 0 0 rgba(243,146,0,0); } }
    @media (prefers-reduced-motion: reduce) { .rs-live__dot { animation: none; } }
    /* Kept after the search finishes when a supplier dropped out, so a short
       result set is not mistaken for an empty catalogue. */
    .rs-live--warn { border-color: var(--signal); align-items: flex-start; }
    .rs-live__warn { width: 1rem; height: 1rem; flex: none; stroke: var(--signal); margin-top: 0.1rem; }
    .rs-live__dismiss { margin-left: auto; flex: none; background: none; border: 0; padding: 0; font: inherit; color: var(--ink-dim); text-decoration: underline; cursor: pointer; }
    .rs-live__dismiss:hover { color: var(--ink); }
    .rs-sep { width: 1px; height: 0.85rem; background: var(--grid); }

    .rs-filters { border: 1px solid var(--grid); margin-bottom: 1rem; }
    /* #209: a buyer whose result set has already been narrowed needs to see
       that at a glance, even with the panel collapsed -- otherwise a short
       list reads as a thin catalogue rather than a filtered one. */
    .rs-filters__badge {
        display: inline-flex; align-items: center; justify-content: center; min-width: 1.1rem; height: 1.1rem;
        padding: 0 0.3rem; border-radius: 999px; background: var(--signal); color: var(--base);
        font-size: 0.62rem; letter-spacing: 0; font-weight: 700;
    }

    .rs-filter-panel {
        padding: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 1.25rem;
    }
    .rs-field {
        display: flex; flex-direction: column; gap: 0.35rem;
        padding: 0.55rem 0.6rem; border: 1px solid var(--grid); background: var(--surface);
    }
    .rs-field .rs-field__tag {
        font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;
    }
    .rs-field input, .rs-field select {
        background: var(--surface-2); color: var(--ink); border: 1px solid var(--grid);
        border-radius: 0; padding: 0.4rem 0.55rem; font-size: 0.8rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; width: 100%;
    }
    .rs-field input:focus, .rs-field select:focus { outline: none; border-color: var(--signal); }
    /* An empty filter says what it is rather than showing a blank box (#1432). */
    .rs-field input::placeholder { color: var(--ink-dim); opacity: 1; }
    .rs-field select[multiple] { min-height: 6rem; }
    .rs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .rs-filter-actions { grid-column: 1 / -1; display: flex; gap: 0.6rem; justify-content: flex-end; align-items: center; }

    /* Content */
    .rs-content { display: flex; flex-direction: column; gap: 1.25rem; }
    @media (min-width: 900px) { .rs-content { flex-direction: row; align-items: flex-start; } }
    .rs-cards-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
    @media (min-width: 900px) { .rs-cards-col { flex: 1 1 0; } }
    .rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }

    .rs-map-col { display: flex; flex-direction: column; width: 100%; }
    /* #207: the map read as too thin against the cards column. Widened by
       roughly two card-widths (the cards grid's own column unit is 14rem). */
    @media (min-width: 900px) { .rs-map-col { flex: 0 0 30rem; width: 30rem; position: sticky; top: 5rem; } }
    .rs-map-eyebrow {
        display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem;
        border: 1px solid var(--grid); border-bottom: none; background: var(--surface);
        font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;
    }
    .rs-map-eyebrow b { color: var(--signal); }
    .rs-map-pane { position: relative; border: 1px solid var(--grid); overflow: hidden; background: var(--surface-2); height: clamp(22rem, calc(100vh - 9rem), 40rem); }
    .rs-map-pane #map, .rs-map-pane .ol-viewport { width: 100%; height: 100%; background: var(--base); }

    /* Card */
    .result-card { display: flex; flex-direction: column; border: 1px solid var(--grid); background: var(--surface); text-decoration: none; transition: border-color 150ms ease; }
    .result-card:hover, .result-card.product-card-highlight { border-color: var(--signal); }
    /* #895: the box is sized (aspect-ratio) and drawn (the grid pattern)
       before any quicklook arrives, so a card whose image is still in flight
       shows a placeholder in the space that image will fill rather than a
       blank panel, and nothing on the page moves as the images land. The
       pattern used to live on a .result-card__noimg div the template only
       rendered when an item had no image at all; on the thumb itself it
       covers the loading case too and that div is gone. */
    .result-card__thumb {
        position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--base);
        background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
        background-size: 10px 10px;
    }
    .result-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .result-card__badge {
        position: absolute; top: 6px; left: 6px; font-family: 'IBM Plex Mono', ui-monospace, monospace;
        font-size: 0.55rem; letter-spacing: 0.12em; padding: 2px 6px; background: var(--surface-2);
        border: 1px solid var(--grid); color: var(--ink-dim);
    }
    /* Replaces orbital.css's .dash-chip--signal (#244): that class had no
       visible effect here at all -- this block's own .result-card__badge
       rule sets the same border/colour properties and, being declared later
       in the cascade (this <style> renders after orbital.css's <link>), won
       every time regardless of which order the two classes were written on
       the element. A dedicated modifier declared after the base rule above
       is the fix, not just the DaisyUI-class swap the rest of #244 is doing
       -- .dash-chip--signal was dead weight on this badge from the day it
       was added, not merely due for retirement. */
    .result-card__badge--signal { border-color: var(--signal); color: var(--signal); }
    .result-card__body { padding: 0.6rem 0.7rem 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
    .result-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
    .result-card__prov { color: var(--ink); font-size: 0.82rem; font-weight: 600; }
    .result-card__score, .result-card__meta { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.6rem; letter-spacing: 0.08em; color: var(--ink-dim); }
    .result-card__meta { display: flex; gap: 0.75rem; }
    .result-card__note { margin: 0; font-size: 0.66rem; line-height: 1.35; color: var(--ink-dim); }
    /* #211: date and time are the key fields on a card -- a buyer scanning a
       page of near-identical thumbnails is picking a capture date, not a
       cloud percentage. Given its own class rather than folded into
       .result-card__meta, at a larger size and full-contrast ink rather than
       the dimmed meta colour, so it reads before the buyer has to look for it. */
    .result-card__datetime { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
    .result-card__price { margin-top: 0.15rem; padding-top: 0.45rem; border-top: 1px solid var(--grid); display: flex; align-items: baseline; gap: 0.4rem; }
    .result-card__total { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 700; color: var(--signal); font-size: 0.9rem; }
    .result-card__vat { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.55rem; color: var(--ink-dim); }

    /* Locked card — commercial result outside the buyer's licence, shown
       rather than hidden (#206). The thumbnail is a generic CSS pattern, not
       the real preview blurred client-side: nothing of commercial value is
       ever sent to the browser for one of these cards in the first place. */
    .result-card--locked { cursor: pointer; font: inherit; text-align: left; width: 100%; }
    .result-card--locked:hover, .result-card--locked:focus-visible { border-color: var(--signal); }
    .result-card--locked:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
    .result-card__thumb--locked {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
        background: repeating-linear-gradient(135deg, rgba(243,146,0,0.12) 0 8px, rgba(243,146,0,0.04) 8px 16px), var(--surface-2);
    }
    .result-card__lockicon { width: 1.5rem; height: 1.5rem; stroke: var(--ink-dim); }
    .result-card--locked:hover .result-card__lockicon, .result-card--locked:focus-visible .result-card__lockicon { stroke: var(--signal); }

    /* Pagination + empty */
    .rs-pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--grid); }
    .rs-pg-btn { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); padding: 0.4rem 0.9rem; border: 1px solid var(--grid); background: transparent; text-decoration: none; cursor: pointer; }
    .rs-pg-btn:hover { color: var(--signal); border-color: var(--signal); }
    .rs-pg-btn--off { opacity: 0.35; pointer-events: none; }
    .rs-pg-ind { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif; font-size: 0.8125rem;   color: var(--ink-dim); }
    .rs-pg-ind b { color: var(--signal); }
    .rs-empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem 1rem; border: 1px dashed var(--grid); text-align: center; }
    .rs-empty__title { font-family: 'IBM Plex Sans', ui-sans-serif, sans-serif;   color: var(--signal); font-size: 0.8125rem; }
    .rs-empty__sub { color: var(--ink-dim); font-size: 0.85rem; max-width: 34ch; }

    /* Search-progress modal. dialog.showModal() puts this in the top layer
       with a native backdrop and makes the rest of the page inert on its
       own; only the box itself needs styling here — same convention as
       #addCardModal on the wallet page. */
    .progress-modal-box {
        background: var(--surface); border: 1px solid var(--grid); color: var(--ink);
        width: min(26rem, calc(100vw - 2rem));
        max-height: calc(100vh - 10vh - 2rem);
        margin: 8vh auto 0;
        padding: 1.1rem 1.25rem 1.25rem;
        overflow-y: auto;
    }
    .progress-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
    .progress-modal__close {
        flex: none; display: flex; align-items: center; justify-content: center;
        width: 1.9rem; height: 1.9rem; padding: 0;
        background: transparent; border: 1px solid var(--grid); color: var(--ink-dim); cursor: pointer;
    }
    .progress-modal__close:hover, .progress-modal__close:focus-visible { color: var(--signal); border-color: var(--signal); }
    .progress-modal__list { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
    .progress-modal__hint { color: var(--ink-dim); margin: 0; font-size: 0.68rem; }

    /* #894: the supplier list is a fixed-height window, not a list that
       grows with the supplier count. The summary line accounts for the whole
       search; the window below it shows four suppliers at a time and the
       rest are reached by scrolling, or by the slow auto-scroll driven from
       search_results.html, which stops on hover, on focus and for anyone who
       has asked for reduced motion. Scoped under .progress-modal__scroll
       because the tasking overlay shares .progress-modal__list and is not
       part of this change. */
    .progress-modal__summary { color: var(--ink-dim); margin: 0 0 0.6rem; font-size: 0.68rem; }
    .progress-modal__scroll {
        --progress-row-h: 2.1rem;
        max-height: calc(var(--progress-row-h) * 4);
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
        scrollbar-width: thin;
        margin: 0 0 0.75rem;
        border-top: 1px solid var(--grid);
        border-bottom: 1px solid var(--grid);
    }
    .progress-modal__scroll:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
    /* Rows are exactly one unit tall inside the window, so four of them fill
       it and the fifth is cut cleanly at the border rather than half-shown
       at whatever height its content happened to be. */
    .progress-modal__scroll .progress-modal__list { margin: 0; gap: 0; }
    .progress-modal__scroll .progress-row { height: var(--progress-row-h); }
    .progress-modal__scroll .progress-row + .progress-row { border-top: 1px solid var(--grid); }
    @media (prefers-reduced-motion: reduce) {
        .progress-modal__scroll { scroll-behavior: auto; }
    }

    .progress-row { display: flex; align-items: center; gap: 0.55rem; }
    .progress-row__icon { flex: none; display: flex; }
    .progress-row__name { flex: 1 1 auto; font-size: 0.85rem; }
    .progress-row__state { flex: none; font-size: 0.62rem; letter-spacing: 0.15em; }

    /* Suppliers still working once the progress dialog has closed (pending_suppliers_box.html): the dialog's
       surface, border and rows, inline above the filter and sort bar. The script shows it; hidden wins here. */
    .rs-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem;
                  padding: 0.6rem 0.85rem; margin-bottom: 0.75rem;
                  border: 1px solid var(--grid); background: var(--surface); color: var(--ink); }
    .rs-pending[hidden] { display: none; }
    .rs-pending__title { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--ink-dim); font-size: 0.68rem; }
    .rs-pending__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
    .rs-pending__row .progress-row__name { font-size: 0.8125rem; }
/* ---- templates/pages/status.html ---- */
.status-shell {
        max-width: 60rem;
        margin: 0 auto;
        padding: 4rem 1.5rem 6rem;
    }

    /* Banner pulls its own color from the overall status. */
    .status-banner {
        margin-top: 1.5rem;
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        border: 1px solid var(--grid);
    }
    .status-banner__dot {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        flex-shrink: 0;
        box-shadow: 0 0 16px currentColor;
    }
    .status-banner__title {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-weight: 500;
        font-size: 1.5rem;
        line-height: 1.1;
        margin: 0;
    }
    .status-banner__detail {
        font-size: 0.875rem;
        color: var(--ink-dim);
        margin-top: 0.25rem;
    }

    /* Status palette — solid hex so it survives every theme. */
    .status--operational { color: #22c55e; }
    .status--degraded    { color: #f59e0b; }
    .status--down        { color: #ef4444; }
    .status--unknown     { color: #6b7280; }
    .status--off         { color: #6b7280; }

    .status-banner.status--operational { border-color: rgba(34, 197, 94, 0.55); background: rgba(34, 197, 94, 0.06); }
    .status-banner.status--degraded    { border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.06); }
    .status-banner.status--down        { border-color: rgba(239, 68, 68, 0.55);  background: rgba(239, 68, 68, 0.08);  }
    .status-banner.status--unknown     { border-color: rgba(107, 114, 128, 0.4); background: rgba(107, 114, 128, 0.05); }

    /* Group strip */
    .status-group {
        margin-top: 2.5rem;
    }
    .status-group__head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--grid);
    }
    .status-group__title {
        font-size: 0.8125rem;
        color: var(--ink-dim);
    }

    .status-row {
        display: grid;
        grid-template-columns: 16px minmax(9rem, 1fr) minmax(0, 1.3fr) 4.5rem 9.5rem 6.5rem;
        gap: 1rem;
        align-items: center;
        padding: 0.9rem 0.25rem;
        border-bottom: 1px solid var(--grid);
    }
    .status-row__dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 10px currentColor;
        animation: status-pulse 2.4s ease-in-out infinite;
    }
    @keyframes status-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.45; }
    }
    @media (prefers-reduced-motion: reduce) {
        .status-row__dot { animation: none; }
    }
    .status-row__label {
        font-size: 0.95rem;
        color: var(--ink, inherit);
    }
    .status-row__detail {
        font-size: 0.8125rem;
        color: var(--ink-dim);
        text-align: right;
    }
    .status-row__time,
    .status-row__checked {
        font-size: 0.8125rem;
        color: var(--ink-dim);
        text-align: right;
        white-space: nowrap;
    }
    .status-row__pill {
        font-size: 0.75rem;
        padding: 3px 8px;
        border: 1px solid currentColor;
        text-align: center;
    }
    @media (max-width: 640px) {
        .status-row {
            grid-template-columns: 16px 1fr;
            row-gap: 0.4rem;
        }
        .status-row__detail,
        .status-row__time,
        .status-row__checked,
        .status-row__pill {
            grid-column: 2;
            text-align: left;
        }
        .status-row__pill {
            justify-self: start;
        }
    }

    .status-meter {
        margin-top: 1.5rem;
        font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--grid);
    }
    .status-meter .signal { color: var(--signal); }
/* ---- templates/pages/tasking/submit.html ---- */
.dash-card input, .dash-card select, .dash-card textarea {
        background: var(--panel, transparent);
        border: 1px solid var(--grid);
        color: var(--ink);
        padding: 0.5rem 0.6rem;
        font-family: inherit;
        width: 100%;
    }
    .stat-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
/* ---- templates/_error_shell.html ---- */
.err-shell {
        min-height: calc(100dvh - 6rem);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4rem 1.5rem;
        position: relative;
        background:
            radial-gradient(1px 1px at 12% 28%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 78% 14%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 41% 71%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 86% 64%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 22% 84%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 64% 39%, var(--ink-dim) 50%, transparent 51%),
            radial-gradient(1px 1px at 9% 56%, var(--ink-dim) 50%, transparent 51%);
    }
    .err-shell::after {
        content: '';
        position: absolute; inset: 0;
        background: radial-gradient(ellipse at 50% 50%, transparent 0%, var(--base) 78%);
        pointer-events: none;
    }
    .err-frame {
        position: relative;
        width: 100%;
        max-width: 44rem;
        padding: 3rem 2.5rem 2.5rem;
        background: var(--surface);
        border: 1px solid var(--grid);
        z-index: 1;
    }
    .err-frame::before,
    .err-frame::after,
    .err-frame > .corner-bl,
    .err-frame > .corner-br {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        border: 1px solid var(--signal);
    }
    .err-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
    .err-frame::after  { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
    .err-frame > .corner-bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
    .err-frame > .corner-br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

    .err-code {
        font-family: var(--font-mono, ui-monospace, monospace);
        font-size: clamp(4.5rem, 14vw, 8rem);
        font-weight: 300;
        line-height: 0.92;
        letter-spacing: -0.02em;
        color: var(--signal);
        margin-bottom: 1rem;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0 1.25rem;
    }
    .err-code .slash {
        font-size: 0.45em;
        color: var(--ink-dim);
        font-weight: 300;
        letter-spacing: 0;
    }

    .err-title {
        font-family: var(--font-display, "Space Grotesk", ui-sans-serif, sans-serif);
        font-size: clamp(1.5rem, 3.5vw, 2.25rem);
        font-weight: 400;
        line-height: 1.15;
        color: var(--ink);
        margin-bottom: 0.75rem;
        letter-spacing: -0.01em;
    }
    .err-body {
        font-size: 0.95rem;
        line-height: 1.55;
        color: var(--ink-dim);
        max-width: 40ch;
        margin-bottom: 2rem;
    }

    .err-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2.25rem;
    }
    .err-cta {
        font-family: var(--font-mono, ui-monospace, monospace);
        font-size: 0.8125rem;
        padding: 0.7rem 1.1rem;
        border: 1px solid var(--grid);
        background: transparent;
        color: var(--ink);
        text-decoration: none;
        cursor: pointer;
        transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .err-cta:hover {
        color: var(--signal);
        border-color: var(--signal);
    }
    .err-cta--primary {
        background: var(--signal);
        color: var(--base);
        border-color: var(--signal);
    }
    .err-cta--primary:hover {
        background: var(--ink);
        border-color: var(--ink);
        color: var(--base);
    }

    .err-telemetry {
        border-top: 1px dashed var(--grid);
        padding-top: 1.25rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
        gap: 1rem;
        font-family: var(--font-mono, ui-monospace, monospace);
        font-size: 0.8125rem;
        color: var(--ink-dim);
    }
    .err-telemetry .v { color: var(--ink); display: block; margin-top: 4px; letter-spacing: 0.12em; text-transform: none; }
    .err-telemetry a { color: var(--signal); text-decoration: none; }
    .err-telemetry a:hover { text-decoration: underline; }
/* Library file tree and its tabs (#1027). */
.lib-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.lib-tabs__tab--active { border-color: var(--signal); color: var(--signal); }
.lib-tree summary { cursor: pointer; list-style: none; }
.lib-tree summary::-webkit-details-marker { display: none; }
.lib-tree summary::before {
    content: "+";
    flex: 0 0 0.75rem;
    font-family: var(--font-mono, monospace);
    color: var(--ink-dim);
}
.lib-tree details[open] > summary::before,
.lib-tree[open] > summary::before { content: "\2212"; }
.lib-tree__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.3rem 0; }
.lib-tree__icon { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; }
.lib-tree__children {
    list-style: none;
    margin: 0.2rem 0 0.4rem 0.35rem;
    padding-left: 0.9rem;
    border-left: 1px solid var(--grid);
}
.lib-tree__children--items .lib-tree__row { padding-left: 1.25rem; }
.lib-tree__meta { color: var(--ink-dim); font-size: 0.7rem; }
.lib-tree__order { margin-left: auto; text-decoration: none; }
.lib-tree__link { color: inherit; text-decoration: none; }
.lib-tree__link:hover,
.lib-tree__link:focus-visible { color: var(--signal); text-decoration: underline; }

/* Search results, product cards, result pages, collections index, notifications panel (#1048 slice 14). */

/* pages/search_results.html */
.rs-tab--push { margin-left: auto; }
.rs-save-form { display: flex; gap: 0.5rem; align-items: center; width: 100%; }
.rs-save-input {
    background: var(--surface-2); color: var(--ink);
    border: 1px solid var(--grid); border-radius: 0;
    padding: 0.4rem 0.55rem; font-size: 0.8rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.rs-save-btn { flex: 0 0 auto; }
.modal-scrim { background: rgba(0, 0, 0, 0.55); }
.progress-modal__title { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); margin: 0; }
.rs-upgrade-box { max-width: 26rem; margin: 10vh auto 0; }
.rs-upgrade-head { margin-bottom: 0.85rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.rs-upgrade-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.2rem; margin: 0.25rem 0 0; }
.rs-upgrade-reasons { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-dim); font-size: 0.85rem; }
.rs-upgrade-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }

/* product_card.html. Overlay text sits on a fixed dark scrim over the photo and
   keeps literal light values (not theme vars) on purpose, so it reads on black in
   every theme; same reasoning as the comment in the template. */
.pc-dot { background: var(--pulse); }
.pc-vf { background: currentColor; }
.pc-overlay-ink { color: #E9E5DC; }
.pc-overlay-ink-70 { color: rgba(233, 229, 220, 0.7); }
.pc-overlay-ink-85 { color: rgba(233, 229, 220, 0.85); }
.pc-overlay-accent { color: #F39200; }

/* partials/notifications_panel.html */
/* The dialog box is sized to the content; the panel fills it, so rows, dividers, header and footer share one width. */
#bell-dialog .modal-box { width: 100%; max-width: 26rem; }
.notifications-panel li + li { border-top: 1px solid var(--grid); }
.notifications-panel .is-unread { background: rgba(245, 124, 0, 0.05); }

/* Shared colour and border utilities used by the templates in this slice. */
.border-grid { border-color: var(--grid); }
.text-ink { color: var(--ink); }
.text-ink-dim { color: var(--ink-dim); }
.text-pulse { color: var(--pulse); }

/* pages/result_item_page.html and pages/result_dataset_page.html */
.pp-head__id--bare { margin: 0; font-weight: inherit; }
.pp-head__crumb--end { margin-left: auto; }
.pp-col { display: flex; flex-direction: column; gap: 1.25rem; }
.pp-error--hidden { display: none; }
.pp-inbasket { display: flex; gap: 0.5rem; align-items: flex-end; }
.pp-inbasket form { margin: 0; }
.pp-inbasket .pp-addbtn { flex: 1; width: auto; }
.pp-inbasket .pp-removebtn { margin-top: 0.85rem; }
.text-signal { color: var(--signal); }
.pp-panel--wide { grid-column: 1 / span 2; }
.pp-reason-list { margin: 0 0 0.85rem; padding-left: 1.1rem; color: var(--ink-dim); font-size: 0.85rem; }
.pp-btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* pages/result_dataset_page.html */
.pp-panel__head--bordered { border: 1px solid var(--grid); border-bottom: none; }
.pp-items__box { border: 1px solid var(--grid); padding: 0 0.75rem; }
.pp-items__empty { padding: 1rem 0; }
.pp-grid--spaced { margin-top: 1.5rem; }
/* The item whose preview the page is showing, and the button under that preview (#1433). */
.pp-item-card[aria-current="true"] { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.pp-item-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
/* A member's badge (#1066): a red circled x leaves it out of the dataset, a green circled + puts it
   back, and a card whose member is left out is greyed. The badge sits over the card's corner. */
.pp-item-cell { position: relative; display: flex; }
.pp-item-cell > .pp-item-card { flex: 1; min-width: 0; }
.pp-member-toggle { position: absolute; top: 0.4rem; right: 0.4rem; margin: 0; }
.pp-member-toggle__btn { width: 1.6rem; height: 1.6rem; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--error); color: var(--color-error-content); font-size: 1.1rem; line-height: 1; cursor: pointer; box-shadow: 0 0 0 2px var(--surface); }
.pp-member-toggle__btn--restore { background: var(--color-success); color: var(--color-success-content); }
.pp-member-toggle__btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pp-item-cell:has(> [data-member-excluded]) > .pp-item-card { opacity: 0.45; filter: grayscale(1); }
.pp-item-held { position: absolute; top: 0.4rem; right: 0.4rem; padding: 0.1rem 0.35rem; background: var(--surface); color: var(--ink-dim); font-size: 0.55rem; }
.pp-preview-open { margin-top: 0.75rem; }
/* Names the item the STAC panel describes (#1433). */
.pp-stac-for { margin: 1.5rem 0 0.35rem; }


/* Staff pages: pass-through, verification, fraud, export control, users, dashboard (#1048 slice 15). */
/* Section spacing. */
.internal-shell .dash-section { margin-bottom: 2rem; }
.internal-shell .dash-section-label { margin-bottom: 0.75rem; }
.internal-shell .dash-stack { margin-top: 1.25rem; }
.internal-shell .dash-stack--lg { margin-top: 2rem; }
.internal-shell .dash-stat-row { margin-bottom: 1.5rem; }

/* Grids that lay cards and form fields side by side. */
.internal-shell .dash-form-grid { display: grid; gap: 1.25rem; }
.internal-shell .dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.internal-shell .dash-grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.internal-shell .dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }

/* Pass-through config form. */
.internal-shell .dash-msgs { margin-bottom: 1rem; }
.internal-shell .dash-field-hint { display: block; font-size: 0.7rem; margin-bottom: 0.25rem; }
.internal-shell .dash-field--check { align-items: center; gap: 0.5rem; }
.internal-shell .dash-check-label { margin: 0; cursor: pointer; }
/* Client On-Boarding's clause sections: a numbered list read down two columns, each clause kept whole. */
.internal-shell .dash-clauses { columns: 2; column-gap: 2rem; margin-top: 1rem; }
.internal-shell .dash-clauses > li { break-inside: avoid; padding: 0.375rem 0; }
.internal-shell .dash-clauses .dash-field--check { display: flex; align-items: baseline; }
.internal-shell .dash-clauses__number { display: inline-block; min-width: 2rem; margin-right: 0.5rem; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.internal-shell .dash-clauses__reason { display: block; font-size: 0.75rem; color: var(--ink-dim); }
@media (max-width: 767px) { .internal-shell .dash-clauses { columns: 1; } }
/* The checklist folds away under its section's button and choices; the Client Contract's is the smaller one. */
.internal-shell .dash-clauses-fold > summary { cursor: pointer; margin-top: 0.5rem; }
.internal-shell .dash-clauses--compact { font-size: 0.8125rem; }
.internal-shell .dash-clauses--compact > li { padding: 0.125rem 0; }
/* Client On-Boarding's Territory section: room after its heading and between its tables, picker and regions. */
.internal-shell [data-territory] > summary { margin-bottom: 1.25rem; }
.internal-shell [data-territory] .dash-territory__part + .dash-territory__part { margin-top: 2rem; }
.internal-shell .dash-form-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; }
.internal-shell .dash-meta-card { margin-top: 1rem; font-size: 0.8rem; }
.internal-shell .dash-meta-label { margin-bottom: 0.25rem; }

/* Verification detail: record list and history rows. */
.internal-shell .dash-dt { margin-top: 0.5rem; }
.internal-shell .dash-pre { white-space: pre-wrap; }
.internal-shell .dash-note-top { margin-top: 0.75rem; }
.internal-shell .dash-history-row { border-bottom: 1px solid var(--grid); padding: 0.5rem 0; }

/* Fraud dashboard: highlighted counts and row actions. */
.internal-shell .dash-num--pulse { color: var(--pulse); font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.internal-shell .dash-actions-cell { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.internal-shell .dash-inline-form { display: inline; }
.internal-shell .btn-ghost-line--pulse { color: var(--pulse); border-color: var(--pulse); }

.internal-shell .dash-code-sm { font-size: 0.7rem; }

/* Users detail: header action row. */
.internal-shell .dash-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* An on-boarding past Draft: its fields are locked until Edit (client_onboarding/_edit_lock.html). */
.internal-shell fieldset[data-edit-lock] { min-width: 0; }
.internal-shell fieldset[data-edit-lock]:disabled :is(input, select, textarea, button) { cursor: not-allowed; opacity: 0.6; }
.internal-shell .dash-head-actions.account-actions { margin-bottom: 1.25rem; }

/* Dashboard empty state hint (pairs with the global .dash-empty). */
.internal-shell .dash-empty__hint { font-size: 0.875rem; color: var(--ink-dim); margin-top: 0.5rem; }


/* Organisation uploads: list, collection, item (#1048 slice 16). */
.org-uploads-card { margin-bottom: 1rem; }
.org-uploads-gate { padding: 1rem 1.25rem; border-color: var(--pulse, var(--signal)); }
.org-uploads-gate__row { display: flex; align-items: flex-start; gap: 0.875rem; }
.org-uploads-gate__label { white-space: nowrap; }
.org-uploads-gate__body { flex: 1; }
.org-uploads-gate__lead { color: var(--ink); font-size: 0.9rem; margin-bottom: 0.375rem; }
.org-uploads-gate__note { color: var(--ink-dim); font-size: 0.75rem; }
.org-uploads-gate__cta { border: 1px solid var(--signal); padding: 0.4rem 0.75rem; color: var(--signal); text-decoration: none; white-space: nowrap; }
/* .dash-table th sets text-align at (0,1,1), so a lone class cannot right-align a header. */
.dash-table .org-uploads-count { text-align: right; }
.org-uploads-empty__title { margin-bottom: 0.75rem; }
.org-uploads-empty__note { font-size: 0.875rem; color: var(--ink-dim); }
/* The STAC upload rules above lose to .dash-table td (0,1,1) on colour and size,
   and to .btn-ghost-line, which comes after them, on padding; restated here at a
   weight that wins. */
.dash-table .stac-table__key { color: var(--ink-dim); font-size: 0.75rem; }
.stac-table__key--fit { width: auto; }
.btn-ghost-line.stac-pagination__btn { padding: 0.25rem 0.625rem; }
.stac-pagination__current { color: var(--signal); font-weight: 700; }
.org-uploads-id { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; }
.org-uploads-raw { border-top: 1px solid var(--grid); }
.org-uploads-raw__summary { padding: 0.875rem 1.25rem; user-select: none; }
.dash-table .stac-table__key--narrow { font-size: 0.7rem; }
/* A label the template types, rather than a key read from the item, is words, so body face. */
.dash-table .stac-table__key--label { font-family: inherit; font-size: 0.8125rem; }
/* The page-wide #map rules fix the height by id, which no class outranks. */
#map.stac-map { height: 38vh; }
.org-uploads-title { word-break: break-all; }
.org-uploads-overlay-url { display: none; }
.org-uploads-details-list { padding: 0.5rem 0; }
.org-uploads-raw__summary--card { padding: 1rem 1.25rem; }


/* Derived assets, registry profile, feed, purchase confirmation, toolchains (#1048 slice 17). */
.provenance-card { margin-bottom: 1.25rem; }
.provenance-line { margin: 0.5rem 0 0; }
.provenance-line--figure { font-size: 1.5rem; }
.provenance-table { margin-top: 0.5rem; }
.provenance-subhead { margin-top: 1.25rem; }
.provenance-foot { margin-top: 1rem; }
.ps-alert { color: var(--signal); }
.ps-title { font-size: 1.1rem; margin: 0; color: var(--ink); }
.ps-facts { margin: 0; }
.ps-unmatched { padding-top: 0.75rem; color: var(--ink-dim); }
.ps-next__label { display: block; margin-bottom: 0.5rem; }
.toolchains-notice { border-left: 3px solid var(--signal); }
.toolchains-title { font-size: 1.1rem; }
.toolchains-note { color: var(--ink-dim); }


/* Tasking list and submit, saved searches, notification preferences, profile settings (#1048 slice 12). */
.page-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 2rem; color: var(--ink); margin: 0.25rem 0 1.5rem; }
.page-title--compact { margin: 0.25rem 0 0.5rem; }
.page-lede { color: var(--ink-dim); margin: 0 0 1.5rem; }
.messages-block { margin-bottom: 1rem; }
.stack-list { display: flex; flex-direction: column; gap: 0.75rem; }
.card-title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.25rem; color: var(--ink); margin: 0; }
.readout--tight { margin: 0.35rem 0 0; }
.readout--help { font-size: 0.75rem; }
.readout--plain { text-decoration: none; }
.readout--link { text-decoration: underline; display: inline-block; margin-top: 0.5rem; }
.readout--center { text-align: center; }
.readout--mb-sm { margin-bottom: 0.5rem; }
.readout--spaced { margin-top: 0.75rem; }
.status-pill { border: 1px solid var(--grid); padding: 0.3rem 0.6rem; }
.dash-card--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.dash-card--form-stack { display: flex; flex-direction: column; gap: 1rem; }
.dash-card--spaced { margin-bottom: 1.5rem; }
.dash-card--avatar-col { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.dash-page--form { max-width: 48rem; margin: 0 auto; padding: 2rem 1rem; }
.dash-page--shared { max-width: 40rem; margin: 0 auto; padding: 3rem 1rem; }
.dash-page--settings { max-width: 56rem; }
.form-reset-align { margin-top: 0.5rem; text-align: left; }
.form-top-spaced { margin-top: 1.5rem; }
.form-actions-row { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--grid); }
.field-stack { display: flex; flex-direction: column; gap: 0.35rem; }
.row-actions { display: flex; gap: 0.75rem; align-items: center; }
.row-actions--wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-align-center { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.inline-form-row { display: flex; gap: 0.35rem; }
.dash-input.dash-input--narrow { width: 8rem; }
.btn-signal--xs { padding: 0.4rem 1rem; }
.btn-signal--md { padding: 0.5rem 1.5rem; }
.btn-ghost-mini { background: none; border: 1px solid var(--grid); padding: 0.4rem 0.7rem; text-decoration: none; cursor: pointer; }
.definition-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; margin: 0; }
.definition-value { color: var(--ink); margin: 0; }
.id-badge { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.125rem; letter-spacing: 0.08em; color: var(--signal); padding: 0.5rem 0.75rem; border: 1px solid var(--grid); background: var(--base); }
.avatar-img { width: 128px; height: 128px; object-fit: cover; border: 1px solid var(--grid); }
.avatar-placeholder { width: 128px; height: 128px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 2.25rem; color: var(--signal); border: 1px solid var(--grid); }
.locked-field-box { background: var(--base); border: 1px solid var(--grid); padding: 0.5rem 0.75rem; flex: 1 1 auto; min-width: 14rem; }
.fs-1 { font-size: 1rem; }
.ml-sm { margin-left: 0.5rem; }
.border-grid { border-color: var(--grid); }
.text-ink { color: var(--ink); }
.text-ink-dim { color: var(--ink-dim); }


/* Supplier widgets: revenue, data types, payouts, buyer countries (#1048 slice 18). */
/* The revenue card heads with a small label rather than a title, so label and chip hang from the top. */
.swidget-head--top { align-items: flex-start; }
/* A count chip: the figure in mono (.mono-face), the word in the chip's body face. A flex chip
   drops the space between the two, so the gap puts it back. */
.dash-chip--count { align-items: baseline; gap: 0.3em; }
.revenue-strip { margin-top: 0.875rem; }
.revenue-rule { margin: 1rem 0; }
.revenue-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.revenue-figure { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-size: 1.05rem; margin: 0.25rem 0 0; }
.swidget-table { margin-top: 1rem; }
/* .dash-table th sets text-align and .dash-table td sets colour at (0,1,1), which a lone class
   loses to (.dash-table__end and .dash-table__dim included), so these name the table. */
.dash-table .swidget-end { text-align: right; }
.dash-table .swidget-dim { color: var(--ink-dim); }
.dash-table .swidget-signal { color: var(--signal); }
.buyer-countries-code { margin-right: 0.5rem; }



/* Staff detail pages: agreement verification, supplier, order, country, clearance, ticket (#1048 slice 20). */
/* Agreement verification: the signed document is its LaTeX source, so it stays mono, in a box that scrolls. */
.internal-shell .dash-doc-source { white-space: pre-wrap; max-height: 16rem; overflow-y: auto; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; }
/* Order and country review: a wrapping preformatted block sits flush, as its inline style had it. */
.internal-shell pre.dash-pre { margin: 0; }
/* Messages and notes people wrote read in the body face; a pre keeps their line breaks. */
.internal-shell pre.dash-pre--prose { font-family: inherit; }
/* Order refund card keeps to a readable width. */
.internal-shell .dash-card--narrow { max-width: 32rem; }
/* Support ticket: stacked cards, thread messages and the transition row. */
.internal-shell .dash-card--spaced-sm { margin-bottom: 1rem; }
.internal-shell .dash-thread-msg { border-left: 2px solid var(--grid); padding-left: 0.75rem; margin-bottom: 0.75rem; }
.internal-shell .dash-transition-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.75rem; align-items: end; }



/* Organisation partials: role form, roles, users, profile, invite, country change (#1048 slice 21). */
.dash-page--role-form { max-width: 60rem; }
.org-role-card { margin-bottom: 1rem; }
.org-role-error { color: var(--pulse); font-size: 0.75rem; margin-top: 0.25rem; }
.org-role-cell-error { color: var(--pulse); font-size: 0.7rem; }
/* .dash-table th sets text-align at (0,1,1), so a lone class cannot right-align a header. */
.dash-table .org-col-end { text-align: right; }
.org-col-view { width: 2.5rem; }
.org-view-link { color: var(--ink-dim); display: inline-flex; }
/* .org-role-empty (slice 13) loses its padding and colour to .dash-table td (0,1,1); restated at a weight that wins. */
.dash-table td.org-role-empty { padding: 1.5rem; text-align: center; color: var(--ink-dim); }
/* .dash-table td sets colour and size at (0,1,1). */
.dash-table td.org-member-email { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink-dim); font-size: 0.8125rem; }
/* The organisation monogram is the profile placeholder in the display face. */
.avatar-placeholder--serif { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 3rem; }
.dash-page--invite { max-width: 48rem; }
.org-invite-card { text-align: center; padding: 2rem; }
.org-invite-title { font-size: 1.75rem; font-weight: 400; color: var(--ink); margin-bottom: 0.75rem; }
.org-invite-note { color: var(--ink-dim); font-size: 0.875rem; margin-bottom: 1.5rem; }
.org-invite-actions { display: flex; gap: 0.5rem; justify-content: center; }
.country-change-card { margin-bottom: 1.25rem; }
.country-change-route { font-size: 1.375rem; font-weight: 400; margin: 0 0 0.5rem; color: var(--ink); }
.country-change-rule { border: 0; border-top: 1px solid var(--grid); margin: 1rem 0; }
.country-change-reason { font-size: 0.875rem; color: var(--ink); margin: 0 0 1rem; white-space: pre-wrap; }
.readout--mb-md { margin-bottom: 0.875rem; }
/* Words, so the body face rather than mono. */
.country-change-empty { color: var(--ink-dim); font-size: 0.875rem; margin: 0; }
/* After .btn-ghost-line, which sets font-size at the same weight. */
.btn-ghost-line--sm { font-size: 0.75rem; }
/* The organisation's access editor: policies, conditions, the YAML or JSON document, roles (#1533). */
.access-outcome { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.access-outcome__block { margin-bottom: 1rem; align-items: flex-start; }
.access-outcome__title { margin: 0 0 0.25rem; }
.access-outcome__list { margin: 0; padding-left: 1rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; }
.access-checks > div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.access-checks label, .access-check { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--ink); }
.access-checks--scroll { max-height: 14rem; overflow-y: auto; border: 1px solid var(--grid); padding: 0.5rem 0.75rem; }
.access-checks--scroll > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.access-checks--scroll label { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; }
.access-enabled { justify-content: flex-end; }
.dash-table.access-conditions td { vertical-align: top; }
.access-conditions select, .access-conditions input { width: 100%; }
.access-conditions__errors td { padding-top: 0; }
.access-conditions__help { padding: 0.75rem 1rem; margin: 0; }
.access-syntax { max-width: 12rem; }
.dash-field textarea.access-document { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; line-height: 1.5; tab-size: 2; white-space: pre; }
.access-member-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.75rem; align-items: end; padding: 1rem; border-top: 1px solid var(--grid); }
.dash-table tr.access-row--off td { color: var(--ink-dim); }


/* Two-factor pages: enrol, verify, sign-in code, setup, recovery codes (#1048 slice 19). */
.mfa-page { max-width: 28rem; margin: 5rem auto; padding: 0 1rem; }
.mfa-page--enrol { max-width: 34rem; margin: 4rem auto; }
.mfa-card { padding: 2rem 1.5rem; }
.mfa-title { margin-bottom: 0.25rem; }
.mfa-lede { color: var(--ink-dim); font-size: 0.875rem; margin-bottom: 1.25rem; }
.mfa-alert { margin-bottom: 1rem; }
.mfa-steps { color: var(--ink-dim); font-size: 0.875rem; line-height: 1.7; padding-left: 1.1rem; margin-bottom: 1.25rem; }
.mfa-qr { text-align: center; margin-bottom: 1.25rem; }
/* White in both themes on purpose: the padding is the quiet zone a scanner needs. */
.mfa-qr__img { width: 200px; height: 200px; background: #ffffff; padding: 0.5rem; border: 1px solid var(--grid); }
.mfa-key-label { margin-bottom: 0.25rem; }
.mfa-key { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--signal); word-break: break-all; font-size: 0.875rem; margin-bottom: 0.25rem; }
.mfa-key-note { color: var(--ink-dim); font-size: 0.75rem; margin-bottom: 1.5rem; }
/* .dash-field input[type="text"] and .dash-field input:focus are (0,2,1) and set the face,
   colour, padding and border, so the code input matches that weight and wins on source order. */
.dash-field input.mfa-code { background: var(--base); color: var(--signal); border: 1px solid var(--grid); padding: 0.75rem 0.875rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.25rem; letter-spacing: 0.4em; width: 100%; text-align: center; }
.mfa-btn { display: block; width: 100%; text-align: center; }
.mfa-btn--submit { margin-top: 1rem; }
.mfa-or { font-size: 0.6875rem; text-align: center; margin: 1.25rem 0 0.75rem; }
.mfa-remaining { margin-top: 1.25rem; text-align: center; }
.mfa-foot { text-align: center; margin-top: 0.75rem; }
.mfa-foot__link { color: var(--ink-dim); font-size: 0.8125rem; }
button.mfa-foot__link { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.mfa-setup__qr-card { display: flex; flex-direction: column; align-items: center; padding: 1.5rem; }
.mfa-setup__label { margin-bottom: 0.75rem; }
/* White for the same reason as .mfa-qr__img. */
.mfa-setup__qr-frame { background: #ffffff; padding: 0.75rem; border: 1px solid var(--grid); }
.mfa-setup__qr { display: block; width: 200px; height: 200px; }
.mfa-setup__hint { margin-top: 0.875rem; font-size: 0.7rem; color: var(--ink-dim); text-align: center; }
.mfa-setup__secret { display: block; margin-top: 0.375rem; padding: 0.5rem 0.75rem; background: var(--base); border: 1px solid var(--grid); color: var(--signal); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; letter-spacing: 0.1em; word-break: break-all; text-align: center; }
.mfa-setup__steps { color: var(--ink); font-size: 0.875rem; line-height: 1.55; padding-left: 1.25rem; margin: 0 0 1.25rem; }
.dash-field input.mfa-code--compact { padding: 0.625rem 0.75rem; font-size: 1.125rem; }
/* The code input sets its own border, which hid the focus colour every other field shows. */
.dash-field input.mfa-code:focus { border-color: var(--signal); }
.mfa-page--codes { max-width: 32rem; margin: 4rem auto; }
.mfa-codes { border: 1px solid var(--grid); padding: 1rem; margin-bottom: 1.25rem; }
.mfa-codes__code { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--signal); font-size: 1rem; letter-spacing: 0.12em; margin: 0.35rem 0; }


/* Processing pages: new job, job, jobs, derived products (#1048 slice 22). */
.dash-page--job-form { max-width: 40rem; margin: 0 auto; padding: 2rem 1rem; }
.processing-card { padding: 1.5rem; }
.processing-field { margin-bottom: 1rem; }
.processing-field-last { margin-bottom: 1.5rem; }
.processing-label { display: block; margin-bottom: 0.4rem; }
.processing-disclaimer { margin-bottom: 1.5rem; }
/* Field errors took --danger and --alert, neither of which is defined, so they read in the theme's error colour. */
.field-error { color: var(--error); }
.processing-card-stacked { padding: 1.5rem; margin-bottom: 1.25rem; }
.processing-status { font-size: 1.1rem; }
.processing-result-label { margin-bottom: 0.75rem; }
.processing-preview { max-width: 100%; border: 1px solid var(--grid); margin-bottom: 1rem; }
.processing-figure-label { margin: 1rem 0 0.4rem; }
.processing-figure { margin-bottom: 0.5rem; }
/* The lists keep the page's width with a narrower gutter. */
.dash-page--processing { max-width: 80rem; margin: 0 auto; padding: 2rem 1rem; }
.processing-table-card { padding: 0; margin-bottom: 1.25rem; }
.processing-empty { padding: 2rem; text-align: center; }
/* File and asset names are identifiers, so mono. */
.processing-name { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); }

/* Toolchain forms, buyer and staff, and their shared add-step control (#1048 slice 22). */
/* A chain with a run in flight: --signal-amber is not defined, so its fallback amber is what shows. */
.toolchains-notice--running { border-left: 3px solid var(--signal-amber, #d08700); }
/* A chain that did not validate: --signal-red is not defined either, so it takes the error colour as field errors do. */
.toolchains-notice--invalid { border-left: 3px solid var(--error); }
.toolchains-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toolchains-title--steps { margin-top: 1.5rem; }
.toolchains-save { margin-top: 1rem; }
.toolchains-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.toolchains-add-step { margin-top: 0.5rem; }


/* Staff lists and forms: staff, staff function, data operations, onboarding, pass-through, clearance levels (#1048 slice 23). */
.internal-shell .staff-matrix { margin-top: 1.5rem; max-width: 40rem; }
.internal-shell .dash-btn-top { margin-top: 0.75rem; }
.internal-shell .dash-empty-card { padding: 2rem; text-align: center; border: 1px dashed var(--grid); }
.internal-shell .dash-filter-card { margin-bottom: 1.25rem; }
.internal-shell .dash-filter-row { display: flex; gap: 0.75rem; align-items: end; flex-wrap: wrap; }
.internal-shell .dash-field ~ .btn-signal { margin-bottom: 1rem; }
.internal-shell .dash-pager { margin-top: 1rem; display: flex; gap: 0.5rem; align-items: center; }

/* Console lists (app_internal/lists.py, templates/internal/_list.html). */
.internal-shell .console-list__filters { margin-bottom: 0.75rem; }
.internal-shell .console-list__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0 0.75rem; align-items: end; }
.internal-shell .console-list__search { grid-column: span 2; }
.internal-shell .console-list__check { justify-content: flex-end; }
.internal-shell .console-list__check label { display: flex; gap: 0.5rem; align-items: center; }
.internal-shell .console-list__buttons { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.internal-shell .console-list__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.internal-shell .console-list__sort { color: inherit; text-decoration: none; white-space: nowrap; }
.internal-shell .console-list__sort.is-active { color: var(--ink); font-weight: 600; }
.internal-shell .console-list__sort:hover { text-decoration: underline; }
.internal-shell .console-list__table td { padding-block: 0.5rem; }
/* A row that opens: the first cell's link is stretched over the row, and links of their own sit above it. */
.internal-shell .console-list__row { position: relative; cursor: pointer; }
.internal-shell .console-list__row:hover { background: var(--surface); }
/* A cell of machine text (an audit snapshot): one scrolling line, not a wall. */
.internal-shell .console-list__pre { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; font-size: 0.6875rem; }
/* The machine-text column takes what the other columns leave and scrolls inside itself, so it never widens the table. */
.internal-shell .console-list__table td:has(> .console-list__pre) { max-width: 0; width: 30%; min-width: 12rem; }
/* A table still wider than its card (a narrow window) scrolls inside the card instead of spilling out of it. */
.internal-shell .console-list__scroll { overflow-x: auto; }
.internal-shell .console-list__nowrap { white-space: nowrap; }
.internal-shell .console-list__open { color: inherit; text-decoration: none; }
.internal-shell .console-list__open::after { content: ""; position: absolute; inset: 0; }
.internal-shell .console-list__row .console-list__link { position: relative; z-index: 1; color: inherit; }
.internal-shell .dash-card--spaced-xs { margin-bottom: 0.75rem; }
.internal-shell .dash-cell--truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.internal-shell .dash-cell--actions { display: flex; gap: 0.5rem; align-items: center; }
.internal-shell .dash-actions-cell--end { justify-content: flex-end; }


/* Public partials: cookie banner, API docs, access panels, STAC metadata, result card, product page sections, search and header pieces, help guide (#1048 slice 24). */
/* The banner, its customise panel and its save button keep display inline: the script shows and hides them, and reads the panel's back. */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: var(--surface); color: var(--ink); border-top: 1px solid var(--ink-dim); box-shadow: 0 -8px 24px rgba(0,0,0,0.28); }
.cookie-banner__link { color: var(--signal); text-decoration: underline; }
.cookie-banner__btn { padding: 0.5rem 0.85rem; background: transparent; cursor: pointer; }
.cookie-banner__btn--accept { border: 1px solid var(--signal); color: var(--signal); }
.cookie-banner__btn--necessary { border: 1px solid var(--ink-dim); color: var(--ink); }
.cookie-banner__btn--customise { border: 1px solid transparent; color: var(--ink-dim); }
.cookie-banner__btn--save { border: 1px solid var(--pulse); color: var(--pulse); }
/* On a phone the banner is a strip, not a third of the screen: smaller type, tighter spacing and the three
   buttons on one row. What it says and what the buttons do are unchanged. */
@media (max-width: 639px) {
    .cookie-banner > div { padding: 0.5rem 0.75rem; gap: 0.5rem; }
    .cookie-banner .readout { margin-bottom: 0.125rem; font-size: 0.625rem; }
    .cookie-banner p { font-size: 0.6875rem; line-height: 1.3; }
    .cookie-banner__btn { padding: 0.375rem 0.5rem; font-size: 0.625rem; white-space: nowrap; }
    .cookie-banner .flex-wrap { flex-wrap: nowrap; gap: 0.25rem; }
}
/* API docs: a parameter's kind reads lighter than its name. */
.endpoint__param-kind { color: var(--ink-dim); font-weight: 400; }
/* Access panels on the result and product pages. */
.access-panel__row { margin-top: 0.5rem; }
.access-panel__select { background: transparent; border: 1px solid var(--grid); color: var(--ink); padding: 0.4rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; }
.access-panel__select--full { width: 100%; }
.access-panel__select--narrow { width: 75%; }
.access-panel__pick { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 0.5rem; }
.access-panel__actions { margin-top: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.access-panel__buttons { margin-top: 0.4rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.access-panel__empty { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--ink-dim); }
.access-panel__note { margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--ink-dim); }
.access-panel__endpoint { display: block; margin-top: 0.6rem; padding: 0.6rem; border: 1px solid var(--grid); background: var(--base); color: var(--ink); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem; word-break: break-all; }
/* STAC metadata: the panel and its bounding box span the grid; providers and assets are short lists. */
.pp-span-all { grid-column: 1 / -1; }
.pp-stac-providers { padding: 0.7rem 1rem; border-top: 1px solid var(--grid); }
.pp-stac-providers__list { margin: 0.35rem 0 0; padding-left: 1.1rem; font-size: 0.85rem; color: var(--ink); }
.pp-stac-assets { margin: 0.35rem 0 0; padding: 0.7rem 1rem; padding-top: 0; list-style-position: inside; font-size: 0.85rem; color: var(--ink); }
/* A scene id or asset name has nothing to break at, so on a phone it ran past its box and widened the page (#1205). `anywhere`, unlike `break-word`, also lowers the box's minimum width. */
.pp-head__id, .pp-stac-assets, .pp-title, .readout--ink, .readout--wrap { overflow-wrap: anywhere; }
/* A locked result card's price line: after .result-card__total, whose colour and weight it replaces. */
.result-card__total--quiet { color: var(--ink-dim); font-weight: 400; }
/* Product page facts: names, providers and licence terms keep the capitalisation they had inline. */
.pp-spec__v--cap { text-transform: capitalize; }
/* Natural-language search notes, and the unread count badge. */
.nl-note { margin-top: 0.5rem; }
.notification-badge { background: var(--color-primary); color: var(--color-primary-content); font-size: 0.625rem; padding: 0 0.25rem; border-radius: 999px; min-width: 1rem; text-align: center; }
/* Help guide: the journey links, with the current step in the signal colour. */
.help-journey__link { border-left: 2px solid var(--grid); color: var(--ink-dim); }
.help-journey__link--active { border-left: 2px solid var(--signal); color: var(--signal); }

/* Staff console (#1403): the dashboard shell under the console's own navigation bar and banner (see the console frame at the foot of this file), so the rail and content fill what is left of the viewport. */
.dash-shell--console { min-height: calc(100vh - var(--console-chrome-h, 0px)); }
.dash-shell--console .dash-rail { top: var(--console-chrome-h, 0px); height: calc(100vh - var(--console-chrome-h, 0px)); height: calc(100dvh - var(--console-chrome-h, 0px)); }
.dash-shell--console .dash-main { min-height: calc(100vh - var(--console-chrome-h, 0px)); }

/* Tasking (#1444). The tasking page reuses the search page's shell, panel and map unchanged; these rules
   are only what that page adds: the commercial notice over a blocked page, the form's error region, the
   estimates that replace the form in the panel, and the estimate cards, which had no styles of their own
   on the results page either. */
.search-body:has(> .tk-gate) { position: relative; }
/* The notice covers the page but takes no clicks itself, so the panel's collapse toggle under it still
   works; the form, its button and the map are inert in the markup, which is what actually blocks them. */
.tk-gate {
    position: absolute; inset: 0; z-index: 6000; pointer-events: none;
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    background: color-mix(in srgb, var(--base) 55%, transparent);
}
.tk-gate__card {
    pointer-events: auto; max-width: 30rem; padding: 1.5rem 1.6rem;
    background: var(--surface); border: 1px solid var(--grid); border-top: 2px solid var(--signal);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.tk-gate__eyebrow { color: var(--signal); margin: 0 0 0.4rem; }
.tk-gate__title { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 1.45rem; font-weight: 500; color: var(--ink); margin: 0 0 0.75rem; }
.tk-gate__title:focus { outline: none; }
.tk-gate__body { color: var(--ink-dim); font-size: 0.9rem; line-height: 1.55; margin: 0 0 1.2rem; }
.tk-gate__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.search-body:has(> .tk-gate) .search-panel__body,
.search-body:has(> .tk-gate) .search-panel__foot { opacity: 0.45; }
/* Narrow screens stack the panel over the map, so a notice centred on the whole shell sat half-way down a
   long page, mostly below the fold and under the cookie banner. Here it is pinned to the viewport between
   the navigation bar and the banner (the page script measures both), centred, and scrolls inside itself
   when it does not fit. The navigation bar is outside it and stays usable. */
@media (max-width: 900px) {
    .tk-gate {
        position: fixed; left: 0; right: 0;
        top: var(--tk-gate-top, 4rem); bottom: var(--tk-gate-bottom, 0);
        padding: 0.75rem;
    }
    .tk-gate__card { max-height: 100%; overflow-y: auto; padding: 1.1rem 1.2rem; }
    .tk-gate__title { font-size: 1.25rem; }
}

.tk-form-errors[hidden] { display: none; }
.tk-form-errors { margin: 0.9rem 0 0.2rem; padding: 0.6rem 0.75rem; border-left: 2px solid var(--error); background: var(--surface); }
.tk-form-errors__title { color: var(--error); margin: 0 0 0.3rem; }
.tk-form-errors__list { margin: 0; padding-left: 1rem; font-size: 0.8rem; color: var(--ink); }

.tk-panel-results { display: flex; flex-direction: column; gap: 0.9rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.tk-panel-results__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.tk-panel-results__head h2 { margin: 0; color: var(--ink); }
.tk-panel-results .progress-modal__list { margin: 0; padding: 0.6rem 0.75rem; border: 1px solid var(--grid); background: var(--surface); }
.tk-panel-results__foot { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tk-panel-results__foot .btn-ghost-line { flex: 1 1 auto; text-align: center; }

.rs-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.rs-card { padding: 0.85rem 1rem; border: 1px solid var(--grid); background: var(--surface); }
.rs-card--empty { color: var(--ink-dim); border-style: dashed; }
.rs-card__body > .readout { color: var(--ink); margin: 0 0 0.55rem; }
.rs-card__specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.45rem 0.9rem; margin: 0 0 0.75rem; }
.rs-card__specs dt { margin: 0; }
.rs-card__specs dd { margin: 0.1rem 0 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8rem; color: var(--ink); }
.rs-card__action { border-top: 1px solid var(--grid); padding-top: 0.7rem; }

/* ---- Search page (#1459): providers with their satellites, and the map's info button ---- */
/* One filter: a provider's own checkbox, then its satellites indented beneath it. A satellite list of a provider that is not ticked is `hidden`, which the grid below would otherwise override. */
.ds-provider-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ds-provider-group__head,
.ds-provider-group__platforms label {
    display: flex; align-items: center; gap: 0.45rem; cursor: pointer;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink); text-transform: none;
}
.ds-provider-group__head { font-weight: 700; }
.ds-provider-group__head input[type="checkbox"],
.ds-provider-group__platforms input[type="checkbox"] { width: 0.95rem; height: 0.95rem; accent-color: var(--signal); cursor: pointer; }
.ds-provider-group__platforms {
    list-style: none; margin: 0.4rem 0 0 0.45rem; padding: 0 0 0 0.9rem; border-left: 1px solid var(--grid);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.35rem 0.75rem;
}
.ds-provider-group__platforms[hidden] { display: none; }
.ds-provider-group__platforms li { margin: 0; }

/* The attribution toggle (the "i", lower left) and the Dark, Light and Street buttons (lower right) share one height. ol.css sizes its buttons in em and doubles the font on a touch device, which made the toggle half as tall again as the style buttons on a phone. The selectors carry two classes to win over the earlier !important rules for the style buttons, and over ol.css's touch rule. */
.ol-control.ds-style-switcher button,
.ol-control.ol-attribution button {
    --ds-map-btn-h: 1.375rem;
    box-sizing: border-box; height: var(--ds-map-btn-h) !important; margin: 0;
    display: flex; align-items: center; justify-content: center; line-height: 1 !important;
}
.ol-control.ol-attribution button { width: var(--ds-map-btn-h) !important; padding: 0 !important; font-size: 0.8rem !important; }

/* Providers (#1458): imagery held of a provider, on its card and at the foot of its page. */
.supplier-card__scene--locked { background: repeating-linear-gradient(135deg, rgba(243,146,0,0.12) 0 8px, rgba(243,146,0,0.04) 8px 16px), var(--surface-2); }
.supplier-card__lock { position: absolute; inset: 1.75rem 0 5.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; }
.provider-captures { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .provider-captures { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.provider-capture { margin: 0; border: 1px solid var(--grid); background: var(--surface-2); }
.provider-capture__tile { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.provider-capture__caption { margin: 0; padding: 0.5rem 0.65rem; border-top: 1px solid var(--grid); overflow-wrap: anywhere; }

/* Become a provider (#1458): the invitation, and the application form. */
.provider-apply-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding: 1.5rem 1.75rem; border: 1px solid var(--grid); background: color-mix(in oklch, var(--surface) 92%, transparent); }
.provider-apply-cta__title { margin: 0 0 0.25rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 1.5rem; line-height: 1.2; color: var(--ink); }
.provider-apply-cta__text { margin: 0; max-width: 46ch; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-dim); }
.provider-apply-cta__link { display: inline-block; text-decoration: none; }
.provider-apply { max-width: 40rem; margin: 0 auto; }
.provider-apply__head { margin-bottom: 0; }
.provider-apply__form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.provider-apply__label { display: block; margin-bottom: 0.35rem; font-size: 0.8125rem; color: var(--ink); }
.provider-apply__optional { color: var(--ink-dim); font-size: 0.75rem; }
.provider-apply__input { display: block; width: 100%; padding: 0.6rem 0.75rem; font: inherit; font-size: 0.9375rem; color: var(--ink); background: var(--surface); border: 1px solid var(--grid); border-radius: 0; }
.provider-apply__input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.provider-apply__kinds { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.provider-apply__kind { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; font-size: 0.9375rem; color: var(--ink); }
.provider-apply__kind input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--signal); cursor: pointer; }
.provider-apply__error { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--error); }
.provider-apply__errors { padding: 0.75rem 1rem; border: 1px solid var(--error); font-size: 0.875rem; color: var(--ink); }
.provider-apply__errors p { margin: 0; }
.provider-apply__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Staff console frame (#1470): the navigation bar and the room it takes above the dashboard shell.
   Every colour is the theme's own, so the console follows light and dark with the rest of the site;
   the console has no accent of its own. The console's pages carry one slim top bar (.console-bar:
   mark, environment badge, search slot, account menu) in place of the plain bar the sign-in page uses. */
.console-frame { --console-nav-h: 48px; --console-chrome-h: var(--console-nav-h); }
.console-nav, .console-bar { display: flex; align-items: center; gap: 1rem; min-height: var(--console-nav-h); padding: 0 1rem; background: var(--surface); border-bottom: 1px solid var(--grid); }
.console-bar { position: sticky; top: 0; z-index: 30; }
.console-nav__brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.console-nav__mark { width: 1.5rem; height: auto; }
.console-nav__name { font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }
.console-env { padding: 0.125rem 0.5rem; border: 1px solid var(--signal); color: var(--signal); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; }
.console-env[data-env="production"] { border-color: var(--error); color: var(--error); }
.console-bar__search { flex: 1 1 auto; min-width: 0; }
.dash-search { max-width: 28rem; }
.dash-search .dash-input { width: 100%; padding: 0.35rem 0.6rem; font-size: 0.875rem; }
.console-account { position: relative; margin-inline-start: auto; }
.console-account summary { display: flex; align-items: center; gap: 0.5rem; list-style: none; cursor: pointer; padding: 0.25rem; }
.console-account summary::-webkit-details-marker { display: none; }
.console-account summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.console-account__avatar { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: var(--surface-2); color: var(--signal); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; font-weight: 700; }
.console-account__who { display: none; font-size: 0.8125rem; color: var(--ink-dim); }
@media (min-width: 900px) { .console-account__who { display: inline; } }
.console-account__panel { position: absolute; inset-inline-end: 0; top: 100%; z-index: 40; min-width: 15rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--grid); }
.console-account__panel p { margin: 0; overflow-wrap: anywhere; }
.console-account__email { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.75rem; color: var(--ink); }
.console-account__role { margin-bottom: 0.75rem !important; font-size: 0.8125rem; color: var(--signal); }
.console-account__signout { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--grid); background: transparent; color: var(--ink); font: inherit; font-size: 0.875rem; text-align: start; cursor: pointer; }
.console-account__signout:hover, .console-account__signout:focus-visible { border-color: var(--signal); color: var(--signal); }
.console-main { min-height: calc(100vh - var(--console-chrome-h)); }
.console-main .min-h-screen { min-height: calc(100vh - var(--console-chrome-h)); }
/* Breadcrumbs on detail and form pages. */
.console-crumbs { padding: 0.75rem 2rem 0; font-size: 0.8125rem; color: var(--ink-dim); }
.console-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.console-crumbs li + li::before { content: "/"; margin-inline-end: 0.25rem; color: var(--grid); }
.console-crumbs a { color: var(--ink-dim); text-decoration: none; }
.console-crumbs a:hover, .console-crumbs a:focus-visible { color: var(--signal); text-decoration: underline; }
.console-crumbs [aria-current] { color: var(--ink); }
/* The rail's sections fold: the heading is a button, and the links under it hide when it is closed. */
.dash-rail__heading--toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; background: transparent; border: 0; cursor: pointer; text-align: start; }
.dash-rail__heading--toggle:hover, .dash-rail__heading--toggle:focus-visible { color: var(--signal); }
.dash-rail__caret { width: 0.4rem; height: 0.4rem; border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 150ms ease; }
.dash-rail__heading--toggle[aria-expanded="false"] .dash-rail__caret { transform: rotate(-45deg); }
.dash-rail__links[hidden] { display: none; }
/* The console's rail is dense: every section heading fits a 900px window with all but the current section folded.
   It fills the height under the top bar, scrolls within itself with a scrollbar that shows, and keeps Collapse in reach. */
.dash-shell--console .dash-rail__inner { padding: 0.5rem 0.5rem; scrollbar-width: thin; scrollbar-color: var(--ink-dim) transparent; overscroll-behavior: contain; }
.dash-shell--console .dash-rail__inner::-webkit-scrollbar { width: 8px; }
.dash-shell--console .dash-rail__inner::-webkit-scrollbar-thumb { background: var(--ink-dim); border-radius: 4px; }
.dash-shell--console .dash-rail__group { margin-bottom: 0.25rem; }
.dash-shell--console .dash-rail__heading { padding: 0.4rem 0.75rem; font-weight: 600; color: var(--ink); }
.dash-shell--console .dash-rail__item { padding: 0.3rem 0.75rem; }
.dash-shell--console .dash-rail__toggle { flex: 0 0 auto; }
/* Search results: the list link sits in each group's heading line. */
.console-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.console-group-head__link { font-size: 0.8125rem; color: var(--signal); }
/* Staff list: one Actions menu per row in place of a row of buttons. */
/* An actions cell in a table stays a cell; the flex row is for actions outside tables. */
.internal-shell .dash-table td.dash-actions-cell { display: table-cell; width: 1%; white-space: nowrap; text-align: end; }
/* A row action is a compact control: at the full button height every row of a
   console table grew to the button, not to its text. */
.internal-shell .dash-table td .btn-ghost-line { padding-block: 0.25rem; }
/* The last column hugs the card edge; the policy column wraps its long red message so the table fits the card. */
.dash-table td.staff-policy { white-space: normal; min-width: 12rem; }
.staff-policy .dash-chip { white-space: normal; max-width: 100%; }
.staff-actions { position: relative; display: inline-block; text-align: start; }
.staff-actions > summary { list-style: none; cursor: pointer; }
.staff-actions > summary::-webkit-details-marker { display: none; }
.staff-actions > summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.staff-actions__menu { position: absolute; inset-inline-end: 0; top: 100%; z-index: 20; min-width: 12rem; margin: 0.25rem 0 0; padding: 0.25rem; list-style: none; background: var(--surface); border: 1px solid var(--grid); }
.staff-actions__menu a { display: block; padding: 0.4rem 0.6rem; font-size: 0.8125rem; color: var(--ink); text-decoration: none; }
.staff-actions__menu a:hover, .staff-actions__menu a:focus-visible { background: var(--surface-2); color: var(--signal); }
.staff-actions__primary { font-weight: 600; }
/* The marketplace's rail gives way to its header drawer below the tablet width. The console has
   no drawer, so its rail stays, above the page and scrolling within itself. */
@media (max-width: 768px) {
    .console-frame .dash-rail { display: flex; position: static; height: auto; max-height: 40vh; border-inline-end: 0; border-bottom: 1px solid var(--grid); }
    .console-frame .dash-rail__toggle { display: none; }
    .console-frame .dash-page { padding: 1.5rem 1rem; }
    .console-frame .stat-grid { grid-template-columns: 1fr; }
}
/* Checkboxes and radio buttons take the site's accent, not the browser's blue. */
.internal-shell input[type="checkbox"], .internal-shell input[type="radio"] { accent-color: var(--signal); }

/* ==========================================================================
   Home page and header logo (#1457)
   ========================================================================== */

/* The header's logo. On a phone it is the symbol alone, kept to its own width and
   tucked against the control beside it, so the signed-in row (profile, basket,
   orders, menu) still fits 320px. From 768px the wordmark shows beside it. */
.navbar-logo { flex-shrink: 0; margin-right: -0.25rem; }
@media (min-width: 768px) {
    .navbar-logo { margin-right: 0; padding-right: 0.5rem; }
}

/* ---- Search page (#1479): a sensor type no ticked satellite offers ---- */
/* Unticked by static/js/search_form.js but left in the list, so ticking it again ticks its satellites back. */
.ds-sensor-type--dimmed { opacity: 0.45; }

/* ==========================================================================
   Page composition (#1048)
   Each page below is laid out for what it is for, so no two open the same
   way. The type scale, colours and spacing are the ones above; what varies is
   where things sit, how large the heading is and whether a page has a lede.
   ========================================================================== */

/* Home. One statement over the picture and the way in, then the figures with
   what they are of beside them at reading size, then how a search goes. */
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.home-lead { display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 4rem; }
@media (min-width: 1024px) {
    .home-lead { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 5rem; align-items: end; }
}
.home-lead__figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin: 0; }
@media (min-width: 640px) {
    .home-lead__figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.home-lead__text { margin: 0; max-width: 44ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }

.home-steps { display: grid; gap: 2.5rem; padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 1024px) {
    .home-steps { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; align-items: center; }
}
.home-steps__title { margin: 0 0 2rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.home-steps__figure { margin: 0; }
.home-steps__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.home-steps__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-steps__aoi { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-steps__area { fill: color-mix(in oklab, var(--color-primary) 16%, transparent); stroke: var(--signal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.home-steps__caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 0.625rem; font-size: 0.8125rem; color: var(--ink-dim); }

/* Providers. A compact title with the count on one rule, then the cards, which
   carry the page; the key to a card sits under the grid. */
.providers-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grid); }
.providers-bar__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.providers-bar__count { margin: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.875rem; color: var(--ink-dim); }

/* The written pages (info_page.html). A document: a modest title, the text at
   reading size in full ink, no lede. The variants are by URL name. */
.doc { max-width: 46rem; margin: 0 auto; padding-top: 3.5rem; padding-bottom: 6rem; }
.doc__title { margin: 0 0 2rem; text-wrap: balance; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
.doc__body { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.doc__body h2 { margin-top: 2.5em; margin-bottom: 0.6em; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 500; font-size: 1.375rem; line-height: 1.3; color: var(--ink); }
.doc__body a { color: var(--signal); }
/* A dated page opens with its date of issue, which is a fact about the page, not its first line. */
.doc--dated .doc__body > p:first-child { margin: -1.25rem 0 2.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grid); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink-dim); }
.doc--dated .doc__body > p:first-child strong { font-weight: 400; color: inherit; }

/* Licensing is consulted more than read: from a desktop width its headings hang in
   a margin of their own, so the sections can be found by eye down the left. */
@media (min-width: 1024px) {
    .doc--licensing { max-width: 64rem; }
    .doc--licensing .doc__body { padding-left: 16rem; }
    .doc--licensing .doc__body > p:first-child { margin-left: -16rem; }
    .doc--licensing .doc__body > h2 { float: left; clear: left; width: 13rem; margin: 2.5rem 0 0 -16rem; font-size: 1.125rem; line-height: 1.6; }
    .doc--licensing .doc__body > h2 + * { margin-top: 2.5rem; }
    .doc--licensing .doc__body > :has(+ h2),
    .doc--licensing .doc__body > :has(+ h2) > li:last-child { margin-bottom: 0; }
}

/* Feed. The map and the captures side by side: on a desktop the map's column,
   headed by the title and the counts, stays in view while the cards scroll. */
.feed-split { display: grid; gap: 2rem; }
.feed-split__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; margin-bottom: 1rem; }
.feed-split__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.feed-split__count { margin: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink-dim); }
#map.feed-split__map { height: 340px; }
.feed-split__map .ol-viewport { height: 100%; border: 0; }
.feed-split__note { margin: 0.75rem 0 0; max-width: 60ch; font-size: 0.8125rem; line-height: 1.6; color: var(--ink-dim); }
.feed-split__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 1024px) {
    .feed-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
    .feed-split__side { position: sticky; top: 5.5rem; }
    #map.feed-split__map { height: calc(100vh - 16rem); min-height: 360px; }
}
@media (min-width: 1280px) {
    .feed-split__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Collections. The coverage map opens the page at full width; the title, what
   the list holds and the counts are a legend on its corner from a desktop width,
   and above it on a phone. */
.coll-atlas { position: relative; }
.coll-atlas__legend { padding: 2rem 1.5rem 1.5rem; }
.coll-atlas__title { margin: 0 0 0.75rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.coll-atlas__text { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.coll-atlas__counts { display: flex; gap: 2rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--grid); }
.coll-atlas__counts dt { font-size: 0.8125rem; color: var(--ink-dim); }
.coll-atlas__counts dd { margin: 0.25rem 0 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--ink); }
@media (min-width: 640px) {
    .coll-atlas__legend { padding-left: 3rem; padding-right: 3rem; }
}
@media (min-width: 1024px) {
    .coll-atlas__legend { position: absolute; z-index: 2; top: 2rem; left: 5rem; width: 24rem; padding: 1.5rem 1.75rem; background: var(--base); border: 1px solid var(--grid); box-shadow: 0 10px 30px -18px rgba(10, 11, 13, 0.45); }
}

/* Documentation. A manual: the contents rail from the top of the page, and the
   title and preface opening the text column at reading size. */
.docs-shell { padding-top: 2.5rem; }
.docs-preface { padding-bottom: 2rem; border-bottom: 1px solid var(--grid); }
.docs-preface__title { margin: 0 0 1rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.docs-preface__text { margin: 0; max-width: 62ch; font-size: 1rem; line-height: 1.7; color: var(--ink); }
@media (max-width: 1024px) {
    .docs-text { display: contents; }
    .docs-preface { order: -1; }
}

/* API. A compact title and the version, the base URL large on a dark band with
   its copy button, then what the API is and where its reference lives. */
.api-head { max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem 0; }
.api-head__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 1.25rem; }
.api-head__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.api-head__version { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink-dim); }
.api-head__base { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding: 1.5rem 1.75rem; background: var(--surface); border: 1px solid var(--grid); color: var(--ink); }
.api-head__label { font-size: 0.8125rem; color: var(--ink-dim); }
.api-head__url { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: clamp(0.875rem, 2.4vw, 1.5rem); color: var(--signal); }
.api-head__notes { display: grid; gap: 1rem 3rem; margin-top: 1.75rem; font-size: 1rem; line-height: 1.7; color: var(--ink); }
.api-head__notes p { margin: 0; max-width: 60ch; }
@media (min-width: 1024px) {
    .api-head__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Contact. What the form is for beside the form, so the form is in view at once. */
.contact-page { display: grid; gap: 2rem; max-width: 72rem; margin: 0 auto; padding-top: 3.5rem; padding-bottom: 6rem; }
@media (min-width: 1024px) {
    .contact-page { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 5rem; align-items: start; }
}
.contact-page__title { margin: 0 0 1.25rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
.contact-page__text { margin: 0; max-width: 40ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.contact-page__form { padding-top: 0.25rem; }
.contact-page__error { color: var(--error); }
.contact-page__sent { padding: 2rem 0; color: var(--ink); }

/* Data subject request. A statutory form in one column: the title on one line,
   the rights and the deadline in full ink, then the form. */
.dsr-page { padding-top: 3.5rem; padding-bottom: 6rem; }
.dsr-page__inner { max-width: 40rem; margin: 0 auto; }
.dsr-page__title { margin: 0 0 1.5rem; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
.dsr-page__text { margin: 0 0 1rem; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.dsr-page__note { margin: 0 0 2.5rem; padding-left: 1rem; border-left: 2px solid var(--grid); font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }

/* Registry. A directory: the title, the count and what the register holds in a
   column beside the entries, which start at the top of the page. */
.registry-page { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 5rem; }
@media (min-width: 1024px) {
    .registry-page { grid-template-columns: 17rem minmax(0, 1fr); gap: 4rem; align-items: start; }
    .registry-page__side { position: sticky; top: 6rem; }
}
.registry-page__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
.registry-page__count { margin: 0.5rem 0 1.25rem; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.8125rem; color: var(--ink-dim); }
.registry-page__text { margin: 0; padding-top: 1rem; border-top: 1px solid var(--grid); font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }

/* A collection's page. A record: the way back, a modest title, what the
   collection is in full ink and its facts as a short list beside it. */
.record-head { padding-top: 2.5rem; }
.record-head__crumb { margin-bottom: 1.25rem; }
.record-head__grid { display: grid; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--grid); }
@media (min-width: 1024px) {
    .record-head__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
}
.record-head__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.record-head__by { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--ink-dim); }
.record-head__text { margin: 1.25rem 0 0; max-width: 62ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.record-head__facts { margin: 0; border-top: 1px solid var(--grid); }
.record-head__facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--grid); }
.record-head__facts dt { font-size: 0.875rem; color: var(--ink-dim); }
.record-head__facts dd { margin: 0; text-align: right; font-size: 0.9375rem; color: var(--ink); }
.record-head__facts .record-head__figure { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.25rem; font-weight: 700; }

/* ==========================================================================
   Signed-in page head (#1048)
   The dashboard, account, organisation and staff pages are one application, so
   they keep one head: the title, an optional line under it and the actions.
   The title is set at the size of a page in an application rather than of a
   landing page, and the line under it, where a page keeps one, says something
   the title does not, so it is read in full ink. A title modifier that sets its
   own size (.toolchains-title) keeps it.
   ========================================================================== */
.dash-page__title:not(.toolchains-title) { font-weight: 400; font-size: 1.75rem; line-height: 1.2; }
.dash-page__sub { font-size: 0.9375rem; line-height: 1.55; color: var(--ink); max-width: 44rem; }
/* The folded "How this page works" panel under a page summary (templates/internal/_howto.html). */
.howto { margin-top: 0.5rem; max-width: 44rem; }
.howto__toggle { cursor: pointer; font-size: 0.8125rem; color: var(--ink-dim); width: fit-content; }
.howto__toggle:hover, .howto[open] > .howto__toggle { color: var(--ink); }
.howto__body { margin-top: 0.5rem; padding-left: 0.75rem; border-left: 1px solid var(--grid); font-size: 0.875rem; line-height: 1.55; color: var(--ink-dim); }

/* ==========================================================================
   Data library rename in place (#1487)
   Each product row names itself and offers Edit, which swaps a text input
   into .lib-name__slot. While the slot holds the form, the name and Edit
   step aside.
   ========================================================================== */
.lib-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.lib-name__edit { background: transparent; border: 0; padding: 0; cursor: pointer; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem; color: var(--ink-dim); text-decoration: underline; }
.lib-name__edit:hover, .lib-name__edit:focus-visible { color: var(--signal); }
.lib-name__slot { display: contents; }
.lib-name__form { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.lib-name__input { background: transparent; border: 1px solid var(--grid); padding: 0.25rem 0.5rem; font-size: 0.8125rem; color: var(--ink); width: 18rem; max-width: 100%; }
.lib-name__input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.lib-name__btn { padding: 0.25rem 0.75rem; }
.lib-name:has(> .lib-name__slot > .lib-name__form) > :is(a, .lib-name__text, .lib-name__edit) { display: none; }
@media (max-width: 640px) {
    .lib-name, .lib-name__form { width: 100%; flex-wrap: wrap; }
    .lib-name__input { width: auto; flex: 1 1 100%; }
}

/* ==========================================================================
   Results bar (#1496)
   Sort by is a labelled, bordered field like the search page's, and the Filters
   button that opens the panel below sits beside it, on the bar's right. The
   select is 2rem tall, as the search form's compact fields are, so the button
   (btn-sm, 2rem) lines up with it.
   ========================================================================== */
.rs-bar__controls { margin-left: auto; display: flex; align-items: flex-end; gap: 0.6rem; }
.rs-sort { display: flex; flex-direction: column; gap: 0.25rem; }
.rs-sort__select { width: auto; min-width: 11rem; height: 2rem; min-height: 2rem; }
.rs-filters-toggle { gap: 0.4rem; font-weight: 400; background: transparent; color: var(--ink); border: 1px solid var(--grid); }
.rs-filters-toggle:hover,
.rs-filters-toggle[aria-expanded="true"] { color: var(--signal); border-color: var(--signal); background: transparent; }

/* ============================================================
   Dataset page grid, selection and downloads (#1484, #1497)
   pages/result_dataset_page.html, partials/dataset_selection.html,
   partials/product_download_panel.html. The first block is the one
   place a rule above is not just added to: ``.pp-grid--dataset``
   re-places what ``.pp-grid`` lays out, and wins only by coming later.
   ============================================================ */

/* The picture and its controls, with the order beside them; then the map, with the dataset's
   metadata beside it, in the row the map is in. ``.pp-visual`` is not a box: the map partial's
   own elements are the grid's items, placed by area, so a view with the picture hidden ("On
   map") closes its row and the rest stays where it was. One column below the breakpoint, in the
   order the page reads. */
.pp-grid--dataset {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "view" "figure" "open" "map" "side" "meta";
    column-gap: 1.5rem;
    row-gap: 0;
    align-items: start;
}
.pp-grid--dataset .pp-visual { display: contents; }
.pp-grid--dataset .pp-view-slot { grid-area: view; justify-self: start; }
.pp-grid--dataset .pp-figure { grid-area: figure; }
.pp-grid--dataset .pp-preview-open { grid-area: open; }
.pp-grid--dataset .pp-map { grid-area: map; }
.pp-side { grid-area: side; margin-top: 1.5rem; }
.pp-meta { grid-area: meta; margin-top: 1.5rem; }
/* With the picture on the map the map is the large view, so the order and the metadata are one
   column beside it, and the rows close up whatever the column's height. Where :has is not
   supported the layout above stays, with a gap where the picture was. */
.pp-aside { display: contents; }
.pp-grid--dataset:has(.pp-map--lead) { grid-template-areas: "view" "open" "map" "aside"; }
.pp-grid--dataset:has(.pp-map--lead) .pp-aside { display: flex; flex-direction: column; gap: 1.25rem; grid-area: aside; margin-top: 1.5rem; }
.pp-grid--dataset:has(.pp-map--lead) .pp-side,
.pp-grid--dataset:has(.pp-map--lead) .pp-meta { margin-top: 0; }
@media (min-width: 900px) {
    .pp-grid--dataset {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        grid-template-areas:
            "view side"
            "figure side"
            "open side"
            "map meta";
    }
    .pp-side { margin-top: 0; }
    .pp-meta { margin-top: 1rem; }
    .pp-grid--dataset:has(.pp-map--lead) {
        grid-template-areas:
            "view aside"
            "open aside"
            "map aside";
    }
    .pp-grid--dataset:has(.pp-map--lead) .pp-aside { margin-top: 0; }
}

/* The chosen item's record and downloads, and the whole dataset's downloads, under the list. */
.pp-selection { min-width: 0; }
.pp-spaced { margin-top: 1.5rem; }
.pp-item-card.htmx-request { opacity: 0.6; }
.pp-downloads__list { max-height: 18rem; overflow-y: auto; }
.pp-downloads__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 1rem; border-top: 1px solid var(--grid); }
.pp-downloads__row:first-child { border-top: 0; }
.pp-downloads__name { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; font-size: 0.85rem; color: var(--ink); }
.pp-downloads__meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--ink-dim); white-space: nowrap; }
.pp-downloads__actions { flex: 0 0 auto; }
.pp-downloads__empty { margin: 0; padding: 0.7rem 1rem; font-size: 0.8rem; color: var(--ink-dim); }
.pp-downloads__off { font-size: 0.65rem; }

/* The control above the picture is swapped, with the picture, when another item is chosen: it sits
   in a slot that stays. Empty, the slot takes no room. */
.pp-view-slot:empty { display: none; }

/* A long scene id wraps and never widens the page (390px). The dataset page is one grid of items
   that must be able to shrink, and every place an id is printed breaks anywhere. */
.pp-grid--dataset > *, .pp-selection, .pp-selection .pp-grid > * { min-width: 0; }
.pp-stac-for, .pp-spec__k, .pp-spec__v, .pp-downloads__name, .pp-api__row code { overflow-wrap: anywhere; }

/* The API addresses of the chosen item's assets. */
.pp-api__row { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.75rem; }
.pp-api__row code { display: block; }
.pp-api__ref { display: inline-block; padding: 0 1rem 1rem; color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }

/* Order names (#1511): the name on an order row, the id beneath it smaller and grey; and the basket's name field. */
.order-name { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.order-ref .order-name { color: var(--signal); }
.order-id { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.6875rem; color: var(--ink-dim); overflow-wrap: anywhere; }
.basket-input { display: block; width: 100%; box-sizing: border-box; padding: 0.4rem 0.5rem; background: var(--base-200); color: var(--ink); border: 1px solid var(--base-content); }
.basket-name__reset { display: block; margin-top: 0.35rem; padding: 0; background: none; border: 0; color: var(--signal); font-size: 0.75rem; text-decoration: underline; cursor: pointer; }
.basket-name__reset:hover, .basket-name__reset:focus, .basket-name__reset:active { background: none; color: var(--ink); }
.basket-name__reset:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
/* Dashboard Recent orders: the name stays on one line, ellipsised past the column (the full name is in the link's title). */
.orders-table .order-ref { display: block; max-width: 100%; }
.orders-table .order-name { display: block; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orders-table th:nth-child(1) { width: 34%; }
.orders-table th:nth-child(2) { width: 22%; }
.orders-table th:nth-child(3) { width: 30%; }

/* A generated default name is about 40 characters (#1512); on a phone the input already takes the full row. */
@media (min-width: 641px) {
    .lib-name__input { width: 48ch; max-width: 100%; flex: 0 0 auto; }
}

/* ---- Tasking panel follows the search panel (#1066) ---- */
/* Single-choice sensor type: radios sized as the search panel's tick-boxes. */
.ds-choice-grid input[type="radio"] { width: 0.95rem; height: 0.95rem; accent-color: var(--signal); cursor: pointer; }
/* Providers that can be tasked are listed, not chosen: an estimate is asked of all of them. */
.ds-provider-group--listed .ds-provider-group__head { cursor: default; }
.ds-provider-group__count { font-weight: 400; color: var(--ink-dim); }
/* `.dash-card input` stretches every input to the card's width; a consent tick inside a card stays a tick. */
.dash-card input[type="checkbox"], .dash-card input[type="radio"] { width: 1rem; height: 1rem; padding: 0; flex: none; background: revert; border: revert; }

/* ---- Results filters: tick lists, Select all / Clear, and scroll boxes that keep the wheel (#1066) ---- */
.rs-field__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.rs-field__tools, .ds-choice-tools { display: inline-flex; gap: 0.75rem; }
.ds-choice-tools { margin-bottom: 0.5rem; }
.rs-link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.7rem; color: var(--signal); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rs-link-btn:hover { color: var(--ink); }
/* Django renders each choice as <div><label><input>text</label></div>. The list scrolls inside its own box, and the page only once the box is at its end. */
.rs-checks { max-height: 9rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rs-checks > div { display: flex; flex-direction: column; gap: 0.3rem; }
.rs-checks label { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem; color: var(--ink); }
.rs-field .rs-checks input[type="checkbox"] { width: 0.95rem; height: 0.95rem; padding: 0; flex: none; accent-color: var(--signal); cursor: pointer; }
.rs-field select[multiple], .search-panel__body, .ds-provider-groups, .ds-choice-grid { overscroll-behavior: contain; }
/* The Filters button reads as a button: signal-coloured, heavier, and filled while the panel is open. */
.rs-link-btn { white-space: nowrap; }
.rs-filters-toggle { padding-inline: 0.9rem; font-weight: 600; color: var(--signal); border-color: var(--signal); }
.rs-filters-toggle:hover,
.rs-filters-toggle[aria-expanded="true"] { background: var(--signal); color: var(--base); border-color: var(--signal); }
.rs-filters-toggle[aria-expanded="true"] .rs-filters__badge { background: var(--base); color: var(--signal); }

/* Photo and logo cropper (static/js/photo_cropper.js). */
.photo-crop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / 0.7); }
.photo-crop[hidden] { display: none; }
.photo-crop__panel { display: grid; grid-template-columns: auto 96px; gap: 1rem; align-items: start; max-width: calc(100vw - 2rem); padding: 1rem; background: var(--surface); border: 1px solid var(--grid); }
.photo-crop__stage { width: 320px; max-width: calc(100vw - 8rem); aspect-ratio: 1; cursor: grab; touch-action: none; background: var(--surface-2); outline-offset: 2px; }
.photo-crop__stage:active { cursor: grabbing; }
.photo-crop__preview, .photo-field__chosen { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--grid); background: var(--surface-2); }
.photo-field__chosen { display: block; margin-top: 0.5rem; }
.photo-field__chosen[hidden] { display: none; }
.photo-crop__zoom { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem; }
.photo-crop__zoom input { flex: 1; }
.photo-crop__actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: flex-end; }
.photo-field__remove { margin-top: 0.5rem; }

/* Platform notices: the banner at the top of every page (templates/partials/notice_banner.html). */
.site-notices { display: flex; flex-direction: column; gap: 1px; }
.site-notice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 1.25rem; border-left: 3px solid var(--signal); background: var(--surface-2); color: var(--ink); font-size: 0.9rem; }
.site-notice--maintenance { border-left-color: var(--pulse); }
.site-notice--incident { border-left-color: var(--error); }
.site-notice__body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; min-width: 0; overflow-wrap: anywhere; }
.site-notice__kind, .site-notice__until { color: var(--ink-dim); }
.site-notice__dismiss { margin: 0; flex: 0 0 auto; }
@media (max-width: 640px) { .site-notice { flex-direction: column; align-items: flex-start; } }
/* `.dash-card .dash-role-checkbox input` keeps width: auto so labels stay beside it, not pushed to the edge. */
.dash-card .dash-role-checkbox input { width: auto; flex: none; }

/* ============================================================
   MOTION AND DETAIL
   Five refinements, each showing something the platform does. The rules
   below the structural ones only ever animate towards the state the page
   already renders: the markup is the finished state, the scripts under
   static/js arm an element (an .is-armed class) just before playing it,
   once, when it enters view, and do nothing at all when the visitor asks
   for reduced motion. Nothing here changes size as it animates, so no
   effect shifts the layout around it.
   ============================================================ */

/* 1. Home, "Start from a place": the readout a search keeps, rules between
   rows, the area traced over the picture and the scenes inside it. */
.home-steps__lede { margin: 0 0 2rem; max-width: 46ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.place-readout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem; margin: 0 0 2.5rem; border-bottom: 1px solid var(--grid); }
.place-readout__row { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; min-height: 3.25rem; padding: 0.875rem 0; border-top: 1px solid var(--grid); }
.place-readout__row dt { font-size: 0.875rem; color: var(--ink-dim); }
.place-readout__row dd { margin: 0; white-space: nowrap; font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.place-readout__row--half { grid-column: auto; flex-direction: column; justify-content: flex-start; gap: 0.25rem; min-height: 4.5rem; }
.place-readout__row--found { align-items: center; }
.place-readout__count { display: inline-block; min-width: 2ch; text-align: right; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 300; font-size: 2.75rem; line-height: 1; color: var(--signal); }
.home-steps__scene { fill: color-mix(in oklab, var(--color-base-content) 6%, transparent); stroke: var(--base); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

[data-place-search].is-armed .home-steps__area { stroke-dasharray: var(--trace, 0) 100000; stroke-dashoffset: var(--trace, 0); fill-opacity: 0; }
[data-place-search].is-armed .home-steps__scene { opacity: 0; transform: translateY(-1px); }
[data-place-search].is-playing .home-steps__area { transition: stroke-dashoffset 900ms cubic-bezier(0.45, 0, 0.2, 1), fill-opacity 400ms ease 850ms; stroke-dashoffset: 0; fill-opacity: 1; }
[data-place-search].is-armed .home-steps__scene.is-found { opacity: 1; transform: none; transition: opacity 260ms ease, transform 260ms ease; }
[data-place-search] [data-readout].is-set { animation: place-readout-set 500ms ease; }
.place-readout__count.is-ticking { animation: place-readout-tick 280ms ease; }
@keyframes place-readout-set { from { color: var(--signal); } to { color: var(--ink); } }
@keyframes place-readout-tick { from { opacity: 0.35; } to { opacity: 1; } }

/* 2. Search results: cards arrive in the order the results did. A card that
   is arriving fades up from a few pixels lower; the grid holds its space. */
.rs-grid.is-armed > .result-card { opacity: 0; }
.result-card.is-arriving { animation: result-card-arrive 240ms cubic-bezier(0.2, 0, 0, 1) both; }
@keyframes result-card-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-card.product-card-highlight { box-shadow: inset 0 0 0 1px var(--signal); }

/* 3. Commercial access: the visitor's own licence, or an example of one.
   What it covers carries a tick, what it withholds a bar; the marks draw as
   each row is read out. */
.licence-summary { margin: 0 0 2rem; padding: 1.25rem 1.25rem 1rem; border: 1px solid var(--grid); background: var(--base); }
.licence-summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.licence-summary__title { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, sans-serif; font-weight: 400; font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.licence-summary__flag { flex: none; padding: 0.1rem 0.5rem; border: 1px dashed var(--ink-dim); font-size: 0.75rem; color: var(--ink-dim); }
.licence-summary__tier { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0 0 1rem; padding-bottom: 0.875rem; border-bottom: 1px solid var(--grid); }
.licence-summary__tiername { font-size: 1.125rem; font-weight: 600; color: var(--signal); }
.licence-summary__held { font-size: 0.8125rem; color: var(--ink-dim); }
.licence-summary__lists { display: grid; gap: 1rem; }
@media (min-width: 480px) { .licence-summary__lists { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; } }
.licence-summary__label { margin: 0 0 0.375rem; font-size: 0.8125rem; font-weight: 500; color: var(--ink-dim); }
.licence-summary__list { margin: 0; padding: 0; list-style: none; }
.licence-summary__item { position: relative; padding: 0.375rem 0 0.375rem 1.25rem; font-size: 0.875rem; line-height: 1.45; color: var(--ink); }
.licence-summary__item + .licence-summary__item { border-top: 1px solid var(--grid); }
.licence-summary__item::before { content: ''; position: absolute; left: 0.125rem; top: 0.95em; transform-origin: left center; }
.licence-summary__item--covers::before { top: 0.7em; width: 0.6rem; height: 0.32rem; border-left: 1.5px solid var(--signal); border-bottom: 1.5px solid var(--signal); transform: rotate(-45deg); }
.licence-summary__item--withholds::before { width: 0.6rem; height: 0; border-top: 1.5px solid var(--ink-dim); }
.licence-summary__item--withholds { color: var(--ink-dim); }
.licence-summary__reason { display: block; font-size: 0.75rem; color: var(--ink-dim); }
.licence-summary__note { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--ink-dim); }
.licence-summary__note a { color: var(--signal); }

.licence-summary.is-armed [data-licence-step] { opacity: 0; }
.licence-summary.is-armed [data-licence-step].is-in { opacity: 1; transition: opacity 260ms ease; }
.licence-summary.is-armed .licence-summary__item--covers::before { transform: rotate(-45deg) scale(0); }
.licence-summary.is-armed .licence-summary__item--withholds::before { transform: scaleX(0); }
.licence-summary.is-armed .licence-summary__item--covers.is-in::before { transform: rotate(-45deg) scale(1); transition: transform 220ms cubic-bezier(0.2, 0, 0, 1) 120ms; }
.licence-summary.is-armed .licence-summary__item--withholds.is-in::before { transform: scaleX(1); transition: transform 220ms cubic-bezier(0.2, 0, 0, 1) 120ms; }

/* 4. Order page: delivery steps. Each step's rule fills as it happens; the one
   under way is marked, not spun. The fill is a transform, so the row never
   changes size. */
.order-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 1.5rem; padding: 0; list-style: none; }
.order-steps__step { position: relative; display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1rem 0 0; border-top: 2px solid var(--grid); }
.order-steps__step::before { content: ''; position: absolute; top: -2px; left: 0; right: 0; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left center; transition: transform 520ms cubic-bezier(0.45, 0, 0.2, 1); }
.order-steps__step::after { content: ''; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border: 2px solid var(--grid); border-radius: 50%; background: var(--base); transition: background-color 200ms ease 360ms, border-color 200ms ease 360ms; }
.order-steps__step.is-current::before { transform: scaleX(0.18); }
.order-steps__step.is-current::after { border-color: var(--signal); }
.order-steps__step.is-done::before { transform: scaleX(1); }
.order-steps__step.is-done::after { border-color: var(--signal); background: var(--signal); }
.order-steps__name { font-size: 0.9375rem; font-weight: 600; color: var(--ink-dim); }
.order-steps__step.is-current .order-steps__name, .order-steps__step.is-done .order-steps__name { color: var(--ink); }
.order-steps__note { min-height: 2.6em; font-size: 0.8125rem; line-height: 1.3; color: var(--ink-dim); }
@media (prefers-reduced-motion: reduce) {
    .order-steps__step::before, .order-steps__step::after { transition: none; }
}

/* 5. Small details. A fine accent line under a section heading, drawn as the
   heading rises into view: a scroll-driven animation, so it needs no script
   on every page, and where the browser has no view timelines (or the visitor
   asks for reduced motion) the line is simply there. It sits in the heading's
   own bottom margin, so it takes no space. A result card's picture carries
   the centre of its footprint (footprint_captions.mjs). */
.home-steps__title, .coll-atlas__title, .doc__title, .docs-preface__title, .contact-page__title, .dsr-page__title { position: relative; view-timeline-name: --heading-accent; }
.home-steps__title::after, .coll-atlas__title::after, .doc__title::after, .docs-preface__title::after, .contact-page__title::after, .dsr-page__title::after {
    content: ''; position: absolute; left: 0; bottom: -0.45rem; width: 2.5rem; height: 1px; background: var(--signal); transform-origin: left center;
}
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .home-steps__title::after, .coll-atlas__title::after, .doc__title::after, .docs-preface__title::after, .contact-page__title::after, .dsr-page__title::after {
            animation: heading-accent-draw both cubic-bezier(0.2, 0, 0, 1); animation-timeline: --heading-accent; animation-range: entry 100% cover 40%;
        }
    }
}
@keyframes heading-accent-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.result-card__where { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; background: color-mix(in oklab, var(--color-base-100) 82%, transparent); font-size: 0.625rem; line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--ink); }

} /* end @layer utilities */
