:root {
    --bg: #f3f5f9;
    --surface: #ffffff;
    --surface-2: #f7f8fb;          /* table heads, row hover */
    --surface-3: #eceff4;          /* tracks, counters */
    --border: #e2e6ed;
    --border-strong: #cfd5df;
    --control-border: #8a94a6;
    --text: #161a23;
    --text-soft: #586174;

    --accent: #1d19a9;
    --accent-hover: #16127f;
    --accent-text: #ffffff;
    --accent-soft: #ecebfa;

    --danger: #b91c1c;
    --on-danger: #ffffff;
    --danger-soft: #fee2e2;
    --success: #15803d;
    --on-success: #ffffff;
    --success-soft: #dcfce7;
    --warning: #8a5a00;
    --on-warning: #ffffff;
    --warning-soft: #fef3c7;
    /*
     * Serious sits between warning and critical: not a known flaw, but the
     * verdicts cannot be trusted (update data unverifiable). Solid amber, so it
     * outranks a soft warning without borrowing the red of critical.
     */
    --serious: #b45309;
    --on-serious: #ffffff;
    --skip: #a3abb8;               /* decorative only: bars, dots */

    --drupal: #0678be;
    --sylius: #137a63;
    --wordpress: #21759b;
    --prestashop: #c2185b;
    --symfony: #2f333a;

    /* Score chart: a brand-indigo step inside the chart lightness band. */
    --chart-line: #4541e0;

    /* The sidebar stays dark in both themes: near-black, not pure black. */
    --nav-bg: #17181c;
    --nav-text: #a8abb4;
    --nav-hover: rgb(255 255 255 / 6%);
    --nav-active: rgb(255 255 255 / 11%);
    --nav-mark: #8c89e8;

    /* Square layout; only buttons and badges keep rounded corners. */
    --radius: 8px;
    --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 1px 3px rgb(16 24 40 / 4%);
    --sticky-gap: 1.5rem;          /* above the heads stuck to the viewport */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1318;
        --surface: #171c23;
        --surface-2: #1c222a;
        --surface-3: #262d37;
        --border: #2a313b;
        --border-strong: #38414d;
        --control-border: #6b7587;
        --text: #e8ebef;
        --text-soft: #a3adba;

        /* #1d19a9 est illisible sur fond sombre : même teinte, éclaircie. */
        --accent: #8c89e8;
        --accent-hover: #a6a3ef;
        --accent-text: #0e1319;
        --accent-soft: #22213f;

        /* Light tones on dark: solid fills take dark text, not white. */
        --danger: #f87171;
        --on-danger: #1b0a0a;
        --danger-soft: #3b1518;
        --success: #4ade80;
        --on-success: #052e16;
        --success-soft: #0f2e1c;
        --warning: #e0b05a;
        --on-warning: #2b1d00;
        --warning-soft: #302611;
        --serious: #fbbf24;
        --on-serious: #261800;
        --skip: #4b5462;

        --drupal: #4cb8ec;
        --sylius: #5cc3a8;
        --wordpress: #6ab6d8;
        --prestashop: #f06292;
        --symfony: #c3c8d1;

        --chart-line: #7c78e8;

        --nav-bg: #0b0c0e;

        --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    }
}

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

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

[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 1rem; font-weight: 650; margin: 0; }

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

code {
    padding: 0.1rem 0.35rem;
    background: var(--surface-3);
    font: 0.85em var(--mono);
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: var(--accent-text);
    z-index: 10;
}
.skip-link:focus { left: 0; top: 0; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.icon {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    vertical-align: -0.2em;
}

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

.app {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    min-height: 100vh;
}

.content {
    width: 100%;
    max-width: 90rem;
    padding: 2rem clamp(1rem, 2.5vw, 2rem) 3rem;
}

.guest {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(60rem 28rem at 50% -8rem, var(--accent-soft), transparent 70%),
        var(--bg);
}
.guest > .content { max-width: 25rem; padding: 0; }

/* ---------- Sidebar ---------- */

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem 0.9rem;
    background: var(--nav-bg);
    border-right: 1px solid rgb(255 255 255 / 6%);
    color: var(--nav-text);
}

.sidebar :focus-visible { outline-color: var(--nav-mark); }

.sidebar__brand {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0 0.4rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

/* "lba" wordmark: takes the text colour, so white in the sidebar, brand blue on the login page. */
.logo { height: 1.5em; width: auto; fill: currentColor; flex: none; }
.logo--lg { height: 1.3em; color: var(--accent); vertical-align: -0.2em; }

.sidebar__nav { display: flex; flex-direction: column; gap: 0.15rem; }

.sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    color: var(--nav-text);
    font-weight: 500;
    text-decoration: none;
}
.sidebar__nav a:hover { background: var(--nav-hover); color: #fff; }
.sidebar__nav a[aria-current="page"] {
    background: var(--nav-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--nav-mark);
}

.sidebar__cta { width: 100%; }

.sidebar__label {
    margin: 0 0 0.4rem;
    padding: 0 0.4rem;
    color: var(--nav-text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- Site switcher (sidebar) ----------
 * The combobox, dark: the panel opens in the flow and pushes the nav down.
 */

.combobox--sidebar .combobox__toggle {
    gap: 0.6rem;
    height: auto;
    padding: 0.5rem 0.6rem;
    border-color: rgb(255 255 255 / 12%);
    background: rgb(255 255 255 / 5%);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.combobox--sidebar .combobox__toggle:hover,
.combobox--sidebar .combobox__toggle[aria-expanded="true"] { background: rgb(255 255 255 / 10%); }
.combobox--sidebar .combobox__toggle:focus-visible { outline: 3px solid var(--nav-mark); outline-offset: 2px; }
.combobox--sidebar .combobox__toggle .avatar { width: 1.9rem; height: 1.9rem; }
.combobox--sidebar .combobox__value { font-size: 0.9rem; }
.combobox--sidebar .combobox__chevron { color: var(--nav-text); }

.combobox--sidebar .combobox__panel {
    color-scheme: dark;            /* native search controls match the sidebar */
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-top: 0.35rem;
    border-color: rgb(255 255 255 / 12%);
    background: #222329;
    box-shadow: none;
}
.combobox--sidebar .combobox__search .icon { color: var(--nav-text); }
.combobox--sidebar .combobox__search input[type="search"] { border-bottom-color: rgb(255 255 255 / 12%); color: #fff; }
.combobox--sidebar .combobox__search input::placeholder { color: var(--nav-text); }
.combobox--sidebar .combobox__list { max-height: min(22rem, 50vh); }
.combobox--sidebar .combobox__option { color: #fff; }
.combobox--sidebar .combobox__option.is-active { background: rgb(255 255 255 / 9%); }
.combobox--sidebar .combobox__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--nav-mark); }
.combobox--sidebar .combobox__description,
.combobox--sidebar .combobox__empty { color: var(--nav-text); }

.sidebar__user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 0.4rem 0;
    border-top: 1px solid rgb(255 255 255 / 10%);
}

.sidebar__initials {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: #2c2e35;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.sidebar__who { display: flex; flex-direction: column; min-width: 0; }
.sidebar__name {
    overflow: hidden;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar__role { font-size: 0.76rem; }

.sidebar__logout {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    border-radius: var(--radius);
    color: var(--nav-text);
}
.sidebar__logout:hover { background: var(--nav-hover); color: #fff; }

@media (max-width: 1000px) {
    .app { grid-template-columns: minmax(0, 1fr); }

    .sidebar {
        z-index: 5;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.6rem 1rem;
        padding: 0.7rem 1rem;
    }
    .sidebar__brand { order: 1; padding: 0; }
    .sidebar__cta { order: 2; width: auto; margin-left: auto; }
    .sidebar__user { order: 3; margin: 0; padding: 0; border: 0; }
    .sidebar__nav { order: 4; flex-direction: row; width: 100%; overflow-x: auto; }
    .site-switch { order: 5; width: 100%; }
    .sidebar__nav a { white-space: nowrap; }
}

@media (max-width: 600px) {
    .sidebar__who { display: none; }
    .sidebar__cta { width: 2.4rem; padding: 0; }
    .sidebar__cta-label {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* ---------- Page heads ---------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.page-head__sub { margin: 0.3rem 0 0; color: var(--text-soft); font-size: 0.92rem; }
.page-head__actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Takes the button's place while the queue drains. */
.running {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.45rem 0.9rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius);
    font-weight: 600;
}
.running .icon { animation: spin 1.4s linear infinite; }
.running--done .icon { animation: none; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .running .icon { animation: none; }
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    color: var(--text-soft);
    font-size: 0.85rem;
}
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .icon { width: 0.9rem; height: 0.9rem; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; }

.site-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.site-hero__id { min-width: 0; }
.site-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    margin: 0.35rem 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}
.site-hero__meta a { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 500; text-decoration: none; }
.site-hero__meta a:hover { text-decoration: underline; }
.site-hero__meta .icon { width: 0.85rem; height: 0.85rem; }
.site-hero .actions { margin-left: auto; }

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

/* flow-root rather than overflow: hidden, which would clip the combobox lists. */
.panel {
    display: flow-root;
    margin-bottom: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.panel__head h2 { display: flex; align-items: center; gap: 0.5rem; }
.panel__head h2 .icon { color: var(--text-soft); }

/* Filter bar of the boards, kept in view while scrolling the table. */
.panel__head--sticky {
    position: sticky;
    top: var(--sticky-gap);
    z-index: 3;
    background: var(--surface);
    box-shadow: 0 -1px 0 var(--border);
}
.panel__head--sticky::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 1px);
    left: -0.25rem;
    right: -0.25rem;
    height: var(--sticky-gap);
    background: var(--bg);
}
/* The sidebar becomes a sticky top bar of variable height: heads would slide under it. */
@media (max-width: 1000px) {
    .panel__head--sticky { position: static; }
    .panel__head--sticky::before { display: none; }
}

.panel__counts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }

.panel .dl,
.panel > .muted { margin: 0; padding: 1rem 1.25rem; }
.panel__note { margin: 0; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 0.86rem; }

.empty {
    margin: 0;
    padding: 2.5rem 1rem;
    color: var(--text-soft);
    text-align: center;
    white-space: normal;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
}
.info-grid > .panel { margin-bottom: 0; }
@media (max-width: 760px) {
    .info-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Tiles ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tile {
    padding: 1.1rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.tile__head { display: flex; align-items: center; gap: 0.65rem; }

.tile__icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    background: var(--accent-soft);
    color: var(--accent);
}
.tile--bad {
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger-soft) 45%, var(--surface));
    box-shadow: inset 4px 0 0 var(--danger), var(--shadow);
}
.tile--warn {
    border-color: color-mix(in srgb, var(--warning) 50%, var(--border));
    box-shadow: inset 4px 0 0 var(--warning), var(--shadow);
}
.tile--bad .tile__icon  { background: var(--danger);       color: var(--on-danger); }
.tile--warn .tile__icon { background: var(--warning-soft); color: var(--warning); }
.tile--serious {
    border-color: var(--serious);
    background: color-mix(in srgb, var(--warning-soft) 55%, var(--surface));
    box-shadow: inset 4px 0 0 var(--serious), var(--shadow);
}
.tile--serious .tile__icon { background: var(--serious); color: var(--on-serious); }
.tile--good .tile__icon { background: var(--success); color: var(--on-success); }

.tile__label { margin: 0; color: var(--text-soft); font-size: 0.85rem; font-weight: 600; }

.tile__value {
    margin: 0.75rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.tile--bad .tile__value  { color: var(--danger); }
.tile--warn .tile__value { color: var(--warning); }
.tile--serious .tile__value { color: var(--warning); }
.tile--good .tile__value { color: var(--success); }
.tile__value--text { margin-top: 0.9rem; font-size: 1rem; font-weight: 600; }

.tile__note { margin: 0.35rem 0 0; color: var(--text-soft); font-size: 0.8rem; }

.tile__score { display: flex; align-items: center; gap: 0.85rem; margin-top: 0.75rem; }
.tile__score .tile__note { margin: 0; }

.tile--info .dl { margin-top: 0.75rem; }
.tile--info .tags { margin-top: 0.6rem; }
.tile--info .tags + .tags { margin-top: 0.4rem; }

.dl--compact { gap: 0.2rem 0.75rem; font-size: 0.84rem; }
.dl--compact dt { font-size: 0.8rem; }

/* Fleet health: one segment per state, widths proportional to counts. */
.fleet {
    display: flex;
    gap: 2px;
    height: 8px;
    margin: 0.85rem 0 0.6rem;
    overflow: hidden;
    background: var(--surface-3);
}
.fleet__seg--good { background: var(--success); }
.fleet__seg--bad  { background: var(--danger); }
.fleet__seg--skip { background: var(--skip); }

.fleet-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.4rem;
    border-radius: 50%;
}
.dot--good { background: var(--success); }
.dot--bad  { background: var(--danger); }
.dot--skip { background: var(--skip); }

/* ---------- Toolbar: search + filter chips ---------- */

.toolbar {
    display: flex;
    flex: 1 1 32rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.75rem;
}

.search { position: relative; display: flex; align-items: center; margin: 0; }
.search .icon { position: absolute; left: 0.7rem; color: var(--text-soft); pointer-events: none; }
.search input[type="search"] { width: 16rem; max-width: 100%; height: 2.25rem; padding-left: 2.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.chips + .chips::before {
    content: "";
    align-self: center;
    width: 1px;
    height: 1.25rem;
    margin-right: 0.4rem;
    background: var(--border-strong);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font: 500 0.84rem var(--font);
    cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--control-border); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip .icon { width: 1rem; height: 1rem; }

.chip__count {
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--surface-3);
    font-size: 0.74rem;
    font-weight: 600;
}
.chip[aria-pressed="true"] .chip__count { background: rgb(255 255 255 / 20%); }

.toolbar__count { margin: 0 0 0 auto; color: var(--text-soft); font-size: 0.8rem; }
.toolbar__reset { height: 2.25rem; padding: 0 0.75rem; font-size: 0.84rem; }

.toolbar__divider {
    align-self: center;
    width: 1px;
    height: 1.25rem;
    background: var(--border-strong);
}

@media (max-width: 600px) {
    .search,
    .search input[type="search"] { width: 100%; }
    /* Once the bar wraps, a rule would land at the end of a line. */
    .toolbar__divider { display: none; }
}

/* ---------- Combobox ----------
 * A <select> with search (combobox controller). Looks like a form field by
 * default; --filter makes it a chip of the toolbar, --sidebar the site switcher.
 */

.combobox { position: relative; }

.combobox__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--control-border);
    background: var(--surface);
    color: var(--text);
    font: 0.94rem var(--font);
    text-align: left;
    cursor: pointer;
}
.combobox__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field--invalid .combobox__toggle { border-color: var(--danger); }

.combobox__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.combobox__chevron { flex-shrink: 0; width: 1rem; height: 1rem; color: var(--text-soft); }

.combobox__panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    min-width: max(100%, 14rem);
    max-width: min(22rem, calc(100vw - 2rem));
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(16 24 40 / 14%);
}

.combobox__search { position: relative; display: flex; align-items: center; margin: 0; }
.combobox__search .icon { position: absolute; left: 0.6rem; width: 1rem; height: 1rem; color: var(--text-soft); pointer-events: none; }
.combobox__search input[type="search"] {
    height: 2.4rem;
    padding-left: 2rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-size: 0.86rem;
}
.combobox__search input[type="search"]:focus-visible { outline-offset: -2px; }

.combobox__list {
    max-height: min(20rem, 50vh);
    margin: 0;
    padding: 0.25rem 0;
    overflow-y: auto;
    list-style: none;
}
/* The active option is the focus indicator. */
.combobox__list:focus-visible { outline: 0; }

.combobox__option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.86rem;
    cursor: pointer;
}
.combobox__option.is-active { background: var(--accent-soft); }
.combobox__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.combobox__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combobox__description { grid-column: 1; color: var(--text-soft); font-size: 0.76rem; font-weight: 400; }
.combobox__count {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.combobox__empty { margin: 0; padding: 0.6rem 0.75rem; color: var(--text-soft); font-size: 0.82rem; }

/* In the toolbar: a chip, filled while it filters. */
.combobox--filter .combobox__toggle {
    gap: 0.4rem;
    width: auto;
    height: 2rem;
    padding: 0 0.65rem 0 0.8rem;
    border-color: var(--border-strong);
    border-radius: 999px;
    color: var(--text);
    font: 500 0.84rem var(--font);
}
.combobox--filter .combobox__toggle:hover { border-color: var(--control-border); }
.combobox--filter .combobox__toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--border-strong); }
.combobox--filter .combobox__prefix { color: var(--text-soft); }
.combobox--filter .combobox__value { max-width: 11rem; }
.combobox--filter .combobox__toggle:not([data-empty]) { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.combobox--filter .combobox__toggle:not([data-empty]) .combobox__prefix,
.combobox--filter .combobox__toggle:not([data-empty]) .combobox__chevron { color: inherit; opacity: 0.8; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

thead th {
    padding-block: 0.6rem;
    background: var(--surface-2);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Table head stuck under the panel head: see the sticky-head controller. */
@media (min-width: 1001px) {
    .table-wrap[data-fits] { overflow-x: visible; }
    .table-wrap[data-fits] thead th {
        position: sticky;
        top: calc(var(--sticky-gap) + var(--panel-head-height, 0px));
        z-index: 2;
        /* A collapsed border stays behind when its cell sticks. */
        border-bottom-color: transparent;
        box-shadow: inset 0 -1px 0 var(--border);
    }
}

tbody th { font-weight: 400; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--surface-2); }

/* Ten columns on the board: tighter cells so they fit a laptop screen. */
.board th, .board td { padding-inline: 0.55rem; }
.board th:first-child, .board td:first-child { padding-left: 1rem; }

.row--attention > * { background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface)); }
.row--attention:hover > * { background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface)); }
.row--attention > th[scope="row"] { box-shadow: inset 4px 0 0 var(--danger); }
.row--serious > * { background: color-mix(in srgb, var(--warning-soft) 45%, var(--surface)); }
.row--serious:hover > * { background: color-mix(in srgb, var(--warning-soft) 75%, var(--surface)); }
.row--serious > th[scope="row"] { box-shadow: inset 4px 0 0 var(--serious); }

.site-cell { display: flex; align-items: center; gap: 0.75rem; }
/* The name is the way into a site's page: it has to look clickable at rest. */
.site-cell__name {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.site-cell__name:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.site-cell__host { display: block; color: var(--text-soft); font-size: 0.8rem; text-decoration: none; }
a.site-cell__host:hover { color: var(--accent); text-decoration: underline; }

.cell-note {
    display: block;
    max-width: 16rem;
    margin-top: 0.25rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    white-space: normal;
}

.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.tags  { display: flex; flex-wrap: wrap; gap: 0.4rem 0.3rem; }
.tags + .tags { margin-top: 0.4rem; }

.cms { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }

.core { display: block; margin-bottom: 0.25rem; }
.core__target { margin-left: 0.3rem; color: var(--text-soft); font-size: 0.8rem; }

.count {
    display: inline-grid;
    place-items: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.4rem;
    border-radius: var(--radius);
    background: var(--surface-3);
    color: var(--text-soft);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.count--bad { background: var(--danger); color: var(--on-danger); }
.count--good { background: var(--success-soft); color: var(--success); }

.row-actions { width: 1%; text-align: right; }

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    color: var(--text-soft);
}
.icon-button:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Avatars ---------- */

.avatar {
    --tint: var(--drupal);
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    background: color-mix(in srgb, var(--tint) 12%, var(--surface));
}
.avatar--sylius { --tint: var(--sylius); }
.avatar--wordpress { background: #21759b; }
.avatar--wordpress .cms-icon { color: #fff; }
.avatar--prestashop { --tint: var(--prestashop); }
.avatar--symfony { --tint: var(--symfony); }
.avatar .cms-icon { width: 18px; height: 18px; }
.avatar--lg { width: 3.5rem; height: 3.5rem; }
.avatar--lg .cms-icon { width: 28px; height: 28px; }

.cms-icon { vertical-align: -0.15em; }
.cms-icon--drupal { color: var(--drupal); }
.cms-icon--sylius { color: var(--sylius); }
.cms-icon--wordpress { color: var(--wordpress); }
.cms-icon--prestashop { color: var(--prestashop); }
.cms-icon--symfony { color: var(--symfony); }
.cms-icon__light { fill: color-mix(in srgb, currentColor 70%, white); }

/* ---------- Score ring ----------
 * The arc is a masked conic gradient, so the ring stays transparent inside
 * and follows the row hover colour.
 */

.ring {
    --size: 2.5rem;
    --thick: 5px;
    --tone: var(--skip);
    position: relative;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: var(--size);
    height: var(--size);
    color: var(--tone);
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--tone) calc(var(--value) * 1%), var(--surface-3) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - var(--thick)), #000 calc(100% - var(--thick) + 1px));
}

.ring__value { text-box: trim-both cap alphabetic; }
.ring--good  { --tone: var(--success); }
.ring--warn  { --tone: var(--warning); }
.ring--bad   { --tone: var(--danger); }
.ring--muted { color: var(--text-soft); }
.ring--lg    { --size: 4.25rem; --thick: 7px; font-size: 1.25rem; }

/* ---------- Site notes ----------
 * Read as plain text: the textarea only shows its frame on hover and focus,
 * and the buttons only once something changed (notes controller).
 */

.notes .panel__head h2 label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font: inherit; cursor: pointer; }
.notes__body { padding: 0.6rem 0.65rem 0.75rem; }
.notes__input {
    field-sizing: content;     /* grows with the text where supported; rows elsewhere */
    min-height: 2.6rem;
    max-height: 24rem;
    padding: 0.5rem 0.6rem;
    border-color: transparent;
    background: transparent;
}
.notes__input:hover { border-color: var(--border-strong); }
.notes__input:not(:focus) { resize: none; }
.notes__input::placeholder { color: var(--text-soft); }
.notes__body .form-errors { padding: 0 0.6rem; }
.notes__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 0.6rem; padding: 0 0.6rem; }
.notes__hint { margin: 0 auto 0 0; color: var(--text-soft); font-size: 0.8rem; }
.notes__text { margin: 0; padding: 0.95rem 1.25rem 1.1rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* No notes yet and nobody writing: the banner folds to its header. The field
 * stays in the page (height 0, not display: none) so the label and Tab still
 * reach it, and focusing it unfolds the banner. */
.notes__add { display: none; align-items: center; gap: 0.35rem; margin: 0; color: var(--accent); font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.notes__add .icon { width: 1rem; height: 1rem; }
.notes__add:hover { text-decoration: underline; }
.notes:not(:focus-within):has(.notes__input:placeholder-shown) .notes__add { display: inline-flex; }
.notes:not(:focus-within):has(.notes__input:placeholder-shown) .panel__head { border-bottom-color: transparent; }
.notes:not(:focus-within):has(.notes__input:placeholder-shown) .notes__body { block-size: 0; padding-block: 0; overflow: hidden; }

/* ---------- Status, pills ---------- */

.status {
    --c: var(--text-soft);
    --c-soft: var(--surface-3);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--c);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}
.status .icon {
    width: 1.25rem;
    height: 1.25rem;
    padding: 3px;
    border-radius: 50%;
    background: var(--c-soft);
    stroke-width: 3;
}
.status--good { --c: var(--success); }
.status--bad  { --c: var(--danger); }
.status--warn { --c: var(--warning); }
.status--good .icon { background: var(--success); color: var(--on-success); }
.status--bad  .icon { background: var(--danger);  color: var(--on-danger); }
.status--warn .icon { background: var(--warning); color: var(--on-warning); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.pill--good { background: var(--success); color: var(--on-success); }
.pill--bad  { background: var(--danger);  color: var(--on-danger); }
.pill--warn { background: var(--warning-soft); color: var(--warning); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 45%, transparent); }
.pill--serious { gap: 0.3rem; background: var(--serious); color: var(--on-serious); }
.pill .icon { width: 0.8rem; height: 0.8rem; stroke-width: 2.5; }
.pill--info { background: var(--accent-soft);  color: var(--accent); }
.pill--skip { background: var(--surface-3);    color: var(--text-soft); }
.pill--info { gap: 0.3rem; }

/* The site's CI: square, outlined and monospaced, so it never reads as a contract pill. */
.ci-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.08rem 0.45rem;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text);
    font: 600 0.72rem/1.4 var(--mono);
    white-space: nowrap;
}
.ci-tag .icon { width: 0.8rem; height: 0.8rem; stroke-width: 2.5; color: var(--success); }
.ci-tag--off { border-style: dashed; color: var(--text-soft); font-weight: 500; }

/* ---------- Test results ---------- */

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

.check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.check:last-child { border-bottom: 0; }

.check__icon {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
}
.check__icon .icon { width: 0.9rem; height: 0.9rem; stroke-width: 3; }
.check__icon--good { background: var(--success); color: var(--on-success); }
.check__icon--bad  { background: var(--danger);  color: var(--on-danger); }
.check:has(.check__icon--bad) {
    background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface));
    box-shadow: inset 4px 0 0 var(--danger);
}
.check__icon--warn { background: var(--warning-soft); color: var(--warning); }
.check__icon--skip { background: var(--surface-3);    color: var(--text-soft); }

.check__body { padding-top: 0.1rem; }
.check__title { font-weight: 500; }
.check__source { margin-left: 0.4rem; vertical-align: 0.05em; font-weight: 400; }
.check__help { margin-top: 0.3rem; color: var(--text-soft); font-size: 0.84rem; overflow-wrap: anywhere; }
.check__help p { margin: 0.2rem 0; }

@media (max-width: 600px) {
    .check { grid-template-columns: auto minmax(0, 1fr); }
    .check__severity { grid-column: 2; }
}

.checks-ok { border-top: 1px solid var(--border); }
.panel__head + .checks-ok { border-top: 0; }
.checks-ok > summary {
    padding: 0.75rem 1.25rem;
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
}
.checks-ok > summary:hover { color: var(--text); }
.checks-ok > .checks { border-top: 1px solid var(--border); }

.dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}
.dl dt { color: var(--text-soft); font-size: 0.84rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Alerts ---------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border: 1px solid;
    font-size: 0.92rem;
}
.alert p { margin: 0; }
.alert .icon { margin-top: 0.1rem; }
.alert--success { background: var(--success-soft); border-color: var(--success); color: var(--success); box-shadow: inset 5px 0 0 var(--success); }
.alert--danger  { background: var(--danger-soft);  border-color: var(--danger); color: var(--danger); box-shadow: inset 5px 0 0 var(--danger); }
.alert--serious { background: var(--warning-soft); border-color: var(--serious); color: var(--warning); box-shadow: inset 6px 0 0 var(--serious); }
.alert--serious .icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0;
    padding: 4px;
    border-radius: 50%;
    background: var(--serious);
    color: var(--on-serious);
    stroke-width: 2.5;
}
.alert--warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 55%, transparent); color: var(--warning); box-shadow: inset 5px 0 0 var(--warning); }

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 2.4rem;
    padding: 0 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: 600 0.9rem var(--font);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.button:hover { background: var(--surface-2); border-color: var(--control-border); }
.button .icon { width: 1rem; height: 1rem; }

.button--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.button--danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.button--danger:hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }

.button--ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.button--ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }

.button--block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* ---------- Forms ---------- */

.site-form { max-width: 56rem; }

.form-section__head { padding: 1.1rem 1.25rem 0; }

.form-section__title { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.form-section__title label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font: inherit; cursor: pointer; }
.form-section--toggle > .form-section__head { padding-bottom: 1.1rem; }
.form-section--toggle > .form-grid { border-top: 1px solid var(--border); }
.form-section--toggle .form-section__when-off,
.form-section--toggle:has(.form-section__title .switch:not(:checked)) .form-section__when-on,
.form-section--toggle:has(.form-section__title .switch:not(:checked)) > .form-grid { display: none; }
.form-section--toggle:has(.form-section__title .switch:not(:checked)) .form-section__when-off { display: inline; }
.form-section--toggle:has(.form-section__title .switch:not(:checked)) h2 { color: var(--text-soft); }
.form-section__head h2 { display: flex; align-items: center; gap: 0.5rem; }
.form-section__head h2 .icon { color: var(--text-soft); }
.form-section__head p { margin: 0.25rem 0 0; color: var(--text-soft); font-size: 0.86rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.25rem;
    padding: 1.1rem 1.25rem 0.25rem;
}
.form-grid__full { grid-column: 1 / -1; }

/* Sub-group inside a section: a rule and a small caption, so a run of switches gets structure. */
.form-grid__title {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.form-grid__title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 700px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
}

.field { margin-bottom: 1.1rem; }

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
}
label.required::after { content: " *"; color: var(--text-soft); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
select {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--control-border);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    font: 0.94rem var(--font);
}
input.mono { font-family: var(--mono); font-size: 0.86rem; }
input:focus-visible,
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

textarea {
    display: block;
    width: 100%;
    min-height: 6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--control-border);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    font: 0.94rem/1.55 var(--font);
    resize: vertical;
}
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

.field--invalid input,
.field--invalid select,
.field--invalid textarea { border-color: var(--danger); }

.help-text { margin: 0.35rem 0 0; color: var(--text-soft); font-size: 0.8rem; }

.form-errors {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--danger);
    font-size: 0.84rem;
    font-weight: 500;
}
.site-form > .form-errors { margin-bottom: 1rem; }

.field--switch { display: flex; align-items: flex-start; gap: 0.75rem; }
.field__text label { margin: 0; cursor: pointer; }
.field__text .help-text { margin-top: 0.15rem; }

.site-form:has(.basic-auth-toggle input:not(:checked)) .basic-auth-field { display: none; }

.switch {
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 2.4rem;
    height: 1.4rem;
    margin: 0;
    border-radius: 999px;
    background: var(--control-border);
    cursor: pointer;
    transition: background-color 0.15s;
}
.switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.4rem - 6px);
    height: calc(1.4rem - 6px);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
    transition: transform 0.15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::before { transform: translateX(1rem); }
.switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 999px; }

.form-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    background: linear-gradient(transparent, var(--bg) 35%);
}

/* A titled block with its single action on the right: access, deletion. */
.action-zone,
.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 56rem;
    padding: 1.1rem 1.25rem;
}
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.danger-zone h2 { color: var(--danger); }
.action-zone p,
.danger-zone p { margin: 0.25rem 0 0; color: var(--text-soft); font-size: 0.86rem; }
.action-zone form,
.danger-zone form { margin: 0; }

/* ---------- Identifiants (affichés une fois) ---------- */

.credentials { max-width: 56rem; padding: 1.1rem 1.25rem; }
.credentials + .form-actions { max-width: 56rem; }
.credentials__head h2 { display: flex; align-items: center; gap: 0.5rem; }
.credentials__head h2 .icon { color: var(--text-soft); }
.credentials__head p { margin: 0.25rem 0 0; color: var(--text-soft); font-size: 0.86rem; }
.credentials__list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.6rem 1.25rem;
    align-items: center;
    margin: 1rem 0 0;
}
.credentials__list dt { color: var(--text-soft); font-size: 0.86rem; }
.credentials__list dd { margin: 0; overflow-wrap: anywhere; }
.credentials__secret {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    user-select: all;
}

/* ---------- Login ---------- */

.login__brand { margin-bottom: 1.5rem; text-align: center; }
.login__intro { margin: 0.3rem 0 0; color: var(--text-soft); }
.login__form { margin: 0; padding: 1.5rem; }
.login__form .button { margin-top: 0.4rem; }
.login__hint { margin: 0 0 1rem; color: var(--text-soft); font-size: 0.86rem; line-height: 1.5; }
.login__form > .login__hint:last-child { margin-bottom: 0; }
.login__back { margin: 1rem 0 0; text-align: center; font-size: 0.86rem; }
.login__back a { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ---------- Utilities ---------- */

.muted { color: var(--text-soft); }
.small { font-size: 0.82rem; }
.mono  { font-family: var(--mono); font-size: 0.9em; }

/* ---------- Score history ----------
 * One series, so no legend: the card title names it. Text stays in text
 * tokens; only the line and its wash carry the chart colour.
 */

.history { padding: 1rem 1.25rem; }
.history__now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15rem 0.5rem; margin: 0 0 0.5rem; }
.history__now strong { font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.history__delta { color: var(--text-soft); font-size: 0.82rem; }

.chart { position: relative; }
.chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__svg:focus-visible { outline-offset: 4px; }

.chart__grid { stroke: var(--border); stroke-width: 1; }
.chart__axis { fill: var(--text-soft); font: 10px var(--font); font-variant-numeric: tabular-nums; }
.chart__area { fill: var(--chart-line); fill-opacity: 0.1; }
.chart__line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__end { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart__fail { stroke: var(--text-soft); stroke-width: 2; stroke-linecap: round; }
.chart__crosshair { stroke: var(--text-soft); stroke-width: 1; pointer-events: none; }

.chart__tip {
    position: absolute;
    bottom: calc(100% + 0.4rem);
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0.6rem;
    background: var(--text);
    color: var(--bg);
    font-size: 0.8rem;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
}
.chart__tip-date { opacity: 0.8; font-size: 0.74rem; }

.history__data { margin-top: 0.5rem; font-size: 0.84rem; }
.history__data summary { color: var(--text-soft); cursor: pointer; }
.history__data summary:hover { color: var(--text); }
.history__data table { margin-top: 0.5rem; border: 1px solid var(--border); }
.history__data th, .history__data td { padding: 0.35rem 0.6rem; }
