/* First-party, build-free viewer design system. Shared by local and hosted SSR. */
:root {
    color-scheme: light;
    --ink: #182323;
    --muted: #657272;
    --line: #e1e7e5;
    --accent: #087f72;
    --accent-dark: #08665c;
    --surface: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: #f5f7f6;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { letter-spacing: -.035em; line-height: 1.25; }
h1 a { color: var(--ink); }
h2 { font-size: 1.05rem; letter-spacing: -.015em; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, a.border { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: .55rem; padding: .55rem .9rem; font-weight: 600; line-height: 1.4; }
button:hover, a.border:hover { background: #f0f5f3; text-decoration: none; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #5bc8b6; outline-offset: 3px; }
input:not([type=checkbox]), select { border: 1px solid #d4ddda; border-radius: .55rem; padding: .6rem .8rem; background: #fff; color: var(--ink); min-height: 2.65rem; max-width: 100%; }
input::placeholder { color: #788681; }
input[type=checkbox] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
input[type=file] { width: 100%; padding: 1.5rem; border: 1.5px dashed #bccfc9; background: #f7fbf9; }
input::file-selector-button { font: inherit; font-weight: 600; padding: .55rem .8rem; margin-right: .8rem; border: 1px solid var(--line); border-radius: .45rem; background: white; color: var(--accent-dark); cursor: pointer; }
label { color: #40514b; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: .5rem; left: 1rem; clip-path: inset(50%); background: white; padding: .6rem 1rem; border-radius: .5rem; z-index: 10; }
.skip-link:focus { clip-path: none; }
.app-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.3rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font-size: 1.35rem; font-weight: 750; letter-spacing: -.035em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; background: var(--accent); color: white; border-radius: .7rem; box-shadow: 0 3px 8px #087f721a; font-size: 1.25rem; }
.viewer-mode { font-size: .8rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; }
.app-main { padding-top: 2.5rem; padding-bottom: 2rem; min-height: calc(100vh - 11rem); }
.app-footer { border-top: 1px solid var(--line); padding-top: 1.2rem; padding-bottom: 2rem; color: var(--muted); font-size: .8rem; }
.eyebrow { color: var(--accent-dark); font-size: .72rem; letter-spacing: .14em; font-weight: 750; }
.bg-white.shadow { border: 1px solid var(--line); box-shadow: 0 2px 3px #142c2303, 0 6px 20px #142c2303; }
.rounded { border-radius: .85rem; }
.bg-blue-600 { background: var(--accent); border-color: var(--accent); }
.bg-blue-600:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.text-white { color: white; }
.stat-card { padding: 1.35rem 1.5rem; }
.stat-card .text-2xl { margin-top: .35rem; font-size: 2.15rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.session-notice { padding: 1rem 1.3rem; border: 1px solid #c5e5db; border-radius: .85rem; background: #eef8f4; color: #205b4e; }
.session-notice time { font-variant-numeric: tabular-nums; }
.scan-overview-heading { position: relative; }
.session-expiry-trigger { flex-wrap: wrap; justify-content: flex-start; padding: .3rem .65rem; border-color: #c5e5db; background: #eef8f4; color: #205b4e; font-size: .8rem; font-weight: 500; }
.session-expiry-trigger time { font-variant-numeric: tabular-nums; }
.session-expiry-help { position: absolute; top: 100%; left: 0; z-index: 5; width: min(32rem, calc(100vw - 2rem)); box-shadow: 0 8px 24px #142c2326; visibility: hidden; }
.session-expiry:not([data-dismissed]):hover .session-expiry-help,
.session-expiry:not([data-dismissed]):focus-within .session-expiry-help,
.session-expiry[data-open] .session-expiry-help { visibility: visible; }
.upload-card { margin-top: 2rem; padding: 2.5rem; }
.upload-card h1 { font-size: 2.3rem; }
.upload-card form { margin-top: 2rem; }
.upload-card button[type=submit] { width: 100%; padding: .85rem; }
.cli-helper { margin-top: 1.5rem; }
.table-wrap { width: 100%; max-height: min(70vh, 52rem); overflow: auto; border: 1px solid var(--line); border-radius: .65rem; }
table.report { border-collapse: collapse; width: 100%; font-size: .85rem; }
table.report th, table.report td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.report thead th { background: #f7f9f8; color: #566660; font-size: .75rem; font-weight: 650; white-space: nowrap; position: sticky; top: 0; }
table.report tbody th { color: var(--muted); font-size: .8rem; font-weight: 500; }
table.report tbody tr:last-child > * { border-bottom: 0; }
table.report tbody tr:hover { background: #f8fbfa; }
table.report .url-cell { min-width: 12rem; max-width: 36rem; overflow-wrap: anywhere; }
table.report td { min-width: 4rem; }
.report td .badge { margin-bottom: .2rem; }
.table-toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1rem 0; }
.table-search { flex: 1 1 15rem; min-width: 0; max-width: 28rem; }
.table-count { color: var(--muted); font-size: .8rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.table-columns { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1rem; color: var(--muted); font-size: .8rem; }
.table-columns label { display: inline-flex; align-items: center; gap: .4rem; }
table.report .sort-button { display: flex; justify-content: space-between; width: 100%; padding: 0; border: 0; border-radius: .2rem; color: inherit; font-size: inherit; background: transparent; }
.sort-button::after { content: "↕"; color: #9aa9a2; font-size: .85rem; margin-left: .65rem; }
[aria-sort=ascending] .sort-button::after { content: "↑"; color: var(--accent); }
[aria-sort=descending] .sort-button::after { content: "↓"; color: var(--accent); }
.table-empty { text-align: center !important; padding: 2.5rem !important; color: var(--muted); }
.badge { display: inline-block; border: 1px solid transparent; padding: .15rem .55rem; border-radius: .4rem; font-size: .7rem; line-height: 1.5; font-weight: 650; white-space: nowrap; }
.badge-broken { background: #fff1f2; color: #b4233d; border-color: #ffdce2; }
.badge-warn { background: #fff9eb; color: #966218; border-color: #f5e5bf; }
.badge-ok { background: #edf8f1; color: #24744a; border-color: #d4ebdf; }
.badge-info { background: #eef3ff; color: #4a62a5; border-color: #dce5fc; }
.badge-button { background: #faf0ff; color: #8751a3; border-color: #ead9f5; }
/* Small utilities retained for the SSR view markup; no runtime CSS generator. */
.max-w-7xl { max-width: 92rem; }
.max-w-\[110rem\] { max-width: 110rem; }
.max-w-2xl { max-width: 46rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-2 { padding: .5rem; } .p-3 { padding: .75rem; } .p-4 { padding: 1.5rem; } .p-6 { padding: 2rem; }
.px-2 { padding-inline: .5rem; } .px-3 { padding-inline: .75rem; } .px-4 { padding-inline: 1.5rem; }
.py-1 { padding-block: .25rem; } .py-1\.5 { padding-block: .5rem; } .py-2 { padding-block: .6rem; } .py-3 { padding-block: .75rem; } .py-6 { padding-block: 1.5rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 1.75rem; }
.mt-3 { margin-top: .75rem; } .ml-1 { margin-left: .25rem; } .ml-2 { margin-left: .5rem; } .ml-5 { margin-left: 1.25rem; } .mr-1 { margin-right: .25rem; }
.block { display: block; } .flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.grid { display: grid; min-width: 0; } .grid > * { min-width: 0; } .grid-cols-1 { grid-template-columns: 1fr; } .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.space-y-4 > * + * { margin-top: 1.25rem; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.font-mono { font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: .8rem; }
.text-2xl { font-size: 2rem; } .text-xl { font-size: 1.5rem; } .text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; }
.text-gray-400 { color: #8a9691; } .text-gray-500, .text-gray-600 { color: var(--muted); }
.text-green-700 { color: #24744a; } .text-red-700, .text-red-800 { color: #b4233d; } .text-amber-700 { color: #966218; }
.text-green-200 { color: #bde7d6; } .bg-gray-900 { background: #203b32; } .bg-white { background: white; } .bg-red-50 { background: #fff4f4; }
.border { border: 1px solid var(--line); } .border-red-200, .border-red-300 { border-color: #efc6cc; }
.w-full { width: 100%; } .w-40 { width: 10rem; } .w-80 { width: 20rem; }
.uppercase { text-transform: uppercase; } .tracking-wide { letter-spacing: .07em; } .text-center { text-align: center; }
.break-all { overflow-wrap: anywhere; } .url-cell { overflow-wrap: anywhere; } .overflow-x-auto { overflow-x: auto; } .align-top { vertical-align: top; } .list-disc { list-style: disc; padding-left: .5rem; }
@media (min-width: 60rem) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
    .px-4 { padding-inline: 1rem; }
    .p-4, .p-6, .upload-card { padding: 1.1rem; }
    .app-main { padding-top: 1.5rem; }
    .viewer-mode { font-size: .7rem; padding: .25rem .5rem; }
    .stat-card { padding: 1rem; }
    .table-toolbar > input, .table-toolbar > select { width: 100%; max-width: none; }
    .table-count { margin-left: 0; }
    .upload-card { margin-top: 0; }
    .upload-card h1 { font-size: 1.8rem; }
}
@media print {
    .app-header, .app-footer, .table-toolbar, .table-columns, .cli-helper, .skip-link { display: none; }
    .app-main { padding: 0; }
    .table-wrap { overflow: visible; max-height: none; }
}
