/* ---------- tokens ---------- */
:root {
  --paper: #f6f3ee;
  --surface: #ffffff;
  --ink: #1a1815;
  --ink-2: #45403a;
  --muted: #847b71;
  --line: #e2dcd2;
  --line-strong: #cbc3b7;
  --tint: #eee8df;
  --accent: #9b6a45;          /* bronze, used sparingly */
  --rail: #191714;
  --rail-ink: #f2ede5;
  --rail-muted: #9a9187;
  --rail-line: #2f2b27;
  --rail-accent: #d2a47c;
  --bad: #b42318;
  --ok: #2e6b4a;
  --focus: 0 0 0 3px rgba(26, 24, 21, .12);
  --sans: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --r: 8px;
  --field: #faf8f5;
  --lift: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(40,25,10,.05), 0 12px 32px -12px rgba(40,25,10,.14), 0 40px 80px -40px rgba(40,25,10,.18);
  --float: 0 2px 4px rgba(40,25,10,.06), 0 18px 40px -12px rgba(40,25,10,.22), 0 50px 100px -30px rgba(40,25,10,.30);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 92% -8%, rgba(214, 170, 128, .22), transparent 62%),
    radial-gradient(900px 600px at -12% 108%, rgba(155, 106, 69, .10), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font: 15.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--ink); text-underline-offset: 3px; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.icon { flex: none; display: block; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
@media (min-width: 980px) { .shell { grid-template-columns: minmax(340px, 34%) 1fr; grid-template-rows: 1fr; } }

.rail {
  position: relative; z-index: 1; color: var(--rail-ink);
  background:
    radial-gradient(520px 360px at 20% -5%, rgba(210, 164, 124, .16), transparent 70%),
    linear-gradient(180deg, #1e1b18 0%, #141210 100%);
}
.rail-inner { padding: 16px 20px; }
.brand { margin: 0; font-family: var(--serif); font-size: 1.35rem; letter-spacing: .01em; line-height: 1.2; }
.rail-copy, .rail-steps, .rail-foot { display: none; }

@media (min-width: 980px) {
  .rail-inner {
    position: sticky; top: 0; height: 100vh; overflow: auto;
    display: flex; flex-direction: column; gap: clamp(20px, 3.5vh, 40px); padding: clamp(28px, 4vh, 44px) 48px 32px;
  }
  .rail-copy, .rail-foot { display: block; }
  .rail-steps { display: flex; }
  .rail-owner, .rail-preview { display: block; }
}
@media (max-width: 979px) { .rail-owner, .rail-preview { display: none; } }
.rail-preview { margin-top: auto; }
.rail-preview .pv { box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
@media (max-height: 900px) { .rail-caption { display: none; } .rail-owner .avatar { width: 34px; height: 34px; } }
.rail-caption { margin: 12px 0 0; font-size: .78rem; color: var(--rail-muted); line-height: 1.5; }
.rail .owner-chip strong { color: var(--rail-ink); }
.rail .owner-chip span span { color: var(--rail-muted); }
.rail .avatar { background: #2c2824; color: var(--rail-accent); border-color: #3a352f; }
.rail-copy h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 3.2vw, 3rem);
  line-height: 1.02; letter-spacing: -.01em; margin: 0 0 16px;
}
.rail-copy em { color: var(--rail-accent); }
.rail-copy p { color: var(--rail-muted); margin: 0; max-width: 34ch; }

.rail-steps { list-style: none; margin: 0; padding: 0; flex-direction: column; }
.rail-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: clamp(4px, .9vh, 9px) 0;
  background: none; border: 0; font: inherit; color: var(--rail-muted); text-align: left;
}
button.rail-item { cursor: pointer; }
button.rail-item:hover .rail-title { color: var(--rail-ink); }
button.rail-item:focus-visible { outline: 1px solid var(--rail-accent); outline-offset: 4px; border-radius: 4px; }
.rail-num {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #45403a; flex: none;
  display: grid; place-items: center; font-size: .72rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
  transition: all .25s var(--ease);
}
.rail-title { transition: color .2s; }
.is-current .rail-item { color: var(--rail-ink); }
.is-current .rail-num { background: var(--rail-ink); border-color: var(--rail-ink); color: var(--rail); }
.is-done .rail-num { border-color: var(--rail-accent); color: var(--rail-accent); }
.is-done .rail-title { color: #c9c1b6; }

.rail-foot { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--rail-line); font-size: .88rem; color: var(--rail-muted); }
.rail-label { margin: 0 0 10px; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rail-ink); }
.rail-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rail-foot li::before { content: '—'; margin-right: 10px; color: #5c554d; }

/* ---------- main column ---------- */
.main { padding: 24px 20px 0; min-width: 0; }
@media (min-width: 980px) { .main { padding: 76px 64px 0; } }
.form-wrap { max-width: 640px; margin: 0 auto; }

.mobile-progress { margin-bottom: 28px; }
.mp-top { display: none; }
.bar { height: 2px; background: var(--line); overflow: hidden; }
.fill { height: 100%; background: var(--ink); transition: width .5s var(--ease); }
@media (min-width: 980px) { .mobile-progress { display: none; } }

.step { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-head { padding-bottom: 30px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 14px; font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
h1 {
  margin: 0 0 14px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 3.6rem); line-height: 1; letter-spacing: -.015em;
}
h1:focus { outline: none; }
h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.intro { margin: 0; color: var(--muted); font-size: 1.03rem; max-width: 52ch; }

/* ---------- fields ---------- */
.fields {
  background: var(--surface); border-radius: 18px; padding: 24px 18px 4px;
  box-shadow: var(--lift);
  margin: 0 -4px;
}
@media (min-width: 640px) { .fields { padding: 36px 36px 10px; margin: 0; } }
.fields input[type=text], .fields input[type=email], .fields input[type=tel], .fields input[type=time], .fields select, .fields textarea { background-color: var(--field); }
.fields input:focus, .fields select:focus, .fields textarea:focus { background-color: #fff; }
.fields .tile span, .fields .font-body, .fields .dropzone, .fields .file, .fields .week, .fields .repeat-row { background-color: var(--field); }
.fields .tile input:checked + span, .fields .font-card input:checked + .font-body { background-color: #fff; }
.fields .repeat-row input, .fields .repeat-row textarea { background-color: #fff; }
.field { margin: 0 0 30px; }
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 8px; font-weight: 500; font-size: .94rem; color: var(--ink);
}
.req { flex: none; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.help { margin: -4px 0 10px; font-size: .86rem; color: var(--muted); }
.error { margin: 8px 0 0; color: var(--bad); font-size: .86rem; }
.error:empty { display: none; }

input[type=text], input[type=email], input[type=tel], input[type=time], input[type=password], select, textarea {
  width: 100%;
  font: inherit; font-size: 16px; /* stops iOS zoom */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
::placeholder { color: #b0a79c; }
select {
  appearance: none; cursor: pointer; padding-right: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231a1815' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }

/* tiles: radios + checkboxes */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.tiles-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.tile { position: relative; cursor: pointer; display: block; }
.tile input, .font-card input { position: absolute; opacity: 0; pointer-events: none; }
.tile span {
  display: flex; align-items: center; gap: 12px; height: 100%;
  padding: 13px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: .94rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
.tile:hover span { border-color: var(--line-strong); }
.tile span::before {
  content: ''; flex: none; width: 18px; height: 18px; background: var(--surface);
  border: 1px solid var(--line-strong); transition: all .15s var(--ease);
}
.tile-radio span::before { border-radius: 50%; }
.tile-check span::before { border-radius: 5px; }
.tile input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tile-radio input:checked + span::before { border: 5.5px solid var(--ink); }
.tile-check input:checked + span::before {
  border-color: var(--ink);
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.tile input:focus-visible + span, .font-card input:focus-visible + .font-body { box-shadow: var(--focus), inset 0 0 0 1px var(--ink); border-color: var(--ink); }
.tile-wide { max-width: 100%; }

/* colors */
.colors { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] {
  appearance: none; -webkit-appearance: none; width: 48px; height: 48px; padding: 4px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.color-row input[type=color]::-moz-color-swatch { border: 0; border-radius: 5px; }
.color-row .hex { width: 128px; text-transform: uppercase; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 15px; letter-spacing: .04em; }

/* fonts */
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.font-card { position: relative; cursor: pointer; display: block; }
.font-body {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
.font-card:hover .font-body { border-color: var(--line-strong); }
.font-card input:checked + .font-body { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.font-name { font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.font-h { font-size: 1.6rem; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.font-h-vibe { font-family: var(--serif); font-style: italic; }
.font-p { font-size: .93rem; line-height: 1.45; color: var(--ink-2); }
.font-meta { margin-top: auto; padding-top: 8px; font-size: .78rem; color: var(--muted); }

/* uploads */
.dropzone {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .upload input:focus-visible + .dropzone { border-color: var(--ink); background: #fdfcfa; }
.drop-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--ink); flex: none; }
.drop-text { display: flex; flex-direction: column; min-width: 0; }
.drop-text strong { font-weight: 600; font-size: .95rem; }
.drop-text span { font-size: .84rem; color: var(--muted); }

.files { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.files:empty { display: none; }
.file {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 8px 8px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.file img, .file-icon { flex: none; width: 48px; height: 48px; border-radius: 5px; object-fit: cover; background: var(--tint); }
.file-icon { display: grid; place-items: center; font-size: .66rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.file a { display: contents; }
.file .file-name a { display: inline; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.files-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); }
.files-grid .file { position: relative; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; }
.files-grid .file img, .files-grid .file-icon { width: 100%; height: auto; aspect-ratio: 1; }
.files-grid .file-name { font-size: .78rem; color: var(--muted); padding: 0 2px 2px; }
.files-grid .icon-btn { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.upload-status { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.upload-status:empty { display: none; }
.upload-status.bad { color: var(--bad); }

.icon-btn {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--tint); color: var(--ink); }

/* repeatable groups */
.repeat { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.repeat-row { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; }
.repeat-head {
  display: flex; justify-content: space-between; align-items: center; min-height: 32px; margin-bottom: 4px;
  font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.repeat-fields { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) {
  .field-repeat[data-key=services] .repeat-fields { grid-template-columns: 1fr 160px; }
  .field-repeat[data-key=services] .sub-description { grid-column: 1 / -1; grid-row: 2; }
}
.sublabel { display: block; margin-bottom: 6px; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
.repeat-row input, .repeat-row textarea { background: #fcfbf9; }

/* hours */
.hours { display: flex; flex-direction: column; gap: 10px; }
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; }
.day { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 56px; padding: 6px 0; }
.day + .day { border-top: 1px solid var(--tint); }
.day-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; min-width: 140px; }
.closed { color: var(--muted); font-size: .9rem; }
.times { display: flex; align-items: center; gap: 8px; }
.times input { width: 124px; min-height: 40px; padding: 7px 10px; }
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 36px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease);
}
.switch:checked { background: var(--ink); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r);
  font: 600 .95rem var(--sans); letter-spacing: .005em; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-primary:hover { background: #000; }
.btn-primary .icon { transition: transform .2s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn:focus-visible, .btn-add:focus-visible, .link-btn:focus-visible, .icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-add {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 2px;
  background: none; border: 0; font: 600 .9rem var(--sans); color: var(--ink); cursor: pointer;
}
.btn-add .icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; border: 1px solid var(--line-strong); transition: all .15s; }
.btn-add:hover .icon { background: var(--ink); border-color: var(--ink); color: #fff; }
.link-btn {
  padding: 4px 0; background: none; border: 0; font: 500 .88rem var(--sans); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; cursor: pointer;
}
.link-btn:hover { text-decoration-color: var(--ink); }

.nav {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 44px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(246, 243, 238, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.nav .btn-primary { flex: 1; max-width: 260px; margin-left: auto; }
@media (min-width: 980px) {
  .nav { margin: 52px 0 0; padding: 22px 0 36px; }
  .nav .btn-primary { flex: none; }
}
.form-error { margin-top: 24px; }

/* ---------- review + detail values ---------- */
.review-group { padding: 4px 0 26px; }
.review-group + .review-group, .review-group + .form-error { border-top: 1px solid var(--line); padding-top: 26px; }
.review-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.review-head h2 { display: flex; align-items: baseline; gap: 12px; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.review-num { font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .14em; color: var(--accent); }
dl { margin: 0; display: grid; grid-template-columns: 1fr; }
dt { margin-top: 12px; font-size: .8rem; color: var(--muted); }
dd { margin: 2px 0 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  dl { grid-template-columns: 220px 1fr; column-gap: 24px; }
  dt, dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--tint); }
  dt { font-size: .86rem; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .86rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch-item { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, Menlo, monospace; font-size: .84rem; }
.swatch { width: 24px; height: 24px; border-radius: 5px; border: 1px solid rgba(0,0,0,.1); background: repeating-linear-gradient(45deg, #eee 0 4px, #fff 4px 8px); }
.repeat-view { display: flex; flex-direction: column; gap: 8px; }
.repeat-item { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .94rem; }
.hours-view .day-name { display: inline-block; width: 104px; color: var(--ink-2); }
dd .files { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

/* ---------- done ---------- */
.done { padding: 10vh 0 80px; animation: rise .5s var(--ease) both; }
.done-mark {
  width: 64px; height: 64px; margin-bottom: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff;
}
.done h1 { font-size: clamp(3rem, 8vw, 4.6rem); }

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

/* ---------- grain + page modes ---------- */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 0 0.15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.shell, .main { position: relative; z-index: 1; }
body[data-mode=done] .rail { display: none; }
body[data-mode=done] .shell { grid-template-columns: 1fr; grid-template-rows: 1fr; }
body[data-mode=done] .main { padding: 0; }

/* ---------- people ---------- */
.avatar {
  flex: none; display: grid; place-items: center; border-radius: 50%; object-fit: cover;
  background: var(--tint); color: var(--accent); border: 1px solid var(--line);
  font-family: var(--serif); line-height: 1;
}
.avatar-sm { width: 40px; height: 40px; font-size: 1.25rem; }
.avatar-md { width: 64px; height: 64px; font-size: 2rem; }
.owner-chip { display: flex; align-items: center; gap: 12px; }
.owner-chip > span { display: flex; flex-direction: column; line-height: 1.35; font-size: .88rem; }
.owner-chip strong { font-weight: 600; }
.owner-chip span span { color: var(--muted); }

.note {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; padding: 16px 18px;
  background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(6px);
}
.note-from { margin: 0 0 2px; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.note-text { margin: 0; font-family: var(--serif); font-size: 1.18rem; line-height: 1.4; color: var(--ink-2); }

/* ---------- live preview mockup ---------- */
.pv { border-radius: 12px; overflow: hidden; background: #fff; font-size: 10px; line-height: 1.35; user-select: none; }
.pv-chrome { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #f1ede7; border-bottom: 1px solid #e4ded5; }
.pv-dots { display: flex; gap: 5px; }
.pv-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d8d0c5; }
.pv-url { flex: 1; text-align: center; font: 500 9.5px var(--sans); color: #8a8178; background: #fff; border-radius: 99px; padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-site { background: var(--pv-bg); color: var(--pv-ink); font-family: var(--pv-body), sans-serif; transition: background .4s; }
.pv-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.pv-logo { font-family: var(--pv-head), serif; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.pv-logo-img { height: 20px; max-width: 90px; object-fit: contain; }
.pv-links { display: flex; gap: 10px; font-size: 9px; opacity: .75; white-space: nowrap; overflow: hidden; }
.pv-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: center; padding: 14px 16px 18px; }
.pv-title { font-family: var(--pv-head), serif; font-size: 22px; line-height: 1.05; font-weight: 600; overflow-wrap: anywhere; }
.pv-tag { margin: 8px 0 12px; font-size: 9.5px; opacity: .8; }
.pv-btn { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--pv-accent); color: var(--pv-accent-ink); font-size: 9px; font-weight: 600; }
.pv-hero-img { aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: linear-gradient(140deg, color-mix(in srgb, var(--pv-accent) 55%, transparent), color-mix(in srgb, var(--pv-accent) 15%, transparent)); }
.pv-hero-img img, .pv-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; padding: 0 16px 16px; }
.pv-card { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 9px 10px; border-radius: 8px; background: color-mix(in srgb, var(--pv-ink) 7%, transparent); min-height: 54px; }
.pv-card-k { font-size: 9px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-card-v { font-family: var(--pv-head), serif; font-size: 13px; color: var(--pv-accent); filter: saturate(1.1); }
.pv-tile { border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--pv-accent) 22%, transparent); min-height: 54px; }

/* ---------- page wrapper (thank-you page) ---------- */
.welcome { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 980px) { .welcome { padding: 0 48px; } }
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.top .brand { color: var(--ink); }
.hero-lede { margin: 0 0 32px; font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); max-width: 50ch; }

/* ---------- done ---------- */
.done { max-width: 640px; margin: 0 auto; padding: 6vh 0 80px; }
.done-mark { box-shadow: 0 14px 30px -10px rgba(26,24,21,.5); }
.timeline { list-style: none; margin: 8px 0 40px; padding: 0; }
.timeline li { position: relative; display: flex; gap: 18px; padding-bottom: 26px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--line-strong); }
.timeline-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); }
.timeline .is-done .timeline-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.timeline .is-next .timeline-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(155,106,69,.14); }
.timeline h3 { margin: 4px 0 4px; font-size: 1.02rem; font-weight: 600; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
.signoff { display: flex; align-items: center; gap: 16px; padding: 24px; background: var(--surface); border-radius: 18px; box-shadow: var(--lift); }
.signoff p { margin: 0; }
.signoff-line { color: var(--muted); font-size: .9rem; }
.signoff-name { font-family: var(--serif); font-size: 2rem; line-height: 1.1; font-style: italic; }

/* ---------- payment terms on review ---------- */
.terms { margin-top: 28px; padding: 20px 22px; border-radius: 14px; background: var(--surface); box-shadow: var(--lift); border-left: 3px solid var(--accent); }
.terms p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.terms .terms-title { margin-bottom: 6px; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.brand-link { display: block; color: inherit; text-decoration: none; }

.avatar.has-photo { background-color: #efe7da; background-repeat: no-repeat; border-color: var(--line); }
.rail .avatar.has-photo { border-color: #3a352f; }

.avatar.has-photo { border-radius: 10px; }
.avatar-md.has-photo { border-radius: 14px; }
