:root {
  --ink: #16213a;
  --muted: #5b6477;
  --line: #dde2ea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --brand: #16335c;
  --brand-ink: #ffffff;
  --accent: #1f6feb;
  --error-bg: #fdecec;
  --error-ink: #8a1c1c;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }

header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: var(--brand); color: var(--brand-ink);
}
.brand { color: var(--brand-ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand span { font-weight: 400; opacity: 0.8; margin-left: 6px; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
nav a, nav .link { color: var(--brand-ink); text-decoration: none; font-size: 0.95rem; }
nav a:hover, nav .link:hover { text-decoration: underline; }
nav form { margin: 0; }

main { max-width: 960px; margin: 0 auto; padding: 28px 24px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 18px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }
a { color: var(--accent); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.narrow { max-width: 440px; }
.error { background: var(--error-bg); color: var(--error-ink); border-radius: var(--radius); padding: 12px 16px; }
[role="status"] { background: #eaf4ea; border-radius: var(--radius); padding: 12px 16px; }
.hint { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type="email"], input[type="tel"], input:not([type]), textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #9cc2ff; outline-offset: 1px; }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-weight: 600; margin-bottom: 6px; }
.choice { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 4px 0; }
.choice input { margin-top: 4px; }
.consent { background: var(--bg); border-radius: 8px; padding: 12px; }

button, .button {
  display: inline-block; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
  color: #fff; background: var(--accent); border: 0; border-radius: 8px; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(0.93); }
nav .link { background: none; padding: 0; font-weight: 400; }
td form { display: inline-block; margin: 2px 4px 2px 0; }
td button { padding: 6px 10px; font-size: 0.85rem; background: #eef2f8; color: var(--ink); }
details summary { cursor: pointer; color: var(--accent); margin-top: 4px; }
details form { margin-top: 8px; min-width: 240px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile {
  display: block; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.tile:hover { border-color: var(--accent); }
.tile strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.tile span { color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); background: #fafbfd; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.badge-received { background: #eef2f8; color: #34425e; }
.badge-contacted { background: #e6f0ff; color: #1b4fa8; }
.badge-consultation-booked { background: #fff3d6; color: #7a5200; }
.badge-enrolled { background: #e3f5e8; color: #1d6b35; }
.badge-not-moving-forward { background: #f1f1f1; color: #5b5b5b; }

@media (max-width: 640px) {
  header { padding: 12px 16px; }
  main { padding: 20px 16px 48px; }
  .row { grid-template-columns: 1fr; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 4px 12px; }
}
