/* Design tokens for every surface (www, app, admin, demo).
   One family: warm paper, ink, hairlines, one peach accent, four status colors.
   Consume these; do not redefine them per surface. Density switches with
   data-density="compact" on <html> or any container (district app, owner console). */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin.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: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/public-sans-latin.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: "Public Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Surfaces */
  --paper: #fdfcfa;        /* page ground */
  --surface: #ffffff;      /* cards, inputs */
  --sunk: #f6f3ee;         /* wells, table heads, board columns */

  /* Ink. All three pass 4.5:1 on paper, surface and sunk. */
  --ink: #1b1917;          /* 17:1 on paper */
  --ink-hover: #38342f;    /* primary button hover */
  --ink-2: #4d4943;        /* 8.6:1, secondary text */
  --ink-3: #69645d;        /* 5.7:1, captions and meta; never lighter */

  /* Lines */
  --line: #e6e1d9;         /* hairlines, card borders */
  --line-strong: #948c80;  /* input borders, 3:1 on paper for control boundaries */

  /* The one accent. Use once per page. */
  --accent: #fbe1d1;
  --accent-ink: #5d2a1a;   /* 9.3:1 on accent */

  /* Status. Always pair with an icon and a text label. */
  --overdue-bg: #fbebe7;   --overdue-ink: #9b2c1f;
  --soon-bg: #faefd6;      --soon-ink: #7a4f00;
  --ontrack-bg: #e7f2ec;   --ontrack-ink: #1f6243;
  --imminent-bg: #8f1d14;  --imminent-ink: #ffffff;

  /* Type */
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --text-display: clamp(2.75rem, 1.6rem + 4.6vw, 5rem);
  --text-h1: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --text-h2: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --text-h3: 1.375rem;
  --text-lead: 1.25rem;
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-meta: 0.8125rem;
  --leading-tight: 1.06;
  --leading-heading: 1.15;
  --leading-body: 1.6;

  /* Space (4px base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;

  /* Shape */
  --r-card: 24px;
  --r-inner: 14px;
  --r-control: 12px;
  --r-small: 8px;          /* focus rings, board cards, menu rows */
  --r-pill: 999px;
  --shadow-float: 0 1px 2px rgb(27 25 23 / 0.04), 0 12px 28px -16px rgb(27 25 23 / 0.14);

  /* Component metrics that change with density */
  --control-h: 3rem;
  --card-pad: var(--s-6);
  --row-pad: var(--s-4);

  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);        /* entering, exiting, press feedback */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* something moving or resizing on screen */
}

/* Denser metrics for the district app and owner console. */
[data-density="compact"] {
  --text-body: 0.9375rem;
  --text-small: 0.875rem;
  --text-h2: 1.5rem;
  --text-h3: 1.125rem;
  --leading-body: 1.5;
  --control-h: 2.25rem;
  --card-pad: var(--s-5);
  --row-pad: var(--s-3);
  --r-card: 16px;
  --r-inner: 10px;
  --r-control: 8px;
}
