:root {
  --ink: #0E2A33;
  --slate: #5C6670;
  --text-2: #3D4D54;
  --silver: #D2D5DA;
  --line: #E3E6EA;
  --off: #F5F5F5;
  --white: #FFFFFF;
  --harbour: #33558F;
  --dusk: #7695CB;
  --mist: #D5DFEF;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --head: "Space Grotesk", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--silver) var(--off); accent-color: var(--harbour); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--off); color: var(--text-2);
  font: 400 1rem/1.55 var(--body); caret-color: var(--harbour);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mist); color: var(--ink); }
[hidden] { display: none !important; }
a { color: var(--harbour); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--harbour); outline-offset: 2px; border-radius: 2px; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: var(--radius); }

/* Layout */
.page { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 28px; }
.wordmark { font: 700 1.5rem/1 var(--head); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; display: inline-block; padding: 8px 0; }
.wordmark span { color: var(--dusk); }
h1 { font: 700 clamp(2.125rem, 1.4rem + 3vw, 3.5rem)/1.04 var(--head); letter-spacing: -0.025em; color: var(--ink); margin: 0 0 14px; text-wrap: balance; }
h1:focus { outline: none; }
.lede { font-size: 1.0625rem; margin: 0; max-width: 34ch; text-wrap: pretty; }
.context { margin: 16px 0 0; padding: 10px 14px; background: var(--mist); color: var(--ink); border-radius: var(--radius); font-weight: 500; font-size: 0.9375rem; max-width: max-content; }
.facts { display: none; margin: 40px 0 0; max-width: 300px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--silver); }
.facts div:last-child { border-bottom: 1px solid var(--silver); }
.facts dt { color: var(--slate); font-size: 0.9375rem; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; font-size: 0.9375rem; text-align: right; }

@media (min-width: 880px) {
  .page { grid-template-columns: minmax(0, 340px) minmax(0, 640px); gap: 96px; padding: 40px 40px 72px; justify-content: space-between; }
  .intro { position: sticky; top: 40px; align-self: start; display: grid; gap: 72px; }
  .facts { display: block; }
}

/* Panel */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
@media (min-width: 560px) { .panel { padding: 36px; } }

.progress { margin-bottom: 28px; }
.progress-label { margin: 0 0 10px; font-weight: 500; font-size: 0.9375rem; color: var(--slate); font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bars i { height: 4px; background: var(--line); border-radius: 2px; transition: background-color 240ms var(--ease); }
.bars i.on { background: var(--harbour); }

h2 { font: 700 1.5rem/1.2 var(--head); letter-spacing: -0.015em; color: var(--ink); margin: 0 0 20px; }
h2:focus { outline: none; }
h3 { font: 700 1.125rem/1.3 var(--head); color: var(--ink); margin: 32px 0 12px; }
.step-note { margin: -8px 0 24px; color: var(--text-2); font-size: 0.9375rem; }
.step:not([hidden]) { animation: step-in 260ms var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }

/* Fields */
.field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; padding: 0; margin: 0 0 8px; font-weight: 500; color: var(--ink); font-size: 1rem; }
legend { float: left; width: 100%; } legend + * { clear: both; }
.sub { margin-top: 16px; }
.opt-tag { font-weight: 400; color: var(--slate); font-size: 0.875rem; margin-left: 6px; }
.hint { margin: 6px 0 0; font-size: 0.875rem; color: var(--slate); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: 400 1rem/1.4 var(--body); color: var(--ink);
  background: var(--white); border: 1px solid var(--slate); border-radius: var(--radius);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
textarea { resize: vertical; min-height: 128px; }
input:hover, textarea:hover { border-color: var(--ink); }
input:focus, textarea:focus { outline: 3px solid var(--harbour); outline-offset: 1px; border-color: var(--harbour); }
[aria-invalid="true"] { border: 2px solid var(--ink) !important; padding: 10px 13px; }
.err { margin: 8px 0 0; font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.err:empty { margin: 0; }
.err:not(:empty) { padding-left: 12px; border-left: 1px solid var(--ink); }
.phone { display: flex; }
.phone .prefix { display: grid; place-items: center; padding: 0 14px; background: var(--off); border: 1px solid var(--slate); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.phone input { border-radius: 0 var(--radius) var(--radius) 0; font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Choice tiles: native radio sits over the tile */
.choices { display: grid; gap: 8px; }
.choices.wrap { display: flex; flex-wrap: wrap; }
.choices.cols { grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices.cols { grid-template-columns: repeat(3, 1fr); } }
.opt { position: relative; display: block; margin: 0; font-weight: 400; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tile {
  display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--silver); border-radius: var(--radius); color: var(--ink);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.opt input:hover + .tile { border-color: var(--slate); }
.opt input:checked + .tile { background: var(--mist); border-color: var(--harbour); box-shadow: 0 0 0 1px var(--harbour); }
.opt input:focus-visible + .tile { outline: 3px solid var(--harbour); outline-offset: 2px; }
.opt .tile::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--slate); border-radius: 50%; background: var(--white); transition: border-width 160ms var(--ease), border-color 160ms var(--ease); }
.opt input:checked + .tile::before { border: 6px solid var(--harbour); }
.opt.chip .tile { justify-content: center; align-items: center; text-align: center; padding: 10px 16px; }
.opt.chip .tile::before { display: none; }
.opt.chip input:checked + .tile { font-weight: 500; }
.opt.chip { flex: 0 0 auto; }
.tile-text { display: block; min-width: 0; }
.tile-name { display: block; font-weight: 500; }
.tile-desc { display: block; font-size: 0.9375rem; color: var(--text-2); margin-top: 2px; }
.tile-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: 0.8125rem; font-weight: 500; color: var(--ink); border: 1px solid var(--ink); border-radius: 99px; vertical-align: 1px; }
.mark { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; vertical-align: 0; }
.mark.none { border: 1.5px solid var(--ink); }

.products { display: grid; gap: 8px; }
.pgroup { margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pgroup-h { margin: 0 0 4px; color: var(--ink); font-weight: 500; }
.pgroup-h span { display: block; font-weight: 400; font-size: 0.9375rem; color: var(--text-2); }
.pgroup .tile { padding-left: 16px; }

.starters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.starter { font: 400 0.9375rem/1.3 var(--body); color: var(--ink); background: var(--white); border: 1px solid var(--silver); border-radius: 99px; min-height: 44px; padding: 10px 16px; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.starter:hover { border-color: var(--slate); }
.starter[aria-pressed="true"] { background: var(--mist); border-color: var(--harbour); font-weight: 500; }

/* Time picker */
.slots-status { margin: 0 0 16px; color: var(--text-2); }
.slots-status button { margin-top: 12px; }
.weeknav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin: 0 0 16px; padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-label { margin: 0; text-align: center; font-weight: 500; color: var(--ink); font-size: 0.9375rem; }
.week-label small { display: block; font-weight: 400; color: var(--slate); font-size: 0.8125rem; }
.empty { margin: 0 0 16px; padding: 14px 16px; background: var(--off); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.empty button { display: block; margin-top: 10px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.days .tile, .times .tile { flex-direction: column; gap: 0; align-items: center; justify-content: center; text-align: center; padding: 8px; }
.days .tile::before, .times .tile::before { display: none; }
.days .tile b { font-weight: 500; }
.days .tile small { color: var(--text-2); font-size: 0.875rem; }
.times .tile { font-variant-numeric: tabular-nums; }
.opt input:checked + .tile small { color: var(--ink); }
.chosen { margin: 0 0 20px; padding: 14px 16px; background: var(--mist); color: var(--ink); border-radius: var(--radius); font-weight: 500; font-variant-numeric: tabular-nums; }
.chosen span { display: block; font-weight: 400; font-size: 0.9375rem; }
.msg { margin: 0 0 20px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); font-weight: 500; }
.consent { margin: 0 0 20px; font-size: 0.875rem; color: var(--text-2); max-width: 56ch; }

/* Buttons */
.actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 32px; }
@media (min-width: 560px) { .actions { flex-direction: row; justify-content: space-between; align-items: center; } .actions .primary:only-child { margin-left: auto; } }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 28px; font: 500 1rem/1.2 var(--body); border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; text-decoration: none; transition: background-color 160ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--harbour); color: var(--white); }
.btn.primary:hover { background: var(--ink); }
.btn.primary[aria-disabled="true"] { background: var(--slate); cursor: progress; }
.btn.quiet { background: transparent; color: var(--harbour); }
.btn.quiet:hover { background: var(--mist); }
.btn.quiet:disabled { color: var(--slate); opacity: 0.5; background: none; cursor: default; }
.btn.small { min-height: 44px; padding: 8px 14px; }
.btn.quiet.inline { border-color: var(--harbour); }

/* Confirmation */
.summary { margin: 0 0 28px; }
.summary div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.summary div:last-child { border-bottom: 1px solid var(--line); }
.summary dt { color: var(--slate); font-size: 0.875rem; }
.summary dd { margin: 0; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
@media (min-width: 560px) { .summary div { grid-template-columns: 120px 1fr; gap: 16px; } }
.next { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 56ch; }
#cal { width: 100%; }
@media (min-width: 560px) { #cal { width: auto; } }

.foot { max-width: 1120px; margin: 0 auto; padding: 0 16px 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.875rem; color: var(--slate); }
@media (min-width: 880px) { .foot { padding: 0 40px 40px; } }

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

/* Taken times stay visible so the day doesn't look broken, but can't be picked */
.opt input:disabled { cursor: not-allowed; }
.opt input:disabled + .tile { background: var(--off); border-style: dashed; color: var(--slate); }
.times .tile small { color: var(--slate); font-size: 0.75rem; letter-spacing: 0.02em; }
