/* LARSA: plain modern CSS. Phone first; no framework, no build step. */

:root {
  color-scheme: light dark;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #0f1c2a;
  --muted: #5b6b7b;
  --border: #e1e6ec;
  --border-strong: #c8d1da;
  --primary: #0f5c9e;
  --primary-hover: #0b4a80;
  --primary-soft: #e7f0f9;
  --primary-soft-hover: #d7e6f5;
  --on-primary: #ffffff;
  --ring: rgb(15 92 158 / 0.22);
  --header: #0f2a44;
  --on-header: #ffffff;
  --focus: #ffb703;
  --success-bg: #e6f6eb;
  --success: #17663a;
  --error-bg: #fdecea;
  --error: #a3241a;
  --danger: #c0362c;
  --on-danger: #ffffff;
  --info-bg: #e9f2fb;
  --info: #0b4a80;
  --star: #f5b400;
  --on-star: #3d2c00;
  --shadow: 0 1px 2px rgb(15 28 42 / 0.04), 0 6px 20px -8px rgb(15 28 42 / 0.1);
  --shadow-float: 0 10px 30px -10px rgb(15 28 42 / 0.3);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* Busyness bands: Good choice!, Some traffic, Busy, Expect delays! */
  --band-0: #d3f0dc;
  --band-0-edge: #2f8f55;
  --band-1: #f5efbd;
  --band-1-edge: #8c7d12;
  --band-2: #fcdcb4;
  --band-2-edge: #b4610e;
  --band-3: #f8c6c0;
  --band-3-edge: #b02a1e;
  --unavailable: repeating-linear-gradient(135deg, #eef1f4 0 5px, #e4e8ed 5px 10px);

  --radius: 16px;
  --radius-sm: 12px;
  --tap: 44px;
  --control: 3rem;
  --gap: 1rem;
  --tabbar: 4.25rem;
  --tabbar-space: 0px;
  font-size: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b131c;
    --surface: #131e2a;
    --surface-2: #1a2735;
    --text: #e6edf3;
    --muted: #9aabbb;
    --border: #233140;
    --border-strong: #34475a;
    --primary: #5aaaf0;
    --primary-hover: #7cbcf3;
    --primary-soft: #15304a;
    --primary-soft-hover: #1b3b5a;
    --on-primary: #06121d;
    --ring: rgb(90 170 240 / 0.3);
    --header: #08121b;
    --success-bg: #12301f;
    --success: #7fd9a0;
    --error-bg: #3a1714;
    --error: #ff9d92;
    --danger: #d9473a;
    --info-bg: #10263b;
    --info: #9fcbf3;
    --star: #ffc94d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-float: 0 10px 30px -10px rgb(0 0 0 / 0.7);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aabbb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --band-0: #1d4a30;
    --band-0-edge: #58c283;
    --band-1: #4a4515;
    --band-1-edge: #d8c94a;
    --band-2: #5a3815;
    --band-2-edge: #f0a04f;
    --band-3: #5c1f1a;
    --band-3-edge: #ff8a7d;
    --unavailable: repeating-linear-gradient(135deg, #1a2531 0 5px, #151f2a 5px 10px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-bottom: var(--tabbar-space);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui,
    Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.5rem, 1.25rem + 1.2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.125rem;
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
}

/* --- Layout --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header);
  color: var(--on-header);
  padding-top: env(safe-area-inset-top);
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 64rem;
  min-height: 3.5rem;
  margin: 0 auto;
  padding: 0.375rem max(1rem, env(safe-area-inset-right)) 0.375rem
    max(1rem, env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  margin-right: auto;
  color: inherit;
  font-size: 1.0625rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.brand small {
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
  opacity: 0.7;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 0.75rem;
  border-radius: 10px;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgb(255 255 255 / 0.12);
}

.site-nav .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 0.625rem;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.header-button:hover {
  background: rgb(255 255 255 / 0.12);
}

.header-button .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Icon only, with the label for screen readers and as a tooltip (title), so that the staff
   menu fits on one line. */
.header-button .label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.language-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
}

.language-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 2.5rem;
  min-height: 2.375rem;
  padding: 0 0.625rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.65;
  cursor: pointer;
}

.language-switch button:hover {
  opacity: 1;
}

.language-switch button[aria-pressed="true"] {
  background: rgb(255 255 255 / 0.16);
  opacity: 1;
}

.flag {
  width: 1.25rem;
  height: 0.875rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35);
}

/* Phones: flags only, and the signed-in menu becomes a tab bar along the bottom edge. */
@media (max-width: 47.99rem) {
  .language-switch button {
    padding: 0 0.5rem;
  }

  .language-switch button span {
    display: none;
  }

  /* Room for the install button's label, or for the guest links, beside the name. */
  .site-header:has([data-install]:not([hidden])) .header-button[data-install] .label {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }

  .site-header:has([data-install]:not([hidden])) .brand small,
  .site-header:has(.site-nav:not(.tabs) a) .brand small {
    display: none;
  }

  body:has(.site-nav.tabs) {
    --tabbar-space: calc(var(--tabbar) + env(safe-area-inset-bottom));
  }

  .site-nav.tabs {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 0;
    min-height: var(--tabbar);
    padding: 0.375rem max(0.25rem, env(safe-area-inset-right))
      calc(0.375rem + env(safe-area-inset-bottom)) max(0.25rem, env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    color: var(--muted);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
  }

  .site-nav.tabs a {
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.25rem;
    padding: 0.125rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
  }

  .site-nav.tabs a:hover {
    background: none;
  }

  .site-nav.tabs a span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav.tabs .icon {
    width: 3.5rem;
    height: 1.875rem;
    padding: 0.1875rem 0;
    border-radius: 999px;
    transition: background-color 0.15s;
  }

  .site-nav.tabs a[aria-current="page"] {
    background: none;
    color: var(--primary);
  }

  .site-nav.tabs a[aria-current="page"] .icon {
    background: var(--primary-soft);
  }
}

@media (min-width: 48rem) {
  .brand {
    margin-right: 1rem;
  }

  .site-nav {
    order: 1;
    margin-left: auto;
  }

  .language-switch {
    order: 2;
    margin-left: 0.5rem;
  }

  .header-actions {
    order: 3;
  }
}

/* Laptops: one line; should it still not fit, the airport's name gives way (ellipsis). */
@media (min-width: 64rem) {
  .site-header .inner {
    flex-wrap: nowrap;
  }

  .site-header .inner > :not(.brand) {
    flex-shrink: 0;
  }
}

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
}

.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.5rem max(1rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  color: var(--muted);
  font-size: 0.8125rem;
}

body:has(.site-nav.tabs) .site-footer {
  padding-bottom: 1.5rem;
}

.site-footer p {
  max-width: 40rem;
  margin: 0 0 0.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  align-items: center;
}

.footer-links a {
  color: inherit;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

/* Draft legal texts until the airport has reviewed them. */
.legal mark {
  background: var(--info-bg);
  color: var(--info);
  padding: 0 0.2em;
  border-radius: 3px;
}

.legal h2 {
  margin-top: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: var(--gap);
  box-shadow: var(--shadow);
}

@media (max-width: 29.99rem) {
  .card {
    padding: 1rem;
  }
}

.card > :last-child {
  margin-bottom: 0;
}

.stack > * + * {
  margin-top: var(--gap);
}

.stack > .card,
.columns > .card {
  margin-bottom: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.spread {
  justify-content: space-between;
}

.row.spread > h1,
.row.spread > h2 {
  margin-bottom: 0;
}

/* A page title with its actions beside it. */
.row.spread:has(> h1) {
  margin-bottom: 1rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.columns {
  display: grid;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

@media (min-width: 48rem) {
  .columns {
    grid-template-columns: minmax(16rem, 1fr) 2fr;
    align-items: start;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
  text-decoration: none;
}

.back-link + * {
  margin-top: 0;
}

p:has(> .back-link) {
  margin: -0.5rem 0 0.5rem;
}

/* --- Messages ------------------------------------------------------------- */

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.messages li,
.notice {
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: var(--radius-sm);
  margin: 0 0 0.75rem;
  background: var(--info-bg);
  color: var(--info);
}

.messages .success {
  background: var(--success-bg);
  color: var(--success);
}

.messages .error,
.errorlist,
.notice.error {
  background: var(--error-bg);
  color: var(--error);
}

.errorlist {
  list-style: none;
  padding: 0.5rem 0.75rem;
  margin: 0.375rem 0;
  border-radius: 10px;
  font-size: 0.875rem;
}

.notice ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.install-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-right: 0.25rem;
}

.install-hint p {
  flex: 1;
  margin: 0;
  padding-top: 0.125rem;
}

.dismiss {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.375rem 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}

.dismiss:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

/* --- Forms ---------------------------------------------------------------- */

label {
  font-weight: 600;
}

.field > label,
.field > div > label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}

input:not([type="radio"], [type="checkbox"], [type="hidden"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control);
  margin: 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: max(1rem, 16px); /* below 16px, iOS zooms in on focus */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

input:not([type="radio"], [type="checkbox"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

select {
  padding-right: 2.5rem;
  background-image: var(--chevron);
  background-position: right 0.875rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
}

select[multiple] {
  padding-right: 0.875rem;
  background-image: none;
}

/* iOS Safari gives date and time fields a native width that ignores width: 100%, so they
   stick out of the card on iPhones. Without the native look they size like other fields. */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  text-align: left;
}

input::-webkit-date-and-time-value {
  min-height: 1.4em;
  margin: 0;
  text-align: left;
}

input::-webkit-datetime-edit {
  padding: 0;
}

input[type="number"] {
  max-width: 9rem;
}

input[type="radio"],
input[type="checkbox"] {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--primary);
}

.field {
  margin-bottom: 1.125rem;
}

.field .helptext,
.helptext {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.field > .helptext,
.field > div > .helptext {
  margin: -0.125rem 0 0.375rem;
}

/* Two short fields side by side, also on phones. */
.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Closures: the times only apply to part of a day. */
#closure-form:has(input[name="whole_day"]:checked) .closure-times {
  display: none;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.125rem;
  min-width: 0;
}

legend {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  padding: 0;
}

.choices {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
}

@media (max-width: 29.99rem) {
  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choices.stacked {
  grid-template-columns: minmax(0, 1fr);
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--control);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.choice:hover {
  border-color: var(--primary);
}

.choice:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
  font-weight: 600;
}

/* :where() keeps the base button rule at zero specificity so variants always win. */
.button,
:where(button:not(.link)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--control);
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.1s;
}

.button:active,
:where(button:not(.link)):active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .button:hover,
  :where(button:not(.link)):hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
}

.button.secondary,
button.secondary {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary);
}

@media (hover: hover) {
  .button.secondary:hover,
  button.secondary:hover {
    border-color: transparent;
    background: var(--primary-soft-hover);
  }
}

.button.danger,
button.danger,
button.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}

button.danger:hover {
  filter: brightness(0.92);
}

/* Phones: a card's main actions span its width, easy to reach with a thumb. */
@media (max-width: 47.99rem) {
  .card form > button:not(.link),
  .card.stack > .button,
  .card form.row > .button {
    width: 100%;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.narrow {
  max-width: 30rem;
  margin-inline: auto;
}

/* Sign-in, sign-up and the other account pages: one column, full-width buttons. */
.auth {
  max-width: 28rem;
}

.auth :where(button, .button):not(.link) {
  width: 100%;
}

.auth h1 {
  margin-bottom: 0.5rem;
}

/* "Use a passkey instead" below the new-password form. */
.auth-alternatives {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-alternatives .button,
.auth-alternatives button {
  width: 100%;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.icon {
  flex: none;
}

.wide {
  width: 100%;
}

/* Passkey first on the sign-in and sign-up pages; a password folded away below it. */
.passkey-hint {
  margin: 0.5rem 0 0;
  text-align: center;
}

.auth > .auth-or {
  margin: 1.25rem 0 1rem;
}

.password-option {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.password-option summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--tap);
  margin-top: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.password-option summary::-webkit-details-marker {
  display: none;
}

.password-option summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}

.password-option[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.password-option[open] summary {
  margin-bottom: 0.75rem;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

form.inline {
  display: inline;
}

.device-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.device-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

/* A list of links that each open a page, like a settings screen. */
.link-list {
  list-style: none;
  margin: 0 -0.5rem;
  padding: 0;
}

.link-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0 0.5rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.link-list li + li {
  border-top: 1px solid var(--border);
}

.link-list a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.link-list a::after {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.25rem;
  border-top: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  transform: rotate(45deg);
}

/* --- Slot grid ------------------------------------------------------------ */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  margin: 0.625rem 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8125rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.swatch {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 4px;
}

.slot-grid {
  display: grid;
  gap: 0.625rem;
}

.hour-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.5rem;
  align-items: start;
}

.hour-label {
  padding-top: 0.75rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
}

.hour-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.3125rem;
}

@media (min-width: 40rem) {
  .hour-slots {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 0.1s,
    box-shadow 0.15s;
}

.slot:active:not(.unavailable) {
  transform: scale(0.95);
}

.slot input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: inherit;
}

.band-0 {
  background: var(--band-0);
}

.band-1 {
  background: var(--band-1);
}

.band-2 {
  background: var(--band-2);
}

.band-3 {
  background: var(--band-3);
}

.swatch.band-0 { box-shadow: inset 0 0 0 2px var(--band-0-edge); }
.swatch.band-1 { box-shadow: inset 0 0 0 2px var(--band-1-edge); }
.swatch.band-2 { box-shadow: inset 0 0 0 2px var(--band-2-edge); }
.swatch.band-3 { box-shadow: inset 0 0 0 2px var(--band-3-edge); }

@media (hover: hover) {
  .slot:not(.unavailable):hover {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 35%, transparent);
  }
}

.slot.unavailable,
.swatch.unavailable {
  background: var(--unavailable);
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-weight: 500;
  cursor: not-allowed;
}

.swatch.unavailable {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.slot.suggested::after {
  content: "★";
  position: absolute;
  top: -0.4rem;
  right: -0.3rem;
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 0 2px var(--surface);
  color: var(--on-star);
  font-size: 0.625rem;
  line-height: 1;
}

.slot:has(input:checked) {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--primary);
  font-weight: 750;
}

.slot:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.grid-loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}

.htmx-request .grid-loading,
.htmx-request.grid-loading {
  opacity: 0.4;
}

/* The typed registration only while "Another aircraft" is chosen, or with none saved. */
.aircraft-field:has(option[value="other"]:not(:checked)) .other-aircraft {
  display: none;
}

.aircraft-field select + .other-aircraft {
  margin-top: 0.5rem;
}

.booking-actions {
  display: flex;
  margin-top: 0.75rem;
}

/* Phones: the options stay above the grid, the book button floats above the tab bar. */
@media (max-width: 47.99rem) {
  .booking-actions {
    position: sticky;
    bottom: calc(var(--tabbar-space) + 0.75rem);
    z-index: 5;
    margin: 0.75rem -0.25rem -0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-sm) + 0.5rem);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: var(--shadow-float);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
  }

  .booking-actions button {
    width: 100%;
  }
}

@media (min-width: 48rem) {
  #booking-options {
    position: sticky;
    top: calc(4.5rem + env(safe-area-inset-top));
  }
}

/* Busyness strip on the staff day overview. */
.load-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  height: 1.75rem;
  border-radius: 8px;
  overflow: hidden;
}

.load-strip span {
  display: block;
}

.load-axis {
  display: flex;
  justify-content: space-between;
  margin: 0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* Staff day: previous, date, show and next on one line, also on phones. */
.page-head {
  row-gap: 0.75rem;
}

.day-picker {
  display: grid;
  flex: 1 1 18rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  max-width: 26rem;
}

.day-picker .button,
.day-picker button {
  min-width: var(--control);
  padding-inline: 0.875rem;
}

/* --- Tables and lists ----------------------------------------------------- */

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Staff day table: one compact card per booking on phones. */
@media (max-width: 40rem) {
  .day-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .day-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .day-table tbody tr:last-child {
    border-bottom: 0;
  }

  .day-table td {
    padding: 0;
    border: 0;
  }

  .day-table td:nth-child(1) { grid-area: 1 / 1; }
  .day-table td:nth-child(5) { grid-area: 1 / 2; text-align: right; }
  .day-table td:nth-child(2) { grid-area: 2 / 1; }
  .day-table td:nth-child(4) { grid-area: 2 / 2; text-align: right; }
  .day-table td:nth-child(3) { grid-area: 3 / 1 / 4 / 3; }
  .day-table td:nth-child(6) { grid-area: 4 / 1 / 5 / 3; }
}

.booking-list {
  list-style: none;
  margin: 0 -0.625rem;
  padding: 0;
}

.booking-list li + li {
  border-top: 1px solid var(--border);
}

.booking-list .booking-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0.625rem;
  border-radius: var(--radius-sm);
  color: inherit;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color 0.15s;
}

.booking-list a.booking-row:hover {
  background: var(--surface-2);
}

.list-item {
  padding: 0.75rem 0.625rem;
}

.time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--muted);
}

.badge.accepted {
  background: var(--info-bg);
  color: var(--info);
}

.badge.confirmed {
  background: var(--success-bg);
  color: var(--success);
}

.badge.cancelled {
  background: var(--error-bg);
  color: var(--error);
}

dl.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0;
  margin: 0 0 1rem;
}

dl.facts dt,
dl.facts dd {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

dl.facts dt {
  padding-right: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

dl.facts dd {
  margin: 0;
  font-weight: 500;
}

dl.facts dt:last-of-type,
dl.facts dd:last-of-type {
  border-bottom: 0;
}

.utc {
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* --- Welcome page ---------------------------------------------------------- */
/* Navy in light and dark mode, continuing the launch screen of the installed app. */

body.welcome {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(60rem 40rem at 50% 18rem, #1b4a73 0%, #0f2a44 55%, #0b1f33 100%)
    #0f2a44;
  color: #e6edf3;
}

.welcome .site-header {
  position: static;
  background: transparent;
}

.welcome .brand {
  visibility: hidden;
}

.welcome main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.welcome .notice,
.welcome .messages li {
  background: rgb(255 255 255 / 0.08);
  color: inherit;
}

.welcome .site-footer {
  color: rgb(230 237 243 / 0.6);
}

.hero {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  animation: hero-in 0.5s ease-out both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(78 163 234 / 0.22), transparent);
}

.hero-mark .runway-mark {
  width: 5.5rem;
  height: 5.5rem;
}

.hero-name {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.hero-name span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgb(230 237 243 / 0.65);
}

.hero h1 {
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-lead {
  margin: 0 auto;
  color: rgb(230 237 243 / 0.78);
  text-wrap: pretty;
}

/* A day's busyness at a glance: green is quiet, red is busy; the dot marks the suggestion. */
.slot-preview {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3rem;
  height: 3.25rem;
  margin: 1.75rem auto 2rem;
}

.slot-preview span {
  position: relative;
  width: 1.1rem;
  border-radius: 4px;
  opacity: 0.85;
}

.slot-preview .band-0 { height: 30%; background: #58c283; }
.slot-preview .band-1 { height: 52%; background: #d8c94a; }
.slot-preview .band-2 { height: 74%; background: #f0a04f; }
.slot-preview .band-3 { height: 96%; background: #ff8a7d; }

.slot-preview .suggested {
  opacity: 1;
  box-shadow: 0 0 0 2px #0f2a44, 0 0 0 4px #ffb703;
}

.hero-actions {
  display: grid;
  gap: 0.75rem;
}

.hero-actions .button {
  min-height: 3.25rem;
  border-radius: 14px;
  font-size: 1.05rem;
}

.hero-primary {
  border-color: #ffffff;
  background: #ffffff;
  color: #0f2a44;
}

.hero-actions .hero-primary:hover {
  border-color: #dfe9f3;
  background: #dfe9f3;
}

.hero-secondary {
  border-color: rgb(255 255 255 / 0.45);
  background: transparent;
  color: #ffffff;
}

.hero-actions .hero-secondary:hover {
  border-color: rgb(255 255 255 / 0.6);
  background: rgb(255 255 255 / 0.1);
}

.welcome :focus-visible {
  outline-color: #ffb703;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
