/* =====================================================
   DESIGN SYSTEM — matches the rest of the Lifeline project
   ===================================================== */
:root {
  --cream: #F4EFE3;
  --paper: #FBF7EC;
  --paper-2: #F1EAD8;
  --crimson: #9B2226;
  --crimson-deep: #7C1115;
  --gold: #C8943A;
  --gold-deep: #B08537;
  --gold-soft: rgba(176,133,55,.10);
  --sage: #4A5D3F;
  --sage-deep: #2E3D27;
  --sage-soft: rgba(74,93,63,.08);
  --ink: #16110C;
  --ink-2: #2C2520;
  --ink-soft: #5A4F44;
  --ink-mute: #8A7E70;
  --rule: rgba(22,17,12,.10);
  --rule-soft: rgba(22,17,12,.06);
  --shadow-sm: 0 1px 2px rgba(22,17,12,.06), 0 2px 6px rgba(22,17,12,.04);
  --shadow-md: 0 4px 14px rgba(22,17,12,.10), 0 12px 28px rgba(22,17,12,.06);
  --shadow-lg: 0 8px 28px rgba(22,17,12,.12), 0 24px 60px rgba(22,17,12,.10);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
}

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

a { color: inherit; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   TOP TRUST BAND
   ===================================================== */
.trust-band {
  background: linear-gradient(180deg, #0F0A06 0%, #1A130B 100%);
  color: var(--cream);
  padding: 12px 24px;
  position: relative;
}
.trust-band::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176,133,55,.5) 50%, transparent);
}
.trust-band-inner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.trust-band .name {
  color: var(--paper);
}
.trust-band .name .it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  font-size: 13px;
  margin-left: 4px;
}

/* =====================================================
   PROGRESS HEADER
   Sticky bar showing where in the flow the user is.
   ===================================================== */
.progress-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(251,247,236,.94);
}
.progress-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.progress-brand {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  flex-shrink: 0;
}
.progress-brand .it { font-style: italic; color: var(--crimson); }
.progress-brand .tm { font-size: 9px; vertical-align: super; }

.progress-track {
  flex: 1;
  height: 4px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 999px;
  transition: width .45s cubic-bezier(.22,.61,.36,1);
}

.progress-step {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  flex-shrink: 0;
  white-space: nowrap;
}
.progress-step strong { color: var(--ink); }

@media (max-width: 600px) {
  .progress-brand { font-size: 14px; }
  .progress-step { font-size: 10px; }
}

/* =====================================================
   STEP CONTAINER
   Each step is a section. JS shows one at a time.
   ===================================================== */
.steps-area {
  padding: 60px 0 100px;
}
.step {
  display: none;
  animation: stepIn .5s cubic-bezier(.22,.61,.36,1) both;
}
.step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   STEP HEADERS
   Common pattern across all steps.
   ===================================================== */
.step-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 16px;
}
.step-eyebrow::before {
  content: ""; width: 24px; height: 1px;
  background: var(--gold); opacity: .55;
}

.step-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 350;
  line-height: 1.08;
  letter-spacing: -.018em;
  color: var(--ink);
  margin-bottom: 16px;
}
.step-title .it { font-style: italic; color: var(--crimson); font-weight: 350; }

.step-lead {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 40px;
}

/* =====================================================
   STEP 1 — WELCOME
   ===================================================== */
.welcome {
  text-align: center;
  max-width: 640px;
  margin: 40px auto 0;
}
.welcome .step-eyebrow { justify-content: center; }
.welcome .step-eyebrow::after {
  content: ""; width: 24px; height: 1px;
  background: var(--gold); opacity: .55;
}
.welcome .step-lead { margin-left: auto; margin-right: auto; }

.welcome-promise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 540px) {
  .welcome-promise { grid-template-columns: 1fr; gap: 10px; }
}
.welcome-promise .promise {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.welcome-promise .icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-deep);
  display: grid; place-items: center;
}
.welcome-promise .label {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

/* =====================================================
   STEP 2 — RECIPIENTS CONFIRMATION
   Mirrors the household visualizer from the public site.
   ===================================================== */
.recipients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 720px) { .recipients-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .recipients-grid { grid-template-columns: 1fr; } }

.recipient-tile {
  background: var(--cream);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 22px 16px 18px;
  position: relative;
  cursor: pointer;
  text-align: center;
  transition: transform .25s, border-color .25s, box-shadow .25s, background .25s;
  font-family: var(--sans);
}
.recipient-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(176,133,55,.55);
  box-shadow: var(--shadow-sm);
}
.recipient-tile.selected {
  border-color: var(--sage);
  background: linear-gradient(180deg, rgba(74,93,63,.04), var(--cream) 70%);
}
.recipient-tile .check {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sage), var(--sage-deep));
  color: var(--paper);
  display: grid; place-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity .25s, transform .25s cubic-bezier(.22,1,.36,1);
}
.recipient-tile.selected .check { opacity: 1; transform: scale(1); }

.recipient-tile .ico {
  width: 50px; height: 50px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--paper-2), var(--cream));
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  color: var(--ink);
}
.recipient-tile.selected .ico {
  background: linear-gradient(160deg, rgba(74,93,63,.10), var(--cream));
  border-color: rgba(74,93,63,.4);
  color: var(--sage-deep);
}
.recipient-tile .label {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.recipient-tile .meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

.recipients-counter {
  text-align: center;
  margin: 32px 0 24px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--sage-deep);
}
.recipients-counter .count {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
}

/* =====================================================
   PER-RECIPIENT FORM PAGE
   ===================================================== */
.recipient-page-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.recipient-page-eyebrow .pos {
  background: var(--gold);
  color: var(--paper);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .14em;
}
.recipient-page-eyebrow .type {
  color: var(--gold-deep);
}

.form-section {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 18px;
  transition: border-color .25s ease;
}
@media (max-width: 600px) { .form-section { padding: 22px 20px; } }

.form-section.allergies-section {
  border-left: 3px solid var(--crimson);
  background: linear-gradient(90deg, rgba(155,34,38,.03), var(--cream) 30%);
}

.form-section h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -.005em;
}
.form-section h3 .it { font-style: italic; color: var(--crimson); }

.form-section .section-sub {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 22px;
  line-height: 1.5;
}
.form-section .section-sub.critical { color: var(--crimson); font-weight: 600; }

/* =====================================================
   FORM FIELDS
   ===================================================== */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
@media (max-width: 600px) { .field-grid { grid-template-columns: 1fr; } }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field label .req {
  color: var(--crimson);
  margin-left: 2px;
}
.field label .hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  margin-left: 6px;
  font-size: 11px;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,148,58,.18);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.55; font-family: var(--sans); }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235A4F44' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-help {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  line-height: 1.45;
}

/* =====================================================
   YES/NO TOGGLE — gates conditional sections
   ===================================================== */
.yesno {
  display: inline-flex;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.yesno button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background .2s ease, color .2s ease;
}
.yesno button.active.yes {
  background: linear-gradient(180deg, var(--sage), var(--sage-deep));
  color: var(--paper);
  box-shadow: 0 2px 6px rgba(46,61,39,.25);
}
.yesno button.active.no {
  background: linear-gradient(180deg, #5A4F44, var(--ink-2));
  color: var(--paper);
  box-shadow: 0 2px 6px rgba(22,17,12,.18);
}

.gate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.gate-row .gate-label {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

.conditional {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
  display: none;
}
.conditional.shown { display: block; animation: stepIn .4s ease both; }

/* =====================================================
   REPEATING ROWS (medications, contacts)
   ===================================================== */
.repeater {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.repeater-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}
.repeater-row .row-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
@media (max-width: 540px) {
  .repeater-row .row-fields { grid-template-columns: 1fr; }
}
.repeater-row .remove-row {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  color: var(--ink-soft);
  display: grid; place-items: center;
  align-self: center;
  transition: background .15s, border-color .15s, color .15s;
}
.repeater-row .remove-row:hover {
  background: rgba(155,34,38,.06);
  border-color: rgba(155,34,38,.3);
  color: var(--crimson);
}
.add-row {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dotted var(--gold);
  align-self: flex-start;
}
.add-row:hover { color: var(--crimson); border-color: var(--crimson); }

/* =====================================================
   CHECKBOX (consent)
   ===================================================== */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--gold-soft);
  border-radius: 10px;
  border: 1px solid rgba(176,133,55,.25);
  margin-top: 16px;
}
.consent-row input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--sage);
  cursor: pointer;
  flex-shrink: 0;
}
.consent-row label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
}
.consent-row label strong { color: var(--ink); font-weight: 700; }

/* =====================================================
   STEP NAVIGATION (Continue / Back buttons)
   ===================================================== */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 14px 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  border: 0;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--crimson), var(--crimson-deep));
  color: var(--paper);
  box-shadow:
    0 6px 18px rgba(155,34,38,.28),
    0 1px 0 rgba(255,255,255,.10) inset;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(155,34,38,.34),
    0 1px 0 rgba(255,255,255,.10) inset;
}
.btn-primary svg { transition: transform .25s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  font-weight: 500;
}
.btn-ghost:hover { color: var(--ink); }

/* =====================================================
   REVIEW STEP
   ===================================================== */
.review-recipient {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}
.review-recipient-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(180deg, var(--paper-2), var(--cream));
  border-bottom: 1px solid var(--rule);
}
.review-recipient-head h4 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.review-recipient-head h4 .type {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-left: 8px;
}
.review-recipient-head .edit-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(176,133,55,.12);
}
.review-recipient-head .edit-btn:hover {
  background: rgba(176,133,55,.22);
  color: var(--crimson);
}
.review-recipient-body {
  padding: 18px 24px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
@media (max-width: 600px) { .review-recipient-body { grid-template-columns: 1fr; } }
.review-field .review-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 3px;
}
.review-field .review-value {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  font-weight: 500;
}
.review-field .review-value.empty {
  color: var(--ink-mute);
  font-style: italic;
}
.review-field.full { grid-column: 1 / -1; }
.review-field.allergies .review-label { color: var(--crimson); }
.review-field.allergies .review-value { font-weight: 600; }

/* =====================================================
   GENERATE STEP — final consent + generate button
   ===================================================== */
.generate-block {
  background: linear-gradient(180deg, var(--paper-2), var(--cream));
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 36px;
  margin-top: 32px;
  text-align: center;
}
.generate-block h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 12px;
}
.generate-block .it { font-style: italic; color: var(--crimson); }
.generate-block p {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.consent-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 28px;
}
.consent-stack .consent-row {
  text-align: left;
}
.consent-disclosure {
  text-align: left;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  background: #fbf6ee;
  border: 1px solid #e6d9c2;
  border-radius: 10px;
  padding: 14px 16px;
}
.consent-disclosure strong { font-weight: 700; }

.btn-generate {
  font-size: 17px;
  padding: 16px 36px;
}

/* =====================================================
   DONE STEP — generation in progress / complete
   ===================================================== */
.done-block {
  text-align: center;
  max-width: 540px;
  margin: 40px auto 0;
}
.spinner-frame {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2F2418, #1A130B);
  margin: 0 auto 24px;
  display: grid; place-items: center;
  box-shadow:
    0 0 0 1px rgba(176,133,55,.4),
    0 0 0 8px var(--paper),
    0 0 0 9px rgba(176,133,55,.3);
  position: relative;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(200,148,58,.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.done-block.complete .spinner { display: none; }
.done-block.complete .spinner-frame::before {
  content: "";
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sage), var(--sage-deep));
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 22px;
  background-repeat: no-repeat;
  background-position: center;
}

/* =====================================================
   FOOTER (minimal — this is a focused form, not a marketing page)
   ===================================================== */
.foot {
  border-top: 1px solid var(--rule);
  padding: 28px 24px 32px;
  background: var(--paper);
}
.foot-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.6;
}
.foot-inner a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 12px;
  font-weight: 500;
  transition: color .15s ease;
}
.foot-inner a:hover { color: var(--crimson); }
.foot-inner .privacy-note {
  margin-top: 12px;
  font-style: italic;
  color: var(--ink-mute);
}

/* =====================================================
   DEMO CONTROLS — visible in the template, removed in production
   ===================================================== */
.demo-strip {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}
.demo-strip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.demo-strip button {
  background: var(--gold);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.demo-strip button:hover { background: var(--gold-deep); }

/* =====================================================
   CARD COLOR PICKER
   ===================================================== */
.color-picker-section {
  margin: 32px 0 8px;
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.color-picker-section h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.color-picker-section .section-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.color-swatches {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  position: relative;
  outline: none;
}
.color-swatch:hover {
  transform: scale(1.12);
}
.color-swatch.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
  transform: scale(1.10);
}
.color-swatch.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/55% no-repeat;
}