/* ── Landing (signed out) ──
   The marketing page on the app's own tokens: one accent (--brand), light and dark, every picture a real run drawn by the
   run page's pipeline. Sections share one measure; the hero sits on a faint grid, the "why" section on a tinted band. */

.lp { --lp-w: 1200px; --lp-pad: max(24px, calc((100% - var(--lp-w)) / 2)); width: 100%; background: var(--surface); color: var(--text); }
.lp > section, .lp > footer { padding-left: var(--lp-pad); padding-right: var(--lp-pad); }
.lp h1, .lp h2, .lp h3 { text-wrap: balance; }
.lp-label { margin: 0; font-family: var(--mono-font); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-text); }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lp .muted { color: var(--text-3); }

/* Hero */
.lp-hero { position: relative; display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr); gap: 56px; align-items: center;
  padding-top: 48px; padding-bottom: 40px; overflow: hidden; isolation: isolate; }
.lp-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px; opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%); }
.lp-hero::after { content: ''; position: absolute; z-index: -1; right: 6%; top: 10%; width: 46%; height: 70%; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 16%, transparent); filter: blur(80px); pointer-events: none; }
.lp-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 5px 12px 5px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); font-family: var(--mono-font); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.lp-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lp-hero h1 { font-size: clamp(42px, 5vw, 70px); font-weight: 750; letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 22px; }
.lp-hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 82%, var(--brand-soft) 82%, var(--brand-soft) 96%, transparent 96%); }
.lp-lede { font-size: 17.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 30px; max-width: 540px; }
.lp-fine { margin: 18px 0 0; font-family: var(--mono-font); font-size: 12px; color: var(--text-3); letter-spacing: 0.02em; }
.lp-fine.lp-trial-fine { margin-top: 12px; font-family: inherit; font-size: 13px; letter-spacing: 0; color: var(--text-2); max-width: 46ch; }
.lp-trial { max-width: 760px; margin: 0 auto; padding: 56px 24px; text-align: center; }
.lp-trial .lp-head { text-align: center; }
.lp-trial-list { list-style: none; margin: 18px auto 0; padding: 0; display: inline-flex; flex-direction: column; gap: 8px; text-align: left; color: var(--text-2); }
.lp-trial-list li { display: flex; gap: 8px; align-items: center; }
.lp-trial-list li svg { color: var(--green); flex: none; }
.lp-trial-note { margin: 18px 0 0; font-size: 13px; color: var(--text-2); }
.lp-trial .lp-cta { justify-content: center; margin-top: 18px; }

/* The product: a window with the run's graph on the right; the same run as the chat shows it closes the copy column. */
.lp-stage { position: relative; }
.lp-window { background: var(--diagram-bg); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-2); }
.lp-window-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.lp-dots { display: inline-flex; gap: 6px; }
.lp-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.lp-crumb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-family: var(--mono-font); font-size: 12px; }
.lp-crumb span { margin: 0 4px; opacity: 0.6; }
.lp-crumb b { color: var(--text); font-weight: 600; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 12px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.lp-graph { height: 560px; }
.lp-graph .graph-pane { padding: 14px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
.lp-graph .graph-pane::-webkit-scrollbar { display: none; }
.lp-graph .graph-tools { right: 12px; bottom: 12px; }
.lp-chat { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: "head head" "user model"; gap: 8px 18px;
  align-items: start; margin: 32px 0 0; max-width: 560px; padding: 12px 16px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: var(--shadow-1); font-size: 12.5px; }
.lp-chat-head { grid-area: head; }
.lp-bubble.user { grid-area: user; }
.lp-chat-reply { grid-area: model; display: flex; flex-direction: column; gap: 6px; }
.lp-chat-head { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.lp-bubble { line-height: 1.5; }
.lp-bubble.user { justify-self: start; padding: 8px 11px; border-radius: 14px 14px 4px 14px; background: var(--surface-3); color: var(--text); }
.lp-bubble.model { color: var(--text-2); }
.lp-bubble.model b { color: var(--text); font-weight: 600; }
.lp-tool { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono-font); font-size: 11.5px; color: var(--text-3); }
.lp-tool i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.lp-tool span { padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; }

/* Works with */
.lp-works { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-works .lp-label { color: var(--text-3); }
.lp-works ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 12px 40px; flex-wrap: wrap; }
.lp-works li { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; color: var(--text); }
.lp-works li.muted { font-size: 14px; font-weight: 450; letter-spacing: 0; }

/* Section heads */
.lp-section, .lp-band { padding-top: 80px; padding-bottom: 80px; }
.lp-section + .lp-section { border-top: 1px solid var(--line); }
.lp-head { max-width: 720px; margin-bottom: 44px; }
.lp-head h2 { font-size: clamp(30px, 3.2vw, 40px); font-weight: 720; letter-spacing: -0.035em; line-height: 1.1; margin: 12px 0 14px; }
.lp-head p:not(.lp-label) { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }

/* Why: a long prompt vs a workflow */
.lp-band { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lp-versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.lp-side { display: flex; flex-direction: column; gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lp-side.after { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: 0 0 0 4px var(--brand-soft); }
.lp-side h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 650; }
.lp-side.before h3 { color: var(--text-2); }
.lp-prompt { margin: 0; padding: 16px 18px; min-height: 228px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  font-family: var(--mono-font); font-size: 12.5px; line-height: 1.65; color: var(--text-3); white-space: pre-wrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.lp-step { display: flex; flex-direction: column; gap: 10px; min-height: 228px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lp-step-head { display: flex; flex-direction: column; gap: 4px; }
.lp-step-head b { font-size: 16px; font-weight: 650; }
.lp-step p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.lp-todo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.lp-todo svg { color: var(--text-3); flex-shrink: 0; }
.lp-todo.done svg { color: var(--green); }
.lp-todo span { margin-left: auto; font-size: 12px; color: var(--text-3); }
.lp-edges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.lp-edges .edge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--mono-font); font-size: 11.5px; }
.lp-edges .ok { background: var(--green-soft); color: var(--text); }
.lp-edges .no { background: var(--red-soft); color: var(--text-2); }
.lp-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: var(--text-2); }
.lp-points li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.45; }
.lp-points svg { flex-shrink: 0; margin-top: 3px; color: var(--green); }
.lp-points.bad svg { color: var(--red); }

/* Features: a grid split by 1 px lines, like the dashboard's panels */
.lp-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lp-features li { padding: 30px 28px 32px; background: var(--surface); }
.lp-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 18px; }
.lp-features h3, .lp-steps h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.lp-features p, .lp-steps p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* How it works: three numbered columns */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: lp; }
.lp-steps li { counter-increment: lp; padding-top: 22px; border-top: 2px solid var(--line); }
.lp-steps li:first-child { border-top-color: var(--brand); }
.lp-steps li::before { content: counter(lp, decimal-leading-zero); display: block; margin-bottom: 14px; font-family: var(--mono-font); font-size: 13px; color: var(--brand-text); letter-spacing: 0.08em; }

/* FAQ */
.lp-faq { max-width: 860px; border-top: 1px solid var(--line); }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary svg { flex-shrink: 0; color: var(--text-3); transition: transform .2s ease; }
.lp-faq details[open] summary svg { transform: rotate(45deg); }
.lp-faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.lp-faq details p { margin: 0 0 22px; max-width: 720px; color: var(--text-2); font-size: 15px; line-height: 1.65; }

/* Final call to action */
.lp-final { position: relative; overflow: hidden; isolation: isolate; padding-top: 104px; padding-bottom: 104px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.lp-final::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 640px; height: 320px; transform: translate(-50%, -50%);
  border-radius: 50%; background: color-mix(in srgb, var(--brand) 18%, transparent); filter: blur(90px); }
.lp-final h2 { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 750; letter-spacing: -0.045em; line-height: 1.05; }
.lp-final p { margin: 0 0 12px; color: var(--text-2); font-size: 17px; }
.lp-final .lp-cta { justify-content: center; }

/* Footer */
.lp-footer { display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.lp-brand { font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.lp-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.lp-footer a { color: var(--text-2); text-decoration: none; }
.lp-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.lp-footer .muted { margin-left: auto; }

html:has(.lp) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.lp) { scroll-behavior: auto; } .lp * { transition: none !important; } }

/* Tablets: the hero stacks, the chat card sits under the window instead of over its corner. */
@media (max-width: 1060px) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones */
@media (max-width: 760px) {
  .lp > section, .lp > footer { padding-left: 16px; padding-right: 16px; }
  .lp-hero { padding-top: 32px; padding-bottom: 40px; }
  .lp-hero h1 { font-size: 38px; }
  .lp-lede { font-size: 16px; }
  .lp-graph { height: 400px; }
  .lp-chat { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "user" "model"; }
  .lp-works { gap: 14px; }
  .lp-works ul { gap: 8px 22px; }
  .lp-works li { font-size: 16px; }
  .lp-section, .lp-band { padding-top: 64px; padding-bottom: 64px; }
  .lp-head { margin-bottom: 28px; }
  .lp-versus, .lp-features, .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-steps { gap: 28px; }
  .lp-side { padding: 20px; }
  .lp-final { padding-top: 72px; padding-bottom: 72px; }
  .lp-footer .muted { margin-left: 0; }
}
