:root {
  --red: #c8352b;
  --red-dark: #9d2820;
  --red-tint: #fdf0ef;
  --ink: #1c2024;
  --body: #3f4750;
  --muted: #7a848d;
  --line: #e2e6ea;
  --card: #ffffff;
  --page: #f4f6f8;
  --green: #1a7f4b;
  --green-tint: #eaf6ef;
  --amber-tint: #fff6e5;
  --amber-line: #e0a02a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 25, 30, .06), 0 4px 14px rgba(20, 25, 30, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 400 17px/1.55 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(940px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1200px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 {
  font-family: "Roboto Condensed", Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .4em;
}
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--red-dark); }

/* --- Header / footer --- */
.site-header { background: var(--ink); border-bottom: 4px solid var(--red); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 7px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 38px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong {
  font: 800 18px/1.15 "Roboto Condensed", sans-serif;
  color: #fff; letter-spacing: .01em;
}
.brand-text small { color: #a8b2bb; font-size: 12.5px; letter-spacing: .04em; }

.site-footer {
  margin-top: 56px; padding: 30px 0 38px;
  border-top: 1px solid var(--line); background: #fff;
  font-size: 14.5px; color: var(--muted);
}
.footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, max-content));
  gap: 20px 72px;
}
.footer-col h4 {
  margin: 0 0 8px;
  font: 700 13px/1.4 "Roboto Condensed", Roboto, sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.footer-col p { margin: 0 0 5px; }
.footer-col p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--muted); text-decoration-color: #ccd3da; }
.site-footer a:hover { color: var(--ink); }

main.wrap { padding: 32px 0 8px; }

/* --- Cards --- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card-tight { padding: 18px 20px; }

.lede { font-size: 18.5px; color: var(--body); max-width: 65ch; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }

/* --- Visit type choice --- */
.choices { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.choice {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: border-color .12s, transform .12s, box-shadow .12s;
}
.choice:hover, .choice:focus-visible {
  border-color: var(--red); transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(200, 53, 43, .13);
}
.choice h2 { margin-bottom: .2em; }
.choice .where { color: var(--muted); font-size: 15px; margin-bottom: .7em; }
.choice p { flex: 1; font-size: 15.5px; }
.choice .duration {
  display: inline-block; align-self: flex-start; margin-top: 6px;
  background: var(--red-tint); color: var(--red-dark);
  border-radius: 999px; padding: 4px 13px;
  font: 700 13.5px/1 Roboto, sans-serif; letter-spacing: .03em;
}

/* --- Date tabs --- */
.datebar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.dateweek { display: flex; flex-wrap: wrap; gap: 8px; }
.datebar a {
  display: block; padding: 9px 15px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--body);
  text-decoration: none; font: 700 15px/1.25 "Roboto Condensed", sans-serif;
  letter-spacing: .03em;
}
.datebar a:hover { border-color: var(--muted); }
.datebar a.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- Slot grid --- */
.slots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.slot {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 13px 8px; text-align: center;
  font: 700 17px/1.2 Roboto, sans-serif; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.slot small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 3px; }
.slot:hover { border-color: var(--red); }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot:has(input:checked) {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 2px 10px rgba(200, 53, 43, .3);
}
.slot:has(input:checked) small { color: rgba(255, 255, 255, .85); }
.slot:has(input:focus-visible) { outline: 3px solid rgba(200, 53, 43, .35); outline-offset: 2px; }

/* --- Forms --- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 5px; }
.field label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px;
  color: var(--ink); background: #fff;
  border: 1px solid #ccd3da; border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 53, 43, .15);
}
textarea { min-height: 84px; resize: vertical; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--red); color: #fff; border-radius: 8px;
  padding: 13px 26px; text-decoration: none;
  font: 700 17px/1.2 "Roboto Condensed", sans-serif; letter-spacing: .04em;
  text-transform: uppercase;
}
.btn:hover { background: var(--red-dark); }
.btn-ghost { background: #fff; color: var(--body); border: 1px solid #ccd3da; }
.btn-ghost:hover { background: #f0f3f6; color: var(--ink); }
.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-danger { background: #fff; color: var(--red-dark); border: 1px solid #e3aeaa; }
.btn-danger:hover { background: var(--red-tint); }

/* --- Flash / callouts --- */
.flash, .callout {
  border-radius: 8px; padding: 13px 17px; margin-bottom: 18px;
  border-left: 4px solid var(--muted); background: #fff; font-size: 16px;
}
.flash-error, .callout-error { background: var(--red-tint); border-left-color: var(--red); color: #7d211a; }
.flash-ok, .callout-ok { background: var(--green-tint); border-left-color: var(--green); color: #10633a; }
.callout-warn { background: var(--amber-tint); border-left-color: var(--amber-line); color: #7a5410; }

/* --- Booking summary --- */
.summary { border-left: 4px solid var(--red); background: var(--red-tint); }
.summary.is-cancelled { border-left-color: var(--muted); background: #f1f3f5; }
.summary .when { font: 800 27px/1.25 "Roboto Condensed", sans-serif; color: var(--ink); }
.summary .what { font-size: 17px; color: var(--body); }

.deets { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 7px 20px; font-size: 16px; }
.deets dt { color: var(--muted); }
.deets dd { margin: 0; color: var(--ink); }

.linkbox {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #f4f6f8; border: 1px dashed #c6ced6; border-radius: 8px; padding: 11px 14px;
}
.linkbox code { font-size: 14px; word-break: break-all; color: var(--ink); flex: 1; min-width: 200px; }

.badge {
  display: inline-block; border-radius: 999px; padding: 3px 11px;
  font: 700 12.5px/1.5 Roboto, sans-serif; letter-spacing: .05em; text-transform: uppercase;
}
.badge-ok { background: var(--green-tint); color: var(--green); }
.badge-off { background: #edf0f2; color: var(--muted); }
.badge-school { background: #e8f0fb; color: #1d4e89; }
.badge-station { background: #fdf0ef; color: var(--red-dark); }

/* --- Tables --- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th {
  text-align: left; padding: 9px 12px; border-bottom: 2px solid var(--line);
  font: 700 13px/1.4 Roboto, sans-serif; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }

/* --- Admin --- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font: 800 32px/1 "Roboto Condensed", sans-serif; color: var(--ink); }
.stat .k { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.daysheet + .daysheet { margin-top: 26px; }
.daysheet h3 { padding-bottom: 7px; border-bottom: 2px solid var(--line); }

@media (max-width: 600px) {
  h1 { font-size: 28px; }
  .card { padding: 20px 18px; }
  main.wrap { padding-top: 22px; }
}
