/* record:start. generated by tokens-from-record.mjs from the catalog record; change the record, then regenerate */
:root {
  --bg: #241F1D;
  --surface: #2E2826;
  --ink: #F3EEEB;
  --muted: #AA9F9A;
  --accent: #7DE2B5;
  --accent-ink: #12140F;
  --font-display-stack: "Geologica", ui-sans-serif, system-ui, sans-serif;
  --font-body-stack: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --radius: 12px; /* record: 12px card, 8px controls, 6px thumbnails */
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F2EF;
    --surface: #FFFFFF;
    --ink: #1C1614;
    --muted: #5E524C;
    --accent: #0A7F55;
    --accent-ink: #FFFFFF;
  }
}

:root[data-theme="light"] {
  --bg: #F5F2EF;
  --surface: #FFFFFF;
  --ink: #1C1614;
  --muted: #5E524C;
  --accent: #0A7F55;
  --accent-ink: #FFFFFF;
}

:root[data-theme="dark"] {
  --bg: #241F1D;
  --surface: #2E2826;
  --ink: #F3EEEB;
  --muted: #AA9F9A;
  --accent: #7DE2B5;
  --accent-ink: #12140F;
}
/* record:end */

/* derived tokens. the six roles, the two font stacks and the base radius above
   come from this app's catalog record (tokens-from-record.mjs); everything
   below is derived from them. dark is native; light is the record's
   parenthesised theme. every text and focus pair is measured by
   scripts/contrast.mjs and enforced by test/contrast.test.js; the ratios are
   written into AGENTS.md.

   accent-ink on accent clears 4.5:1 in both themes, so --accent-fill is the
   accent itself and labels sit on it directly. */

:root {
  --accent-fill: #7de2b5;
  --focus: #7de2b5;
  --danger: #ff8f85;
  --glass: rgba(46, 40, 38, 0.86);
  --field: rgba(243, 238, 235, 0.05);
  --border: rgba(243, 238, 235, 0.12);
  --shadow: 0 16px 48px rgba(8, 5, 4, 0.5);
  --skeleton-a: rgba(243, 238, 235, 0.06);
  --skeleton-b: rgba(243, 238, 235, 0.14);
  color-scheme: dark;
}

:root[data-theme="dark"] {
  --accent-fill: #7de2b5;
  --focus: #7de2b5;
  --danger: #ff8f85;
  --glass: rgba(46, 40, 38, 0.86);
  --field: rgba(243, 238, 235, 0.05);
  --border: rgba(243, 238, 235, 0.12);
  --shadow: 0 16px 48px rgba(8, 5, 4, 0.5);
  --skeleton-a: rgba(243, 238, 235, 0.06);
  --skeleton-b: rgba(243, 238, 235, 0.14);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --accent-fill: #0a7f55;
  --focus: #0a7f55;
  --danger: #b42318;
  --glass: rgba(255, 255, 255, 0.9);
  --field: rgba(28, 22, 20, 0.04);
  --border: rgba(28, 22, 20, 0.12);
  --shadow: 0 16px 48px rgba(28, 22, 20, 0.14);
  --skeleton-a: rgba(28, 22, 20, 0.05);
  --skeleton-b: rgba(28, 22, 20, 0.11);
  color-scheme: light;
}

/* system mode: no data-theme attribute, so the visitor's os setting decides.
   this block must stay identical to the light block above; the contrast test
   checks that it does. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --accent-fill: #0a7f55;
    --focus: #0a7f55;
    --danger: #b42318;
    --glass: rgba(255, 255, 255, 0.9);
    --field: rgba(28, 22, 20, 0.04);
    --border: rgba(28, 22, 20, 0.12);
    --shadow: 0 16px 48px rgba(28, 22, 20, 0.14);
    --skeleton-a: rgba(28, 22, 20, 0.05);
    --skeleton-b: rgba(28, 22, 20, 0.11);
    color-scheme: light;
  }
}

:root {
  /* tight density, from the record; radius 12 card, 8 controls, 6 thumbnails */
  --radius-sm: 8px;
  --radius-xs: 6px;
  --gap: 8px;
  --pad: 14px;
  --target: 44px;
  --font: var(--font-body-stack);
  --font-display: var(--font-display-stack);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
