/* ---------- Colour palette (change these to restyle the whole app) ---------- */
:root {
  --bg: #f6f1ea;          /* warm ivory page */
  --card: #fffdf9;        /* slightly lighter cards */
  --ink: #1f1d1a;         /* main text */
  --muted: #7a7268;       /* secondary text */
  --line: #e6ddd0;        /* thin dividers */
  --gold: #a8875a;        /* accent */
  --alert: #8a2f2f;       /* safety alert text */
  --alert-bg: #f8ecea;    /* safety alert background */

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Centre the content in a comfortable reading column */
.brief {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 12px;
  letter-spacing: 0.35em;
  color: var(--gold);
  font-weight: 600;
}
.date {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Greeting ---------- */
.greeting { padding: 48px 0 28px; }
.greeting h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.subtle {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

/* ---------- Safety alert ---------- */
.alert {
  display: flex;
  gap: 16px;
  background: var(--alert-bg);
  border-left: 3px solid var(--alert);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 40px;
}
.alert-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--alert);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.alert-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--alert);
  font-weight: 600;
  margin: 2px 0 4px;
}
.alert-text { margin: 0; }

/* The alert on the Shift Brief is tappable too */
button.alert {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  cursor: pointer;
}
button.alert:hover { background: #f5e4e1; }
.alert-text strong { font-weight: 600; }

/* ---------- Past / Present / Future ---------- */
.phase { margin-bottom: 40px; }
.phase h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.phase-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  min-width: 70px;
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.items { overflow: hidden; }
.items li { border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: none; }

/* Each card is a button, so it can be tapped, clicked, or reached with the keyboard */
.item {
  display: block;
  width: 100%;
  padding: 18px 44px 18px 22px;
  position: relative;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.item:hover { background: #faf5ec; }
.item:focus-visible,
.alert:focus-visible,
.close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* Small arrow on the right hinting "tap for more" */
.item::after {
  content: "›";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--gold);
  opacity: 0.6;
  transition: opacity 0.2s ease, right 0.2s ease;
}
.item:hover::after { opacity: 1; right: 16px; }

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.guest {
  font-weight: 600;
  font-size: 15px;
}
.where {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.note {
  display: block;
  margin: 0;
  color: #3d3934;
  font-size: 15px;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Guest profile panel ---------- */

/* Soft dimmed background behind the panel */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 29, 26, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  z-index: 10;
}
.overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* The panel itself slides in from the right */
.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  background: var(--bg);
  box-shadow: -12px 0 40px rgba(31, 29, 26, 0.12);
  overflow-y: auto;
  padding: 24px 32px 48px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.35s;
  z-index: 11;
}
.panel.open {
  transform: none;
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
body.panel-open { overflow: hidden; }   /* stop the page behind from scrolling */

.close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px 6px 12px;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.close span { font-size: 18px; line-height: 1; }
.close:hover { color: var(--ink); border-color: var(--gold); }

.profile-head { padding: 36px 0 28px; }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 10px;
}
.profile-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 8px;
}
.code-name {
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 6px;
}
.profile-where { color: var(--muted); margin: 0; font-size: 15px; }

.panel .alert { margin-bottom: 32px; }

.profile-section { margin-bottom: 32px; }
.profile-section h3 {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 12px;
}
.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.profile-list li {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: #3d3934;
}
.profile-list li:last-child { border-bottom: none; }
.note-date {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.last-seen {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 14px;
  color: var(--muted);
}
.last-seen strong { color: var(--ink); font-weight: 600; }

/* =====================================================================
   LIVE PILOT
   ===================================================================== */

[hidden] { display: none !important; }

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

/* ---------- Demo / Live switch ---------- */
.topbar { gap: 16px; flex-wrap: wrap; }
.mode-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.mode-switch button {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.mode-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mode-switch button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Mode banner ---------- */
.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: -8px 0 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
}
.banner p { margin: 0; flex: 1; min-width: 220px; }
.banner strong { color: var(--ink); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.banner-live .dot { background: #5e8a6e; box-shadow: 0 0 0 4px rgba(94, 138, 110, 0.15); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #3a3631; }
.btn-quiet { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--gold); }
.btn-danger { background: var(--alert); color: #fff; }
.btn-danger:hover { background: #742626; }
.btn-danger-outline {
  background: none;
  border-color: rgba(138, 47, 47, 0.45);
  color: var(--alert);
  font-size: 13px;
  padding: 7px 16px;
}
.btn-danger-outline:hover { background: var(--alert-bg); border-color: var(--alert); }
.btn-small { font-size: 12px; padding: 5px 14px; }

.link-danger {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--alert);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-danger:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.icon-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--line); color: var(--alert); }
.icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Empty live list ---------- */
.onboarding {
  text-align: center;
  padding: 48px 28px;
  margin-bottom: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.onboarding h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 10px;
}
.onboarding p:not(.eyebrow) { color: var(--muted); max-width: 420px; margin: 0 auto 24px; }

/* ---------- Lists on the brief ---------- */
.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.phase-header h2 { margin: 0; }

.items .empty {
  padding: 18px 22px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}
.items .more button {
  width: 100%;
  padding: 12px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--gold);
  cursor: pointer;
}
.items .more button:hover { background: #faf5ec; }
.items .more button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.has-alert { color: var(--alert); font-weight: 600; }

/* ---------- Forms ---------- */
.form, .note-form { margin-bottom: 32px; }
.form-title {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 12px;
}
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.input, .textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  margin: 0 0 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.textarea { resize: vertical; min-height: 84px; margin-bottom: 14px; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 135, 90, 0.15);
}

.chips-field { border: 0; padding: 0; margin: 0 0 8px; }
.chips-field legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip span:hover { border-color: var(--gold); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-safety input:checked + span { background: var(--alert); border-color: var(--alert); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.form-hint { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.form-error { font-size: 13px; color: var(--alert); margin: 0 0 14px; }
.form-error:empty { display: none; }

/* ---------- Notes inside a live profile ---------- */
.profile-alerts { margin-bottom: 32px; }
.panel .profile-alerts .alert { margin-bottom: 10px; }
.alert-content { flex: 1; }
.note-row { display: flex; gap: 12px; align-items: flex-start; }
.note-body { flex: 1; }
.note-actions { display: flex; gap: 4px; align-items: center; flex: none; }
.profile-danger { margin-top: 28px; }

/* ---------- Confirm pop-up ---------- */
.confirm {
  border: 0;
  border-radius: 12px;
  padding: 32px;
  width: calc(100% - 40px);
  max-width: 420px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  box-shadow: 0 24px 60px rgba(31, 29, 26, 0.25);
}
.confirm::backdrop { background: rgba(31, 29, 26, 0.4); }
.confirm h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 10px;
}
.confirm .subtle { margin-bottom: 24px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* =====================================================================
   "WHAT DID YOU NOTICE?" CAPTURE FLOW
   ===================================================================== */

/* Space at the bottom of the brief so the floating button never hides content */
.brief { padding-bottom: 120px; }

/* ---------- Floating button on the Shift Brief ---------- */
.notice-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 26px 12px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(31, 29, 26, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notice-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(31, 29, 26, 0.28); }
.notice-fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.notice-plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
}

/* ---------- Heads-ups and spacing for alerts on the brief ---------- */
#alerts .alert { margin-bottom: 12px; }
#alerts:not(:empty) { margin-bottom: 28px; }
#headsups:not(:empty) { margin-bottom: 40px; }

.headsup {
  display: flex;
  gap: 16px;
  width: 100%;
  background: #f6efe3;
  border: 0;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 14px 20px;
  margin-bottom: 10px;
  font: inherit;
  font-size: 15px;
  color: inherit;
  text-align: left;
}
button.headsup { cursor: pointer; transition: background 0.2s ease; }
button.headsup:hover { background: #f1e6d4; }
button.headsup:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.headsup-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2px;
}
.alert-by { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.profile-capture { margin-bottom: 32px; }

/* Gentle glow on things that were just added */
.just-added { animation: justAdded 3.2s ease both; }
@keyframes justAdded {
  0%, 35% { box-shadow: inset 0 0 0 2px var(--gold); background-color: #f6ecd9; }
  100%    { box-shadow: inset 0 0 0 0 transparent; }
}

/* ---------- The full-screen capture view ---------- */
.capture {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.capture.open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }

.capture-top {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.step { display: inline-flex; align-items: center; gap: 8px; }
.step::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}
.step.active { color: var(--ink); }
.step.active::before { background: var(--gold); }
.step.done::before { background: var(--gold); opacity: 0.45; }
.steps .sep { width: 18px; height: 1px; background: var(--line); }

.capture-body { max-width: 640px; margin: 0 auto; padding: 40px 24px 72px; }
.capture-step { animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.capture h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.1;
  margin: 0 0 20px;
}
.capture h1:focus { outline: none; }

/* Step 1: write */
.staff-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
}
.staff-line strong { color: var(--ink); font-weight: 600; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  flex: none;
}
.staff-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 6px; }
.link-quiet {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-quiet:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.capture-text { font-size: 17px; line-height: 1.6; min-height: 150px; padding: 16px 18px; }
/* Voice input */
.voice-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.mic-btn:hover { background: #faf5ec; }
.mic-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mic-icon { display: inline-flex; }
.mic-btn.listening { background: var(--ink); color: var(--bg); }
.mic-btn.listening .mic-icon { color: var(--gold); animation: micPulse 1.4s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.voice-lang {
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.voice-lang:disabled { opacity: 0.5; cursor: default; }
.voice-lang:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.voice-status { flex: 1 1 220px; margin: 0; font-size: 13px; color: var(--muted); }
.voice-status.error { color: var(--alert); }
.voice-privacy { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.capture-text.listening { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168, 135, 90, 0.15); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.tag {
  font: inherit;
  font-size: 13px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tag:hover { border-color: var(--gold); }
.tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tag-allergy[aria-pressed="true"] { background: var(--alert); border-color: var(--alert); }
.tag:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.optional { color: var(--muted); font-style: italic; }
.btn-wide { width: 100%; padding: 14px 22px; font-size: 15px; }
.reassure { font-size: 12px; color: var(--muted); text-align: center; margin: 16px 0 0; }

/* Step 2: "Here's how we've filed this" */
.understood-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(31, 29, 26, 0.05);
}
.card-meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.02em; }
.summary-input {
  width: 100%;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line);
  padding: 4px 0 8px;
}
.summary-input:focus { outline: none; border-bottom-color: var(--gold); }
.edit-hint { font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.you-wrote { font-size: 13px; color: var(--muted); font-style: italic; margin: 0 0 18px; }
.type-line { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.type-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3ebdd;
  color: var(--gold);
}
.type-tag.safety { background: var(--alert-bg); color: var(--alert); }

.question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.question p { margin: 0; font-size: 15px; }
.fixed-note {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--alert);
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.segmented input:checked + span { background: var(--ink); color: var(--bg); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.team-picker {
  border: 0;
  margin: -4px 0 0;
  padding: 0 0 18px;
  animation: fadeUp 0.3s ease both;
}
.team-picker legend {
  font-size: 13px;
  color: var(--muted);
  padding: 0;
  margin-bottom: 10px;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0 10px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  cursor: pointer;
}
.check-row input { accent-color: var(--ink); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.check-row small { display: block; color: var(--muted); font-size: 13px; }
.followup-input { margin: 0; font-size: 14px; }

.actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.actions-end { justify-content: flex-end; }
.actions-center { justify-content: center; }

/* Step 3: "Here's what your note becomes" */
.becomes-sub { margin: -8px 0 28px; font-size: 16px; }
.original {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.4;
  color: #3d3934;
  margin: 0 0 6px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
}
.original-by { font-size: 12px; color: var(--muted); margin: 0 0 32px 20px; }
.becomes-list {
  list-style: none;
  margin: 0 0 36px 9px;
  padding: 0 0 0 26px;
  border-left: 1px solid var(--line);
}
.becomes-list li {
  position: relative;
  margin-bottom: 22px;
  animation: fadeUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.becomes-list li:last-child { margin-bottom: 0; }
.becomes-list li::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--bg);
}
.becomes-list li.is-safety::before { background: var(--alert); }
.becomes-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}
.is-safety .becomes-label { color: var(--alert); }
.becomes-list .alert, .becomes-list .headsup { margin-bottom: 0; }
.preview-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 20px;
}

/* Step 4: thank you */
.thanks { text-align: center; padding-top: 16px; }
.thanks-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin: 0 auto 24px;
}
.thanks .lead { color: var(--muted); max-width: 440px; margin: 0 auto 36px; font-size: 16px; }
.added-list {
  list-style: none;
  text-align: left;
  max-width: 440px;
  margin: 0 auto 32px;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.added-list li {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.added-list li:last-child { border-bottom: none; }
.tick { color: #5e8a6e; font-weight: 600; }

@media (max-width: 520px) {
  .notice-fab { left: 16px; right: 16px; bottom: 16px; justify-content: center; }
  .staff-fields { grid-template-columns: 1fr; }
  .understood-card { padding: 22px 18px; }
  .summary-input { font-size: 22px; }
  .actions .btn { flex: 1; }
}

/* =====================================================================
   WELCOME: "Where do you work?" / "What's your role?"
   ===================================================================== */

/* Business label in the top bar */
.brand-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.business-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.business-chip:hover { color: var(--ink); border-color: var(--gold); }
.business-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Your role, shown read-only on the capture screen */
.role-readout { margin: 0 0 18px; padding: 11px 0; font-size: 15px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

/* The welcome page */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #fdfaf4 0%, rgba(253, 250, 244, 0) 70%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.welcome.open { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.welcome-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 88px 24px 72px;
}
.welcome-close { position: absolute; top: 24px; right: 24px; }
.welcome-step { animation: fadeUp 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.welcome h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 7.5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
.welcome h1:focus { outline: none; }
.welcome-rule { width: 48px; height: 1px; background: var(--gold); margin: 0 0 24px; }
.welcome-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3.4vw, 28px);
  color: #3d3934;
  margin: 0 0 36px;
}
.welcome-note { font-size: 12px; color: var(--muted); text-align: center; margin: 32px 0 0; }
.back-link { display: inline-block; margin-bottom: 32px; }

/* "Where do you work?" cards */
.business-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.business-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 30px 28px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.business-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(31, 29, 26, 0.08);
}
.business-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.business-card.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.business-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f6efe3;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 16px;
}
.business-name { font-family: var(--serif); font-size: 27px; line-height: 1.15; }
.business-blurb { font-size: 13px; color: var(--muted); }

/* "What's your role?" cards */
.role-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.role-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  animation: fadeUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.role-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(31, 29, 26, 0.07);
}
.role-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.role-card.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.role-arrow {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--gold);
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.role-card:hover .role-arrow { opacity: 1; transform: translateX(3px); }

@media (max-width: 560px) {
  .welcome-inner { padding-top: 72px; }
  .business-grid, .role-list { grid-template-columns: 1fr; }
  .business-card { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; padding: 20px; }
  .business-icon { margin-bottom: 0; width: 48px; height: 48px; font-size: 22px; }
  .business-blurb { flex-basis: 100%; }
}

/* =====================================================================
   TWO CONTRIBUTION PATHS
   ===================================================================== */

/* "Share an Observation" / "Share a Leadership Insight" */
.path-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 4px 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  max-width: 520px;
}
.path-option {
  flex: 1;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.path-option:hover { color: var(--ink); }
.path-option[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.path-option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Questions whose answers sit underneath (e.g. audience chips) */
.question-stacked { display: block; }
.question-stacked > p { margin-bottom: 12px; }

/* Honest "prototype: nothing is sent" wording */
.simulation-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f6efe3;
  font-size: 12px;
  color: var(--muted);
}
.audience-line {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.suggested-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3ebdd;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  vertical-align: middle;
}
.becomes-list li.is-insight::before,
.becomes-list li.is-observation::before { background: var(--ink); }
.becomes-list li.is-recognition::before { background: #5e8a6e; }

/* Audience: the detail under the chosen type (a name, a department, teams) */
.audience-detail { margin-top: 14px; animation: fadeUp 0.3s ease both; }
.audience-detail .input { margin-bottom: 0; max-width: 280px; }
.simulation-note strong { color: var(--ink); font-weight: 600; }

/* Recognition: "For [first name]" under the tick box */
.recognition-label { margin: 8px 0 6px 30px; }
.recognition-label + .followup-input { margin-left: 30px; width: calc(100% - 30px); max-width: 280px; margin-bottom: 10px; }

/* =====================================================================
   ONBOARDING
   ===================================================================== */

/* ---------- Opening promise: the photograph, and the one-time film ---------- */
/* Every screen has a matching picture and film, and each fills the screen edge to edge.
   Portrait screens (phones): the portrait set. Landscape screens (desktop): the landscape set.
   The browser switches when the window is resized or rotated. */

.welcome.is-opening { background: #d9bf9a; }
.welcome.is-opening .welcome-inner { max-width: none; padding: 0; min-height: 100%; }
.welcome.has-film { overflow: hidden; }
.welcome.no-fade, .welcome.no-fade.open { transition: none; }   /* the film's poster is there instantly */

.opening {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  background: #d9bf9a;   /* shows for a moment while the picture loads */
}

.opening-frame {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 8vh, 72px) 24px clamp(20px, 13vh, 120px);   /* leaves room on short screens */
  /* Portrait: the text-free copy of welcome-reference.png (the original has the words painted in). */
  background: url("welcome-background.jpg") 36% 50% / cover no-repeat, #d9bf9a;
  container-type: inline-size;   /* the type below scales with the screen */
}
@media (orientation: landscape) {
  .opening-frame { background: url("welcome-landscape.png") 50% 50% / cover no-repeat, #d9bf9a; }
}

.opening-copy {
  position: relative;
  width: 100%;
  max-width: 640px;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.opening.is-waiting .opening-copy { animation-play-state: paused; }   /* waits for the film to finish */

/* The type scales with the screen's width AND height, so short landscape screens (a phone on its side) fit too. */
.opening-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-size: clamp(16px, min(6.4cqw, 4vh), 32px);
  letter-spacing: 0.3em;
  color: #2a1d14;
  text-shadow: 0 1px 0 rgba(255, 240, 215, 0.35);
}
.opening-rule { display: block; width: 44px; height: 1px; margin: 18px auto 14px; background: rgba(42, 29, 20, 0.6); }
.opening-tagline {
  margin: 0 0 clamp(18px, 7vh, 72px);
  font-size: 11px;
  font-size: clamp(10px, min(3.2cqw, 1.7vh), 13px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #2a1d14;
  text-shadow: 0 1px 0 rgba(255, 240, 215, 0.3);
}
.opening .opening-title {   /* two classes: beats the generic ".welcome h1" size */
  margin: 0 0 22px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(42px, 7.5vw, 68px);
  font-size: clamp(28px, min(12.3cqw, 9.5vh), 70px);
  line-height: 1.02;
  color: #2a1d14;
}
.opening-title:focus { outline: none; }
.opening-story { position: relative; display: inline-block; }
.opening-story svg {
  position: absolute;
  left: -4%;
  bottom: -0.12em;
  width: 108%;
  height: 0.32em;
  color: #6b4a2b;
}
.opening-sub {
  max-width: 15.5em;   /* two balanced lines, as in the reference */
  margin: 0 auto clamp(20px, 5vh, 44px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  font-size: clamp(15px, min(5.85cqw, 3.1vh), 28px);
  line-height: 1.35;
  color: #3b2a1e;
}

/* The Begin button: espresso, with a warm gold edge of light */
.begin-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 20px 64px;
  border: 1px solid rgba(214, 174, 110, 0.75);
  border-radius: 999px;
  background: linear-gradient(180deg, #3d291b 0%, #24170f 100%);
  color: #fbf3e4;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 220, 160, 0.18),
    0 14px 34px rgba(60, 35, 15, 0.35),
    inset 0 1px 0 rgba(255, 228, 180, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.opening-frame .begin-btn {
  font-size: clamp(17px, min(6.4cqw, 3.2vh), 26px);
  padding: clamp(12px, min(5.4cqw, 2.4vh), 22px) clamp(32px, 14cqw, 64px);
}
.begin-btn::after {
  content: "";
  position: absolute;
  left: 25%; right: 25%;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: radial-gradient(ellipse at center, #ffe2a8 0%, rgba(255, 226, 168, 0) 75%);
  filter: blur(0.5px);
}
.begin-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 220, 160, 0.3), 0 20px 44px rgba(60, 35, 15, 0.4), inset 0 1px 0 rgba(255, 228, 180, 0.3); }
.begin-btn:focus-visible { outline: 2px solid #f3d08b; outline-offset: 4px; }
.begin-btn-small { padding: 16px 40px; font-size: 20px; margin-top: 8px; }

/* ---------- The opening film (plays once, on the very first open) ---------- */
.film {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: #d9bf9a;
  transition: opacity 0.8s ease;   /* eases into the static welcome screen */
}
.film.is-ending { opacity: 0; pointer-events: none; }

/* The film fills the screen edge to edge. Its poster (set on the element) shows instantly. */
.film-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #d9bf9a center / cover no-repeat;
}
.film-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;   /* the poster hands over to the first frame */
}
.film.is-playing .film-video { opacity: 1; }

.film-skip {
  position: absolute;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  min-width: 44px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(255, 244, 224, 0.6);
  border-radius: 999px;
  background: rgba(36, 23, 15, 0.66);
  color: #fff8ea;
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.film-skip:hover { background: rgba(36, 23, 15, 0.82); }
.film-skip:focus-visible { outline: 2px solid #f3d08b; outline-offset: 3px; }

@media (max-width: 720px) {
  .begin-btn { padding: 18px 48px; font-size: 22px; }
}

/* ---------- Progress ---------- */
.ob-progress { display: flex; align-items: center; gap: 8px; margin: 0 0 28px; }
.ob-dot { width: 22px; height: 3px; border-radius: 3px; background: var(--line); transition: background 0.3s ease; }
.ob-dot.done { background: rgba(168, 135, 90, 0.5); }
.ob-dot.active { background: var(--gold); }
.ob-progress-text { margin-left: 8px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Step 1: "What kind of experience do you help create?" ---------- */
.welcome-inner.is-wide { max-width: 1040px; }   /* room for three photographic cards (this step only) */

/* Restrained staggered entrance: progress, back + label, heading + text, cards, Continue */
.ob-stagger { animation: obEnter 0.22s ease-out backwards; animation-delay: calc(var(--s, 0) * 80ms); }
@keyframes obEnter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.welcome-step.env-step { animation: none; }   /* the pieces above enter one by one instead */

/* A more editorial size for this step, so more of the cards are in view */
.welcome-step.env-step h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; margin-bottom: 18px; }
.env-lead { max-width: 640px; margin: 0; font-size: 16px; line-height: 1.6; color: #5f574d; }
.env-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }

.env-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fffdf8;                  /* ivory */
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(80, 55, 25, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
/* The real radio button covers the whole card: tap or click anywhere to choose. */
.env-radio {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
/* The card's border and selected outline. It never changes the card's size. */
.env-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid #e8dcc6;            /* champagne */
  border-radius: 14px;
  pointer-events: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.env-radio:focus-visible ~ .env-frame { outline: 2px solid #2a1d14; outline-offset: 4px; }

.env-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;                 /* the photographs' own shape: no awkward crop */
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background: #eadfce;
}
.env-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.3s ease;
}
.env-text { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 26px; min-height: 126px; }
.env-text .business-name {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
  transition: color 0.22s ease;
}
.env-text .business-blurb { font-size: 14px; line-height: 1.45; color: #675e53; }

/* Hover: only where there is a pointer. Nothing depends on it. */
@media (hover: hover) {
  .env-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(80, 55, 25, 0.1); }
  .env-card:hover .env-frame { border-color: #c6a56d; }
  .env-card:hover .env-image img { transform: scale(1.04); }
  .env-card:hover .business-name { color: #8a6a3f; }
}

/* Selected: a gold outline, a small gold check, a gentle warmth. Same size, same layout. */
.env-radio:checked ~ .env-frame { border-color: #b8935b; box-shadow: inset 0 0 0 1px #b8935b; }
.env-radio:checked ~ .env-image img { filter: saturate(1.08) sepia(0.07) brightness(1.02); }
.env-radio:checked ~ .env-text .business-name { color: #8a6a3f; }
.env-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #c29b5d, #a37c3e);
  box-shadow: 0 2px 8px rgba(60, 40, 15, 0.28);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
.env-radio:checked ~ .env-image .env-check { opacity: 1; transform: none; }

.ob-describe { margin-top: 24px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; animation: fadeUp 0.35s ease both; }

/* Instruction and Continue. Stays within reach on tall, scrolling screens. */
.env-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
  padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  background: #f6f1ea;   /* a solid strip, so the pictures never show through the text */
}
.env-actions::before {   /* a short fade above the strip */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 32px;
  background: linear-gradient(180deg, rgba(246, 241, 234, 0), #f6f1ea);
  pointer-events: none;
}
.env-hint { margin: 0; font-size: 14px; color: #675e53; }

/* Continue: champagne-gold */
.btn-continue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 34px;
  border: 1px solid #b8935b;
  border-radius: 999px;
  background: linear-gradient(180deg, #dcc08d 0%, #c4a06a 100%);
  color: #2a1d14;
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(120, 90, 40, 0.18), inset 0 1px 0 rgba(255, 246, 222, 0.6);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.btn-continue .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn-continue:hover:not(:disabled) {
  background: linear-gradient(180deg, #e4c998 0%, #cba873 100%);
  box-shadow: 0 10px 22px rgba(120, 90, 40, 0.24), inset 0 1px 0 rgba(255, 246, 222, 0.7);
}
.btn-continue:hover:not(:disabled) .arrow { transform: translateX(4px); }
.btn-continue:active:not(:disabled) {
  transform: translateY(1px);
  background: linear-gradient(180deg, #c9a76f 0%, #b8935b 100%);
  box-shadow: inset 0 2px 4px rgba(80, 55, 20, 0.25);
}
.btn-continue:focus-visible { outline: 2px solid #2a1d14; outline-offset: 3px; }
.btn-continue:disabled {
  cursor: not-allowed;
  background: #efe6d6;
  border-color: #e3d6bf;
  color: #8f8474;
  box-shadow: none;
}

@media (max-width: 900px) {
  .env-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .env-grid { grid-template-columns: 1fr; gap: 18px; }
  .env-text { min-height: 118px; padding: 18px 20px 22px; }
  .env-actions { justify-content: center; text-align: center; gap: 8px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); }
  .btn-continue { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ob-stagger { animation: none; }
  .env-card, .env-image img, .env-frame, .env-check, .btn-continue, .btn-continue .arrow { transition: none; }
  .env-card:hover { transform: none; }
  .env-card:hover .env-image img { transform: none; }
}

/* ---------- Step 2: "What's your job title?" ---------- */
.ob-form { margin-top: 8px; }                                              /* also used by the profile step */
.ob-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }   /* also used by the profile step */

.welcome-step.role-step { animation: none; }   /* the pieces enter one by one instead */
.welcome-step.role-step h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; margin-bottom: 18px; }
.role-note { margin: 10px 0 0; font-size: 13px; color: #675e53; }

.role-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 32px; }
.role-main { display: grid; gap: 30px; min-width: 0; }
.role-aside { position: sticky; top: 24px; display: grid; gap: 18px; }
.role-field .field-label { display: block; margin: 0 0 8px; font-size: 13px; letter-spacing: 0.04em; color: #675e53; }
.role-field .input { background-color: #fffdf8; border-color: #e3d6bf; border-radius: 12px; padding: 13px 16px; margin-bottom: 0; }
.role-field .input:focus { border-color: var(--gold); }
.role-field .ob-search { padding-left: 44px; }   /* room for the search icon */

/* Search + suggestions */
.ob-search {
  padding-left: 44px;
  background-image: radial-gradient(circle at 20px 50%, transparent 5px, #8a7f70 5.5px, #8a7f70 6.5px, transparent 7px);
  background-repeat: no-repeat;
  margin-bottom: 12px;
}
.ob-options {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 292px;
  overflow-y: auto;
  background: #fffdf8;
  border: 1px solid #e8dcc6;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(80, 55, 25, 0.05);
}
.role-option {
  position: relative;
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 44px 13px 18px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.role-option:hover { background: #faf5ec; }
.role-option:focus-visible { outline: 2px solid #2a1d14; outline-offset: -2px; }
.role-option.selected { background: #f6eddc; color: #6f5226; }
.role-option.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: #b8935b;
}
.role-option.selected::after {
  content: "✓";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 15px var(--sans);
  color: #a37c3e;
}
.role-option-custom {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #8a6a3f;
  border-top: 1px solid #efe4d0;
  border-radius: 0 0 10px 10px;
}
.ob-empty { padding: 12px 18px; font-size: 13px; color: #675e53; font-style: italic; }
.ob-custom { margin-top: 14px; animation: fadeUp 0.25s ease both; }

/* The quiet reassurance about access (replaces the old "System role" field) */
.access-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #efe4d0;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.6);
}
.access-lock {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #a37c3e;
  background: #f6eddc;
}
.access-title { margin: 0 0 2px; font-family: var(--serif); font-style: italic; font-size: 18px; color: #3d3934; }
.access-text { margin: 0; font-size: 13px; line-height: 1.5; color: #675e53; }

/* Your professional card (updates as you choose) */
.identity-card {
  position: relative;
  padding: 26px 26px 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf5ea 100%);
  border: 1px solid #ecdfca;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 44px rgba(80, 55, 25, 0.09);
}
.identity-card::before {   /* a hairline of gold along the top */
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(168, 135, 90, 0), var(--gold), rgba(168, 135, 90, 0));
}
.id-eyebrow { margin: 0 0 20px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.id-top { display: flex; gap: 18px; align-items: center; }
.id-avatar {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #3d291b, #24170f);
  color: #fbf3e4;
  font-family: var(--serif);
  font-size: 28px;
  box-shadow: 0 0 0 3px #fffdf8, 0 0 0 4px rgba(168, 135, 90, 0.45);
}
.id-avatar.is-empty { background: linear-gradient(160deg, #f3e9d6, #e6d6b8); color: #9a7b4a; }
.id-avatar img { width: 100%; height: 100%; object-fit: cover; }
.id-text { min-width: 0; }
.id-name { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.id-title { margin: 8px 0 0; font-size: 16px; line-height: 1.35; color: #3d3934; overflow-wrap: anywhere; }
.id-meta { margin: 4px 0 0; font-size: 13px; color: #675e53; }
.id-meta:empty { display: none; }
.id-placeholder { color: #a89c8a; font-style: italic; }

/* The message and Continue (same strip as Step 1) */
.role-error { margin: 0; font-size: 14px; font-style: italic; color: #8a2f2f; }
.env-actions .btn-continue { margin-left: auto; }

@media (max-width: 900px) {
  .role-layout { grid-template-columns: 1fr; gap: 28px; }
  .role-aside { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .role-option { transition: none; }
  .ob-custom { animation: none; }
}
/* ---------- Your Signature Card (profile step): the card is the hero, one question beside it ---------- */
.sig-step .back-link { margin-bottom: 20px; }
.ob-profile { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 56px; align-items: start; }
.ob-profile .ob-card-wrap { order: -1; position: sticky; top: 24px; }   /* the card first: left on desktop, on top on a phone */
.ob-card-wrap { position: sticky; top: 24px; }
.ob-photo-row { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.ob-range { width: 100%; margin: 6px 0 12px; accent-color: var(--gold); }
#ob-years-out { color: var(--ink); font-weight: 600; }
.ob-langs .chips { margin-bottom: 10px; }
.ob-lang-add { display: flex; gap: 8px; align-items: center; margin: 10px 0 8px; }
.ob-lang-add .input { margin: 0; max-width: 240px; }

.welcome .sig-step h1.pq-title {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  margin-bottom: 14px;
}
.pq-greet { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold); }
.pq-lead { margin: 0 0 22px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: #3d3934; }
.pq-reply { min-height: 1.7em; margin: 14px 0 4px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--gold); }
.pq-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.sig-step .form-hint { margin: -2px 0 16px; font-size: 12px; color: var(--muted); max-width: 440px; }
.pq-line { font-size: 17px; }
.pq-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.suggest-btn {
  font: inherit;
  font-size: 13px;
  padding: 7px 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
}
.suggest-btn:hover { border-color: var(--gold); }
.suggest-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.place-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 14px;
  font-size: 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
}
.place-x { font: inherit; font-size: 16px; line-height: 1; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: inherit; cursor: pointer; }
.place-x:hover { background: rgba(255, 255, 255, 0.3); }
.place-x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.consent-row { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 6px; font-size: 14px; cursor: pointer; }
.consent-row input { margin-top: 3px; accent-color: var(--gold); }

/* The card: ivory and champagne, a gold hairline, an embossed inner frame */
.profile-card { position: relative; text-align: left; perspective: 1400px; }   /* the scene: two faces and a flip button */
.card-flipper { display: grid; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.3, 0.7, 0.2, 1); }
.card-flipper.is-flipped { transform: rotateY(180deg); }
.card-face {
  grid-area: 1 / 1;   /* both faces share one cell, so the card is as tall as the taller face */
  position: relative;
  overflow: hidden;
  padding: 34px 30px 24px;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(165deg, #fffdf8 0%, #f8efdf 100%);
  border: 1px solid #e2cfaa;
  box-shadow: inset 0 0 0 7px #fffaf0, inset 0 0 0 8px rgba(168, 135, 90, 0.4), 0 26px 60px rgba(80, 55, 25, 0.14);
}
.card-back { transform: rotateY(180deg); }
.flip-btn {
  display: block;
  margin: 16px auto 0;
  font: inherit;
  font-size: 13px;
  color: var(--gold);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(168, 135, 90, 0.5);
  padding: 2px 0;
  cursor: pointer;
}
.flip-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.card-face::before {   /* a hairline of gold along the top */
  content: "";
  position: absolute;
  left: 30px; right: 30px; top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(168, 135, 90, 0), var(--gold), rgba(168, 135, 90, 0));
}
.pc-top { display: flex; gap: 18px; align-items: center; margin-bottom: 6px; }
.pc-avatar {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #3d291b, #24170f);
  color: #fbf3e4;
  font-family: var(--serif);
  font-size: 34px;
  box-shadow: 0 0 0 3px #fffdf8, 0 0 0 4px rgba(168, 135, 90, 0.55);
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-id { min-width: 0; }
.pc-name { margin: 0; font-family: var(--serif); font-size: 32px; line-height: 1.05; overflow-wrap: anywhere; }
.pc-title { margin: 6px 0 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pc-org { margin: 4px 0 0; font-size: 13px; color: var(--gold); font-weight: 600; }
.pc-placeholder { color: #b9ad9c; font-weight: 400; }
.pc-years { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.pc-label { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; margin: 0 0 6px; }
.pc-quote { margin: 14px 0 16px; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.35; color: #3d3934; }
.pc-strengths { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.pc-strengths li { padding: 6px 13px; font-size: 12.5px; color: #4a3b27; background: rgba(168, 135, 90, 0.1); border: 1px solid rgba(168, 135, 90, 0.45); border-radius: 999px; }
.pc-strengths li.pc-slot { min-width: 76px; height: 30px; padding: 0; background: none; border: 1px dashed #d9ccb6; }
.pc-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; list-style: none; padding: 0; margin: 0 0 18px; font-family: var(--serif); font-size: 19px; color: #3d3934; }
.pc-route li + li::before { content: "→"; margin-right: 8px; color: var(--gold); font-family: inherit; }
.pc-route-empty { margin: 0 0 18px; font-family: var(--serif); font-style: italic; font-size: 17px; }
.pc-moments { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.pc-moments-empty { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.pc-new { animation: fadeUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.pc-caption { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--muted); }
.pc-lock {
  position: relative;
  width: 10px; height: 8px;
  border-radius: 2px;
  background: var(--gold);
  margin-top: 4px;
}
.pc-lock::before {
  content: "";
  position: absolute;
  left: 2px; top: -5px;
  width: 6px; height: 6px;
  border: 1.5px solid var(--gold);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.profile-card.is-small { max-width: 400px; margin: 24px auto; }
.profile-card.is-small .card-face { padding: 28px 24px 20px; }
.profile-card.is-small .pc-avatar { width: 68px; height: 68px; font-size: 28px; }
.profile-card.is-small .pc-name { font-size: 27px; }
.ob-card-small { position: static; }

/* ---------- Workplace ---------- */
.ob-invite-row { display: flex; gap: 10px; }
.ob-invite-row .input { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; max-width: 280px; }
.ob-match {
  margin: 18px 0 6px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--gold);
  animation: fadeUp 0.35s ease both;
}
.ob-match p { margin: 0 0 12px; font-family: var(--serif); font-size: 22px; }
.ob-match.is-joined { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ob-match.is-joined p { margin: 0; }

/* ---------- First moment: three outcomes ---------- */
.ob-outcomes { display: grid; gap: 12px; margin-bottom: 18px; }
.ob-outcome {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ob-outcome.is-on { opacity: 1; border-color: var(--gold); box-shadow: 0 10px 30px rgba(80, 55, 25, 0.07); }
.ob-outcome:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.ob-outcome-body { flex: 1; min-width: 0; }
.ob-outcome-where { display: block; margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
.ob-outcome .alert, .ob-outcome .headsup { margin-bottom: 0; }
.ob-outcome .pc-quote { margin: 0; }
.ob-switch {
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s ease;
}
.ob-switch::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}
.ob-outcome.is-on .ob-switch { background: var(--ink); }
.ob-outcome.is-on .ob-switch::after { transform: translateX(18px); }

/* ---------- Close ---------- */
.ob-close { text-align: center; padding-top: 24px; }
.ob-close .welcome-lead { margin-bottom: 8px; }

/* ---------- Profile chip in the top bar ---------- */
.profile-chip { gap: 8px; padding-left: 5px; }
.chip-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 11px;
}
.chip-avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .ob-profile { grid-template-columns: 1fr; gap: 28px; }
  .ob-profile .ob-card-wrap { position: static; }   /* the card stays on top, the question below it */
  .ob-profile .profile-card { max-width: 440px; margin: 0 auto; }
  .ob-profile .card-face { padding: 28px 22px 20px; }
  .ob-profile .pc-avatar { width: 68px; height: 68px; font-size: 28px; }
  .ob-profile .pc-name { font-size: 27px; }
  .ob-profile .pc-quote { font-size: 19px; }
}
@media (max-width: 520px) {
  .ob-row { grid-template-columns: 1fr; }
  .ob-invite-row { flex-direction: column; }
}

/* Respect people who prefer less animation */
@media (prefers-reduced-motion: reduce) {
  .opening-copy, .film, .film-video, .ob-describe, .ob-custom, .ob-match { animation: none; }
  .welcome, .welcome.open { transition: none; }
  .welcome-step, .business-card, .role-card, .pc-new { animation: none; }
  .panel, .overlay, .panel.open, .overlay.open,
  .capture, .capture.open { transition: none; }
  .capture-step, .becomes-list li, .just-added, .mic-btn.listening .mic-icon { animation: none; }
}

/* Small screens (phones): a little tighter */
@media (max-width: 520px) {
  .brief { padding: 24px 18px 110px; }
  .phase h2 { flex-direction: column; gap: 4px; }
  .item-head { flex-direction: column; gap: 0; }
  .panel { padding: 20px 20px 40px; }
}

/* ---------- The back of the card: contacts, each with its own switch ---------- */
.card-face[inert] { pointer-events: none; }
.cb-eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.cb-title { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.cb-rows { display: grid; gap: 12px; margin-bottom: 16px; }
.cb-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.55); }
.cb-row.is-on { border-color: var(--gold); background: #fffdf8; }
.cb-text { min-width: 0; display: grid; gap: 4px; }
.cb-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cb-value { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.cb-empty { font-family: var(--serif); font-style: italic; color: #b9ad9c; }
.cb-hidden { display: inline-flex; align-items: center; gap: 10px; }
.cb-blur { filter: blur(5px); user-select: none; -webkit-user-select: none; pointer-events: none; color: #5a4d3a; font-size: 16px; white-space: nowrap; }
.cb-lock { position: relative; flex: none; width: 10px; height: 8px; margin-top: 4px; border-radius: 2px; background: var(--gold); }
.cb-lock::before { content: ""; position: absolute; left: 2px; top: -5px; width: 6px; height: 6px; border: 1.5px solid var(--gold); border-bottom: 0; border-radius: 4px 4px 0 0; }
.cs-switch { flex: none; position: relative; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background 0.2s ease; }
.cs-switch span { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s ease; }
.cs-switch[aria-checked="true"] { background: var(--ink); }
.cs-switch[aria-checked="true"] span { transform: translateX(18px); }
.cs-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.cb-note { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.cb-mark { margin: 6px 0 0; text-align: center; font-family: var(--serif); font-size: 12px; letter-spacing: 0.35em; color: var(--gold); }

/* ---------- Moments on the front of the card ---------- */
.pc-moment-list { display: grid; gap: 8px; margin-bottom: 8px; }
.pc-moment-note { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.moment-tile { position: relative; display: block; width: 100%; height: 76px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; cursor: pointer; text-align: left; }
.moment-tile-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31, 22, 12, 0.66), rgba(31, 22, 12, 0.12)); }
.moment-tile-text { position: relative; display: flex; align-items: center; height: 100%; padding: 0 16px; color: #fff8ea; font-family: var(--serif); font-style: italic; font-size: 18px; }
.moment-tile:hover { filter: brightness(1.07); }
.moment-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Moment story: three beats over a slowly drifting picture ---------- */
.story { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr auto; padding: 24px; overflow: hidden; background: #241a10; color: #fff8ea; animation: storyFade 0.45s ease both; }
@keyframes storyFade { from { opacity: 0; } to { opacity: 1; } }
.story-bg { position: absolute; inset: -5%; background-size: cover; background-position: center; animation: storyDrift 26s ease-in-out infinite alternate; }
@keyframes storyDrift {
  from { transform: scale(1.06) translate(0, 0); }
  to   { transform: scale(1.17) translate(-2.5%, -1.5%); }
}
.story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 13, 6, 0.55), rgba(20, 13, 6, 0.72)); }
.story-close { position: relative; justify-self: end; font: inherit; font-size: 14px; padding: 8px 16px; color: #fff8ea; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; cursor: pointer; }
.story-close:hover { background: rgba(255, 255, 255, 0.24); }
.story-close:focus-visible, .story-next:focus-visible { outline: 2px solid #f3dfae; outline-offset: 3px; }
.story-beats { position: relative; align-self: center; width: 100%; max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.beat { opacity: 0; }
.beat.is-revealed { opacity: 1; animation: beatIn 0.9s ease both; }
@keyframes beatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.beat-label { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #ecd7a6; }
.beat-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #ecd7a6; border-radius: 50%; font-size: 12px; letter-spacing: 0; }
.beat-text { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; }
.story-controls { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1040px; margin: 0 auto; }
.story-hint { margin: 0; font-family: var(--serif); font-style: italic; font-size: 18px; color: #ecd7a6; }
.story-next { min-width: 120px; }
@media (max-width: 760px) {
  .story-beats { grid-template-columns: 1fr; }
  .beat { display: none; }
  .beat.is-current { display: block; }   /* a phone shows one beat at a time: tap, or swipe */
}

/* ---------- Adding a moment to the card ---------- */
.moment-line { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.moment-offer { max-width: 560px; margin: 26px auto 6px; padding: 24px 24px 20px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.mo-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.mo-lead { margin: 0 0 16px; font-size: 15px; color: var(--muted); max-width: none; }
.mo-note { margin: 0 0 18px; padding: 12px 14px; border-left: 2px solid var(--gold); background: #fbf5ea; font-family: var(--serif); font-style: italic; font-size: 16px; color: #3d3934; }
.mo-note .pc-label { display: block; margin-bottom: 4px; font-family: var(--sans, inherit); font-style: normal; }
.beat-input { min-height: 0; margin-bottom: 14px; font-size: 15px; }
.mo-moods { margin-top: 4px; }
.mo-preview { height: 110px; margin-top: 12px; border-radius: 12px; background-size: cover; background-position: center; }
.mo-actions { justify-content: flex-end; }
.moment-status { margin: 18px 0 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--gold); }

/* ---------- The sealing moment ---------- */
.pc-seal { position: absolute; right: 22px; bottom: 16px; width: 62px; height: 62px; transform: rotate(-8deg); filter: drop-shadow(0 3px 6px rgba(80, 55, 25, 0.3)); }
.card-front:has(.pc-seal) .pc-caption { max-width: calc(100% - 76px); }
.is-sealing .pc-seal { animation: sealPress 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) 1.5s both; }
@keyframes sealPress {
  from { opacity: 0; transform: scale(1.8) rotate(-8deg); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.is-sealing .card-front::after {   /* a soft gold light, sweeping once across the card */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 233, 180, 0.8) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: goldSweep 1.4s ease-out 0.3s both;
}
@keyframes goldSweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.seal-line.is-sealing { animation: fadeUp 0.7s ease 2.2s both; }

@media (prefers-reduced-motion: reduce) {
  /* The card turns by a quick crossfade, the story stands still, and the seal is simply there. */
  .card-flipper { transition: none; transform: none !important; }
  .card-face { backface-visibility: visible; -webkit-backface-visibility: visible; transition: opacity 0.25s ease; }
  .card-back { transform: none; opacity: 0; }
  .card-flipper.is-flipped .card-front { opacity: 0; }
  .card-flipper.is-flipped .card-back { opacity: 1; }
  .is-sealing .card-front::after { display: none; }
  .is-sealing .pc-seal, .seal-line.is-sealing, .story, .story-bg, .beat.is-revealed { animation: none; }
  .cs-switch, .cs-switch span { transition: none; }
}

/* ---------- Share your card ---------- */
.share-panel { max-width: 560px; margin: 22px auto 6px; padding: 24px 24px 18px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.share-back { margin: 4px 0 16px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-status { min-height: 1.5em; margin: 14px 0 4px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--gold); }
.sig-step .share-panel { margin: 28px 0 0; max-width: none; }
