.lp-nav-toggle-input{display:none!important;position:absolute;pointer-events:none}.lp-nav-backdrop{display:none;position:fixed;inset:0;z-index:25;background:rgba(0,0,0,.4)}@media(max-width:900px){.lp-nav-toggle-input:checked~.lp-nav-backdrop{display:block}.lp-nav-toggle-input:checked~.lp-nav-links{display:flex!important}}@media(max-width:768px){.lp-nav-item:focus-within .lp-mega-menu{display:block!important;position:static!important;transform:none!important;opacity:1!important;visibility:visible!important;box-shadow:none!important;border:none!important;padding:0!important;background:rgba(0,0,0,.02)!important;border-radius:var(--r-sm)!important;margin:0 8px 8px 8px!important;width:auto!important}.lp-nav-item:focus-within .lp-mega-grid{grid-template-columns:1fr!important;padding:4px!important;gap:2px!important}}

body {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: auto !important;
  box-sizing: border-box;
}
/* Drop any inline grid-row placements that leave empty rows behind —
   sections always auto-flow vertically, only their column placement
   is user-controlled. */
body > * {
  min-width: 0; min-height: 0;
  grid-column: 1 / -1;
  grid-row: auto !important;
  max-width: 100%;
}
/* Media never overflows its container on a narrow viewport. */
body img, body video, body iframe, body svg {
  max-width: 100%;
  height: auto;
}
/* Mirrors the editor preview's mobile chrome (page_editor_controller.js
   GRID_CSS @media block) so what the owner sees in the iframe is what
   phone visitors see. The corpus's per-section CSS rarely ships its own
   mobile rules; these blanket overrides — !important so they win over
   the section-scoped class declarations — keep typography readable,
   padding sane, and inner grids / flex rows collapsed to a single
   column under 768px. */
@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr !important;
  }
  body > * {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  body > section {
    padding-left:  clamp(14px, 4vw, 28px) !important;
    padding-right: clamp(14px, 4vw, 28px) !important;
    padding-top:    clamp(28px, 7vw, 56px) !important;
    padding-bottom: clamp(28px, 7vw, 56px) !important;
  }
  body > section h1 {
    font-size: clamp(26px, 8vw, 40px) !important;
    line-height: 1.15 !important;
    word-wrap: break-word;
  }
  body > section h2 {
    font-size: clamp(22px, 6.5vw, 32px) !important;
    line-height: 1.2 !important;
  }
  body > section h3 {
    font-size: clamp(18px, 5vw, 24px) !important;
    line-height: 1.25 !important;
  }
  body > section[style*="grid"],
  body > section {
    grid-template-columns: 1fr !important;
  }
  body > section [style*="display: flex"],
  body > section [style*="display:flex"] {
    flex-wrap: wrap !important;
  }
}

/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-800:oklch(44.4% .177 26.899);--color-green-50:oklch(98.2% .018 155.826);--color-green-800:oklch(44.8% .119 151.328);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-900:oklch(35.9% .144 278.697);--color-purple-900:oklch(38.1% .176 304.987);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.flex-shrink,.shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-white{background-color:var(--color-white)}.from-purple-900{--tw-gradient-from:var(--color-purple-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-blue-900{--tw-gradient-via:var(--color-blue-900);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-indigo-900{--tw-gradient-to:var(--color-indigo-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-6{padding:calc(var(--spacing) * 6)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-green-800{color:var(--color-green-800)}.text-red-800{color:var(--color-red-800)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
/* ctrlsignal — friendly, light, Linear-meets-Notion
 * Type: Geist (UI), Instrument Serif (display moments), Geist Mono (telemetry)
 * Color: cool off-white backgrounds, muted ink, blue accent + emerald secondary
 */

:root {
  /* These are mirrored from React state via inline style on .app-root.
   * Defaults here are just so an unmounted page doesn't look broken. */
  --accent: #1F6FEB;
  --accent-soft: #1F6FEB1A;
  --accent-ink: #1448A5;
  --accent-shadow: rgba(31, 111, 235, 0.35);
  --accent-2: #10B981;
  --accent-2-soft: #10B98119;
  --accent-2-ink: #047857;
  --accent-2-shadow: rgba(16, 185, 129, 0.35);

  --bg: #F8FAFC;
  --bg-2: #EEF2F7;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E4E8EF;
  --line-strong: #CBD2DC;

  --ink: #0F172A;
  --ink-2: #2A3447;
  --ink-3: #5B6677;
  /* WCAG AA: ink-4 must clear ~4.5:1 against --bg (#F8FAFC). #6B7785 ≈ 4.6:1. */
  --ink-4: #6B7785;

  --good: #2F8F5C;
  --good-soft: #E5F2EB;
  --warn: #C77A14;
  --warn-soft: #F8EDDB;
  --bad: #C24A3D;
  --bad-soft: #F6E3DF;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-1: 0 1px 0 rgba(20,18,12,.04), 0 1px 2px rgba(20,18,12,.04);
  --shadow-2: 0 1px 0 rgba(20,18,12,.04), 0 6px 18px rgba(20,18,12,.08);
  --shadow-pop: 0 1px 0 rgba(20,18,12,.04), 0 18px 50px rgba(20,18,12,.14);

  /* density-driven */
  --pad: 14px;
  --row-h: 44px;
  --gap: 12px;
}

[data-density="compact"] {
  --pad: 10px;
  --row-h: 36px;
  --gap: 8px;
}
[data-density="comfy"] {
  --pad: 18px;
  --row-h: 52px;
  --gap: 16px;
}

/* Marketing site and auth flows (login, signup, password, OTP) use the emerald
   accent (var(--accent-2)) instead of the portal's blue. Scoped so the in-app
   surfaces (sidebar, settings, leads, etc.) keep the blue palette unchanged. */
.lp,
.auth-page {
  --accent:        var(--accent-2);
  --accent-soft:   var(--accent-2-soft);
  --accent-ink:    var(--accent-2-ink);
  --accent-shadow: var(--accent-2-shadow);
}

[data-theme="dark"] {
  --bg: #14130F;
  --bg-2: #1B1A15;
  --surface: #1E1C17;
  --surface-2: #232118;
  --line: #2E2B22;
  --line-strong: #3A372C;
  --ink: #F4F1E8;
  --ink-2: #D9D4C4;
  --ink-3: #9A958A;
  --ink-4: #6E6A5E;
  --good-soft: #1A2B22;
  --warn-soft: #2A2418;
  --bad-soft: #2A1C18;
  --shadow-1: 0 1px 0 rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.3);
  --shadow-2: 0 1px 0 rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.4);
  --shadow-pop: 0 1px 0 rgba(0,0,0,.3), 0 18px 50px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

/* ───── Accessibility primitives ───── */

/* Skip-to-content link — visually hidden until keyboard focus. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-sm);
  font-size: 13px;
  text-decoration: none;
  z-index: 1000;
  transform: translateY(-150%);
  transition: transform 120ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Visible focus ring on every interactive element. Browsers' default
   :focus-visible only fires for keyboard/AT focus, so mouse users don't
   see it. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.lp-nav-link:focus-visible,
.lp-nav-burger:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Honour the OS-level reduced-motion preference: kill our decorative
   animations and any long transitions. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.app-root {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
}

.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-feature-settings: "tnum"; }
.serif { font-family: "Instrument Serif", "Times New Roman", serif; font-style: italic; letter-spacing: -0.01em; }
.tnum { font-variant-numeric: tabular-nums; }

/* ───── Sidebar ───── */
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
/* Keycap wordmark: "ctrl" in a physical keycap pill (border + drop-shadow
   for depth) sitting next to "Signal" in Geist sans. Caller controls overall
   size via --brand-wordmark-size — everything inside scales from it so the
   mark holds together at 14px (footer) and 18px (auth shells) alike. */
.brand-wordmark {
  font-size: var(--brand-wordmark-size, 16px);
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.22em;
  /* Reserve room for the keycap's drop shadow so the wordmark sits in its
     box rather than overhanging the line below. */
  padding-bottom: 0.12em;
}
.brand-wordmark-key {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: currentColor;
  display: inline-block;
  /* Padding/radius/border/shadow are em-relative to the keycap's own
     font-size, so the pill stays in proportion as it scales. */
  padding: 0.33em 0.52em;
  border-radius: 0.286em;
  border: max(1px, 0.036em) solid currentColor;
  box-shadow: 0 0.12em 0 0 currentColor;
  line-height: 1;
}
.brand-wordmark-signal {
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: currentColor;
  line-height: 1;
}
.sb-brand-meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}
.sb-section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  padding: 12px 8px 4px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-2);
  cursor: default;
  user-select: none;
  border: 1px solid transparent;
}
.sb-item:hover { background: rgba(0,0,0,.04); }
[data-theme="dark"] .sb-item:hover { background: rgba(255,255,255,.04); }
.sb-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}
.sb-item svg { flex: 0 0 16px; opacity: .7; }
.sb-item.active svg { opacity: 1; color: var(--accent); }
.sb-app-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-2); cursor: default;
}
.sb-app-row:hover { background: rgba(0,0,0,.04); }
[data-theme="dark"] .sb-app-row:hover { background: rgba(255,255,255,.04); }
.sb-app-row.active { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.sb-dot.live { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.sb-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.sb-dot.down { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.sb-dot.draft { background: var(--ink-4); box-shadow: 0 0 0 3px rgba(0,0,0,.05); }

.sb-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--r-sm);
}
.sb-user:hover { background: rgba(0,0,0,.04); }
.sb-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #F4B5A8, #D88A6E);
  color: white; font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.sb-user-name { font-size: 13px; font-weight: 500; }
.sb-user-plan { font-size: 11px; color: var(--ink-3); }

/* ───── Topbar / page chrome ───── */
.page {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar-crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-3);
}
.topbar-crumbs .sep { color: var(--ink-4); }
.topbar-crumbs .here { color: var(--ink); font-weight: 500; }
.topbar-spacer { flex: 1; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  width: 220px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.topbar-search:hover { border-color: var(--line-strong); background: var(--surface-2); }
.topbar-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar-search-icon { color: var(--ink-4); flex: 0 0 auto; }
.topbar-search .kbd {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-4);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 4px;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.topbar-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 26px;
}
.topbar-user-email {
  font-size: 12px;
  color: var(--ink-2);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-signout {
  font-size: 11.5px;
  padding: 3px 10px;
  height: 24px;
  line-height: 1;
}
@media (max-width: 768px) {
  .topbar-user-email { display: none; }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-upgrade { text-decoration: none; }

.topbar-theme {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.topbar-theme:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}
.topbar-theme-icon { display: inline-flex; }

/* ───── Search modal ───── */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 24px 24px;
}
.search-modal[hidden] { display: none; }
.search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(640px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.search-input-icon { color: var(--ink-4); flex: 0 0 auto; }
.search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
}
.search-input::placeholder { color: var(--ink-4); }
.search-close {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-4);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  text-transform: lowercase;
}
.search-close:hover { color: var(--ink-2); border-color: var(--line-strong); }
.search-results {
  overflow-y: auto;
  padding: 8px 8px 12px;
}
.search-empty {
  padding: 28px 16px;
  text-align: center;
}
.search-empty-title { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.search-empty-hint { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; }
.search-group { padding: 6px 6px 4px; }
.search-group-title {
  margin: 8px 8px 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-4);
}
.search-list { list-style: none; margin: 0; padding: 0; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.search-item:hover { background: var(--bg-2); }
.search-item-emoji {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 13px;
  color: var(--ink-3);
  flex: 0 0 auto;
}
.search-item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.search-item-title {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-meta {
  font-size: 12px;
  color: var(--ink-4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-pill {
  font-size: 10.5px;
  color: var(--ink-4);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.content {
  padding: 28px;
  max-width: 1200px;
  width: 100%;
}
.content.wide { max-width: 100%; }

/* ───── Headings ───── */
.h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.h1 .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.h3 { font-size: 13.5px; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.lede { color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 12px;
}

/* ───── Buttons ─────
 * Unified system used in both the portal and the marketing site. Pill
 * shape + 1.5px border + font-weight 600 across all variants. The
 * `.accent` variant carries a chunky drop shadow that lifts on hover —
 * the shadow color tracks `--accent-ink` (dark blue in portal, dark
 * emerald in marketing/auth) so the same rules theme correctly under
 * every accent palette. */
.btn {
  appearance: none;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  user-select: none;
  white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .15s, transform .12s;
}
.btn:hover { background: var(--bg-2); }
.btn:active { transform: translateY(0.5px); }
.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 0 var(--accent-ink);
}
.btn.accent:hover {
  box-shadow: 0 6px 0 var(--accent-ink), 0 8px 22px var(--accent-shadow);
}
.btn.accent:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 var(--accent-ink);
}
.btn.ghost {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent-ink);
}
.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
[data-theme="dark"] .btn.ghost:hover { background: rgba(255,255,255,.06); }
.btn.lg { height: 44px; font-size: 14.5px; padding: 0 22px; }
.btn.sm { height: 26px; font-size: 12px; padding: 0 10px; gap: 4px; }
.btn.icon-only { width: 32px; padding: 0; justify-content: center; }
.btn.icon-only.sm { width: 26px; }

/* ───── Cards ───── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: var(--pad); }
.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-body { padding: 16px; }

/* ───── Status pill ───── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.good .dot { background: var(--good); animation: pulse 2.4s ease-in-out infinite; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.warn .dot { background: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.bad .dot { background: var(--bad); }
.pill.draft { background: var(--bg-2); color: var(--ink-3); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.accent .dot { background: var(--accent); }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: .65; }
}

/* ───── Stat tile ───── */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
}
.stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 6px;
}
.stat-unit { font-size: 14px; color: var(--ink-3); font-weight: 400; }
.stat-delta {
  font-size: 11.5px;
  display: inline-flex; align-items: center; gap: 3px;
}
.stat-delta.up { color: var(--good); }
.stat-delta.down { color: var(--bad); }
.stat-delta.flat { color: var(--ink-3); }

/* ───── Integrations list ───── */
.integration-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.integration-row {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  background: var(--surface);
}
.integration-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.integration-row-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ───── App grid card ───── */
.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: default;
  transition: box-shadow .15s, transform .12s, border-color .15s;
  box-shadow: var(--shadow-1);
}
.app-card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}
.app-card-head { display: flex; align-items: flex-start; gap: 12px; }
.app-thumb {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-2);
  display: grid; place-items: center;
  font-size: 18px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.app-card-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1.2; }
.app-card-url { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.app-card-spark { height: 36px; }

/* ───── Tables ───── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }

/* ───── Tabs ───── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}
.tabs > * { flex-shrink: 0; }
.tab {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: default;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tab .count {
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--ink-3);
}

/* ───── AI block ───── */
.ai-card {
  background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  gap: 12px;
  align-items: flex-start;
}
.ai-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  display: grid; place-items: center;
  flex: 0 0 26px;
  box-shadow: 0 4px 12px var(--accent-soft);
}
.ai-body { font-size: 13px; color: var(--ink); line-height: 1.5; }
.ai-body .ai-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-ink); margin-bottom: 4px;
}
.ai-body em { font-family: "Instrument Serif", serif; font-style: italic; color: var(--accent-ink); font-size: 14px; }

/* ───── Version timeline ───── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--line-strong);
}
.t-item {
  position: relative;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.t-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 3px var(--surface);
}
.t-item.live::before { background: var(--good); border-color: var(--good); }
.t-item.draft::before { background: var(--bg-2); }
.t-row { display: flex; align-items: center; gap: 10px; }
.t-title { font-weight: 500; font-size: 13.5px; }
.t-meta { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.t-meta .dot-sep { width: 2px; height: 2px; border-radius: 50%; background: var(--ink-4); }

/* ───── Form ───── */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field-label {
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  display: flex; align-items: center; gap: 4px;
}
.input {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}
.textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ───── Modal / sheet ───── */
.scrim {
  position: fixed; inset: 0;
  background: rgba(20, 18, 12, 0.45);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  z-index: 100;
  animation: fadeIn .18s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: pop .22s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes pop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet-head {
  padding: 18px 22px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.sheet-body {
  padding: 4px 22px 22px;
  overflow-y: auto;
}
.sheet-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; justify-content: flex-end;
  background: var(--bg-2);
}

/* ───── Onboarding ───── */
.onboarding {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  background: var(--bg);
  padding: 24px 20px 40px;
}
.onboarding-card {
  width: min(560px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 36px 36px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
.onboarding-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

/* ───── Logs ───── */
.log-stream {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 360px;
  overflow-y: auto;
  color: var(--ink-2);
}
.log-line { display: flex; gap: 12px; }
.log-time { color: var(--ink-4); flex: 0 0 70px; }
.log-level { flex: 0 0 50px; font-weight: 600; }
.log-level.info { color: var(--ink-3); }
.log-level.warn { color: var(--warn); }
.log-level.err { color: var(--bad); }
.log-msg { color: var(--ink-2); flex: 1; }

/* ───── Sparkline / chart helpers ───── */
.spark { display: block; width: 100%; height: 36px; }

/* ───── World map dots (live traffic) ───── */
.live-traffic {
  position: relative;
  background: var(--bg-2);
  border-radius: var(--r-lg);
  padding: 18px;
  border: 1px solid var(--line);
}
.lt-globe {
  width: 100%; height: 220px; position: relative;
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  background-image:
    radial-gradient(circle at 20% 30%, var(--bg-2) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, var(--bg-2) 0, transparent 40%);
}
.lt-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.lt-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .25;
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(.6); opacity: .35; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes dm8-spin {
  to { transform: rotate(360deg); }
}

/* ───── Diff display ───── */
.diff {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow: hidden;
}
.diff-line { padding: 1px 14px; display: flex; gap: 10px; }
.diff-line .ln { color: var(--ink-4); width: 24px; text-align: right; flex: 0 0 24px; }
.diff-line.add { background: var(--good-soft); color: var(--good); }
.diff-line.add::before { content: "+"; color: var(--good); width: 12px; flex: 0 0 12px; font-weight: 700; }
.diff-line.del { background: var(--bad-soft); color: var(--bad); }
.diff-line.del::before { content: "−"; color: var(--bad); width: 12px; flex: 0 0 12px; font-weight: 700; }
.diff-line.ctx { color: var(--ink-3); }
.diff-line.ctx::before { content: " "; width: 12px; flex: 0 0 12px; }

/* ───── Tooltip ───── */
.tip {
  position: absolute;
  background: var(--ink);
  color: var(--bg);
  font-size: 11.5px;
  padding: 5px 8px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
  transform: translate(-50%, -100%);
  margin-top: -6px;
}

/* ───── Layout helpers ───── */
.row { display: flex; align-items: center; gap: var(--gap); }
.col { display: flex; flex-direction: column; gap: var(--gap); }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { display: none; }
  .content { padding: 22px; }
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile drawer chrome — hidden on desktop, surfaced under 768px. */
.topbar-burger { display: none; }
.nav-backdrop  { display: none; }

@media (max-width: 768px) {
  .topbar-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--r-sm);
    color: var(--ink);
    cursor: pointer;
    flex: 0 0 36px;
  }
  .topbar-burger:hover { background: var(--bg-2); }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 40;
  }
  .app-root.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .app-root.nav-open { overflow: hidden; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 300px);
    flex: 0 0 auto;
    height: 100dvh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
  }
  .app-root.nav-open .sidebar { transform: translateX(0); }

  .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .topbar-spacer { display: none; }
  .topbar-crumbs { flex: 1; min-width: 0; font-size: 12.5px; }
  .topbar-actions { margin-left: auto; gap: 8px; }
  .content { padding: 16px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .h1 { font-size: 22px; }
  .onboarding { padding: 24px 14px; }
  .onboarding-card { padding: 20px 16px; gap: 16px; }

  /* Tables: scroll horizontally rather than squishing in their card. */
  .card { overflow-x: auto; }
  .table { min-width: 520px; }
}

.muted { color: var(--ink-3); }
.dim { color: var(--ink-4); }

/* ───── Page editor fullscreen ─────
   CSS overlay pinned below the app's sticky topbar so the user can keep
   navigating while editing. Inline !important styles are also applied from
   the controller (which measures the topbar height for `top`); this class
   keeps the descendant selectors below scoped. */

.page-editor--fullscreen {
  position: fixed !important;
  top: 0;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 9 !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--bg, #fff) !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.page-editor--fullscreen > .card-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

/* Collapse the page-list sidebar so the iframe spans the viewport.
   grid-template-rows: 1fr forces the row to fill the container height;
   without it the row is content-sized to the iframe's 480px min-height
   and the rest of the viewport renders as blank card background. */
.page-editor--fullscreen > div[style*="grid-template-columns"] {
  grid-template-columns: 0 1fr !important;
  grid-template-rows: 1fr !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
}
.page-editor--fullscreen > div[style*="grid-template-columns"] > div:first-child {
  display: none !important;
}
.page-editor--fullscreen iframe[data-page-editor-target="iframe"] {
  border-radius: 0 !important;
  border: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Fullscreen toggle in the editor toolbar — swap label/icon based on the
   current state. Pure CSS so the button stays in sync without a Stimulus
   round-trip. */
.pe-fs-toggle .pe-fs-enter,
.pe-fs-toggle .pe-fs-exit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pe-fs-toggle .pe-fs-exit { display: none; }
.page-editor--fullscreen .pe-fs-toggle .pe-fs-enter { display: none; }
.page-editor--fullscreen .pe-fs-toggle .pe-fs-exit { display: inline-flex; }

/* ───── Marketing landing page ───── */
.lp {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  /* Contain decorative absolute children (e.g. .lp-aurora) that bleed past
     the hero on narrow viewports. `clip` keeps the sticky nav working. */
  overflow-x: clip;
}
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(248, 250, 252, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lp-nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lp-nav-links { display: flex; align-items: center; gap: 4px; margin-left: 24px; }
.lp-nav-link {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.lp-nav-link:hover { color: var(--ink); background: rgba(0,0,0,.04); }

/* Mega Menu Styles */
.lp-nav-item { position: relative; }
.lp-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  width: 540px;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}
.lp-nav-item:hover .lp-mega-menu {
  opacity: 1;
  visibility: visible;
}
.lp-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lp-mega-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s ease;
}
.lp-mega-item:hover { background: var(--bg-2); }
.lp-mega-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.lp-mega-title { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.lp-mega-desc { font-size: 12px; color: var(--ink-4); line-height: 1.4; }
.lp-nav-dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: var(--r-sm);
}
.lp-nav-dropdown-toggle:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.lp-nav-dropdown-toggle svg { transition: transform 0.2s ease; }
.lp-nav-item.nav-item-open .lp-nav-dropdown-toggle svg { transform: rotate(180deg); }

.lp-nav-spacer { flex: 1; }
.lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.lp-nav-burger { display: none; }
.lp-nav-mobile-only { display: none; }

.lp-section { padding: 80px 28px; max-width: 1100px; margin: 0 auto; }
.lp-section.tight { padding: 56px 28px; }
.lp-section.flush { padding-top: 0; }

.lp-hero {
  padding: 82px 28px 72px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Aurora — soft blue→emerald gradient behind the hero, very subtle. */
.lp-aurora {
  position: absolute;
  inset: -120px -10% auto -10%;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 18% 22%, rgba(31, 111, 235, 0.18) 0%, transparent 60%),
    radial-gradient(50% 60% at 82% 30%, rgba(16, 185, 129, 0.16) 0%, transparent 60%),
    radial-gradient(45% 45% at 50% 80%, rgba(31, 111, 235, 0.10) 0%, transparent 60%);
  filter: blur(8px);
}
.lp-hero > * { position: relative; z-index: 1; }
.lp-headline {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 800px;
}
.lp-headline .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.lp-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 620px;
  margin: 0 0 32px;
}
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lp-cta-row .lp-trust {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-left: 4px;
}

/* Hero prompt form — Lovable-style textarea that captures the visitor's
   site brief and rides through signup into the AI starter questionnaire. */
.lp-hero-prompt {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 18px;
  max-width: 760px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 8px 24px -18px rgba(15, 23, 42, 0.18);
}
.lp-hero-prompt-input {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-1);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.lp-hero-prompt-input::placeholder { color: var(--ink-4); }
.lp-hero-prompt-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}
.lp-hero-prompt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lp-hero-prompt-tracks {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-4);
}
.lp-hero-prompt-track:first-child { color: var(--ink-3); }
.lp-hero-prompt-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.lp-hero-trust {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ink-4);
}
@media (max-width: 640px) {
  .lp-hero-prompt { padding: 14px; }
  .lp-hero-prompt-submit { width: 100%; justify-content: center; }
}

/* Hero device-frame stack — fanned, layered set of three site mocks. */
.lp-mock-stack {
  position: relative;
  margin: 64px auto 0;
  max-width: 1020px;
  isolation: isolate;
}
.lp-mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.lp-mock--front {
  position: relative;
  z-index: 3;
}
.lp-mock--back-1,
.lp-mock--back-2 {
  position: absolute;
  left: 50%;
  width: 78%;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  opacity: 0.92;
}
.lp-mock--back-1 {
  top: -34px;
  transform: translateX(-58%) rotate(-3.5deg);
  z-index: 1;
}
.lp-mock--back-2 {
  top: -22px;
  transform: translateX(-42%) rotate(3.5deg);
  z-index: 2;
}
.lp-mock-thumb {
  height: 130px;
  background-position: center;
  background-size: cover;
  position: relative;
}
.lp-mock-thumb .pill {
  position: absolute;
  top: 10px;
  right: 10px;
}
.thumb-promo {
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.22) 0%, rgba(16, 185, 129, 0.22) 100%),
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.8) 0 24%, transparent 25%),
    var(--surface);
}
.thumb-events {
  background:
    linear-gradient(160deg, rgba(16, 185, 129, 0.18) 0%, rgba(31, 111, 235, 0.18) 100%),
    repeating-linear-gradient(135deg, rgba(15,23,42,.04) 0 8px, transparent 8px 18px),
    var(--surface);
}
.thumb-main {
  background:
    linear-gradient(180deg, rgba(31, 111, 235, 0.20) 0%, transparent 70%),
    radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.18) 0%, transparent 50%),
    var(--surface);
}
.lp-mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.lp-mock-bar .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.lp-mock-url {
  flex: 1;
  text-align: center;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  max-width: 360px;
  margin: 0 auto;
}
.lp-mock-body {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 360px;
}
.lp-mock-prompt {
  padding: 28px 32px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-mock-prompt .ai-card { background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 120%); }
.lp-mock-result {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-mock-skeleton {
  height: 12px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.lp-mock-skeleton.lg { height: 20px; width: 70%; background: var(--line-strong); border-color: transparent; }
.lp-mock-skeleton.md { width: 90%; }
.lp-mock-skeleton.md.narrow { width: 78%; }
.lp-mock-skeleton.sm { width: 50%; }
.lp-mock-skeleton.tile { height: 60px; border-radius: 8px; width: auto; }

/* Mock helpers — replace one-off inline styles inside the hero device. */
.lp-hero-eyebrow { margin-bottom: 14px; }
.lp-mock-status {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
.lp-mock-cta { align-self: flex-start; margin-top: 4px; }
.lp-mock-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

/* Step list */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-1);
  position: relative;
}
.lp-step-num {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.lp-step-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.lp-step-body { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

/* Feature grid */
.lp-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lp-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-1);
}
.lp-feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  flex: 0 0 36px;
  font-size: 18px;
}
.lp-feature-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; margin-bottom: 4px; }
.lp-feature-body { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

/* Vibe-coding tool grid */
.lp-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.lp-tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-1);
}
.lp-tool-card--ghost {
  background: var(--bg-2);
  border-style: dashed;
  box-shadow: none;
}
.lp-tool-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid; place-items: center;
  flex: 0 0 32px;
}
.lp-tool-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.lp-tool-meta { font-size: 12px; color: var(--ink-3); }

/* Section header */
.lp-section-head { margin-bottom: 32px; max-width: 720px; }
.lp-section-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.lp-section-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.lp-section-title .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.lp-section-sub { font-size: 15.5px; color: var(--ink-3); line-height: 1.55; }

/* Lead-flow visual */
.lp-flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  box-shadow: var(--shadow-1);
}
.lp-flow-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.lp-flow-node .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); }
.lp-flow-node .name { font-weight: 600; font-size: 14px; }
.lp-flow-node .meta { font-size: 12px; color: var(--ink-3); }
.lp-flow-arrow {
  font-family: "Geist Mono", monospace;
  color: var(--ink-4);
  font-size: 18px;
}

/* Integrations row (legacy small pill row inside the leads flow — kept for any
   stray callers; the dedicated #integrations section uses lp-integration-grid). */
.lp-integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

/* Integrations section — chip grid + footnote. Matches the lp-section type
   scale so it slots between Leads and Agencies without visual surprises. */
.lp-integration-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.lp-integration-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 120ms ease, transform 120ms ease;
}
.lp-integration-chip:hover {
  border-color: var(--ink-4);
}
.lp-integration-chip.soon {
  color: var(--ink-3);
  background: var(--bg);
}
.lp-integration-chip.soon .lp-integration-icon { opacity: 0.75; }
.lp-integration-soon {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lp-integration-icon { flex: none; }
.lp-integration-footnote {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 640px;
}
.lp-inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) {
  .lp-integration-chip { height: 34px; padding: 0 13px; font-size: 13px; }
}

/* Pricing */
.lp-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-1);
  position: relative;
}
.lp-plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2);
}
.lp-plan-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.lp-plan-price {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.lp-plan-price .unit { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.lp-plan-tag {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.lp-plan-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-plan-list li {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 8px;
}
.lp-plan-list li::before {
  content: "✓";
  color: var(--good);
  font-weight: 700;
  flex: 0 0 14px;
}

/* Logo / who-it's-for strip under the hero */
.lp-logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 56px auto 0;
  font-size: 13px;
  color: var(--ink-4);
}
.lp-logo-strip-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-right: 6px;
}
.lp-logo-strip .dot-sep { color: var(--line-strong); }

/* Multi-site dashboard preview */
.lp-multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.lp-multi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.lp-multi-card:hover {
  box-shadow: var(--shadow-2);
}
.lp-multi-thumb {
  height: 130px;
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.lp-multi-thumb .pill {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

/* Static-screenshot gallery thumb: each demo ships a PNG at
   app/assets/images/marketing/demos/<id>.png. The image fills the 4:5 tile
   and is anchored top-left so the hero stays in frame as the column narrows. */
.lp-multi-thumb--frame {
  height: 130px;
  background: #fff;
}
.lp-multi-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Demo-tile cards are <a>s — kill default link styling and add a peek hint */
.lp-multi-card--demo {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.lp-multi-thumb-peek {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 3;
}
.lp-multi-card--demo:hover .lp-multi-thumb-peek { opacity: 1; }

/* Faux mini-hero shapes inside each demo thumb (eyebrow + 2 headline strips
   + CTA pill). Per-demo thumb classes below set the colours. */
.lp-mock-eyebrow,
.lp-mock-h,
.lp-mock-cta {
  position: absolute;
  display: block;
  border-radius: 3px;
}
.lp-mock-eyebrow { top: 30px; left: 16px; width: 56px;  height: 5px; opacity: 0.7; }
.lp-mock-h       { top: 46px; left: 16px; width: 168px; height: 9px; }
.lp-mock-h--short{ top: 62px; left: 16px; width: 110px; height: 9px; }
.lp-mock-cta     { top: 88px; left: 16px; width: 64px;  height: 18px; border-radius: 4px; }

/* Property advisory — onyx forest + brass accent (Hawthorn Estates) */
.thumb-demo-property {
  background: linear-gradient(135deg, #0E1F1A 0%, #1A3329 100%);
}
.thumb-demo-property .lp-mock-eyebrow { background: #C9A86A; opacity: 0.95; }
.thumb-demo-property .lp-mock-h       { background: #F4EFE5; }
.thumb-demo-property .lp-mock-cta     { background: #C9A86A; border-radius: 0; }
.thumb-demo-property::after {
  content: "";
  position: absolute;
  right: 10px; top: 14px; bottom: 14px;
  width: 38%;
  background: linear-gradient(135deg, #7B8E7E 0%, #3D5A4E 100%);
}

/* Fashion editorial — cream split with serif ink (Atelier Vienne) */
.thumb-demo-fashion {
  background: #EFEAE0;
}
.thumb-demo-fashion .lp-mock-eyebrow { background: #7A6F5C; }
.thumb-demo-fashion .lp-mock-h       { background: #1B1B1B; }
.thumb-demo-fashion .lp-mock-cta {
  background: transparent;
  height: 2px;
  width: 92px;
  border-radius: 0;
  border-bottom: 1px solid #1B1B1B;
  top: 102px;
}
.thumb-demo-fashion::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 42%;
  background: linear-gradient(180deg, #C8B89A 0%, #8A7A5C 100%);
  border-left: 1px solid #1B1B1B;
}

/* Hospitality — cinematic dark with brass accents (The Beaumont) */
.thumb-demo-hospitality {
  background:
    radial-gradient(circle at 75% 25%, rgba(201, 168, 106, 0.18), transparent 55%),
    linear-gradient(135deg, #1F2724 0%, #0A1311 100%);
}
.thumb-demo-hospitality .lp-mock-eyebrow { background: #C9A86A; }
.thumb-demo-hospitality .lp-mock-h       { background: #F4EFE5; }
.thumb-demo-hospitality .lp-mock-cta     { background: #F4EFE5; border-radius: 0; }
.thumb-demo-hospitality::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,19,17,0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

/* On the demo cards make pill sit slightly nicer above the dim hover overlay */
.lp-multi-card--demo .pill { box-shadow: 0 1px 0 rgba(15,23,42,.1); }

@media (max-width: 760px) {
  .lp-multi { grid-template-columns: repeat(2, 1fr); }
  .lp-tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .lp-multi { grid-template-columns: 1fr; }
}
.lp-multi-thumb--ghost {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(31,111,235,.04) 0 8px, transparent 8px 18px),
    var(--bg-2);
  color: var(--ink-4);
}
.ghost-plus {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 6px;
}
.ghost-text { font-size: 12px; color: var(--ink-3); }
.lp-multi-card--ghost {
  border-style: dashed;
  background: transparent;
}
.lp-multi-meta { padding: 12px 14px; }
.lp-multi-name {
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.lp-multi-name.muted { color: var(--ink-3); font-weight: 500; }
.lp-multi-url {
  font-size: 12px;
  color: var(--ink-3);
}
.lp-multi-url.muted { color: var(--ink-4); }

/* Small pill — used inside thumbnails */
.pill.sm {
  font-size: 10.5px;
  padding: 1px 7px;
  gap: 4px;
}
.pill.sm .dot { width: 5px; height: 5px; }

/* Sparkle animation on the AI mark — gentle pulse, never seizure-y */
.ai-mark.sparkle {
  animation: sparkle-pulse 2.6s ease-in-out infinite;
}
@keyframes sparkle-pulse {
  0%, 100% { transform: scale(1);   filter: drop-shadow(0 0 0 transparent); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 8px var(--accent-soft)); }
}

/* Product demo video — responsive 16:9 frame */
.lp-video {
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 8px;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-2, var(--accent)) 100%);
  box-shadow:
    0 0 0 1px var(--accent-soft),
    0 20px 60px -30px rgba(15, 23, 42, .45);
}
.lp-video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: calc(var(--r-lg) - 6px);
  background: #000;
}

/* Final CTA — soft blue→emerald gradient, very subtle */
.lp-final {
  text-align: center;
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%),
    linear-gradient(135deg, var(--accent-2-soft) 0%, transparent 70%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
  padding: 56px 28px;
  margin: 0 auto 80px;
  max-width: 1044px;
}
.lp-final h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.lp-final h2 .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.lp-final p {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

/* Agency CTA — softer callout within the For-agencies section, sits below
   the feature grid and frames the demo/quote contact action. */
.lp-agency-cta {
  text-align: center;
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%),
    linear-gradient(135deg, var(--accent-2-soft) 0%, transparent 70%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
  padding: 40px 28px;
  margin: 32px auto 0;
  max-width: 1044px;
}
.lp-agency-cta h3 { margin: 0 0 12px; }
.lp-agency-cta h3 .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.lp-agency-cta p {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.55;
}
.lp-agency-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.lp-footer {
  border-top: 1px solid var(--line);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.lp-footer-links { display: flex; gap: 16px; margin-left: auto; }
.lp-footer-links a { color: var(--ink-3); text-decoration: none; }
.lp-footer-links a:hover { color: var(--ink); }
.lp-footer-copyright { flex-basis: 100%; color: var(--ink-3); font-size: 12px; }

@media (max-width: 900px) {
  .lp-headline { font-size: 32px; }
  .lp-sub { font-size: 15.5px; }
  .lp-section, .lp-hero { padding: 56px 20px; }
  .lp-section-title { font-size: 26px; }
  .lp-final { padding: 40px 20px; margin: 0 16px 56px; }
  .lp-final h2 { font-size: 24px; }
  .lp-mock-body { grid-template-columns: 1fr; }
  .lp-mock-prompt { border-right: 0; border-bottom: 1px solid var(--line); }
  .lp-mock--back-1, .lp-mock--back-2 { display: none; }
  .lp-mock-stack { margin-top: 40px; }
  .lp-multi { grid-template-columns: repeat(2, 1fr); }
  .lp-steps, .lp-features, .lp-plans { grid-template-columns: 1fr; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-tools { grid-template-columns: 1fr; }
  .lp-flow { grid-template-columns: 1fr; }
  .lp-flow-arrow { transform: rotate(90deg); justify-self: center; }
  /* Marketing nav: collapse links + secondary CTA into a burger drop-down. */
  .lp-nav { padding: 12px 16px; gap: 8px; }
  .lp-nav-desktop-only { display: none !important; }
  .lp-nav-mobile-only  { display: block; }
  .lp-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 6px;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
  }
  .lp-nav.nav-open .lp-nav-links { display: flex; }
  .lp-nav-link {
    display: flex;
    align-items: center;
    padding: 12px;
    font-size: 14px;
    color: var(--ink);
    border-radius: var(--r-sm);
  }
  .lp-nav-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    font-size: 14px;
    color: var(--ink);
  }

  @media (max-width: 768px) {
    .lp-mega-menu { display: none; }
    .lp-nav-item:hover .lp-mega-menu { display: none; }
    .lp-nav-item.nav-item-open .lp-mega-menu { display: block; }
  }
  .lp-nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--r-sm);
    cursor: pointer;
    flex: 0 0 38px;
  }
  .lp-nav-burger:hover { background: var(--bg-2); }
  .lp-nav-actions .btn { padding: 6px 12px; font-size: 14px; }

  .lp-nav-item.nav-item-open .lp-mega-menu {
    display: block;
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0;
    background: rgba(0,0,0,0.02);
    border-radius: var(--r-sm);
    margin: 0 8px 8px 8px;
  }
  .lp-nav-item.nav-item-open .lp-mega-grid {
    grid-template-columns: 1fr;
    padding: 4px;
    gap: 2px;
  }
  .lp-mega-item {
    padding: 10px;
  }
  .lp-mega-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .lp-mega-title {
    font-size: 14px;
  }
  .lp-mega-desc {
    font-size: 14px;
  }
}

/* ───── Auth (Devise: sign in / sign up / password reset) ───── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: -180px -10% auto -10%;
  height: 620px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 18% 22%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
    radial-gradient(50% 60% at 82% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
  filter: blur(8px);
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.auth-brand-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.auth-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form .field { gap: 5px; }
.auth-submit {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }
.auth-link-inline { font-size: 12px; font-weight: 500; }
.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.auth-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
}
.auth-footnote {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.auth-fineprint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-4);
}

/* OAuth (Google / Apple) buttons + "or with email" divider */
.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-oauth-form { margin: 0; }
.auth-oauth-btn {
  width: 100%;
  justify-content: center;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.auth-oauth-btn:hover { background: var(--bg-2); }
.auth-oauth-btn-dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.auth-oauth-btn-dark:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  filter: none;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-divider-text {
  font-size: 11.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Devise error messages — give them card chrome */
#error_explanation,
.auth-form .field_with_errors {
  /* field_with_errors wraps inputs in dev; keep them inline */
}
#error_explanation {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--r-md, 10px);
  padding: 10px 12px;
  color: #B91C1C;
  font-size: 12.5px;
}
#error_explanation h2 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 4px;
}
#error_explanation ul { margin: 0; padding-left: 18px; }

@media (max-width: 480px) {
  .auth-card { padding: 22px 20px 20px; border-radius: var(--r-lg); }
  .auth-title { font-size: 20px; }
}

/* ───── Legal long-form pages (terms, privacy) ───── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 28px 96px;
  color: var(--ink);
}
.legal-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.legal-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 8px;
}
.legal-title .accent-italic {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.legal-meta {
  color: var(--ink-3);
  font-size: 13.5px;
  margin: 0 0 24px;
}
.legal-banner {
  background: linear-gradient(180deg, var(--warn-soft) 0%, transparent 100%);
  border: 1px solid var(--warn-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.legal-banner-mark {
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--warn);
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 24px;
}
.legal-toc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin: 0 0 40px;
}
.legal-toc-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-bottom: 8px;
}
.legal-toc ol {
  margin: 0; padding: 0; list-style: none;
  columns: 2;
  column-gap: 24px;
  font-size: 13px;
}
.legal-toc li { padding: 3px 0; break-inside: avoid; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--accent-ink); }
.legal-toc .num { color: var(--ink-4); margin-right: 6px; font-variant-numeric: tabular-nums; }

.legal-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
.legal-body h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 40px 0 12px;
  scroll-margin-top: 80px;
}
.legal-body h2 .num {
  color: var(--ink-4);
  font-weight: 500;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.legal-body h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 8px;
}
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin: 4px 0; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--accent); }
.legal-body code, .legal-body .placeholder {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 1px 6px;
  border-radius: 4px;
}
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 8px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.legal-body th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  padding: 8px 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.legal-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.legal-body tr:last-child td { border-bottom: 0; }

@media (max-width: 700px) {
  .legal { padding: 40px 20px 64px; }
  .legal-title { font-size: 30px; }
  .legal-toc ol { columns: 1; }
}

/* ───── Subscriptions / Plan & billing ───── */
.sub-page-head { margin-bottom: 24px; }
.sub-page-head .lede { margin-top: 4px; }
.sub-status-spacer { margin: 0 4px; color: var(--ink-4); }

.flash-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
}
.flash-card.flash-good {
  border-color: var(--good);
  background: var(--good-soft);
  color: var(--good);
}

.sub-plan-grid { margin-bottom: 24px; }

.plan-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1);
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan-price-amount {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.plan-price-unit { font-size: 13px; }
.plan-features {
  font-size: 13px;
  line-height: 1.8;
  padding-left: 0;
  list-style: none;
  flex: 1;
}
.plan-current-badge { align-self: flex-start; }
.plan-card-hint { font-size: 12px; line-height: 1.4; }
.plan-switch-form { width: 100%; }

.billing-card { padding: 20px; }
.billing-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.billing-card-text {
  flex: 1;
  min-width: 220px;
}
.billing-card-blurb {
  font-size: 13px;
  margin-top: 4px;
}
.billing-card-hint { font-size: 12.5px; }

.credits-card { padding: 20px; margin-bottom: 40px; }
.credits-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.credits-head-text { flex: 1; min-width: 220px; }
.credits-blurb { font-size: 13px; margin-top: 4px; }
.credits-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.credits-balance-num {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.credits-balance-unit { font-size: 13px; }
.credits-meter {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}
.credits-meter-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 240ms ease;
}
.credits-meta {
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.credits-packs-head { margin: 4px 0 12px; }
.credits-packs-grid { margin-bottom: 24px; }
.credits-topup-card { margin-bottom: 24px; }
.pack-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pack-rate { font-size: 12.5px; flex: 1; }

/* button_to wraps in <form>; this strips its default block margin so a
   form-as-button sits flush in a flex row. */
.inline-form { margin: 0; }

/* AI flow (starter form + generation status). The card padding and the
   bottom action row need to give phones some breathing room — the
   default 28px inline padding leaves only ~270px of usable width on a
   360px-wide viewport, and a horizontal back/primary button row can
   collide once the labels grow. */
.ai-card { padding: 28px; }

.ai-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.ai-competitor-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.ai-competitor-row .input { flex: 1 1 200px; min-width: 0; }

@media (max-width: 600px) {
  .ai-card { padding: 18px 16px; }

  .ai-actions { flex-direction: column-reverse; align-items: stretch; }
  .ai-actions .btn { width: 100%; justify-content: center; }

  .ai-competitor-row .btn { width: 100%; justify-content: center; }
}

/* Competitor chip list — built up by competitor_list_controller.js as
   the user adds reference URLs in the AI starter questionnaire. */
.competitor-chips {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.competitor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12.5px;
  max-width: 100%;
}
.competitor-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.competitor-chip-remove {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  padding: 0 6px;
  border-radius: 999px;
}
.competitor-chip-remove:hover { color: var(--ink); }

/* ───── Live log tail ───── */
.log-tab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1024px) {
  .log-tab-grid { grid-template-columns: 1fr; }
}

.log-tail {
  max-height: 540px;
  overflow-y: auto;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
}
.log-list { list-style: none; margin: 0; padding: 0; }
.log-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 5px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.log-row:last-child { border-bottom: none; }
.log-time {
  color: var(--ink-3);
  flex: 0 0 64px;
  font-variant-numeric: tabular-nums;
}
.log-pill {
  flex: 0 0 auto;
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-family: inherit;
  min-width: 38px;
  text-align: center;
}
.log-pill-info  { background: var(--accent-soft); color: var(--accent-ink); }
.log-pill-warn  { background: #FFE9C2;            color: #8A4B00; }
.log-pill-error { background: var(--bad-soft);    color: var(--bad); }
.log-kind { flex: 0 0 auto; color: var(--ink-2); font-weight: 500; }
.log-message {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-meta {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: 11.5px;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-row.log-level-error .log-message { color: var(--bad); }
.log-status.log-status-error { color: var(--bad); }
.log-empty { color: var(--ink-3); }

@media (max-width: 700px) {
  .log-row {
    flex-wrap: wrap;
    white-space: normal;
    padding: 6px 14px;
  }
  .log-message {
    flex: 1 1 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-top: 2px;
  }
  .log-meta {
    flex: 1 1 100%;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .log-tail { max-height: 60vh; }
}

@keyframes log-flash-fade {
  0%   { background: var(--accent-soft); }
  100% { background: transparent; }
}
.log-flash { animation: log-flash-fade 1.6s ease-out; }

.alert-rule .btn.sm { padding: 4px 10px; }

/* ─────────────────────────────────────────────────────────────
   Hero demo: animated form-fill → leads page (replaces lp-mock-stack)
   ───────────────────────────────────────────────────────────── */
.lp-demo {
  position: relative;
  margin: 56px auto 0;
  max-width: 880px;
  height: 460px;
  isolation: isolate;
}
.lp-demo-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--accent);
  z-index: 1;
}
.lp-demo-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  z-index: 2;
}
.lp-demo-card--site {
  left: 0;
  top: 16px;
  width: 360px;
  transform: rotate(-1.5deg);
}
.lp-demo-card--leads {
  right: 0;
  top: 70px;
  width: 360px;
  transform: rotate(1.5deg);
  animation: lp-demo-leads-wake 9s ease-in-out infinite;
}
.lp-demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.lp-demo-chrome .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.lp-demo-url-mono {
  flex: 1;
  text-align: center;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  max-width: 260px;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Site card body */
.lp-demo-site-body {
  position: relative;
  padding: 22px 24px 26px;
}
.lp-demo-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.lp-demo-h {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.lp-demo-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-demo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-demo-label {
  font-size: 10.5px;
  color: var(--ink-4);
  font-weight: 500;
}
.lp-demo-input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: "Geist Mono", monospace;
  font-size: 12.5px;
  color: var(--ink);
  min-height: 20px;
  display: flex;
  align-items: center;
}
.lp-demo-typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  vertical-align: bottom;
}
.lp-demo-typed--name  { animation: lp-demo-type-name  9s linear infinite; }
.lp-demo-typed--email { animation: lp-demo-type-email 9s linear infinite; }
@keyframes lp-demo-type-name {
  0%, 13%  { width: 0; animation-timing-function: steps(10, end); }
  29%      { width: 10ch; animation-timing-function: steps(1); }
  88%      { width: 10ch; }
  92%      { width: 0; }
  100%     { width: 0; }
}
@keyframes lp-demo-type-email {
  0%, 32%  { width: 0; animation-timing-function: steps(14, end); }
  46%      { width: 14ch; animation-timing-function: steps(1); }
  88%      { width: 14ch; }
  92%      { width: 0; }
  100%     { width: 0; }
}
.lp-demo-caret {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: var(--accent);
  margin-left: 1px;
  opacity: 0;
  animation: lp-demo-caret 9s steps(1) infinite;
}
@keyframes lp-demo-caret {
  0%, 12% { opacity: 0; }
  13%, 46% { opacity: 0.85; }
  47%, 100% { opacity: 0; }
}
.lp-demo-submit {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 4px;
  box-shadow: 0 0 0 0 rgba(31, 111, 235, 0);
  animation: lp-demo-submit 9s ease-in-out infinite;
}
@keyframes lp-demo-submit {
  0%, 49% { transform: scale(1); box-shadow: 0 0 0 0 rgba(31, 111, 235, 0); }
  51%     { transform: scale(0.94); box-shadow: 0 0 0 8px rgba(31, 111, 235, 0.18); }
  56%     { transform: scale(1);    box-shadow: 0 0 0 0 rgba(31, 111, 235, 0); }
  100%    { transform: scale(1); }
}

/* Animated cursor — moves from off-canvas into name → email → submit */
.lp-demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
  opacity: 0;
  animation: lp-demo-cursor 9s cubic-bezier(.5,.05,.5,.95) infinite;
}
@keyframes lp-demo-cursor {
  0%   { transform: translate(320px, 280px); opacity: 0; }
  4%   { transform: translate(320px, 280px); opacity: 0.9; }
  13%  { transform: translate(112px, 142px); opacity: 0.9; } /* name field */
  29%  { transform: translate(208px, 142px); opacity: 0.9; } /* end of name typing */
  32%  { transform: translate(112px, 192px); opacity: 0.9; } /* email field */
  46%  { transform: translate(232px, 192px); opacity: 0.9; } /* end of email typing */
  50%  { transform: translate( 56px, 240px); opacity: 0.9; } /* submit button */
  56%  { transform: translate( 56px, 240px); opacity: 0.9; } /* hold during click */
  62%  { transform: translate( 56px, 240px); opacity: 0;   }
  100% { transform: translate(320px, 280px); opacity: 0; }
}

/* Leads card body */
.lp-demo-leads-body {
  padding: 16px 18px 18px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
}
.lp-demo-leads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.lp-demo-leads-title {
  font-size: 13px;
  font-weight: 600;
}
.lp-demo-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
}
.lp-demo-lead-meta { display: flex; flex-direction: column; gap: 2px; }
.lp-demo-lead-name { font-size: 12.5px; font-weight: 500; }
.lp-demo-lead-email {
  font-size: 11px;
  color: var(--ink-3);
  font-family: "Geist Mono", monospace;
}
.lp-demo-lead--new {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 100%);
  animation: lp-demo-lead-new 9s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes lp-demo-lead-new {
  0%, 60%  { transform: translateY(-14px); opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
  62%      { transform: translateY(-14px); opacity: 0; }
  68%      { transform: translateY(0);     opacity: 1; max-height: 60px; padding-top: 9px; padding-bottom: 9px; border-width: 1px; }
  72%      { box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.18); }
  82%      { box-shadow: 0 0 0 0 rgba(31, 111, 235, 0); }
  92%      { transform: translateY(0);     opacity: 1; max-height: 60px; }
  100%     { transform: translateY(-14px); opacity: 0; max-height: 0; }
}

/* Leads card "wakes up" once the flow dot reaches it */
@keyframes lp-demo-leads-wake {
  0%, 60%  { transform: rotate(1.5deg) scale(1);   filter: saturate(0.6) brightness(0.98); }
  68%      { transform: rotate(1.5deg) scale(1.02); filter: saturate(1) brightness(1); }
  74%, 100% { transform: rotate(1.5deg) scale(1);   filter: saturate(1) brightness(1); }
}

/* Stack the cards vertically on small screens, drop the flow line */
@media (max-width: 720px) {
  .lp-demo {
    height: auto;
    margin-top: 36px;
  }
  .lp-demo-flow { display: none; }
  .lp-demo-card--site,
  .lp-demo-card--leads {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
  }
  .lp-demo-card--leads { margin-top: 16px; }
  .lp-demo-card--leads { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-demo-typed--name  { width: 10ch; animation: none; }
  .lp-demo-typed--email { width: 14ch; animation: none; }
  .lp-demo-cursor       { display: none; }
  .lp-demo-flow-dot     { display: none; }
  .lp-demo-submit       { animation: none; }
  .lp-demo-lead--new    { animation: none; transform: none; opacity: 1; }
  .lp-demo-card--leads  { animation: none; }
}

/* ───── Visual editor demo ───── */
.lp-editor-demo {
  position: relative;
  margin: 40px auto 0;
  max-width: 720px;
}
.lp-editor-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  isolation: isolate;
}
.lp-editor-body {
  position: relative;
  padding: 28px 32px 32px;
  min-height: 280px;
}
.lp-editor-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.lp-editor-target {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  margin: 4px 0 0 -12px;
  border-radius: 8px;
  border: 1.5px dashed transparent;
  animation: lp-editor-target 10s ease-in-out infinite;
}
@keyframes lp-editor-target {
  0%, 13%   { border-color: transparent; background: transparent; }
  18%, 92%  { border-color: var(--accent); background: var(--accent-soft); }
  96%, 100% { border-color: transparent; background: transparent; }
}
.lp-editor-headline {
  display: grid;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}
.lp-editor-text { grid-area: 1 / 1; }
.lp-editor-text--before { animation: lp-editor-before 10s ease-in-out infinite; }
.lp-editor-text--after  { opacity: 0; animation: lp-editor-after 10s ease-in-out infinite; }
@keyframes lp-editor-before {
  0%, 50%   { opacity: 1; }
  56%, 92%  { opacity: 0; }
  98%, 100% { opacity: 1; }
}
@keyframes lp-editor-after {
  0%, 50%   { opacity: 0; }
  56%, 92%  { opacity: 1; }
  98%, 100% { opacity: 0; }
}
.lp-editor-toolbar {
  position: absolute;
  top: -44px;
  left: 0;
  transform: translate(0, 6px) scale(0.97);
  transform-origin: left center;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  animation: lp-editor-toolbar 10s ease-in-out infinite;
}
.lp-editor-toolbar::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
  border-radius: 1px;
}
@keyframes lp-editor-toolbar {
  0%, 14%   { opacity: 0; transform: translate(0, 6px) scale(0.97); }
  20%, 92%  { opacity: 1; transform: translate(0, 0)   scale(1); }
  96%, 100% { opacity: 0; transform: translate(0, 6px) scale(0.97); }
}
.lp-editor-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 5px;
  color: var(--ink-2);
  line-height: 1;
}
.lp-editor-tool em { font-style: italic; }
.lp-editor-tool strong { font-weight: 700; }
.lp-editor-u { text-decoration: underline; text-underline-offset: 2px; }
.lp-editor-tool--icon { padding: 0; min-width: 26px; color: var(--ink-3); }
.lp-editor-tool--danger { color: var(--bad); }
.lp-editor-tool-sep {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 3px;
}
.lp-editor-tool--ai {
  color: var(--accent);
  padding: 0 8px;
  gap: 4px;
  font-weight: 600;
  border-radius: 5px;
  box-shadow: 0 0 0 0 rgba(31, 111, 235, 0);
  animation: lp-editor-ai-click 10s ease-in-out infinite;
}
.lp-editor-tool--ai .lp-editor-ai-mark { color: var(--accent); }
@keyframes lp-editor-ai-click {
  0%, 39% { background: transparent;            box-shadow: 0 0 0 0 rgba(31, 111, 235, 0);    transform: scale(1); }
  43%     { background: rgba(31, 111, 235, 0.14); box-shadow: 0 0 0 6px rgba(31, 111, 235, 0.18); transform: scale(0.94); }
  48%     { background: rgba(31, 111, 235, 0.06); box-shadow: 0 0 0 0 rgba(31, 111, 235, 0);    transform: scale(1); }
  92%     { background: rgba(31, 111, 235, 0.06); }
  96%, 100% { background: transparent; }
}

.lp-editor-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-block;
  margin: 0 1px;
}
.lp-editor-swatch--rainbow {
  background: conic-gradient(from 0deg, #ff5959, #ffbe0b, #5fd068, #4cc9f0, #A55B2D, #ff5959);
  margin-left: 3px;
  width: 18px;
  height: 18px;
}
.lp-editor-para {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 22px 0 18px;
  max-width: 520px;
}
.lp-editor-button-mock {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 500;
}
.lp-editor-cursor {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
  opacity: 0;
  animation: lp-editor-cursor 10s cubic-bezier(.5,.05,.5,.95) infinite;
  z-index: 3;
}
@keyframes lp-editor-cursor {
  0%   { transform: translate(560px, 300px); opacity: 0; }
  4%   { transform: translate(560px, 300px); opacity: 0.9; }
  12%  { transform: translate(180px, 110px); opacity: 0.9; }
  15%  { transform: translate(180px, 116px); opacity: 0.9; }
  18%  { transform: translate(180px, 110px); opacity: 0.9; }
  30%  { transform: translate(180px, 110px); opacity: 0.9; }
  40%  { transform: translate(244px,  50px); opacity: 0.9; }
  43%  { transform: translate(244px,  56px); opacity: 0.9; }
  48%  { transform: translate(244px,  50px); opacity: 0.9; }
  88%  { transform: translate(244px,  50px); opacity: 0.9; }
  96%  { transform: translate(560px, 300px); opacity: 0; }
  100% { transform: translate(560px, 300px); opacity: 0; }
}
@media (max-width: 720px) {
  .lp-editor-demo { margin-top: 28px; }
  .lp-editor-body { padding: 22px 22px 26px; min-height: 240px; }
  .lp-editor-headline { font-size: 18px; }
  .lp-editor-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-editor-target,
  .lp-editor-toolbar,
  .lp-editor-tool--ai,
  .lp-editor-text--before,
  .lp-editor-text--after,
  .lp-editor-cursor { animation: none; }
  .lp-editor-target       { border-color: var(--accent); background: var(--accent-soft); }
  .lp-editor-toolbar      { opacity: 1; transform: translate(-50%, 0) scale(1); }
  .lp-editor-text--before { opacity: 0; }
  .lp-editor-text--after  { opacity: 1; }
  .lp-editor-cursor       { display: none; }
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ───── Utility classes (added to remove inline styles) ───── */

/* Display */
.u-d-none      { display: none; }
.u-d-block     { display: block; }
.u-d-inline    { display: inline; }
.u-d-inline-block { display: inline-block; }
.u-d-inline-flex { display: inline-flex; }
.u-d-flex      { display: flex; }
.u-d-grid      { display: grid; }
.u-place-center { display: grid; place-items: center; }

/* Flex helpers */
.u-flex-col    { flex-direction: column; }
.u-flex-row    { flex-direction: row; }
.u-flex-wrap   { flex-wrap: wrap; }
.u-flex-nowrap { flex-wrap: nowrap; }
.u-items-start    { align-items: flex-start; }
.u-items-center   { align-items: center; }
.u-items-end      { align-items: flex-end; }
.u-items-baseline { align-items: baseline; }
.u-items-stretch  { align-items: stretch; }
.u-justify-start  { justify-content: flex-start; }
.u-justify-center { justify-content: center; }
.u-justify-end    { justify-content: flex-end; }
.u-justify-between { justify-content: space-between; }
.u-self-start  { align-self: flex-start; }
.u-self-center { align-self: center; }
.u-self-end    { align-self: flex-end; }
.u-grow-1      { flex: 1; }
.u-grow-1-min0 { flex: 1; min-width: 0; }
.u-shrink-0    { flex-shrink: 0; }
.u-basis-0     { flex-basis: 0; }

/* Gaps */
.u-gap-0   { gap: 0; }
.u-gap-2   { gap: 2px; }
.u-gap-3   { gap: 3px; }
.u-gap-4   { gap: 4px; }
.u-gap-6   { gap: 6px; }
.u-gap-8   { gap: 8px; }
.u-gap-10  { gap: 10px; }
.u-gap-12  { gap: 12px; }
.u-gap-14  { gap: 14px; }
.u-gap-16  { gap: 16px; }
.u-gap-18  { gap: 18px; }
.u-gap-24  { gap: 24px; }

/* Margins */
.u-m-0     { margin: 0; }
.u-mx-auto { margin-left: auto; margin-right: auto; }
.u-ml-auto { margin-left: auto; }
.u-mr-auto { margin-right: auto; }
.u-mt-auto { margin-top: auto; }
.u-mt-0  { margin-top: 0; }
.u-mt-2  { margin-top: 2px; }
.u-mt-4  { margin-top: 4px; }
.u-mt-6  { margin-top: 6px; }
.u-mt-8  { margin-top: 8px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-14 { margin-top: 14px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-18 { margin-top: 18px; }
.u-mt-20 { margin-top: 20px; }
.u-mt-24 { margin-top: 24px; }
.u-mt-28 { margin-top: 28px; }
.u-mt-32 { margin-top: 32px; }
.u-mb-0  { margin-bottom: 0; }
.u-mb-2  { margin-bottom: 2px; }
.u-mb-4  { margin-bottom: 4px; }
.u-mb-6  { margin-bottom: 6px; }
.u-mb-8  { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-12 { margin-bottom: 12px; }
.u-mb-14 { margin-bottom: 14px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-18 { margin-bottom: 18px; }
.u-mb-20 { margin-bottom: 20px; }
.u-mb-24 { margin-bottom: 24px; }
.u-mb-28 { margin-bottom: 28px; }
.u-mb-32 { margin-bottom: 32px; }
.u-ml-0  { margin-left: 0; }
.u-ml-4  { margin-left: 4px; }
.u-ml-8  { margin-left: 8px; }
.u-mr-0  { margin-right: 0; }

/* Padding */
.u-p-0   { padding: 0; }
.u-p-4   { padding: 4px; }
.u-p-6   { padding: 6px; }
.u-p-8   { padding: 8px; }
.u-p-10  { padding: 10px; }
.u-p-12  { padding: 12px; }
.u-p-14  { padding: 14px; }
.u-p-16  { padding: 16px; }
.u-p-18  { padding: 18px; }
.u-p-20  { padding: 20px; }
.u-p-24  { padding: 24px; }
.u-pt-0  { padding-top: 0; }
.u-pt-4  { padding-top: 4px; }
.u-pt-8  { padding-top: 8px; }
.u-pt-12 { padding-top: 12px; }
.u-pt-18 { padding-top: 18px; }
.u-pb-0  { padding-bottom: 0; }
.u-pb-8  { padding-bottom: 8px; }
.u-pb-12 { padding-bottom: 12px; }
.u-pb-16 { padding-bottom: 16px; }
.u-pl-0  { padding-left: 0; }
.u-pl-18 { padding-left: 18px; }

/* Width / sizing */
.u-w-full  { width: 100%; }
.u-w-auto  { width: auto; }
.u-h-full  { height: 100%; }
.u-min-w-0 { min-width: 0; }
.u-maxw-360  { max-width: 360px; }
.u-maxw-420  { max-width: 420px; }
.u-maxw-460  { max-width: 460px; }
.u-maxw-520  { max-width: 520px; }
.u-maxw-540  { max-width: 540px; }
.u-maxw-560  { max-width: 560px; }
.u-maxw-600  { max-width: 600px; }
.u-maxw-640  { max-width: 640px; }
.u-maxw-720  { max-width: 720px; }
.u-maxw-800  { max-width: 800px; }
.u-overflow-hidden { overflow: hidden; }

/* Text */
.u-text-left   { text-align: left; }
.u-text-center { text-align: center; }
.u-text-right  { text-align: right; }
.u-truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-nowrap      { white-space: nowrap; }
.u-pre-wrap    { white-space: pre-wrap; }
.u-break-word  { word-break: break-word; }

.u-fw-400 { font-weight: 400; }
.u-fw-500 { font-weight: 500; }
.u-fw-600 { font-weight: 600; }
.u-fw-700 { font-weight: 700; }

.u-fs-10    { font-size: 10px; }
.u-fs-10-5  { font-size: 10.5px; }
.u-fs-11    { font-size: 11px; }
.u-fs-11-5  { font-size: 11.5px; }
.u-fs-12    { font-size: 12px; }
.u-fs-12-5  { font-size: 12.5px; }
.u-fs-13    { font-size: 13px; }
.u-fs-13-5  { font-size: 13.5px; }
.u-fs-14    { font-size: 14px; }
.u-fs-15    { font-size: 15px; }
.u-fs-15-5  { font-size: 15.5px; }
.u-fs-16    { font-size: 16px; }
.u-fs-17    { font-size: 17px; }
.u-fs-18    { font-size: 18px; }
.u-fs-20    { font-size: 20px; }
.u-fs-22    { font-size: 22px; }

.u-lh-1-4  { line-height: 1.4; }
.u-lh-1-5  { line-height: 1.5; }
.u-lh-1-55 { line-height: 1.55; }

/* Colours */
.u-c-ink     { color: var(--ink); }
.u-c-ink-2   { color: var(--ink-2); }
.u-c-ink-3   { color: var(--ink-3); }
.u-c-ink-4   { color: var(--ink-4); }
.u-c-accent  { color: var(--accent); }
.u-c-good    { color: var(--good); }
.u-c-warn    { color: var(--warn); }
.u-c-bad     { color: var(--bad); }
.u-c-inherit { color: inherit; }

/* Backgrounds */
.u-bg-surface  { background: var(--surface); }
.u-bg-surface-2 { background: var(--surface-2); }
.u-bg-bg-2     { background: var(--bg-2); }
.u-bg-accent-soft { background: var(--accent-soft); }
.u-bg-bad-soft { background: var(--bad-soft); }

/* Borders */
.u-border     { border: 1px solid var(--line); }
.u-border-t   { border-top: 1px solid var(--line); }
.u-border-b   { border-bottom: 1px solid var(--line); }
.u-border-bad-soft { border-color: var(--bad-soft); }
.u-rounded-sm { border-radius: var(--r-sm); }
.u-rounded    { border-radius: var(--r); }
.u-rounded-lg { border-radius: var(--r-lg); }
.u-rounded-pill { border-radius: 999px; }

/* Misc */
.u-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.u-eyebrow-strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-3);
  display: block;
  margin-bottom: 6px;
}
.u-text-decoration-none { text-decoration: none; }
.u-cursor-default { cursor: default; }
.u-cursor-pointer { cursor: pointer; }
.u-pointer-events-none { pointer-events: none; }

/* Forms */
.u-form-inline-block > form,
form.u-form-inline-block { display: inline-block; margin: 0; }
.u-form-inline > form,
form.u-form-inline { display: inline; margin: 0; }

/* Disabled visual */
.u-disabled-soft { opacity: .5; }

/* Body scroll-lock helper (used while modals are open) */
.u-no-scroll { overflow: hidden; }

/* Divider line for inline keyboard / icon strips */
.u-vrule {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
  display: inline-block;
}

/* ───── Component-specific helpers (added to remove inline styles) ───── */

/* Sidebar app list (sidebar partial) */
.sb-app-list { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sb-app-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item.sb-new-app { color: var(--ink-3); margin-top: 4px; }
.sb-plan { font-size: 11.5px; padding: 8px 4px 0; }

/* App thumb glyph (uses currentColor) */
.app-thumb-glyph { color: var(--ink-3); }

/* App thumb size variants */
.app-thumb.lg {
  width: 48px; height: 48px;
  flex: 0 0 48px;
  font-size: 22px;
}
.app-thumb.sm {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  font-size: 14px;
}

/* Dashboard app card */
.dashboard-app-draft {
  padding: 12px 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* Apps index table */
.apps-index-row { cursor: default; }
.apps-index-name { font-weight: 500; }
.apps-index-name a { color: var(--ink); }
.apps-index-url { font-size: 11.5px; }

/* Lead actions form */
.la-form { display: flex; flex-direction: column; gap: 14px; }
.la-form-error {
  background: #FBE5E5;
  color: #B23A3A;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.la-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.la-form-field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.la-form-input,
.la-form-textarea,
.la-form-select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.la-form-textarea { font-family: inherit; }
.la-form-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.la-form-actions { display: flex; gap: 8px; }

/* Lead actions show */
.la-show-card { margin-bottom: 18px; }
.la-meta {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 18px;
  font-size: 13.5px;
}
.la-card-meta { font-size: 12px; }
.la-show-blurb { font-size: 13px; margin: 0 0 14px; }
.la-workflow-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.la-workflow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.la-workflow-text { flex: 1; }
.la-workflow-name { font-weight: 500; }
.la-workflow-meta { font-size: 11.5px; }
.la-workflow-empty {
  font-size: 13px;
  padding: 12px 0;
  text-align: center;
}

/* Lead actions index table */
.la-intro { font-size: 13px; margin: 0 0 18px; }
.la-table { width: 100%; font-size: 13.5px; }
.la-table thead tr {
  text-align: left;
  color: var(--ink-3);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.la-table th { padding: 10px 14px; }
.la-table td { padding: 10px 14px; }
.la-table tbody tr { border-top: 1px solid var(--line); }
.la-table .actions-col { text-align: right; }
.la-type-code { font-size: 12px; }
.pill.is-ready    { background: #E5F4EA; color: #3F7A36; border-color: transparent; }
.pill.needs-setup { background: #FBE5E5; color: #B23A3A; border-color: transparent; }
.la-empty { padding: 20px 0; text-align: center; }

/* Integrations index */
.integration-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 18px 22px;
}
.integration-summary-label {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.integration-summary-count {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.integration-summary-count .unit {
  font-size: 13px;
  font-weight: 400;
}
.integration-section { margin-bottom: 28px; }
.integration-section h2.h3 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.integration-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}
.integration-tile-head { display: flex; align-items: flex-start; gap: 12px; }
.integration-tile-logo-wrap {
  flex: 0 0 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.integration-tile-logo {
  border-radius: 10px;
  display: block;
}
.integration-tile-logo-fallback {
  background: var(--bg-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--line);
}
.integration-tile-text { flex: 1; min-width: 0; }
.integration-tile-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.integration-tile-title { margin: 0; font-size: 15.5px; }
.pill.unconnected {
  background: var(--bg-2);
  color: var(--ink-3);
}
.integration-tile-blurb { margin: 6px 0 0; font-size: 13px; line-height: 1.4; }
.integration-tile-when { font-size: 11.5px; margin: 6px 0 0; }
.integration-tile-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.integration-tile-coming { font-size: 12px; }
.integration-tile-token-panel { width: 100%; margin-top: 6px; }
.integration-tile-token-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.integration-tile-token-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.integration-tile-token-help { font-size: 12px; margin: 8px 0 0; }
.integration-foot-card {
  margin-top: 16px;
  padding: 16px 20px;
}
.integration-foot-card p { margin: 0; font-size: 13px; }

/* MCP integration: discovery card on /settings/integrations */
.integration-mcp-card {
  margin-top: 16px;
  margin-bottom: 24px;
  padding: 20px 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
.integration-mcp-card h2 { margin: 0 0 6px; }
.integration-mcp-card p  { margin: 0; font-size: 13.5px; max-width: 60ch; }

/* MCP setup page (/settings/mcp) */
.mcp-card { padding: 22px 24px; margin-bottom: 18px; }
.mcp-card h2 { margin: 0 0 8px; }
.mcp-card p  { margin: 0 0 12px; font-size: 13.5px; }
.mcp-card-foot { margin-top: 12px; font-size: 12.5px; }
.mcp-tool-list { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.mcp-tool-list li { margin-bottom: 4px; }
.mcp-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.mcp-endpoint-code,
.mcp-token-code,
.mcp-token-mask {
  flex: 1;
  min-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.5px;
  word-break: break-all;
  background: var(--surface-2);
  color: var(--ink);
}
.mcp-token-block { margin-bottom: 12px; }
.mcp-token-meta  { margin: 8px 0 0; font-size: 12px; }
.mcp-no-token    { font-size: 13px; margin: 0 0 12px; }
.mcp-inline-action {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.mcp-clients-blurb { margin-bottom: 14px; }
.mcp-client-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface-2);
}
.mcp-client-block[open] { background: var(--surface); }
.mcp-client-title {
  margin: 0;
  cursor: pointer;
  font-size: 14.5px;
}
.mcp-client-block p { margin: 10px 0; }
.mcp-snippet {
  background: #1B1B1B;
  color: #f5f5f5;
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 8px 0;
}
.mcp-snippet code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); white-space: pre; }
.mcp-generic-list { padding-left: 18px; margin: 8px 0; font-size: 13.5px; }
.mcp-generic-list li { margin-bottom: 4px; }
.mcp-foot-card { margin-top: 24px; }
.mcp-foot-card p { margin: 0; font-size: 13px; }
.u-form-zero-margin-inline > form,
form.u-form-zero-margin-inline { margin: 0; display: inline; }

/* Page editor — modal variants (specific z-index/background/padding) */
.pe-modal.is-ai-panel    { z-index: 60; background: rgba(0,0,0,.5); padding: 5vh 24px; }
.pe-modal.is-media       { z-index: 50; background: rgba(0,0,0,.5); padding: 5vh 24px; }
.pe-modal.is-pages-menu  { z-index: 65; background: rgba(0,0,0,.5); padding: 8vh 24px; }
.pe-modal.is-new-page    { z-index: 70; background: rgba(0,0,0,.5); padding: 8vh 24px; }

/* Page editor — font-family preview option (uses --option-font) */
.pe-font-option { font-family: var(--option-font); }

/* ───────────  Page editor  ─────────── */
.pe-card { overflow: hidden; }
.pe-exit-fullscreen {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;
  padding: 8px 14px;
  background: #1B1B1B;
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.pe-exit-fullscreen.is-active { display: inline-flex; }
.pe-card-head {
  gap: 12px;
  flex-direction: column;
  align-items: stretch;
}
.pe-head-text { min-width: 0; }
.pe-head-title-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.pe-head-title-row h3.h3 { margin: 0; }
.pe-active-page-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(165,91,45,0.10);
  color: #A55B2D;
  border: 1px solid rgba(165,91,45,0.25);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  max-width: 320px;
}
.pe-active-page-pill > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pe-head-blurb {
  font-size: 11.5px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pe-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
  padding-bottom: 2px;
}
.pe-head-actions > * { flex-shrink: 0; }
.pe-status-slot {
  font-size: 12px;
  display: inline-block;
  text-align: right;
  white-space: nowrap;
}
.pe-device-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.btn.pe-device-btn {
  border: 0;
  border-radius: 0;
  min-width: 36px;
  padding: 0 10px;
}
/* `.pe-action-btn` retired — its rules duplicated the base `.btn`
   (inline-flex + gap: 6px). Use plain `.btn` (or `.btn.danger` for the
   destructive variant). */
.btn.danger { color: var(--bad); border-color: var(--bad-soft); }
.pe-save-spinner {
  display: none;
  width: 13px; height: 13px;
}
.pe-save-spinner svg { animation: dm8-spin 0.8s linear infinite; }

.pe-iframe-wrap {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  position: relative;
  overflow: auto;
}
.pe-iframe {
  flex: 1;
  width: 100%;
  min-height: 480px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

/* Generic editor popover (display: none initially; JS positions it). */
.pe-popover {
  display: none;
  position: fixed;
  top: 0; left: 0;
  z-index: 36;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.pe-popover.lg-radius { border-radius: 10px; }
.pe-popover.show { display: block; }
.pe-popover.show-flex { display: flex; }
.pe-popover.size-section-picker { width: 280px; max-height: 560px; overflow-y: auto; }
.pe-popover.size-element-picker { width: 240px; max-height: 460px; overflow-y: auto; }
.pe-popover.size-fields-menu   { width: 280px; max-height: 380px; overflow-y: auto; }
.pe-popover.size-form-field    {
  width: 300px; padding: 12px;
  gap: 10px;
  flex-direction: column;
  z-index: 33;
}
.pe-popover.size-page-bg       {
  width: 280px; padding: 14px;
  gap: 12px;
  flex-direction: column;
  z-index: 35;
}
.pe-popover.size-rewrite       {
  min-width: 320px; max-width: 380px; padding: 8px;
  gap: 6px;
  flex-direction: column;
  align-items: stretch;
  z-index: 31;
}
.pe-popover.size-link {
  padding: 6px;
  gap: 6px;
  align-items: center;
  z-index: 31;
}
.pe-popover.size-event-trigger {
  width: 280px;
  flex-direction: column;
  gap: 0;
  z-index: 31;
}
.pe-event-trigger-types {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.pe-event-type-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 0;
}
.pe-event-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pe-event-row-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.pe-event-select { width: 100%; }
.pe-event-newtab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}

.pe-popover-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pe-popover-head strong { font-size: 13px; }
.pe-icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
  color: var(--ink-3);
  display: inline-flex;
  line-height: 1;
}
.pe-icon-btn.lg { padding: 6px; }

.pe-section-cat-btn,
.pe-element-btn {
  width: 100%;
  min-height: 64px;
  text-align: left;
  padding: 12px 14px;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: block;
}
.pe-section-cat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.pe-section-cat-name { font-size: 13px; font-weight: 500; }
.pe-section-cat-count { font-size: 10.5px; }
.pe-section-cat-blurb { font-size: 11.5px; line-height: 1.4; }
.pe-element-name { font-size: 13px; font-weight: 500; }
.pe-element-blurb { font-size: 11.5px; margin-top: 2px; }
.pe-empty-msg { padding: 14px; font-size: 12.5px; }

/* Section variants modal */
.pe-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,.45);
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 24px;
}
.pe-modal.is-open { display: flex; }
.pe-modal-card {
  background: var(--surface);
  border-radius: 12px;
  width: min(960px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pe-modal-card.narrow { width: min(560px, 100%); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.pe-modal-card.medium { width: min(720px, 100%); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.pe-modal-card.tall { max-height: 88vh; }
.pe-modal-card.image-modal { width: min(880px, 100%); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.pe-modal-card.pages-modal { width: min(520px, 100%); max-height: 76vh; border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.pe-modal-card.new-page-modal { width: min(440px, 100%); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.32); }

.pe-modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pe-modal-head.tall { padding: 16px 20px; align-items: flex-start; gap: 14px; }
.pe-modal-head.tall.center { align-items: center; }
.pe-modal-head h3.h3 { margin: 2px 0 0; font-size: 18px; }
.pe-modal-head h3.h3.sm { font-size: 17px; }
.pe-modal-head .modal-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pe-modal-head-text { min-width: 0; }
.pe-modal-head-text .ai-eyebrow {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pe-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pe-modal-section-grid {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-content: start;
}
.pe-ai-form {
  overflow-y: auto;
  padding: 18px 20px;
}
.pe-ai-form-status { font-size: 12.5px; margin-bottom: 14px; }
.pe-ai-form-fields { display: flex; flex-direction: column; gap: 14px; }
.pe-ai-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
}
.pe-ai-submit { display: inline-flex; align-items: center; gap: 6px; }

/* Section / image / floating toolbars */
.pe-floating-toolbar {
  display: none;
  position: fixed;
  top: 0; left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
  align-items: center;
  font-size: 13px;
}
.pe-floating-toolbar.show { display: flex; }
.pe-floating-toolbar.section-controls {
  z-index: 28;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.pe-floating-toolbar.format-toolbar {
  z-index: 30;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.pe-floating-toolbar.image-toolbar {
  z-index: 32;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}

.pe-tool-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.pe-tool-btn:hover { background: var(--bg-2); }
.pe-tool-btn.bold { font-weight: 700; }
.pe-tool-btn.italic { font-style: italic; }
.pe-tool-btn.underline { text-decoration: underline; }
.pe-tool-btn.danger { color: var(--bad); }
.pe-tool-btn.ai {
  gap: 4px;
  padding: 0 8px;
  color: var(--accent);
  font-weight: 500;
}

.pe-vrule {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}

.pe-toolbar-select {
  height: 28px;
  padding: 0 4px 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  font-family: inherit;
}
.pe-toolbar-select.font-family { max-width: 130px; }

.pe-button-style-row {
  display: none;
  align-items: center;
  gap: 4px;
}
.pe-button-style-row.show { display: inline-flex; }

/* Color swatches */
.pe-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  margin: 0 1px;
  background: var(--swatch, transparent);
}
.pe-swatch.bg-swatch { border-radius: 4px; }
.pe-swatch.transparent {
  background: repeating-linear-gradient(45deg, #f0f0f0 0 4px, #fff 4px 8px);
}
.pe-swatch-bg-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 0 2px;
  letter-spacing: .04em;
}
.pe-color-picker-label {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  background: conic-gradient(from 0deg, #ff5959, #ffbe0b, #5fd068, #4cc9f0, #A55B2D, #ff5959);
  margin-left: 2px;
  border: 1px solid var(--line);
}
.pe-color-picker-label.square { border-radius: 4px; }
.pe-color-picker-input {
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Inspector aside */
.pe-inspector {
  display: none;
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 900;
  width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  flex-direction: column;
}
.pe-inspector.show { display: flex; }
.pe-inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.pe-inspector-eyebrow {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pe-inspector-section-name {
  font-size: 13.5px;
  font-weight: 500;
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.pe-inspector-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pe-ins-label {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.pe-ins-label.flush { margin: 0; }
.pe-ins-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  font-family: inherit;
}
.pe-ins-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pe-ins-grid-2-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pe-ins-bg-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.pe-ins-color-input {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: var(--surface);
}
.pe-ins-image-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.pe-ins-image-actions .btn { gap: 6px; }
.pe-ins-image-actions .btn.fill { flex: 1; justify-content: center; }
.pe-ins-bg-preview {
  display: none;
  margin-top: 8px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2) center/cover no-repeat;
}
.pe-ins-overlay {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  flex-direction: column;
  gap: 8px;
}
.pe-ins-overlay.show { display: flex; }
.pe-ins-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pe-ins-overlay-value { font-size: 11px; }
.pe-ins-overlay-range { width: 100%; }
.pe-ins-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0;
  background: var(--swatch, transparent);
}
.pe-ins-swatch.transparent {
  background: repeating-linear-gradient(45deg, #f0f0f0 0 4px, #fff 4px 8px);
}
.pe-ins-align-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.pe-ins-align-btn {
  border: 0;
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--ink-2);
}

/* Link / rewrite popovers */
.pe-link-input {
  width: 260px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
}
.btn.pe-h28 { height: 28px; }

.pe-rewrite-blurb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 2px;
}
.pe-rewrite-input {
  resize: none;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.45;
}
.pe-rewrite-status {
  display: none;
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 0 2px;
}
.pe-rewrite-status.show { display: block; }
.pe-rewrite-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* Image toolbar input */
.pe-image-width-input {
  width: 70px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}
.pe-image-px { font-size: 11px; }

/* Form-field popover */
.pe-form-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pe-form-field-head strong { font-size: 13px; }
.pe-form-field-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.pe-form-options-row {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.pe-form-options-row.show { display: flex; }
.pe-form-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.pe-form-add-option {
  gap: 6px;
  align-self: flex-start;
}
.pe-form-options-label { margin: 0; }

/* Media library / page-bg / pages-menu modal contents */
.pe-modal-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.pe-hidden-input { display: none; }
.pe-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  min-height: 240px;
}
.pe-media-spinner { display: none; font-size: 12.5px; padding: 4px 0; }
.pe-media-spinner.show { display: block; }
.pe-media-empty {
  font-size: 13px;
  padding: 28px 0;
  text-align: center;
}
.pe-media-empty.hidden { display: none; }
.pe-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.pe-page-bg-section {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pe-page-bg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pe-page-bg-value { font-size: 11px; }
.pe-page-bg-range { width: 100%; }

/* Pages-menu modal & nested rows */
.pe-pages-modal-body {
  padding: 8px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pe-pages-row {
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
}
.pe-pages-row[data-depth] {
  padding-left: calc(12px + var(--depth, 0) * 18px);
}
.pe-pages-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.pe-pages-link .pe-pages-path {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pe-pages-size { font-size: 11px; white-space: nowrap; }
.pe-pages-delete-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
  color: var(--ink-3);
  display: inline-flex;
  opacity: .7;
  transition: opacity .12s, color .12s;
}
.pe-pages-delete-btn:hover { opacity: 1; color: var(--bad); }
.pe-pages-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* New page modal */
.pe-new-page-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pe-new-page-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.pe-new-page-input.mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.pe-new-page-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
}
.pe-new-page-help { font-size: 11px; margin-top: 4px; }
.pe-new-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.pe-new-page-actions .btn.icon-row { gap: 6px; }

/* Pages starter wizard */
.starter-intro { margin-bottom: 18px; width: 100%; }
.starter-intro h2.h2 { margin-bottom: 4px; }
.starter-intro .lede { font-size: 13px; }
/* Override .grid-2 so the starter tiles always span the full card width —
   one tile per row, 100% wide — instead of packing into a 2/3-column grid. */
.starter-grid-tight {
  gap: 14px;
  grid-template-columns: 1fr;
}
.starter-pick {
  text-decoration: none;
  color: inherit;
}
.starter-pick-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.starter-pick-row .app-card-name,
.starter-pick-row .app-card-url {
  overflow-wrap: anywhere;
}
.starter-pick-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex: 0 0 40px;
  font-size: 18px;
}
.starter-pick-arrow { color: var(--ink-3); font-size: 18px; }
.team-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.team-table th, .team-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.team-table th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.team-add-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.team-add-form .input { flex: 1; min-width: 200px; }
.team-invite-form { display: flex; flex-direction: column; gap: 14px; }
.team-invite-site-grid,
.team-invite-tab-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 6px; }
.team-invite-site-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.team-invite-site-row input { accent-color: var(--accent); }
.team-member-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.team-member-card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--bg-2); }
.team-member-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.team-member-actions { display: flex; align-items: center; gap: 8px; }
.team-member-body { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.team-member-section-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.team-member-tab-label { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-top: 4px; }
.team-member-tabs { margin-top: 8px; }
.team-member-tabs summary { cursor: pointer; font-size: 13px; color: var(--ink-3); list-style: none; padding: 4px 0; }
.team-member-tabs summary::-webkit-details-marker { display: none; }
.team-member-tabs summary strong { color: var(--ink-1); font-weight: 500; }
.team-member-tab-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.team-member-tab-form button { align-self: flex-start; }
.team-member-grants { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--bg-1); border-radius: var(--r); border: 1px solid var(--line); }
.team-member-grant { padding: 10px 12px; background: var(--bg-2); border-radius: var(--r); border: 1px solid var(--line); }
.team-member-grant-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.team-grant-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bg-1); border-radius: var(--r); border: 1px dashed var(--line); }
.team-grant-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-grant-form-row .input { flex: 1; min-width: 160px; }
.invite-step { padding: 16px 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.invite-step:first-of-type { border-top: 0; padding-top: 4px; }
.invite-step-head { display: flex; gap: 12px; align-items: flex-start; }
.invite-step-num { flex: 0 0 28px; height: 28px; width: 28px; border-radius: 999px; background: var(--accent-bg, #e8f0ff); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.invite-step-title { font-weight: 600; font-size: 15px; color: var(--ink-1); }
.invite-step-blurb { font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }
.starter-upload-label {
  display: block;
  cursor: pointer;
}
.starter-upload-drop {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 32px 24px;
  text-align: center;
  background: var(--bg-2);
}
.starter-upload-drop.tight { padding: 24px; }
.starter-upload-emoji { font-size: 22px; margin-bottom: 8px; }
.starter-upload-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.starter-upload-blurb {
  font-size: 12.5px;
  max-width: 380px;
  margin: 0 auto;
}
.starter-upload-blurb code { font-size: 11.5px; }
.starter-upload-input {
  margin-top: 14px;
}
.starter-upload-input input { display: inline-block; max-width: 100%; }
.starter-upload-summary {
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
}
.starter-upload-toggle {
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
}
.starter-upload-toggle .toggle-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.starter-source-row { font-size: 12px; margin-top: 8px; }
.starter-source-or {
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.starter-mt-12 { margin-top: 12px; }
.starter-ai-blurb { font-size: 13px; margin-bottom: 14px; }
.starter-ai-meta { font-size: 12px; margin-bottom: 10px; }
.starter-ai-step-blurb { font-size: 12px; margin-bottom: 14px; }
.starter-ai-help-line { font-size: 12px; margin-top: 8px; }
.starter-ai-question { margin-bottom: 16px; }
.starter-ai-question-label { margin-bottom: 8px; }
.starter-ai-question-options {
  gap: 8px;
  grid-template-columns: 1fr;
}
.starter-ai-option {
  cursor: pointer;
  padding: 10px 12px;
  gap: 8px;
}
.starter-ai-option .opt-row { display: flex; align-items: center; gap: 10px; }
.starter-ai-option .opt-row .grow { font-size: 13px; }
.starter-ai-swatches { display: inline-flex; gap: 3px; flex-shrink: 0; }
.starter-ai-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.starter-ai-optional { font-weight: 400; }
.starter-ai-help { font-size: 11.5px; margin-top: 4px; }

.starter-ai-palette-blurb { margin-bottom: 10px; }

.palette-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.palette-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: inherit;
}
.palette-preset:hover { border-color: rgba(0, 0, 0, .28); }
.palette-preset-label { white-space: nowrap; }
.palette-preset-swatches { display: inline-flex; gap: 3px; }

.palette-pickers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.palette-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.palette-picker-label { flex: 1; }
.palette-picker-input {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.palette-picker-input::-webkit-color-swatch-wrapper { padding: 0; }
.palette-picker-input::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; }
.palette-picker-input::-moz-color-swatch    { border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; }

/* Pages-tab onboarding — tighten spacing on phones. The .grid-2 layouts
   already collapse to 1 column at 768px (see Responsive section); these
   rules trim padding inside choice cards and the upload drop zone so the
   card doesn't dominate the viewport. */
@media (max-width: 600px) {
  .starter-intro { margin-bottom: 14px; }
  .starter-grid-tight { gap: 10px; }
  .starter-pick-row { gap: 10px; }
  .starter-pick-icon {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    font-size: 16px;
    border-radius: 8px;
  }
  .starter-upload-drop { padding: 22px 14px; }
  .starter-upload-drop.tight { padding: 18px 14px; }
  .starter-upload-emoji { font-size: 20px; }
  .starter-upload-blurb { font-size: 12px; }
  .starter-ai-question-options { gap: 6px; }
  .starter-ai-option { padding: 9px 10px; }
}

/* SEO tab */
/* ───── SEO score banner ───── */
.seo-score-banner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 20px 28px;
  align-items: start;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.seo-score-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 110px;
}
.seo-gauge-svg {
  width: 110px;
  height: 70px;
  overflow: visible;
}
.seo-gauge-score {
  font-size: 22px;
  font-weight: 700;
  fill: var(--ink);
  font-family: 'Geist', sans-serif;
  letter-spacing: -0.02em;
}
.seo-gauge-denom {
  font-size: 8px;
  fill: var(--ink-3);
  font-family: 'Geist', sans-serif;
}
.seo-gauge-label {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.seo-score-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-width: 0;
}
.seo-score-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 36px;
  gap: 8px;
  align-items: center;
}
.seo-score-bar-label {
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seo-score-bar-track {
  height: 5px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.seo-score-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.seo-score-bar-fill.good { background: var(--good); }
.seo-score-bar-fill.warn { background: var(--warn); }
.seo-score-bar-fill.bad  { background: var(--bad); }
.seo-score-bar-pct {
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.seo-autogen-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 220px;
}
.seo-autogen-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.seo-autogen-blurb {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0;
}
.seo-autogen-btn { align-self: flex-start; }
.seo-autogen-status { font-size: 12px; min-height: 16px; }
.seo-score-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.seo-autofill-btn {
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .seo-score-banner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .seo-autogen-panel { max-width: none; }
  .seo-score-stats {
    grid-column: 1 / -1;
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }
}
@media (max-width: 600px) {
  .seo-score-banner { grid-template-columns: 1fr; }
  .seo-score-gauge-wrap { align-self: center; margin: 0 auto; }
  .seo-score-bar-row { grid-template-columns: 110px 1fr 30px; }
}

/* ───── SEO grid ───── */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 18px;
  min-width: 0;
}
.seo-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.seo-field-label {
  display: block;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.seo-input,
.seo-textarea,
.seo-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
}
.seo-textarea { resize: vertical; min-height: 60px; }
.seo-textarea.tall { min-height: 70px; font-size: 12px; font-family: 'Geist Mono', monospace; }
.seo-input.mono-input,
.seo-textarea.mono-input {
  font-family: 'Geist Mono', monospace;
}
.seo-input.mono-12-5 { font-family: 'Geist Mono', monospace; font-size: 12.5px; }
.seo-input-hint { font-size: 11.5px; margin-top: 4px; }
.seo-advanced-summary { cursor: pointer; font-size: 12px; color: var(--ink-2); padding: 4px 0; }
.seo-advanced-body { margin-top: 8px; }
.seo-stat-value-warn-good { color: var(--good); }
.seo-stat-value-warn-bad  { color: var(--bad); }
.seo-stat-base { font-size: 14px; }
.seo-sitemap-card-meta { font-size: 12px; }
.seo-card-meta { font-size: 12px; }
.seo-sitemap-body { padding: 14px 18px; }
.seo-sitemap-blurb { font-size: 12.5px; margin-bottom: 10px; }
.seo-sitemap-pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-size: 11.5px;
  max-height: 280px;
  overflow: auto;
  margin: 0;
  font-family: 'Geist Mono', monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}
.seo-checks-card { grid-column: span 2; min-width: 0; }
.seo-checks-empty { padding: 28px 18px; text-align: center; }
.seo-checks-empty-icon {
  margin: 0 auto 10px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--good-soft);
  color: var(--good);
  display: grid; place-items: center;
}
.seo-checks-empty-title { font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.seo-checks-empty-blurb { font-size: 12.5px; }
.seo-checks-list { list-style: none; margin: 0; padding: 6px 0; }
.seo-check-row {
  display: flex;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}
.seo-check-pill {
  height: 20px;
  padding: 0 8px;
  font-size: 10.5px;
  border-color: transparent;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--seo-pill-bg, var(--accent-soft));
  color: var(--seo-pill-fg, var(--accent));
}
.seo-check-row.warn { --seo-pill-bg: var(--bad-soft); --seo-pill-fg: var(--bad); }
.seo-check-row.info { --seo-pill-bg: var(--accent-soft); --seo-pill-fg: var(--accent); }
.seo-check-body { min-width: 0; flex: 1; }
.seo-check-msg { font-size: 13.5px; color: var(--ink); }
.seo-check-path { font-size: 11.5px; margin-top: 2px; }
.seo-empty-pages {
  padding: 24px 18px;
  text-align: center;
  font-size: 13px;
}
.seo-page-row {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px 16px;
  align-items: start;
  min-width: 0;
}
.seo-page-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.seo-page-path {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
  min-width: 0;
}
.seo-page-meta { font-size: 11.5px; }
.seo-page-meta .noindex-flag { color: var(--bad); }
.seo-page-row .seo-field-full { grid-column: 1 / -1; }
.seo-page-row .seo-input,
.seo-page-row .seo-textarea,
.seo-page-row .seo-select { min-width: 0; }

@media (max-width: 768px) {
  .seo-checks-card { grid-column: auto; }
}

/* Availability tab */
.availability-card { overflow: hidden; }
.availability-status {
  font-size: 12px;
  min-width: 110px;
  text-align: right;
}
.availability-share {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2, #f9f9fa);
}
.availability-share-summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.availability-share-row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.availability-share-text { flex: 1; min-width: 220px; }
.availability-share-blurb { font-size: 12px; margin-bottom: 6px; }
.availability-share-code { font-size: 12px; word-break: break-all; }
.availability-day-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.availability-day-head {
  padding: 10px 8px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-left: 1px solid var(--line);
  text-align: center;
}
.availability-grid {
  --row-height: 24px;
  position: relative;
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  height: var(--avail-body-height, 768px);
  background: var(--surface);
}
.availability-gutter {
  position: relative;
  border-right: 1px solid var(--line);
}
.availability-gutter-tick {
  position: absolute;
  top: var(--tick-top);
  right: 6px;
  font-size: 10.5px;
  color: var(--ink-3);
  transform: translateY(-50%);
}
.availability-day-col {
  position: relative;
  border-left: 1px solid var(--line);
  cursor: crosshair;
  background-image:
    linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--row-height)),
    linear-gradient(to bottom, transparent 0 calc(var(--row-height) - 1px), var(--line) calc(var(--row-height) - 1px) var(--row-height));
  background-size: 100% calc(var(--row-height) * 2);
  background-position: 0 0;
}

/* Availability — dynamic slot block (positioned via --top / --height) */
.availability-slot {
  position: absolute;
  left: 4px;
  right: 4px;
  top: var(--top, 0);
  height: var(--height, 24px);
  background: rgba(165,91,45,0.18);
  border: 1px solid #A55B2D;
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 8px;
  text-align: left;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.availability-slot strong {
  font-size: 12px;
  color: #2D2370;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.availability-slot .availability-slot-time { font-size: 10.5px; }
.availability-ghost {
  position: absolute;
  left: 4px;
  right: 4px;
  top: var(--top, 0);
  height: var(--height, 0);
  background: rgba(165,91,45,0.25);
  border: 1px dashed #A55B2D;
  border-radius: 6px;
  pointer-events: none;
}
.availability-status.is-error { color: var(--bad); }

/* Below ~720px the 7-column grid no longer fits the card width. The
   wrapper turns into a horizontal scroller and we pin a min-width on
   both child grids so columns stay tappable; the head + body share the
   same scroll position because they're siblings inside one wrapper. */
@media (max-width: 720px) {
  .availability-share { padding: 12px 14px; }
  .availability-share-row { gap: 8px; }

  .availability-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .availability-scroll > .availability-day-grid,
  .availability-scroll > .availability-grid {
    min-width: 560px;
  }
  .availability-day-grid,
  .availability-grid {
    grid-template-columns: 44px repeat(7, 1fr);
  }
  .availability-day-head {
    padding: 8px 4px;
    font-size: 10.5px;
    letter-spacing: .06em;
  }
  .availability-gutter-tick {
    right: 4px;
    font-size: 10px;
  }
}

/* Stack the start/end/capacity row inside the slot editor on phones —
   three time inputs side by side become unusable below ~420px. */
@media (max-width: 420px) {
  .modal-scrim { padding: 6vh 12px; }
  .modal-form { padding: 16px; }
  .modal-grid-3 { grid-template-columns: 1fr; }
}

/* Generic modal scaffold (shared by availability editor / new-page modal etc.) */
.modal-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.45);
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 24px;
}
.modal-scrim.is-open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: 14px;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.32);
}
.modal-card.wide { width: min(560px, 100%); }
.modal-card.modal-card-wider { width: min(720px, 100%); max-height: 92vh; }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head .modal-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.modal-head h3.h3 { margin: 2px 0 0; font-size: 16px; }
.modal-form {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-field-label {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.modal-input,
.modal-time {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.modal-time { padding: 9px 10px; }
.modal-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.modal-actions-split {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}
.modal-actions-split .modal-actions-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
/* `.btn-icon-row` retired — base `.btn` already has `gap: 6px`. Use
   plain `.btn` (or `.btn.danger` for destructive). */

/* Settings tab */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.settings-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-card-body.tight { gap: 0; }
.settings-field-label,
.settings-eyebrow {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.settings-field-value { font-size: 14px; margin-top: 2px; }
.settings-field-value.mono-13 { font-size: 13px; margin-top: 2px; }
.settings-field-value.with-pill { margin-top: 4px; }
.settings-domain-mono {
  font-size: 13px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.settings-domain-blurb { font-size: 12px; margin-top: 4px; }
.domain-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.domain-checklist li { display: flex; gap: 8px; align-items: flex-start; }
.domain-checklist .step-mark { font-weight: 600; color: var(--ink-3); }
.domain-checklist .step-mark.done { color: var(--good); }
.dns-record-card {
  background: var(--surface-2, #f7f7f8);
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}
.dns-record-card-title { font-weight: 600; margin-bottom: 10px; }
.dns-record-grid {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 8px 12px;
  align-items: center;
}
.dns-record-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.dns-record-value { font-size: 13px; overflow-wrap: anywhere; }
.dns-record-help { margin-top: 12px; font-size: 12px; }
/* `.btn-mini` retired — use `.btn.sm` (12px / 26px height) instead. */
.dns-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.dns-health {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.dns-health-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.dns-health-mark {
  font-weight: 700;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--ink-3);
}
.dns-health-mark.resolved  { color: var(--good); }
.dns-health-mark.mismatch  { color: var(--warn, #c08a00); }
.dns-health-mark.unresolved { color: var(--ink-3); }
.dns-health-mark.checking  { color: var(--ink-3); }
.dns-health-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dns-health-detail { font-size: 12px; overflow-wrap: anywhere; }
.danger-card { border-color: var(--bad-soft); }
.danger-card .h3 { color: var(--bad); }
.danger-card-body { padding: 16px 18px; }
.danger-card-blurb { font-size: 13px; margin-bottom: 12px; }
.domain-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.domain-form .domain-input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}
.custom-domain-blurb {
  font-size: 13px;
  line-height: 1.6;
}

/* Lead detail modal */
.lead-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0,0,0,.45);
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 24px;
}
.lead-modal.is-open { display: flex; }
.lead-modal-card {
  background: var(--surface);
  border-radius: 14px;
  width: min(720px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.32);
}
.lead-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.lead-modal-head-text { min-width: 0; }
.lead-modal-eyebrow { margin-bottom: 4px; }
.lead-modal-title { font-size: 18px; }
.lead-modal-meta { font-size: 12px; margin-top: 4px; }
.lead-modal-actions { display: flex; align-items: center; gap: 10px; }
.lead-pill-status {
  height: 22px;
  font-size: 11.5px;
  padding: 0 10px;
  border-color: transparent;
}
.lead-modal-close,
.icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
  color: var(--ink-3);
  display: inline-flex;
}
.lead-modal-body {
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.lead-modal-builder-body {
  overflow-y: auto;
  padding: 18px 22px;
}
.lead-modal-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.lead-modal-section-title.with-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lead-modal-notes-count {
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
}
.lead-details-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 18px;
  font-size: 13.5px;
}
.lead-note-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.lead-note-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  min-height: 60px;
}
.lead-note-add-btn { align-self: flex-start; }
.lead-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-notes-empty { font-size: 12.5px; padding: 4px 0; }
.lead-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-action-btn { display: inline-flex; align-items: center; gap: 6px; }
.lead-action-btn.danger { color: var(--bad); }
.lead-docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-toast {
  display: none;
  padding: 10px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  font-size: 13px;
}
.lead-toast.is-bad { background: var(--bad-soft); color: var(--bad); }
.lead-builder-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.lead-builder-back-btn { display: inline-flex; align-items: center; gap: 6px; }
.lead-builder-title { font-size: 17px; }
.lead-builder-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lead-builder-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lead-builder-field.full { grid-column: 1 / -1; }
.lead-builder-field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.lead-builder-input,
.lead-builder-textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
}
.lead-builder-input.disabled-look {
  background: var(--bg-2);
  color: var(--ink-2);
}
.lead-builder-textarea {
  font-size: 13.5px;
  resize: vertical;
}
.lead-builder-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}
.lead-builder-submit { display: inline-flex; align-items: center; gap: 6px; }
.lead-builder-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.lead-builder-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.lead-builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 90px 80px 28px;
  gap: 6px;
  align-items: center;
}
.lead-builder-row .lead-builder-input { padding: 8px 10px; font-size: 13px; }
.lead-builder-row-amount {
  text-align: right;
  font-size: 13px;
  color: var(--ink-2);
}
.lead-builder-row-remove {
  background: transparent;
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.lead-builder-row-remove:hover { background: var(--bg-2); color: var(--ink); }
.lead-builder-row-add {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lead-builder-row-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.lead-builder-total-amount {
  font-size: 18px;
  font-weight: 600;
}

/* Leads tab — table & status pills */
.lead-status-pill {
  height: 20px;
  font-size: 11px;
  padding: 0 8px;
  border-color: transparent;
  background: var(--lead-status-bg, var(--accent-soft));
  color: var(--lead-status-fg, var(--accent));
}
.lead-status-pill .dot { background: var(--lead-status-fg, var(--accent)); }
.pill.draft.micro-pill { height: 18px; font-size: 11px; padding: 0 8px; }
.leads-empty { padding: 36px 18px; text-align: center; }
.leads-empty .leads-empty-title { font-size: 13.5px; margin-bottom: 6px; }
.leads-empty .leads-empty-blurb { font-size: 12px; }
.leads-table-wrap { overflow-x: auto; }
.leads-table { width: 100%; font-size: 13.5px; }
.leads-table thead tr {
  text-align: left;
  color: var(--ink-3);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.leads-table th { padding: 12px 16px; font-weight: 500; }
.leads-table td { padding: 12px 16px; }
.leads-table tbody tr {
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.leads-table tbody tr:hover td { background: var(--surface-2); }
.leads-table .leads-when { white-space: nowrap; }
.leads-table .leads-email { color: var(--accent); }
.leads-table .leads-message {
  max-width: 320px;
  color: var(--ink-2);
}
.deliveries-card { margin-top: 18px; }
.deliveries-card-meta { font-size: 12px; }

/* Visitors tab */
.visitors-card-meta { font-size: 12px; }
.visitors-spark-pad { padding: 18px 18px 24px; }
.visitors-spark-svg { width: 100%; height: 100px; }
.visitors-spark-axis { font-size: 11px; margin-top: 6px; }
.visitors-empty { padding: 36px 18px; text-align: center; }
.visitors-empty-icon {
  margin: 0 auto 14px;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink-3);
  display: grid; place-items: center;
}
.visitors-empty-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.visitors-empty-blurb { font-size: 12.5px; max-width: 420px; margin: 0 auto; }
.visitors-card { margin-top: 14px; }
.visitors-list-pad { padding: 6px 18px 18px; }
.visitors-empty-line { font-size: 13px; text-align: center; padding: 18px 0; }

/* Free-tier paywall card shown in place of the visitor analytics
   dashboard. Same shell as `.visitors-empty` but a larger pad, a
   bullet list of locked features, and a prominent upgrade CTA. */
.visitors-locked-pad { padding: 48px 24px; text-align: center; max-width: 560px; margin: 0 auto; }
.visitors-locked-icon {
  margin: 0 auto 18px;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.visitors-locked-title { margin: 0 0 10px; font-size: 22px; }
.visitors-locked-blurb { font-size: 13.5px; line-height: 1.55; margin: 0 0 18px; }
.visitors-locked-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 13px;
  text-align: left;
  display: inline-block;
}
.visitors-locked-list li { padding: 5px 0; padding-left: 22px; position: relative; }
.visitors-locked-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.top-page-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.top-page-path {
  color: var(--ink-2);
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}
.top-page-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
}
.top-page-bar-fill {
  width: var(--bar-pct, 0%);
  height: 100%;
  background: #A55B2D;
}
.top-page-count { flex: 0 0 auto; }
.recent-visit-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  align-items: baseline;
}
.recent-visit-time { flex: 0 0 130px; }
.recent-visit-path {
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-visit-ref {
  flex: 0 0 auto;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Log tab — alerts column / inputs */
.log-actions { display: flex; flex-direction: column; gap: 14px; }
.log-card-head-status { font-size: 12px; }
.log-pause-checkbox { margin-right: 4px; }
.log-level-select,
.log-input-mini,
.log-select-mini {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.log-empty-block { padding: 32px 18px; text-align: center; }
.log-alerts-body {
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alert-rule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.alert-rule-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  padding: 2px 0;
}
.alert-rule-toggle { font-size: 12px; }
.alert-rule-form-row { display: flex; gap: 6px; flex-wrap: wrap; }
.alert-rule-recipient {
  flex: 1 1 140px;
  min-width: 120px;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.alert-rule-cooldown { font-size: 11.5px; }
.alert-rule-cooldown-input {
  width: 70px;
  font-size: 11.5px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-left: 4px;
}
/* `.sm-tiny` retired — use `.btn.sm` instead. */
.alert-rule-new-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.alert-test-body {
  padding: 12px 18px 16px;
  font-size: 12.5px;
}
.alert-test-blurb { margin: 0 0 10px; }

/* Lead deliveries list */
.deliveries-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.delivery-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.delivery-pill {
  display: inline-block;
  min-width: 64px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.delivery-pill.ok      { background: rgba(0, 170, 119, .13); color: #0a7; }
.delivery-pill.failed  { background: rgba(204, 51, 51, .13); color: #c33; }
.delivery-pill.skipped { background: rgba(91, 102, 119, .12); color: var(--ink-3); }
.delivery-pill.other   { background: rgba(153, 153, 153, .13); color: #999; }
.delivery-body { flex: 1; min-width: 0; }
.delivery-name { font-weight: 500; }
.delivery-meta { font-size: 11.5px; margin-top: 2px; }
.delivery-error {
  font-size: 11.5px;
  color: #c33;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}
.deliveries-empty { font-size: 13px; padding: 8px 0; }

/* Workflow tile picker (form layout around the embedded <style> block) */
.workflow-picker-card { padding: 16px 18px; }
.workflow-picker-title { font-weight: 500; font-size: 13.5px; margin-bottom: 4px; }
.workflow-picker-blurb { font-size: 12px; margin-bottom: 14px; }
.workflow-picker-form { display: flex; flex-direction: column; gap: 14px; }
.workflow-picker-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 360px;
}
.workflow-picker-field + .workflow-picker-field { margin-top: 8px; }
.workflow-picker-field-label { font-size: 11px; color: var(--ink-3); }
.workflow-picker-select,
.workflow-picker-input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.workflow-picker-hint { font-size: 11px; }
.workflow-picker-empty-msg { font-size: 12.5px; }
.workflow-picker-actions { display: flex; justify-content: flex-end; }

/* Workflow card */
.workflow-card { padding: 0; }
.workflow-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}
.workflow-card-title { flex: 1; min-width: 0; }
.workflow-card-title-row { display: flex; gap: 8px; align-items: center; }
.workflow-card-name { font-size: 14px; }
.workflow-card-blurb { font-size: 12px; margin-top: 3px; }
.pill.is-active { background: #E5F4EA; color: #3F7A36; border-color: transparent; }
.pill.is-paused { background: #F3F3F4; color: #777; border-color: transparent; }
.workflow-rename-summary { cursor: pointer; list-style: none; }
.workflow-rename-popover {
  position: absolute;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}
.workflow-rename-status { font-size: 11px; min-height: 14px; }
.workflow-card-body { padding: 14px 18px; }
.workflow-trigger {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2, #f7f7f8);
  border: 1px solid var(--line);
}
.workflow-step-bullet {
  width: 24px; height: 24px;
  border-radius: 6px;
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
  flex: 0 0 24px;
}
.workflow-step-bullet.trigger { background: var(--accent); }
.workflow-step-bullet.step { background: var(--ink-1, #1c1c1e); font-weight: 500; }
.workflow-trigger-text { font-size: 12.5px; }
.workflow-pipe {
  height: 10px;
  margin-left: 23px;
  border-left: 2px dashed var(--line);
}
.workflow-step {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.workflow-step-summary {
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: center;
}
.workflow-step-name { font-size: 13px; font-weight: 500; }
.workflow-step-text { flex: 1; min-width: 0; }
.workflow-step-meta { font-size: 11.5px; margin-top: 2px; }
.workflow-step-meta .needs-setup { color: var(--bad); }
.workflow-step-edit-hint { font-size: 11px; }
.workflow-step-form {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2, #f9f9fa);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.workflow-step-form-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.workflow-step-form-status { font-size: 11px; }
.workflow-add-step-summary {
  cursor: pointer;
  width: 100%;
  justify-content: center;
}
.workflow-add-step-form {
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: var(--surface-2, #f9f9fa);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.workflow-add-step-submit { align-self: flex-end; }
.workflow-empty-msg {
  font-size: 12.5px;
  padding: 12px 0;
  text-align: center;
}

/* Workflow form fields (also used by tile picker) */
.wf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wf-field-label {
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.wf-input,
.wf-select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.wf-input.wf-input-narrow { max-width: 140px; }

.wf-dest-fieldset { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.wf-dest-fieldset > legend { float: left; width: 100%; margin-bottom: 4px; }
.wf-dest-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-dest-tile {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; font-size: 13px; transition: border-color .12s, background .12s;
}
.wf-dest-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, #eef4ff); }
.wf-dest-tile:hover { border-color: var(--accent); }
.wf-dest-tile input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.wf-dest-tile-icon { display: block; flex-shrink: 0; border-radius: 3px; }

.wf-condition-row { display: flex; gap: 8px; align-items: stretch; }
.wf-condition-row > .wf-field { flex: 1; }
.wf-condition-row > .wf-field.wf-cond-op { flex: 0 0 90px; }
.wf-enabled-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* Workflows tab */
.workflows-intro { margin-bottom: 14px; }
.workflows-intro h2.h2 { margin: 0; }
.workflows-intro p { font-size: 13px; margin: 4px 0 0; max-width: 56ch; }
.workflows-empty-card {
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--accent-soft);
}
.workflows-empty-card .empty-title {
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.workflows-empty-card .empty-blurb { font-size: 12.5px; }
.workflows-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

/* ───── Templates tab ───── */
.templates-intro { margin-bottom: 14px; }
.templates-intro h2.h2 { margin: 0; }
.templates-intro p { font-size: 13px; margin: 4px 0 0; max-width: 64ch; }
.templates-intro code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}
.templates-empty-card { padding: 16px 18px; background: var(--accent-soft); }
.templates-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .templates-layout { grid-template-columns: 1fr; }
  .templates-preview { display: none; }
}
.templates-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.templates-list-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 10px 10px 4px;
}
.templates-list-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
}
.templates-list-item:hover { background: var(--bg); }
.templates-list-item.active { background: var(--accent-soft); color: var(--accent-ink); }
.templates-list-item-label { font-size: 13.5px; font-weight: 500; }
.templates-list-item-key   { font-size: 11px; color: var(--ink-4); font-family: ui-monospace, "JetBrains Mono", monospace; }

.templates-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.templates-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.templates-editor-title { font-weight: 600; font-size: 15px; }
.templates-editor-sub { font-size: 12.5px; margin-top: 2px; }
.templates-editor-form .field + .field { margin-top: 14px; }
.templates-body { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.5; }
.templates-charcount { font-size: 11.5px; margin-top: 4px; }

.templates-vars { font-size: 12.5px; }
.templates-vars summary { cursor: pointer; color: var(--accent); user-select: none; }
.templates-vars-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  min-width: 240px;
}
.templates-var-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.templates-var-chip:hover { background: var(--surface); border-color: var(--line); }
.templates-var-token { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11.5px; color: var(--accent-ink); }
.templates-var-label { font-size: 11px; color: var(--ink-3); }

.templates-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 16px;
}
.templates-preview-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.templates-preview-subject {
  font-size: 13px;
  font-weight: 500;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.templates-preview-subject:empty { display: none; }
.templates-preview-frame {
  width: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
  border-radius: 6px;
}

/* ───── Templates: logo upload strip ───── */
.templates-logo-section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.templates-logo-col { flex-shrink: 0; }
.templates-logo-img {
  max-height: 48px;
  max-width: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
  display: block;
}
.templates-logo-placeholder {
  width: 120px;
  height: 48px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  font-size: 11.5px;
  background: var(--bg);
}
.templates-logo-meta { flex: 1; min-width: 0; }
.templates-logo-label { font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.templates-logo-hint  { font-size: 12px; }
.templates-logo-form  { display: contents; }
.templates-logo-pick  { position: relative; cursor: pointer; }
.templates-logo-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.templates-logo-filename { font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.templates-logo-remove { color: var(--danger, #c0392b); }

/* ───── WYSIWYG email editor ───── */
.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  flex-wrap: wrap;
}
.wysiwyg-toolbar.wysiwyg-toolbar-source {
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 4px;
}
.wysiwyg-btn {
  padding: 3px 7px;
  font-size: 12.5px;
  line-height: 1.5;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  transition: background 0.1s, border-color 0.1s;
}
.wysiwyg-btn:hover     { background: var(--surface); border-color: var(--line); }
.wysiwyg-btn-u         { text-decoration: underline; }
.wysiwyg-source-toggle { font-size: 11.5px; color: var(--ink-3); }
.wysiwyg-sep {
  width: 1px; height: 16px;
  background: var(--line);
  margin: 0 2px;
  flex-shrink: 0;
}
.wysiwyg-editor {
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
  background: var(--surface);
  color: var(--ink);
}
.wysiwyg-editor:focus { border-color: var(--accent); }
.wysiwyg-editor p     { margin: 0 0 10px; }
.wysiwyg-editor h2    { font-size: 18px; font-weight: 600; margin: 16px 0 8px; }
.wysiwyg-editor a     { color: var(--accent); }
.wysiwyg-editor ul,
.wysiwyg-editor ol    { margin: 0 0 10px; padding-left: 24px; }
.wysiwyg-hidden { display: none !important; }

/* Hidden textarea used as the raw-source view / form backing field */
.textarea.wysiwyg-source { display: none; }
.textarea.wysiwyg-source.visible { display: block; }

/* ───── Page header (large h1 row with thumb / pill / actions) ───── */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head .page-head-main { display: flex; align-items: center; gap: 14px; }
.page-head .page-head-title-row { display: flex; align-items: center; gap: 10px; }
.page-head .page-head-meta-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.page-head h1.h1.compact { font-size: 22px; }
.page-head .page-head-actions { display: flex; align-items: center; gap: 8px; }
.page-head .page-head-meta { font-size: 12.5px; }
.page-head .page-head-meta-sep { font-size: 11px; }

/* Generic delete-row strip used at the bottom of pages */
.delete-row {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
/* `.btn-danger` renamed to `.btn.danger` for consistency with `.accent`
   / `.ghost`. The `.btn.danger` rule lives in the page-editor section
   near the `.pe-action-btn` retirement comment. */

/* Pending changes banner (apps#show) */
.pending-banner {
  padding: 14px;
  margin-bottom: 16px;
  border-color: var(--accent-soft);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 80%);
}
.pending-banner-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  flex: 0 0 32px;
}

/* Pill micro variant (used in version timeline / similar) */
.pill.micro { height: 18px; padding: 0 6px; font-size: 10.5px; }

/* Versions tab timeline */
.timeline.tight { padding: 8px 18px 16px; }
.t-item.t-item-spread {
  display: flex; gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}
.t-item.t-item-spread .t-item-body { flex: 1; min-width: 0; }
.versions-empty { padding: 36px 18px; text-align: center; }
.versions-empty .muted-title { font-size: 13.5px; margin-bottom: 6px; }
.versions-empty .muted-blurb { font-size: 12px; }
.u-form-zero-margin > form,
form.u-form-zero-margin { margin: 0; }

/* Empty state cards */
.empty-card { padding: 36px; text-align: center; }
.empty-card .empty-card-msg { font-size: 14px; }
.empty-card .empty-card-cta { margin-top: 14px; }
.empty-state {
  padding: 32px 18px;
  text-align: center;
}
.empty-state-icon {
  margin: 0 auto 12px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink-3);
  display: grid; place-items: center;
}
.empty-state-title {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 4px;
}
.empty-state-blurb {
  font-size: 12.5px;
  max-width: 420px;
  margin: 0 auto;
}

/* Recent leads list (compact rows) */
.recent-lead-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.recent-lead-row .recent-lead-name { font-weight: 500; }
.recent-lead-row .recent-lead-email { font-size: 12px; color: var(--ink-3); }
.recent-lead-row .recent-lead-time { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* Dashboard split grid (1.4fr 1fr) */
.split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.split-grid-tight {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .split-grid, .split-grid-tight { grid-template-columns: 1fr; }
}

/* Card body padding helpers used on dashboard / show */
.card-body-pad-text {
  padding: 18px;
  color: var(--ink-3);
  font-size: 13px;
}
.card-body-pad-list { padding: 8px 18px 16px; }
.card-body-empty { font-size: 13px; padding: 12px 0; color: var(--ink-3); }

/* Activity / log empty containers */
.log-tail-pad { padding: 4px 0 8px; }
.log-tail-empty {
  padding: 32px 18px;
  text-align: center;
}

/* AI generations page */
.ai-page-wrap { max-width: 560px; }
.ai-app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.ai-app-thumb { width: 48px; height: 48px; flex: 0 0 48px; font-size: 22px; }
.ai-app-title { font-size: 22px; word-break: break-word; }
.ai-app-meta { font-size: 12.5px; }
.ai-card-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.ai-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 18px;
  flex: 0 0 36px;
}
.ai-card-title { margin: 0 0 2px; }
.ai-card-meta { font-size: 12px; }
.ai-progress {
  margin: 4px 0 14px;
}
.ai-progress-track {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  width: var(--ai-progress, 0%);
  background: var(--accent);
  transition: width 200ms;
}
.ai-progress-meta {
  font-size: 12px;
  margin-top: 6px;
}
.ai-prompt-card {
  background: var(--bg-2);
  border-radius: var(--r);
  padding: 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.ai-prompt-label { font-weight: 500; margin-bottom: 4px; }
.ai-prompt-body { white-space: pre-wrap; }
.ai-foot-meta { font-size: 11.5px; margin-top: 10px; }
.ai-card-error {
  border-color: var(--bad-soft);
  background: var(--bad-soft);
}
.ai-card-error h2.h2 { margin: 0 0 6px; color: var(--bad); }
.ai-card-error-msg { color: var(--bad); font-size: 13.5px; margin-bottom: 14px; }
.ai-actions-start { margin-top: 0; justify-content: flex-start; }

/* Alerts index */
.alerts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.alerts-head .h1.compact { font-size: 22px; }
.alerts-head .alerts-sub { font-size: 12.5px; margin-top: 4px; }
.alerts-card { margin-bottom: 18px; }
.alerts-card-meta { font-size: 12px; }
.alerts-card-head-meta {
  font-weight: 400;
  font-size: 12px;
}
.alerts-empty-banner { padding: 22px 18px; text-align: center; }
.alerts-empty-banner .alerts-empty-blurb { font-size: 12.5px; }
.alerts-rules-body { padding: 4px 0 0; }
.alerts-rule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.alerts-rule-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}
.alerts-rule-dot.is-on { background: var(--good); }
.alerts-rule-text { flex: 1 1 auto; min-width: 0; }
.alerts-rule-title-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.alerts-rule-name { font-size: 13.5px; }
.alerts-rule-app { font-size: 11.5px; }
.alerts-rule-meta { font-size: 12px; margin-top: 2px; }
.alerts-row-link {
  font-size: 11.5px;
  color: var(--accent-ink);
  text-decoration: none;
}
.alerts-row-link.is-app {
  color: var(--accent-ink);
  text-decoration: none;
}

/* Activity index */
.activity-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.activity-head .h1.compact { font-size: 22px; }
.activity-head .activity-sub { font-size: 12.5px; margin-top: 4px; }
.activity-head .activity-meta { font-size: 12px; }

/* Profile */
.profile-card { padding: 24px; max-width: 560px; }
.profile-card-account {
  padding: 20px 24px;
  max-width: 560px;
  margin-top: 18px;
}
.profile-card-account h2.h3 { margin-top: 0; }
.profile-card-blurb {
  font-size: 13px;
  line-height: 1.5;
}
.profile-error-list {
  margin-bottom: 12px;
}
.profile-error-list ul { margin: 0; padding-left: 18px; }
.profile-field-hint { font-size: 11.5px; }
.profile-actions { display: flex; gap: 8px; margin-top: 8px; }
.profile-account-section { margin-top: 4px; }
.profile-billing-row { margin-top: 10px; }

/* Settings (lead actions / integrations forms) */
.settings-form-card { max-width: 640px; }

/* Subscriptions credits meter (uses --credits-pct) */
.credits-meter-fill { width: var(--credits-pct, 0%); }

/* Page editor (controller dynamic styles) */
.pe-fullscreen-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.pe-iframe-fullsize {
  width: 100%; height: 100%;
  border: 0;
}

/* Lead detail (controller-rendered content) */
.lead-detail-dt { color: var(--ink-3); text-transform: capitalize; }
.lead-detail-dd { margin: 0; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.lead-detail-empty { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); }
.lead-pill {
  height: 20px;
  font-size: 11px;
  padding: 0 8px;
  background: var(--lead-pill-bg);
  color: var(--lead-pill-fg);
  border-color: transparent;
}
.lead-pill .dot { background: var(--lead-pill-fg); }
.lead-status-btn { /* base in main pill rules */ }
.lead-status-btn[data-active="true"] {
  background: var(--lead-pill-bg);
  color: var(--lead-pill-fg);
  border-color: transparent;
}
.lead-note-item {
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lead-note-meta { font-size: 11px; margin-bottom: 4px; }
.lead-note-body { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.lead-doc-item {
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.lead-doc-left { min-width: 0; }
.lead-doc-head { display: flex; align-items: baseline; gap: 8px; }
.lead-doc-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.lead-doc-title { font-weight: 500; font-size: 13.5px; }
.lead-doc-meta { font-size: 12px; margin-top: 2px; }
.lead-doc-right { display: flex; align-items: center; gap: 12px; }
.lead-doc-total { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.lead-doc-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.lead-doc-link svg { display: inline-block; vertical-align: -2px; }
.lead-toast.is-ok  { background: var(--accent-soft); color: var(--accent); }
.lead-toast.is-bad { background: var(--bad-soft); color: var(--bad); }

/* Lead detail — controller-rendered classes */
.lead-status-pill[data-status] {
  background: var(--lead-pill-bg);
  color: var(--lead-pill-fg);
}
.lead-status-pill[data-status] .dot { background: var(--lead-pill-fg); }
.lead-action-btn[data-active="1"] {
  background: var(--lead-pill-bg);
  color: var(--lead-pill-fg);
  border-color: transparent;
}

/* ───── Mailer (email) styles — kept as plain rules so inline-friendly markup
   shrinks. Email clients will render these as cascade defaults; if a strict
   inliner becomes necessary we can run premailer-rails over the templates. */
.email {
  font: 14px/1.55 -apple-system, system-ui, sans-serif;
  color: #111;
}
.email-pad {
  font: 14px/1.6 -apple-system, system-ui, sans-serif;
  color: #1B1B1B;
  max-width: 540px;
  margin: 0 auto;
  padding: 24px;
}
.email h1.email-title {
  font-size: 20px;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.email p { margin: 0 0 12px; }
.email .email-p-tight { margin: 0 0 6px; }
.email .email-p-foot {
  margin: 18px 0 0;
  color: #666;
  font-size: 12px;
}
.email .email-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.email .email-mono-sm {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}
.email .email-pre {
  background: #f6f6f7;
  padding: 10px 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  font-size: 13px;
  margin: 0 0 12px;
}
.email .email-meta-table {
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}
.email .email-meta-table .k { padding: 2px 10px 2px 0; color: #555; }
.email .email-meta-table .v { padding: 2px 0; }
.email .email-meta-table .v.email-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.email .email-actor { margin: 0 0 12px; color: #555; }
.email .email-quote {
  white-space: pre-wrap;
  padding: 12px 14px;
  background: #FAF6EC;
  border-radius: 8px;
  font-size: 13px;
  color: #3D352A;
}
.email .email-records-label {
  margin-top: 18px;
  color: #5C554A;
  font-size: 13px;
}
.email .email-foot {
  color: #5C554A;
  font-size: 12px;
  margin-top: 24px;
}
.email .email-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13px;
}
.email .email-doc-table .k { padding: 6px 0; color: #5C554A; width: 110px; }
.email .email-doc-table .k.no-w { width: auto; }
.email .email-doc-table .v { padding: 6px 0; }
.email .email-doc-table .v.email-strong { font-weight: 600; }
.email .email-doc-table .v.email-ref {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
}
.email-status { font-weight: 700; }
.email-status.error { color: #b91c1c; }
.email-status.warn  { color: #a16207; }
.email-status.info  { color: #1e40af; }
.email-status.won   { color: #15803d; }
.email-status.lost  { color: #b91c1c; }

.email-otp {
  font-size: 28px;
  letter-spacing: 6px;
  font-weight: 600;
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.email-notify {
  font: 14px/1.55 -apple-system, system-ui, sans-serif;
  white-space: pre-wrap;
}

/* ───── Marketing landing color swatches (background driven by --swatch) ─────
   Note: .lp-editor-swatch has a default conic-gradient background defined
   above; this rule overrides it when callers provide a --swatch value. */
.lp-editor-swatch[style*="--swatch"] { background: var(--swatch); }

/* ───── Article chrome: lede + hr ───── */
.article-lede { font-size: 16px; margin-bottom: 24px; }
.article-rule {
  margin: 48px 0 28px;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ───── Auth page tweaks ───── */
.auth-row-baseline { align-items: baseline; }
.auth-otp-input {
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.auth-help-hint { font-size: 11.5px; }

/* Inkified link (used in blog list, etc.) */
.u-link-ink { color: var(--ink); text-decoration: none; }

/* ───── Blog list ───── */
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-list-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.blog-list-item h2 { margin: 0 0 6px; }
.blog-list-item .blog-list-desc { margin: 0; color: var(--ink-3); font-size: 14px; }
.blog-list-item .blog-list-meta { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-4); }

/* ───── Onboarding ───── */
.onboarding-brand-row { gap: 10px; margin-bottom: 6px; }
.onboarding-brand-meta { font-size: 11.5px; }
.onboarding-h1 { margin-bottom: 6px; line-height: 1.15; }
.onboarding-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 6px;
  color: var(--ink-3, #888);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.onboarding-divider::before,
.onboarding-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #e5e5e5);
}
.onboarding-mcp-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 12px;
  background: var(--bg-soft, #fafafa);
}
.onboarding-mcp-tile-text { flex: 1; min-width: 0; }
.onboarding-mcp-tile-text h2 { margin: 0 0 4px; }
.onboarding-mcp-tile-text p  { margin: 0; font-size: 13px; }
@media (max-width: 540px) {
  .onboarding-mcp-tile { flex-direction: column; align-items: flex-start; }
}
.onboarding-hint { font-size: 12px; margin-top: 4px; }
.onboarding-starter-prompt {
  margin: 8px 0 18px;
  padding: 14px 16px;
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.onboarding-starter-prompt .field-label { margin-bottom: 6px; }
.onboarding-starter-prompt-quote {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  font-style: italic;
}
.onboarding-domain-field { margin-top: 16px; }
.onboarding-radio-row { gap: 8px; margin-top: 4px; }
.onboarding-radio {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.onboarding-domain-detail .field { margin-top: 12px; }
.onboarding-actions { justify-content: space-between; margin-top: 20px; }

/* ─────────────────────────────────────────────────────────────
   Marketing — direction MID (playful consumer, blue + white,
   chunky navy shadows). Opt in by adding `dir-mid` to .lp.
   ───────────────────────────────────────────────────────────── */
.lp.dir-mid {
  --paper: #ffffff;
  --mid-ink: #0a1f44;
  --mid-ink-soft: #4a5a78;
  /* Emerald palette — same family as the global --accent-2 (#10B981) so
     it composes with the rest of the system. Tuned darks/lights to match
     the original blue spread's contrast. */
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-3: #d1fae5;
  --accent-4: #047857;
  --accent-soft: rgba(16, 185, 129, 0.10);
  --line: rgba(10, 31, 68, 0.10);
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --surface: #fff;
  --ink: #0a1f44;
  --ink-2: #1b2c52;
  --ink-3: #4a5a78;
  --ink-4: #6c7a93;
  --good: #047857;
  --good-soft: #d1fae5;
  --shadow-chunky: 8px 8px 0 #0a1f44;
  --shadow-chunky-md: 5px 5px 0 #0a1f44;
  --shadow-chunky-sm: 4px 4px 0 #0a1f44;
  background: var(--paper);
}

/* Buttons — see the unified `.btn` system near the top of this file.
   The pill / chunky-drop treatment used to live here as a marketing-only
   override; it's now baked into the base `.btn` rules so portal pages
   pick it up automatically. The `--accent-ink` and `--accent-shadow`
   vars track the per-context accent (blue in the portal, emerald via
   `.lp, .auth-page`), so no marketing-specific overrides are needed. */

/* Hero — radial blue backdrop, floating ornaments, larger headline. */
.lp.dir-mid .lp-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 28px 72px;
}
.lp.dir-mid .lp-aurora { display: none; }
.lp.dir-mid .lp-hero::before,
.lp.dir-mid .lp-hero::after {
  position: absolute;
  font-size: 44px;
  pointer-events: none;
  z-index: 0;
}
.lp.dir-mid .lp-hero::before {
  content: '✦';
  top: 18%;
  left: 6%;
  color: var(--accent);
}
.lp.dir-mid .lp-hero::after {
  content: '◯';
  top: 28%;
  right: 8%;
  color: var(--accent-2);
}
.lp.dir-mid .lp-headline {
  font-size: 68px;
  letter-spacing: -0.035em;
  line-height: 1.0;
  max-width: 820px;
}
.lp.dir-mid .lp-sub { font-size: 18px; max-width: 580px; }

/* Hero eyebrow chip — white pill with accent border + chunky shadow. */
.lp.dir-mid .lp-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 22px;
  background: #fff;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--accent);
}
.lp.dir-mid .lp-hero-chip .sparkle { color: var(--accent-2); }

/* === Hero leads + workflow pulse === */
.lp.dir-mid .lp-story {
  position: relative;
  text-align: left;
  max-width: 480px;
  margin: 64px auto 0;
}
@keyframes lp-story-fade-out { to { opacity: 0; } }
@keyframes lp-story-fade-in  { to { opacity: 1; } }

/* Leads + workflow pulse cards. */
.lp.dir-mid .lp-story-pulse {
  display: flex; flex-direction: column; gap: 14px;
}
.lp.dir-mid .lp-story-pulse-card {
  padding: 16px;
  background: #fff;
  border: 2px solid var(--mid-ink);
  border-radius: 18px;
  box-shadow: var(--shadow-chunky-sm);
}
.lp.dir-mid .lp-story-pulse-card--lead {
  background: var(--accent-3);
  transform: rotate(1.5deg);
}
.lp.dir-mid .lp-story-pulse-h {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--mid-ink);
}
.lp.dir-mid .lp-story-pulse-h-name { flex: 1; }
.lp.dir-mid .lp-story-pulse-status-idle {
  animation: lp-story-fade-out 0.3s 5.6s forwards;
}
.lp.dir-mid .lp-story-pulse-status-ready {
  position: absolute; opacity: 0;
  animation: lp-story-fade-in 0.3s 5.8s forwards;
}
.lp.dir-mid .lp-story-pulse-card--lead .pill.good {
  position: relative;
  background: #d1fae5;
  color: var(--accent-4);
  border-color: rgba(4,120,87,0.25);
}
.lp.dir-mid .lp-story-pulse-lead {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
}
.lp.dir-mid .lp-story-pulse-lead--new {
  opacity: 0.3;
  animation: lp-story-fade-in 0.4s 5.6s forwards;
}
.lp.dir-mid .lp-story-pulse-avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--mid-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.lp.dir-mid .lp-story-pulse-avatar--alt { background: #888; }
.lp.dir-mid .lp-story-pulse-name { font-size: 13px; font-weight: 600; }
.lp.dir-mid .lp-story-pulse-when { position: relative; font-size: 10px; color: var(--ink-3); }
.lp.dir-mid .lp-story-pulse-when--idle {
  animation: lp-story-fade-out 0.3s 5.6s forwards;
}
.lp.dir-mid .lp-story-pulse-when--ready {
  position: absolute; left: 0; top: 0; opacity: 0;
  animation: lp-story-fade-in 0.3s 5.8s forwards;
}
.lp.dir-mid .lp-story-pulse-step {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--mid-ink);
}
.lp.dir-mid .lp-story-pulse-step--ready {
  opacity: 0.4;
  animation: lp-story-fade-in 0.4s 5.6s forwards;
}
.lp.dir-mid .lp-story-pulse-step--pending { opacity: 0.55; }
.lp.dir-mid .lp-story-pulse-check {
  display: grid; place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--mid-ink);
  color: #fff;
  font-size: 9px;
  flex: none;
}
.lp.dir-mid .lp-story-pulse-check--muted { background: var(--ink-3); }

/* === Section heads (shared) === */
.lp.dir-mid .lp-section-head { text-align: center; margin: 0 auto 56px; }
.lp.dir-mid .lp-section-eyebrow { color: var(--accent); }
.lp.dir-mid .lp-section-title { font-size: 44px; letter-spacing: -0.025em; line-height: 1.05; }
.lp.dir-mid .lp-section-title .accent-italic { color: var(--accent); }
.lp.dir-mid .lp-section-sub { max-width: 580px; margin: 0 auto; }

/* Multi-site cards — chunky shadow + 2px navy border. */
.lp.dir-mid .lp-multi-card {
  border: 2px solid var(--mid-ink);
  border-radius: 20px;
  box-shadow: var(--shadow-chunky-md);
  background: #fff;
}
.lp.dir-mid .lp-multi-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--mid-ink);
}
.lp.dir-mid .lp-multi-thumb { border-bottom: 2px solid var(--mid-ink); }
.lp.dir-mid .lp-multi-thumb .pill { border: 1.5px solid var(--mid-ink); }
.lp.dir-mid .lp-multi-card--ghost {
  background: var(--paper);
  border-style: dashed;
  box-shadow: none;
}
.lp.dir-mid .lp-multi-card--ghost:hover { transform: none; box-shadow: none; }
.lp.dir-mid .lp-multi-card--ghost .lp-multi-thumb { border-bottom-style: dashed; }
.lp.dir-mid .ghost-plus { color: var(--accent); }

/* Features — alternating chunky icon styles. */
.lp.dir-mid .lp-features {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1080px; margin: 0 auto;
  gap: 28px 36px;
}
.lp.dir-mid .lp-feature {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.lp.dir-mid .lp-feature-icon {
  width: 40px; height: 40px;
  border: 2px solid var(--mid-ink);
  border-radius: 14px;
  font-size: 18px;
}
.lp.dir-mid .lp-feature:nth-child(3n+1) .lp-feature-icon { background: var(--accent-3); color: var(--accent-4); }
.lp.dir-mid .lp-feature:nth-child(3n+2) .lp-feature-icon { background: #fff;            color: var(--accent); }
.lp.dir-mid .lp-feature:nth-child(3n+3) .lp-feature-icon { background: var(--accent);   color: #fff; }

/* Lead-flow — three coloured chunky nodes, no wrapper card. */
.lp.dir-mid .lp-flow {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: 1000px;
  margin: 0 auto;
}
.lp.dir-mid .lp-flow-node {
  border: 2px solid var(--mid-ink);
  border-radius: 18px;
  box-shadow: var(--shadow-chunky-sm);
  padding: 18px 20px;
  gap: 4px;
  background: #fff;
}
.lp.dir-mid .lp-flow-node:nth-child(1) { background: var(--accent-3); }
.lp.dir-mid .lp-flow-node:nth-child(5) {
  background: var(--accent);
  color: #fff;
}
.lp.dir-mid .lp-flow-node:nth-child(5) .label { color: #fff; }
.lp.dir-mid .lp-flow-node:nth-child(5) .meta  { color: rgba(255,255,255,0.85); }
.lp.dir-mid .lp-flow-node .label {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-4);
}
.lp.dir-mid .lp-flow-node .name { font-size: 16px; }
.lp.dir-mid .lp-flow-arrow { color: var(--accent); font-size: 20px; font-weight: 700; }
.lp.dir-mid .lp-integrations .pill {
  border: 1.5px solid var(--mid-ink);
  background: #fff;
  padding: 5px 12px;
  color: var(--mid-ink);
}

/* Plans — chunky cards, accent-painted featured plan. */
.lp.dir-mid .lp-plans { gap: 18px; max-width: 1000px; margin: 0 auto; }
.lp.dir-mid .lp-plan {
  border: 2px solid var(--mid-ink);
  border-radius: 22px;
  box-shadow: var(--shadow-chunky-md);
  background: #fff;
  padding: 28px 26px;
}
.lp.dir-mid .lp-plan.featured {
  background: var(--accent);
  color: #fff;
  border-color: var(--mid-ink);
  box-shadow: var(--shadow-chunky-md);
}
.lp.dir-mid .lp-plan.featured .lp-plan-list li { color: rgba(255,255,255,0.92); }
.lp.dir-mid .lp-plan.featured .lp-plan-list li::before { color: var(--accent-3); }
.lp.dir-mid .lp-plan.featured .lp-plan-tag { color: var(--accent-3); background: rgba(255,255,255,0.18); }
.lp.dir-mid .lp-plan-price {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 52px;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.lp.dir-mid .lp-plan-price .unit {
  font-family: "Geist", system-ui, sans-serif;
  font-style: normal;
  font-size: 14px;
  margin-left: 4px;
}
.lp.dir-mid .lp-plan.featured .lp-plan-price .unit { color: rgba(255,255,255,0.78); }

/* Final CTA — radial backdrop, chunky shadow. */
.lp.dir-mid .lp-final {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(37,83,245,0.12), transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 60%, rgba(90,158,255,0.18), transparent 70%),
    #fff;
  border: 2px solid var(--mid-ink);
  border-radius: 24px;
  box-shadow: var(--shadow-chunky-md);
  padding: 64px 28px;
  margin: 0 auto 80px;
}
.lp.dir-mid .lp-final h2 { font-size: 44px; letter-spacing: -0.02em; }
.lp.dir-mid .lp-final h2 .accent-italic { color: var(--accent); }

/* Editor demo — chunky card. */
.lp.dir-mid .lp-editor-card {
  border: 2px solid var(--mid-ink);
  border-radius: 22px;
  box-shadow: var(--shadow-chunky);
  max-width: 940px;
  margin: 0 auto;
}
.lp.dir-mid .lp-editor-target {
  border-width: 2.5px;
  border-radius: 12px;
}
.lp.dir-mid .lp-editor-toolbar {
  background: var(--mid-ink);
  color: #fff;
  border: 2px solid var(--mid-ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--accent);
}
.lp.dir-mid .lp-editor-toolbar::after { display: none; }
.lp.dir-mid .lp-editor-tool { color: rgba(255,255,255,0.85); }
.lp.dir-mid .lp-editor-tool--icon { color: rgba(255,255,255,0.7); }
.lp.dir-mid .lp-editor-tool-sep { background: rgba(255,255,255,0.2); }
.lp.dir-mid .lp-editor-tool--ai {
  background: var(--accent);
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-weight: 600;
}
.lp.dir-mid .lp-editor-tool--ai .lp-editor-ai-mark { color: #fff; }

/* Footer & nav touch-ups for mid. */
.lp.dir-mid .lp-nav { background: rgba(255, 255, 255, 0.85); border-bottom-color: var(--line); }
.lp.dir-mid .lp-footer { border-top-color: var(--line); }

@media (max-width: 900px) {
  .lp.dir-mid .lp-headline { font-size: 38px; }
  .lp.dir-mid .lp-section-title { font-size: 28px; }
  .lp.dir-mid .lp-final h2 { font-size: 30px; }
  .lp.dir-mid .lp-features { grid-template-columns: 1fr; }
  .lp.dir-mid .lp-story-pulse-card--lead { transform: none; }
  .lp.dir-mid .lp-hero::before,
  .lp.dir-mid .lp-hero::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lp.dir-mid .lp-hero::before,
  .lp.dir-mid .lp-hero::after { animation: none; }
  .lp.dir-mid .lp-story-pulse-status-idle,
  .lp.dir-mid .lp-story-pulse-when--idle { display: none; }
  .lp.dir-mid .lp-story-pulse-status-ready,
  .lp.dir-mid .lp-story-pulse-when--ready { position: static; opacity: 1; animation: none; }
  .lp.dir-mid .lp-story-pulse-lead--new,
  .lp.dir-mid .lp-story-pulse-step--ready { opacity: 1; animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   /build wizard — adaptive questionnaire that replaces the
   single-shot hero form. Lives under .lp so it inherits the
   marketing palette + typography.
   ───────────────────────────────────────────────────────────── */
.build-hero { padding-bottom: 40px; }
.build-hero-sub { max-width: 640px; }

.build-wizard {
  margin: 32px auto 0;
  max-width: 720px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.build-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.build-progress-fill {
  height: 100%;
  background: var(--accent, #C77D5C);
  width: 0;
  transition: width 0.4s ease;
}
.build-progress-label {
  font-size: 13px;
  color: var(--ink-3, #6B6F78);
  margin-bottom: 24px;
  text-align: left;
}

.build-step {
  background: #fff;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 18px;
  padding: 28px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.build-step[hidden] { display: none; }

.build-form { display: flex; flex-direction: column; gap: 16px; }
.build-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.build-form-hint { font-size: 13px; color: var(--ink-3, #6B6F78); }
.build-form-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.build-field-label {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-3, #6B6F78);
  margin-bottom: 8px;
}

.build-prompt-input {
  width: 100%;
  font-size: 16px;
  resize: vertical;
}

.build-prompt-quote {
  background: rgba(0, 0, 0, 0.025);
  border-left: 3px solid var(--accent, #C77D5C);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 4px;
}
.build-prompt-quote-label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3, #6B6F78);
  margin-bottom: 4px;
}
.build-prompt-quote blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-1, #2B2B2B);
}

.build-field + .build-field { margin-top: 18px; }

.build-radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 8px;
}
.build-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  min-height: 44px;
}
.build-radio:hover { border-color: var(--ink-3, #6B6F78); }
.build-radio:has(input:checked) {
  border-color: var(--accent, #C77D5C);
  background: rgba(199, 125, 92, 0.06);
}
.build-radio input { accent-color: var(--accent, #C77D5C); }
.build-radio-label { font-size: 14.5px; color: var(--ink-1, #2B2B2B); }

.build-followup { display: flex; flex-direction: column; gap: 12px; }
.build-followup-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}
.build-followup-option {
  text-align: left;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
  font-size: 14.5px;
  color: var(--ink-1, #2B2B2B);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.06s;
  min-height: 48px;
  font-family: inherit;
}
.build-followup-option:hover {
  border-color: var(--accent, #C77D5C);
  background: rgba(199, 125, 92, 0.05);
}
.build-followup-option.is-selected {
  border-color: var(--accent, #C77D5C);
  background: rgba(199, 125, 92, 0.1);
}
.build-followup-option:disabled { cursor: progress; opacity: 0.75; }

.build-followup-loading,
.build-followup-error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-3, #6B6F78);
}
.build-followup-error { color: var(--accent, #C77D5C); }

.build-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--accent, #C77D5C);
  border-radius: 50%;
  display: inline-block;
  animation: build-spin 0.7s linear infinite;
}
.build-spinner--lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes build-spin { to { transform: rotate(360deg); } }

.build-step--recap { padding: 28px; }
.build-recap-head { text-align: center; margin-bottom: 20px; }
.build-recap-head h2 { margin: 0 0 6px; }

.build-recap-card {
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 8px 0;
  margin-bottom: 22px;
}
.build-recap-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--line, rgba(0, 0, 0, 0.06));
  align-items: start;
}
.build-recap-row:first-child { border-top: 0; }
.build-recap-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3, #6B6F78);
  padding-top: 2px;
}
.build-recap-value { font-size: 14.5px; color: var(--ink-1, #2B2B2B); line-height: 1.5; }

.build-claim-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.build-claim-trust {
  font-size: 13px;
  color: var(--ink-3, #6B6F78);
  text-align: center;
  max-width: 480px;
}
.build-claim-back {
  display: block;
  margin: 14px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3, #6B6F78);
  text-decoration: none;
}
.build-claim-back:hover { color: var(--accent, #C77D5C); }

@media (max-width: 600px) {
  .build-recap-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; }
}

/* Home: feature deep-link grid linking to /features/:slug pages. */
.lp-feature-deeplinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
  margin-top: 8px;
}
.lp-feature-deeplink {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: var(--ink-1, #2B2B2B);
  transition: border-color 0.15s, transform 0.06s, box-shadow 0.15s;
}
.lp-feature-deeplink:hover {
  border-color: var(--accent, #C77D5C);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.lp-feature-deeplink-glyph {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(199, 125, 92, 0.08);
  color: var(--accent, #C77D5C);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-feature-deeplink-text { flex: 1; }
.lp-feature-deeplink-title { font-weight: 600; font-size: 15.5px; }
.lp-feature-deeplink-sub { font-size: 13.5px; color: var(--ink-3, #6B6F78); margin-top: 2px; }
.lp-feature-deeplink-arrow { color: var(--ink-3, #6B6F78); font-size: 22px; }

/* ─────────────────────────────────────────────────────────────
   /features/:slug pages — long-form benefit-led pitch for each
   high-intent feature. Shared layout for all six configs in
   FeatureCatalog.
   ───────────────────────────────────────────────────────────── */
.feature-hero { padding-bottom: 48px; }
.feature-hero-sub { max-width: 660px; }
.feature-hero-cta { justify-content: center; margin-top: 22px; }

.feature-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.feature-benefit {
  display: flex;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  background: #fff;
}
.feature-benefit-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(199, 125, 92, 0.1);
  color: var(--accent, #C77D5C);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-benefit-title { margin: 0 0 6px; font-size: 16px; }
.feature-benefit-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2, #4A4A52); }

.feature-how-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}
.feature-how-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
}
.feature-how-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent, #C77D5C);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13.5px;
  flex-shrink: 0;
}
.feature-how-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-1, #2B2B2B); }

.feature-proof-section { padding-top: 40px; padding-bottom: 40px; }
.feature-proof-card {
  text-align: center;
  padding: 28px;
  background: #fff;
  border: 1px dashed var(--line, rgba(0, 0, 0, 0.18));
  border-radius: 14px;
}
.feature-proof-eyebrow {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3, #6B6F78);
  margin-bottom: 4px;
}
.feature-proof-body { font-size: 16px; color: var(--ink-1, #2B2B2B); margin-bottom: 14px; }

.feature-faqs { display: flex; flex-direction: column; gap: 8px; }
.feature-faq {
  background: #fff;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 14px 18px;
}
.feature-faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feature-faq summary::after {
  content: "+";
  color: var(--ink-3, #6B6F78);
  font-size: 20px;
  font-weight: 300;
  margin-left: 12px;
}
.feature-faq[open] summary::after { content: "–"; }
.feature-faq p {
  margin: 10px 0 0;
  font-size: 14.5px;
  color: var(--ink-2, #4A4A52);
  line-height: 1.55;
}

.feature-final { padding: 64px 28px; }

@media (max-width: 700px) {
  .build-step { padding: 22px; }
  .build-form-row { flex-direction: column; align-items: stretch; }
  .build-form-row .btn { width: 100%; justify-content: center; }
}

/* Video Hero Styles */
.lp-hero-video-container {
  max-width: 800px;
  margin: 32px 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.lp-hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

body {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: auto !important;
  box-sizing: border-box;
}
/* Drop any inline grid-row placements that leave empty rows behind —
   sections always auto-flow vertically, only their column placement
   is user-controlled. */
body > * {
  min-width: 0; min-height: 0;
  grid-column: 1 / -1;
  grid-row: auto !important;
  max-width: 100%;
}
/* Media never overflows its container on a narrow viewport. */
body img, body video, body iframe, body svg {
  max-width: 100%;
  height: auto;
}
/* Mirrors the editor preview's mobile chrome (page_editor_controller.js
   GRID_CSS @media block) so what the owner sees in the iframe is what
   phone visitors see. The corpus's per-section CSS rarely ships its own
   mobile rules; these blanket overrides — !important so they win over
   the section-scoped class declarations — keep typography readable,
   padding sane, and inner grids / flex rows collapsed to a single
   column under 768px. */
@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr !important;
  }
  body > * {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  body > section {
    padding-left:  clamp(14px, 4vw, 28px) !important;
    padding-right: clamp(14px, 4vw, 28px) !important;
    padding-top:    clamp(28px, 7vw, 56px) !important;
    padding-bottom: clamp(28px, 7vw, 56px) !important;
  }
  body > section h1 {
    font-size: clamp(26px, 8vw, 40px) !important;
    line-height: 1.15 !important;
    word-wrap: break-word;
  }
  body > section h2 {
    font-size: clamp(22px, 6.5vw, 32px) !important;
    line-height: 1.2 !important;
  }
  body > section h3 {
    font-size: clamp(18px, 5vw, 24px) !important;
    line-height: 1.25 !important;
  }
  body > section[style*="grid"],
  body > section {
    grid-template-columns: 1fr !important;
  }
  body > section [style*="display: flex"],
  body > section [style*="display:flex"] {
    flex-wrap: wrap !important;
  }
}