/* AGDA design tokens — dual theme.
   Dark theme (default): archival reading room, for the public /browse viewer.
   Light "paper" theme (html[data-theme=light]): warm paper, for /admin + auth. */

:root {
  /* -------- dark theme (default) -------- */
  --bg:         #161616;
  --surface:    #202020;
  --surface-2:  #242423;
  --text:       #ffffff;
  --text-muted: #a19f9c;
  --text-faint: #7e7c77;
  --separator:  #32312e;
  --border:     #32312e;

  /* accent — shared across themes */
  --gold:        #9e7a43;
  --gold-hover:  #54442d;
  --red:         #b22323;
  --red-hover:   #791a1a;
  --marker:      #95830d;

  /* typography */
  --font-display: "ITC Garamond", "Cormorant Garamond", Garamond,
                  "Times New Roman", serif;
  --font-ui: "Söhne", "Basis Grotesque", -apple-system, "Helvetica Neue",
             "Segoe UI", Arial, sans-serif;
  --weight-body: 300;
  --weight-medium: 400;
  --tracking-caps: 0.14em;

  /* rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.75rem;
  --space-5: 3rem;
  --radius: 2px;
  --hairline: 1px solid var(--separator);
  --transition: 0.25s ease;

  /* form/control colors derived per theme */
  --control-bg: var(--surface-2);
  --control-border: #3a3936;
  --focus-ring: 0 0 0 2px rgba(158, 122, 67, 0.55);

  color-scheme: dark;
}

html[data-theme="light"] {
  /* -------- light "paper" theme -------- */
  --bg:         #f1efea;
  --surface:    #fdfcf9;
  --surface-2:  #f8f5f0;
  --text:       #32312e;
  --text-muted: #7e7c77;
  --text-faint: #a19f9c;
  --separator:  #dad1c9;
  --border:     #d5d2cb;

  --control-bg: #fdfcf9;
  --control-border: #d5d2cb;

  color-scheme: light;
}
