/* Plain Receipts Uploader site. Colours from brands/plain-receipts/brand.json.
   No web fonts, scripts, cookies or third-party requests: Inter is used if installed. */

:root {
  --bg: #F6F7F9;
  --paper: #FFFFFF;
  --ink: #1B1F24;
  --muted: #4A5563;
  --rule: #D5DAE2;
  --link: #1F5FD1;
  --band: #0B1220;
  --band-text: #E8EDF6;
  --band-muted: #A9B4C7;
  --accent: #4F8CFF;
  --ok: #15803D;
  --warn: #B45309;
  --code-bg: #EEF1F5;
  --focus: #F59E0B;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220;
    --paper: #121B2E;
    --ink: #E8EDF6;
    --muted: #A9B4C7;
    --rule: #2A3550;
    --link: #8AB4FF;
    --band: #060B15;
    --code-bg: #1A2540;
    --ok: #4ADE80;
    --warn: #FBBF24;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--paper); color: var(--ink);
  padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip-link:focus { top: 12px; }

/* Header band */
.site-header { background: var(--band); color: var(--band-text); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--band-text); text-decoration: none; font-weight: 800; letter-spacing: -0.01em;
  font-size: 1.15rem;
}
.brand img { width: 30px; height: 40px; }
.brand small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--band-muted); letter-spacing: 0; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--band-text); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

.wrap { max-width: 860px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Hero */
.hero { background: var(--band); color: var(--band-text); padding: 28px 0 56px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.hero h1 { font-size: clamp(2rem, 5.5vw, 3rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p { color: var(--band-muted); max-width: 46ch; margin: 0; font-size: 1.1rem; }

/* The receipt card */
main { padding-bottom: 56px; }
.receipt {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-top: -32px;
  padding: 28px clamp(18px, 4vw, 44px) 36px;
  box-shadow: 0 10px 30px rgba(11, 18, 32, 0.08);
  position: relative;
}
.page-plain .receipt { margin-top: 32px; }

.receipt h2 {
  font-size: 1.35rem; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.01em;
  padding-top: 24px; border-top: 1px dashed var(--rule);
}
.receipt > h2:first-child, .receipt > .meta + h2 { margin-top: 8px; padding-top: 0; border-top: 0; }
.receipt h3 { font-size: 1.05rem; margin: 24px 0 6px; }
.receipt p, .receipt li { max-width: 68ch; }
.receipt ul, .receipt ol { padding-left: 1.3em; }
.receipt li + li { margin-top: 6px; }

.meta {
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 24px; padding: 0; list-style: none;
}

code {
  font-family: var(--mono); font-size: 0.86em; background: var(--code-bg);
  padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere;
}

.note {
  border-left: 4px solid var(--accent); background: var(--code-bg);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0;
}
.note p { margin: 0; }
.note p + p { margin-top: 8px; }

/* Permission and data tables */
.table-scroll { overflow-x: auto; margin: 12px 0 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
thead th { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; }

/* Lists of does / does not */
.ledger { list-style: none; padding-left: 0 !important; }
.ledger li { padding-left: 1.7em; position: relative; }
.ledger li::before { position: absolute; left: 0; font-family: var(--mono); font-weight: 700; }
.ledger.yes li::before { content: "+"; color: var(--ok); }
.ledger.no li::before { content: "\2013"; color: var(--warn); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer p { margin: 0; }

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .hero { padding-bottom: 48px; }
  th, td { padding: 8px 8px; }
}

@media print {
  .site-header, .hero, .site-footer, .skip-link { display: none; }
  .receipt { box-shadow: none; border: 0; margin: 0; }
}
