/* Hamro Ramro design tokens v1, three layers: primitive → semantic → component.
   Source: design/hamro-ramro-tokens-v1.md (Mei Lin, 2026-10-19) and the client brand guideline.
   Brand primitives come from the guideline; derived values are drafts open for the UI round. */

/* Fonts: Noto Sans (variable, latin + latin-ext) and Noto Sans Devanagari, self-hosted woff2, SIL OFL 1.1 */
@font-face {
  font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/noto-sans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/noto-sans-latin-wght-normal.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: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/noto-sans-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/noto-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2-variations"), url("../fonts/noto-sans-devanagari-devanagari-wght-normal.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

:root {
  /* ---------- 1. Primitive (raw values; never used directly in components) ---------- */
  --hr-red: #E50510;          /* brand */
  --hr-red-700: #C4040E;      /* derived: hover */
  --hr-red-800: #B8030D;      /* derived: pressed, small red text */
  --hr-red-50: #FDE7E8;       /* derived: selected tint */
  --hr-white: #FFFFFF;        /* brand */
  --hr-gold: #F5A611;         /* brand: rules and accents only, never text on light */
  --hr-cream: #FFF7E8;        /* brand */
  --hr-ink: #242020;          /* brand */
  --hr-ink-600: #5E5656;      /* derived: muted text 7.1:1 */
  --hr-ink-400: #8C8181;      /* derived: input borders 3.8:1 */
  --hr-sand-200: #D9CFC0;     /* derived: decorative dividers only */
  --hr-sand-100: #F4F1EC;
  --hr-error: #B42318;        /* derived: always with icon + text */
  --hr-error-50: #FDECEA;
  --hr-success: #1D6B3A;
  --hr-success-50: #EAF4EE;
  --hr-warning: #8A5A00;
  --hr-warning-50: #FFF3DC;
  --hr-info: #1F5FA8;
  --hr-info-50: #EEF4FB;

  /* ---------- 2. Semantic (meaning; components use these) ---------- */
  --color-surface: var(--hr-white);
  --color-surface-alt: var(--hr-cream);
  --color-surface-inverse: var(--hr-ink);
  --color-text: var(--hr-ink);
  --color-text-muted: var(--hr-ink-600);
  --color-text-on-action: var(--hr-white);   /* white on red: 16 px+, weight 500+ only */
  --color-action-primary: var(--hr-red);
  --color-action-primary-hover: var(--hr-red-700);
  --color-action-primary-pressed: var(--hr-red-800);
  --color-link: var(--hr-red-800);
  --color-selected-bg: var(--hr-red-50);
  --color-selected-fg: var(--hr-red-800);
  --color-border: var(--hr-sand-200);
  --color-border-strong: var(--hr-ink-400);
  --color-disabled-bg: #EFEAE3;
  --color-accent-rule: var(--hr-gold);
  --color-focus: var(--hr-ink);
  --color-danger: var(--hr-error);
  --color-danger-bg: var(--hr-error-50);
  --color-success: var(--hr-success);
  --color-success-bg: var(--hr-success-50);
  --color-warning: var(--hr-warning);
  --color-warning-bg: var(--hr-warning-50);
  --color-info: var(--hr-info);
  --color-info-bg: var(--hr-info-50);

  /* semantic additions (derived, draft) */
  --color-danger-hover: #8F1C13;
  --color-danger-border: var(--hr-error);
  --color-success-border: #B9D9C4;
  --color-info-border: #A9C4E4;
  --color-warning-border: #E4C27A;
  --color-disabled-fg: #B6ACA0;
  --color-neutral-bg: var(--hr-sand-100);
  --color-chip-hover: #F1E6D3;
  --color-icon-placeholder: #A79C8E;
  --color-skeleton: #F1ECE4;
  --color-skeleton-shine: #F8F4EE;
  --color-toast-icon: #7FD19C;          /* on ink only */
  --color-canvas: var(--hr-cream);      /* page background behind cards (admin r1 premium pass) */
  --color-row-hover: #FFFBF3;           /* table row hover: lighter than cream */
  --color-border-subtle: #EDE3D2;       /* card edge on cream; decorative */
  --color-on-inverse-muted: #D8D0C6;    /* secondary text on ink 10.6:1 */
  --color-scrim: rgba(36, 32, 32, 0.48);
  --color-switch-off: var(--hr-ink-400); /* 3.8:1 on white (non-text) */
  --color-switch-on: var(--hr-success);

  --font-sans: "Noto Sans", "Noto Sans Devanagari", system-ui, "Segoe UI", Arial, sans-serif;
  --type-h1: 1.75rem; --type-h2: 1.5rem; --type-h3: 1.25rem;
  --type-body: 1rem; --type-label: 0.875rem; --type-small: 0.8125rem;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(36, 32, 32, 0.08), 0 1px 3px rgba(36, 32, 32, 0.06);
  --shadow-2: 0 8px 24px rgba(36, 32, 32, 0.16);
  --z-sticky: 30; --z-menu: 40; --z-drawer: 50; --z-toast: 80; --z-dialog: 90; --z-skip: 100;
  --motion-fast: 150ms; --motion-base: 200ms; --motion-slow: 320ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);       /* arriving: matches public-r1 */
  --ease-in: cubic-bezier(.4, 0, 1, 1);           /* leaving */
  --press-scale: 0.97;                            /* button press */
  --shadow-card: 0 1px 2px rgba(36, 32, 32, 0.05), 0 8px 24px -14px rgba(36, 32, 32, 0.18);
  --shadow-card-hover: 0 2px 4px rgba(36, 32, 32, 0.06), 0 16px 32px -16px rgba(36, 32, 32, 0.28);
  --shadow-pop: 0 18px 48px -12px rgba(36, 32, 32, 0.32);
  --type-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --type-eyebrow: 0.75rem;

  /* ---------- 3. Component ---------- */
  --tap: 44px;                                   /* minimum target */
  --btn-height: var(--tap);
  --btn-radius: var(--radius-sm);
  --btn-primary-bg: var(--color-action-primary);
  --btn-primary-bg-hover: var(--color-action-primary-hover);
  --btn-primary-fg: var(--color-text-on-action);
  --input-height: var(--tap);
  --input-border: var(--color-border-strong);
  --input-border-error: var(--color-danger);
  --focus-ring: 2px solid var(--color-focus);
  --focus-offset: 2px;
  --logo-min: 160px;                             /* guideline p.4 */
  --header-logo: var(--logo-min);               /* white brand header: 160 px phone/tablet, 176 px desktop */
  --container: 1360px;
  --radius-card: 14px;
  --thumb: 56px;
  --switch-w: 40px; --switch-h: 24px;
  --action-bar-height: 68px;
}
@media (min-width: 1024px) {
  :root { --type-h1: 2.25rem; --type-h2: 1.875rem; --type-h3: 1.25rem; --type-label: 0.9375rem; --type-small: 0.875rem; --header-logo: 176px; }
}
