:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, sans-serif;
    color: #18283a;
    background: #f2f5f9;
    line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 2rem, 72rem); margin: 2rem auto 4rem; }
a { color: #155493; text-decoration: none; }
a:hover { color: #073b70; }
:focus-visible { outline: 3px solid #2375c1; outline-offset: 3px; }
h1, h2 { line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.55rem); margin: .35rem 0 .65rem; }
h2 { font-size: 1.18rem; }
.ledger-heading { margin-block: 1.5rem; }
.company-label { color: #485d73; margin: 0; font-weight: 650; }
.ledger-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.ledger-card, .journal-panel { background: #fff; border: 1px solid #d8e1eb; border-radius: .8rem; padding: 1.2rem; }
.ledger-card h2, .journal-panel h2 { margin: 0 0 .65rem; }
.ledger-card p { margin: .55rem 0; }
.ledger-card:has(.workflow-steps) { grid-column: 1 / -1; background: #eaf2f9; }
.ledger-card > p { display: inline-block; margin-right: .6rem; }
.ledger-card > p > a {
    display: inline-block;
    padding: .32rem .55rem;
    background: #f3f7fc;
    border-radius: .35rem;
}
.workflow-steps { display: flex; align-items: stretch; gap: 1.75rem; margin: .8rem 0 .45rem; }
.workflow-steps a {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: .7rem .8rem;
    background: #fff;
    border: 1px solid #b8cde0;
    border-radius: .5rem;
    font-weight: 650;
}
.workflow-steps a + a::before {
    content: "";
    position: absolute;
    inset-inline-start: -1.18rem;
    top: calc(50% - .2rem);
    width: .42rem;
    height: .42rem;
    border-top: 2px solid #507da5;
    border-right: 2px solid #507da5;
    transform: rotate(45deg);
}
.workflow-steps small { display: block; color: #485d73; font-weight: 400; }
.workflow-steps a:hover, .ledger-card > p > a:hover { background: #dbeaf7; }
@media (max-width: 40rem) {
    .workflow-steps { flex-direction: column; gap: 1.35rem; }
    .workflow-steps a { flex: auto; }
    .workflow-steps a + a::before {
        inset-inline-start: calc(50% - .2rem);
        top: -.98rem;
        transform: rotate(135deg);
    }
}
.journal-panel { margin-top: 1.25rem; }
.journal-panel header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid #d8e1eb; vertical-align: top; }
thead { background: #eaf0f7; }
.journal-panel tbody tr:last-child td { border-bottom: 0; }
.bill-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 1rem 1.5rem;
    padding: 1.15rem;
    background: #fff;
    border: 1px solid #d8e1eb;
    border-radius: .8rem;
}
.bill-details dt { color: #485d73; font-size: .9rem; }
.bill-details dd { margin: .2rem 0 0; font-weight: 650; overflow-wrap: anywhere; }
.bill-tax-note { color: #485d73; font-size: .9rem; }
button, input, select, textarea { font: inherit; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; padding: .35rem .55rem; border: 1px solid #8da0b3; border-radius: .3rem; background: #fff; color: inherit; }
button, .primary-link { display: inline-block; padding: .45rem .85rem; border-radius: .35rem; border: 1px solid #155493; background: #155493; color: #fff; text-decoration: none; cursor: pointer; }
button:hover, .primary-link:hover { background: #073b70; color: #fff; }
button[hidden] { display: none; }
[role=alert] { color: #92251f; }

.company-document-header {display:flex; align-items:flex-start; gap:1rem; padding:1rem; margin:1rem 0; background:#fff; border:1px solid #d5dfe9; border-radius:.6rem}
.company-document-header strong {font-size:1.15rem}
.document-logo {max-width:10rem; max-height:5rem; object-fit:contain}
.invoice-item {display:flex; flex-wrap:wrap; align-items:end; gap:.65rem}
.invoice-item [hidden] {display:none}
@media (max-width:600px) {.company-document-header {flex-wrap:wrap}}
.document-actions {display:flex; flex-wrap:wrap; gap:.65rem 1.25rem; margin-block:1rem}
