/*
 * Feuille Claire, product site.
 *
 * Written phone first. The base rules below are the phone layout: single
 * column, nothing narrower than a finger, nothing smaller than 14px. Wider
 * screens only ever ADD density through min-width queries, so a layout can
 * never be discovered by a phone as a desktop screen squeezed shut.
 *
 * Two invariants hold at every width:
 *   1. no fixed pixel width above 400px, anywhere;
 *   2. every interactive element is at least 44px in both axes.
 */

:root {
    --ink: #04285B;
    --ink-70: rgba(4, 40, 91, 0.74);
    --ink-55: rgba(4, 40, 91, 0.62);
    --blue: #0560E3;
    --cyan: #4ECCEC;
    --green: #23E294;
    --amber: #8A5200;
    --red: #A8231C;
    --ok: #0A6C44;
    --line: rgba(4, 40, 91, 0.13);
    --line-strong: rgba(4, 40, 91, 0.24);
    --surface: #ffffff;
    --soft: #F4F8FF;
    --radius: 18px;
    --shadow: 0 10px 34px rgba(4, 40, 91, 0.09);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;

    /* The tap floor. Every control inherits it, so a control cannot be built
       too small by forgetting a rule. */
    --tap: 44px;

    /* The type floor. Nothing on this page renders below --fs-1, at any
       width, which is why the small print stays readable on a phone. */
    --fs-1: 14px;
    --fs-2: 15px;
    --fs-3: 16px;
    --fs-4: 18px;

    --gut: 14px;
}

* { box-sizing: border-box; }

/* A control that sets its own display would otherwise outrank the hidden
   attribute and stay on screen while the code believes it is gone. */
[hidden] { display: none !important; }

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

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(70vw 46vw at 6% -8%, rgba(78, 204, 236, 0.26), transparent 62%),
        radial-gradient(64vw 44vw at 108% 10%, rgba(5, 96, 227, 0.18), transparent 64%),
        radial-gradient(58vw 40vw at 24% 96%, rgba(35, 226, 148, 0.16), transparent 62%),
        linear-gradient(162deg, #ffffff 0%, #EFF6FF 46%, #ffffff 100%);
    background-attachment: fixed;
    line-height: 1.55;
    font-size: var(--fs-3);
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 10px; font-weight: 800; }
h1 { font-size: clamp(28px, 7.2vw, 44px); font-weight: 900; letter-spacing: -0.028em; }
h2 { font-size: clamp(20px, 4.8vw, 26px); }
h3 { font-size: clamp(17px, 3.8vw, 19px); margin-top: 24px; }
h4 { font-size: var(--fs-2); }
p { margin: 0 0 12px; }

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

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
    border-radius: 8px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 12px 18px;
    z-index: 200;
    border-radius: 0 0 12px 0;
    min-height: var(--tap);
    display: inline-flex;
    align-items: center;
}
.skip-link:focus { left: 0; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Product header ---------- */

.site-head {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 26px rgba(4, 40, 91, 0.07);
}

.head-in {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px var(--gut);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
    min-height: var(--tap);
    padding-inline-end: 4px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 6px 16px rgba(5, 96, 227, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    color: #fff;
    font-weight: 900;
    font-size: var(--fs-1);
    display: grid;
    place-items: center;
}

.brand-name {
    font-weight: 900;
    font-size: var(--fs-3);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.brand-kind {
    display: none;
    font-size: var(--fs-1);
    font-weight: 700;
    color: var(--ink-55);
    white-space: nowrap;
}

.lang-switch {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex: 0 0 auto;
}
.lang-switch a {
    min-height: var(--tap);
    min-width: var(--tap);
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-1);
    font-weight: 800;
    text-decoration: none;
    color: var(--ink-70);
}
.lang-switch a[aria-current="true"] {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-color: transparent;
    color: #fff;
}

/* ---------- Layout ---------- */

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px var(--gut) 36px;
}

.grad {
    background: linear-gradient(100deg, var(--blue), var(--cyan) 52%, var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero { margin-bottom: 18px; }
.hero h1 { margin-bottom: 8px; }

.lede {
    font-size: var(--fs-3);
    color: var(--ink-70);
    max-width: 66ch;
    margin-bottom: 16px;
}

.privacy {
    border-inline-start: 4px solid var(--green);
    background: rgba(35, 226, 148, 0.10);
    padding: 12px 14px;
    border-radius: 0 12px 12px 0;
    font-size: var(--fs-1);
    color: var(--ink-70);
    max-width: 78ch;
    margin-top: 18px;
}
.privacy-strong { font-weight: 800; color: var(--ink); }

/* ---------- Drop zone ---------- */

.drop {
    border: 2px dashed rgba(5, 96, 227, 0.45);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    padding: 20px 16px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}
.drop.over { border-color: var(--green); background: rgba(35, 226, 148, 0.13); }
.drop-icon { width: 34px; height: 34px; color: var(--blue); }
.drop-title { font-weight: 800; font-size: var(--fs-4); margin: 4px 0 2px; }
.drop-or { color: var(--ink-55); font-size: var(--fs-1); margin: 2px 0 10px; }
.drop-accepts { font-size: var(--fs-1); color: var(--ink-55); margin: 12px 0 0; }

.btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    font-size: var(--fs-2);
    min-height: var(--tap);
    padding: 10px 18px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { box-shadow: 0 8px 18px rgba(4, 40, 91, 0.12); }
.btn.primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--green));
    box-shadow: 0 10px 24px rgba(5, 96, 227, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.primary:hover { box-shadow: 0 16px 32px rgba(5, 96, 227, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn.big { min-height: 52px; padding: 12px 24px; font-size: var(--fs-3); }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.samples { margin-top: 16px; }
.samples-title { font-weight: 700; font-size: var(--fs-2); margin-bottom: 8px; }
.samples-row { display: flex; flex-wrap: wrap; gap: 8px; }
.samples-row .btn { flex: 1 1 190px; }
.note { font-size: var(--fs-1); color: var(--ink-55); margin: 10px 0 0; max-width: 80ch; }

.status { margin-top: 14px; font-size: var(--fs-2); font-weight: 700; min-height: 24px; }
.status.error { color: var(--red); }
.status.busy { color: var(--blue); }
.status.ok { color: var(--ok); }

/* ---------- Panels ---------- */

.panel {
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 13px;
}
.panel h2 { margin-bottom: 4px; }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: 10px;
    margin: 14px 0 6px;
}
.meta-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--soft);
    min-width: 0;
}
.meta-item dt { font-size: var(--fs-1); color: var(--ink-55); font-weight: 700; margin-bottom: 2px; }
.meta-item dd { margin: 0; font-size: var(--fs-2); font-weight: 800; word-break: break-word; }
.meta-item .sub { display: block; font-size: var(--fs-1); font-weight: 600; color: var(--ink-55); margin-top: 2px; }
.meta-item select { width: 100%; margin-top: 4px; }
.meta-item.wide { grid-column: 1 / -1; }

select, input[type="date"], input[type="search"], input[type="text"] {
    font: inherit;
    /* 16px is not a style choice: below it, iOS Safari zooms the page on
       focus and the layout the visitor was reading jumps away. */
    font-size: var(--fs-3);
    min-height: var(--tap);
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    max-width: 100%;
}
select { cursor: pointer; }

.inline-select { font-weight: 700; margin-top: 6px; }

/* ---------- Anomalies ---------- */

.anomaly-list { display: grid; gap: 8px; }
.anomaly {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-inline-start: 4px solid #B45309;
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 251, 235, 0.8);
    font-size: var(--fs-2);
}
.anomaly.severe { border-inline-start-color: var(--red); background: rgba(254, 242, 242, 0.8); }
.anomaly .count { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.anomaly .where { font-weight: 800; }
.anomaly .detail { display: block; color: var(--ink-55); font-size: var(--fs-1); margin-top: 2px; }
.anomaly-ok {
    border: 1px solid rgba(35, 226, 148, 0.5);
    background: rgba(35, 226, 148, 0.10);
    border-radius: 12px;
    padding: 12px;
    font-size: var(--fs-2);
    font-weight: 700;
}

/* ---------- Tables ----------
   On a phone a six column table is the wrong component, so every table on
   this page is a card list first and only becomes a table when there is room
   for one. The markup stays a real <table> either way, which is what a screen
   reader and the print stylesheet both need. */

.scroll-x { border-radius: 14px; }

table.grid { width: 100%; border-collapse: collapse; background: transparent; }
table.grid thead { display: none; }
table.grid tbody, table.grid tr, table.grid td { display: block; }
table.grid tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 4px 12px;
    margin-bottom: 10px;
}
table.grid tr:last-child { margin-bottom: 0; }
table.grid td {
    display: grid;
    grid-template-columns: minmax(0, 11ch) minmax(0, 1fr);
    gap: 4px 12px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid rgba(4, 40, 91, 0.07);
    font-size: var(--fs-2);
    text-align: start;
}
table.grid td:last-child { border-bottom: 0; }
table.grid td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1;
    font-size: var(--fs-1);
    font-weight: 800;
    color: var(--ink-55);
}
/* A cell can hold more than one element: a select and a badge, a percentage
   and its bar, five sample chips. Without this they would each take the next
   free grid slot and half of them would land under the label. */
table.grid td > * { grid-column: 2; }
/* Several chips in one cell stay one grid item and flow inside it. */
.cellwrap { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.cellwrap code, .cellwrap .badge { margin: 0; }
table.grid td:empty { display: none; }
table.grid td.num { font-variant-numeric: tabular-nums; }

.col-name { font-weight: 800; }
.col-raw { display: block; font-size: var(--fs-1); color: var(--ink-55); font-weight: 600; }
.samples-cell code {
    background: rgba(4, 40, 91, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: var(--fs-1);
    display: inline-block;
    margin: 1px 4px 1px 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.badge {
    display: inline-block;
    font-size: var(--fs-1);
    font-weight: 700;
    padding: 3px 9px;
    /* Long anomaly labels wrap onto three lines, and a fully round pill
       around three lines of text reads as a blob. */
    border-radius: 10px;
    background: rgba(4, 40, 91, 0.07);
    color: var(--ink-70);
    margin: 2px 4px 2px 0;
}
.badge.warn { background: rgba(245, 158, 11, 0.18); color: #7C4A02; }
.badge.bad { background: rgba(220, 38, 38, 0.13); color: var(--red); }
.badge.good { background: rgba(35, 226, 148, 0.2); color: var(--ok); }

.fill-bar {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: rgba(4, 40, 91, 0.1);
    margin-top: 5px;
    overflow: hidden;
    width: 100%;
    max-width: 220px;
}
.fill-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }

/* ---------- Boxes, mapping, filters ---------- */

.two-col { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }

.box {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 13px;
    margin: 0;
    background: var(--soft);
    min-width: 0;
}
.box legend { font-weight: 800; font-size: var(--fs-2); padding: 0 6px; }

/* The box a finger lands on is 44px square; the box the eye sees is 24px
   drawn inside it. A native checkbox cannot do that, so the native paint is
   turned off and the mark is drawn here. */
.check {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: var(--fs-2);
    min-height: var(--tap);
    padding: 2px 0;
    cursor: pointer;
}
.check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: var(--tap);
    height: var(--tap);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.check input[type="checkbox"]::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid var(--line-strong);
    background: #fff;
}
.check input[type="checkbox"]:checked::before {
    border-color: var(--blue);
    background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat;
}
.check input[type="checkbox"]:focus-visible::before { outline: 3px solid var(--blue); outline-offset: 2px; }
.check.inline { min-height: var(--tap); }

.mapping { display: grid; gap: 10px; }
.map-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.map-row label { font-size: var(--fs-1); font-weight: 800; color: var(--ink-70); }
.map-row select { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.actions .btn { flex: 1 1 200px; }
.warn { color: var(--red); font-size: var(--fs-2); font-weight: 700; flex: 1 1 100%; }

.filters { margin-top: 16px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-1); font-weight: 800; color: var(--ink-70); min-width: 0; }
.field.grow { grid-column: 1 / -1; }
.field input { width: 100%; min-width: 0; }
.filter-row .btn { grid-column: 1 / -1; }

.chips-groups { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.chip-group h4 { margin: 0 0 8px; font-size: var(--fs-1); font-weight: 800; color: var(--ink-70); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; }
.chip {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink-70);
    font: inherit;
    font-size: var(--fs-1);
    font-weight: 700;
    min-height: var(--tap);
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}
.chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-color: transparent;
    color: #fff;
}
.chip .n { opacity: 0.75; font-weight: 600; }

/* ---------- KPIs ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin: 14px 0 4px; }
.kpi {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(150deg, var(--soft), rgba(255, 255, 255, 0.95));
    min-width: 0;
}
.kpi .label { font-size: var(--fs-1); font-weight: 700; color: var(--ink-55); }
.kpi .value { font-size: clamp(19px, 5vw, 24px); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; word-break: break-word; line-height: 1.2; }
.kpi .sub { font-size: var(--fs-1); color: var(--ink-55); font-weight: 600; }

/* ---------- Charts ---------- */

.charts { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
.chart-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px 14px; background: #fff; min-width: 0; }
.chart-card h3 { margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.chart-card h3 .inline-select { flex: 1 1 100%; }
.canvas-wrap { position: relative; }
canvas { width: 100%; display: block; touch-action: pan-y; }
#trend { height: 230px; }
#bars { height: 320px; }

.tip {
    position: absolute;
    pointer-events: none;
    background: rgba(4, 40, 91, 0.96);
    color: #fff;
    font-size: var(--fs-1);
    line-height: 1.4;
    padding: 8px 11px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(4, 40, 91, 0.3);
    max-width: 200px;
    z-index: 5;
}

.sr-table { margin-top: 10px; font-size: var(--fs-1); }
.sr-table summary {
    cursor: pointer;
    color: var(--ink-70);
    font-weight: 800;
    min-height: var(--tap);
    display: flex;
    align-items: center;
    font-size: var(--fs-2);
}
.sr-table .scroll-x { margin-top: 8px; }

.table-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.table-head h3 { flex: 1 1 auto; }
.table-head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.count { font-size: var(--fs-1); color: var(--ink-55); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Data list ----------
   The same virtualised list, in two shapes. On a phone every row is a card
   carrying all of its own columns, which is the only honest way to show a
   twelve column row on a 360px screen: nothing is hidden behind a sideways
   scroll the thumb cannot find. */

.grid-sort {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
    margin: 10px 0;
}
.grid-sort .field { min-width: 0; }
.grid-sort select { width: 100%; }
.grid-sort button { min-width: var(--tap); }

.virtual {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: auto;
    /* No overscroll containment: at the end of the list the swipe has to keep
       carrying the page, or the list becomes a trap the thumb cannot leave. */
    max-height: min(70vh, 620px);
    background: var(--soft);
    position: relative;
    -webkit-overflow-scrolling: touch;
}
.virtual-head { display: none; }
.virtual-body { position: relative; width: 100%; }
.virtual-spacer { width: 1px; }
.virtual-rows { position: absolute; top: 0; left: 0; right: 0; padding: 0 8px; }

.vrow {
    height: var(--vrow-h);
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    padding: 8px 11px;
    overflow: hidden;
    display: block;
}
.vrow .f {
    display: grid;
    grid-template-columns: minmax(0, 15ch) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    height: 26px;
    line-height: 26px;
}
.vrow .f b {
    font-size: var(--fs-1);
    font-weight: 800;
    color: var(--ink-55);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vrow .f span {
    font-size: var(--fs-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vrow .f span.num { font-variant-numeric: tabular-nums; }
.vrow .f span.dim { color: var(--ink-55); font-style: italic; }
.vrow .f.head { height: 30px; line-height: 30px; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.vrow .f.head b { font-size: var(--fs-1); color: var(--blue); }
.vrow .f.head span { font-weight: 800; text-align: end; }

.list-foot { font-size: var(--fs-1); color: var(--ink-55); margin: 8px 0 0; }

/* ---------- Proof and footer ---------- */

.proof .meta-item dd { font-variant-numeric: tabular-nums; }
.tipline {
    border-inline-start: 4px solid var(--blue);
    background: rgba(5, 96, 227, 0.07);
    padding: 12px 14px;
    border-radius: 0 12px 12px 0;
    font-size: var(--fs-2);
    margin-top: 12px;
}
.origin-list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-1); }
.origin-list li { padding: 2px 0; word-break: break-all; }

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px var(--gut) 40px;
    font-size: var(--fs-1);
    color: var(--ink-70);
    border-top: 1px solid var(--line);
}
.site-footer p { margin: 0 0 8px; max-width: 76ch; }
.site-footer .made { color: var(--ink-55); }
.site-footer .made a {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ================================================================
   From here up, and only up. Each query adds room that the phone
   layout did not have; none of them is required for the page to work.
   ================================================================ */

@media (min-width: 560px) {
    :root { --gut: 18px; }
    .filter-row { grid-template-columns: repeat(3, 1fr); }
    .field.grow { grid-column: 1 / -1; }
    .filter-row .btn { grid-column: auto; }
    .actions .btn { flex: 0 1 auto; }
    .samples-row .btn { flex: 0 1 auto; }
    .brand-kind { display: inline; }
    .map-row { grid-template-columns: minmax(0, 15ch) minmax(0, 1fr); align-items: center; gap: 10px; }
    .map-row label { margin: 0; }
}

@media (min-width: 720px) {
    main { padding: 22px var(--gut) 44px; }
    .panel { padding: 22px; border-radius: 22px; }
    .chips-groups { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

    /* There is room for a real table now, so the card list becomes one. */
    .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); }
    table.grid { display: table; background: #fff; font-size: var(--fs-1); }
    table.grid thead { display: table-header-group; }
    table.grid tbody { display: table-row-group; }
    table.grid tr { display: table-row; border: 0; border-radius: 0; padding: 0; margin: 0; }
    table.grid th, table.grid td { display: table-cell; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: start; }
    table.grid td::before { content: none; }
    table.grid thead th {
        position: sticky;
        top: 0;
        background: var(--soft);
        font-size: var(--fs-1);
        color: var(--ink-70);
        font-weight: 800;
        border-bottom: 2px solid var(--line-strong);
        z-index: 1;
    }
    table.grid tbody tr:nth-child(even) { background: rgba(240, 247, 255, 0.5); }
    table.grid td.num, table.grid th.num { text-align: end; font-variant-numeric: tabular-nums; }
    table.grid td:empty { display: table-cell; }
    .fill-bar { min-width: 70px; }
}

@media (min-width: 900px) {
    .two-col { grid-template-columns: 1fr 1fr; }
    .charts { grid-template-columns: 1fr 1fr; }
    .chart-card h3 .inline-select { flex: 0 1 auto; }

    /* The sideways grid, for a screen that can actually hold one. */
    .grid-sort { display: none; }
    .virtual { background: #fff; }
    .virtual-head {
        display: grid;
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--soft);
        border-bottom: 2px solid var(--line-strong);
        width: max-content;
        min-width: 100%;
    }
    .virtual-head button {
        appearance: none;
        border: 0;
        background: transparent;
        font: inherit;
        font-size: var(--fs-1);
        font-weight: 800;
        color: var(--ink-70);
        text-align: start;
        min-height: var(--tap);
        padding: 9px 10px;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .virtual-head button .arrow { color: var(--blue); }
    .virtual-body { width: max-content; min-width: 100%; }
    .virtual-rows { padding: 0; }
    .vrow {
        display: grid;
        grid-template-columns: var(--cols);
        border: 0;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        background: transparent;
        font-size: var(--fs-1);
        height: var(--vrow-h);
        margin: 0;
        padding: 0;
        align-items: center;
    }
    .vrow:nth-child(even) { background: rgba(240, 247, 255, 0.5); }
    .vrow .f { display: contents; }
    .vrow .f b { display: none; }
    .vrow .f span {
        padding: 0 10px;
        font-size: var(--fs-1);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .vrow .f.head { display: none; }
}

@media print {
    .site-head, .drop, .samples, .actions, .filters, .grid-sort { display: none; }
    body { background: #fff; }
    table.grid { display: table; }
    table.grid thead { display: table-header-group; }
    table.grid tr { display: table-row; }
    table.grid th, table.grid td { display: table-cell; }
    table.grid td::before { content: none; }
}
