/* Reset, typography and form controls. */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
}

h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1 { font-size: var(--text-xl); line-height: 1.25; }
h2 { font-size: var(--text-lg); line-height: 1.3; }
h3 { font-size: var(--text-md); line-height: 1.35; }
ul { padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
small { font-size: var(--text-xs); color: var(--muted); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

/* Forms */
.field { display: grid; gap: var(--s1); font-size: var(--text-sm); font-weight: 600; }
.field small { font-weight: 400; }

input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  font: inherit;
  font-size: 16px; /* stops iOS zoom on focus */
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  appearance: none;
}

select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23746a62' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; padding: 0; accent-color: var(--brand); appearance: auto; }

.check { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); font-weight: 500; }

.form { display: grid; gap: var(--s4); }
.form--2col { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form--2col { grid-template-columns: 1fr 1fr; } .form--2col > .full { grid-column: 1 / -1; } }
