:root {
    color-scheme: dark;
    --yellow: #f5c518;
    --gold: #e8c547;
    --bg: #050505;
    --surface: #141414;
    --surface-2: #1c1c1c;
    --surface-3: #242424;
    --border: #2a2a2a;
    --border-strong: #3a3a3a;
    --text: #f0f0f0;
    --muted: #9a9a9a;
    --danger: #f8827c;
    --danger-bg: rgba(248, 130, 124, .14);
    --danger-border: rgba(248, 130, 124, .34);
    --radius: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 600; line-height: 1.25; }

.report-header { --header-mark-width: min(clamp(6.5rem, 26vw, 16rem), calc(50vw - clamp(.85rem, 3.5vw, 4.25rem) - clamp(.25rem, 1vw, .625rem))); width: 100%; margin: 0; padding: 1.25rem clamp(.85rem, 3.5vw, 4.25rem) 0; }
/* One continuous rule joins both equal header columns at every viewport width. */
.report-header__top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(.5rem, 2vw, 1.25rem); padding-bottom: calc(.85rem + 2px); margin-bottom: 1.25rem; background: linear-gradient(90deg, var(--yellow) 0%, rgba(245,197,24,.15) 50%, var(--yellow) 100%) left bottom / 100% 2px no-repeat; }
.report-brand, .report-header__actions { min-width: 0; }
.report-brand__row { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; }
.report-brand__title { display: block; flex: 0 1 var(--header-mark-width); min-width: 0; max-width: 100%; }
/* Show the wordmark from the original artwork without its lower strapline. */
.report-brand__logo { display: block; position: relative; width: 100%; aspect-ratio: 499 / 99; overflow: hidden; }
.report-brand__logo img { position: absolute; display: block; width: 136.272545%; max-width: none; height: auto; left: -16.833667%; top: -19.191919%; }
.report-brand__sub { margin: 0; font-size: clamp(.65rem, 1.5vw, .88rem); font-weight: 400; line-height: 1.5; color: var(--muted); }
.report-header__actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.report-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; min-width: 0; max-width: 100%; }
/* The right title uses the same width and height as the left logo. */
.report-meta__site { display: flex; align-items: center; justify-content: flex-end; width: var(--header-mark-width); max-width: 100%; min-height: calc(var(--header-mark-width) * 99 / 499); font-size: calc(var(--header-mark-width) / 8); line-height: 1.1; font-weight: 800; letter-spacing: .06em; text-align: right; overflow-wrap: anywhere; color: var(--yellow); }
.report-meta__since { max-width: 100%; font-size: clamp(.55rem, 1.1vw, .88rem); text-align: right; overflow-wrap: anywhere; color: var(--muted); }
.report-nav-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; font-size: clamp(.75rem, 1.5vw, 1rem); font-weight: 600; overflow-wrap: anywhere; color: var(--muted); padding: .25rem .85rem; border: 1px solid var(--border); border-radius: 999px; }
.report-nav-link:hover { color: var(--yellow); border-color: rgba(245,197,24,.45); text-decoration: none; }
.report-intro { margin-top: 0; }
.report-intro__tag, .empty-state__tag { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .05em; color: #111; background: var(--yellow); border-radius: 999px; padding: .18rem .55rem; margin-bottom: .55rem; }
.report-intro__title { margin-bottom: .35rem; font-size: clamp(1.15rem, 2.5vw, 1.45rem); font-weight: 700; }
.report-intro__desc { margin: 0; max-width: 52rem; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.25rem clamp(.85rem, 2vw, 1.25rem); }
.login-layout { max-width: 560px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.1rem; min-width: 0; }
.card__head { padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.card__head h2 { margin: 0; min-width: 0; font-size: .98rem; overflow-wrap: anywhere; }
.card__head--toolbar { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.card__body { padding: 1.1rem; }
.card__foot { padding: .7rem 1.1rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: .74rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; margin-bottom: .25rem; font-size: .9rem; font-weight: 600; color: #c3d1e0; }
input[type=text], input[type=password] { display: block; width: 100%; min-width: 0; min-height: 44px; padding: .55rem .65rem; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; }
input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(245,197,24,.18); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: .55rem .95rem; font: inherit; font-weight: 600; font-size: .85rem; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.btn--primary { background: var(--yellow); color: #111; }
.btn--primary:hover { background: var(--gold); }
.login-submit { width: 100%; min-height: 44px; margin-top: .25rem; }
.alert { padding: .65rem .9rem; border-radius: var(--radius); border: 1px solid transparent; margin-bottom: .9rem; font-size: .87rem; }
.alert--error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.muted { color: var(--muted); }
.empty-state { min-height: 180px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state p { margin: 0; }
.credit-sheet { min-width: 0; }
.credit-sheet summary { min-height: 44px; cursor: pointer; color: var(--yellow); font-weight: 700; padding: .7rem 0; overflow-wrap: anywhere; }
.credit-sheet summary:hover { color: var(--gold); }
.credit-sheet__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.credit-sheet__select { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.credit-sheet__check { width: 20px; height: 20px; margin: 0; accent-color: var(--yellow); cursor: pointer; }
.credit-sheet__download { white-space: normal; text-align: center; }
.credit-sheet__detail { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.credit-sheet__intro { margin-bottom: 1rem; overflow-wrap: anywhere; }
.credit-sheet__summary { display: grid; grid-template-columns: minmax(0, 560px); gap: .45rem; max-width: 560px; margin-bottom: 1.35rem; }
.credit-sheet__summary > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .25rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.credit-sheet__summary > div > span { min-width: 0; overflow-wrap: anywhere; }
.credit-sheet__summary strong { max-width: 100%; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.credit-sheet__summary .credit-sheet__total, .credit-sheet__summary .credit-sheet__balance { margin-top: .35rem; color: var(--yellow); font-weight: 700; }
.credit-sheet__detail h3 { font-size: .98rem; color: var(--yellow); font-style: italic; }
.table-scroll { overflow-x: auto; min-width: 0; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.credit-sheet__table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.credit-sheet__table th { padding: .55rem .6rem; background: var(--surface-2); color: #b9c8d9; text-align: left; text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.credit-sheet__table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: top; }
.credit-sheet__table td:nth-child(4) { white-space: normal; min-width: 220px; }
.credit-sheet__bookings td:nth-child(4), .credit-sheet__bookings td:nth-child(5) { white-space: normal; min-width: 240px; overflow-wrap: anywhere; }
.payment-table-wrap { margin-top: .35rem; }
.payment-table { min-width: 680px; }
.payment-table th:nth-child(1) { min-width: 105px; }
.payment-table th:nth-child(2) { min-width: 105px; }
.payment-table th:nth-child(3) { min-width: 150px; }
.payment-table th:nth-child(4) { min-width: 160px; }
.payment-table th:nth-child(5) { min-width: 200px; }
.payment-table td:nth-child(3), .payment-table td:nth-child(4), .payment-table td:nth-child(5) { white-space: normal; overflow-wrap: anywhere; }
.credit-sheet__table tbody tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.credit-sheet__table tbody tr:hover td { background: rgba(245,197,24,.08); }

@media (max-width: 720px) {
    .credit-sheet__item { grid-template-columns: auto minmax(0, 1fr); }
    .credit-sheet__download { grid-column: 2; justify-self: start; }
    .card__head, .card__body, .card__foot { padding-left: .85rem; padding-right: .85rem; }
}
