:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #1d2827;
  --muted: #55605e;
  --line: #d6d0c4;
  --accent: #2b4a45;
  --accent-ink: #ffffff;
  --focus: #1f5fd1;
  --error: #9b2c1f;
  --radius: 14px;
  --gutter: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  /* room for the fixed summary bar on mobile */
  padding-bottom: 190px;
}

h1, h2, .brand { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }

a { color: var(--accent); text-underline-offset: 3px; }

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

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top { padding: 14px 0 6px; }
.back {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 500;
}
.brand { margin: 6px 0 0; font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.top h1 { margin: 4px 0 8px; font-size: clamp(30px, 8vw, 46px); line-height: 1.1; }
.sub { margin: 0 0 8px; color: var(--muted); font-size: 17px; max-width: 36em; }

/* Layout: mobile is a single column, with the summary fixed to the bottom */
.layout { display: flex; flex-direction: column; gap: 8px; }
.side { display: contents; }
.preview { order: -1; }

.preview {
  margin: 8px 0 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 12px 10px;
}
.preview svg { display: block; width: 100%; height: auto; }
.preview figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 12px; margin-top: 6px; font-size: 14px; color: var(--muted);
}
.swatch-row { display: inline-flex; align-items: center; gap: 8px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink);
  background: repeating-linear-gradient(45deg, #fff, #fff 4px, #e6e1d6 4px, #e6e1d6 8px);
}
.note { font-size: 13px; }

/* Steps */
.step { padding: 22px 0 6px; }
.step h2 { margin: 0 0 12px; font-size: 24px; display: flex; align-items: center; gap: 10px; }
.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 system-ui, sans-serif;
}
.hint { margin: -4px 0 12px; color: var(--muted); }

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

.options { display: grid; gap: 10px; grid-template-columns: 1fr; }
.options-compact { grid-template-columns: 1fr 1fr; }

/* Selectable cards (radio and checkbox) */
.opt { position: relative; display: block; }
.opt input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; z-index: 1;
}
.opt-body {
  display: flex; flex-direction: column; gap: 2px; min-height: 56px;
  padding: 12px 14px; background: var(--card);
  border: 2px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.opt:hover .opt-body { border-color: #a9a395; }
.opt input:checked + .opt-body {
  border-color: var(--accent); background: #eef3f1; box-shadow: inset 0 0 0 1px var(--accent);
}
.opt input:focus-visible + .opt-body { outline: 3px solid var(--focus); outline-offset: 2px; }

.opt-title { font-weight: 600; font-size: 17px; }
.opt-price { font-weight: 600; color: var(--accent); }
.opt-desc { color: var(--muted); font-size: 15px; }
.opt-row { display: flex; align-items: center; gap: 12px; }
.chip {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .35);
}
.opt-pill { color: var(--muted); font-size: 14px; }

/* Extras */
.extras-group { margin: 0 0 18px; }
.extras-group legend { padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 17px; }
.extras-group .options { grid-template-columns: 1fr; }
.opt-check .opt-body { flex-direction: row; align-items: center; gap: 12px; }
.tick {
  flex: none; width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid #8b9391; background: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.opt-check input:checked + .opt-body .tick { background: var(--accent); border-color: var(--accent); }
.opt-check input:checked + .opt-body .tick::after {
  content: ""; width: 6px; height: 11px; margin-bottom: 2px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.opt-check .grow { flex: 1; display: flex; flex-direction: column; }

/* Form */
.field { margin: 0 0 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.req, .opt-label { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: inherit;
  background: #fff; border: 2px solid #8b9391; border-radius: 10px;
}
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field input.invalid { border-color: var(--error); }

.check {
  display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 4px 0 8px; cursor: pointer;
}
.check input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--accent); }

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

.privacy { margin: 6px 0 16px; color: var(--muted); font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 12px 22px;
  font: 600 17px/1.2 system-ui, sans-serif; color: var(--accent-ink);
  background: var(--accent); border: 2px solid var(--accent); border-radius: 999px; cursor: pointer;
}
.btn:hover { background: #1f3733; }
.btn:disabled { opacity: .7; cursor: progress; }

.status { margin: 12px 0 0; min-height: 1.5em; font-weight: 500; }
.status.error { color: var(--error); }
.status.info { color: var(--accent); }

.thanks {
  background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 20px; font-size: 19px; font-family: Georgia, serif;
}
.thanks:focus { outline: none; }
.thanks p { margin: 0 0 8px; }
.thanks .small { font-family: system-ui, sans-serif; font-size: 15px; color: var(--muted); }

/* Summary (fixed bar on mobile) */
.summary {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--card); border-top: 2px solid var(--line);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
}
.price { margin: 0; font: 600 20px/1.25 Georgia, serif; }
.extras-line { margin: 2px 0 0; font-weight: 600; color: var(--accent); font-size: 15px; }
.facts { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 14px; }
.facts div { display: flex; gap: 5px; }
.facts dt { color: var(--muted); }
.facts dt::after { content: ":"; }
.facts dd { margin: 0; font-weight: 600; }
.small { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* Desktop: summary becomes a sticky side panel */
@media (min-width: 880px) {
  body { padding-bottom: 48px; }
  .layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 8px 40px; align-items: start;
  }
  .side {
    display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 16px; margin-top: 8px;
  }
  .preview { order: 0; margin: 0; }
  .summary {
    position: static; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: none; padding: 16px;
  }
  .price { font-size: 24px; }
  .facts { display: block; font-size: 15px; }
  .facts div { padding: 4px 0; border-top: 1px solid #ece7db; justify-content: space-between; }
  .small { font-size: 13px; }
  .options { grid-template-columns: repeat(3, 1fr); }
  .options-compact { grid-template-columns: repeat(2, 1fr); }
  .extras-group .options { grid-template-columns: repeat(2, 1fr); }
  .btn { width: auto; min-width: 260px; }
}

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