/* Palette lifted from 15outof10.org: navy #313042, teal #1AA9BD, cream #FFF8E5, orange #FF8F2B */
:root {
  --navy: #313042;
  --ink: #2c3e50;
  --teal: #1aa9bd;
  --teal-dark: #158a9a;
  --cream: #fff8e5;
  --orange: #ff8f2b;
  --green: #28c77b;
  --red: #b72929;
  --paper: #ffffff;
  --line: #e6e0cf;
  --muted: #6b6f76;
  --radius: 12px;
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; line-height: 1.45; min-height: 100vh;
  display: flex; flex-direction: column;
}
header.top {
  background: var(--navy); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
header.top img { height: 40px; display: block; filter: invert(1) brightness(2); }
header.top .who { color: #cfd3dd; font-size: 14px; display: flex; gap: 12px; align-items: center; }
header.top button.link { color: #fff; }
main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 24px 20px; box-shadow: 0 2px 12px rgba(49,48,66,.08); }
h1 { font-size: 26px; margin: 0 0 6px; color: var(--navy); line-height: 1.2; }
h2 { font-size: 20px; margin: 22px 0 8px; color: var(--navy); }
p.lead { margin: 0 0 18px; color: var(--muted); }
label { display: block; font-weight: 700; margin: 16px 0 6px; color: var(--navy); }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(26,169,189,.35); border-color: var(--teal); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.checks label { font-weight: 400; margin: 0; display: flex; gap: 8px; align-items: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row, .checks { grid-template-columns: 1fr; } }
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 13px 22px; cursor: pointer;
  background: var(--teal); color: #fff; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--teal-dark); }
button:disabled { opacity: .55; cursor: default; }
button.secondary, .btn.secondary { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
button.link { background: none; color: var(--teal); padding: 6px 4px; text-decoration: underline; font-weight: 600; }
.menu { display: grid; gap: 14px; margin-top: 18px; }
.menu a { display: block; padding: 20px; border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--navy); background: #fff; }
.menu a:hover { border-color: var(--teal); }
.menu a strong { display: block; font-size: 18px; }
.menu a span { color: var(--muted); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.notice { padding: 12px 14px; border-radius: 8px; margin: 14px 0; }
.notice.error { background: #fdeeee; color: var(--red); }
.notice.ok { background: #e9f9f1; color: #176b45; }
.notice.info { background: #e6f6f9; color: #0f5f6b; }
.hidden { display: none !important; }
.code { letter-spacing: .3em; font-size: 24px; text-align: center; }
.files { margin-top: 8px; font-size: 14px; color: var(--muted); }
.files li { margin: 2px 0; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress div { height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.vets { list-style: none; padding: 0; margin: 6px 0 0; border: 1px solid var(--line); border-radius: 8px; max-height: 220px; overflow: auto; }
.vets li { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.vets li:last-child { border-bottom: 0; }
.vets li:hover { background: var(--cream); }
.pill { display: inline-block; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 18px; }
footer a { color: var(--teal); }
.back { display: inline-block; margin-bottom: 12px; color: var(--teal); text-decoration: none; font-weight: 700; }

.overlay { position: fixed; inset: 0; background: rgba(255,248,229,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 50; }
.overlay p { margin: 0; font-weight: 700; color: var(--navy); font-size: 18px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dogrows { display: grid; gap: 10px; }
.dogrow { display: grid; grid-template-columns: 1fr 150px auto auto; gap: 8px; align-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.dogrow .age { display: flex; align-items: center; gap: 4px; }
.dogrow .age input { width: 64px; text-align: center; padding: 8px 4px; }
.dogrow .age button { padding: 6px 10px; border-radius: 8px; font-size: 18px; line-height: 1; }
.dogrow .sn { font-weight: 400; margin: 0; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.dogrow .rm { background: none; color: var(--red); padding: 6px 8px; font-size: 18px; line-height: 1; }
@media (max-width: 520px) { .dogrow { grid-template-columns: 1fr 1fr; } .dogrow input[type=text] { grid-column: 1 / -1; } }
