/* ==========================================================
   Crysta – App shell & dashboard
   ========================================================== */
:root {
    /* Evergreen vault */
    --c-pine: #102a23;          /* sidebar, dark surfaces */
    --c-pine-2: #1b3b32;        /* hover on pine */
    --c-leaf: #aafc75;          /* accent on pine */
    --c-primary: #2f6b1a;       /* actions, links, focus */
    --c-primary-2: #245414;     /* pressed / hover */
    --c-primary-soft: #eefbe3;
    --c-text: #102a23;
    --c-muted: #56665f;
    --c-faint: #8a9992;
    --c-bg: #f4f6f2;
    --c-surface: #ffffff;
    --c-border: #dde5da;
    --c-link: #2f6b1a;
    --c-good: #1d7f52;
    --radius: 10px;
    --radius-sm: 6px;
    --sidebar-w: 252px;
    --shadow: 0 1px 0 rgba(16, 42, 35, .04);
    --c-accent: #aafc75;
    --c-accent-2: #98ef5f;
    --c-on-accent: #102a23;
    --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--c-text);
    background: var(--c-bg);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.icon { flex: none; display: block; }
.muted { color: var(--c-muted); }
.link { color: var(--c-link); font-weight: 500; font-size: .84rem; }
.link:hover { text-decoration: underline; }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 22px 16px;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    flex: none;
    z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand__name { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav__label {
    margin: 14px 12px 6px;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-faint);
}
.nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-muted);
    font-size: .9rem;
    transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--c-bg); color: var(--c-text); }
.nav__link.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 500; }
.nav__link--btn { border: 0; background: none; cursor: pointer; text-align: left; }

.upgrade {
    position: relative;
    margin: 16px 0 10px;
    padding: 18px 16px 16px;
    border-radius: var(--radius);
    background: linear-gradient(140deg, #2f6b1a 0%, #245414 60%, #7fd34a 100%);
    color: #fff;
    overflow: hidden;
}
.upgrade::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    background: rgba(255, 255, 255, .12);
    transform: rotate(30deg);
    border-radius: 18px;
}
.upgrade__gem { margin-bottom: 8px; }
.upgrade__title { font-weight: 600; }
.upgrade__text { font-size: .78rem; opacity: .9; margin: 4px 0 12px; line-height: 1.45; }
.upgrade__btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    background: #fff;
    color: var(--c-primary);
    font-size: .8rem;
    font-weight: 600;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 72px;
    padding: 0 32px;
    background: rgba(243, 246, 244, .9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-border);
}
.topbar .topbar__menu { display: none; }

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 420px;
    height: 42px;
    padding: 0 12px 0 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    color: var(--c-faint);
    transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47, 107, 26, .14); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: .86rem; color: var(--c-text); }
.search input::placeholder { color: var(--c-faint); }
.search kbd {
    font-family: inherit;
    font-size: .7rem;
    padding: 2px 6px;
    border: 1px solid var(--c-border);
    border-radius: 5px;
    color: var(--c-faint);
}

.topbar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.btn--primary {
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2));
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(47, 107, 26, .7);
}
.btn--primary:hover { filter: brightness(1.05); }

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-muted);
    cursor: pointer;
}
.icon-btn:hover { color: var(--c-text); }
.icon-btn--sm { width: 32px; height: 32px; border-color: transparent; background: none; }
.icon-btn__dot {
    position: absolute;
    top: 10px; right: 11px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #c2412d;
    border: 2px solid var(--c-surface);
}

.avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(140deg, #aafc75, #3f8a24);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
}

/* ---------- Content ---------- */
.content { padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 22px; max-width: 1400px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head__title { font-size: 1.6rem; font-weight: 500; letter-spacing: -.015em; }
.page-head__sub { color: var(--c-muted); margin-top: 4px; }

.segmented {
    display: inline-flex;
    padding: 4px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
}
.segmented button {
    padding: 7px 14px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--c-muted);
    font-size: .8rem;
    cursor: pointer;
}
.segmented button.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 500; }

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    min-width: 0;
}
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card__title { font-size: 1rem; font-weight: 500; }
.card__sub { color: var(--c-muted); font-size: .8rem; margin-top: 2px; }

.grid { display: grid; gap: 22px; }
.grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.stat { padding: 20px 22px; }
.stat__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    margin-bottom: 14px;
}
.stat__icon--violet { background: #eefbe3; color: #2f6b1a; }
.stat__icon--cyan   { background: #e4f0ee; color: #1f6b62; }
.stat__icon--peach  { background: #f6eedc; color: #8a5a12; }
.stat__icon--pink   { background: #f7e6e3; color: #a3352b; }
.stat__label { color: var(--c-muted); font-size: .82rem; }
.stat__value { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 6px; }
.stat__note { color: var(--c-muted); font-size: .76rem; }
.trend-up { color: var(--c-good); font-weight: 500; margin-right: 2px; }

/* ---------- Bar chart (pure HTML/CSS) ---------- */
.bar-chart { position: relative; height: 250px; padding: 0 0 26px 34px; }
.bar-chart__grid {
    position: absolute;
    inset: 0 0 26px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.bar-chart__line { position: relative; border-top: 1px dashed #e3eae6; height: 0; }
.bar-chart__line:last-child { border-top: 1px solid #d3ddd8; }
.bar-chart__line span {
    position: absolute;
    right: calc(100% + 8px);
    top: -8px;
    font-size: .7rem;
    color: var(--c-faint);
}
.bar-chart__bars {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
}
.bar-chart__col {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 8px;
    outline: none;
    cursor: default;
    transition: background .15s;
}
.bar-chart__col:hover, .bar-chart__col:focus-visible { background: rgba(47, 107, 26, .05); }
.bar-chart__bar {
    width: min(38px, 55%);
    position: relative;
    border-radius: 4px 4px 0 0;
    background: #c3ec9f;
    transition: background .15s;
}
.bar-chart__col.is-today .bar-chart__bar,
.bar-chart__col:hover .bar-chart__bar,
.bar-chart__col:focus-visible .bar-chart__bar { background: linear-gradient(180deg, #3f8a24, #2f6b1a); }
.bar-chart__x {
    position: absolute;
    top: calc(100% + 8px);
    font-size: .74rem;
    color: var(--c-muted);
}
.bar-chart__col.is-today .bar-chart__x { color: var(--c-text); font-weight: 500; }
.bar-chart__tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--c-text);
    color: #fff;
    font-size: .74rem;
    line-height: 1.4;
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    z-index: 2;
}
.bar-chart__col:hover .bar-chart__tip,
.bar-chart__col:focus-visible .bar-chart__tip { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Goal card ---------- */
.goal { display: flex; flex-direction: column; }
.goal__ring { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.goal__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.goal__pct { font-size: 1.8rem; font-weight: 600; letter-spacing: -.02em; }
.goal__of { font-size: .74rem; color: var(--c-muted); }
.goal__text { text-align: center; color: var(--c-muted); font-size: .82rem; margin: 14px 0 18px; }
.streak {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 11px;
    background: #fff5ef;
}
.streak__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffe3d4;
    color: #e46c3f;
}
.streak strong { font-size: .86rem; font-weight: 600; }
.streak p { font-size: .74rem; color: var(--c-muted); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 10px 22px;
    text-align: left;
    font-size: .72rem;
    font-weight: 500;
    color: var(--c-faint);
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}
.table td { padding: 12px 22px; border-bottom: 1px solid var(--c-border); white-space: nowrap; font-size: .84rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8faf9; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { width: 1%; padding-left: 0; }
.table .empty { text-align: center; color: var(--c-muted); padding: 32px; }

.doc { display: flex; align-items: center; gap: 12px; }
.doc__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
}
.doc__title { font-weight: 500; }
.doc__type { font-size: .74rem; color: var(--c-muted); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: .74rem;
    font-weight: 500;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--draft  { background: #edf1ef; color: #56665f; }
.badge--review { background: #fff4e0; color: #b7791f; }
.badge--live   { background: #e3f3ea; color: #1d7f52; }

/* ---------- Activity feed ---------- */
.feed { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.feed__item { display: flex; gap: 12px; font-size: .84rem; line-height: 1.45; }
.feed__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-bg);
    color: var(--c-primary);
}
.feed__item strong { font-weight: 500; }
.feed__target { color: var(--c-primary); }
.feed__item time { font-size: .74rem; }

.quick { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.quick__label { font-size: .8rem; color: var(--c-muted); margin-bottom: 10px; }
.quick__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: .8rem;
    color: var(--c-muted);
    transition: border-color .15s, color .15s, background .15s;
}
.quick__item:hover { border-color: #cfeab8; color: var(--c-primary); background: #f8faf9; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--2-1 { grid-template-columns: 1fr; }
}

.scrim { display: none; }

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 0 0 40px rgba(16, 42, 35, .15);
    }
    .app.sidebar-open .sidebar { transform: none; }
    .app.sidebar-open .scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16, 42, 35, .3);
        z-index: 25;
    }
    .topbar { padding: 0 16px; gap: 10px; }
    .topbar .topbar__menu { display: grid; }
    .content { padding: 20px 16px 32px; }
    .search kbd { display: none; }
    .btn--primary span { display: none; }
    .btn--primary { padding: 0 12px; }
}

@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat { padding: 16px; }
    .stat__value { font-size: 1.4rem; }
    .topbar .icon-btn:not(.topbar__menu) { display: none; }
}

/* ==========================================================
   Admin – System health
   ========================================================== */
:root {
    --s-good: #1d7f52;      --s-good-bg: #e3f3ea;
    --s-warning: #9a6412;   --s-warning-bg: #fff2d9;
    --s-critical: #c9303e;  --s-critical-bg: #ffe8ea;
    --s-unknown: #56665f;   --s-unknown-bg: #edf1ef;
}

.nav__badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--s-critical);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    display: grid;
    place-items: center;
}

.banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: .86rem;
}
.banner--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.banner span { flex: 1; color: var(--c-text); }
.banner strong { color: var(--s-critical); font-weight: 600; }
.banner:hover { filter: brightness(.98); }

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--s-good-bg);
    color: var(--s-good);
    font-size: .86rem;
}

/* Status pill: icon + text, never colour alone */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 99px;
    font-size: .74rem;
    font-weight: 500;
    white-space: nowrap;
}
.pill--good     { background: var(--s-good-bg);     color: var(--s-good); }
.pill--warning  { background: var(--s-warning-bg);  color: var(--s-warning); }
.pill--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.pill--unknown  { background: var(--s-unknown-bg);  color: var(--s-unknown); }

/* Summary tiles */
.health-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.health-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    overflow: hidden;
    transition: transform .15s, box-shadow .2s;
}
.health-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--s-unknown-bg); }
.health-tile--good::before     { background: var(--s-good); }
.health-tile--warning::before  { background: #e0a43a; }
.health-tile--critical::before { background: var(--s-critical); }
.health-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(16, 42, 35, .25); }
.health-tile__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.health-tile__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
}
.health-tile__question { font-size: .78rem; color: var(--c-muted); line-height: 1.4; }
.health-tile__headline { font-size: .92rem; font-weight: 500; line-height: 1.35; }
.health-tile__when { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 6px; font-size: .72rem; color: var(--c-faint); }

.grid--1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }

.btn--ghost { background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-muted); }
.btn--ghost:hover { color: var(--c-primary); border-color: #cfeab8; }
.btn--sm { height: 34px; padding: 0 12px; font-size: .78rem; gap: 6px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8em; }
.small { font-size: .76rem; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--c-bg);
    color: var(--c-muted);
    font-size: .7rem;
    font-weight: 500;
    vertical-align: middle;
}
.tag--major, .tag--warning { background: var(--s-warning-bg); color: var(--s-warning); }
.tag--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.tag--good { background: var(--s-good-bg); color: var(--s-good); }

.table-wrap--flush { margin: 0 -22px; }
.table--compact th, .table--compact td { padding: 10px 12px; }
.table--compact th:first-child, .table--compact td:first-child { padding-left: 22px; }
.table--compact th:last-child, .table--compact td:last-child { padding-right: 22px; }
.table tr.is-highlight td { background: #f8faf9; }

.all-clear, .note, .empty-state {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    line-height: 1.5;
}
.all-clear { background: var(--s-good-bg); color: var(--s-good); }
.all-clear .icon { margin-top: 1px; }
.note { background: var(--c-bg); color: var(--c-muted); display: block; margin-top: 8px; }
.note--warning { background: var(--s-warning-bg); color: var(--s-warning); word-break: break-word; }
.empty-state { background: var(--c-bg); color: var(--c-muted); }

.subsection { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.subsection__title { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: .84rem; font-weight: 500; }

.link-list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .82rem; }
.link-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-list a { color: var(--c-text); display: inline-flex; align-items: center; gap: 5px; }
.link-list a:hover { color: var(--c-primary); }

.vuln-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.vuln { display: flex; align-items: flex-start; gap: 12px; }
.vuln .pill { min-width: 84px; justify-content: center; }
.vuln__title { font-size: .86rem; font-weight: 500; line-height: 1.4; }
.vuln__title a { display: inline-flex; align-items: center; gap: 5px; }
.vuln__title a:hover { color: var(--c-primary); }
.vuln__meta { font-size: .76rem; color: var(--c-muted); margin-top: 2px; line-height: 1.5; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.facts dt { font-size: .74rem; color: var(--c-muted); }
.facts dd { font-size: .9rem; font-weight: 500; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: .82rem;
}
.setting-row:last-child { border-bottom: 0; }
#deprecations .setting-row { margin-bottom: 14px; }

.log-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.log-list li { display: flex; gap: 12px; align-items: flex-start; }
.log-list__count {
    flex: none;
    min-width: 40px;
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--c-bg);
    font-size: .74rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.log-list__msg { font-size: .76rem; line-height: 1.5; word-break: break-word; }

.errors-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; }
.bar-chart--sm { height: 170px; }
.page-head .btn span { display: inline; } /* keep the label on mobile */

@media (max-width: 1300px) {
    .health-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .grid--1-1, .errors-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .health-summary { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
}

/* Deprecated code card — code scan */
#deprecations > .subsection__title { margin-bottom: 4px; }
.scan-source { margin: -4px 0 6px; }
.scan-part + .scan-part { margin-top: 14px; }
.file-hl { background: var(--c-primary-soft); color: var(--c-primary); border-radius: 4px; padding: 0 4px; }
.code-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.code-list li { padding-left: 12px; border-left: 2px solid var(--s-warning-bg); }
.code-list__where { font-size: .74rem; color: var(--c-primary); word-break: break-all; }
.code-list__msg { font-size: .82rem; line-height: 1.45; margin-top: 2px; }
.scan-part > p.muted.small { margin-top: 8px; }

/* Code review card */
.review-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.risk-group { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0 14px; margin-bottom: 10px; }
.risk-group summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 0; cursor: pointer; list-style: none; font-size: .84rem; font-weight: 500;
}
.risk-group summary::-webkit-details-marker { display: none; }
.risk-group summary::before { content: "›"; color: var(--c-faint); margin-right: 4px; transition: transform .15s; display: inline-block; }
.risk-group[open] summary::before { transform: rotate(90deg); }
.risk-group summary > span:first-of-type { flex: 1; }
.risk-group__help { margin: -4px 0 10px; }
.risk-group .code-list { margin: 0 0 12px; }
.code-list__snippet { font-size: .74rem; color: var(--c-text); background: var(--c-bg); padding: 6px 8px; border-radius: 6px; margin-top: 4px; word-break: break-all; }
.alert-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; color: var(--s-critical); }
.alert-line a { color: var(--s-critical); font-weight: 500; }
.log-list__job { font-size: .84rem; font-weight: 500; }
.fj-help { margin-top: 10px; }

/* six summary tiles: 3 × 2 */
.health-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .review-layout { grid-template-columns: 1fr; } .health-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .health-summary { grid-template-columns: 1fr; } }

/* Admin two-factor pages */
.tf-wrap { display: grid; place-items: center; min-height: calc(100vh - 200px); }
.tf-card { width: 100%; max-width: 440px; text-align: center; padding: 36px 32px; }
.tf-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
           background: var(--c-primary-soft); color: var(--c-primary); }
.tf-title { font-size: 1.3rem; font-weight: 500; margin-bottom: 8px; }
.tf-text { color: var(--c-muted); font-size: .86rem; line-height: 1.55; margin-bottom: 20px; }
.tf-qr { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--c-border); border-radius: 12px; line-height: 0; }
.tf-qr svg { width: 180px; height: 180px; }
.tf-manual { margin: 14px 0 4px; font-size: .8rem; color: var(--c-muted); }
.tf-manual summary { cursor: pointer; }
.tf-secret { margin-top: 8px; padding: 8px; background: var(--c-bg); border-radius: 8px; word-break: break-all; }
.tf-form { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; text-align: left; }
.tf-form .btn { justify-content: center; }
.tf-input {
    height: 52px; text-align: center; font-size: 1.3rem; letter-spacing: .2em;
    border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-bg); outline: none;
}
.tf-input:focus { border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 26, .14); }
.field__error { color: var(--s-critical); font-size: .78rem; }
.tf-codes { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 20px; }
.tf-codes li { padding: 8px; background: var(--c-bg); border-radius: 8px; font-size: .82rem; }
.tf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tf-foot { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Tile footer: last checked / queued / running */
.health-tile__meta { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--c-border); display: flex; flex-direction: column; gap: 4px; }
.health-tile__checked, .health-tile__failed { display: flex; align-items: flex-start; gap: 6px; font-size: .76rem; line-height: 1.4; color: var(--c-text); }
.health-tile__checked > .icon, .health-tile__failed > .icon, .health-tile__checked > .spinner { margin-top: 2px; flex: none; }
.health-tile__checked .is-warn { color: var(--s-warning); }
.health-tile__checked .muted { color: var(--c-faint); }
.health-tile__failed { color: var(--s-critical); cursor: help; }
.health-tile__meta .health-tile__when { margin-top: 0; padding-top: 0; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c-primary-soft); border-top-color: var(--c-primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ==========================================================
   Detail & list pages (errors, findings)
   ========================================================== */
.back-link { font-size: .82rem; color: var(--c-muted); margin-bottom: -10px; }
.back-link:hover { color: var(--c-primary); }
.detail-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 900px; }
.detail-head__title { font-size: 1.35rem; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; word-break: break-word; }
.detail-head__sub { font-size: .8rem; color: var(--c-muted); word-break: break-all; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.filter-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    padding: 6px 12px; border-radius: 99px; border: 1px solid var(--c-border); background: var(--c-surface);
    font-size: .78rem; color: var(--c-muted);
}
.chip:hover { border-color: #cfeab8; color: var(--c-primary); }
.chip.is-active { background: var(--c-primary-soft); border-color: transparent; color: var(--c-primary); font-weight: 500; }
.chip__n { margin-left: 4px; padding: 0 6px; border-radius: 99px; background: rgba(47, 107, 26, .12); font-size: .7rem; }
.segmented a { padding: 7px 14px; border-radius: 7px; color: var(--c-muted); font-size: .8rem; }
.segmented a.is-active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 500; }

.card--flush { padding: 0; overflow: hidden; }
.table td.wrap { white-space: normal; word-break: break-word; max-width: 640px; }
.row-links tbody tr { cursor: pointer; }
.row-link { color: var(--c-text); font-size: .8rem; line-height: 1.5; }
.row-links tbody tr:hover .row-link { color: var(--c-primary); }

.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat__value--sm { font-size: 1.15rem; }

/* code context */
.code-block { border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; }
.code-block__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px;
                    background: var(--c-bg); border-bottom: 1px solid var(--c-border); font-size: .74rem; word-break: break-all; }
.code-block__body { margin: 0; padding: 8px 0; overflow-x: auto; background: #f8faf9;
                    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; line-height: 1.65; }
.code-line { display: flex; white-space: pre; }
.code-line__n { flex: none; width: 52px; padding-right: 14px; text-align: right; color: var(--c-faint); user-select: none; }
.code-line__t { padding-right: 16px; }
.code-line.is-hit { background: #fff1d6; box-shadow: inset 3px 0 0 #e0a43a; }
.code-line.is-hit .code-line__n { color: var(--s-warning); font-weight: 600; }
.where-line { font-size: .78rem; margin-bottom: 10px; word-break: break-all; }

/* stack trace */
.trace { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.trace__frame { display: flex; gap: 12px; padding: 8px 10px; border-radius: 8px; }
.trace__frame.is-app { background: #f2fbea; box-shadow: inset 3px 0 0 var(--c-primary); }
.trace__frame--throw { background: var(--s-critical-bg); }
.trace__n { flex: none; width: 26px; text-align: right; font-size: .72rem; color: var(--c-faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.trace__file { font-size: .76rem; word-break: break-all; }
.trace__frame.is-app .trace__file { color: var(--c-primary); font-weight: 600; }
.trace__call { font-size: .74rem; color: var(--c-muted); word-break: break-all; }
.trace__fold details { padding: 4px 10px 4px 48px; }
.trace__fold summary { cursor: pointer; font-size: .74rem; color: var(--c-faint); padding: 4px 0; }
.trace__fold .trace { margin: 6px 0 6px -38px; }

/* occurrences */
.occurrences { list-style: none; display: flex; flex-direction: column; }
.occurrences li { padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.occurrences li:last-child { border-bottom: 0; }
.occurrences li.is-current .occurrences__time { color: var(--c-primary); }
.occurrences__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.occurrences__time { font-size: .84rem; font-weight: 500; }
.occurrences details summary { cursor: pointer; color: var(--c-muted); margin-top: 6px; }
.raw-log { margin-top: 8px; padding: 12px; max-height: 420px; overflow: auto; background: #102a23; color: #e1e8e4;
           border-radius: 8px; font-size: .72rem; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }

/* findings */
.finding-msg { font-size: .9rem; line-height: 1.5; }
.guide-text { font-size: .84rem; line-height: 1.6; color: var(--c-text); }
.example { margin: 6px 0 12px; padding: 10px 12px; background: var(--c-bg); border-radius: 8px; overflow-x: auto;
           font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; line-height: 1.6; white-space: pre-wrap; }
.example-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 10px; }
.example-label--bad { color: var(--s-critical); }
.example-label--good { color: var(--s-good); }

/* links inside cards */
.code-list__item { display: block; border-radius: 6px; }
.code-list__item:hover .code-list__where { text-decoration: underline; }
.code-list__go { float: right; font-family: Poppins, sans-serif; font-size: .7rem; color: var(--c-faint); }
.code-list__item:hover .code-list__go { color: var(--c-primary); }
.log-list__link { display: block; color: var(--c-text); }
.log-list__link:hover { color: var(--c-primary); text-decoration: underline; }
.subsection__title--link { justify-content: space-between; }

@media (max-width: 1100px) { .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--top { align-items: start; }
.hint { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: #f2fbea; color: var(--c-primary); }
.hint strong { display: block; font-size: .8rem; font-weight: 600; }
.hint p { color: var(--c-text); font-size: .82rem; line-height: 1.55; margin-top: 2px; }
.hint .icon { margin-top: 2px; flex: none; }
.table--findings { table-layout: fixed; }
.table--findings th:nth-child(1) { width: 150px; }
.table--findings th:nth-child(2) { width: 30%; }
.table--findings th:nth-child(4) { width: 170px; }
.table--findings th:nth-child(5) { width: 56px; }
.table--findings td { white-space: normal; vertical-align: top; }
.table--findings .row-link .mono { font-size: .76rem; }
.group-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: .72rem; color: var(--c-muted); }
.group-meta span + span::before { content: "·"; margin-right: 10px; color: var(--c-faint); }
.group-meta .mono { font-size: .7rem; }
.sched-ok { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--s-good); }
.banner--warning { background: var(--s-warning-bg); color: var(--s-warning); align-items: flex-start; }
.banner--warning > div { flex: 1; color: var(--c-text); font-size: .84rem; line-height: 1.55; }
.banner--warning strong { color: var(--s-warning); }
.banner__more { margin-top: 6px; }
.banner__more summary { cursor: pointer; color: var(--s-warning); font-weight: 500; }
.banner__more ul { margin: 8px 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
.banner__more .mono { background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; }
.tracker-link { display: inline-block; margin-top: 4px; }

/* ---------- Error fix tracking ---------- */
.count-badge {
    display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px;
    background: var(--c-bg); color: var(--c-muted); font-size: .7rem; font-weight: 500; text-align: center;
}
.segmented a.is-active .count-badge { background: var(--c-surface); color: var(--c-primary); }
.chips__gap { width: 10px; }
.stat__value.is-critical { color: var(--s-critical); }
.stat__value.is-good { color: var(--s-good); }
.table .is-critical { color: var(--s-critical); }
.block { display: block; }
.table--errors td { vertical-align: top; }
.table--errors td:first-child { width: 1%; }
.table--errors .actions form { margin: 0; }
.fix-note { margin-top: 4px; font-size: .78rem; color: var(--c-muted); font-style: italic; word-break: break-word; }
.tag--lg { padding: 4px 10px; font-size: .76rem; }

.status-panel { border-left: 3px solid var(--c-border); }
.status-panel--critical { border-left-color: var(--s-critical); }
.status-panel--warning  { border-left-color: var(--s-warning); }
.status-panel--good     { border-left-color: var(--s-good); }
.fix-form { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.fix-form .field__label { font-size: .8rem; font-weight: 500; }
.fix-form .field__input {
    width: 100%; padding: 9px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    font: inherit; font-size: .84rem; resize: vertical; background: var(--c-surface); color: var(--c-text);
}
.fix-form .field__input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.fix-form__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.timeline { list-style: none; margin: 0 0 10px; padding: 0; }
.timeline__item { position: relative; display: flex; gap: 12px; padding: 0 0 14px 2px; }
.timeline__item:not(:last-child)::before {
    content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--c-border);
}
.timeline__dot {
    flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%;
    border: 2px solid var(--c-surface); box-shadow: 0 0 0 1px var(--c-border); background: var(--c-faint, #c2cec8);
}
.timeline__item--good .timeline__dot     { background: var(--s-good); }
.timeline__item--critical .timeline__dot { background: var(--s-critical); }
.timeline__item--warning .timeline__dot  { background: var(--s-warning); }
.timeline__title { font-size: .84rem; font-weight: 500; }
.log-list__state { margin-right: 4px; }
.head-tags { display: flex; gap: 6px; align-items: center; }
@media (max-width: 700px) {
    .table--errors thead { display: none; }
    .table--errors tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
    .table--errors tbody tr:last-child { border-bottom: 0; }
    .table--errors td { display: block !important; padding: 0 !important; border: 0 !important; white-space: normal; width: auto !important; }
    .table--errors td:first-child, .table--errors td.wrap { grid-column: 1 / -1; max-width: none; }
    .table--errors td.num { text-align: left; }
    .table--errors .row-link.mono { word-break: break-word; }
}

/* ==========================================================
   Hub – websites and accounts
   ========================================================== */
.hub-tabs { margin-right: 4px; }
.site-name { font-weight: 500; }
.table--sites td { vertical-align: middle; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.select-all { user-select: all; word-break: break-all; }

.empty-hub { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 22px; text-align: center; color: var(--c-muted); }
.empty-hub h2 { color: var(--c-text); font-size: 1.05rem; font-weight: 500; }
.empty-hub p { max-width: 420px; font-size: .86rem; }

.form-card { max-width: 640px; }
.form-stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.form-stack .field { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.form-stack .field__input { width: 100%; }
.field__label { font-size: .8rem; font-weight: 500; }
.field__help { font-size: .74rem; color: var(--c-muted); }
.field__input {
    padding: 9px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    font: inherit; font-size: .86rem; background: var(--c-surface); color: var(--c-text); min-height: 40px;
}
.field__input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.field__input--sm { min-height: 32px; padding: 4px 8px; font-size: .8rem; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }

.add-member__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .add-member__row { grid-template-columns: 1fr; } }

.key-card { border: 1px solid #cfeab8; background: #f8faf9; }
.env-block {
    margin: 0 0 10px; padding: 14px 16px; border-radius: var(--radius-sm); background: #102a23; color: #e1e8e4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.7;
    overflow-x: auto; white-space: pre; user-select: all;
}
.key-form { margin-top: 14px; }

.banner--static { background: var(--s-critical-bg); color: var(--s-critical); }
.banner--static:hover { filter: none; }
.flash--error { background: var(--s-critical-bg); color: var(--s-critical); }

.steps__list { margin: 0 0 12px 18px; display: flex; flex-direction: column; gap: 8px; font-size: .86rem; }

.danger-zone { border: 1px solid var(--s-critical-bg); }
.danger-zone .field__input { width: 100%; }
.btn--danger { background: var(--s-critical); color: #fff; border: 0; }
.btn--danger:hover { filter: brightness(1.05); }
@media (max-width: 700px) {
    .table--sites thead { display: none; }
    .table--sites tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
    .table--sites tbody tr:last-child { border-bottom: 0; }
    .table--sites td { display: block !important; padding: 0 !important; border: 0 !important; white-space: normal; }
    .table--sites td.wrap { flex: 1 1 calc(100% - 40px); max-width: none; }
    .table--sites td.actions { order: -1; margin-left: auto; position: absolute; right: 18px; }
    .table--sites tr { position: relative; }
    .table--sites td:nth-child(2) { flex-basis: 100%; font-size: .78rem; }
    .table--sites td:nth-child(4)::before { content: "Laravel "; font-family: inherit; color: var(--c-muted); }
    .table--sites td:nth-child(5)::before { content: "PHP "; font-family: inherit; color: var(--c-muted); }
    .table--sites td:nth-child(6) { flex-basis: 100%; font-size: .76rem; }
}

/* ==========================================================
   Layout v2 – monitoring app
   ========================================================== */
.nav__badge--soft { background: var(--c-primary-soft); color: var(--c-primary); }
.topbar__spacer { flex: 1; }

.privacy-card {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 12px 0 8px; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--c-bg); color: var(--c-muted); font-size: .74rem; line-height: 1.45;
}
.privacy-card .icon { flex: none; color: var(--c-primary); margin-top: 1px; }
.privacy-card strong { color: var(--c-text); font-weight: 500; }

/* Dropdowns (bell, account menu) built on <details> so they work without JavaScript */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.dropdown__panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
    width: 260px; padding: 6px; border-radius: 12px;
    background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: 0 12px 40px -12px rgba(16, 42, 35, .25);
}
.dropdown__panel--wide { width: 340px; }
.dropdown__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: .86rem; }
.dropdown__head form { margin: 0; }
.dropdown__head button { border: 0; background: none; cursor: pointer; padding: 0; }
.dropdown__me { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 10px 12px; border-bottom: 1px solid var(--c-border); margin-bottom: 4px; }
.dropdown__me strong { font-weight: 500; font-size: .9rem; }
.dropdown__item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
    border: 0; background: none; color: var(--c-text); font: inherit; font-size: .86rem; text-align: left; cursor: pointer;
}
.dropdown__item:hover { background: var(--c-bg); }
.dropdown__item .icon { color: var(--c-muted); }
.dropdown form { margin: 0; }
.dropdown__note { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; }
.dropdown__note:hover { background: var(--c-bg); }
.dropdown__note > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dropdown__note-title { font-size: .82rem; line-height: 1.35; }
.dropdown__note.is-unread .dropdown__note-title { font-weight: 500; }
.dropdown__empty { padding: 10px; }
.dropdown__foot { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--c-border); text-align: center; font-size: .8rem; color: var(--c-primary); font-weight: 500; }
summary.avatar { border: 0; }
.icon-btn__count {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 99px; border: 2px solid var(--c-surface); background: var(--s-critical); color: #fff;
    font-size: .62rem; font-weight: 600; display: grid; place-items: center;
}
@media (max-width: 560px) {
    .topbar .dropdown .icon-btn { display: grid; }
    .dropdown__panel--wide { width: min(340px, calc(100vw - 32px)); right: -52px; }
}

/* Notifications list */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list__item { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 22px; border-bottom: 1px solid var(--c-border); }
.note-list__item:last-child { border-bottom: 0; }
.note-list__item.is-unread { background: #f8faf9; }
.note-list__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c-bg); color: var(--c-muted); }
.dropdown .note-list__icon { width: 28px; height: 28px; border-radius: 8px; }
.note-list__icon--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.note-list__icon--good { background: var(--s-good-bg); color: var(--s-good); }
.note-list__icon--info { background: var(--c-primary-soft); color: var(--c-primary); }
.note-list__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.note-list__title { font-size: .9rem; color: var(--c-text); }
.note-list__item.is-unread .note-list__title { font-weight: 500; }
.note-list__body:hover .note-list__title { color: var(--c-primary); }
.note-list__text { font-size: .82rem; color: var(--c-muted); }
.note-list__time { font-size: .74rem; color: var(--c-faint); }
.note-list__dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--c-primary); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* Dashboard */
.stat__note .is-critical { color: var(--s-critical); font-weight: 500; }
.welcome-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 640px; }
.welcome-card > .icon { color: var(--c-primary); }
.welcome-card h2 { font-size: 1.1rem; font-weight: 500; }
.welcome-card p { color: var(--c-muted); font-size: .9rem; }

.attention-list { list-style: none; margin: 0 0 6px; padding: 0; }
.attention-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--c-border); }
.attention-list li:last-child { border-bottom: 0; }
.attention-list__mark { width: 4px; height: 32px; border-radius: 4px; background: var(--c-border); }
.attention-list__mark--critical { background: var(--s-critical); }
.attention-list__mark--warning { background: #e0a43a; }
.attention-list__site { font-size: .88rem; font-weight: 500; color: var(--c-text); }
.attention-list__site:hover { color: var(--c-primary); }
.attention-list__text { font-size: .8rem; color: var(--c-muted); margin-top: 1px; }

.bar-chart--dense .bar-chart__bars { gap: 4px; }
.bar-chart--dense .bar-chart__x { font-size: .66rem; }

.user-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.user-bars li { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 72px 110px; gap: 12px; align-items: center; }
.user-bars__name { font-size: .85rem; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-bars__name:hover { color: var(--c-primary); }
.user-bars__track { height: 10px; border-radius: 0 4px 4px 0; background: var(--c-bg); overflow: hidden; }
.user-bars__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--c-primary); }
.user-bars__value { font-size: .85rem; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.user-bars__new { font-size: .74rem; color: var(--s-good); }
@media (max-width: 700px) {
    .user-bars li { grid-template-columns: minmax(0, 1fr) auto; }
    .user-bars__track { grid-column: 1 / -1; order: 3; }
    .user-bars__new { grid-column: 1 / -1; order: 4; }
}

.mini-note { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.mini-note:last-child { border-bottom: 0; }
.mini-note > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mini-note__title { font-size: .82rem; color: var(--c-text); line-height: 1.35; }
.mini-note.is-unread .mini-note__title { font-weight: 500; }
.mini-note:hover .mini-note__title { color: var(--c-primary); }
.mini-note .note-list__icon { width: 28px; height: 28px; border-radius: 8px; }

/* Profile & account information */
.profile-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-hero__avatar {
    display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
    background: linear-gradient(140deg, #aafc75, #3f8a24); color: #fff; font-size: 1.6rem; font-weight: 600;
}
.profile-hero__who { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.profile-hero__name { font-size: 1.4rem; font-weight: 500; letter-spacing: -.01em; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: start; }

/* Website errors */
.error-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 260px;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-muted); }
.error-search input { flex: 1; border: 0; outline: none; background: none; font: inherit; font-size: .86rem; color: var(--c-text); }
.error-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.error-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.error-filters .field__input--sm { min-width: 140px; }
.count-badge--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.table--site-errors td:nth-child(3) { min-width: 140px; }
.sidebar .nav { padding-bottom: 6px; }
@media (max-width: 700px) {
    .error-search { min-width: 0; width: 100%; }
    .table--site-errors td:nth-child(3) { flex-basis: 100%; }
}
/* Taller menu: let the whole sidebar scroll instead of clipping, and drop the privacy card on short screens */
.sidebar { overflow-y: auto; }
.sidebar .nav { flex: 1 0 auto; overflow: visible; }
.nav__label { margin-top: 12px; }
@media (max-height: 940px) { .privacy-card { display: none; } }

/* Website tabs */
.site-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-border); overflow-x: auto; }
.site-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent;
    color: var(--c-muted); font-size: .88rem; white-space: nowrap; }
.site-tabs a:hover { color: var(--c-text); }
.site-tabs a.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 500; }
.link-title { color: inherit; border-bottom: 1px dashed var(--c-border); }
.link-title:hover { color: var(--c-primary); }
.stat__of { font-size: 1rem; color: var(--c-faint); font-weight: 500; }

/* Activity log */
.logs-card { overflow: visible; }
.logs-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--c-border); }
.logs-toolbar__left, .logs-toolbar__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logs-filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--c-bg); color: var(--c-muted); font-size: .76rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--c-border); transition: background .15s; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--c-primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .5; }
.table-scroll { overflow-x: auto; }
.log-table td { vertical-align: top; font-size: .82rem; }
.log-row__time { white-space: nowrap; color: var(--c-muted); }
.log-row__event { font-weight: 500; white-space: nowrap; }
.log-row__actor { color: var(--c-muted); white-space: nowrap; }
.log-row__msg { min-width: 320px; max-width: 720px; color: var(--c-text); }
.log-row__msg summary { cursor: pointer; list-style: none; }
.log-row__msg summary::-webkit-details-marker { display: none; }
.log-row__msg details[open] summary { display: none; }
.log-row.is-fresh td { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: var(--c-primary-soft); } to { background: transparent; } }
.sev { display: inline-block; min-width: 68px; padding: 2px 8px; border-radius: 6px; font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-align: center; }
.sev--info { background: var(--c-bg); color: var(--c-muted); }
.sev--notice { background: var(--c-primary-soft); color: var(--c-primary); }
.sev--warning { background: var(--s-warning-bg); color: var(--s-warning); }
.sev--error { background: var(--s-critical-bg); color: var(--s-critical); }
.sev--critical { background: var(--s-critical); color: #fff; }
.log-row--critical td:first-child { box-shadow: inset 3px 0 0 var(--s-critical); }
@media (prefers-reduced-motion: reduce) { .log-row.is-fresh td { animation: none; } .switch__thumb { transition: none; } }

/* Security measures */
.measures-head { padding: 22px 22px 0; margin-bottom: 4px; }
.measures-group { padding: 16px 22px 6px; font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--c-faint); }
.measures { list-style: none; margin: 0; padding: 0; }
.measure { border-top: 1px solid var(--c-border); }
.measure summary { display: grid; grid-template-columns: 150px minmax(180px, 1fr) minmax(0, 1.3fr) auto; gap: 14px; align-items: center; padding: 13px 22px; cursor: pointer; list-style: none; }
.measure summary::-webkit-details-marker { display: none; }
.measure summary:hover { background: #f8faf9; }
.measure__title { font-size: .88rem; font-weight: 500; }
.measure__detail { font-size: .8rem; color: var(--c-muted); }
.measure--fail { box-shadow: inset 3px 0 0 var(--s-critical); }
.measure--warn { box-shadow: inset 3px 0 0 #e0a43a; }
.measure__body { padding: 4px 22px 18px 186px; display: flex; flex-direction: column; gap: 10px; font-size: .84rem; color: var(--c-muted); }
.measure__body strong { color: var(--c-text); font-weight: 500; }
.snippet { position: relative; }
.snippet pre { margin: 0; padding: 12px 14px; padding-right: 90px; border-radius: var(--radius-sm); background: #102a23; color: #e1e8e4; font-size: .78rem; overflow-x: auto; }
.snippet .btn { position: absolute; top: 8px; right: 8px; background: #1b2b24; border-color: #22342c; color: #c7d3cd; }
.accept-form { display: flex; gap: 8px; flex-wrap: wrap; }
.accept-form .field__input { flex: 1; min-width: 220px; }
@media (max-width: 900px) {
    .measure summary { grid-template-columns: 1fr; gap: 6px; }
    .measure__body { padding-left: 22px; }
}

/* ---------- Score, grade, trend, SEO, report ---------- */
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--2 { grid-template-columns: 1fr; } }
.card__head--tight { margin-bottom: 12px; }
.mt { margin-top: 12px; }
.inline-icon { display: inline-block; vertical-align: -3px; color: var(--s-good); }
.stat__note .is-good { color: var(--s-good); }
.stat__note .is-critical { color: var(--s-critical); }

.grade { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 700; font-size: .85rem; flex: none; }
.grade--lg { width: 76px; height: 76px; border-radius: 18px; font-size: 2.2rem; }
.grade--good { background: var(--s-good-bg); color: var(--s-good); }
.grade--warning { background: var(--s-warning-bg); color: var(--s-warning); }
.grade--critical { background: var(--s-critical-bg); color: var(--s-critical); }
.grade--unknown { background: var(--s-unknown-bg); color: var(--s-unknown); }

.score-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 22px; }
@media (max-width: 900px) { .score-row { grid-template-columns: 1fr; } }
.score-card { display: flex; gap: 20px; align-items: center; }
.score-card__value { font-size: 2.1rem; font-weight: 600; line-height: 1.1; margin: 2px 0 6px; }
.score-card__value span { font-size: .9rem; color: var(--c-muted); font-weight: 500; margin-left: 4px; }

.trend { position: relative; }
.trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend__grid { stroke: var(--c-border); stroke-width: 1; }
.trend__axis { fill: var(--c-muted); font-size: 11px; }
.trend__line { fill: none; stroke: var(--c-primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend__dot { fill: var(--c-primary); stroke: var(--c-surface); stroke-width: 2; }
.trend__dot.is-on { r: 6; }
.trend__cross { stroke: var(--c-faint); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.trend.is-hover .trend__cross { opacity: 1; }
.trend__tip[hidden] { display: none; }
.trend__tip { position: absolute; transform: translate(-50%, -100%); background: var(--c-text); color: #fff; padding: 6px 10px; border-radius: 8px;
    font-size: .74rem; line-height: 1.4; display: flex; flex-direction: column; pointer-events: none; white-space: nowrap; }
.trend__tip span { opacity: .8; }
.trend-empty { padding: 30px 0; text-align: center; }

.change-list, .owasp-list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .86rem; }
.change-list .muted { display: block; margin-top: 2px; font-size: .8rem; }
.owasp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 24px; }
.owasp-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.sub-list { margin-top: 8px; }
.sub-list ul { list-style: none; margin-top: 6px; columns: 2; }
.token-reveal { display: flex; gap: 8px; align-items: center; background: var(--s-good-bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; }
.token-reveal code { flex: 1; word-break: break-all; font-size: .82rem; }

/* Printable report */
.report { max-width: 900px; margin: 0 auto; padding: 32px 28px 60px; background: var(--c-surface); }
.report__head { display: flex; gap: 20px; align-items: center; border-bottom: 2px solid var(--c-text); padding-bottom: 18px; margin-bottom: 22px; }
.report__head h1 { font-size: 1.4rem; }
.report__bar { max-width: 900px; margin: 16px auto 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0 28px; }
.report h2 { font-size: 1rem; margin: 26px 0 10px; }
.report table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.report th, .report td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.report .st { font-weight: 600; white-space: nowrap; }
.report .st--fail { color: var(--s-critical); } .report .st--warn { color: var(--s-warning); } .report .st--pass { color: var(--s-good); }
.report .st--unknown, .report .st--accepted { color: var(--s-unknown); }
@media print {
    .report__bar, .no-print { display: none !important; }
    body { background: #fff; }
    .report { padding: 0; max-width: none; }
    .report tr { break-inside: avoid; }
}
.measure__row { display: grid; grid-template-columns: 150px minmax(180px, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: center; padding: 13px 22px; }
@media (max-width: 760px) { .measure__row { grid-template-columns: 1fr; gap: 6px; } }
.report__snippet { margin-top: 6px; padding: 6px 8px; background: var(--c-bg); border-radius: 6px; font-size: .72rem; white-space: pre-wrap; word-break: break-all; }

/* ---------- Public pages (website check) ---------- */
.public { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1100px 520px at 85% -10%, #eefbe3 0%, transparent 60%), var(--c-bg); }
.public__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; width: 100%; margin: 0 auto; padding: 20px 24px; }
.public__nav .brand { padding: 0; }
.public__link { padding: 8px 12px; color: var(--c-muted); font-size: .88rem; }
.public__link:hover { color: var(--c-primary); }
.public__main { flex: 1; max-width: 1160px; width: 100%; margin: 0 auto; padding: 12px 24px 48px; display: flex; flex-direction: column; gap: 22px; }
.public__foot { max-width: 1160px; width: 100%; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--c-faint); font-size: .76rem; border-top: 1px solid var(--c-border); }
.scan-hero { text-align: center; padding: 48px 0 12px; }
.hero-chip { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-muted); font-size: .78rem; }
.hero-chip .icon { color: var(--c-primary); }
.scan-hero__title { margin: 18px 0 12px; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.scan-hero__lead { max-width: 620px; margin: 0 auto; color: var(--c-muted); font-size: 1.02rem; line-height: 1.6; }
.scan-form { max-width: 640px; margin: 30px auto 0; text-align: left; }
.scan-form__row { display: flex; gap: 10px; }
.scan-form__input { flex: 1; height: 54px; font-size: 1.02rem; padding: 0 18px; }
.scan-form__btn { height: 54px; padding: 0 22px; }
.scan-form__consent { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: .84rem; color: var(--c-muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.scan-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.scan-points .card__title { margin-bottom: 6px; }
.scan-wait { display: flex; gap: 18px; align-items: center; padding: 28px; }
.scan-cta { padding: 14px; border-radius: var(--radius-sm); background: var(--c-primary-soft); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
@media (max-width: 760px) {
    .scan-form__row { flex-direction: column; }
    .scan-points { grid-template-columns: 1fr; }
}
.scan-wait .spinner { width: 28px; height: 28px; border-width: 3px; flex: none; }

/* ==========================================================
   Evergreen vault: shell and component overrides
   ========================================================== */
body { font-size: 14.5px; font-feature-settings: "tnum" 1; }
h1, h2, h3, .page-head__title, .card__title { letter-spacing: -.012em; }
.page-head__title { font-weight: 700; font-size: 1.55rem; }
.card__title { font-weight: 600; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* Sidebar: deep pine */
.sidebar { background: var(--c-pine); border-right: 0; color: #d6e4dc; }
.sidebar .brand__name { color: #fff; font-weight: 700; letter-spacing: -.02em; }
.nav__label { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; color: #7f9a8d; margin: 18px 12px 6px; }
.nav__link { color: #c3d4cb; border-radius: var(--radius-sm); position: relative; }
.nav__link .icon { color: #8fb3a1; }
.nav__link:hover { background: var(--c-pine-2); color: #fff; }
.nav__link:hover .icon { color: var(--c-leaf); }
.nav__link.is-active { background: var(--c-pine-2); color: #fff; font-weight: 600; }
.nav__link.is-active .icon { color: var(--c-leaf); }
.nav__link.is-active::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-leaf); }
.sidebar .count-badge { background: rgba(255, 255, 255, .1); color: #e3eee8; }
.sidebar .count-badge--critical { background: #b4322a; color: #fff; }
.privacy-card { background: rgba(255, 255, 255, .06); color: #a9c0b4; border: 1px solid rgba(255, 255, 255, .08); }
.privacy-card .icon { color: var(--c-leaf); }
.privacy-card strong { color: #fff; }
.sidebar .nav__link--btn { color: #a9c0b4; }

/* Top bar */
.topbar { background: rgba(243, 246, 244, .92); }
.search { border-radius: var(--radius-sm); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(47, 107, 26, .15); }

/* Buttons: solid, no gradients */
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn--primary { background: var(--c-primary); box-shadow: none; }
.btn--primary:hover { background: var(--c-primary-2); filter: none; }
.btn--ghost { border-radius: var(--radius-sm); }
.icon-btn { border-radius: var(--radius-sm); }
.avatar { background: var(--c-primary); color: #fff; }
.upgrade { background: var(--c-pine-2); }
.upgrade__btn { color: var(--c-primary); }

/* Cards and tables */
.card { box-shadow: var(--shadow); }
.table th { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; color: var(--c-muted); background: #f8faf9; }
.measures-group { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; color: var(--c-muted); }
.example-label { text-transform: none; letter-spacing: 0; }
.segmented, .segmented button { border-radius: var(--radius-sm); }
.segmented button.is-active { background: var(--c-pine); color: #fff; }
.segmented a.is-active .count-badge { color: var(--c-pine); }
.stat__value, .score-card__value { font-weight: 700; letter-spacing: -.02em; }

/* Grade: a shield seal */
.grade { border-radius: 0; clip-path: polygon(50% 0, 100% 14%, 100% 58%, 50% 100%, 0 58%, 0 14%); width: 28px; height: 32px; padding-bottom: 3px; }
.grade--lg { width: 78px; height: 90px; font-size: 2.3rem; padding-bottom: 8px; }
.grade--good { background: var(--c-pine); color: var(--c-leaf); }
.grade--warning { background: #f4e2b8; color: #7a4e0c; }
.grade--critical { background: #b4322a; color: #fff; }
.grade--unknown { background: #e1e8e4; color: var(--c-muted); }

/* Trend */
.trend__line { stroke: var(--c-primary); }
.trend__dot { fill: var(--c-primary); }
.trend__tip { background: var(--c-pine); }

/* Public pages: no washes */
.public { background: var(--c-bg); }
.scan-hero__title { font-weight: 800; letter-spacing: -.035em; }
.scan-cta { background: var(--c-primary-soft); border: 1px solid #d4f0bd; }
.hero-chip { border-radius: var(--radius-sm); }

/* The security seal (logo motif, auth and welcome pages) */
.seal { display: block; width: 100%; height: auto; color: var(--c-leaf); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.stat__icon { border-radius: 8px; }
.bar-chart__col.is-today .bar-chart__bar, .bar-chart__col:hover .bar-chart__bar, .bar-chart__col:focus-visible .bar-chart__bar { background: var(--c-primary); }

/* Lime on deep green (Wenance-style pairing) */
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-2); }
.btn--primary .icon { color: var(--c-on-accent); }
.avatar { background: var(--c-accent); color: var(--c-on-accent); }
.topbar { background: rgba(244, 246, 242, .92); }
.segmented button.is-active { background: var(--c-pine); color: var(--c-accent); }
.site-tabs a.is-active { color: var(--c-text); border-bottom-color: var(--c-pine); }
.site-tabs a.is-active .icon { color: var(--c-primary); }
.grade--good { background: var(--c-pine); color: var(--c-accent); }
.trend__line { stroke: var(--c-pine); }
.trend__dot { fill: var(--c-pine); stroke: var(--c-accent); }
.trend__tip { background: var(--c-pine); color: #fff; }
.trend__tip strong { color: var(--c-accent); }
.scan-cta { background: var(--c-pine); color: #d9e6df; border: 0; }
.scan-cta strong { color: var(--c-accent); }
.hero-chip .icon { color: var(--c-primary); }
::selection { background: var(--c-accent); color: var(--c-on-accent); }

/* ==========================================================
   Crystal: clear glass over floating crystals
   ========================================================== */
body { background: linear-gradient(160deg, #f6fbf2 0%, #eef5ec 50%, #e7f2ea 100%) fixed; }
.app, .public__nav, .public__main, .public__foot { position: relative; z-index: 1; }
.app-crystals { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .55; }
.crystals .shape { position: absolute; display: block; animation: drift 16s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(16, 42, 35, .1)); }
.crystals .shape polygon:first-child { fill-opacity: .8; }
.crystals .dots { position: absolute; width: 130px; height: 110px; background-image: radial-gradient(#9fc2ae 1.2px, transparent 1.3px); background-size: 14px 14px; }
.app-crystals .shape--gem     { width: 190px; top: -70px; right: 14%; }
.app-crystals .shape--shard   { width: 140px; top: 22%; right: -40px; animation-delay: -6s; }
.app-crystals .shape--chip    { width: 52px;  top: 46%; right: 9%; animation-duration: 11s; }
.app-crystals .shape--hex     { width: 220px; bottom: -80px; right: 26%; animation-delay: -2s; }
.app-crystals .shape--tri     { width: 110px; bottom: 12%; right: 3%; animation-delay: -3s; }
.app-crystals .shape--prism   { width: 130px; bottom: -50px; left: calc(var(--sidebar-w) + 30px); animation-delay: -4s; }
.app-crystals .shape--halfhex { width: 170px; top: 10%; left: calc(var(--sidebar-w) + 38%); animation-delay: -8s; opacity: .7; }
.app-crystals .dots           { top: 60%; right: 18%; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

/* Glass surfaces */
.card, .stat, .table-scroll, .hero-chip, .note {
    background: rgba(255, 255, 255, .74);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-color: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 14px 34px -24px rgba(16, 42, 35, .28);
}
.card .card, .card .stat, .card .table-scroll { background: rgba(255, 255, 255, .6); box-shadow: none; }
.topbar { background: rgba(246, 251, 242, .6); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.table th { background: rgba(244, 248, 241, .7); }
.field__input, .search { background: rgba(255, 255, 255, .8); }

/* Sidebar: deep green glass with a crystal sheen */
.sidebar { background: linear-gradient(170deg, #143a2f 0%, #102a23 45%, #0d241e 100%); }
.privacy-card { background: rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* Lime buttons with a crystal sheen */
.btn--primary { background: linear-gradient(180deg, #c8ff9f 0%, #aafc75 55%, #9cf266 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 8px 18px -10px rgba(47, 107, 26, .6); }
.btn--primary:hover { background: linear-gradient(180deg, #bdfb8e 0%, #9df265 100%); }
.btn--ghost { background: rgba(255, 255, 255, .7); }

/* Grade: a faceted gem */
.grade { clip-path: polygon(20% 0, 80% 0, 100% 32%, 50% 100%, 0 32%); width: 32px; height: 30px; padding-bottom: 9px; border-radius: 0; font-size: .82rem; }
.grade--lg { width: 84px; height: 80px; padding-bottom: 24px; font-size: 2.2rem; }
.grade--good     { background: linear-gradient(115deg, rgba(255,255,255,.55) 0 28%, transparent 28%), linear-gradient(160deg, #d9ffb5, #aafc75 55%, #7fd34a); color: var(--c-pine); }
.grade--warning  { background: linear-gradient(115deg, rgba(255,255,255,.5) 0 28%, transparent 28%), linear-gradient(160deg, #fbe7b8, #f2c55c 60%, #d99a2b); color: #5e3d06; }
.grade--critical { background: linear-gradient(115deg, rgba(255,255,255,.35) 0 28%, transparent 28%), linear-gradient(160deg, #ef7b70, #c93d32 60%, #a52a21); color: #fff; }
.grade--unknown  { background: linear-gradient(115deg, rgba(255,255,255,.6) 0 28%, transparent 28%), linear-gradient(160deg, #eef2ef, #d4ddd8); color: var(--c-muted); }

/* Public pages over crystals */
.public { background: transparent; }
.public .app-crystals .shape--prism { left: 30px; }
.public .app-crystals .shape--halfhex { display: none; }

@media (max-width: 900px) { .app-crystals { opacity: .35; } .app-crystals .shape--prism, .app-crystals .shape--halfhex { display: none; } }
@media (prefers-reduced-motion: reduce) { .crystals .shape { animation: none; } }
