/* Brand web fonts (Phase 23) — SIL OFL 1.1, self-hosted same-origin. */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/web/hanken-grotesk-400.bce77b95211a.woff2") format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/web/hanken-grotesk-500.7a09ac4f738f.woff2") format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/web/hanken-grotesk-600.e4510bb7bc40.woff2") format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/web/hanken-grotesk-700.20d2b7694df6.woff2") format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/web/hanken-grotesk-800.bc73ca1c0dd1.woff2") format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/web/ibm-plex-mono-400.bd688a5bf479.woff2") format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/web/ibm-plex-mono-500.b7eb8f8e6dda.woff2") format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/web/ibm-plex-mono-600.4b11fd058aeb.woff2") format('woff2');
}

/* QR7 brand layer over Bootstrap 5.3 — Phase 1 (auth surface).
   Ported from Qr7_design/app/qr7.css + theme.js (VISUAL reference only).
   Tokens locked by 01-UI-SPEC: crisp theme, coral accent (#F1582C),
   comfortable density, 3px radius (pills stay pills), Hanken Grotesk.

   The React prototype applied tokens via a JS theme wrapper; here we bake the
   `crisp` + `coral` + `comfortable` defaults onto a static `.qr7-theme` wrapper
   (and :root) so server-rendered templates need no JS runtime. */

:root,
.qr7-theme {
  /* ── crisp theme (theme.js THEMES.crisp.vars) ── */
  --bg: #FCFBFA;
  --surface: #FFFFFF;
  --surface-2: #F4F1EE;
  --border: rgba(40, 30, 20, 0.12);
  --border-strong: rgba(40, 30, 20, 0.20);
  --text: #211D18;
  --text-muted: #6B6259;
  --text-faint: #9C938A;
  --shadow-sm: 0 1px 2px rgba(30, 20, 10, 0.05);
  --shadow-md: 0 4px 18px rgba(30, 20, 10, 0.07);
  --shadow-lg: 0 18px 50px rgba(30, 20, 10, 0.12);
  --font: 'Hanken Grotesk', system-ui, sans-serif;
  --font-display: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pos: #1F8A5B;
  --display-weight: 700;
  --display-tracking: -0.02em;

  /* ── coral accent (theme.js ACCENTS.coral) ── */
  --accent: #F1582C;
  --accent-rgb: 241, 88, 44;
  --accent-soft: #FCE9E1;
  --accent-ink: #FFFFFF;
  --accent-deep: #C0421E;

  /* ── destructive (UI-SPEC default — not yet in theme.js) ── */
  --danger: #C0392B;

  /* ── Phase-4 analytics chart gridlines (04-UI-SPEC Visual Notes) ── */
  --chart-grid: rgba(40, 30, 20, 0.07);

  /* ── comfortable density (theme.js DENSITY.comfortable) ── */
  --pad: 24px;
  --pad-sm: 16px;
  --gap: 20px;
  --row-h: 64px;
  --ui: 14px;

  /* ── BlueprintJS-compact radius, locked across directions ── */
  --radius: 3px;
  --radius-sm: 3px;
  --radius-lg: 3px;

  /* ── Bootstrap variable overrides (cascade to all descendants) ── */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: var(--font);
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-color: var(--text-faint);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-border-color: var(--border);
  --bs-primary: var(--accent);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-link-color: var(--accent-deep);
  --bs-link-color-rgb: var(--accent-rgb);
  --bs-link-hover-color: var(--accent-deep);
  --bs-card-bg: var(--surface);
  --bs-card-border-color: var(--border);
  --bs-focus-ring-color: rgba(var(--accent-rgb), 0.25);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius);
  --bs-border-radius-lg: var(--radius);
  --bs-border-radius-xl: var(--radius);
  --bs-border-radius-xxl: var(--radius);
  --bs-btn-focus-shadow-rgb: var(--accent-rgb);
}

/* ── Radius lock (Blueprint compact). Pills stay pills. ── */
.btn, .card, .form-control, .form-select, .input-group-text,
.dropdown-menu, .alert, .list-group, .list-group-item,
.nav-pills .nav-link, .progress, .progress-bar, .modal-content {
  border-radius: var(--radius, 3px) !important;
}
.badge { border-radius: var(--radius, 3px); }
.rounded-pill, .badge.rounded-pill, .qr7-pill { border-radius: 9999px !important; }

/* ── Type ── */
body { font-family: var(--font, 'Hanken Grotesk', system-ui, sans-serif); color: var(--text); }
.font-mono { font-family: var(--font-mono) !important; font-variant-numeric: tabular-nums; }
.font-display {
  font-family: var(--font-display);
  letter-spacing: var(--display-tracking);
  font-weight: var(--display-weight);
}
.text-faint { color: var(--text-faint) !important; }
.text-dim { color: var(--text-muted) !important; }
.tracking-label { letter-spacing: .04em; text-transform: uppercase; }

/* ── Cards / surfaces ── */
.card { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.qr7-surface-2 { background: var(--surface-2); }

/* ── Buttons (brand variants via Bootstrap btn vars) ── */
.btn { font-weight: 600; font-size: var(--ui); }
/* Primary CTA: filled coral. ≥44px tall touch target (UI-SPEC accessibility). */
.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--accent-deep); --bs-btn-hover-border-color: var(--accent-deep);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--accent-deep); --bs-btn-active-border-color: var(--accent-deep);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent);
  min-height: 44px;
}
.btn-soft {
  --bs-btn-color: var(--accent-deep); --bs-btn-bg: var(--accent-soft); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--accent-deep); --bs-btn-hover-bg: var(--accent-soft); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--accent-deep); --bs-btn-active-bg: var(--accent-soft); --bs-btn-active-border-color: transparent;
}
.btn-ghost {
  --bs-btn-color: var(--text-muted); --bs-btn-bg: transparent; --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text); --bs-btn-active-bg: var(--surface-2); --bs-btn-active-border-color: var(--border-strong);
}

/* ── Forms ── */
.form-control, .form-select {
  background-color: var(--surface); border-color: var(--border); color: var(--text);
}
.form-control:focus, .form-select:focus {
  background-color: var(--surface); border-color: var(--accent); color: var(--text);
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .18);
}
.form-control::placeholder { color: var(--text-faint); opacity: 1; }
.form-label { color: var(--text-muted); font-weight: 600; font-size: 12px; margin-bottom: 5px; }

/* ── Inline links within auth flows (accent-deep) ── */
.qr7-link { color: var(--accent-deep); text-decoration: none; font-weight: 600; }
.qr7-link:hover { color: var(--accent-deep); text-decoration: underline; }

/* ── Auth shell: centered card on --bg, --shadow-md ── */
.qr7-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 32px 16px; /* xl outer margin / responsive gutters */
}
.qr7-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
}
.qr7-auth-title { font-size: 28px; line-height: 1.2; margin-bottom: 16px; }
.qr7-auth-lead { color: var(--text-muted); font-size: 16px; margin-bottom: 24px; }

/* ── Icon-only action button (38px visual, 44px touch target — UI-SPEC) ── */
.qr7-iconbtn {
  width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted); display: grid; place-items: center;
  cursor: pointer; position: relative;
}
.qr7-iconbtn::after { content: ""; position: absolute; inset: -3px; } /* pad hit area to 44px */
.qr7-iconbtn:hover { color: var(--text); border-color: var(--border-strong); }

/* ── Badges ── */
.badge { font-weight: 600; font-size: 11.5px; padding: 4px 9px; }
.badge-soft { background: var(--accent-soft); color: var(--accent-deep); }
.badge-active { background: rgba(31, 138, 91, .10); color: var(--pos); border: 1px solid rgba(31, 138, 91, .22); }
/* Phase-4 neutral status/role chips (04-UI-SPEC Visual Notes — ports of the
   locked prototype, NOT new tokens). Paused = faint; Draft/Pending/Member = muted. */
.badge-paused { background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Segmented control (Phase-4 7/30/90 time-window toggle — 04-UI-SPEC). ── */
.qr7-seg {
  display: inline-flex;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.qr7-seg > button {
  border: 0;
  background: transparent;
  font: inherit;
  padding: 4px 10px;
  border-radius: calc(var(--radius) - 3px);
  cursor: pointer;
}
.qr7-seg > button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Sidebar nav (Plan 05 shell). Ported from Qr7_design/app/qr7.css; the
   prototype's --sidebar-* vars map onto our neutral crisp tokens here.
   Active item = accent-soft bg + accent-deep text (UI-SPEC accent reserved #2).
   nav items must NOT be width-clamped so FR/NL/DE/DE-worst-case text can wrap. ── */
.qr7-nav .nav-link {
  color: var(--text-muted);
  border-radius: var(--radius);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: var(--ui);
}
.qr7-nav .nav-link:hover { background: var(--surface-2); color: var(--text); }
.qr7-nav .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

/* ── Authenticated shell layout ── */
.qr7-shell { display: flex; min-height: 100vh; background: var(--bg); }
.qr7-shell-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--pad-sm);
  display: flex;
  flex-direction: column;
}
.qr7-shell-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.qr7-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pad-sm);
  padding: var(--pad-sm) var(--pad);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.qr7-shell-content { padding: var(--pad); flex: 1 1 auto; }
.qr7-brandmark { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); padding: 8px 12px 16px; }
@media (max-width: 768px) {
  .qr7-shell { flex-direction: column; }
  .qr7-shell-sidebar { width: auto; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--border); }
}

/* ════════════════════════════════════════════════════════════════════════════
   PUBLIC SURFACE (Phase 3 — the moment of truth)

   Ported 1:1 from Qr7_design/app/card.jsx LandingScreen inline styles into a
   `.public-*`-scoped block. These are COMPONENT-LEVEL dimensions, NOT new global
   tokens (03-UI-SPEC Typography FLAG): the off-scale caption sizes
   (11/11.5/12/13/14.5/15.5/23px) and the larger component radii (8/10/12/22px)
   live ONLY here, never exposed as global type utilities or CSS custom properties.
   The per-profile accent vars (--accent / --accent-deep / --accent-soft /
   --accent-ink) are set INLINE on the .public-body--card wrapper by card.html;
   the neutral page inherits the global coral. The page is mobile-first; the card
   column is centered and capped at ~480px on larger screens.
   ════════════════════════════════════════════════════════════════════════════ */

.public-body { background: #FFFFFF; margin: 0; }
.public-body--neutral { background: var(--bg); }

/* Card shell — centered mobile-first column. */
.public-card {
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  min-height: 100vh;
  padding-bottom: 36px;
  position: relative;
}
.public-card__body { padding: 0 20px; margin-top: -38px; position: relative; }

/* Brand hero — gradient band + dotted overlay (card.jsx 63-72). */
.public-hero {
  position: relative;
  padding: 64px 24px 52px;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
}
.public-hero__dots {
  position: absolute; inset: 0; opacity: 0.16;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 14px 14px;
}
/* Corner brand mark (quick 260603-02j, supersedes the centered 56px logo tile +
   company eyebrow). A small ~40px logo pinned to the top-left of the band in BOTH
   states, on its own white chip + shadow so it reads over any cover photo or the
   gradient — independent of any scrim. Rendered only when a real logo exists. */
.public-hero__logo--corner {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 5px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: grid; place-items: center; overflow: hidden;
}
.public-hero__logo img { width: 40px; height: 40px; object-fit: contain; display: block; }

/* Banner / cover hero (D-64). Full-bleed 3:1 cover image; rendered as a clean
   cover with no scrim — the optional corner mark carries its own backing/shadow. */
.public-hero--banner { padding: 0; aspect-ratio: 3 / 1; overflow: hidden; }
.public-hero__banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Taller banner -> -42px identity-tile straddle (vs -38px gradient state). */
.public-card > .public-hero--banner + .public-card__body { margin-top: -42px; }

/* Identity — 84px avatar overlapping the hero (card.jsx 75-80). */
.public-identity { display: flex; flex-direction: column; align-items: center; text-align: center; }
.public-identity__avatar {
  width: 84px; height: 84px; border-radius: 22px; background: var(--accent);
  border: 4px solid #fff; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 32px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); overflow: hidden;
}
.public-identity__avatar img { width: 84px; height: 84px; object-fit: cover; }
.public-identity__name {
  font-size: 23px; font-weight: 700; color: #15151A; margin: 12px 0 0;
  letter-spacing: -0.02em; line-height: 1.2;
}
.public-identity__title { font-size: 14.5px; color: #6A6A72; margin-top: 2px; }
.public-identity__company { font-size: 14.5px; font-weight: 600; color: #6A6A72; margin-top: 2px; }
.public-bio {
  font-size: 14px; font-weight: 400; line-height: 1.5; color: #6A6A72;
  margin: 8px auto 0; max-width: 38ch; text-align: center;
  white-space: pre-line; word-break: break-word;
}

/* Save-to-phone CTA — the one filled-accent action (card.jsx 82-85). */
.public-save-cta {
  width: 100%; margin-top: 18px; padding: 15px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); text-decoration: none;
  min-height: 44px; text-align: center;
}
.public-save-cta:hover, .public-save-cta:focus { color: #fff; }
.public-save-cta__label { line-height: 1.3; }

/* Quick actions — soft-accent tiles (card.jsx 88-94). */
.public-quick { display: flex; gap: 10px; margin-top: 12px; }
.public-quick__tile {
  flex: 1; min-width: 0; padding: 11px 4px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; min-height: 44px; justify-content: center; text-align: center;
}
.public-quick__tile:hover, .public-quick__tile:focus { color: var(--accent-deep); }
.public-quick__label { font-size: 12px; font-weight: 600; line-height: 1.3; }

/* Social monograms — padded to a 44px tap target (card.jsx 97-101). */
.public-social {
  display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap;
}
.public-social__chip {
  min-width: 44px; min-height: 44px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; text-decoration: none; padding: 0 8px;
}
.public-social__chip:hover, .public-social__chip:focus { color: var(--accent-deep); }

/* Contact-field rows — LandingField (card.jsx 4-17). */
.public-fields { margin-top: 18px; }
.public-field {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06); text-decoration: none;
  color: inherit; min-height: 44px;
}
.public-field:hover, .public-field:focus { color: inherit; }
.public-field__icon {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.public-field__body { min-width: 0; flex: 1; }
.public-field__label {
  display: block; font-size: 11px; color: #8A8A8E; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.public-field__value {
  display: block; font-size: 15.5px; color: #1A1A1F; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.public-field__chevron { color: #C4C4CC; flex-shrink: 0; }

/* Address -> two map links (D-65). Neutral surface, accent-deep ink, >=44px. */
.public-maps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.public-maps__link {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 8px 10px; border-radius: 8px;
  background: #F6F6F8; color: var(--accent-deep);
  font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none;
}
.public-maps__link:hover, .public-maps__link:focus { color: var(--accent-deep); }

/* Link buttons — LinkButton (card.jsx 19-32). */
.public-links { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.public-link {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  border-radius: 8px; background: #F6F6F8; border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none; color: inherit; min-height: 44px;
}
.public-link:hover, .public-link:focus { color: inherit; }
.public-link__icon {
  width: 34px; height: 34px; border-radius: 7px; background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06); display: grid; place-items: center;
  color: var(--accent-deep); flex-shrink: 0;
}
.public-link__body { flex: 1; min-width: 0; }
.public-link__label {
  display: block; font-size: 14.5px; font-weight: 600; color: #1A1A1F;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.public-link__url {
  display: block; font-size: 12px; color: #9A9AA2; font-family: var(--font-mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.public-link__external { color: #C4C4CC; flex-shrink: 0; }

/* Social-link logo grid — Layout C (Phase 13, D-01/D-11). A 2-up grid of vertical
   tiles: brand badge on top, network name (primary), handle (secondary). Neutral
   warm-paper surface; the ONLY saturated color is the per-network brand badge. */
.public-social-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px;
}
@media (max-width: 360px) {
  .public-social-grid { grid-template-columns: 1fr; }
}
.public-social-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px; min-height: 44px; min-width: 0;
  background: #F6F6F8; border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px; text-decoration: none; color: inherit;
}
.public-social-tile:hover { background: #fff; box-shadow: var(--shadow-sm); color: inherit; }
.public-social-tile:focus-visible {
  outline: 2px solid var(--bs-focus-ring-color, rgba(241, 88, 44, 0.25));
  outline-offset: 2px;
}
.public-social-tile__badge {
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0; color: #fff;
}
.public-social-tile__name {
  font-size: 14.5px; font-weight: 600; color: #1A1A1F; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.public-social-tile__handle {
  font-size: 12px; font-weight: 400; color: #9A9AA2; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.public-social-tile__handle--host { font-family: var(--font-mono); }

/* Dashboard live-preview scale (D-13) — reuses the SAME grid recipe at the 249px
   preview card's component scale (compact badge/type), NOT a parallel style. */
.public-social-grid--preview { gap: 6px; }
.public-social-grid--preview .public-social-tile { padding: 10px; gap: 6px; }
.public-social-grid--preview .public-social-tile__badge { width: 32px; height: 32px; }
.public-social-grid--preview .public-social-tile__name { font-size: 12px; }
.public-social-grid--preview .public-social-tile__handle { font-size: 11px; }

/* Share this card — QR + short URL re-share section (Phase 10, D-13..D-16).
   Neutral panel (the .public-link recipe); zero filled-accent controls — the
   Save CTA stays the page's only one. No transitions/animations (reduced-
   motion safe by construction). */
.public-share {
  background: #F6F6F8; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 22px; padding: 16px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-align: center;
}
.public-share__label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.02em; color: #8A8A8E; margin: 0;
}
.public-share__qrbtn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.public-share__qrtile {
  display: inline-block; background: #fff; border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06); padding: 10px;
}
.public-share__qrtile img { display: block; }
.public-share__url {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: #1A1A1F; margin: 0; user-select: all;
}
.public-share__hint { font-size: 12px; color: #9A9AA2; margin: 0; }
.public-share__actions { display: flex; gap: 8px; }
.public-share__chip {
  background: #fff; color: var(--accent-deep); font-size: 14px; font-weight: 600;
  border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.06); min-height: 44px;
  padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.public-share__chip--primary {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 1px var(--accent-deep);
  font-weight: 700;
}
.public-share__dialog {
  border: 0; border-radius: 8px; padding: 16px; background: #fff;
  text-align: center;
}
.public-share__dialog img {
  width: min(86vw, 360px); height: auto; display: block; margin: 0 auto 12px;
}
.public-share__dialog::backdrop { background: rgba(20, 15, 10, 0.5); }

/* ── Keep-this-card CTA (Phase 11, D-01/D-02) ─────────────────────────────
   Quiet dashed panel between the share section and the footer. The button is
   accent-SOFT background + accent-DEEP ink — NEVER filled --accent (the page's
   one filled-accent action stays "Save to phone"). */
.public-keep {
  margin-top: 22px; padding: 16px; border: 1px dashed rgba(0, 0, 0, 0.16);
  background: #FAFAFB; border-radius: 10px; display: flex;
  flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.public-keep__line { margin: 0; font-size: 12.5px; line-height: 1.45; color: #8A8A8E; }
.public-keep__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 14px; font-weight: 700; text-decoration: none;
}

/* Footer — trust line + wordmark (card.jsx 133-139). */
.public-footer {
  margin-top: 22px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 7px;
}
.public-footer__trust {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #9A9AA2;
}
.public-footer__brand {
  font-size: 11px; color: #B6B6BE; font-weight: 700; letter-spacing: 0.02em;
}

/* Language switcher — compact ?lang options (D-50, FRESH). */
.public-lang {
  display: flex; justify-content: flex-end; gap: 4px; padding: 10px 12px;
  flex-wrap: wrap;
}
.public-lang__opt {
  min-width: 44px; min-height: 36px; padding: 6px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; background: transparent;
}
.public-lang__opt:hover, .public-lang__opt:focus { color: var(--text); background: var(--surface-2); }
.public-lang__opt[aria-current="true"] {
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 700;
}

/* In-app-webview hint — detect-and-guide (D-41, FRESH). */
.public-inapp {
  margin-top: 16px; padding: 14px 16px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.public-inapp__heading { font-size: 14.5px; font-weight: 700; color: #1A1A1F; margin: 0; }
.public-inapp__body { font-size: 13px; color: #6A6A72; margin: 6px 0 0; line-height: 1.45; }
.public-inapp__urlrow {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.public-inapp__url {
  font-family: var(--font-mono); font-size: 12.5px; color: #1A1A1F;
  word-break: break-all; user-select: all;
}
.public-inapp__copy, .public-inapp__dismiss {
  min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 13px;
  font-weight: 600; border: 1px solid var(--border); background: #fff;
  color: var(--accent-deep); display: inline-flex; align-items: center;
  gap: 6px; cursor: pointer; text-decoration: none;
}
.public-inapp__dismiss { color: var(--text-muted); }

/* Draft owner-preview banner — never error-styled (D-44, FRESH). */
.public-draft {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  color: var(--text);
}
.public-draft__icon { color: var(--text-muted); flex-shrink: 0; }
.public-draft__label { font-weight: 700; font-size: 14px; }
.public-draft__body { font-size: 12.5px; color: var(--text-muted); }
.public-draft__link { color: var(--accent-deep); font-weight: 600; }

/* Neutral page — no branding, global coral, one ghost CTA (D-43, FRESH). */
.public-neutral {
  max-width: 440px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center; gap: 32px;
}
.public-neutral__panel { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.public-neutral__mark { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--accent); letter-spacing: -0.02em; }
.public-neutral__heading { font-size: 20px; font-weight: 600; color: var(--text); margin: 0; }
.public-neutral__body { font-size: 16px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.public-neutral__cta {
  min-height: 44px; padding: 11px 18px; border-radius: var(--radius);
  border: 1px solid var(--accent); color: var(--accent-deep); background: transparent;
  font-weight: 600; font-size: 14px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.public-neutral__cta:hover, .public-neutral__cta:focus { background: var(--accent-soft); color: var(--accent-deep); }

/* ── Pool editor: transient "Saved" confirmation (quick/pool-ux, finding 2) ──
   A small, brand-quiet success flash next to a saved row/identity. CSS-only
   fade-out: it appears, holds, then fades and stays hidden (fill-mode forwards)
   so it disappears without any JS after an HTMX swap. */
.qr7-saved-flash {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--accent-deep);
  margin-left: 8px; vertical-align: middle;
  animation: qr7-saved-flash 2s ease forwards;
}
@keyframes qr7-saved-flash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }     /* fade in (~0.3s) */
  70%  { opacity: 1; }     /* hold (~1.1s) */
  100% { opacity: 0; }     /* fade out (~0.6s) */
}

/* Reduced motion — the public surface has no motion beyond hover/focus tints. */
@media (prefers-reduced-motion: reduce) {
  .public-save-cta, .public-quick__tile, .public-link, .public-lang__opt,
  .public-neutral__cta, .public-social__chip, .public-social-tile { transition: none !important; }
  /* The Saved flash still appears+hides, just without the eased fade. */
  .qr7-saved-flash { animation-duration: 2s; animation-timing-function: steps(1, end); }
}

/* ── My Info ledger (B★, quick 260610-1vf) ──────────────────────────────────
   ONE page-level Edit mode: #info-page carries data-mode="view|edit". View
   mode is a pure reading surface (edit controls CSS-hidden); Edit flips the
   whole page. Tokens from the qr7 brand layer above. */
#info-page[data-mode="view"] .edit-only { display: none !important; }
#info-page[data-mode="edit"] .view-only { display: none !important; }

/* Two-column ledger: identity card (~300px) + detail table; 1fr below 992px. */
.qr7-info-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 991.98px) {
  .qr7-info-grid { grid-template-columns: 1fr; }
}

/* One ledger row: [42px icon] [130px small-caps label] [value] [auto]. */
.qr7-info-row {
  display: grid; grid-template-columns: 42px 130px 1fr auto; gap: 12px;
  align-items: center; padding: 11px 16px;
  border-top: 1px solid var(--border);
}
.qr7-info-row:first-child { border-top: 0; }
#info-page[data-mode="view"] .qr7-info-row:hover { background: var(--surface-2); }
@media (max-width: 575.98px) {
  .qr7-info-row { grid-template-columns: 42px 1fr auto; }
  .qr7-row-label { grid-column: 2; }
}

.qr7-row-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.qr7-row-label {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-faint); overflow-wrap: anywhere;
}
.qr7-row-value { font-size: 15px; overflow-wrap: anywhere; }
.qr7-row-error { background: rgba(192, 57, 43, 0.05); }

/* Add ghosts (edit-only): dashed border, accent-deep text, accent hover. */
#info-addrow { padding: 10px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.qr7-addline {
  flex: 1 1 auto; min-width: 110px; padding: 8px 12px; text-align: center;
  border: 1px dashed var(--border-strong); color: var(--accent-deep);
  border-radius: var(--radius); font-size: 13px; font-weight: 600;
  text-decoration: none; background: transparent;
}
.qr7-addline:hover, .qr7-addline:focus {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep);
}

/* Quiet per-row remove ✕ (edit-only). */
.qr7-row-x {
  width: 28px; height: 28px; border: 0; background: transparent;
  border-radius: var(--radius); color: var(--text-faint);
  font-size: 14px; line-height: 1; cursor: pointer;
}
.qr7-row-x:hover, .qr7-row-x:focus { color: var(--accent); background: var(--accent-soft); }

/* ── Contacts ledger (Phase 11, D-14 — 11-UI-SPEC) ──────────────────────────
   The saved-contacts list carries the My Info ledger row recipe: grid rows,
   11px/16px padding, hairline separators, --surface-2 hover. Tokens only,
   3px radii. Accent appears ONLY on the avatar chip (the SOURCE profile's
   accent, inline style) and the ACTIVE filter chip — never on row hover,
   inactive chips, badges, or rest-state action buttons (UI-SPEC prohibitions).
   Plan 11-07 extends this block with the inline editor / confirm-strip states
   when it needs them — do not pre-build. */
.qr7-contacts__row {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 12px;
  align-items: center; padding: 11px 16px;
  border-top: 1px solid var(--border);
}
.qr7-contacts__row:first-child { border-top: 0; }
.qr7-contacts__row:hover { background: var(--surface-2); }

/* 34px round avatar chip — accent bg set inline from the snapshot (available
   rows); the --off variant is the dead-card fallback (no accent, D-07). */
.qr7-contacts__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.qr7-contacts__avatar--off { background: var(--surface-2); color: var(--text-faint); }

.qr7-contacts__identity { min-width: 0; }
.qr7-contacts__name {
  font-size: 15.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr7-contacts__sub { font-size: 14px; color: var(--text-muted); }

/* Tag chips (D-06): quiet at rest; the ACTIVE filter chip is the one accent
   pairing (mirrors the nav active-state recipe). */
.qr7-contacts__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.qr7-contacts__chip {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  background: var(--surface-2); color: var(--text-muted);
  border-radius: var(--radius); text-decoration: none;
}
.qr7-contacts__chip:hover, .qr7-contacts__chip:focus { color: var(--text); }
.qr7-contacts__chip--active { background: var(--accent-soft); color: var(--accent-deep); }

/* "Card unavailable" badge (D-07) — surface-2 / faint, never accent. */
.qr7-contacts__badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  background: var(--surface-2); color: var(--text-faint);
  border-radius: var(--radius); margin-top: 4px;
}

.qr7-contacts__meta { display: flex; align-items: center; gap: 8px; justify-self: end; }
.qr7-contacts__stamp { font-size: 12px; color: var(--text-faint); }
.qr7-contacts__actions { display: flex; gap: 8px; }
.qr7-contacts__actions .btn {
  display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted);
}

/* Mobile (<576px): meta wraps under the identity column; actions collapse to
   icon-only 44x44 hit areas (labels hidden — aria-labels carry the name). */
@media (max-width: 575.98px) {
  .qr7-contacts__row { grid-template-columns: 42px 1fr; }
  .qr7-contacts__meta { grid-column: 2; justify-self: start; }
  .qr7-contacts__actionlabel { display: none; }
  .qr7-contacts__actions .btn {
    width: 44px; height: 44px; justify-content: center; padding: 0;
  }
}

/* ── Present mode (Phase 10; redesigned per owner UAT 2026-06-11) ───────────
   The present card now renders the PUBLIC landing page's formatting (.public-*
   vocabulary — hero, identity, fields, links, share section) inside a thin
   full-viewport shell, with the QR de-emphasized in the .public-share section
   instead of being the focal point (it was redundant with the public page).
   100vh fallback line FIRST, then 100dvh (mobile URL-bar correctness); the
   safe-area handling needs viewport-fit=cover on the dashboard viewport meta
   (present, since Plan 10-02). */
.qr7-present {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  padding-bottom: env(safe-area-inset-bottom);
}
/* The hosted public-card column keeps its own white bg / 480px cap; on wider
   screens it floats centered on the warm dashboard paper. */
.qr7-present .public-card { box-shadow: var(--shadow-sm); }

/* ✕ back-to-picker — a white corner chip (the .public-hero__logo--corner
   backing recipe) so it reads over the brand hero gradient OR a banner photo;
   absolutely positioned inside the .public-card (position:relative), 44px hit
   area, safe-area aware. */
.qr7-present__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  color: #1A1A1F;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}
.qr7-present__close:hover, .qr7-present__close:focus-visible {
  background: #fff; color: var(--accent-deep);
}

/* ── Mobile type scale (owner UAT 2026-06-11: app fonts too small on phones).
   Bumps the token-driven chrome (buttons, nav, ledger, labels) on phone-width
   screens. NOTE: the ~130 inline `font-size:` styles in app templates do NOT
   respond to these tokens — tokenizing them is logged as deferred work. ── */
@media (max-width: 575.98px) {
  /* .qr7-theme re-declares --ui, so :root alone is shadowed on every
     dashboard page (WR-01) — override at equal-or-higher specificity. */
  :root, .qr7-theme { --ui: 15.5px; }
  .form-label { font-size: 13px; }
  .badge { font-size: 12.5px; }
  .qr7-row-label { font-size: 12px; }
  .qr7-row-value { font-size: 16px; }
  .qr7-addline { font-size: 14px; }
}
