:root {
  /* ScriptPilot brand palette (from assets-src/2026): orange is the primary
     accent, mint is secondary, on a near-black surface. Legacy --indigo/--teal
     names are kept as aliases so existing rules pick up the brand colors. */
  --surface: #1a1a1a;
  --surface-2: #242424;
  --orange: #ff8a4c;
  --mint: #46e0c0;
  --indigo: var(--orange);
  --teal: var(--mint);
  --bg: var(--surface);
  --panel: var(--surface-2);
  --text: #ececec;
  --muted: #9aa3c7;
  --danger: #f87171;
  --ok: var(--mint);
  --line: #2e2e2e;
}
/* Colored wordmark — orange brackets, muted "Script", mint "Pilot" (the asset). */
.logo .lb { color: var(--orange); }
.logo .ls { color: var(--muted); }
.logo .lp { color: var(--mint); }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
#app { height: 100vh; display: flex; flex-direction: column; }
.logo { font-family: ui-monospace, monospace; font-weight: 700; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 13px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }

button, .btn {
  background: var(--orange); color: #1a1a1a; border: 0; border-radius: 6px;
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-block;
}
button.ghost, .ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }

input, textarea {
  width: 100%; background: #0b1222; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: inherit;
}
textarea { min-height: 90px; resize: vertical; }

/* ============================================================
   Landing page
   Dark surface, orange/mint accents — matches the 2026 brand.
   ============================================================ */
.landing {
  flex: 1; min-height: 0; overflow-y: auto;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(70,224,192,.12), transparent 60%),
    radial-gradient(820px 460px at 12% 4%, rgba(255,138,76,.10), transparent 60%),
    var(--surface);
  scroll-behavior: smooth;
}
.landing section { width: 100%; }
.lp-nav, .lp-hero, .lp-section, .lp-providers, .lp-final, .lp-footer {
  max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
}
.brand-mark { display: block; border-radius: 8px; }

/* nav */
.lp-nav {
  display: flex; align-items: center; gap: 20px;
  padding-top: 18px; padding-bottom: 18px;
}
.lp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-brand .logo { font-size: 17px; }
.lp-links { display: flex; gap: 22px; margin-left: 18px; }
.lp-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.lp-links a:hover { color: var(--text); }
.lp-nav-cta { margin-left: auto; padding: 8px 16px; }

/* hero */
.lp-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-top: 56px; padding-bottom: 56px;
}
.lp-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mint);
  border: 1px solid rgba(70,224,192,.35); border-radius: 999px; padding: 5px 12px;
  background: rgba(70,224,192,.08); margin-bottom: 18px;
}
.lp-h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; }
.lp-lead { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0 0 26px; max-width: 36em; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 8px; }
.lp-cta-note { margin-top: 14px; font-size: 13px; }
.lp-hero-visual img {
  width: 100%; height: auto; display: block; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

/* providers strip */
.lp-providers { text-align: center; padding-top: 12px; padding-bottom: 28px; }
.lp-providers-label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.lp-provider-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; }
.lp-provider {
  font-family: ui-monospace, monospace; font-weight: 600; font-size: 15px;
  color: var(--text); opacity: .8;
}
.lp-provider-soon { opacity: .4; font-weight: 500; }

/* section scaffolding */
.lp-section { padding-top: 64px; padding-bottom: 8px; text-align: center; }
.lp-h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; text-transform: none; color: var(--text); }
.lp-section-lead { font-size: 16px; max-width: 44em; margin: 0 auto 36px; }

/* feature grid */
.lp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left;
}
.lp-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; transition: border-color .15s ease, transform .15s ease;
}
.lp-card:hover { transform: translateY(-3px); }

/* Respect the OS-level reduced-motion preference (the a11y widget's "Pause
   animations" toggle covers the manual case). */
@media (prefers-reduced-motion: reduce) {
  .lp-card { transition: none; }
  .lp-card:hover { transform: none; }
}
.lp-card-orange:hover { border-color: rgba(255,138,76,.5); }
.lp-card-mint:hover { border-color: rgba(70,224,192,.5); }
.lp-card-dot { width: 26px; height: 26px; border-radius: 8px; margin-bottom: 14px; }
.lp-card-orange .lp-card-dot { background: rgba(255,138,76,.18); border: 1px solid var(--orange); }
.lp-card-mint .lp-card-dot { background: rgba(70,224,192,.18); border: 1px solid var(--mint); }
.lp-card-title { font-size: 16px; margin: 0 0 8px; color: var(--text); }
.lp-card-body { font-size: 14px; line-height: 1.6; margin: 0; }

/* how it works */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.lp-step { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.lp-step-n {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-family: ui-monospace, monospace; font-weight: 700; font-size: 16px;
  color: #1a1a1a; background: var(--orange); margin-bottom: 14px;
}
.lp-step-title { font-size: 16px; margin: 0 0 8px; color: var(--text); }
.lp-step-body { font-size: 14px; line-height: 1.6; margin: 0; }

/* pricing */
.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 18px; justify-content: center; text-align: left; }
.lp-plan {
  position: relative; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.lp-plan-featured { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.lp-plan-badge {
  position: absolute; top: -11px; left: 26px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: #1a1a1a;
  background: var(--orange); padding: 3px 10px; border-radius: 999px;
}
.lp-plan-name { font-size: 18px; margin: 0; color: var(--text); }
.lp-plan-price { display: flex; align-items: baseline; gap: 4px; }
.lp-plan-amount { font-size: 30px; font-weight: 700; }
.lp-plan-cadence { font-size: 14px; }
.lp-plan-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lp-plan-perks li { position: relative; padding-left: 24px; font-size: 14px; color: var(--muted); }
.lp-plan-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 700; }
.lp-plan-cta { margin-top: 6px; text-align: center; padding: 10px 16px; }

/* final CTA */
.lp-final { text-align: center; padding-top: 72px; padding-bottom: 72px; }
.lp-final .brand-mark { margin: 0 auto 18px; }

/* footer */
.lp-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  border-top: 1px solid var(--line); margin-top: 24px;
  padding-top: 26px; padding-bottom: 40px;
}
.lp-footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.lp-footer-brand .logo { font-size: 14px; }
.lp-footer-links { display: flex; gap: 18px; margin-left: auto; }
.lp-footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; }
.lp-footer-links a:hover { color: var(--text); }
.lp-footer-copy { width: 100%; margin: 0; font-size: 12px; }

/* responsive */
@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .lp-hero-visual { order: -1; }
  .lp-h1 { font-size: 34px; }
  .lp-links { display: none; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; }
  .lp-plans { grid-template-columns: minmax(0, 360px); }
}

/* --- Marketing chat widget --- */
.spc-root { position: fixed; right: 20px; bottom: 20px; z-index: 1000; }
/* The `hidden` attribute must beat the class `display` rules below (a class
   selector would otherwise override the UA [hidden]{display:none} rule). */
.spc-root[hidden], .spc-panel[hidden] { display: none; }
.spc-launcher {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--orange); color: #1a1a1a; font: inherit; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.spc-launcher:hover { filter: brightness(1.05); }
.spc-panel {
  position: absolute; right: 0; bottom: 56px; width: 340px; max-width: calc(100vw - 40px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  transform-origin: bottom right; animation: spc-in 140ms ease-out;
}
@keyframes spc-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spc-panel { animation: none; } }
.spc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.spc-title { font-weight: 600; font-size: 14px; }
.spc-close { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.spc-close:hover { color: var(--text); }
.spc-log { flex: 1 1 auto; max-height: 46vh; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.spc-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.spc-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.spc-user { align-self: flex-end; background: var(--orange); color: #1a1a1a; }
.spc-pending { color: var(--muted); }
.spc-error { color: var(--danger); }
.spc-composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.spc-input {
  flex: 1 1 auto; resize: none; max-height: 96px; padding: 9px 11px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px;
}
.spc-input:focus { outline: none; border-color: var(--orange); }
.spc-send {
  flex: 0 0 auto; align-self: flex-end; padding: 9px 14px; border: 0; border-radius: 10px;
  background: var(--orange); color: #1a1a1a; font: inherit; font-weight: 600; cursor: pointer;
}
.spc-send:hover { filter: brightness(1.05); }
