/* Layout only: every color comes from the tokens in tokens.css. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 0.9375rem/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--fg); text-underline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.card { min-height: 100vh; display: flex; flex-direction: column; text-align: center; }
.card-empty { padding: 96px 24px 0; }
.card-body { width: 100%; max-width: 440px; margin: 0 auto; padding: 24px clamp(24px, 12vw, 47px) 32px; flex: 1 0 auto; }

/* Plain white header: no tinted band, just the photo (when there is one), name and title. */
.hero { padding: 48px 24px 0; }
.avatar { display: block; width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; object-fit: cover; background: var(--surface); }
h1 { margin: 24px 0 4px; font-size: 1.5rem; font-weight: 400; line-height: 1.2; overflow-wrap: anywhere; }
.subtitle { margin: 0; letter-spacing: 0.03em; overflow-wrap: anywhere; }

.actions { display: grid; gap: 12px; margin: 0 0 24px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 49px; padding: 0 24px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 500; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--on-accent); letter-spacing: 0.15em; }
.btn-secondary { background: var(--secondary); color: var(--on-secondary); font-size: 0.75rem; letter-spacing: 0.3em; }
/* Show/Hide QR Code pill with the black QR circle on its right edge (same side as the per-link QR buttons). Text sizing matches Save Contact. */
.btn-qr { padding-left: 56px; padding-right: 56px; font-size: inherit; letter-spacing: 0.15em; white-space: nowrap; }
.btn-qr .qr-circle { position: absolute; right: 0; top: 0; }
.qr-btn { display: none; }
.js .qr-btn { display: inline-flex; }

/* Black circular QR button (page-level and per-link). 49px keeps the 44px minimum touch target. */
.qr-circle {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 49px; height: 49px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
}
button.qr-circle { cursor: pointer; }

.qr-panel { margin: 0 auto 24px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--ink); }
.qr-svg { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto; }
.qr-caption { margin: 8px 0 0; color: var(--muted); font-size: 0.875rem; }

.field-label { display: block; margin: 0; color: var(--muted); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.09em; text-transform: uppercase; }
.field-value { color: var(--fg); font-weight: 400; overflow-wrap: anywhere; }
a.field-value { text-underline-offset: 3px; }

.details { margin: 0; text-align: left; }
.detail { padding: 0 0 28px; }
.detail dd { margin: 0; }
.detail a.field-value { display: inline-flex; align-items: center; min-height: 44px; margin-top: -8px; margin-bottom: -8px; }

.bio { margin: 0 0 24px; text-align: left; }
.bio:has(~ .links) { margin-bottom: 48px; }
.bio p { margin: 0; font-weight: 400; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; }

.links { margin: 0; text-align: left; }
.links h2 { margin: 0 0 12px; font-size: 0.9375rem; font-weight: 500; text-transform: uppercase; }
.links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.pill { display: flex; align-items: center; gap: 8px; min-height: 49px; margin-top: 4px; padding-left: 19px; border-radius: 999px; background: var(--surface); }
.pill .field-value { flex: 1 1 0; min-width: 0; font-weight: 400; }
.pill .field-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.pill a.field-value { line-height: 44px; }
.field-qr { margin: 8px 0 0; text-align: center; }

.powered-by { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 16px 24px; }
.powered-by-label { color: var(--fg); font-size: 0.625rem; font-weight: 300; line-height: 15px; letter-spacing: 0.48em; text-transform: uppercase; padding-left: 0.48em; }
/* The negative margin keeps the 44px touch target while the logo sits directly under the label (Figma, VCF-28). */
.powered-by a { display: inline-flex; align-items: center; padding: 11px 8px; margin: -11px 0; }
.powered-by img { display: block; width: 62px; height: auto; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* "Report this card": a quiet link under the card, and the no-JS report form (VCF-25 SEC-5). Tokens only. */
.report-link { display: flex; justify-content: center; padding: 0 24px; }
.report-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); font-size: 0.75rem; }
.report { padding: 48px 24px 0; }
.report h1 { margin-top: 0; }
.report-form { width: 100%; max-width: 440px; margin: 24px auto 0; text-align: left; }
.report-form fieldset { margin: 0 0 24px; padding: 0; border: 0; }
.report-form legend { padding: 0; margin-bottom: 4px; color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.09em; text-transform: uppercase; }
.report-option { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.report-option input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.report-details-label { margin-bottom: 8px; }
.report-form textarea { display: block; width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; resize: vertical; }
.report-form textarea:focus-visible, .report-option input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.report-form .btn { width: 100%; margin-top: 24px; }
.report-error { margin: 0 0 16px; color: var(--danger); font-weight: 500; }
.report-back { margin: 24px 0 0; }
.report-back a { display: inline-flex; align-items: center; min-height: 44px; }
