/* Shared design tokens and base components (form + dashboard). Light theme only. */

/* Anek Gujarati (SIL OFL 1.1, see /static/fonts/OFL.txt), self-hosted. One family covers English and
   Gujarati; each file downloads only when the page uses characters from its range. Width fixed at 100,
   weight variable 100–800. Hindi text typed by citizens falls back to the system Devanagari font. */
@font-face {
  font-family: "Anek Gujarati"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/anek-gujarati-gujarati.woff2) format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
}
@font-face {
  font-family: "Anek Gujarati"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/anek-gujarati-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anek Gujarati"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/anek-gujarati-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;
}

:root {
  color-scheme: light;
  --paper: #f3eee2;
  --paper-2: #ece5d5;
  --card: #fbf8f0;
  --line: #e2dac8;
  --line-strong: #cfc5b0;
  --ink: #1c251e;
  --ink-2: #4a544c;
  --muted: #7a8277;
  --green-900: #16362a;
  --green-800: #1d4434;
  --green-700: #24553d;
  --green-500: #3f7a58;
  --green-100: #dfe9df;
  --critical: #a3321f;
  --critical-bg: #f6e1da;
  --warning: #8a5a0b;
  --warning-bg: #f5e7c8;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 0 rgba(28, 37, 30, .04), 0 1px 3px rgba(28, 37, 30, .06);
  --font: "Anek Gujarati", "Noto Sans Gujarati", "Noto Sans Devanagari", "Kohinoor Devanagari", system-ui, sans-serif;
  /* kept as aliases so headings and body share the one family */
  --serif: var(--font);
  --sans: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font); font-weight: 650; letter-spacing: -.005em; margin: 0; }
a { color: var(--green-700); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .62em 1.05em; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-900); }
.btn-outline { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { padding: .42em .8em; font-size: 13.5px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--green-700); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }

input, textarea, select {
  font: inherit; color: var(--ink); width: 100%;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .65em .8em;
}
input:focus, textarea:focus, select:focus, .btn:focus-visible, .link:focus-visible {
  outline: 2px solid var(--green-500); outline-offset: 1px;
}
label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: .35em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hint { color: var(--muted); font-size: 13px; margin: .35em 0 0; }
.error { color: var(--critical); font-size: 14px; font-weight: 600; min-height: 1em; margin: .6em 0 0; }
.opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }

.tag { display: inline-flex; align-items: center; gap: .3em; font-size: 12px; font-weight: 700; padding: .15em .55em; border-radius: 999px; white-space: nowrap; }
.tag-urgent { color: var(--critical); background: var(--critical-bg); }
.tag-rising { color: var(--warning); background: var(--warning-bg); }
.tag-neutral { color: var(--ink-2); background: var(--paper-2); }
.tag-sample { color: var(--ink-2); background: var(--paper-2); font-weight: 600; }
