:root {
  --blue: #0b4f8a;
  --blue-dark: #083a66;
  --sand: #f6f4ef;
  --ink: #1e2a33;
  --line: #d8d5cc;
  --ok: #1a7f4e;
  --err: #c0392b;
  --err-ink: #8a1f11;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
}
main { max-width: 760px; margin: 0 auto; padding: 0 1rem 3rem; }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.2rem; background: var(--blue); color: #fff;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header language menu: a native <details> disclosure, so it opens with
   JavaScript off; /lang-switch.js only adds click-outside and Escape. */
.lang-menu { position: relative; }
.lang-menu > summary {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 30%); background: rgb(255 255 255 / 8%);
  color: #fff; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; list-style: none; user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { background: rgb(255 255 255 / 18%); }
.lang-menu > summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lang-caret {
  width: 0; height: 0; margin-left: 0.05rem;
  border-left: 0.28rem solid transparent; border-right: 0.28rem solid transparent;
  border-top: 0.32rem solid currentColor; opacity: 0.85;
  transition: transform 0.15s ease;
}
.lang-menu[open] > summary .lang-caret { transform: rotate(180deg); }

.lang-flag {
  display: block; flex: none; border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 15%);
}

.lang-menu > ul {
  position: absolute; right: 0; top: calc(100% + 0.45rem); z-index: 20;
  min-width: 11rem; margin: 0; padding: 0.3rem; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgb(8 58 102 / 22%);
}
.lang-menu > ul a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.6rem; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500;
}
.lang-menu > ul a:hover { background: var(--sand); }
.lang-menu > ul a.active { font-weight: 700; color: var(--blue-dark); }
.lang-menu > ul a.active::after { content: "\2713"; margin-left: auto; color: var(--blue); }

@media (max-width: 380px) {
  .lang-menu > summary .lang-code { display: none; }
}

/* Pre-launch preview banner (site-wide, shown while payment is disabled) */
.preview-banner {
  background: #fdf3d6; border-bottom: 1px solid #e6cf87; color: #6b4e07;
  padding: 0.7rem 1.2rem; text-align: center; font-size: 0.92rem; font-weight: 600;
}
.preview-note { text-align: center; color: #8a6d0b; }

/* Staging ribbon (site-wide on the staging deployment, never in production).
   Deliberately loud — hazard stripes — so a staging tab can never be
   mistaken for the live site. */
.staging-banner {
  background: repeating-linear-gradient(45deg, #b45309 0 14px, #92400e 14px 28px);
  color: #fff; padding: 0.55rem 1.2rem; text-align: center;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgb(0 0 0 / 45%);
}

.hero { text-align: center; padding: 2.2rem 0 0.5rem; }
.hero h1 { font-size: 1.6rem; color: var(--blue-dark); margin-bottom: 0.4rem; }

/* Canonical journey stepper (home / success / status). Vertical timeline:
   numbered circle + connector rail, pure CSS, works unchanged on phones. */
.journey { list-style: none; padding: 0; margin: 1rem 0 0; text-align: left; }
/* On the centered success/confirming cards, keep the stepper a centered block
   with its own content left-aligned. */
.card.center .journey { max-width: 22rem; margin: 1.3rem auto 0.5rem; }
.journey li { position: relative; padding: 0 0 1.3rem 3rem; }
.journey li:last-child { padding-bottom: 0; }
.journey li::before {
  content: ""; position: absolute; left: 1rem; top: 2.1rem; bottom: -0.1rem;
  width: 2px; background: var(--line); transform: translateX(-1px);
}
.journey li:last-child::before { display: none; }
.journey li.done::before { background: var(--ok); }
.journey-num {
  position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; background: var(--blue); color: #fff;
}
.journey li.done .journey-num { background: var(--ok); }
.journey li.current .journey-num { box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.22); }
.journey li.upcoming .journey-num {
  background: #fff; color: #5c6a75; border: 2px solid var(--line);
}
.journey-text { padding-top: 0.25rem; }
.journey-title { font-weight: 600; display: block; }
.journey li.upcoming .journey-title { color: #5c6a75; }
.journey-desc { margin: 0.2rem 0 0; color: #5c6a75; font-size: 0.95rem; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 1.4rem; margin: 1.2rem 0;
}
.card h2 { margin-top: 0; color: var(--blue-dark); }
.card.center { text-align: center; }

.field { margin: 0.8rem 0; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1 1 180px; }
label, .label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
label.radio { font-weight: 400; display: block; margin: 0.15rem 0; }
/* Consent checkbox: the label runs to a paragraph, so the box is pulled out
   of the text flow and the wrapped lines indent past it. */
label.checkbox {
  font-weight: 400; display: block; position: relative;
  padding-left: 1.6rem; line-height: 1.5;
}
label.checkbox input[type="checkbox"] { position: absolute; left: 0; top: 0.3rem; margin: 0; }
.mandate { border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 1.2rem; }
input, select, textarea {
  width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; background: #fff;
}
input[type="radio"], input[type="checkbox"] { width: auto; margin-right: 0.4rem; }
small, .hint { color: #5c6a75; }
input::placeholder, textarea::placeholder { color: #9aa7b1; }

/* Field tooltips: label + info icon on one line; the bubble is pure CSS,
   shown on hover and on keyboard focus (focus-within covers the button). */
.label-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.25rem; }
.label-row label { margin-bottom: 0; }
.tip { position: relative; display: inline-flex; }
.tip-btn {
  width: 1.05rem; height: 1.05rem; padding: 0; flex: 0 0 auto;
  border: 1px solid #5c6a75; border-radius: 50%; background: #fff;
  color: #5c6a75; font-size: 0.7rem; font-weight: 700; line-height: 1;
  cursor: help;
}
.tip-bubble {
  display: none; position: absolute; bottom: calc(100% + 0.45rem); left: -0.6rem;
  z-index: 20; width: max-content; max-width: min(280px, 78vw);
  background: var(--ink); color: #fff; font-weight: 400; font-size: 0.85rem;
  line-height: 1.4; padding: 0.45rem 0.6rem; border-radius: 6px;
}
.tip:hover .tip-bubble, .tip:focus-within .tip-bubble { display: block; }

.price-box {
  margin-top: 1rem; padding: 0.9rem 1rem; background: var(--sand);
  border-radius: 8px; min-height: 2.2rem;
}
.price-row { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.price-row.discount { color: var(--ok); }
.price-row.subtotal { border-top: 1px solid var(--line); margin-top: 0.3rem; padding-top: 0.4rem; }
.price-row.total { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--blue); margin-top: 0.3rem; padding-top: 0.4rem; }

.secure-note {
  margin: 1.2rem 0 0; text-align: center; font-size: 0.9rem;
}

.pay-button {
  display: block; width: 100%; margin-top: 0.5rem; padding: 0.9rem;
  background: var(--blue); color: #fff; border: 0; border-radius: 8px;
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.pay-button:hover { background: var(--blue-dark); }
.pay-button:disabled {
  background: #9aa7b1; cursor: not-allowed; opacity: 0.85;
}
.pay-button:disabled:hover { background: #9aa7b1; }

/* Searchable country combobox (progressive enhancement of the <select>) */
.cs { position: relative; }
.cs-native {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; padding: 0; border: 0;
}
.cs-list {
  position: absolute; z-index: 20; left: 0; right: 0; margin: 2px 0 0; padding: 0.25rem;
  list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  max-height: 16rem; overflow-y: auto; box-shadow: 0 8px 20px rgba(30, 42, 51, 0.15);
}
.cs-item { padding: 0.4rem 0.6rem; border-radius: 6px; cursor: pointer; }
.cs-item.active { background: var(--sand); }
.cs-item.selected { font-weight: 600; }
.cs-group {
  padding: 0.5rem 0.6rem 0.15rem; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: #5c6a75;
}
.cs-empty { padding: 0.4rem 0.6rem; color: #5c6a75; }

.error {
  background: #fdecea; border: 1px solid #e5b4ae; color: var(--err-ink);
  padding: 0.7rem 1rem; border-radius: 8px;
}
.error > :first-child { margin-top: 0; }
.error > :last-child { margin-bottom: 0; }
.error ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.error li { margin: 0.2rem 0; }

/* A rejected submission keeps everything the customer typed and marks only the
   boxes that were wrong; public/field-errors.js drops the mark on the first
   keystroke. .cs-input is the country combobox standing in for its select. */
.field.has-error > label,
.field.has-error > .label,
.field.has-error > .label-row > label { color: var(--err-ink); }
.field.has-error input:not([type="radio"]):not([type="checkbox"]),
.field.has-error select,
.field.has-error .cs-input {
  border-color: var(--err); background: #fffaf9;
}
.field.has-error input:not([type="radio"]):not([type="checkbox"]):focus,
.field.has-error select:focus,
.field.has-error .cs-input:focus {
  outline: 2px solid var(--err); outline-offset: 1px;
}
/* Tick boxes have no border to redden — ring the box itself. */
.field.has-error input[type="checkbox"],
.field.has-error input[type="radio"] {
  outline: 2px solid var(--err); outline-offset: 2px;
}
.ref { font-size: 1.15rem; }

/* Order status page */
.status-line { font-size: 1.15rem; margin: 0.2rem 0 1.2rem; }
.order-summary { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.order-summary h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.help-block { margin-top: 1.4rem; }
.button-link {
  display: inline-block; margin-top: 0.5rem; padding: 0.7rem 1.3rem;
  background: var(--blue); color: #fff; text-decoration: none;
  border-radius: 8px; font-weight: 700;
}
.button-link:hover { background: var(--blue-dark); }

.rules ul { padding-left: 1.2rem; }
.rules li { margin: 0.35rem 0; }

/* FAQ — native <details>, no JS (CSP-safe) */
.faq-item {
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; margin: 0.5rem 0; padding: 0 1rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: 0.8rem 0;
  color: var(--blue-dark); list-style-position: inside;
}
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { margin: 0.8rem 0; }

.footer-contact { margin: 0 auto 0.6rem; font-weight: 600; }
.footer-contact a { color: var(--blue-dark); }

.site-footer {
  border-top: 1px solid var(--line); padding: 1.2rem; text-align: center;
  font-size: 0.85rem; color: #5c6a75;
}
.site-footer nav a { margin: 0 0.5rem; color: var(--blue-dark); }
.disclaimer { max-width: 700px; margin: 0 auto 0.8rem; }

/* ── Admin dashboard (/admin) ─────────────────────────────────────────────
   Operator-only, never indexed. Wider than the customer pages because it is
   a table; below 760px the same table restacks into one block per order, with
   the column headings coming back as data-label prefixes. Search and sorting
   are links and a GET form, so everything here works with JavaScript off. */
.admin-main { max-width: 1100px; }
.admin-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 1rem;
}
.admin-head h1 { margin: 0; font-size: 1.5rem; color: var(--blue-dark); }
.admin-who { margin: 0; font-size: 0.9rem; color: #5c6a75; }
.admin-who a { color: var(--blue-dark); }

.admin-controls {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.7rem 1rem; margin: 1.1rem 0 0.6rem;
}
.admin-search { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 18rem; }
.admin-search input[type="search"] {
  flex: 1 1 auto; min-width: 0; padding: 0.5rem 0.7rem;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 0.95rem; background: #fff; color: var(--ink);
}
.admin-search input[type="search"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.admin-search button {
  flex: none; padding: 0.5rem 0.9rem; border: 0; border-radius: 8px;
  background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.admin-search button:hover { background: var(--blue-dark); }
.admin-clear { flex: none; font-size: 0.9rem; color: var(--blue-dark); }

.admin-sort { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.admin-sort-label { font-size: 0.85rem; color: #5c6a75; text-transform: uppercase; letter-spacing: 0.04em; }
.chip {
  padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }

.admin-count { margin: 0 0 0.7rem; font-size: 0.9rem; color: #5c6a75; }
.admin-empty { padding: 1.5rem 0; text-align: center; color: #5c6a75; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.admin-table th {
  text-align: left; padding: 0.5rem 0.6rem; border-bottom: 2px solid var(--line);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: #5c6a75;
}
.admin-table td { padding: 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-num { text-align: right; white-space: nowrap; }
.admin-sub { display: block; font-size: 0.83rem; color: #5c6a75; word-break: break-word; }
.admin-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem; color: var(--blue-dark); word-break: break-all;
}

/* One badge per lifecycle state. `paid` is the operator's queue, so it is the
   only one that draws the eye; the terminal states are deliberately quiet. */
.badge {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; white-space: nowrap;
  background: #eceae4; color: #4a5560;
}
.badge-pending { background: #fdf3d6; color: #6b4e07; }
.badge-paid { background: var(--blue); color: #fff; }
.badge-submitted { background: #dff0e6; color: var(--ok); }
.badge-cancelled { background: #eceae4; color: #4a5560; }
.badge-refunded { background: #fae4e1; color: var(--err-ink); }

.admin-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 1.2rem; font-size: 0.92rem;
}
.admin-pager a { color: var(--blue-dark); font-weight: 600; }
.admin-pager-off { color: #9aa7b1; }

@media (max-width: 760px) {
  /* The headings move into each cell as a data-label prefix, so the table
     keeps its semantics (and its sort state) while reading as a card list. */
  .admin-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr {
    border: 1px solid var(--line); border-radius: 10px;
    padding: 0.6rem 0.8rem; margin-bottom: 0.7rem; background: #fff;
  }
  .admin-table tr:last-child td, .admin-table td { border-bottom: 0; padding: 0.2rem 0; }
  .admin-table td {
    display: flex; flex-wrap: wrap; align-items: baseline;
    justify-content: space-between; gap: 0 1rem; text-align: right;
  }
  .admin-table td::before {
    content: attr(data-label); flex: none;
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: #5c6a75;
  }
  /* The second line of a cell (boat, email, time) drops below the label. */
  .admin-table td .admin-sub { flex: 1 0 100%; }
  /* Flex items refuse to shrink below their content by default, which is how
     a long order reference would push past the card edge on a narrow phone. */
  .admin-table td > * { min-width: 0; }
  .admin-controls { gap: 0.6rem; }
  .admin-search, .admin-sort { flex: 1 1 100%; }
}
