/*
 * Reset, typography and form defaults.
 * No inline styles are allowed by the Content Security Policy, so every
 * visual state lives in a class.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: 40px; letter-spacing: -0.03em; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* Forms */
label, .label-like { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: #6A6A72; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
input.invalid, textarea.invalid, select.invalid { border-color: var(--red); background: var(--red-soft); }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
textarea.short { min-height: 72px; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--violet); }
