/* Reset, document base, scrollbars, and form-control primitives.
   Light Zavation branding, all colors come from tokens.css. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* The hidden attribute always wins. Without this, any rule that sets display (a flex bar,
   an inline-block button) quietly un-hides an element the script meant to hide. */
[hidden] { display: none !important; }

/* Read by screen readers, not shown. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--panel-2); }
::-webkit-scrollbar-thumb { background: #c7ccd2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #adb4bb; }

label {
  display: block; font-size: 10px; color: var(--muted); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px;
}
label .req { color: var(--zv-red); margin-left: 3px; }

input, select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--border); color: var(--text-strong);
  border-radius: 5px; padding: 9px 12px; font-size: 13px; font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--zv-red);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input.error, select.error { background: var(--zv-red-wash); border-color: var(--zv-red); }

select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23636466'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
select option { background: var(--panel); color: var(--text-strong); }
select optgroup { color: var(--muted); font-style: normal; }
textarea { resize: vertical; font-family: inherit; }

.helper-text { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Every number in the app resolves through here. Lining + tabular so figures
   sit on the baseline and columns line up. .num is the hook for a table cell
   that carries a value. */
.num, .stat-value, .wl-num, .forecast-table td.metric {
  font-family: var(--font-num);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-weight: 600;
}
