:root {
  --red: #b8192a;
  --red-dark: #8d1020;
  --ink: #22252a;
  --muted: #69717d;
  --line: #d9dde3;
  --soft: #f3f5f7;
  --white: #ffffff;
  --green: #1f8f5f;
  --amber: #c98512;
  --shadow: 0 12px 34px rgba(27, 34, 44, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 16px;
  top: 8px;
  z-index: 5;
  background: var(--white);
  color: var(--red);
  padding: 8px 10px;
}

.site-header {
  background: var(--white);
  border-top: 5px solid var(--red);
  box-shadow: 0 2px 16px rgba(29, 33, 39, 0.08);
}

.topbar,
.brand-row,
.layout,
.status-band,
.info-band,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.brand-row {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 22px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

nav a {
  padding: 12px 13px;
  color: #2d333b;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

nav a:hover,
nav a:focus {
  color: var(--red);
}

.hero {
  min-height: 270px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(21, 27, 34, 0.86), rgba(21, 27, 34, 0.52)),
    url("header.png");
  background-position: center 62%;
  background-size: cover;
  color: var(--white);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 54px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffced4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 4px;
  font-size: 20px;
}

.lead {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
}

.status-band {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: -28px;
  padding: 18px 20px;
  background: var(--white);
  border-left: 5px solid var(--red);
  box-shadow: var(--shadow);
}

.status-band strong,
.status-band span {
  display: block;
}

.status-band span {
  color: var(--muted);
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 34px 0;
  align-items: start;
}

.times-panel,
.registration-panel,
.info-band {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(27, 34, 44, 0.06);
}

.times-panel {
  padding: 24px;
}

.registration-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 999px;
}

.dot.open {
  background: var(--green);
}

.dot.limited {
  background: var(--amber);
}

.dot.full {
  background: var(--muted);
}

.timeslots {
  display: grid;
  gap: 20px;
  padding-top: 20px;
}

.day-group {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.day-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.day-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.day-heading time {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.slot-button {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.slot-button:hover,
.slot-button:focus {
  border-color: var(--red);
  box-shadow: 0 5px 14px rgba(184, 25, 42, 0.13);
  outline: none;
}

.slot-button.selected {
  border-color: var(--red);
  border-left-color: var(--red);
  background: #fff5f6;
}

.slot-button.limited {
  border-left-color: var(--amber);
}

.slot-button.full {
  border-left-color: var(--muted);
  background: #f7f8f9;
  color: var(--muted);
  cursor: not-allowed;
}

.slot-time {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.slot-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.registrations {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.form-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.form-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #3b424b;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd3da;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  outline: 3px solid rgba(184, 25, 42, 0.15);
}

button {
  font: inherit;
}

.primary-button,
.text-button {
  min-height: 44px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--red);
  color: var(--white);
  padding: 12px 16px;
}

.primary-button:hover,
.primary-button:focus,
.text-button:hover,
.text-button:focus {
  background: var(--red-dark);
  color: var(--white);
  outline: none;
}

.primary-button:disabled {
  background: #b8bec7;
  cursor: not-allowed;
}

.text-button {
  flex: 0 0 auto;
  background: #eef1f4;
  color: var(--ink);
  padding: 10px 14px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-message.success {
  color: var(--green);
  font-weight: 700;
}

.form-message.error {
  color: var(--red);
  font-weight: 700;
}

.loading,
.empty-state {
  padding: 24px;
  background: #f8f9fa;
  border: 1px dashed #c8ced6;
  color: var(--muted);
}

.info-band {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-bottom: 36px;
  padding: 24px;
}

code {
  background: #eef1f4;
  padding: 2px 5px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 880px) {
  .brand-row,
  .section-heading,
  .status-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .layout,
  .info-band {
    grid-template-columns: 1fr;
  }

  .registration-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .topbar {
    justify-content: flex-start;
  }

  .brand-row {
    padding: 14px 0;
  }

  .brand strong {
    font-size: 19px;
  }

  nav a {
    padding: 9px 8px;
  }

  .hero {
    min-height: 250px;
  }

  .times-panel,
  .registration-panel,
  .info-band {
    padding: 18px;
  }

  .slot-grid {
    grid-template-columns: 1fr;
  }
}
