/* Brand tokens: swap these for The Spa at Olivine's official palette and fonts. */
:root {
  --bg: #f5f2ea;
  --surface: #fffdf8;
  --ink: #2a2b25;
  --ink-soft: #5d5f55;
  --line: #ddd8cb;
  --olive: #4f5d33;
  --olive-deep: #36401f;
  --olive-tint: #e9ecdf;
  --gold: #a8844c;
  --error: #a3342b;
  --error-tint: #fbecea;
  --success-tint: #e8f0e1;
  --info-tint: #f3eedf;
  --radius: 10px;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
a { color: var(--olive); }
a:hover { color: var(--olive-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: 1.5rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Public site ---------- */
.site-header { text-align: center; padding: 32px 16px 8px; }
.wordmark { text-decoration: none; color: var(--olive-deep); display: inline-flex; flex-direction: column; line-height: 1; }
.wordmark-small { font: 500 .75rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }
.wordmark-large { font: 400 2.4rem/1.1 var(--serif); letter-spacing: .12em; text-transform: uppercase; }

.page { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; }
.page.narrow { max-width: 640px; }
.center { text-align: center; }
.hero { text-align: center; padding: 24px 0 16px; }
.eyebrow { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .75em; font-weight: 600; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 36em; margin: 0 auto 1em; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 20px;
}
fieldset.card { min-width: 0; }
.card > legend {
  font: 500 1.4rem/1.2 var(--serif);
  padding: 0 8px;
  margin-left: -8px;
  display: flex; align-items: center; gap: 10px;
}
.step {
  font: 600 .85rem/1 var(--sans);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--olive); color: #fff;
  display: inline-grid; place-items: center;
}

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

label, .field > legend { display: block; font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
.opt { font-weight: 400; color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: .9rem; margin: -2px 0 8px; }

input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=password], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #c9c3b3;
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 46px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--olive); outline: 2px solid var(--olive-tint); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--error) !important; background: var(--error-tint); }
.field-error { color: var(--error); font-size: .9rem; margin: 6px 0 0; font-weight: 500; }
.counter { text-align: right; font-size: .8rem; color: var(--ink-soft); margin: 4px 0 0; }
.counter.near { color: var(--gold); }

.radios label.radio, label.check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; cursor: pointer; }
.radios input, label.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--olive); }
.consent label.check { margin-bottom: 14px; }
.consent .field-error { margin: -8px 0 14px 30px; }
.cf-turnstile { margin: 8px 0 16px; }

.button {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  background: var(--olive);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 15px 32px;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: .02em;
}
.button:hover { background: var(--olive-deep); color: #fff; }
.consent .button { width: 100%; margin-top: 8px; padding: 17px; font-size: 1.05rem; }
.button-secondary { background: transparent; color: var(--olive-deep); border: 1px solid var(--olive); }
.button-secondary:hover { background: var(--olive-tint); color: var(--olive-deep); }
.button-sm { padding: 8px 14px; font-size: .85rem; }
.actions { margin: 24px 0 8px; }

.alert { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }
.alert p { margin: 4px 0 0; }
.alert-error { background: var(--error-tint); color: var(--error); border: 1px solid #e8c3bf; }
.alert-success { background: var(--success-tint); border: 1px solid #cddbbf; }
.alert-info { background: var(--info-tint); border: 1px solid #e3d8b9; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { text-align: center; padding: 8px 16px 40px; color: var(--ink-soft); font-size: .9rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer .fine { font-size: .8rem; }

.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose p { margin: 0 0 1em; }
.draft-banner { background: #fff4d6; border: 1px dashed var(--gold); padding: 12px 16px; border-radius: 8px; font-size: .9rem; margin: 0 0 24px; }

/* ---------- Admin ---------- */
body.admin { font-size: 15px; }
.admin-bar {
  background: var(--olive-deep);
  color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 12px 24px;
}
.admin-brand { color: #fff; text-decoration: none; font: 500 1.35rem/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.admin-brand span { font: 400 .8rem/1 var(--sans); letter-spacing: .05em; text-transform: none; opacity: .75; margin-left: 8px; }
.admin-bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.admin-bar nav a, .admin-bar .link-button { color: #e4e8d8; text-decoration: none; font-size: .9rem; }
.admin-bar nav a.active, .admin-bar nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
@media (max-width: 600px) { .admin-wrap { padding: 16px; } .admin-bar { padding: 12px 16px; } }
.admin-wrap:has(> .alert:only-child) { padding-bottom: 0; }
.admin-wrap:has(> .alert:only-child) .alert { margin-bottom: 0; }
.admin-wrap.login { max-width: 420px; padding-top: 56px; }
.admin-wrap.login .button { width: 100%; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-title h1 { font-size: 2rem; margin: 0; }
.admin .card { padding: 20px; }
.admin h2 { font-size: 1.25rem; }
.narrow-card { max-width: 720px; }
form.inline, .inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { min-height: 36px; padding: 6px 10px; width: 150px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--olive); text-decoration: underline; }
.link-button.danger { color: var(--error); }
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column-reverse; gap: 2px; }
.stat-value { font: 500 2rem/1 var(--serif); }
.stat-value small { font-size: 1rem; color: var(--ink-soft); }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.stat-wide { grid-column: span 2; flex-direction: column; }
@media (max-width: 480px) { .stat-wide { grid-column: auto; } }
.sources { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; }
.sources b { margin-left: 4px; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a span { font-size: .8rem; background: var(--olive-tint); border-radius: 999px; padding: 1px 7px; margin-left: 4px; color: var(--olive-deep); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--olive); font-weight: 600; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1 1 260px; min-height: 40px; padding: 8px 12px; }
.toolbar label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 400; }
.toolbar select { width: auto; min-height: 40px; padding: 8px; }
.toolbar .button { padding: 11px 18px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card.flush { padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; background: #faf8f2; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf8f1; }
.num { text-align: right; white-space: nowrap; }
.row-link { font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.empty { padding: 40px; text-align: center; color: var(--ink-soft); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.badge-dup { background: #f1e3c4; color: #7a5a1f; }
.status { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-new { background: #ecebe6; color: #4b4c45; }
.status-shortlisted { background: #f3e6c8; color: #6f5317; }
.status-declined { background: #f2dedb; color: #8a2f27; }
.status-winner { background: var(--olive); color: #fff; }
.status-lg { font-size: .95rem; padding: 6px 16px; }

.crumbs { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: .9rem; }
.pager { display: flex; gap: 16px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.detail-head h1 { margin: 2px 0; font-size: 2.4rem; }
.detail-head p { margin: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.story p.pre { font-size: 1.05rem; line-height: 1.7; margin: 0 0 24px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .92rem; }
dt { color: var(--ink-soft); }
dd { margin: 0; overflow-wrap: anywhere; }

.scores { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scores legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.score { margin: 0; cursor: pointer; }
.score input { position: absolute; opacity: 0; }
.score span { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.score b { font: 500 1.6rem/1 var(--serif); }
.score small { font-size: .72rem; color: var(--ink-soft); font-weight: 400; margin-top: 4px; }
.score input:checked + span { background: var(--olive); border-color: var(--olive); color: #fff; }
.score input:checked + span small { color: #e4e8d8; }
.score input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.admin .button { padding: 12px 22px; }
.status-form { display: flex; gap: 8px; }
.status-form select { min-height: 42px; padding: 8px; }

.reviews { list-style: none; padding: 0; margin: 0; }
.reviews li { border-top: 1px solid var(--line); padding: 12px 0; }
.reviews p { margin: 6px 0 0; }
.review-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.score-pill { background: var(--olive-tint); color: var(--olive-deep); font-weight: 700; border-radius: 999px; padding: 0 9px; font-size: .85rem; }

/* Static Web Apps additions */
.actions.stack { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.actions.stack .button { min-width: 260px; }
.admin-user { color: #e4e8d8; font-size: .9rem; opacity: .85; }
.lede-strong { color: var(--olive-deep); font-weight: 600; margin-top: 1.25em; }

/* Header with The Spa at Olivine logo (white artwork, so it sits on their dark brand colour). */
:root { --brand-dark: #3b403a; }
.site-header { background: var(--brand-dark); padding: 22px 16px 20px; margin-bottom: 8px; }
.wordmark { display: inline-block; }
.wordmark img { display: block; width: 190px; height: auto; }
@media (max-width: 480px) { .wordmark img { width: 150px; } }
