:root {
  --ink: #211225;
  --muted: #625969;
  --paper: #f7f4ef;
  --card: #ffffff;
  --line: #ded7df;
  --brand: #a40047;
  --brand-dark: #710031;
  --danger: #a40047;
  --soft: #fff4dd;
  --windsor-gold: #fdb413;
  --windsor-charcoal: #333333;
}

html {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(253, 180, 19, .12), rgba(253, 180, 19, 0) 18rem),
    var(--paper);
}

a {
  color: var(--brand);
}

.site-header {
  max-width: none;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  background: #ffffff;
  border-bottom: 1px solid rgba(33, 18, 37, .12);
  box-shadow: 0 16px 34px rgba(33, 18, 37, .07);
}

.site-header nav a {
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: var(--brand);
}

.brand {
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand span {
  background: var(--brand);
  border-radius: 0;
  box-shadow: inset 0 -5px 0 var(--windsor-gold);
  font-weight: 800;
}

.page-shell {
  padding-top: clamp(2.5rem, 6vw, 5rem);
}

.home-banner {
  margin: 0 0 clamp(2rem, 5vw, 4rem);
}

.home-banner img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(33, 18, 37, .12);
  background: #ffffff;
  box-shadow: 0 22px 44px rgba(33, 18, 37, .08);
}

.hero {
  max-width: 820px;
}

.hero h1,
.admin-heading h1 {
  font-family: "Roboto Slab", Georgia, serif;
  color: var(--ink);
  letter-spacing: 0;
}

.home-title span {
  display: block;
}

.home-title span:first-child {
  font-size: 1em;
}

.home-title span:last-child {
  margin-top: .15em;
  font-size: .58em;
  line-height: 1.15;
}

.hero p,
.admin-heading p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  color: var(--brand) !important;
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.action-panel,
.booking-form,
.login-card,
.table-wrap,
.service-card,
.form-section,
.booking-form > fieldset {
  border-color: rgba(33, 18, 37, .14);
  border-radius: 0;
  box-shadow: 0 22px 44px rgba(33, 18, 37, .08);
}

.booking-form > fieldset,
.form-section {
  border: 1px solid rgba(33, 18, 37, .14);
  background: #ffffff;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1.35rem;
}

.booking-form > fieldset > legend {
  float: left;
}

.booking-form > fieldset > legend + * {
  clear: both;
}

.action-panel {
  border-top: 5px solid var(--windsor-gold);
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 9.5rem auto 9.5rem;
  grid-template-rows: auto 3.15rem;
  align-items: stretch;
  column-gap: .85rem;
  row-gap: .4rem;
}

.action-panel .find-form {
  display: contents;
}

.action-panel .find-form > div {
  display: contents;
}

.action-panel .find-form label {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  align-self: end;
}

.action-panel .find-form input {
  grid-column: 1;
  grid-row: 2;
}

.action-panel .find-form [data-valmsg-for] {
  grid-column: 1 / -1;
  grid-row: 3;
}

.action-panel .find-form .button {
  grid-column: 2;
  grid-row: 2;
}

.action-panel input,
.action-panel .button {
  box-sizing: border-box;
  height: 3.15rem;
  min-height: 3.15rem;
  border-width: 1px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  vertical-align: middle;
}

.action-panel .button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.action-panel .divider {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  place-items: center;
  padding: 0;
}

.action-panel > .button {
  grid-column: 4;
  grid-row: 2;
}

label,
th {
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

input,
select {
  border-color: #cfc6d2;
  border-radius: 0;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(253, 180, 19, .38);
}

.button {
  min-height: 2.95rem;
  border-color: var(--brand);
  border-radius: 0;
  background: var(--brand);
  font-family: Helvetica, Arial, sans-serif;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.button:hover,
.button:focus {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.button.secondary {
  border-color: var(--ink);
  color: var(--ink);
}

.button.secondary:hover,
.button.secondary:focus {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.button.danger {
  border-color: var(--brand);
  color: var(--brand);
}

.button.danger:hover,
.button.danger:focus {
  background: var(--brand);
  color: #ffffff;
}

.notice {
  border-left-color: var(--windsor-gold);
  border-radius: 0;
  background: #fff8e8;
  color: var(--ink);
}

.notice-reference,
.form-heading h1,
.form-heading h2,
fieldset > legend,
.login-card h1,
.audit-section h2 {
  font-family: "Roboto Slab", Georgia, serif;
  letter-spacing: 0;
}

fieldset > legend {
  color: var(--brand);
}

.booking-form > fieldset > legend,
.section-title {
  position: relative;
  display: block;
  margin: calc(clamp(1rem, 3vw, 1.5rem) * -1) calc(clamp(1rem, 3vw, 1.5rem) * -1) 1.25rem;
  padding: .85rem clamp(1rem, 3vw, 1.5rem) .8rem;
  border-bottom: 1px solid rgba(33, 18, 37, .12);
  background: linear-gradient(90deg, rgba(253, 180, 19, .18), rgba(253, 180, 19, .04));
  color: var(--brand);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.booking-form > fieldset > legend::before,
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: .35rem;
  background: var(--windsor-gold);
}

.section-title {
  width: 100%;
}

.section-title + .service-grid {
  margin-top: 0;
}

.services-section {
  margin-bottom: 1.35rem;
}

.services-section .service-grid {
  margin-top: 0;
}

.services-section .service-card {
  margin-bottom: 0;
  box-shadow: none;
}

textarea {
  border-color: #cfc6d2;
  border-radius: 0;
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(253, 180, 19, .38);
}

.booking-reference {
  font-family: "SF Mono", "Cascadia Code", "Roboto Mono", "Liberation Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: .01em;
}

.service-card input {
  accent-color: var(--brand);
}

.service-card label {
  min-height: 3.35rem;
}

.service-card label span {
  min-height: 1.9rem;
  align-content: center;
}

.team-member-name {
  display: block;
  color: var(--brand);
  font-weight: 800;
  text-align: center;
  min-height: 1rem;
}

.confirmation-actions {
  display: grid;
  gap: .65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(33, 18, 37, .14);
  justify-items: center;
  text-align: center;
  align-self: start;
}

.confirmation-state {
  color: var(--muted);
  font-family: Helvetica, Arial, sans-serif;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.confirmation-state.confirmed {
  color: #1d6f36;
}

.confirmation-state.unconfirmed {
  color: var(--brand);
}

.small-button {
  min-height: 2.35rem;
  width: 100%;
  padding: .5rem .7rem;
  font-size: .72rem;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(33, 18, 37, .58);
  backdrop-filter: blur(4px);
}

.app-modal {
  position: relative;
  width: min(100%, 32rem);
  border-top: .4rem solid var(--windsor-gold);
  background: #ffffff;
  box-shadow: 0 2rem 5rem rgba(33, 18, 37, .28);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.app-modal h2 {
  margin: .15rem 2rem .75rem 0;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.app-modal p:not(.eyebrow) {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.modal-input-wrap {
  margin: 0 0 1.35rem;
}

.modal-input-wrap span {
  display: block;
  margin-bottom: .45rem;
  font-family: Helvetica, Arial, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

.modal-actions .button {
  min-width: 8rem;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-actions form {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.settings-form {
  display: grid;
  gap: 1rem;
}

.settings-form h2 {
  margin: 0;
  font-family: "Roboto Slab", Georgia, serif;
}

.settings-table form {
  margin: 0;
}

.settings-table .small-button {
  width: auto;
}

.contact-email-settings {
  margin-top: 1.35rem;
}

.contact-email-settings form {
  display: grid;
  gap: 1rem;
}

.password-settings {
  margin-top: 1.35rem;
}

.settings-stack {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.password-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.password-modal-form {
  display: grid;
  gap: 1rem;
}

.password-modal .modal-actions {
  margin-top: .5rem;
}

.form-hint {
  margin: 0;
  color: var(--muted);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr 3.1rem;
  align-items: stretch;
}

.password-field input {
  border-right: 0;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  background: var(--soft);
  outline: none;
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

@media (max-width: 760px) {
  .action-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 3.15rem 3.15rem 3.15rem;
  }

  .action-panel .find-form label,
  .action-panel .find-form input,
  .action-panel .find-form .button,
  .action-panel > .button {
    grid-column: 1;
  }

  .action-panel .find-form label {
    grid-row: 1;
  }

  .action-panel .find-form input {
    grid-row: 2;
  }

  .action-panel .find-form .button {
    grid-row: 3;
  }

  .action-panel > .button {
    grid-row: 4;
  }

  .action-panel .button {
    width: 100%;
  }

  .action-panel .divider {
    display: none;
  }

  .admin-actions,
  .settings-grid {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }
}

.status {
  border-radius: 0;
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status.active {
  background: #fff0c8;
  color: #6f4300;
}

.status.cancelled {
  background: #f6dde8;
  color: var(--brand-dark);
}

.status.submitted {
  background: #e7eef8;
  color: #1d4f7a;
}

.status.can-delete {
  background: #333333;
  color: #ffffff;
}

.service-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-height: 1.65rem;
}

.service-key {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: .25rem solid var(--windsor-gold);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 23, 18, .06);
}

.service-key h2 {
  margin: 0 0 .75rem;
  color: var(--brand-dark);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.2;
}

.service-key-items {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}

.service-key-items div {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.table-wrap {
  overflow: visible;
}

.service-indicator {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #000000;
  background: #ffffff;
  color: #211225;
  font-family: Helvetica, Arial, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}

.service-indicator[data-tooltip] {
  cursor: help;
}

.service-indicator[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + .55rem);
  z-index: 20;
  min-width: max-content;
  max-width: 14rem;
  transform: translateX(-50%) translateY(.25rem);
  padding: .45rem .65rem;
  background: var(--ink);
  color: #ffffff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transition: opacity .15s ease, transform .15s ease;
}

.service-indicator[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + .28rem);
  z-index: 21;
  width: .5rem;
  height: .5rem;
  transform: translateX(-50%) rotate(45deg);
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.service-indicator[data-tooltip]:hover::after,
.service-indicator[data-tooltip]:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.service-indicator[data-tooltip]:hover::before,
.service-indicator[data-tooltip]:focus::before {
  opacity: 1;
}

.service-indicator.team.confirmed {
  background: #248a43;
  color: #ffffff;
}

.service-indicator.training.confirmed {
  background: #1f6fb2;
  color: #ffffff;
}

@media (max-width: 760px) {
  .table-wrap {
    overflow: auto;
  }
}

.site-footer {
  max-width: none;
  margin-top: 2rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 0;
  background: var(--windsor-charcoal);
  color: #ffffff;
}

.site-footer span:first-child {
  color: var(--windsor-gold);
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-dot {
  background: var(--brand);
}

.timeline article:before {
  border-left-color: rgba(164, 0, 71, .35);
}

.timeline pre {
  border-left: 4px solid var(--windsor-gold);
  border-radius: 0;
  background: #f2eef3;
}
