:root {
    --bg: #fbfaf6;
    --paper: #fffefa;
    --text: #1b1b18;
    --muted: #68645c;
    --line: #d8d1c4;
    --line-strong: #1b1b18;
    --accent: #405f4d;
    --accent-quiet: #edf3ed;
    --review: #7a653a;
    --review-bg: #f5efd9;
    --fault: #7a433a;
    --fault-bg: #f4e6e2;
    --font-prose: Georgia, "Times New Roman", serif;
    --font-data: "Roboto Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px 22px 44px;
    font-family: var(--font-prose);
    line-height: 1.6;
}

.skip-link {
    position: absolute;
    left: -999px;
}

.skip-link:focus {
    left: 22px;
    top: 16px;
    background: var(--paper);
    border: 1px solid var(--line-strong);
    padding: 6px 10px;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: var(--text);
}

.site-header,
.site-footer {
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 18px 0;
    margin-bottom: 54px;
}

.brand {
    display: inline-block;
    color: var(--text);
    font-size: 1.35rem;
    text-decoration: none;
}

.site-line,
.quiet {
    color: var(--muted);
}

.site-line {
    margin: 2px 0 0;
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
    font-family: var(--font-data);
    font-size: 0.82rem;
}

.site-nav a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
    border-bottom-color: currentColor;
}

main {
    min-height: 68vh;
}

section {
    margin: 0 0 48px;
}

h1,
h2,
h3 {
    margin: 0 0 14px;
    font-weight: 400;
    line-height: 1.08;
}

h1 {
    max-width: 850px;
    font-size: clamp(2.35rem, 5.2vw, 4.65rem);
}

h2 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

h3 {
    font-size: 1.18rem;
}

p {
    max-width: 780px;
    margin: 0 0 14px;
}

.mono,
table,
.kicker,
.button,
.text-link,
.status,
dt,
dd {
    font-family: var(--font-data);
}

.kicker {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.lede {
    max-width: 780px;
    color: #2b2925;
    font-size: clamp(1.18rem, 2.2vw, 1.72rem);
    line-height: 1.35;
}

.hero {
    padding: 20px 0 22px;
}

.actions,
.next-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    align-items: center;
    margin-top: 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    font-size: 0.84rem;
}

.button:hover,
.button:focus {
    background: var(--accent);
    color: var(--paper);
}

.text-link {
    font-size: 0.84rem;
}

.ledger-note,
.pilot-banner,
.issue-card,
.empty-state {
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 20px;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.issue-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.issue-header {
    padding-bottom: 8px;
}

.issue-hero {
    max-width: 920px;
    padding: 8px 0 10px;
}

.issue-hero h1 {
    margin-bottom: 18px;
}

.company-hero {
    max-width: 900px;
    position: relative;
    padding: 8px 0 4px;
}

.company-hero h1 {
    margin-bottom: 8px;
}

.company-state-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
    margin-top: 20px;
}

.issue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    align-items: center;
    margin-top: 24px;
}

.disclaimer {
    border-left: 3px solid var(--line-strong);
    padding-left: 14px;
}

.inspection-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 32px 0 28px;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: var(--line);
}

.inspection-strip div {
    min-width: 0;
    background: var(--bg);
    padding: 20px 14px 18px;
}

.metric-value,
.metric-label {
    display: block;
    font-family: var(--font-data);
}

.metric-value {
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1;
}

.company-metrics .metric-value {
    overflow-wrap: anywhere;
    font-size: clamp(1.05rem, 2.2vw, 1.65rem);
}

.company-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.company-focus {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 1px;
    margin: 34px 0 34px;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background: var(--line);
}

.company-focus-primary,
.company-ncav-check div {
    background: var(--bg);
}

.company-focus-primary {
    display: grid;
    align-content: center;
    min-height: 220px;
    padding: 28px 24px;
}

.company-focus-primary .metric-value {
    margin: 8px 0 18px;
    font-size: clamp(3.1rem, 9vw, 7.2rem);
}

.company-focus-primary p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.company-ncav-check {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: var(--line);
}

.company-ncav-check div {
    min-width: 0;
    padding: 20px 18px;
}

.company-ncav-check dd {
    font-size: clamp(1rem, 2vw, 1.38rem);
}

.currency-code {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--muted);
    font-size: 0.72em;
    font-weight: 600;
}

.metric-label {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.74rem;
}

.issue-note {
    border-left: 1px solid var(--line-strong);
    padding-left: 18px;
}

.quiet-note {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 18px;
}

.brief-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 18px 0;
    border: 1px solid var(--line);
    background: var(--line);
}

.brief-grid div {
    min-width: 0;
    background: var(--paper);
    padding: 12px;
}

dt {
    color: var(--muted);
    font-size: 0.75rem;
}

dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
}

.compact-brief {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid var(--line-strong);
}

table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 0.78rem;
    line-height: 1.4;
}

.simple-register table {
    min-width: 760px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 9px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-weight: 400;
}

.numeric {
    text-align: right;
}

.strong {
    font-weight: 700;
}

.row-note td {
    padding-top: 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.status {
    display: inline-block;
    border: 1px solid var(--line);
    padding: 2px 6px;
    white-space: nowrap;
    font-size: 0.7rem;
}

.status-passing,
.source-verified {
    background: var(--accent-quiet);
    border-color: #bed0c2;
    color: #254331;
}

.status-needs_review,
.source-stale {
    background: var(--review-bg);
    border-color: #d8c893;
    color: var(--review);
}

.status-source_missing,
.status-parse_fault,
.source-missing {
    background: var(--fault-bg);
    border-color: #d6b3a9;
    color: var(--fault);
}

.unknowns {
    border-top: 1px solid var(--line-strong);
    padding-top: 24px;
}

.company-unknowns {
    margin-bottom: 36px;
}

.company-unknowns h2 {
    font-size: 1.18rem;
}

.business-profile {
    border-top: 1px solid var(--line-strong);
    padding-top: 24px;
}

.profile-fact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--line);
    background: var(--line);
}

.profile-fact {
    min-width: 0;
    background: var(--paper);
    padding: 16px;
}

.profile-fact-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.profile-fact h3 {
    margin: 0;
    font-size: 0.98rem;
}

.profile-fact p {
    margin-bottom: 10px;
}

.profile-evidence {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

.profile-evidence li + li {
    margin-top: 6px;
}

.profile-source-details {
    margin-top: 18px;
}

.unknown {
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}

.method-note h1 {
    font-size: 2rem;
}

.method-note h2 {
    margin-top: 26px;
}

.ledger-details {
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.ledger-details summary {
    cursor: pointer;
    font-family: var(--font-data);
    font-size: 0.86rem;
}

.ledger-details summary::marker {
    color: var(--muted);
}

.company-details {
    margin-top: 8px;
}

.company-details .ledger-details {
    margin: 0;
}

.company-details .ledger-details p {
    margin-top: 14px;
}

.company-details .ledger-details h3 {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 1rem;
}

.company-details .ledger-details h3:first-of-type {
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
}

.ledger-details .method-note {
    margin-top: 22px;
}

.audit-details {
    margin-top: -10px;
}

.audit-details > p {
    margin-top: 14px;
}

.audit-table {
    margin-top: 16px;
    border-top-color: var(--line);
}

.audit-table table {
    min-width: 720px;
    font-size: 0.72rem;
}

.evidence-table table,
.financial-table table {
    min-width: 1040px;
    font-size: 0.74rem;
}

.financial-table th div {
    display: block;
}

.financial-table th .quiet {
    margin-top: 2px;
    font-size: 0.67rem;
}

.provenance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provenance-grid dd {
    font-size: 0.82rem;
}

.compact-unknowns {
    margin-top: 16px;
    margin-bottom: 0;
    border-top: 1px solid var(--line);
}

.audit-note-full {
    max-width: 100%;
    margin-top: 16px;
    overflow-wrap: anywhere;
}

.link-list {
    padding-left: 20px;
}

.site-footer {
    margin-top: 58px;
    padding: 18px 0;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 760px) {
    body {
        padding: 18px 14px 34px;
    }

    .site-header,
    .issue-card {
        display: block;
    }

    .site-nav {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .note-grid,
    .brief-grid,
    .inspection-strip,
    .compact-brief,
    .profile-fact-list,
    .company-focus,
    .company-ncav-check {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        display: block;
    }

    h1 {
        font-size: clamp(2.25rem, 11vw, 3.45rem);
    }
}
