/* qr.studio link-in-bio editor (same tokens as css/studio.css, light only) */
:root {
  /* print shop tokens, same as css/studio.css (signal orange always carries ink text) */
  --s-bg: #f5f3ee; --s-card: #ffffff; --s-tint: #ece8df; --s-line: #e2ded4; --s-ink: #16141f; --s-muted: #5d5a66;
  --s-hot: #c93a0e; --s-cta: #16141f; --s-cta-hover: #2e2b38; --s-good: #1f7a4d; --s-bad: #b42318;
  --s-signal: #ff4f1a; --s-signal-ink: #16141f; --s-signal-hover: #ff7a50;
  --s-focus: 0 0 0 3px rgba(255, 79, 26, 0.45); --s-lift: 0 10px 24px -18px rgba(22, 20, 31, 0.35);
  color-scheme: light;
}
.ed { margin: 0; background: var(--s-bg); color: var(--s-ink); font: 400 16px/1.5 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.ed *, .ed *::before, .ed *::after { box-sizing: border-box; }
html { scroll-padding-bottom: 88px; } /* focused fields stay above the sticky Publish bar */
html:has(.ed-undo:not(:empty)) { scroll-padding-bottom: calc(148px + env(safe-area-inset-bottom)); } /* + the one-line undo banner (48px) and its 10px gap */
.ed-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ed-bar { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; margin: 0 auto; padding: 14px 16px; }
.ed-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--s-ink); text-decoration: none; font: 700 1.25rem "Bricolage Grotesque", sans-serif; min-height: 44px; }
.ed-brand .ed-dot { color: var(--s-hot); }
.ed-bar__link { color: var(--s-muted); text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: 999px; }
.ed-bar__link:hover { background: var(--s-tint); color: var(--s-ink); }

.ed-main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 64px; }
.ed-intro h1 { margin: 8px 0 8px; font: 700 clamp(2rem, 5vw, 3.25rem)/1.05 "Bricolage Grotesque", sans-serif; letter-spacing: -0.02em; text-wrap: balance; }
.ed-intro em { font-style: italic; color: var(--s-hot); }
.ed-lead { margin: 0 0 28px; max-width: 60ch; color: var(--s-muted); font-size: 1.0625rem; }

.ed-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .ed-grid { grid-template-columns: minmax(0, 1fr) 400px; } .ed-side { position: sticky; top: 16px; } }

.ed-form { display: grid; gap: 16px; min-width: 0; }
.ed-sec { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 20px; padding: 20px; box-shadow: var(--s-lift); min-width: 0; }
.ed-sec h2 { margin: 0 0 14px; font: 700 1.125rem "Bricolage Grotesque", sans-serif; }
.ed-label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 0.9375rem; }
.ed-sec > .ed-label:first-of-type { margin-top: 0; }
.ed-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--s-line); border-radius: 12px; background: var(--s-bg); color: var(--s-ink); font: inherit; }
textarea.ed-input { resize: vertical; min-height: 72px; }
.ed-input:focus, .ed-handle:focus-within { outline: 2px solid transparent; border-color: var(--s-ink); box-shadow: var(--s-focus); }
.ed-hint { margin: 8px 0 0; font-size: 0.875rem; color: var(--s-muted); }
.ed-hint--good { color: var(--s-good); font-weight: 600; }
.ed-hint--bad { color: var(--s-bad); font-weight: 600; }

.ed-handle { display: flex; align-items: center; min-height: 52px; border: 1px solid var(--s-line); border-radius: 12px; background: var(--s-bg); padding-inline-start: 14px; font-size: 1.0625rem; }
.ed-handle span { color: var(--s-muted); white-space: nowrap; }
.ed-handle input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--s-ink); padding-block: 12px; padding-inline: 0 14px; outline: none; }
.ed-handle input[readonly] { color: var(--s-muted); }

.ed-avatar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ed-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font: 600 0.9375rem "Geist", sans-serif; text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.ed-btn--primary { background: var(--s-signal); color: var(--s-signal-ink); font-weight: 700; }
.ed-btn--primary:hover { background: var(--s-signal-hover); }
.ed-btn--ghost { background: var(--s-card); border-color: var(--s-line); color: var(--s-ink); }
.ed-btn--ghost:hover { border-color: var(--s-ink); }
.ed-btn--text { background: none; color: var(--s-muted); text-decoration: underline; }
.ed-btn--text:hover { color: var(--s-ink); }
.ed-btn--danger { background: var(--s-card); border-color: #f1c4bf; color: var(--s-bad); }
.ed-btn--danger:hover { background: #fdecea; }
.ed-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ed-btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.ed-btn:focus-visible, .ed-icon:focus-visible, .ed a:focus-visible, .ed-preset input:focus-visible + span, .ed-color input:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus); }
.ed-avatar:has(#ed-avatar-file:focus-visible) label { box-shadow: var(--s-focus); } /* the hidden input follows its label */

.ed-rows { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ed-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--s-line); border-radius: 14px; background: var(--s-bg); }
.ed-row__fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.ed-row__tools { display: flex; flex-direction: column; gap: 4px; }
.ed-row--social { align-items: center; }
.ed-row--social .ed-field { flex: 1; min-width: 0; }
.ed-row__icon svg { width: 22px; height: 22px; fill: var(--s-ink); display: block; margin: 0 6px; }
.ed-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--s-line); border-radius: 10px; background: var(--s-card); color: var(--s-ink); font-size: 1.125rem; cursor: pointer; }
.ed-icon:disabled { opacity: 0.35; cursor: default; }
.ed-icon:not(:disabled):hover { border-color: var(--s-ink); }
@media (min-width: 640px) { .ed-row__fields { grid-template-columns: 2fr 3fr; } .ed-row__tools { flex-direction: row; } }
.ed-add-social { display: flex; gap: 8px; }
.ed-add-social select { flex: 1; min-width: 0; }

.ed-presets { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ed-presets legend { margin-top: 0; }
.ed-preset { position: relative; }
.ed-preset input { position: absolute; opacity: 0; }
.ed-preset span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--s-line); font-weight: 600; font-size: 0.875rem; cursor: pointer; }
.ed-preset--light span { background: #f7f6ff; color: #17123a; }
.ed-preset--dark span { background: #121019; color: #f4f2ff; }
.ed-preset--sunset span { background: linear-gradient(135deg, #ffd6c9, #d8d2ff); color: #17123a; }
.ed-preset--mint span { background: #e7f6ef; color: #0f2e24; }
.ed-preset--print span { background: radial-gradient(circle, rgba(22, 20, 31, 0.12) 1px, transparent 1.5px) 0 0 / 8px 8px, #ffffff; color: #16141f; border-color: #16141f; border-style: dashed; }
.ed-preset--mono span { background: #ffffff; color: #111111; }
.ed-preset--paper span { background: #f5f3ee; color: #16141f; }
.ed-preset--aurora span { background: linear-gradient(135deg, #c6f6e3, #dcd3ff 55%, #cfe8ff); color: #14122b; }
.ed-preset--peach span { background: linear-gradient(135deg, #ffd3b6, #ffaaa5); color: #3a1410; }
.ed-preset--ocean span { background: linear-gradient(135deg, #0b3d5c, #0c5c66); color: #effaff; }
.ed-preset--midnight span { background: radial-gradient(circle at 50% 0%, #4b2a9a, #0d0b1f 75%); color: #f1edff; }
.ed-preset--lime span { background: #ecffb8; color: #1d2a00; }
.ed-preset input:checked + span { border-color: var(--s-ink); box-shadow: 0 0 0 2px var(--s-ink) inset; }
.ed-look-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; margin-top: 8px; }
.ed-color { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.ed-color input { width: 44px; height: 44px; padding: 0; border: 1px solid var(--s-line); border-radius: 10px; background: none; cursor: pointer; }
.ed-buttons { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ed-buttons legend { width: 100%; }
.ed-buttons label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.ed-buttons input { width: 18px; height: 18px; accent-color: var(--s-ink); }

.ed-actions { display: flex; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--s-bg) 70%, transparent); z-index: 2; }
.ed-actions .ed-btn--primary { min-height: 52px; padding-inline: 28px; font-size: 1rem; }
.ed-msg { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fdecea; color: var(--s-bad); font-weight: 600; }
.ed-msg--good { background: #e6f5ee; color: var(--s-good); }
.ed-danger { box-shadow: none; }

.ed-side { display: grid; gap: 16px; min-width: 0; }
.ed-done, .ed-stats { background: var(--s-card); border: 2px solid var(--s-ink); border-radius: 20px; padding: 20px; }
.ed-stats { border-width: 1px; border-color: var(--s-line); }
.ed-done h2, .ed-stats h2 { margin: 0 0 8px; font: 700 1.25rem "Bricolage Grotesque", sans-serif; }
.ed-done:focus { outline: 2px solid transparent; box-shadow: var(--s-focus); }
.ed-done a#ed-done-url { color: var(--s-ink); font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.ed-warn { padding: 10px 12px; border-radius: 12px; background: #fff4e5; color: #7a3d00; font-size: 0.9375rem; }
.ed-copy { display: flex; gap: 8px; }
.ed-copy .ed-input { font-size: 0.8125rem; min-width: 0; }
.ed-done-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.ed-stats p { margin: 0 0 8px; }
.ed-stats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
.ed-stats li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--s-line); padding-top: 6px; }
.ed-stats li span { overflow-wrap: anywhere; color: var(--s-muted); }
.ed-stats li strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

.ed-preview-label { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-muted); }
.ed-phone { border: 10px solid var(--s-ink); border-radius: 36px; overflow: hidden; box-shadow: var(--s-lift); max-width: 380px; width: 100%; justify-self: center; }
.ed-preview.bio { min-height: 560px; padding: 36px 16px 20px; }
.ed-preview .bio-link { min-height: 48px; }
.ed-preview .bio-foot { padding-top: 28px; font-size: 0.8125rem; }
.ed-placeholder { opacity: 0.45; }

.ed-copytext { max-width: 68ch; margin-top: 56px; color: var(--s-muted); line-height: 1.65; }
.ed-copytext h2 { color: var(--s-ink); font: 700 1.375rem "Bricolage Grotesque", sans-serif; margin: 28px 0 8px; }
.ed-copytext h3 { color: var(--s-ink); font-size: 1rem; margin: 20px 0 8px; }
.ed-copytext a, .ed-copytext code { color: var(--s-ink); }
.ed-copytext code { background: var(--s-tint); padding: 1px 6px; border-radius: 6px; }
.ed-foot { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 0.9375rem; }
.ed-foot a { color: inherit; display: inline-block; padding: 10px 2px; }
@media (prefers-reduced-motion: reduce) { .ed * { transition: none !important; } }
.ed-field { display: grid; gap: 4px; }
.ed-input[aria-invalid="true"] { border-color: var(--s-bad); }
.ed-field-error { font-size: 0.8125rem; font-weight: 600; color: var(--s-bad); }
.ed [hidden] { display: none !important; }
/* the address is a URL: keep it left-to-right in RTL languages */
.ed-handle { direction: ltr; }

/* remembered pages (create mode) + change address (edit mode) */
.ed-mine { padding: 16px 20px; border: 1px solid var(--s-line); border-radius: 20px; background: var(--s-tint); color: var(--s-ink); }
.ed-mine__title { margin: 0 0 8px; font-weight: 700; }
.ed-mine__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ed-mine__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-mine__list span { font-weight: 600; overflow-wrap: anywhere; }
.ed-rename { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* print shop: the preview column is a proof card with crop marks */
@media (min-width: 900px) {
  .ed-side {
    --crop: var(--s-ink);
    padding: 28px; border: 1px solid var(--s-line); border-radius: 20px;
    background:
      linear-gradient(var(--crop), var(--crop)) 12px 12px / 16px 1.5px no-repeat,
      linear-gradient(var(--crop), var(--crop)) 12px 12px / 1.5px 16px no-repeat,
      linear-gradient(var(--crop), var(--crop)) right 12px top 12px / 16px 1.5px no-repeat,
      linear-gradient(var(--crop), var(--crop)) right 12px top 12px / 1.5px 16px no-repeat,
      linear-gradient(var(--crop), var(--crop)) left 12px bottom 12px / 16px 1.5px no-repeat,
      linear-gradient(var(--crop), var(--crop)) left 12px bottom 12px / 1.5px 16px no-repeat,
      linear-gradient(var(--crop), var(--crop)) right 12px bottom 12px / 16px 1.5px no-repeat,
      linear-gradient(var(--crop), var(--crop)) right 12px bottom 12px / 1.5px 16px no-repeat,
      radial-gradient(circle, rgba(22, 20, 31, 0.09) 1px, transparent 1.5px) 0 0 / 14px 14px,
      var(--s-card);
  }
}

/* undo after removing a link or social row (in the sticky Publish bar) */
.ed-undo { flex: 1 1 100%; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 6px 12px; border-radius: 12px; background: var(--s-ink); color: var(--s-bg); font-size: 0.9375rem; }
.ed-undo:empty { flex: 0 0 0; padding: 0; margin-inline-end: -10px; background: none; } /* stays in the a11y tree so the status is announced */
.ed-undo span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* one line: the scroll padding above counts on it */
.ed-undo .ed-btn--text { flex: none; color: var(--s-bg); min-height: 36px; padding: 6px 10px; }
.ed-undo .ed-btn--text:hover { color: #ffffff; }

/* ---------- step-by-step editor (2026-11-19) ---------- */
.ed-form { gap: 20px; }
.ed-steps { display: grid; gap: 10px; }
.ed-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ed-steps__btn { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 0 8px; border: 0; border-bottom: 3px solid var(--s-line); background: none; color: var(--s-muted); font: 500 0.875rem "Geist", sans-serif; cursor: pointer; text-align: start; }
.ed-steps__btn.is-done { border-bottom-color: var(--s-ink); color: var(--s-ink); }
.ed-steps__btn[aria-current="step"] { border-bottom-color: var(--s-signal); color: var(--s-ink); font-weight: 700; }
.ed-steps__btn:disabled { cursor: default; opacity: 0.6; }
.ed-steps__btn:not(:disabled):hover { color: var(--s-ink); }
.ed-steps__btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus); }
.ed-steps__n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--s-line); background: var(--s-card); font-size: 0.8125rem; }
.ed-steps__btn[aria-current="step"] .ed-steps__n, .ed-steps__btn.is-done .ed-steps__n { background: var(--s-ink); border-color: var(--s-ink); color: var(--s-bg); }
.ed-steps__of { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-hot); }
.ed-steps__skip { justify-self: end; color: var(--s-muted); font-weight: 500; font-size: 0.9375rem; padding: 10px 2px; }
.ed-steps__skip:hover { color: var(--s-ink); }
.ed-step { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 20px; padding: 20px; box-shadow: var(--s-lift); min-width: 0; }
.ed-step__h { margin: 0 0 6px; font: 700 clamp(1.5rem, 3.5vw, 2rem)/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -0.02em; }
.ed-step__h:focus { outline: none; }
.ed-step__lead { margin: 0 0 18px; color: var(--s-muted); max-width: 60ch; }
.ed-sub-h { margin: 24px 0 10px; font: 700 1.0625rem "Bricolage Grotesque", sans-serif; }

/* step 1: business cards + sub-category chips */
.ed-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.ed-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 72px; padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 16px; background: var(--s-card); color: var(--s-ink); font: inherit; text-align: start; cursor: pointer; }
.ed-cat:hover { border-color: var(--s-ink); }
.ed-cat[aria-pressed="true"] { border: 2px solid var(--s-ink); box-shadow: 0 0 0 3px var(--s-signal); padding: 11px 13px; }
.ed-cat__name { font-weight: 600; }
.ed-cat__hint { font-size: 0.875rem; color: var(--s-muted); }
.ed-subs { margin-top: 18px; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--s-line); background: var(--s-card); color: var(--s-ink); font: 500 0.9375rem "Geist", sans-serif; cursor: pointer; }
.ed-chip:hover { border-color: var(--s-ink); }
.ed-chip[aria-pressed="true"] { background: var(--s-ink); border-color: var(--s-ink); color: var(--s-bg); }
.ed-cat:focus-visible, .ed-chip:focus-visible, .ed-style input:focus-visible + .ed-style__pv, .ed-seg input:focus-visible + span, .ed-more summary:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus); }

/* step 2: live mini previews of the styles (a 300 px page drawn at half size) */
.ed-styles { border: 0; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.ed-style { position: relative; display: grid; gap: 6px; justify-items: center; cursor: pointer; }
.ed-style input { position: absolute; opacity: 0; }
.ed-style__pv { display: block; width: 150px; height: 230px; overflow: hidden; border-radius: 18px; border: 1px solid var(--s-line); background: var(--s-tint); }
.ed-style input:checked + .ed-style__pv { box-shadow: 0 0 0 3px var(--s-ink); border-color: var(--s-ink); }
.ed-style__name { font-weight: 600; font-size: 0.9375rem; }
.ed-mini.bio { width: 300px; min-height: 460px; padding: 16px 14px; transform: scale(0.5); transform-origin: top left; pointer-events: none; }
html[dir="rtl"] .ed-mini.bio { transform-origin: top right; }
.ed-mini .bio-links { margin-top: 16px; gap: 10px; }
.ed-mini .bio-link { min-height: 44px; padding: 10px 14px; }
.ed-presets#ed-classic { margin-top: 16px; }
.ed-more { margin-top: 18px; border-top: 1px solid var(--s-line); padding-top: 8px; }
.ed-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }

/* step 3: cover choice */
.ed-cover { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.ed-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-seg label { position: relative; }
.ed-seg input { position: absolute; opacity: 0; }
.ed-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--s-line); background: var(--s-card); font-weight: 500; cursor: pointer; text-align: center; }
.ed-seg input:checked + span { background: var(--s-ink); border-color: var(--s-ink); color: var(--s-bg); }
.ed-cover__photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ed-cover__photo img { width: 150px; height: 50px; object-fit: cover; border-radius: 10px; }
.ed-cover__photo:has(#ed-cover-file:focus-visible) label { box-shadow: var(--s-focus); }

/* step 5: QR code */
.ed-qr { margin-top: 20px; }
.ed-qr img { display: block; width: 200px; height: 200px; border: 1px solid var(--s-line); border-radius: 12px; background: #ffffff; }
.ed-done { margin-top: 20px; }

/* Back / Next bar */
.ed-actions { align-items: center; }
#ed-next, #ed-save { margin-inline-start: auto; min-height: 52px; padding-inline: 28px; font-size: 1rem; }

.ed-top, .ed-side__close { display: none; }
@media (max-width: 899px) {
  html { scroll-padding-top: 72px; } /* messages and fields scroll clear of the sticky top bar */
  .ed-intro h1 { font-size: 1.75rem; }
  .ed-lead { margin-bottom: 16px; }
  .ed-steps ol { gap: 4px; }
  .ed-steps__btn { padding: 0; min-height: 24px; border-bottom-width: 4px; }
  .ed-steps__n, .ed-steps__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ed-step { padding: 16px; }
  /* who and which style, always in view; "See page" opens the preview as a sheet */
  .ed-top { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 3; height: 56px; padding: 0 4px 0 10px; border: 1px solid var(--s-line); border-radius: 16px; background: var(--s-card); }
  .ed-top__av { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--s-ink); color: var(--s-bg); font-weight: 700; }
  .ed-top__av img { width: 100%; height: 100%; object-fit: cover; }
  .ed-top__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
  .ed-top__txt strong, .ed-top__txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-top__txt span { font-size: 0.8125rem; color: var(--s-muted); }
  .ed-top__see { color: var(--s-hot); text-decoration: none; font-weight: 700; }
  .ed-side { display: none; }
  .ed-sheet-open { overflow: hidden; }
  .ed-sheet-open .ed-side { display: grid; position: fixed; inset: 0; z-index: 10; overflow: auto; padding: 16px; align-content: start; background: var(--s-bg); }
  .ed-sheet-open .ed-side__close { display: inline-flex; justify-self: end; }
  .ed-actions { position: fixed; inset-inline: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--s-bg); border-top: 1px solid var(--s-line); }
  .ed-main { padding-bottom: 110px; }
  #ed-next, #ed-save { flex: 1; }
}

/* /link-in-bio/account */
.ac-main { max-width: 640px; }
.ac-card { margin: 16px 0; padding: 16px 20px; border: 1px solid var(--s-line); border-radius: 20px; background: var(--s-card); }
.ac-code { font: 600 1.375rem "Geist", sans-serif; letter-spacing: 0.2em; max-width: 14ch; }
.ac-who { font-weight: 700; }
.ac-list { list-style: none; margin: 0; padding: 0; }
.ac-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--s-line); }
.ac-list li:first-child { border-top: 0; }
.ac-list li span { flex: 1 1 12rem; overflow-wrap: anywhere; }
.ac-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-linkbtn { padding-inline: 0; text-align: start; }
.ac-receipt { white-space: pre-line; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.ac-pick { margin: 0; padding: 0; border: 0; min-width: 0; }
.ac-pick legend { margin-top: 0; padding: 0; }
.ac-pick label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--s-line); overflow-wrap: anywhere; cursor: pointer; }
.ac-pick label:first-child { border-top: 0; }
.ac-pick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--s-ink); }
.ac-google { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; border: 1px solid #747775; border-radius: 999px; background: #fff; color: #1f1f1f; font: 500 0.9375rem "Roboto", "Geist", sans-serif; text-decoration: none; }
.ac-google:hover { background: #f2f2f2; }
.ac-google:focus-visible { outline: 3px solid var(--s-focus); outline-offset: 2px; }
.ac-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; color: var(--s-muted); font-size: 0.875rem; }
.ac-or::before, .ac-or::after { content: ""; flex: 1; border-top: 1px solid var(--s-line); }

/* account page: Statistics and Trackable codes cards (bio/stats.js) */
.st-feat { margin: 12px 0; padding-inline-start: 1.25rem; }
.st-feat li { margin: 4px 0; }
.st-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.st-pickbox { flex: 1 1 14rem; min-width: 0; }
.st-periods { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-periods .ed-btn { min-height: 44px; padding: 8px 14px; }
.st-periods .ed-btn[aria-pressed="true"] { background: var(--s-ink); border-color: var(--s-ink); color: var(--s-bg); }
.st-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px; margin: 16px 0 0; }
.st-tile { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; background: var(--s-tint); }
.st-tile[data-k="scans"] { background: #fff1ea; }
.st-num { font: 700 2rem/1.1 "Bricolage Grotesque", sans-serif; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.st-label { font-size: 0.875rem; color: var(--s-muted); font-weight: 600; }
.st-fig { margin: 16px 0 0; }
.st-chart { display: block; width: 100%; height: 160px; border-bottom: 1px solid var(--s-line); }
.st-bar { fill: #929197; } /* 3:1 on white (WCAG 1.4.11), also the legend swatch */
.st-bar-scan { fill: var(--s-signal); }
.st-line { fill: none; stroke: var(--s-hot); stroke-width: 2; }
.st-axis { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--s-muted); margin-top: 4px; }
.st-panels { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 600px) { .st-panels { grid-template-columns: 1fr 1fr; } .st-panel--wide { grid-column: 1 / -1; } }
.st-panel { padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 14px; min-width: 0; }
.st-panel__h { margin: 0 0 8px; font: 700 0.9375rem "Bricolage Grotesque", sans-serif; }
.st-list { list-style: none; margin: 0; padding: 0; }
.st-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--s-line); }
.st-list li:first-child { border-top: 0; }
.st-k { overflow-wrap: anywhere; }
.st-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-meter { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--s-tint); overflow: hidden; }
.st-meter__fill { display: block; height: 100%; background: var(--s-signal); }
.st-d { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--s-muted); overflow-wrap: anywhere; }
.st-small { margin: 0; }
.cd-form { margin: 8px 0 4px; }
.cd-list { margin-top: 12px; }
.cd-list .cd-item { display: block; padding: 12px 0; }
.cd-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.cd-list .cd-off { flex: none; padding: 2px 8px; border-radius: 999px; background: #fdecea; color: var(--s-bad); font-size: 0.8125rem; font-weight: 600; }
.cd-links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; overflow-wrap: anywhere; }
.cd-links a { color: var(--s-ink); font-weight: 600; }
.cd-item .ac-row { margin-top: 8px; }
/* the chart's colours, shared by the legend and the totals tiles */
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--s-muted); }
.st-legend li, .st-label { display: inline-flex; align-items: center; gap: 6px; }
.st-sw { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.st-sw--visits { background: #929197; } /* = .st-bar */
.st-sw--scans { background: var(--s-signal); }
.st-sw--clicks { height: 3px; border-radius: 2px; background: var(--s-hot); }
/* account page: script-moved focus (tabindex=-1 text, after sign-in or a message) shows no ring; buttons and links keep theirs */
.ac [tabindex="-1"]:focus { outline: none; }
.st-tablebox { margin-top: 8px; font-size: 0.875rem; }
.st-tablebox summary { cursor: pointer; color: var(--s-muted); font-weight: 600; padding: 12px 0; } /* list-item: keeps the disclosure triangle */
.st-tablebox summary:focus-visible, .st-tablewrap:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 2px; border-radius: 6px; } /* >= 3:1 on the card */
.st-tablewrap { overflow-x: auto; max-height: 20rem; overflow-y: auto; }
.st-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.st-table th, .st-table td { padding: 4px 8px; text-align: end; border-bottom: 1px solid var(--s-line); white-space: nowrap; }
.st-table th[scope="row"], .st-table thead th:first-child { text-align: start; font-weight: 600; }
