
*, *::before, *::after { box-sizing: border-box; }
:root {
  --text: #1c1f23;
  --muted: #5b636b;
  --bg: #ffffff;
  --surface: #f3f4f6;
  --border: #c9ced4;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --danger: #a3261b;
  --info-bg: #e7f0f7;
  --success-bg: #e5f3e8;
  --success: #1e6b33;
  --error-bg: #fbe9e7;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header p { margin: 0; padding: 0.75rem 1rem; max-width: 40rem; margin-inline: auto; font-weight: 600; }
main { max-width: 40rem; margin-inline: auto; padding: 1rem; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 1.5rem 0 0.5rem; }
.subtitle { color: var(--muted); margin: -0.5rem 0 1rem; }

.flash { border-radius: 0.5rem; padding: 0.75rem 1rem; margin: 0 0 1rem; border-left: 0.3rem solid var(--accent); background: var(--info-bg); }
.flash-success { border-color: var(--success); background: var(--success-bg); }
.flash-error { border-color: var(--danger); background: var(--error-bg); }

form { margin: 0 0 1rem; }
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field .hint { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.25rem; }
input, select, textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg);
  color: inherit;
  /* 16 px minimum: iOS zooms into smaller inputs. */
  font: inherit;
  font-size: max(1rem, 16px);
}
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 1.25rem; min-height: 1.25rem; margin: 0 0.5rem 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button-secondary { background: var(--bg); color: var(--accent); }
.button-danger { background: var(--danger); border-color: var(--danger); }
.button-block { width: 100%; }

@media (min-width: 48rem) {
  h1 { font-size: 1.75rem; }
  main { padding: 1.5rem 1rem; }
}
