/* lynkpin app UI: landing, sign up, log in, editor, stats, error pages.
   Tokens come from handoff/design/tokens/app.css. The first block keeps the prototype's token names. */

:root {
  color-scheme: light;
  --bg: #FFFAF4; --panel: #FFFFFF; --text: #2A0F2B; --muted: #6B5468; --border: #E8DACF; --accent: #4A1645; --danger: #B42318;
  --sunk: #F7EEE6; --border-strong: #9A8496; --on-accent: #FFFAF4; --accent-soft: #F1E2EE;
  --marigold: #F5A524; --on-marigold: #2A0F2B; --marigold-soft: #FDEBC6; --hibiscus: #C42A5E;
  --jade: #0B7258; --jade-soft: #D5F2E6; --danger-soft: #FDE3DF; --switch-off: #C9B8C6;
  --tab-blocks: #4A1645; --tab-look: #0B7258; --tab-settings: #263496; /* one colour for each editor tab, all 4.5:1 on paper */
  --logo-ink: #4A1645; --toast-bg: #2A0F2B; --toast-text: #FFFAF4;
  --font-display: "Bricolage Grotesque", "Noto Sans", system-ui, sans-serif;
  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Noto Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-sm: 8px; --radius-input: 12px; --radius-md: 14px; --radius-lg: 24px; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px #2a0f2b14, 0 2px 6px #2a0f2b0f;
  --shadow-lg: 0 6px 12px #2a0f2b14, 0 18px 40px -8px #2a0f2b2e;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--hibiscus);
  --tap: 44px; --button-h: 44px; --input-h: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1A0E1C; --panel: #251628; --text: #F8EEF4; --muted: #BBA6B8; --border: #3E2A41; --accent: #E0A9D6; --danger: #FF8A7A;
    --sunk: #140A15; --border-strong: #7E667C; --on-accent: #1A0E1C; --accent-soft: #3A2040;
    --marigold: #F7B23B; --marigold-soft: #43301A; --hibiscus: #FF7DA6;
    --jade: #4FD1A5; --jade-soft: #123A2E; --danger-soft: #4A1A16; --switch-off: #5A4558;
    --tab-blocks: #E0A9D6; --tab-look: #4FD1A5; --tab-settings: #A9B4FF;
    --logo-ink: #FFFAF4; --toast-bg: #3A2040; --toast-text: #F8EEF4;
    --shadow-sm: 0 1px 2px #00000080; --shadow-lg: 0 18px 40px -8px #000000cc;
  }
}
/* Chosen with the theme switch: the same dark values, whatever the device says. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1A0E1C; --panel: #251628; --text: #F8EEF4; --muted: #BBA6B8; --border: #3E2A41; --accent: #E0A9D6; --danger: #FF8A7A;
  --sunk: #140A15; --border-strong: #7E667C; --on-accent: #1A0E1C; --accent-soft: #3A2040;
  --marigold: #F7B23B; --marigold-soft: #43301A; --hibiscus: #FF7DA6;
  --jade: #4FD1A5; --jade-soft: #123A2E; --danger-soft: #4A1A16; --switch-off: #5A4558;
  --tab-blocks: #E0A9D6; --tab-look: #4FD1A5; --tab-settings: #A9B4FF;
  --logo-ink: #FFFAF4; --toast-bg: #3A2040; --toast-text: #F8EEF4;
  --shadow-sm: 0 1px 2px #00000080; --shadow-lg: 0 18px 40px -8px #000000cc;
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.theme-pick { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.theme-pick-label { padding: 4px 12px 0; color: var(--muted); font-size: 13px; }
.theme-pick-row { display: flex; gap: 4px; padding: 0 4px; }
.theme-pick button { flex: 1; min-height: var(--tap); padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--panel); color: var(--text); font-size: 14px; text-align: center; justify-content: center; }
.theme-pick button:hover { background: var(--sunk); }
.theme-pick button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 650; }
.acct-menu .theme-pick button { width: auto; }
.landing-foot .theme-pick { flex-direction: row; align-items: center; padding: 0; }
.landing-foot .theme-pick-label { padding: 0 4px 0 0; }
.landing-foot .theme-pick-row { padding: 0; }
.landing-foot .theme-pick button { flex: none; padding: 0 14px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/24px var(--font-sans); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
[hidden] { display: none !important; }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-full); z-index: 100; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font: 400 14px/20px var(--font-sans); }
.strong { font-weight: 700; }
.pad { padding: 48px 0; }
.handle { font: 500 14px/20px var(--font-mono); }
.handle.strong { font-weight: 600; font-size: 15px; }
.display-xl { font: 700 clamp(44px, 6vw, 80px)/0.98 var(--font-display); letter-spacing: -0.035em; }
.display { font: 700 clamp(30px, 4vw, 44px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.title { font: 700 clamp(26px, 3vw, 32px)/1.2 var(--font-display); letter-spacing: -0.01em; }
.heading { font: 650 20px/26px var(--font-display); }
.hint { font: 400 13px/18px var(--font-sans); color: var(--muted); margin-top: 6px; }

/* ---------- buttons, badges ---------- */
.btn { min-height: var(--button-h); padding: 0 24px; border-radius: var(--radius-full); font: 600 15px/20px var(--font-sans); border: 1.5px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn svg { flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); color: var(--on-accent); }
.btn-quiet { background: var(--panel); color: var(--text); border-color: var(--border-strong); }
.btn-quiet:hover { background: var(--sunk); color: var(--text); }
.btn-tip { background: var(--marigold); color: var(--on-marigold); }
.btn-tip:hover { background: color-mix(in srgb, var(--marigold) 90%, #000); color: var(--on-marigold); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-quiet { background: var(--panel); color: var(--danger); border-color: var(--danger); }
.btn-danger-quiet:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], button[disabled] { opacity: .55; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 600 11px/16px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent); }
.badge-pinned { background: var(--marigold); color: var(--on-marigold); }
.badge-ok { background: var(--jade-soft); color: var(--jade); }
.pill-badge { display: inline-block; font: 600 12px/16px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--radius-full); background: var(--marigold); color: var(--on-marigold); }
.icon-well { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; flex: none; }

/* ---------- forms ---------- */
.stack { display: flex; flex-direction: column; gap: 18px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field > label, .lbl, legend { font: 600 14px/20px var(--font-sans); margin-bottom: 6px; display: block; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; min-height: var(--input-h); padding: 0 14px; border-radius: var(--radius-input); border: 1.5px solid var(--border-strong); background: var(--panel); color: var(--text); font: 400 16px/24px var(--font-sans);
}
textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239A8496' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
input.mono, .mono { font-family: var(--font-mono); font-size: 14px; }
input[aria-invalid=true], .is-invalid { border-color: var(--danger); }
.prefixed { display: flex; align-items: center; min-height: 52px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-input); background: var(--panel); padding-left: 16px; min-width: 0; }
.prefixed .handle { color: var(--muted); white-space: nowrap; }
.prefixed input { border: 0; background: transparent; min-height: 48px; padding-left: 0; border-radius: 0; box-shadow: none; min-width: 0; flex: 1; }
.prefixed:focus-within { box-shadow: var(--focus-ring); }
.prefixed.is-invalid { border-color: var(--danger); }
.prefixed input:focus-visible { box-shadow: none; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
input[type=color] { width: 44px; height: 44px; padding: 3px; border-radius: var(--radius-input); border: 1.5px solid var(--border-strong); background: var(--panel); cursor: pointer; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; line-height: 20px; }
.alert svg { flex: none; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--marigold-soft); color: var(--text); }
.alert-ok { background: var(--jade-soft); color: var(--jade); font-weight: 600; }
.alert a { color: inherit; font-weight: 700; }

/* switch */
.switch { width: 44px; height: 26px; border-radius: var(--radius-full); border: 0; background: var(--switch-off); position: relative; flex: none; padding: 0; transition: background .15s; }
.switch::before { content: ""; position: absolute; inset: -9px -2px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--on-accent); transition: transform .15s; }
.switch[aria-checked=true] { background: var(--accent); }
.switch[aria-checked=true]::after { transform: translateX(18px); }
.switch-hit { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: var(--tap); }
:root:not([data-theme="dark"]) .switch[aria-checked=false]::after { background: #fff; }

/* segmented control: hugs its content */
.seg { display: inline-flex; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: var(--radius-full); background: var(--sunk); border: 1px solid var(--border); }
.seg > button, .seg > a { min-height: 44px; padding: 0 16px; border-radius: var(--radius-full); border: 0; background: transparent; color: var(--text); font: 600 14px/20px var(--font-sans); display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.seg > [aria-pressed=true], .seg > [aria-current=true], .seg > [aria-checked=true] { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.section-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.section-card > h2 { font: 650 22px/28px var(--font-display); }
.well { background: var(--sunk); border-radius: var(--radius-md); padding: 14px 16px; }

/* toasts */
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: var(--toast-bg); color: var(--toast-text); border-radius: var(--radius-full); padding: 11px 20px; font: 500 14px/20px var(--font-sans); box-shadow: var(--shadow-lg); }
.toast svg { flex: none; }
.toast .ok { color: #4FD1A5; } .toast .bad { color: #FF8A7A; }
.toast button { background: none; border: 0; padding: 0 0 0 4px; color: var(--marigold); font-weight: 700; text-decoration: underline; min-height: 28px; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .2s ease-out; } @keyframes rise { from { transform: translateY(8px); opacity: 0; } } }

/* dialogs */
dialog.dlg { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--bg); color: var(--text); max-width: min(440px, calc(100vw - 32px)); width: 100%; box-shadow: var(--shadow-lg); }
dialog.dlg::backdrop { background: rgba(42, 15, 43, .55); }
.dlg-in { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg-head h2 { font: 650 22px/28px var(--font-display); }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--text); display: inline-grid; place-items: center; }
.qr-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; display: grid; place-items: center; }
.qr-box svg { width: min(260px, 100%); height: auto; }

/* logo (flips in dark mode) */
.logo .s { stroke: var(--logo-ink); }
.logo .f { fill: var(--logo-ink); }
.logo-rev .s { stroke: #FFFAF4; }
.logo-rev .f { fill: #FFFAF4; }

/* ---------- landing ---------- */
.landing-bar { background: var(--bg); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
html { scroll-padding-top: 96px; }
.landing-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.landing-nav { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.landing-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; min-height: var(--tap); display: inline-flex; align-items: center; }
.landing-nav a:not(.btn):hover { text-decoration: underline; }
.landing-nav a:not(.btn)[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav-menu-list a[aria-current] { background: var(--sunk); color: var(--accent); }
/* phones: the section links fold into a Menu button so the bar stays on one row */
.nav-menu { display: none; }
.nav-menu summary { list-style: none; cursor: pointer; min-height: var(--tap); min-width: var(--tap); display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: var(--radius-full); font-weight: 600; font-size: 14px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav-menu-list { position: absolute; right: 12px; top: calc(100% - 6px); min-width: 200px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 60; }
.nav-menu-list a { color: var(--text); text-decoration: none; font-weight: 500; min-height: var(--tap); display: flex; align-items: center; padding: 0 14px; border-radius: 12px; }
.nav-menu-list a:hover { background: var(--sunk); }
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .landing-bar-in { flex-wrap: nowrap; }
  .landing-nav { flex-wrap: nowrap; gap: 4px; }
}
@media (max-width: 480px) { .nav-login { display: none; } .landing-bar-in { padding-left: 12px; padding-right: 12px; } }
.nav-links { display: contents; }
@media (max-width: 640px) { .nav-links { display: none; } }
.hero { padding: 24px 0 72px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; padding: 24px 0; }
.hl { color: var(--hibiscus); }
.lede { font: 400 18px/28px var(--font-sans); color: var(--muted); max-width: 30em; }
.lede-sm { font-size: 16px; margin: 8px 0 32px; }
.claim { display: flex; gap: 12px; flex-wrap: wrap; width: 100%; max-width: 540px; }
.claim-field { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-full); background: var(--panel); }
.claim-field:focus-within { box-shadow: var(--focus-ring); }
.claim-field .handle { color: var(--muted); }
.claim-field input { border: 0; background: transparent; min-height: 48px; padding: 0; border-radius: 0; box-shadow: none; flex: 1; min-width: 0; font-weight: 600; }
.claim-field input:focus-visible { box-shadow: none; }
.hero-art { position: relative; min-height: 460px; display: grid; place-items: center; }
.blob { position: absolute; width: 360px; height: 360px; border-radius: 50%; background: var(--marigold); right: -60px; top: 50px; max-width: 80%; aspect-ratio: 1; }
.ring-deco { position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 14px solid var(--hibiscus); right: 6%; top: 8px; }
.phone-mock { position: relative; width: 252px; border: 9px solid #4A1645; border-radius: 38px; background: var(--bg); padding: 20px 12px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-lg); color: #2A0F2B; --bg: #FFFAF4; }
.pm-avatar { align-self: center; width: 54px; height: 54px; border-radius: 50%; background: #F5A524; border: 3px solid #4A1645; display: grid; place-items: center; font: 700 18px var(--font-display); }
.pm-name { text-align: center; font: 700 15px var(--font-display); }
.pm-handle { text-align: center; font-size: 10px; color: #6B5468; margin-bottom: 4px; }
.pm-link { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid #E8DACF; font: 600 11px var(--font-sans); }
.pm-pinned { background: #4A1645; color: #FFFAF4; border-color: #4A1645; }
.pm-tip { background: #FDEBC6; border-radius: 14px; padding: 10px; font-size: 11px; display: flex; flex-direction: column; gap: 6px; }
.pm-chips { display: flex; gap: 4px; } .pm-chips i { font-style: normal; font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #fff; border: 1px solid #9A8496; }
.pm-chips i.on { background: #4A1645; color: #fff; border-color: #4A1645; }
.pm-till { font-size: 11px; display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 10px; padding: 7px 10px; }
.pm-send { background: #F5A524; text-align: center; border-radius: 99px; padding: 7px; font-weight: 700; font-size: 11px; }
.toast-mock { position: absolute; right: 0; bottom: 28px; display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 12px; line-height: 16px; }
.tm-ok { width: 26px; height: 26px; border-radius: 50%; background: var(--jade-soft); color: var(--jade); display: grid; place-items: center; }
.section { padding: 72px 0; }
.section-panel { background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font: 650 18px/24px var(--font-display); }
.feature p { font-size: 14px; line-height: 20px; color: var(--muted); }
.feature-tip { background: var(--marigold-soft); border-color: var(--marigold); }
.feature-tip p { color: var(--text); }
.audiences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 32px 0 12px; }
.aud { border-radius: var(--radius-lg); padding: 20px; min-height: 200px; display: flex; flex-direction: column; gap: 6px; color: #FFFAF4; }
.aud h3 { font: 700 20px/26px var(--font-display); }
.aud-k { font: 600 11px/14px var(--font-sans); text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.aud-addr { margin-top: auto; font-size: 12px; }
.aud-plum { background: #4A1645; } .aud-indigo { background: #263496; } .aud-forest { background: #0F2016; }
.aud-forest .aud-k { color: #7FE0B5; }
.aud-marigold { background: #F5A524; color: #2A0F2B; }
.faq { max-width: 760px; margin: 32px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 20px; font: 650 17px/24px var(--font-display); border-radius: var(--radius-lg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.faq .faq-a { padding: 0 20px 18px; color: var(--muted); line-height: 24px; }
.faq .faq-a p + p { margin-top: 8px; }
.faq .faq-a a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.banner { background: #4A1645; color: #FFFAF4; border-radius: 28px; padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.banner-h span { color: #F5A524; }
.banner p { margin-top: 8px; max-width: 34em; opacity: .92; }
.landing-foot { border-top: 1px solid var(--border); padding: 24px 0; }
.landing-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 14px; }
.landing-foot a { color: var(--muted); }

/* ---------- sign up / log in ---------- */
.split { display: grid; grid-template-columns: minmax(300px, 36%) 1fr; min-height: 100vh; }
.split-side { background: #4A1645; color: #FFFAF4; position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.split-copy { position: relative; z-index: 1; max-width: 22em; }
.split-copy p { margin-top: 12px; font-size: 18px; line-height: 26px; opacity: .92; }
.blob-side { right: auto; left: 40%; top: auto; bottom: -230px; width: 420px; height: 420px; max-width: none; }
.ring-side { right: auto; left: 20%; top: auto; bottom: 200px; border-color: #FF8AB0; width: 64px; height: 64px; }
.split-main { padding: 48px 32px; display: flex; justify-content: center; align-items: flex-start; }
.split-form { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.presets { border: 0; padding: 0; margin: 0; min-width: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.preset { position: relative; display: block; }
.preset input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.preset-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 112px; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--border); font: 600 14px/18px var(--font-sans); }
.preset input:checked + .preset-card { background: var(--accent-soft); border: 2px solid var(--accent); padding: 11px; }
.preset input:checked + .preset-card .icon-well { background: var(--accent); color: var(--on-accent); }
.preset input:focus-visible + .preset-card { box-shadow: var(--focus-ring); }
.auth-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 36px 16px 48px; position: relative; gap: 28px; }
.deco-clip { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.auth-logo { position: relative; z-index: 1; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; }
.deco { position: absolute; border-radius: 50%; z-index: 0; }
.deco-a { width: 280px; height: 280px; background: #4A1645; right: -60px; top: 80px; }
.deco-b { width: 340px; height: 340px; background: var(--marigold); left: -90px; bottom: -150px; }

/* ---------- app bar ---------- */
.appbar { background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.appbar-in { max-width: 1360px; margin: 0 auto; padding: 0 32px; min-height: 68px; display: flex; align-items: center; gap: 24px; }
.appbar-logo { display: flex; align-items: center; min-height: 44px; }
.appnav { display: flex; gap: 4px; }
.appnav a { min-height: var(--tap); padding: 0 16px; display: inline-flex; align-items: center; border-radius: var(--radius-full); color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none; }
.appnav a[aria-current=page] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.acct { margin-left: auto; position: relative; }
.acct summary { list-style: none; cursor: pointer; border-radius: 50%; display: block; }
.acct summary::-webkit-details-marker { display: none; }
.avatar-chip { width: 44px; height: 44px; border-radius: 50%; background: var(--marigold); color: var(--on-marigold); display: grid; place-items: center; font: 700 15px var(--font-display); overflow: hidden; }
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }
.acct-menu { position: absolute; right: 0; top: 52px; z-index: 30; min-width: 220px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; }
.acct-name { font-weight: 700; padding: 8px 12px 0; }
.acct-handle { padding: 0 12px 8px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: 10px; border: 0; background: none; color: var(--text); text-align: left; font-size: 15px; text-decoration: none; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--sunk); }

/* ---------- editor ---------- */
.dash-main { max-width: 1360px; margin: 0 auto; padding: 24px 32px 120px; }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.ed-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ed-main.narrow { max-width: 880px; margin: 0 auto; width: 100%; }
.linkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-radius: var(--radius-full); background: var(--panel); border: 1px solid var(--border); }
.linkbar .handle { flex: 1 1 160px; min-width: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.save-state[data-state=saved] { color: var(--jade); }
.save-state[data-state=error] { color: var(--danger); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { --tab: var(--accent); min-height: var(--tap); padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; background: transparent; color: var(--tab); font: 500 15px var(--font-sans); margin-bottom: -1px; }
.tabs button[data-tab=blocks] { --tab: var(--tab-blocks); }
.tabs button[data-tab=look] { --tab: var(--tab-look); }
.tabs button[data-tab=settings] { --tab: var(--tab-settings); }
.tabs button { border-bottom-color: color-mix(in srgb, var(--tab) 35%, transparent); }
.tabs button[aria-selected=true] { font-weight: 650; border-bottom-color: var(--tab); background: color-mix(in srgb, var(--tab) 10%, transparent); }
.welcome { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--marigold-soft); border-radius: var(--radius-lg); padding: 16px 20px; }
.welcome p { max-width: 44em; }
.addgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.addbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 84px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--panel); text-align: left; font: 600 13px/17px var(--font-sans); }
.addbtn:hover { border-color: var(--accent); }
.addbtn .icon-well { width: 32px; height: 32px; border-radius: 9px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-h h2 { font: 650 20px/26px var(--font-display); }
.blocklist { display: flex; flex-direction: column; gap: 10px; }
.brow { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; }
.brow.open { border: 2px solid var(--accent); }
.brow.dragging { opacity: .5; }
.brow.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.brow.drop-after { box-shadow: 0 3px 0 var(--accent); }
.brow-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 4px; min-height: 62px; }
.drag { width: 44px; min-height: 44px; border: 0; background: none; color: var(--border-strong); display: grid; place-items: center; cursor: grab; border-radius: 10px; flex: none; touch-action: none; }
.drag:active { cursor: grabbing; }
.brow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 4px 0; min-height: 44px; border-radius: 10px; }
.brow-text { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.brow-sub-wrap { display: flex; min-width: 0; }
.brow-title { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow-sub { display: block; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font: 600 12px/16px var(--font-sans); padding: 2px 10px 2px 8px; border-radius: var(--radius-full); background: var(--marigold-soft); color: var(--text); margin-top: 2px; }
.arrows { display: flex; gap: 0; flex: none; }
.arrows button { width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: 10px; display: grid; place-items: center; }
.arrows button:hover:not([disabled]) { background: var(--sunk); color: var(--text); }
.brow-body { padding: 16px 16px 16px 56px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.fgrid .field > label { font-size: 13px; margin-bottom: 4px; }
.fgrid input, .fgrid select { min-height: 44px; font-size: 14px; border-radius: 10px; }
.list-edit { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)) auto; gap: 8px; align-items: end; padding: 12px; background: var(--sunk); border-radius: var(--radius-md); }
.list-item input, .list-item select { min-height: 44px; font-size: 14px; border-radius: 10px; }
.disc { background: var(--sunk); border-radius: var(--radius-md); }
.disc > summary { list-style: none; cursor: pointer; padding: 0 16px; min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; border-radius: var(--radius-md); }
.disc > summary::-webkit-details-marker { display: none; }
.disc > summary::before { content: ""; border: 5px solid transparent; border-left: 8px solid currentColor; border-right: 0; transition: transform .15s; }
.disc[open] > summary::before { transform: rotate(90deg); }
.disc-in { padding: 0 16px 16px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.disc-in .field { flex-direction: row; align-items: center; gap: 8px; }
.disc-in .field > label { margin: 0; font-weight: 500; font-size: 14px; }
.disc-in input[type=date] { width: auto; min-height: 44px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-note { font-size: 13px; color: var(--muted); }

/* look tab */
.sub-h { font: 650 22px/28px var(--font-display); }
.avatar-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-big { width: 88px; height: 88px; border-radius: 50%; background: var(--marigold); color: var(--on-marigold); display: grid; place-items: center; font: 700 30px var(--font-display); overflow: hidden; flex: none; }
.avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.cover-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cover-thumb { width: 72px; height: 108px; border-radius: 14px; background: var(--sunk); border: 1px dashed var(--border); overflow: hidden; flex: none; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#cover-fade { width: 100%; min-height: 44px; accent-color: var(--accent); }
.counter { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--border); text-align: left; font: 600 13px/18px var(--font-sans); min-height: 44px; }
.swatch[aria-checked=true] { border: 2px solid var(--accent); background: var(--accent-soft); padding: 7px; }
.sw-chip { display: grid; grid-template-columns: 1fr 1fr; height: 58px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.sw-chip span { display: grid; place-items: center; }
.sw-chip i { width: 22px; height: 22px; border-radius: 50%; display: block; }
.swatch-custom { border-style: dashed; border-width: 1.5px; border-color: var(--border-strong); }
.sw-dots { height: 58px; border-radius: 10px; background: var(--sunk); display: flex; align-items: center; justify-content: center; gap: 4px; }
.sw-dots i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.sw-dots b { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 14px; line-height: 1; }
.opts-row { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-end; }
.accent-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.accent-row input[type=text] { width: 140px; font-family: var(--font-mono); font-size: 14px; }

/* phone preview */
.preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.preview-label { font: 600 12px/16px var(--font-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.phone { width: 100%; max-width: 360px; height: min(720px, calc(100vh - 80px)); min-height: 520px; border: 10px solid #2A0F2B; border-radius: 42px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.preview-fab { display: none; position: fixed; z-index: 40; left: 50%; bottom: 20px; transform: translateX(-50%); min-height: 52px; padding: 0 28px; border-radius: var(--radius-full); border: 0; background: #2A0F2B; color: #FFFAF4; font: 600 16px var(--font-sans); align-items: center; gap: 10px; box-shadow: var(--shadow-lg); }

/* settings */
.dns-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); }
.dns-table th, .dns-table td { text-align: left; padding: 10px 14px; vertical-align: middle; }
.dns-table th { font-weight: 600; }
.dns-wrap { overflow-x: auto; max-width: 100%; min-width: 0; border-radius: var(--radius-md); }
.dns-table { min-width: 420px; }
.disc, .disc-in, .section-card, .card { min-width: 0; }
.danger-zone { border: 2px solid var(--danger); background: var(--panel); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.danger-zone h2 { color: var(--danger); font: 650 22px/28px var(--font-display); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1 1 200px; }
.opt-row { display: flex; gap: 14px; align-items: flex-start; }
.opt-row b { display: block; font-size: 14px; }
.opt-row span { font-size: 13px; color: var(--muted); }

/* custom theme editor */
.custom-view { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; }
.cv-bar { display: flex; align-items: center; gap: 16px; padding: 12px 32px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
.cv-bar h2 { font: 700 22px/28px var(--font-display); margin-right: auto; }
.cv-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); background: none; border: 0; font-weight: 600; font-size: 14px; color: var(--text); }
.cv-body { max-width: 1360px; margin: 0 auto; padding: 24px 32px 80px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 8px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--panel); font: 600 13px var(--font-sans); }
.chip-btn i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); }
.chip-btn i b { width: 14px; height: 14px; border-radius: 50%; display: block; }
.photo-pick { display: flex; align-items: center; gap: 14px; background: var(--sunk); border-radius: var(--radius-md); padding: 14px 16px; flex-wrap: wrap; }
.photo-pick .avatar-big { width: 48px; height: 48px; font-size: 16px; }
.photo-pick div { flex: 1 1 200px; }
.colour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.colour { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-md); background: var(--sunk); }
.colour input[type=color] { width: 52px; height: 52px; flex: none; }
.colour .field { flex: 1; }
.colour input[type=text] { min-height: 40px; font-family: var(--font-mono); font-size: 14px; }
.colour label { margin-bottom: 4px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--sunk); border-radius: var(--radius-md); padding: 8px 14px 8px 8px; }
.check-row .aa { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 14px var(--font-display); flex: none; border: 1px solid var(--border); }
.check-row > span:nth-child(2) { flex: 1 1 120px; min-width: 0; }
.check-row .ratio { font: 500 14px var(--font-mono); margin-left: auto; }
.verdict { font: 600 12px/16px var(--font-sans); padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.verdict.ok { background: var(--jade-soft); color: var(--jade); }
.verdict.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- stats ----------
   (the dashboard pages share .dash) */
.stats { padding-top: 28px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.stats-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.stats-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi-l { font-size: 14px; color: var(--muted); }
.kpi-v { font: 700 40px/44px var(--font-display); letter-spacing: -.02em; }
.kpi-d { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-d.up { color: var(--jade); }
.kpi-d.down { color: var(--danger); }
.chart { padding: 24px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.k-views { background: var(--accent); } .k-clicks { background: var(--hibiscus); }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.chart-svg .axis { fill: var(--muted); }
.chart-svg .area { fill: var(--accent); opacity: .08; }
.chart-svg .l-views, .chart-svg .l-clicks { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .l-views { stroke: var(--accent); } .chart-svg .l-clicks { stroke: var(--hibiscus); }
.chart-svg .peak { fill: var(--accent); } .chart-svg .peak-t { fill: var(--text); }
.chart-narrow { display: none; }
.chart-table { margin-top: 12px; font-size: 14px; }
.chart-table summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.chart-table table { border-collapse: collapse; width: 100%; max-height: 300px; display: block; overflow: auto; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 12px; border-bottom: 1px solid var(--border); font-weight: 400; }
.panels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.bar-n { font-weight: 700; white-space: nowrap; }
.bar { height: 6px; border-radius: 3px; background: var(--sunk); margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.empty { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- errors, docs ---------- */
.err-bar { padding: 24px 32px; }
.err-main { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.err-code { font: 800 clamp(96px, 22vw, 168px)/1 var(--font-display); color: var(--accent); display: flex; align-items: center; gap: .04em; letter-spacing: -.04em; }
.err-o { width: .78em; height: .78em; border-radius: 50%; background: var(--marigold); display: inline-block; }
.err-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.doc-main { max-width: 680px; margin: 0 auto; padding: 8px 20px 80px; display: flex; flex-direction: column; gap: 14px; }
.doc-main ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-main .heading { margin-top: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .features, .audiences, .panels, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-body { grid-template-columns: minmax(0, 1fr); }
  .cv-body .preview { position: static; }
}
@media (max-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-art { min-height: 420px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-side { padding: 24px; min-height: 0; gap: 16px; }
  .split-copy .display { font-size: 28px; }
  .split-copy p { font-size: 16px; }
  .blob-side, .ring-side { display: none; }
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed .preview { display: none; }
  .ed.preview-open .preview { display: flex; position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: 16px; justify-content: center; overflow: auto; position: fixed; }
  .ed.preview-open .phone { height: calc(100vh - 140px); }
  .preview-fab { display: inline-flex; }
  .preview-close { display: inline-flex !important; }
  .dash-main { padding: 16px 16px 120px; }
  .appbar-in { padding: 0 16px; gap: 12px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .features, .audiences, .panels, .kpis { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 48px 0; }
  .banner { padding: 28px 24px; }
  .arrows { display: none; }
  .brow-main .icon-well { display: none; }
  .addgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .addbtn { align-items: center; text-align: center; min-height: 78px; padding: 10px 6px; }
  .brow-body { padding: 14px 12px; }
  .linkbar { border-radius: var(--radius-lg); padding: 14px; }
  .linkbar .btn { flex: 1 1 0; }
  .split-main { padding: 28px 16px; }
  .auth-card { padding: 24px 20px; }
  .chart-wide { display: none; } .chart-narrow { display: block; }
  .chart { padding: 16px; }
  .cv-bar, .cv-body { padding-left: 16px; padding-right: 16px; }
  .appbar-logo svg { width: 96px; height: auto; }
  .appnav a { padding: 0 10px; font-size: 14px; }
  .section-card, .danger-zone { padding: 18px; }
  .sub-h { font-size: 20px; }
  .hero-art { min-height: 380px; }
  .toast-mock { right: 0; }
  .landing-nav { gap: 4px 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.preview-close { display: none; }

/* ---------- agencies ---------- */
.acting-bar { position: sticky; top: 68px; z-index: 49; background: var(--accent); color: var(--on-accent); }
.acting-in { max-width: 1360px; margin: 0 auto; padding: 8px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.acting-in .handle { opacity: .85; margin-left: 6px; }
.acting-in .btn-quiet { background: var(--on-accent); color: var(--accent); border-color: transparent; }
.clients { display: flex; flex-direction: column; gap: 20px; padding-bottom: 48px; }
.client-list { display: flex; flex-direction: column; gap: 12px; }
.client { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 16px 20px; }
.client-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.client-main a { overflow-wrap: anywhere; }
.client-stats span { white-space: nowrap; }
.client-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.client-del summary { list-style: none; cursor: pointer; }
.client-del summary::-webkit-details-marker { display: none; }
.client-del[open] { flex-basis: 100%; }
.client-del form { margin-top: 10px; min-width: min(280px, 100%); }
@media (max-width: 720px) { .client { grid-template-columns: minmax(0, 1fr); } .client-actions { justify-content: flex-start; } .acting-in { padding: 8px 16px; } .acting-bar { top: 0; position: static; } }

.client-access form.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.client-del fieldset { border: 0; padding: 0; margin: 0; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- pricing ---------- */
.pricing { display: flex; flex-direction: column; gap: 8px; }
.pricing .lede-sm { margin: 0 auto 8px; max-width: 36em; }
.bill-toggle { align-self: center; display: inline-flex; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--panel); margin-bottom: 16px; }
.bill-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.bill-toggle label { min-height: 44px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: var(--radius-full); font-weight: 600; font-size: 14px; cursor: pointer; }
.bill-toggle input:checked + label { background: var(--accent); color: var(--on-accent); }
.bill-toggle input:focus-visible + label { box-shadow: var(--focus-ring); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1080px; margin: 0 auto; width: 100%; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan h3 { font: 700 24px/1.2 var(--font-display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-price b { font: 700 40px/1.1 var(--font-display); letter-spacing: -.02em; }
.plan-price span { color: var(--muted); font-size: 15px; }
.plan-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; flex: 1; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 22px; }
.plan-list svg { flex: none; margin-top: 2px; color: var(--jade); }
.plan-pro { border: 2px solid var(--marigold); background: var(--marigold-soft); }
.plan-pro .plan-list svg { color: var(--text); }
.plan-agency { border: 2px solid var(--accent); }
.pricing:has(#bill-y:checked) .p-monthly, .pricing:not(:has(#bill-y:checked)) .p-yearly { display: none; }
.free-here { max-width: 1080px; margin: 24px auto 8px; width: 100%; background: #4A1645; color: #FFFAF4; border-radius: 28px; padding: 28px 32px; }
.free-here h3 { font: 700 20px/1.3 var(--font-display); margin-bottom: 14px; }
.free-here ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.free-here li { display: flex; flex-direction: column; gap: 4px; }
.free-here li span { opacity: .9; font-size: 14px; line-height: 20px; }
@media (max-width: 960px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }
@media (max-width: 720px) { .free-here ul { grid-template-columns: minmax(0, 1fr); } .plan { padding: 22px; } .free-here { padding: 24px 22px; } }
.pro-tag { margin-left: 6px; font: 700 10px/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 99px; background: var(--marigold); color: #2A0F2B; }

/* ---------- plan and billing ---------- */
.pick-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--panel); cursor: pointer; min-height: var(--tap); }
.pick:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.pick input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pick small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.pick-sm { display: inline-flex; }
.order-list { display: flex; flex-direction: column; gap: 4px; }
.order-list li { display: grid; grid-template-columns: 9em 1fr auto auto; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
@media (max-width: 600px) { .order-list li { grid-template-columns: 1fr auto; } }
.card-pay { border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- account security ---------- */
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; background: var(--sunk); border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; font-weight: 600; }
.activity { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; }
.activity li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border-bottom: 0; }
@media (max-width: 420px) { .recovery-codes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- admin ---------- */
.admin { display: flex; flex-direction: column; gap: 20px; padding-bottom: 48px; }
.admin-list { display: flex; flex-direction: column; }
.admin-list > li { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.admin-list > li:last-child { border-bottom: 0; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.admin-details { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); border-radius: var(--radius-md); padding: 10px 14px; }
.admin-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-act input { min-width: min(320px, 100%); }

.share-url { overflow-wrap: anywhere; user-select: all; }

/* stats: map and geography tables */
:root { --m0: var(--sunk); --m1: #E9D2E4; --m2: #CFA2C7; --m3: #A9689D; --m4: #7B3772; --m5: #4A1645; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m1: #4A2A4E; --m2: #7A4A80; --m3: #A874AE; --m4: #D19BCF; --m5: #F2C6EE; } }
:root[data-theme="dark"] { --m1: #4A2A4E; --m2: #7A4A80; --m3: #A874AE; --m4: #D19BCF; --m5: #F2C6EE; }
.map-fig { margin: 0 0 20px; }
.map-svg { display: block; width: 100%; height: auto; max-height: 560px; }
.map-svg path { stroke: var(--border-strong); stroke-width: .5; stroke-linejoin: round; fill: var(--m0); }
.map-svg path.m1 { fill: var(--m1); } .map-svg path.m2 { fill: var(--m2); } .map-svg path.m3 { fill: var(--m3); } .map-svg path.m4 { fill: var(--m4); } .map-svg path.m5 { fill: var(--m5); }
.map-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.map-legend i { width: 28px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--border-strong); }
.map-legend i.m1 { background: var(--m1); } .map-legend i.m2 { background: var(--m2); } .map-legend i.m3 { background: var(--m3); } .map-legend i.m4 { background: var(--m4); } .map-legend i.m5 { background: var(--m5); }
.geo-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.geo-table th, .geo-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.geo-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.geo-table tbody th { font-weight: 500; }
@media (max-width: 420px) { .geo-table { font-size: 13px; } .geo-table th, .geo-table td { padding: 10px 4px; } }
