:root {
  --waiver-ink: #18312b;
  --waiver-muted: #64716d;
  --waiver-primary: #255f96;
  --waiver-primary-dark: #194a78;
  --waiver-accent: #e9b949;
  --waiver-canvas: #f4f6f1;
  --waiver-card: #ffffff;
  --waiver-border: #dce3dd;
}

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--waiver-ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(233, 185, 73, 0.14), transparent 24rem),
    var(--waiver-canvas);
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--waiver-border);
  backdrop-filter: blur(8px);
}

.navbar-brand {
  color: var(--waiver-ink);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.admin-link {
  margin-left: auto;
  color: var(--waiver-primary);
  font-weight: 650;
}

.site-main {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.site-footer {
  padding: 1.5rem 0;
  color: var(--waiver-muted);
  border-top: 1px solid var(--waiver-border);
  background: rgba(255, 255, 255, 0.72);
}

.waiver-shell {
  max-width: 960px;
  margin: 0 auto;
}

.waiver-hero {
  padding: clamp(1.35rem, 4vw, 3rem);
  color: white;
  background:
    linear-gradient(125deg, rgba(18, 57, 94, 0.98), rgba(42, 91, 139, 0.94)),
    #174a78;
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 22px 60px rgba(11, 33, 61, 0.18);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--waiver-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.waiver-hero h1,
.confirmation-shell h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.waiver-hero h1 {
  font-size: clamp(1.45rem, 3.2vw, 2.3rem);
}

.waiver-hero p {
  max-width: 42rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.08rem;
}

.waiver-form {
  overflow: hidden;
  background: var(--waiver-card);
  border-radius: 0 0 1.5rem 1.5rem;
  box-shadow: 0 22px 60px rgba(25, 55, 47, 0.16);
}

.waiver-form > .alert {
  margin: 2rem 2rem 0;
}

.validation-summary-valid {
  display: none;
}

.form-section {
  padding: clamp(1.5rem, 5vw, 3.25rem);
  border-bottom: 1px solid var(--waiver-border);
}

.form-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-heading > span {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 2.3rem;
  place-items: center;
  color: var(--waiver-primary);
  background: #e8f3ef;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--waiver-muted);
}

.form-label {
  margin-bottom: 0.4rem;
  font-weight: 650;
}

.required-indicator {
  margin-left: 0.15rem;
  color: #b42318;
  font-weight: 800;
}

.optional-label {
  margin-left: 0.3rem;
  color: var(--waiver-muted);
  font-size: 0.78rem;
}

.form-control {
  min-height: 3rem;
  border-color: #cbd5ce;
  border-radius: 0.7rem;
}

.form-control:focus,
.form-check-input:focus,
.btn:focus-visible {
  border-color: var(--waiver-primary);
  box-shadow: 0 0 0 0.24rem rgba(23, 107, 87, 0.15);
}

.btn-primary {
  --bs-btn-bg: var(--waiver-primary);
  --bs-btn-border-color: var(--waiver-primary);
  --bs-btn-hover-bg: var(--waiver-primary-dark);
  --bs-btn-hover-border-color: var(--waiver-primary-dark);
  --bs-btn-disabled-bg: #7894ae;
  --bs-btn-disabled-border-color: #7894ae;
}

.btn-outline-primary {
  --bs-btn-color: var(--waiver-primary);
  --bs-btn-border-color: var(--waiver-primary);
  --bs-btn-hover-bg: var(--waiver-primary);
  --bs-btn-hover-border-color: var(--waiver-primary);
}

[data-remove-family] {
  color: var(--waiver-primary) !important;
}

.family-member-card {
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: #f8faf7;
  border: 1px solid var(--waiver-border);
  border-radius: 0.9rem;
}

.family-member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.family-member-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.agreement-panel {
  max-height: 24rem;
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.7;
  background: #fbfcfa;
  border: 1px solid var(--waiver-border);
  border-radius: 0.9rem;
}

.agreement-panel h1,
.agreement-panel h2,
.agreement-panel h3 {
  font-size: 1.2rem;
  font-weight: 750;
}

.agreement-unavailable {
  color: #7b5b11;
  background: #fff8df;
  border-color: #f0d689;
}

.agreement-check {
  padding: 1.25rem 1.25rem 1.25rem 3rem;
  background: #f2f7f4;
  border-radius: 0.8rem;
}

.agreement-check .form-check-input {
  margin-left: -1.75rem;
}

.signature-input {
  font-size: 1.1rem;
}

.submit-waiver {
  width: 100%;
  min-height: 3.6rem;
  margin-top: 2rem;
  border-radius: 0.8rem;
  font-weight: 750;
}

.confirmation-shell {
  max-width: 760px;
  padding: clamp(2rem, 7vw, 5rem);
  margin: 3rem auto;
  text-align: center;
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 22px 60px rgba(25, 55, 47, 0.14);
}

.confirmation-mark {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
  place-items: center;
  color: white;
  background: var(--waiver-primary);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
}

.confirmation-lead {
  color: var(--waiver-muted);
  font-size: 1.1rem;
}

.confirmation-details {
  margin: 2.5rem 0;
  text-align: left;
  border-top: 1px solid var(--waiver-border);
}

.confirmation-details div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) 1.3fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--waiver-border);
}

.confirmation-details dt {
  color: var(--waiver-muted);
  font-weight: 600;
}

.confirmation-details dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.reference-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.admin-login {
  max-width: 430px;
  padding: 2rem;
  margin: 3rem auto;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(25, 55, 47, 0.14);
}

.admin-login h1,
.admin-shell h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 750;
}

.admin-shell {
  width: calc(100vw - 2rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  margin-left: calc(50% - 50vw + 1rem);
  background: white;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(25, 55, 47, 0.12);
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-table-wrap {
  max-height: 70vh;
  overflow-x: visible;
}

.admin-table-wrap thead {
  position: sticky;
  top: 0;
  background: #eef4f9;
}

.admin-table-wrap th,
.admin-table-wrap td {
  overflow-wrap: anywhere;
  font-size: clamp(0.72rem, 0.8vw, 0.9rem);
}

.admin-table-wrap table {
  width: 100%;
  table-layout: fixed;
}

.admin-table-wrap th a {
  color: var(--waiver-primary-dark);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .site-main {
    padding-top: 0;
  }

  .site-main > .container {
    padding: 0;
  }

  .waiver-hero,
  .waiver-form {
    border-radius: 0;
  }

  .section-heading-action {
    flex-wrap: wrap;
  }

  .section-heading-action .btn {
    width: 100%;
    margin-left: 3.3rem !important;
  }

  .confirmation-shell {
    margin: 0;
    border-radius: 0;
  }

  .confirmation-details div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .admin-shell {
    width: 100%;
    margin-left: 0;
    border-radius: 0;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }

  .admin-table-wrap table {
    min-width: 70rem;
    table-layout: auto;
  }
}
