/* GX1 digital business card + consented lead form. Mobile first.
   Colours, type, radii and motion follow GX1 Brand Kit 3.0:
   blue on near-black and light grey; three status signals, no amber, yellow or pink;
   no glows or shadows on the logo; shadows are ink, never coloured. */

@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("fonts/geist-400.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("fonts/geist-500.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("fonts/geist-600.woff2") format("woff2"); }

:root {
  /* Brand Kit 3.0 core palette */
  --gx1-obsidian: #050608;
  --gx1-ink: #0B0D12;
  --gx1-signal: #2F6BFF;
  --gx1-deep: #1D47D1;
  --gx1-navy: #0A2A8C;
  --gx1-mid: #4D82FF;
  --gx1-pulse: #5CE1FF;
  --gx1-ice: #CFE0FF;
  --gx1-mist: #EEF3FF;
  --gx1-porcelain: #F4F5F7;
  --gx1-hair: #E3E5EA;
  --gx1-gray: #6B7080;
  /* Status: Allowed (success green), Needs A Person (Signal), Blocked (critical red), Pending (gray) */
  --gx1-success: #1A7F45;
  --gx1-success-tint: #E7F5EC;
  --gx1-critical: #B42318;
  --gx1-critical-tint: #FDECEC;
  --gx1-ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Light stage */
  --bg: var(--gx1-porcelain);
  --surface: #ffffff;
  --surface-2: var(--gx1-porcelain);
  --ink: var(--gx1-ink);
  --muted: var(--gx1-gray);
  --line: var(--gx1-hair);
  --action: var(--gx1-signal);
  --action-pressed: var(--gx1-deep);
  --link: var(--gx1-deep);          /* small link text on white */
  --tint: var(--gx1-mist);          /* tinted cards, quiet buttons, "needs a person" chips */
  --tint-ink: var(--gx1-deep);
  --cube-top: #7DA5FF;
  --cube-left: var(--gx1-signal);
  --cube-right: var(--gx1-navy);
  --halo: rgba(207, 224, 255, .55); /* Ice field behind the hero, not on the logo */
  --shadow: 0 1px 2px rgba(11, 13, 18, .04), 0 8px 24px rgba(11, 13, 18, .06);
  --focus: 0 0 0 3px rgba(47, 107, 255, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--gx1-obsidian); --surface: var(--gx1-ink); --surface-2: #151821; --ink: #F4F5F7; --muted: #9AA0AB;
    --line: #1F232D; --action: var(--gx1-signal); --link: var(--gx1-mid); --tint: #121a2e; --tint-ink: var(--gx1-ice);
    --cube-top: var(--gx1-ice); --cube-left: var(--gx1-mid); --cube-right: var(--gx1-deep);
    --halo: rgba(29, 71, 209, .22); --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --gx1-success: #5BD08A; --gx1-success-tint: #10251a; --gx1-critical: #FF7A6E; --gx1-critical-tint: #2a1210;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--gx1-obsidian); --surface: var(--gx1-ink); --surface-2: #151821; --ink: #F4F5F7; --muted: #9AA0AB;
  --line: #1F232D; --action: var(--gx1-signal); --link: var(--gx1-mid); --tint: #121a2e; --tint-ink: var(--gx1-ice);
  --cube-top: var(--gx1-ice); --cube-left: var(--gx1-mid); --cube-right: var(--gx1-deep);
  --halo: rgba(29, 71, 209, .22); --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --gx1-success: #5BD08A; --gx1-success-tint: #10251a; --gx1-critical: #FF7A6E; --gx1-critical-tint: #2a1210;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 12px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* The cube: flat brand faces, no glow, no shadow. */
.cube .f-top, .intro-cube .f-top { fill: var(--cube-top); stroke: var(--cube-top); }
.cube .f-left, .intro-cube .f-left { fill: var(--cube-left); stroke: var(--cube-left); }
.cube .f-right, .intro-cube .f-right { fill: var(--cube-right); stroke: var(--cube-right); }

.page {
  max-width: 440px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; min-height: 100dvh;
}

.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
/* Pending signal: gray, a word in a tinted chip. */
.draft { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; }
.icon-btn {
  margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* Card */
.card { text-align: center; }
.hero {
  display: grid; place-items: center; height: 200px; margin: 4px -24px 0;
  background: radial-gradient(closest-side, var(--halo), transparent);
}
.cube { width: 96px; height: 96px; }
/* Orin orb on the light stage; the cube on dark (the orb is never staged on dark). */
.orb { width: 240px; height: 240px; display: block; }
.hero:has(.orb) { height: 260px; background: none; }
.hero:has(.orb) .cube { display: none; }
:root[data-theme="dark"] .hero .orb { display: none; }
:root[data-theme="dark"] .hero:has(.orb) .cube { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero .orb { display: none; }
  :root:not([data-theme="light"]) .hero:has(.orb) .cube { display: block; }
}
:root[data-theme="dark"] .hero:has(.orb) { background: radial-gradient(closest-side, var(--halo), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero:has(.orb) { background: radial-gradient(closest-side, var(--halo), transparent); } }
/* Below 48 px Orin is the plain blue disc. */
.orin-disc { display: block; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #CFE0FF 0, #5CE1FF 22%, #2F6BFF 62%, #1D47D1 100%); box-shadow: 0 0 0 4px rgba(207, 224, 255, .55); }
.where { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.where svg { width: 16px; height: 16px; }

h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; margin: 8px 0 10px; }
.role { margin: 0; color: var(--muted); font-size: 15px; }
.role b { color: var(--ink); font-weight: 600; }
.tagline { margin: 18px 0 28px; font-size: 16px; }
.muted { color: var(--muted); }

.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 0 20px; border: 0; border-radius: 12px;
  background: var(--action); color: #fff; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: background-color 280ms var(--gx1-ease-out), transform 280ms var(--gx1-ease-out);
}
.primary svg { width: 18px; height: 18px; }
.primary:active { background: var(--action-pressed); transform: scale(.99); }
.primary[disabled] { opacity: .6; cursor: progress; }

.actions { display: flex; justify-content: center; gap: 4px; margin: 28px -8px 0; flex-wrap: wrap; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 68px; flex: 0 1 72px;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.dot { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--tint-ink); }
.dot svg { width: 20px; height: 20px; }
.in { font-family: inherit; font-weight: 600; font-size: 15px; letter-spacing: .02em; }

.link-btn { margin: 26px auto 0; display: block; background: none; border: 0; color: var(--muted); font-weight: 500; font-size: 15px; padding: 10px 16px; cursor: pointer; }

/* Leads: inset grouped lists, the way iOS Settings and Contacts do it. */
.leads { margin-top: 32px; }
.group {
  background: var(--surface); border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.group-label { font-size: 13px; font-weight: 500; color: var(--muted); padding: 0 16px 8px; }

/* Entry point: one tappable row, not a card full of prose. */
.cta-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left;
  background: var(--surface); border: 0; border-radius: 20px; box-shadow: var(--shadow), 0 0 0 1px var(--line); cursor: pointer;
  transition: transform 280ms var(--gx1-ease-out);
}
.cta-row:active { transform: scale(.985); }
.cta-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--action); color: #fff; }
.cta-icon svg { width: 22px; height: 22px; stroke-width: 1.9; }
.cta-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cta-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cta-sub { font-size: 14px; color: var(--muted); }
.chev { flex: none; width: 18px; height: 18px; color: var(--muted); stroke-width: 2.2; }

/* Quiet button: Mist tint with Deep text. */
.secondary {
  width: 100%; min-height: 48px; border-radius: 12px; border: 0;
  background: var(--tint); color: var(--tint-ink); font-weight: 600; cursor: pointer;
}

.lead-form { display: grid; gap: 24px; }
.form-head { padding: 0 4px; }
.form-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.form-head p { margin: 0; color: var(--muted); font-size: 15px; }

/* Field rows: label left, input right, hairlines inset like iOS. */
.row { display: flex; align-items: center; min-height: 52px; padding-left: 16px; cursor: text; }
.row + .row > input, .row + .row > span { border-top: 1px solid var(--line); }
.row > span { flex: none; width: 92px; align-self: stretch; display: flex; align-items: center; font-size: 15px; font-weight: 500; }
.row > input {
  flex: 1; min-width: 0; align-self: stretch; padding: 0 16px 0 0; border: 0; background: none; font-size: 16px; outline: none;
}
.row > input::placeholder { color: var(--muted); opacity: .7; }
.row > input:focus-visible { box-shadow: none; border-radius: 0; }
.row:focus-within > span { color: var(--action); }
.row:has(input[aria-invalid="true"]) > span { color: var(--gx1-critical); }

/* Interest: a single-choice list with a checkmark. */
.picks { border: 0; margin: 0; padding: 0; min-width: 0; }
.pick { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 16px; font-size: 16px; cursor: pointer; }
.pick + .pick::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
.pick::after {
  content: ""; width: 20px; height: 20px; opacity: 0; transform: scale(.6);
  transition: opacity 280ms var(--gx1-ease-out), transform 280ms var(--gx1-ease-out);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%232F6BFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pick:has(input:checked) { color: var(--action); font-weight: 500; }
.pick:has(input:checked)::after { opacity: 1; transform: none; }
.pick:has(input:focus-visible) { box-shadow: inset var(--focus); }
.picks[aria-invalid="true"] .group { box-shadow: 0 0 0 1.5px var(--gx1-critical); }

/* Consent: short sentence, iOS-style switch. */
.check { display: flex; align-items: center; gap: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  flex: none; position: relative; width: 51px; height: 31px; border-radius: 99px; background: var(--line);
  transition: background-color 280ms var(--gx1-ease-out);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(11, 13, 18, .18); transition: transform 280ms var(--gx1-ease-out);
}
.check input:checked + .switch { background: var(--action); }
.check input:checked + .switch::after { transform: translateX(20px); }
.check input:focus-visible + .switch { box-shadow: var(--focus); }
.check input[aria-invalid="true"] + .switch { box-shadow: 0 0 0 1.5px var(--gx1-critical); }
.consent-meta { margin: -14px 0 0; padding: 0 16px; font-size: 13px; color: var(--muted); }
.consent-meta a { color: var(--link); font-weight: 500; text-decoration: none; }

.turnstile:empty { display: none; }
.form-error { margin: -8px 0 0; padding: 0 16px; color: var(--gx1-critical); font-size: 14px; font-weight: 500; }

/* Done: Allowed (green) when sent; Needs A Person (Signal on Mist) while it waits to sync. */
.done { text-align: center; padding: 28px 20px 20px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.done h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.done p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.done-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 10px; background: var(--gx1-success-tint); color: var(--gx1-success); }
.done-mark svg { width: 24px; height: 24px; stroke-width: 2.4; }
.done.is-queued .done-mark { color: var(--tint-ink); background: var(--tint); }

/* Queue: waiting to sync is "waiting on information", so Signal on Mist. */
.queue { margin-top: 16px; }
.queue-chip {
  display: flex; align-items: center; gap: 10px; margin: 0 auto; padding: 8px 14px; border-radius: 99px;
  background: var(--tint); color: var(--tint-ink); border: 0; font-size: 13px; font-weight: 500; cursor: pointer;
}
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 1s linear infinite; }
.queue-list { list-style: none; margin: 12px 0 0; padding: 0; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.queue-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 13px; border-top: 1px solid var(--line); }
.queue-list li:first-child { border-top: 0; }
.queue-list .when { color: var(--muted); white-space: nowrap; }
.queue-list .attention { color: var(--gx1-critical); }

.foot { margin-top: auto; padding-top: 32px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

/* Intro: Governance OS, Assess and Orin come together into the cube. */
.intro {
  position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; place-items: center; cursor: pointer;
  animation: intro-out .45s var(--gx1-ease-out) 2.35s forwards;
}
.intro-stage { position: relative; width: 300px; height: 300px; }
.intro-stage > * { position: absolute; left: 50%; top: 50%; }
.intro-gos, .intro-pulse { width: 62px; height: 62px; border-radius: 22.5%; box-shadow: 0 1px 2px rgba(11, 13, 18, .06), 0 10px 24px rgba(11, 13, 18, .12); }
.intro-pulse { display: grid; place-items: center; background: linear-gradient(135deg, #16A294, #0E726B); }
.intro-pulse svg { width: 44px; height: 44px; stroke: none; }
.intro-orin { width: 46px; height: 46px; }
/* Orin's stage is white, Porcelain or Mist only: leave it out on dark. */
:root[data-theme="dark"] .intro-orin { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .intro-orin { display: none; } }
.intro-gos { animation: gos 1.5s cubic-bezier(.6, 0, .3, 1) both; }
.intro-pulse { animation: pulse 1.5s cubic-bezier(.6, 0, .3, 1) both; }
.intro-orin { animation: orin 1.5s cubic-bezier(.6, 0, .3, 1) both; }
.intro-cube { width: 96px; height: 96px; transform: translate(-50%, -50%); opacity: 0; animation: cube .7s var(--gx1-ease-out) 1.25s forwards; }
.intro-skip { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
@keyframes gos { 0% { transform: translate(-150px, -120px); } 100% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes pulse { 0% { transform: translate(90px, -120px); } 100% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes orin { 0% { transform: translate(-60px, 40px); } 100% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes cube { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .spinner { animation: none; }
  .primary { transition: none; }
}

/* Orin: the owner's card editor (/orin). Same tokens and grouped lists as the form. */
.orin-head { display: flex; align-items: center; gap: 12px; padding: 12px 0 4px; }
.orin-head h1 { font-size: 28px; margin: 0; }
.orin-head .eyebrow { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.head-disc { width: 36px; height: 36px; margin: 0 4px; flex: none; }
.text-link { margin-left: auto; color: var(--link); font-weight: 500; text-decoration: none; padding: 8px 4px; }
.orin-say { margin: 8px 0 20px; padding: 14px 16px; border-radius: 20px; background: var(--tint); color: var(--ink); font-size: 15px; }
.preview { padding: 8px 16px 22px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); margin-bottom: 28px; }
.preview .hero { height: 190px; margin: 0; }
.preview .orb { width: 180px; height: 180px; }
.preview .cube { width: 72px; height: 72px; }
.preview h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 6px; }
.edit-form { padding-bottom: 12px; }
.edit-form .row > span { width: 96px; }
.photo-row { display: flex; }
.row-btn { flex: 1; min-height: 50px; border: 0; background: none; color: var(--action); font-weight: 600; font-size: 16px; cursor: pointer; }
.row-btn + .row-btn { border-left: 1px solid var(--line); }
.row-btn.quiet { color: var(--gx1-critical); font-weight: 500; flex: 0 0 120px; }
.center { text-align: center; margin-top: -8px; }
.group-note { margin: 8px 0 0; padding: 0 16px; font-size: 13px; color: var(--muted); }

/* ---------- Looks ---------- */
/* Classic (Sunny's card, ?look=classic): the cube with its Ice field, no orb. */
:root[data-look="classic"] .hero .orb { display: none; }
:root[data-look="classic"] .hero:has(.orb) { background: radial-gradient(closest-side, var(--halo), transparent); }
:root[data-look="classic"] .hero:has(.orb) .cube { display: block; }
/* Animated: after Save Contact the orb has folded into the cube. */
.hero.saved .orb { display: none; }
.hero.saved .cube { display: block !important; }

/* Opening: hold the card back until reveal.js plays it in. If the script never runs,
   the card shows anyway after a moment. */
:root.revealing .card > *, :root.revealing .leads, :root.revealing .foot, :root.revealing .top { opacity: 0; animation: reveal-failsafe .4s 3s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; } }
.reveal-stage { position: fixed; inset: 0; z-index: 10; cursor: pointer; }
.reveal-tile {
  position: absolute; left: 0; top: 0; width: 60px; height: 60px; border-radius: 22.5%;
  display: grid; place-items: center; opacity: 0;
  box-shadow: 0 1px 2px rgba(11, 13, 18, .06), 0 10px 24px rgba(11, 13, 18, .12);
}
.reveal-tile img, .reveal-tile svg { width: 100%; height: 100%; display: block; }
.t-gos { overflow: hidden; }
.t-sd4 { background: linear-gradient(135deg, #2F3BB8, #161B5E); }
.t-sd4 svg, .t-assess svg { width: 40px; height: 40px; }
.t-assess { background: linear-gradient(135deg, #16A294, #0E726B); }
.t-orin { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(207, 224, 255, .55);
  background: radial-gradient(circle at 38% 34%, #CFE0FF 0, #5CE1FF 22%, #2F6BFF 62%, #1D47D1 100%); }
.reveal-skip { position: absolute; left: 0; right: 0; bottom: max(28px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { :root.revealing .card > *, :root.revealing .leads, :root.revealing .foot, :root.revealing .top { opacity: 1; animation: none; } }

/* ---------- Header: Edit Card (preview) sits beside the theme switch ---------- */
.icon-btn:not([hidden]) + .icon-btn { margin-left: 8px; }
.edit-btn { color: var(--ink); }
.edit-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Leads entry: one inset grouped list (Leave details, Scan card, WhatsApp) ---------- */
.cta-list { background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.cta-list .cta-row { position: relative; border-radius: 0; box-shadow: none; text-decoration: none; color: inherit; }
.cta-list .cta-row:active { transform: none; background: var(--surface-2); }
.cta-list .cta-row[hidden] { display: none; }
.cta-list .cta-row:not(:first-child)::before { content: ""; position: absolute; top: 0; left: 74px; right: 0; border-top: 1px solid var(--line); }
.cta-list .cta-row:not(:first-child) .cta-title { font-size: 16px; font-weight: 500; }
.cta-icon.tint { width: 44px; height: 44px; margin: 0 4px; background: var(--tint); color: var(--tint-ink); }
.cta-icon svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* Leave Your Details: Signal tile with a contact-card glyph on light;
   on dark, Orin on its own Mist tile (the kit stages Orin on light grounds only). */
.lead-icon {
  position: relative; width: 52px; height: 52px; border-radius: 15px; overflow: hidden;
  background: linear-gradient(150deg, var(--gx1-mid) 0%, var(--gx1-signal) 45%, var(--gx1-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(10, 42, 140, .35);
}
.lead-icon .lead-glyph { width: 26px; height: 26px; stroke-width: 1.7; color: #fff; }
.lead-orb { display: none; position: absolute; inset: -22%; width: 144%; height: 144%; } /* the organism draws inside its square: scale it up to fill the tile */
:root[data-theme="dark"][data-look="orb"] .lead-icon { background: var(--gx1-mist); box-shadow: none; }
:root[data-theme="dark"][data-look="orb"] .lead-icon .lead-glyph { display: none; }
:root[data-theme="dark"][data-look="orb"] .lead-orb { display: block; }

/* ---------- Form: Scan Card, and the scan result note ---------- */
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-head h2 { margin: 0; }
.scan-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px;
  background: var(--tint); color: var(--tint-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.scan-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.scan-btn[disabled] { opacity: .6; cursor: progress; }
.scan-note { margin: -12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--tint); color: var(--tint-ink); font-size: 14px; line-height: 1.4; }

/* Consent: one short sentence, a size down. */
.check.small { font-size: 13px; line-height: 1.4; }
.consent-meta { font-size: 12.5px; }

/* ---------- QR screen (owner, installed app). The stand's Scan to Enter language, upright:
   Orin behind a white card, a Pulse-to-Signal ring, a quiet pill. Always a light stage
   (scanning contrast, and Orin is staged on light only). ---------- */
.qr-screen { display: none; }
:root[data-mode="qr"] .page { display: none; }
:root[data-mode="qr"] body { background: radial-gradient(900px 700px at 60% 58%, #fff 0%, #F7F8FA 55%, #F5F5F7 100%); }
:root[data-mode="qr"] .qr-screen {
  --ink: var(--gx1-ink); --muted: var(--gx1-gray); --line: var(--gx1-hair); --surface: #fff; --tint: var(--gx1-mist); --tint-ink: var(--gx1-deep);
  display: flex; flex-direction: column; min-height: 100dvh; max-width: 520px; margin: 0 auto; overflow: hidden; color: var(--ink);
  padding: max(16px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom));
}
.qr-top { display: flex; align-items: center; gap: 10px; min-height: 44px; position: relative; z-index: 2; }
.qr-brand-mark { width: 28px; height: 28px; flex: none; }
.qr-brand b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.012em; line-height: 1.15; }
.qr-brand small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.qr-top .draft { margin-left: auto; }
.qr-top .icon-btn { background: #fff; border-color: var(--line); color: var(--ink); }
.qr-top .draft + .icon-btn, .qr-top .icon-btn { margin-left: auto; }
.qr-top .draft:not([hidden]) + .icon-btn { margin-left: 8px; }

.qr-copy { position: relative; z-index: 2; margin-top: clamp(16px, 4vh, 36px); }
.qr-copy h1 { font-size: clamp(36px, 10.5vw, 48px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; margin: 0 0 8px; }
.qr-sub { margin: 0; font-size: 18px; color: var(--muted); letter-spacing: -.01em; }

.qr-stage { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(18px, 3.5vh, 32px) 0 12px; }
.qr-organism {
  position: absolute; left: 50%; top: 46%; width: 150vw; max-width: 760px; aspect-ratio: 1;
  transform: translate(-46%, -52%); opacity: 1; pointer-events: none; z-index: 0;
}
.qr-organism canvas { display: block; width: 100%; height: 100%; }
.qr-card {
  position: relative; z-index: 1; width: min(76vw, 340px, 42vh); aspect-ratio: 1; display: grid; place-items: center;
  background: #fff; border-radius: 36px;
  box-shadow: 0 2px 6px rgba(11, 13, 18, .04), 0 24px 60px rgba(11, 13, 18, .10), 0 0 0 1px rgba(11, 13, 18, .03);
}
.qr-ring { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); overflow: visible; }
.qr-ring rect { fill: none; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.qr-ring .track { stroke: #ECEDF1; }
.qr-ring .prog { stroke: url(#qrRing); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
:root[data-mode="qr"] .qr-ring .prog { animation: qr-ring-in 1100ms var(--gx1-ease-out) both; }
@keyframes qr-ring-in { from { stroke-dashoffset: 100; } }
.qr-code { width: 70%; aspect-ratio: 1; }
.qr-code svg { display: block; width: 100%; height: 100%; stroke: none; }

.qr-pill {
  position: relative; z-index: 1; margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 99px; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px var(--line); color: #2A2F3A; font-size: 13px; font-weight: 600;
}
.qr-pill .live { width: 8px; height: 8px; border-radius: 50%; background: var(--gx1-signal); box-shadow: 0 0 0 0 rgba(47, 107, 255, .45); animation: qr-live 2s var(--gx1-ease-out) infinite; }
@keyframes qr-live { 0% { box-shadow: 0 0 0 0 rgba(47, 107, 255, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(47, 107, 255, 0); } }

.qr-actions { position: relative; z-index: 2; display: grid; gap: 2px; }
.qr-actions .link-btn { margin-top: 4px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  :root[data-mode="qr"] .qr-ring .prog, .qr-pill .live { animation: none; }
}
.qr-btn svg { width: 17px; height: 17px; }
.qr-code svg { stroke: none; }

/* Owner's way back to the QR: a floating pill in thumb reach, on the card only. */
.qr-return {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(11, 13, 18, .88); color: #fff; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 8px 24px rgba(11, 13, 18, .18); transition: transform 280ms var(--gx1-ease-out);
}
.qr-return svg { width: 18px; height: 18px; stroke-width: 1.8; }
.qr-return:active { transform: translateX(-50%) scale(.97); }
:root[data-theme="dark"] .qr-return { background: rgba(244, 245, 247, .92); color: var(--gx1-ink); }
:root[data-mode="qr"] .qr-return, :root.revealing .qr-return { display: none; }
:root[data-owner="1"] .page { padding-bottom: 96px; }
.orin-head .text-link { font-weight: 600; }
