/* ==========================================================================
   Ur Abode design tokens (docs/DESIGN_SYSTEM.md): colour, type, space, radius, shadow.
   Neutral first. One primary (deep forest) for actions; terracotta only for money-attention states; slate only for
   information; success/warning/danger are proper states. Light by default; dark follows prefers-color-scheme unless the
   visitor chose a theme (html[data-theme], set by static/js/theme.js). Every text/background pair here meets WCAG AA.
   Templates use the SEMANTIC tokens (--surface, --text-2, --action ...), never raw hex.
   ========================================================================== */

/* Fonts: self-hosted (static/vendor/fonts), latin subset. Inter is one variable file (weight 400 to 700, optical size 14 to 32),
   so headings get Inter Display automatically at large sizes (font-optical-sizing). Instrument Serif is the italic accent word. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../vendor/fonts/inter-normal-latin.4b73e2ff3024.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../vendor/fonts/instrument-serif-italic-latin.bc891bdd08ad.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../vendor/fonts/instrument-serif-normal-latin.9b8dd1ecf641.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Arial sized to Inter's metrics, so text doesn't reflow (layout shift) when the web font swaps in. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107%; ascent-override: 90.5%; descent-override: 22.5%; line-gap-override: 0%; }

:root {
  color-scheme: light;

  /* ---- Raw scales (used to build the semantic tokens below; not for templates) ---- */
  --n-0: #FFFFFF; --n-25: #FBFBF9; --n-50: #F6F6F2; --n-100: #EEEEE8; --n-200: #E7E7E0; --n-300: #D0D0C6; --n-400: #A6A69B;
  --n-500: #797970; --n-600: #5A5A52; --n-700: #414139; --n-800: #292924; --n-900: #191915; --n-950: #10100D;
  --p-50: #F2F7EF; --p-100: #E2EDDB; --p-200: #C6DBB8; --p-300: #A2C08D; --p-400: #7EA366; --p-500: #628749; --p-600: #4B6C38;
  --p-700: #3B562D; --p-800: #2F4525; --p-900: #24351D;
  --t-50: #FCF1EC; --t-100: #F6DDD2; --t-200: #EDBCA6; --t-300: #E19A79; --t-400: #D47E58; --t-500: #C46A45; --t-600: #AD5636;
  --t-700: #8E4429; --t-800: #6F3520;
  --s-50: #F1F5F8; --s-100: #DFE8EF; --s-200: #BFD0DD; --s-500: #5F7F98; --s-600: #4A667C; --s-700: #3B5265;

  /* ---- Semantic colour ---- */
  --bg: var(--n-25);
  --surface: var(--n-0);
  --surface-2: var(--n-50);
  --surface-3: var(--n-100);
  --line: var(--n-200);
  --line-strong: var(--n-300);
  --text: var(--n-900);
  --text-2: var(--n-600);          /* 7.2:1 on --surface */
  --text-3: #64645B;               /* 6.1:1 on --surface, 5.7:1 on --bg, 4.7:1 on the tinted hero wash */
  --action: var(--p-700);          /* primary buttons, links, selected states: 8.6:1 with white */
  --action-hover: var(--p-800);
  --action-fg: #FFFFFF;
  --action-soft: var(--p-50);
  --action-soft-line: var(--p-200);
  --link: var(--p-700);
  --money: var(--t-700);           /* money attention text: 7.1:1 on --money-bg */
  --money-bg: var(--t-50);
  --money-line: var(--t-200);
  --money-solid: var(--t-500);
  --info: var(--s-700);
  --info-bg: var(--s-50);
  --info-line: var(--s-200);
  --success: #1F7A4C;  --success-bg: #E6F4EC;  --success-line: #B5DEC6;
  --warning: #8A5300;  --warning-bg: #FDF1DC;  --warning-line: #F0D5A0;
  --danger: #B4321F;   --danger-bg: #FBEAE7;   --danger-line: #F1BDB4;
  --focus: var(--p-700);
  --scrim: rgba(16, 16, 13, .48);

  /* ---- Glass (only on the marketing navbar, popovers, modals, the palette, toasts and hero product cards) ---- */
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-line: rgba(25, 25, 21, .08);
  --glass-solid: var(--n-0);
  --glass-blur: 16px;

  /* ---- Elevation ---- */
  --sh-xs: 0 1px 1px rgba(25, 25, 21, .04);
  --sh-sm: 0 1px 2px rgba(25, 25, 21, .06), 0 1px 1px rgba(25, 25, 21, .03);
  --sh-md: 0 2px 4px -1px rgba(25, 25, 21, .05), 0 8px 20px -6px rgba(25, 25, 21, .10);
  --sh-lg: 0 4px 8px -2px rgba(25, 25, 21, .05), 0 24px 48px -12px rgba(25, 25, 21, .20);

  /* ---- Type ---- */
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem; --fs-16: 1rem; --fs-18: 1.125rem; --fs-20: 1.25rem;
  --fs-24: 1.5rem; --fs-30: 1.875rem; --fs-38: 2.375rem; --fs-48: 3rem; --fs-60: 3.75rem; --fs-72: 4.5rem;

  /* ---- Space (4 px grid) ---- */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem;
  --s-12: 3rem; --s-16: 4rem; --s-20: 5rem; --s-24: 6rem;

  /* ---- Shape ---- */
  --r-1: 6px;      /* buttons, inputs, small controls */
  --r-2: 10px;     /* cards, tables, menus */
  --r-3: 14px;     /* modals, large panels, hero cards */
  --r-pill: 999px; /* badges and chips only */
  --control-h: 2.5rem;      /* 40 px */
  --control-h-lg: 2.75rem;  /* 44 px */
  --control-h-sm: 2rem;     /* 32 px */
  --topbar-h: 3.5rem;
  --sidebar-w: 15.5rem;
  --sidebar-w-rail: 4rem;

  /* ---- Focus ring: 2 px ring, 2 px offset ---- */
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus);

  /* Logo colours by role (docs/logo-options); dark themes and the .ua-logo--* variants recolour them. */
  --ua-logo-tile: #2F3E2C; --ua-logo-glyph: #F4F0E5; --ua-logo-roof: #C87553; --ua-logo-text: #2F3E2C; --ua-logo-accent: #C87553; --ua-logo-sheen: 1;

  /* ---- Bootstrap bridge ---- */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: .9375rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-emphasis-color: var(--text);
  --bs-secondary-color: var(--text-2);
  --bs-tertiary-color: var(--text-3);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--r-1);
  --bs-border-radius-sm: var(--r-1);
  --bs-border-radius-lg: var(--r-2);
  --bs-border-radius-xl: var(--r-3);
  --bs-link-color: var(--link);
  --bs-link-color-rgb: 59, 86, 45;
  --bs-link-hover-color: var(--action-hover);
  --bs-link-hover-color-rgb: 47, 69, 37;
  --bs-primary: var(--action);
  --bs-primary-rgb: 59, 86, 45;
  --bs-success: var(--success);
  --bs-success-rgb: 31, 122, 76;
  --bs-warning: var(--warning);
  --bs-warning-rgb: 138, 83, 0;
  --bs-danger: var(--danger);
  --bs-danger-rgb: 180, 50, 31;
  --bs-info: var(--info);
  --bs-info-rgb: 59, 82, 101;
  --bs-focus-ring-color: rgba(59, 86, 45, .35);
}

/* ---- Dark theme: system preference (unless the visitor chose light) or an explicit choice ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E100D; --surface: #1A1E17; --surface-2: #21261E; --surface-3: #292F25;
    --line: #262B23; --line-strong: #363C32;
    --text: #EDEFE9; --text-2: #A9AEA1; --text-3: #9AA093;
    --action: #A2C08D; --action-hover: #B7D0A5; --action-fg: #14200F; --action-soft: #1B2617; --action-soft-line: #33452B; --link: #A2C08D;
    --money: #E8A184; --money-bg: #2A1A13; --money-line: #5A3626; --money-solid: #D47E58;
    --info: #A9C3D6; --info-bg: #15202A; --info-line: #2C4053;
    --success: #5CC08A; --success-bg: #12261B; --success-line: #245A3D;
    --warning: #E6B056; --warning-bg: #2A2110; --warning-line: #5A4520;
    --danger: #F08A78; --danger-bg: #2B1512; --danger-line: #5E2B24;
    --focus: #A2C08D; --scrim: rgba(0, 0, 0, .6);
    --glass-bg: rgba(26, 30, 23, .72); --glass-line: rgba(255, 255, 255, .09); --glass-solid: #1D221A;
    --sh-xs: 0 1px 1px rgba(0, 0, 0, .3); --sh-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --sh-md: 0 2px 4px -1px rgba(0, 0, 0, .3), 0 8px 20px -6px rgba(0, 0, 0, .5);
    --sh-lg: 0 4px 8px -2px rgba(0, 0, 0, .3), 0 24px 48px -12px rgba(0, 0, 0, .7);
    --ua-logo-tile: #3B5236; --ua-logo-glyph: #F4F0E5; --ua-logo-roof: #E0946F; --ua-logo-text: #F4F0E5; --ua-logo-accent: #E0946F;
    --bs-link-color-rgb: 162, 192, 141; --bs-link-hover-color-rgb: 183, 208, 165;
    --bs-primary-rgb: 162, 192, 141; --bs-success-rgb: 92, 192, 138; --bs-warning-rgb: 230, 176, 86; --bs-danger-rgb: 240, 138, 120; --bs-info-rgb: 169, 195, 214;
    --bs-focus-ring-color: rgba(162, 192, 141, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E100D; --surface: #1A1E17; --surface-2: #21261E; --surface-3: #292F25;
  --line: #262B23; --line-strong: #363C32;
  --text: #EDEFE9; --text-2: #A9AEA1; --text-3: #9AA093;
  --action: #A2C08D; --action-hover: #B7D0A5; --action-fg: #14200F; --action-soft: #1B2617; --action-soft-line: #33452B; --link: #A2C08D;
  --money: #E8A184; --money-bg: #2A1A13; --money-line: #5A3626; --money-solid: #D47E58;
  --info: #A9C3D6; --info-bg: #15202A; --info-line: #2C4053;
  --success: #5CC08A; --success-bg: #12261B; --success-line: #245A3D;
  --warning: #E6B056; --warning-bg: #2A2110; --warning-line: #5A4520;
  --danger: #F08A78; --danger-bg: #2B1512; --danger-line: #5E2B24;
  --focus: #A2C08D; --scrim: rgba(0, 0, 0, .6);
  --glass-bg: rgba(26, 30, 23, .72); --glass-line: rgba(255, 255, 255, .09); --glass-solid: #1D221A;
  --sh-xs: 0 1px 1px rgba(0, 0, 0, .3); --sh-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-md: 0 2px 4px -1px rgba(0, 0, 0, .3), 0 8px 20px -6px rgba(0, 0, 0, .5);
  --sh-lg: 0 4px 8px -2px rgba(0, 0, 0, .3), 0 24px 48px -12px rgba(0, 0, 0, .7);
  --ua-logo-tile: #3B5236; --ua-logo-glyph: #F4F0E5; --ua-logo-roof: #E0946F; --ua-logo-text: #F4F0E5; --ua-logo-accent: #E0946F;
  --bs-link-color-rgb: 162, 192, 141; --bs-link-hover-color-rgb: 183, 208, 165;
  --bs-primary-rgb: 162, 192, 141; --bs-success-rgb: 92, 192, 138; --bs-warning-rgb: 230, 176, 86; --bs-danger-rgb: 240, 138, 120; --bs-info-rgb: 169, 195, 214;
  --bs-focus-ring-color: rgba(162, 192, 141, .4);
}

/* ==========================================================================
   Atmosphere and motion tokens (docs/DESIGN_SYSTEM.md, "Atmosphere and motion"): layered backgrounds, glows, an elevation scale, motion timing.
   Light and dark are tuned separately (the dark glows are deeper and quieter), not inverted. Used by css/atmosphere.css only.
   ========================================================================== */
:root {
  --atmo-a: color-mix(in srgb, var(--p-300) 52%, transparent);   /* forest light */
  --atmo-b: color-mix(in srgb, var(--t-200) 52%, transparent);   /* terracotta glow */
  --atmo-c: color-mix(in srgb, var(--s-200) 62%, transparent);   /* slate haze */
  --atmo-spot: color-mix(in srgb, var(--p-200) 44%, transparent); /* the radial spotlight behind a heading */
  --atmo-dot: color-mix(in srgb, var(--n-900) 13%, transparent);
  --atmo-grain: .045;
  --atmo-seam: color-mix(in srgb, var(--p-500) 36%, transparent); /* gradient hairline between sections */
  --atmo-wash: color-mix(in srgb, var(--p-100) 55%, var(--bg));   /* the soft band behind an alternate section */
  --hl: rgba(255, 255, 255, .85);                                  /* inner highlight on a card's top edge */
  --line-hi: rgba(255, 255, 255, .95);
  --glow: color-mix(in srgb, var(--action) 38%, transparent);
  --elev-1: 0 1px 2px rgba(25, 25, 21, .05), 0 1px 1px rgba(25, 25, 21, .03);
  --elev-2: 0 1px 2px rgba(25, 25, 21, .04), 0 4px 10px -3px rgba(25, 25, 21, .08), 0 10px 22px -10px rgba(25, 25, 21, .10);
  --elev-3: 0 2px 4px rgba(25, 25, 21, .04), 0 10px 20px -6px rgba(25, 25, 21, .10), 0 24px 40px -16px rgba(25, 25, 21, .16);
  --elev-4: 0 4px 8px rgba(25, 25, 21, .05), 0 18px 32px -8px rgba(25, 25, 21, .14), 0 40px 64px -24px rgba(25, 25, 21, .22);
  --dur-atmo: 46s; --ease-drift: cubic-bezier(.45, .05, .55, .95);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --atmo-a: color-mix(in srgb, var(--p-500) 30%, transparent); --atmo-b: color-mix(in srgb, var(--t-500) 20%, transparent); --atmo-c: color-mix(in srgb, var(--s-500) 26%, transparent);
    --atmo-spot: color-mix(in srgb, var(--p-400) 20%, transparent); --atmo-dot: rgba(255, 255, 255, .10); --atmo-grain: .07;
    --atmo-seam: color-mix(in srgb, var(--p-300) 30%, transparent); --atmo-wash: color-mix(in srgb, var(--p-900) 42%, var(--bg));
    --hl: rgba(255, 255, 255, .07); --line-hi: rgba(255, 255, 255, .14); --glow: color-mix(in srgb, var(--p-300) 34%, transparent);
    --elev-1: 0 1px 2px rgba(0, 0, 0, .35); --elev-2: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 14px -4px rgba(0, 0, 0, .45);
    --elev-3: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 26px -8px rgba(0, 0, 0, .55); --elev-4: 0 4px 8px rgba(0, 0, 0, .35), 0 28px 48px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --atmo-a: color-mix(in srgb, var(--p-500) 30%, transparent); --atmo-b: color-mix(in srgb, var(--t-500) 20%, transparent); --atmo-c: color-mix(in srgb, var(--s-500) 26%, transparent);
  --atmo-spot: color-mix(in srgb, var(--p-400) 20%, transparent); --atmo-dot: rgba(255, 255, 255, .10); --atmo-grain: .07;
  --atmo-seam: color-mix(in srgb, var(--p-300) 30%, transparent); --atmo-wash: color-mix(in srgb, var(--p-900) 42%, var(--bg));
  --hl: rgba(255, 255, 255, .07); --line-hi: rgba(255, 255, 255, .14); --glow: color-mix(in srgb, var(--p-300) 34%, transparent);
  --elev-1: 0 1px 2px rgba(0, 0, 0, .35); --elev-2: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 14px -4px rgba(0, 0, 0, .45);
  --elev-3: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 26px -8px rgba(0, 0, 0, .55); --elev-4: 0 4px 8px rgba(0, 0, 0, .35), 0 28px 48px -12px rgba(0, 0, 0, .7);
}
