/* Taggz design tokens (web revamp, phases 1 and 2, November 2026).
   "Paper and forest": warm paper for reading, deep-green bands in the app's
   own green (#0A2A1E / #11402E, theme.dart), gold only as the fill of the one
   primary action (or text on green). Every text pair below was checked for
   WCAG AA (ratios in the comments).

   Everything is prefixed --tz-. Element styles apply only under body.tz,
   which every public page now uses (only /app still loads the older
   style.css, until phase 3). */

/* ---------- fonts: self-hosted, Latin subset, WOFF2 ----------
   Plus Jakarta Sans and Inter, the app's own fonts (taggz-mobile/assets/fonts),
   cut to Latin plus the cedi sign with fontTools (README, Fonts). SIL Open Font
   Licence: assets/fonts/OFL-*.txt. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Inter-Regular.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/Inter-Medium.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Inter-SemiBold.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Inter-Bold.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/PlusJakartaSans-Medium.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/PlusJakartaSans-SemiBold.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/PlusJakartaSans-Bold.woff2?v=20261118p2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/PlusJakartaSans-ExtraBold.woff2?v=20261118p2") format("woff2"); }

:root {
  /* brand: green */
  --tz-g-950: #061A12;
  --tz-g-900: #0A2A1E;          /* app ground, theme-color */
  --tz-g-800: #11402E;          /* app top */
  --tz-g-700: #134432;          /* app panel */
  --tz-g-600: #1B5A40;
  --tz-g-500: #1D7A3A;          /* kente green; white on it 5.39:1 */
  --tz-g-brand-text: #0F5A3A;   /* green text on paper 7.78:1 */
  --tz-g-100: #DDEBDD;
  --tz-g-50: #EEF5EF;
  /* brand: gold */
  --tz-gold-500: #E8B84A;       /* fill; --tz-on-gold on it 9.12:1 */
  --tz-gold-400: #F4CC6A;       /* hover, focus on green */
  --tz-gold-600: #E2A93B;
  --tz-gold-text: #8A5A00;      /* gold-family text on paper 5.59:1 */
  --tz-gold-100: #FBEFD2;
  --tz-on-gold: #2A1A05;
  /* kente (the stripe only) */
  --tz-k-green: #1D7A3A;
  --tz-k-gold: #E8B84A;
  --tz-k-red: #C22F20;
  --tz-k-black: #161010;

  /* light theme: the site's default */
  --tz-bg: #FBF8F1;             /* paper */
  --tz-bg-alt: #F3EBD6;         /* cream band */
  --tz-surface: #FFFFFF;
  --tz-surface-2: #F6F2E8;
  --tz-line: #E4DCC8;
  --tz-line-strong: #CFC4AA;
  --tz-ink: #14201A;            /* 15.8:1 on paper */
  --tz-ink-2: #55625A;          /* 6.0:1 on paper */
  --tz-link: #0F5A3A;
  --tz-focus: #0F5A3A;
  --tz-success: #145C2B;  --tz-success-bg: #DDEBDD;
  --tz-danger: #B3261E;
  --tz-warning: #8A5A00;  --tz-warning-bg: #FBEFD2;
  --tz-info: #1F5FA8;

  /* forest (dark) values, used by the green bands on any page */
  --tz-f-bg: #0A2A1E;
  --tz-f-top: #11402E;
  --tz-f-surface: #134432;
  --tz-f-surface-2: #18513B;
  --tz-f-line: #2A6E52;
  --tz-f-ink: #F6F1E4;          /* 13.7:1 on --tz-f-bg */
  --tz-f-ink-2: #B9CDBF;        /* 9.2:1; 6.6:1 on --tz-f-surface */
  --tz-f-accent: #E8B84A;       /* 8.35:1; 5.99:1 on --tz-f-surface */
  --tz-f-focus: #F4CC6A;

  /* type */
  --tz-font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tz-font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tz-fs-display-xl: clamp(40px, 6.4vw, 80px);
  --tz-fs-display: clamp(36px, 5vw, 56px);
  --tz-fs-h2: clamp(28px, 3.6vw, 40px);
  --tz-fs-h3: 22px;
  --tz-fs-h4: 18px;
  --tz-fs-body-lg: 19px;
  --tz-fs-body: 17px;
  --tz-fs-small: 14px;
  --tz-fs-label: 13px;

  /* space: 4px base */
  --tz-s-1: 4px;  --tz-s-2: 8px;  --tz-s-3: 12px; --tz-s-4: 16px; --tz-s-5: 24px;
  --tz-s-6: 32px; --tz-s-7: 48px; --tz-s-8: 64px; --tz-s-9: 96px; --tz-s-10: 128px;
  --tz-section-y: clamp(64px, 9vw, 128px);
  --tz-container: 1200px;
  --tz-measure: 68ch;
  --tz-gutter: max(16px, env(safe-area-inset-left, 0px));
  --tz-gutter-r: max(16px, env(safe-area-inset-right, 0px));

  /* radius */
  --tz-r-sm: 8px;    /* inputs, chips */
  --tz-r-md: 12px;   /* buttons */
  --tz-r-lg: 20px;   /* cards */
  --tz-r-xl: 32px;   /* feature panels, phones */
  --tz-r-pill: 999px;

  /* elevation (light surfaces only) */
  --tz-shadow: 0 1px 2px rgba(20, 32, 26, .06), 0 8px 24px rgba(20, 32, 26, .08);
  --tz-shadow-lg: 0 2px 4px rgba(20, 32, 26, .06), 0 24px 56px rgba(20, 32, 26, .16);

  /* motion */
  --tz-ease: cubic-bezier(.22, 1, .36, 1);
  --tz-t-ui: 150ms;
  --tz-t-reveal: 450ms;

  /* how far sticky things sit below the top: the header, plus the in-page
     contents bar on pages that have one (body.has-subnav) */
  --tz-stick: 64px;

  /* breakpoints, for reference (CSS can't use variables in media queries):
     480, 768, 1024, 1280 */
}

/* Dark theme values, for surfaces that follow the system setting (the portal
   and admin in later phases). The public site stays light. */
:root[data-theme="dark"] {
  --tz-bg: #0D1F17;  --tz-bg-alt: #12271D;  --tz-surface: #132B21;  --tz-surface-2: #18513B;
  --tz-line: #24463A;  --tz-line-strong: #2A6E52;
  --tz-ink: #F1ECDF;  --tz-ink-2: #AEC2B5;  --tz-link: #8FD9A8;  --tz-focus: #F4CC6A;
  --tz-gold-text: #F4CC6A;
  --tz-success: #8FD9A8;  --tz-danger: #EF9A90;  --tz-warning: #F4CC6A;
}

/* ---------- base, for pages on the new system (body.tz) ---------- */
body.tz {
  margin: 0;
  background: var(--tz-bg);
  color: var(--tz-ink);
  font: 400 var(--tz-fs-body)/1.55 var(--tz-font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color-scheme: light;
  overflow-x: clip;
}
.tz *, .tz *::before, .tz *::after { box-sizing: border-box; }
.tz img, .tz video, .tz svg { max-width: 100%; }
.tz img { height: auto; display: block; }
.tz h1, .tz h2, .tz h3, .tz h4 { font-family: var(--tz-font-display); margin: 0; text-wrap: balance; color: inherit; }
.tz h1 { font-size: var(--tz-fs-display); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; }
.tz h2 { font-size: var(--tz-fs-h2); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.tz h3 { font-size: var(--tz-fs-h3); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.tz h4 { font-size: var(--tz-fs-h4); font-weight: 700; line-height: 1.3; }
.tz p { margin: 0; text-wrap: pretty; }
.tz a { color: var(--tz-link); text-underline-offset: 3px; }
:where(.tz) :where(ul, ol) { margin: 0; padding: 0; }
.tz main { display: block; }
.tz :focus-visible { outline: 3px solid var(--tz-focus); outline-offset: 2px; border-radius: 6px; }
.tz .tz-forest :focus-visible, .tz-head :focus-visible, .tz-foot :focus-visible { outline-color: var(--tz-f-focus); }
.tz .fig, .tz-fig { font-family: var(--tz-font-text); font-variant-numeric: tabular-nums; }
.tz [hidden] { display: none !important; }
