@font-face {
  font-family: "Gotham";
  src: local("Gotham Book"), local("Gotham-Book");
  font-weight: 400;
  /* Some installed Gotham editions have an oversized non-breaking-space glyph. */
  unicode-range: U+0000-009F, U+00A1-202E, U+2030-10FFFF;
}

@font-face {
  font-family: "Gotham";
  src: local("Gotham Bold"), local("Gotham-Bold"), local("GothamSSm-Bold");
  font-weight: 700;
  unicode-range: U+0000-009F, U+00A1-202E, U+2030-10FFFF;
}

/* Inter 4.1, SIL OFL: /shared/inter-OFL.txt. No external font requests. */
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-variable-v4.1.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Shared type scale; component layouts retain their own hierarchy. */
:root {
  /* Approved system palette, shared by every ShambaPass surface. */
  --sp-forest: #0b2d19;
  --sp-deep: #082313;
  --sp-green: #376344;
  --sp-accent-text: #285333;
  --sp-lime: #a7de33;
  --sp-brand-pale: #fefff8;
  --sp-surface: #fcfdfb;
  --sp-soft: #f3f6f1;
  --sp-card: #ffffff;
  --sp-text: #111827;
  --sp-heading: var(--sp-forest);
  --sp-muted: #6b7280;
  --sp-border: rgba(11,45,25,.12);
  --sp-border-strong: rgba(11,45,25,.22);
  --sp-control-border: color-mix(in srgb, var(--sp-text) 50%, var(--sp-card));
  --sp-space-1: 4px;
  --sp-space-2: 8px;
  --sp-space-3: 12px;
  --sp-space-4: 16px;
  --sp-space-5: 20px;
  --sp-space-6: 24px;
  --sp-space-8: 32px;
  --sp-control-height: 44px;
  --sp-panel-padding: 24px;
  --sp-page-gap: 24px;
  --sp-radius: 8px;
  --sp-panel-radius: 14px;
  --sp-dashboard-panel-radius: 20px;
  --sp-dashboard-metric-radius: 16px;
  --sp-shadow: 0 3px 16px rgba(11,45,25,.045);
  --font-brand: 'Gotham', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: var(--font-brand);
  --sp-font-family: var(--font-brand);
  --type-display: clamp(2rem, 3.6vw, 3.5rem);
  --type-h1: clamp(1.75rem, 3vw, 3rem);
  --type-h2: clamp(1.5rem, 2.5vw, 2.25rem);
  --type-h3: clamp(1.25rem, 2vw, 1.75rem);
  --type-form-heading: clamp(1.75rem, 2.5vw, 2.125rem);
  --type-app-heading: clamp(1.75rem, 3vw, 2.625rem);
  --type-h4: clamp(1.125rem, 1.6vw, 1.375rem);
  --type-subheading: clamp(1rem, 1.4vw, 1.25rem);
  --type-body-large: clamp(1rem, 1.2vw, 1.125rem);
  --type-body: 1rem;
  --type-body-small: .875rem;
  --type-caption: .8125rem;
  --type-button: clamp(.8125rem, 1vw, .9375rem);
  --type-form-label: .8125rem;
  --type-input: 1rem;
  --type-nav: .875rem;
  --type-kpi-value: clamp(1.75rem, 2.6vw, 2.5rem);
  --type-kpi-label: .8125rem;
  --type-table-heading: .8125rem;
  --type-table-body: .875rem;
  --type-notification: .875rem;
  --type-helper: .8125rem;
  --line-heading: 1.2;
  --line-body: 1.6;
  --line-control: 1.35;
  --motion-fast: 180ms;
  --motion-card: 280ms;
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
}

:where(h1, h2, h3) {
  font-family: var(--font-heading);
}

[data-theme="dark"] {
  --sp-accent-text: #8dd98d;
  --sp-surface: #04130a;
  --sp-soft: #123521;
  --sp-card: #092718;
  --sp-text: #f0f7f4;
  --sp-heading: var(--sp-text);
  --sp-muted: #8aa398;
  --sp-border: #21422b;
  --sp-border-strong: #2a5c37;
  --sp-shadow: 0 3px 16px rgba(0,0,0,.15);
}

/* Shared content sizing across farm, admin, veterinary and public cards.
   Let cards grow/wrap; never conceal financial text to make a layout fit. */
:is(.card,.card-sm,.stat-card,.module-stat,.command-kpi,.command-widget,
    .institutional-card,.institutional-cards article,.platform-admin-metrics article,
    .market-card,.market-panel,.market-profile,.market-registration-card,.directory-card,
    .feeding-metric,.health-stat,.net-stat-box,.vet-holding-card,.protocol-card,
    .utility-metrics article,.farm-focus-card,.calculator-card,
    .project-card,.project-summary article,.project-metrics>div) {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
:is(.card,.card-sm,.stat-card,.module-stat,.command-kpi,.command-widget,
    .institutional-card,.institutional-cards article,.platform-admin-metrics article,
    .market-card,.market-panel,.market-profile,.market-registration-card,.directory-card,
    .feeding-metric,.health-stat,.net-stat-box,.vet-holding-card,.protocol-card,
    .utility-metrics article,.farm-focus-card,.calculator-card,
    .project-card,.project-summary article,.project-metrics>div) > :where(div,section,header,footer,dl) {
  min-inline-size: 0;
}
:is(.card,.card-sm,.stat-card,.module-stat,.command-kpi,.command-widget,
    .institutional-card,.institutional-cards article,.platform-admin-metrics article,
    .market-card,.market-panel,.market-profile,.market-registration-card,.directory-card,
    .feeding-metric,.health-stat,.net-stat-box,.vet-holding-card,.protocol-card,
    .utility-metrics article,.farm-focus-card,.calculator-card,
    .project-card,.project-summary article,.project-metrics>div)
    :where(h1,h2,h3,h4,p,dt,dd,strong) {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
