:root {
  color-scheme: dark;
  --black: #0b0b0b;
  --surface: #141414;
  --gold: #c49231;
  --gold-bright: #e0b04a;
  --white: #ffffff;
  --muted: #bdbdbd;
  --line: #c4923159;
  --heading-font: 'Century Gothic', 'Avenir Next', Avenir, Futura, Montserrat, Arial, sans-serif;
  --body-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--black); color: var(--white); font: 1rem/1.6 var(--body-font); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: #e0b04a33; }
button, a { touch-action: manipulation; }
a { color: var(--gold-bright); text-underline-offset: .2em; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 4px; }
::selection { color: var(--black); background: var(--gold-bright); }
h1, h2, h3 { font-family: var(--heading-font); text-transform: uppercase; line-height: 1.25; letter-spacing: .09em; overflow-wrap: anywhere; }
h1 { font-size: 1.05rem; margin: 0; }
h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 0 0 .7rem; }
h3 { font-size: 1.1rem; margin: .8rem 0; }
p { margin: 0 0 1rem; }
.container { width: min(850px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { background: #000; border-top: 3px solid var(--gold); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding-block: 1.1rem; }
.brand { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand p { color: var(--muted); font-size: .75rem; margin: .35rem 0 0; }
.local-badge { color: var(--gold-bright); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--gold); padding: .25rem .55rem; }
.app-shell { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.screen-nav { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; background: var(--black); padding-block: 1rem; }
.screen-nav a { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 52px; border: 1px solid #777; color: var(--muted); font-weight: 700; text-decoration: none; }
.screen-nav a[aria-current] { background: var(--gold); border-color: var(--gold); color: var(--black); }
.screen-nav a:hover { border-color: var(--gold-bright); }
.screen-nav a span { font-size: 1.3rem; line-height: 1; }
main { padding-top: 1.1rem; }
main:focus, h2:focus { outline: none; }
.screen-heading { margin-bottom: 1.8rem; }
.screen-heading > p:last-child { color: var(--muted); }
.eyebrow, .step { color: var(--gold-bright); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow { margin-bottom: .75rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.receipt-box { background: var(--surface); border: 1px solid var(--line); padding: 1rem; margin-bottom: 1.8rem; }
.snap-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 148px; gap: .3rem; background: var(--gold); color: var(--black); cursor: pointer; }
.snap-button > span { font-weight: 800; font-size: 1.2rem; }
.snap-button small { font-size: .8rem; }
.snap-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.snap-button:focus-within { outline: 3px solid var(--gold-bright); outline-offset: 4px; }
.snap-button:hover { background: var(--gold-bright); }
.receipt-box .hint { margin: .8rem 0 0; }
#receipt-preview-wrap { margin-top: 1rem; }
#receipt-preview { display: block; max-width: 100%; height: auto; max-height: 280px; margin: auto; object-fit: contain; }
.form-grid, .filters { display: grid; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label { font-size: .9rem; font-weight: 650; }
.required, .optional { font-size: .75rem; color: var(--muted); font-weight: 400; }
input:not([type=file]), select, textarea { width: 100%; max-width: 100%; min-height: 52px; padding: .75rem; border: 1px solid #888; border-radius: 0; background: var(--surface); color: var(--white); }
input[type=date] { min-width: 0; appearance: none; -webkit-appearance: none; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.hint { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 52px; padding: .85rem 1.2rem; border: 1px solid var(--gold); border-radius: 0; font-weight: 750; font-size: .9rem; }
.primary { color: var(--black); background: var(--gold); }
.primary:hover { background: var(--gold-bright); }
.secondary { color: var(--gold-bright); background: var(--surface); }
.secondary:hover { border-color: var(--gold-bright); background: #242014; }
.form-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.8rem; }
.form-actions .primary { justify-content: space-between; flex: 1; }
.text-button { background: transparent; color: var(--gold-bright); border: 0; text-decoration: underline; text-underline-offset: .2em; min-height: 48px; padding: .5rem .7rem; }
.form-status { color: var(--gold-bright); margin-top: 1rem; overflow-wrap: anywhere; }
.form-status:empty { margin: 0; }
.notice, .warning { border: 1px solid var(--gold); border-left-width: 4px; padding: 1rem; margin: 1rem 0; background: var(--surface); font-size: .85rem; overflow-wrap: anywhere; }
.warning { color: #ffe1aa; }
.filters { margin-bottom: 1rem; }
.totals { display: grid; gap: .65rem; margin: 1.2rem 0; }
.totals > div { background: var(--surface); border-top: 2px solid var(--gold); padding: .9rem 1rem; display: flex; gap: .5rem; align-items: center; justify-content: space-between; min-width: 0; }
.totals span { font-size: .8rem; }
.totals strong { color: var(--gold-bright); font-size: 1.3rem; overflow-wrap: anywhere; min-width: 0; }
.entry { margin-top: .85rem; background: var(--surface); border: 1px solid var(--line); }
.entry summary { padding: 1rem; min-height: 72px; cursor: pointer; overflow-wrap: anywhere; }
.entry summary::marker { color: var(--gold-bright); }
.entry-top { display: inline; font-weight: 700; }
.entry-amount { color: var(--gold-bright); white-space: nowrap; }
.entry-meta { display: block; margin-top: .4rem; color: var(--muted); font-size: .8rem; }
.entry-body { border-top: 1px solid var(--line); padding: 1rem; }
.entry dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: .25rem; }
.entry dt { font-size: .75rem; color: var(--muted); }
.entry dd { margin: 0 0 .8rem; font-size: .9rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry-actions { display: flex; flex-wrap: wrap; gap: .4rem .75rem; }
.empty-state { padding: 2rem 1rem; border: 1px dashed #888; text-align: center; color: var(--muted); }
.empty-state a { display: inline-flex; align-items: center; min-height: 48px; }
.export-card, .install-card { padding: 1.25rem; background: var(--surface); border-top: 1px solid var(--gold); margin-bottom: 1rem; }
.export-card p, .install-card p { color: var(--muted); font-size: .9rem; }
.export-card .button { width: 100%; justify-content: space-between; }
footer { margin-top: 3rem; border-top: 1px solid var(--line); padding-block: 1.5rem; color: var(--muted); font-size: .75rem; }
footer p:last-child { margin-bottom: 0; }
.disclaimer { display: inline-block; border: 1px solid var(--gold); padding: .65rem .8rem; overflow-wrap: anywhere; }
.skip-link { position: absolute; top: -10rem; left: 1rem; z-index: 20; padding: 1rem; color: var(--black); background: var(--gold-bright); }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 560px) {
  .container { width: min(850px, calc(100% - 3rem)); }
  .brand img { width: 64px; height: 64px; }
  h1 { font-size: 1.2rem; }
  .form-grid, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full { grid-column: 1 / -1; }
  .form-actions { flex-direction: row; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .totals > div { display: block; }
  .totals strong { display: block; margin-top: .4rem; }
  .receipt-box, .export-card, .install-card { padding: 1.5rem; }
  .entry dl { grid-template-columns: 140px minmax(0, 1fr); gap: .6rem; }
}
@media (min-width: 720px) {
  .totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .button, .screen-nav a, .snap-button, .entry, .totals > div { border: 1px solid ButtonText; } }
