/* ── Buy flow (/gi) ── */
.gi-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); max-width: 1280px; margin: 0 auto;
}
.progress { list-style: none; display: flex; gap: 6px; counter-reset: step; }
.progress li {
  counter-increment: step;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 6px 12px 6px 6px; border-radius: 999px;
}
.progress li::before {
  content: counter(step);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--line); background: var(--paper);
}
.progress li[aria-current="step"] { color: var(--ink); background: var(--paper); }
.progress li[aria-current="step"]::before { background: var(--red); border-color: var(--red); color: var(--paper); }
.progress li.done { color: var(--ink); cursor: pointer; }
.progress li.done::before { content: "✓"; background: var(--ink); border-color: var(--ink); color: var(--paper); }
@media (max-width: 900px) {
  .progress li span { display: none; }
  .progress li { padding: 0; }
}

.gi {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(12px, 3vw, 40px) var(--gutter) 80px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
}
@media (max-width: 900px) { .gi { grid-template-columns: 1fr; } }

.gi-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(22px, 4vw, 40px);
  display: grid; gap: 20px;
  box-shadow: 0 40px 80px -50px rgba(80, 50, 20, .5);
}
.step-panel { display: grid; gap: 20px; }
.step-panel[hidden] { display: none; }
.gi-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 4.4vw, 58px); line-height: 1; letter-spacing: -0.02em;
  margin-top: -6px;
}
.gi-title em { color: var(--red); }
.muted { color: var(--ink-soft); font-weight: 400; font-style: normal; }

/* Fields (shared look with the landing form) */
.field { display: grid; gap: 8px; border: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 600; padding: 0; }
fieldset.field > legend { margin-bottom: 8px; }
.field input, .field textarea, .field select, .addr-edit input {
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--cream); border: 1.5px solid transparent;
  border-radius: 14px; padding: 14px 16px; width: 100%;
  resize: vertical; transition: border-color .2s, background .2s;
}
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field input:focus, .field textarea:focus, .field select:focus, .addr-edit input:focus { outline: none; border-color: var(--ink); background: #fff; }
.field input[aria-invalid="true"], .addr-edit input[aria-invalid="true"] { border-color: var(--red); }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .name-row { grid-template-columns: 1fr; } }
.name-preview { font-size: 13px; color: var(--ink-soft); }
.name-preview:empty { display: none; }
.name-preview strong { color: var(--ink); font-family: var(--serif); font-size: 17px; font-weight: 400; }
.counter { font-size: 12px; color: var(--ink-soft); justify-self: end; margin-top: -4px; }

/* For whom */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--cream); padding: 5px; border-radius: 16px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px 10px; border-radius: 12px; font-size: 16px; transition: background .2s, box-shadow .2s; }
.seg b { font-weight: 600; }
.seg input:checked + span { background: var(--paper); box-shadow: 0 6px 16px -8px rgba(60,40,20,.35); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 420px) { .seg span { font-size: 14px; padding: 11px 6px; } }
body.self .only-other, body:not(.self) .only-self { display: none !important; }

/* Address */
.addr { display: grid; gap: 8px; margin-top: -4px; }
.addr-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.addr-label { color: var(--ink-soft); }
.addr-value { font-weight: 500; word-break: break-all; }
.addr-value strong { color: var(--red); }
.link-btn { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.addr-edit { display: flex; align-items: center; background: var(--cream); border-radius: 14px; padding-left: 16px; }
.addr-edit[hidden] { display: none; }
.addr-prefix { color: var(--ink-soft); font-size: 17px; white-space: nowrap; }
.addr-edit input { padding-left: 2px; background: transparent; }
.addr-edit:focus-within { box-shadow: 0 0 0 1.5px var(--ink); background: #fff; }
.addr-edit:focus-within input { border-color: transparent; }
.slug-status { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slug-status[data-state="checking"] { color: var(--ink-soft); font-weight: 500; }
.slug-status[data-state="ok"] { color: #1F8A4C; }
.slug-status[data-state="ok"]::before { content: "✓"; }
.slug-status[data-state="taken"] { color: var(--red); }
.slug-status[data-state="taken"]::before { content: "✕"; }
.slug-suggest { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--sand); border-radius: 999px; padding: 3px 10px; }
.slug-suggest:hover { background: var(--ink); color: var(--paper); }

/* Delivery */
.choice-list { display: grid; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.choice:has(input:checked) { border-color: var(--ink); background: #fff; }
.choice input { accent-color: var(--red); width: 20px; height: 20px; margin-top: 2px; flex: none; }
.choice-body { display: grid; gap: 4px; }
.choice-body b { font-weight: 600; }
.choice-body span { font-size: 15px; color: var(--ink-soft); }
.mail-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.mail-fields[hidden] { display: none; }
@media (max-width: 520px) { .mail-fields { grid-template-columns: 1fr; } }

/* Summary */
.summary { display: grid; border-top: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary dt { color: var(--ink-soft); }
.summary dd { font-weight: 500; text-align: right; word-break: break-word; }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.total-price { font-family: var(--serif); font-size: 40px; }
.fine { font-size: 13px; color: var(--ink-soft); }
.preview-link { justify-self: start; }

.form-error { color: var(--red-deep); font-size: 14px; font-weight: 500; }
.form-error[hidden] { display: none; }
.gi-actions { display: flex; gap: 10px; justify-content: space-between; }
.gi-actions .btn-red { flex: 1; }
.gi-actions .btn[hidden] { display: none; }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* Live certificate */
.live { position: sticky; top: 20px; display: grid; gap: 14px; }
@media (max-width: 900px) { .live { position: static; } }
.live-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2EAF5E; box-shadow: 0 0 0 4px rgba(46,175,94,.18); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(46,175,94,.05); } }
.live .certificate { max-width: none; transform: rotate(.6deg); }
.live .cert-inner { padding: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 40px) clamp(24px, 3vw, 34px); }
.live .cert-logo { font-size: 22px; }
.live .cert-kicker { margin: 18px 0 14px; }
.cert-greet { font-family: var(--serif); font-style: italic; color: var(--red); font-size: clamp(20px, 2vw, 26px); margin-bottom: 4px; }
.cert-greet:empty { display: none; }
.live .cert-this { font-size: 19px; }
.live .cert-name { font-size: clamp(38px, 4.6vw, 64px); min-height: 1em; }
.live .cert-name.placeholder { color: var(--line); }
.live .cert-owner { font-size: clamp(19px, 1.8vw, 23px); }
.live .cert-msg { margin-top: 24px; }
.live .cert-msg p { font-size: 19px; }
.live .cert-meta { grid-template-columns: repeat(3, 1fr); margin: 28px 0 24px; }
.live .cert-meta div:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); }
.live .cert-meta div:first-child { border-left: 0; }
.live .wax { width: 96px; height: 96px; }
.live-url { text-align: center; font-size: 15px; color: var(--ink-soft); }
.live-url strong { color: var(--red); }
.flash { animation: flash .5s ease; }
@keyframes flash { from { background: rgba(215,50,43,.12); } to { background: transparent; } }
