/* Sphere Engine LP gen1 — from docs/lp/sphere-engine-design-system.md */
:root {
  --se-ink: #142443;
  --se-muted: #526078;
  --se-primary: #1557E8;
  --se-primary-hover: #1046BB;
  --se-primary-soft: #EAF0FF;
  --se-mint: #00D6AA;
  --se-mint-text: #006B58;
  --se-surface: #FFFFFF;
  --se-canvas: #F5F7FB;
  --se-line: #D9E1EE;
  --se-control-border: #7B88A0;
  --se-dark: #101D38;
  --se-on-dark: #F4F7FF;
  --se-on-dark-muted: #B4C3E0;
  --se-success: #167347;
  --se-warning: #8A5100;
  --se-error: #B32635;
  --se-space-4: 4px;
  --se-space-8: 8px;
  --se-space-12: 12px;
  --se-space-16: 16px;
  --se-space-24: 24px;
  --se-space-32: 32px;
  --se-space-48: 48px;
  --se-space-64: 64px;
  --se-space-96: 96px;
  --se-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --se-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --se-radius-control: 8px;
  --se-radius-card: 16px;
  --se-radius-feature: 24px;
  --se-container: 1200px;
  --se-motion-fast: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--se-canvas);
  color: var(--se-ink);
  font: 18px/1.65 var(--se-font-sans);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--se-primary); text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--se-primary);
  outline-offset: 4px;
}

.wrap {
  max-width: calc(var(--se-container) + 64px);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.site-header {
  border-top: 5px solid var(--se-primary);
  background: var(--se-surface);
  border-bottom: 1px solid var(--se-line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.wordmark {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--se-ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--se-primary); }
.nav-main {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav-main > a,
.nav-drop > summary {
  color: var(--se-muted);
  text-decoration: none;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.nav-main > a:hover,
.nav-drop > summary:hover,
.nav-main > a[aria-current="page"] { color: var(--se-ink); }
.nav-drop { position: relative; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: " ▾"; font-size: 10px; }
.nav-drop[open] > summary { color: var(--se-ink); }
.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-card);
  padding: 10px;
  box-shadow: 0 12px 32px rgba(20, 36, 67, 0.08);
  display: grid;
  gap: 2px;
}
.nav-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--se-ink);
  font-size: 14px;
}
.nav-panel a:hover { background: var(--se-primary-soft); }
.nav-panel small {
  display: block;
  color: var(--se-muted);
  font-size: 12px;
  margin-top: 2px;
}
.nav-panel-sep {
  height: 1px;
  margin: 8px 4px;
  background: var(--se-line);
  border: 0;
}
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-account .nav-panel { left: auto; right: 0; min-width: 220px; }
.nav-account-label {
  margin: 0;
  padding: 8px 12px 4px;
  color: var(--se-muted);
  font-size: 12px;
  font-weight: 600;
  word-break: break-word;
}
.nav-panel a.nav-admin { color: var(--se-error); }
.nav-signin {
  color: var(--se-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--se-line);
  background: var(--se-surface);
  border-radius: var(--se-radius-control);
  min-height: 40px;
  padding: 8px 12px;
  font: 600 13px var(--se-font-sans);
  color: var(--se-ink);
  cursor: pointer;
}

/* Buttons */
.se-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--se-radius-control);
  font: 600 16px/1.3 var(--se-font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--se-motion-fast);
}
.se-button-primary { background: var(--se-primary); color: var(--se-surface); }
.se-button-primary:hover { background: var(--se-primary-hover); }
.se-button-secondary {
  background: var(--se-surface);
  color: var(--se-primary);
  border-color: var(--se-control-border);
}
.se-button-secondary:hover { background: var(--se-primary-soft); }
.se-button-ghost {
  background: transparent;
  color: var(--se-on-dark);
  border-color: transparent;
  font-weight: 600;
  min-height: auto;
  padding: 12px 0;
}
.se-button-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* Hero */
.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-solo { grid-template-columns: 1fr; max-width: 760px; }
.comparison-hero.hero-solo {
  max-width: none;
  width: 100%;
}
.eyebrow {
  font: 600 12px/1.5 var(--se-font-mono);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--se-primary);
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -2px;
  font-weight: 700;
  margin: 0 0 20px;
}
h1 em { font-style: normal; color: var(--se-primary); }
.lead {
  font-size: 19px;
  color: var(--se-muted);
  max-width: 640px;
  margin: 0 0 28px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--se-muted);
  margin: 28px 0 0;
}
.crumbs a { color: var(--se-muted); text-decoration: none; }
.crumbs a:hover { color: var(--se-primary); }
.crumbs span[aria-hidden] { color: var(--se-line); }

/* Sections */
main section { padding: 56px 0; }
main section + section { border-top: 1px solid var(--se-line); }
main section + section.section-continue {
  border-top: none;
  padding-top: 0;
}
.pricing-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: 24px;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}
.pricing-card .list-plain {
  text-align: left;
  width: 100%;
}
.pricing-offer-art {
  width: auto;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 0 16px;
}
.pricing-card-actions {
  margin-top: auto;
  padding-top: 20px;
  justify-content: center;
  width: 100%;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--se-muted);
  font: 600 12px var(--se-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--se-line);
}
.se-button-google {
  width: 100%;
}
@media (max-width: 720px) {
  .pricing-offers {
    grid-template-columns: 1fr;
    max-width: 340px;
  }
}
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head-cta {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}
.section-head-cta h2 { margin: 0; }
.section-head-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}
.section-head-actions .micro { margin: 0; }
h2 {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.18;
  letter-spacing: -1px;
  margin: 0 0 14px;
}
h3 {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 10px;
}
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.note { font-size: 14px; color: var(--se-muted); }
.tag {
  display: inline-block;
  background: var(--se-primary-soft);
  color: var(--se-primary);
  padding: 5px 11px;
  border-radius: 5px;
  font: 600 12px var(--se-font-mono);
}

/* Grids / cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-card);
  padding: 28px;
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--se-motion-fast), box-shadow var(--se-motion-fast);
}
.card-link:hover {
  border-color: var(--se-primary);
  box-shadow: 0 8px 24px rgba(21, 87, 232, 0.08);
}
.card .product-name {
  color: var(--se-primary);
  font: 600 13px var(--se-font-mono);
  margin-bottom: 12px;
}
.card p { font-size: 16px; color: var(--se-muted); }
.card .more {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--se-primary);
}
.number {
  font: 500 13px var(--se-font-mono);
  color: var(--se-primary);
  display: block;
  margin-bottom: 14px;
}

/* Proof / trust */
.trust-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px 64px;
}
.trust-copy { max-width: 640px; }
.trust-copy .note + .note { margin-top: 8px; }
.trust-band .trust {
  justify-content: flex-end;
  text-align: right;
  padding: 0;
  flex: none;
}
.trust-band + .logo-row { margin-top: 36px; }
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 0;
}
.stat strong {
  display: block;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.1;
}
.stat span { color: var(--se-muted); font-size: 14px; }
.trust-label {
  font: 600 12px var(--se-font-mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--se-muted);
}

/* Code / dark demo */
.demo {
  background: var(--se-dark);
  color: var(--se-on-dark);
  border-radius: var(--se-radius-feature);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.demo h2, .demo h3 { color: var(--se-on-dark); }
.demo p, .demo li { color: var(--se-on-dark-muted); }
.demo .eyebrow { color: var(--se-mint); }
pre, .code {
  font-family: var(--se-font-mono);
  font-size: 13px;
  line-height: 1.75;
  background: #0b1428;
  color: var(--se-on-dark);
  padding: 22px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}
.code-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.code-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--se-on-dark-muted);
  font: 600 12px var(--se-font-mono);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.code-tabs button[aria-selected="true"] {
  background: rgba(234, 240, 255, 0.1);
  color: var(--se-on-dark);
  border-color: rgba(234, 240, 255, 0.2);
}
.demo-list { margin: 0; padding-left: 18px; }
.demo-list li { margin-bottom: 10px; }

/* Diagram panels */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.flow-step {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: 12px;
  padding: 20px;
}
.flow-step.active {
  background: var(--se-primary-soft);
  border-color: var(--se-primary);
}
.flow-step .label {
  font: 700 12px var(--se-font-mono);
  color: var(--se-muted);
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.flow-step.active .label { color: var(--se-primary); }
.flow-arrow {
  align-self: center;
  color: var(--se-primary);
  font-weight: 700;
  font-size: 20px;
}

/* Banner for assessment modules */
.module-banner {
  background: var(--se-primary-soft);
  border-bottom: 1px solid var(--se-line);
  padding: 14px 0;
  font-size: 14px;
  color: var(--se-ink);
}
.module-banner a { font-weight: 600; }

/* Table */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--se-line);
  border-radius: 12px;
  background: var(--se-surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  text-align: left;
  background: var(--se-primary-soft);
  font-weight: 600;
}
th, td {
  padding: 16px 18px;
  vertical-align: top;
  border-bottom: 1px solid var(--se-line);
}
tr:last-child td { border-bottom: none; }
td:first-child { min-width: 140px; }
.comparison-table td:first-child,
.comparison-table th:first-child {
  font-weight: 400;
  min-width: 210px;
  width: 32%;
}
.comparison-table td:first-child strong {
  font-weight: 650;
}
.yes { color: var(--se-success); font-weight: 600; }
.no { color: var(--se-muted); }
.partial { color: var(--se-warning); font-weight: 600; }

/* Choose when */
.choose {
  border-left: 3px solid var(--se-mint);
  padding: 4px 0 4px 20px;
  margin-bottom: 18px;
}
.choose strong { display: block; margin-bottom: 4px; }

/* Bottom proof row */
.bottom-cta {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-feature);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
}
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 18px;
}
.links-row a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* FAQ */
details.faq {
  border-bottom: 1px solid var(--se-line);
  padding: 18px 0;
}
details.faq summary {
  font-weight: 600;
  cursor: pointer;
}
details.faq p {
  margin-top: 12px;
  color: var(--se-muted);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--se-line);
  background: var(--se-surface);
  padding: 40px 0 28px;
  font-size: 14px;
  color: var(--se-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand .footer-logo {
  display: inline-block;
  margin-bottom: 18px;
  text-decoration: none;
}
.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
}
.footer-grid h4 {
  margin: 0 0 14px;
  font: 600 12px var(--se-font-mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--se-ink);
}
.footer-grid a {
  display: block;
  color: var(--se-muted);
  text-decoration: none;
  margin-bottom: 8px;
}
.footer-grid a:hover { color: var(--se-primary); }
.footer-company { text-align: right; }
.footer-meta a {
  color: var(--se-muted);
  text-decoration: none;
}
.footer-meta a:hover { color: var(--se-primary); }
.footer-meta {
  border-top: 1px solid var(--se-line);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 13px;
}

.list-plain { margin: 0; padding-left: 18px; color: var(--se-muted); }
.list-plain li { margin-bottom: 10px; }
.callout {
  background: var(--se-primary-soft);
  border-radius: var(--se-radius-card);
  padding: 28px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill {
  display: inline-block;
  border: 1px solid var(--se-line);
  background: var(--se-surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  text-decoration: none;
  color: var(--se-ink);
}
.pill:hover { border-color: var(--se-primary); color: var(--se-primary); }

.diagram-frame {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-feature);
  padding: 24px;
}

@media (max-width: 960px) {
  .hero, .demo, .bottom-cta, .grid-3, .grid-2, .grid-4, .footer-grid, .flow {
    grid-template-columns: 1fr;
  }
  .trust-band { flex-direction: column; align-items: flex-start; }
  .trust-band .trust { justify-content: flex-start; text-align: left; }
  .footer-company { text-align: left; }
  .flow-arrow { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-main, .nav-actions .nav-signin { display: none; }
  .nav.is-open .nav-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--se-surface);
    border-bottom: 1px solid var(--se-line);
    padding: 16px 32px 24px;
    gap: 14px;
  }
  .nav.is-open .nav-main .nav-panel {
    position: static;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 12px;
    min-width: 0;
  }
  .nav { flex-wrap: wrap; position: relative; }
}

@media (max-width: 540px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  h1 { letter-spacing: -1.4px; }
  .hero { padding: 42px 0 32px; gap: 28px; }
  .card, .demo, .bottom-cta { padding: 22px; }
  main section { padding: 42px 0; }
}

/* Trust logos */
.trust-centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  justify-content: center;
}
.trust-centered .trust-label { width: 100%; }
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 64px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.logo-row img {
  height: 32px;
  width: auto;
  opacity: 0.72;
  filter: grayscale(1);
}
.wordmark-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Existing product illustrations */
.hero-art {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-feature);
  padding: 18px;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: auto;
  display: block;
}
.product-art,
.feature-art,
.media-card-img,
.callout-art,
.cta-art {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-bottom: 18px;
  background: var(--se-primary-soft);
}
.media-card .media-card-img { margin-top: 0; }

/* Pricing cards: equal illustration boxes (source PNGs differ in width) */
.pricing-art-frame {
  height: 180px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--se-primary-soft);
  border-radius: 12px;
  padding: 20px;
}
.pricing-art {
  width: auto;
  max-width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0;
  background: transparent;
}
.callout-media,
.bottom-cta-media {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.callout-media .callout-art,
.bottom-cta-media .cta-art {
  margin-bottom: 0;
}

/* Stacked feature / scenario rows */
.stack-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.feature-row {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 36px;
  align-items: center;
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-card);
  padding: 28px;
}
.feature-row-plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.feature-row-rev .feature-row-art { order: 2; }
.feature-row-rev .feature-row-copy { order: 1; }
.feature-row-art .feature-art {
  margin-bottom: 0;
}
.feature-row-copy h3 { margin-top: 0; }
.feature-row-copy .product-name { margin-bottom: 10px; }

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 56px;
  align-items: center;
  justify-content: center;
  padding: 12px 0 8px;
}
.tech-icon {
  margin: 0;
  text-align: center;
  width: 88px;
}
.tech-icon img {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
}
.tech-icon figcaption {
  font-size: 13px;
  color: var(--se-muted);
}

/* Benefits checklist */
.benefits-panel {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-feature);
  padding: 36px 40px;
  max-width: 820px;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.check-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 8px;
  border-bottom: 1px solid var(--se-line);
  font-size: 17px;
  line-height: 1.45;
  color: var(--se-ink);
}
.check-item:last-child { border-bottom: none; }
.check-mark {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--se-primary-soft);
  border: 1.5px solid var(--se-primary);
  position: relative;
  flex-shrink: 0;
}
.check-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--se-primary);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}
.photo-strip-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--se-radius-card);
  border: 1px solid var(--se-line);
}

/* Forms */
.se-form {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.se-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.se-input, .se-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--se-control-border);
  border-radius: var(--se-radius-control);
  background: var(--se-surface);
  color: var(--se-ink);
  font: 16px var(--se-font-sans);
}
.se-textarea { min-height: 140px; resize: vertical; }
.se-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--se-muted);
}
.se-check input { margin-top: 4px; }

/* Legal / long prose */
.prose {
  max-width: 820px;
  font-size: 16px;
}
.prose h2, .prose h3, .prose h4 {
  margin-top: 32px;
}
.prose ol, .prose ul {
  padding-left: 22px;
  color: var(--se-muted);
}
.prose li { margin-bottom: 10px; }
.prose p { color: var(--se-ink); }

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.feature-list .card { padding: 22px; }
.feature-list p { font-size: 15px; color: var(--se-muted); margin: 0; }

.quote {
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-card);
  padding: 28px;
}
.quote p { font-size: 17px; margin-bottom: 18px; }
.quote cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  color: var(--se-muted);
}
.quote cite strong { color: var(--se-ink); }

.badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--se-mint);
  color: var(--se-mint-text);
  font: 700 10px/1.4 var(--se-font-mono);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: middle;
}

.address {
  font-size: 15px;
  color: var(--se-muted);
  line-height: 1.7;
}
.address a { font-weight: 600; text-decoration: none; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.filter-bar label { font-size: 14px; font-weight: 600; }
.filter-bar select {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--se-control-border);
  border-radius: var(--se-radius-control);
  background: var(--se-surface);
  font: 15px var(--se-font-sans);
  color: var(--se-ink);
}

@media (max-width: 960px) {
  .hero-split, .feature-list, .callout-media, .bottom-cta-media,
  .feature-row, .feature-row-rev { grid-template-columns: 1fr; }
  .feature-row-rev .feature-row-art,
  .feature-row-rev .feature-row-copy { order: unset; }
  .benefits-panel { padding: 24px; }
  .logo-row { gap: 28px 40px; }
  .icon-row { gap: 24px 36px; }
}

/* —— App shell (post-login dashboard) —— */
.app-body {
  background: var(--se-canvas);
  min-height: 100vh;
}
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.app-sidebar {
  background: var(--se-dark);
  color: var(--se-on-dark);
  padding: 20px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
}
.app-sidebar-brand {
  padding: 8px 20px 12px;
}
.app-wordmark {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.app-org {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid rgba(180, 195, 224, 0.22);
  border-radius: var(--se-radius-control);
  background: rgba(244, 247, 255, 0.06);
  color: var(--se-on-dark);
  cursor: pointer;
  font: inherit;
}
.app-org:hover { background: rgba(244, 247, 255, 0.1); }
.app-org-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.app-org-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--se-on-dark-muted);
}
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px 16px;
}
.app-nav-label {
  margin: 16px 8px 6px;
  font: 600 11px/1.4 var(--se-font-mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--se-on-dark-muted);
}
.app-nav-link,
.app-nav-sub,
.app-nav-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--se-on-dark-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.app-nav-details > summary::-webkit-details-marker { display: none; }
.app-nav-details > summary::after {
  content: "▸";
  margin-left: auto;
  font-size: 10px;
  opacity: 0.7;
}
.app-nav-details[open] > summary::after { content: "▾"; }
.app-nav-link:hover,
.app-nav-sub:hover,
.app-nav-details > summary:hover {
  background: rgba(244, 247, 255, 0.08);
  color: var(--se-on-dark);
}
.app-nav-link[aria-current="page"],
.app-nav-sub[aria-current="page"] {
  background: rgba(21, 87, 232, 0.35);
  color: var(--se-on-dark);
  font-weight: 600;
}
.app-nav-sub {
  padding-left: 28px;
  font-size: 13px;
  font-weight: 400;
}
.app-nav-details {
  margin: 0;
}
.app-nav .badge-new {
  margin-left: 6px;
}
.app-nav .prototype,
.app-org.prototype {
  opacity: 0.95;
}
.app-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}
.app-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  background: var(--se-surface);
  border-bottom: 1px solid var(--se-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-topbar-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--se-muted);
  min-width: 0;
}
.app-topbar-crumbs [aria-current="page"] {
  color: var(--se-ink);
  font-weight: 600;
}
.app-crumb-sep { color: var(--se-line); }
.app-topbar-spacer { flex: 1; }
.nav-ico {
  flex-shrink: 0;
  opacity: 0.9;
}
.app-menu-toggle {
  display: none;
  border: 1px solid var(--se-line);
  background: var(--se-surface);
  border-radius: var(--se-radius-control);
  min-height: 40px;
  padding: 8px 12px;
  font: 600 13px var(--se-font-sans);
  color: var(--se-ink);
  cursor: pointer;
}
.app-profile {
  position: relative;
}
.app-profile > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--se-muted);
  padding: 8px 4px;
}
.app-profile > summary::-webkit-details-marker { display: none; }
.app-profile > summary::after { content: " ▾"; font-size: 10px; }
.app-profile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: var(--se-surface);
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-control);
  padding: 8px;
  box-shadow: 0 12px 32px rgba(20, 36, 67, 0.08);
}
.app-profile-panel a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--se-ink);
  font-size: 14px;
}
.app-profile-panel a:hover { background: var(--se-primary-soft); }
.app-main {
  padding: 28px 28px 48px;
  flex: 1;
}
.app-main > .dash-section {
  padding: 0;
  border-top: none;
}
.app-main > .dash-section + .dash-section {
  margin-top: 24px;
  border-top: none;
}
.app-backdrop {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.dash-head h1 {
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -1px;
  margin: 0 0 8px;
}
.dash-lead {
  margin: 0;
  font-size: 16px;
  color: var(--se-muted);
}
.dash-range select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--se-control-border);
  border-radius: var(--se-radius-control);
  background: var(--se-surface);
  font: 500 14px var(--se-font-sans);
  color: var(--se-ink);
}
.dash-account {
  margin-bottom: 24px;
}
.dash-account > h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 0 0 18px;
}
.dash-account-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.dash-account-meta p {
  margin: 0;
  font-size: 15px;
  color: var(--se-ink);
}
.dash-account-meta strong {
  display: block;
  font-size: 18px;
  margin-top: 2px;
}
.param-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.param-card {
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-control);
  padding: 14px 16px;
  background: var(--se-canvas);
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.param-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--se-ink);
  line-height: 1.35;
}
.param-status {
  margin: 0;
  font: 600 12px/1.3 var(--se-font-sans);
}
.param-value {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.param-active {
  background: #E5F6EC;
  border-color: #B7E0C5;
}
.param-active .param-status { color: var(--se-success); }
.param-inactive {
  background: #EEF1F6;
  border-color: #D0D7E2;
}
.param-inactive .param-label,
.param-inactive .param-status { color: var(--se-muted); }
.param-disabled {
  background: #FCE8EA;
  border-color: #F0C2C8;
}
.param-disabled .param-status { color: var(--se-error); }
.param-metric {
  background: var(--se-surface);
}
.dash-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--se-primary-soft);
  border: 1px solid #C9D8FF;
  border-radius: var(--se-radius-card);
}
.dash-setup h2 {
  font-size: 18px;
  letter-spacing: -0.2px;
  margin: 0 0 4px;
}
.dash-setup p {
  margin: 0;
  font-size: 14px;
  color: var(--se-muted);
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-metric {
  padding: 22px;
}
.dash-k {
  display: block;
  font: 600 12px/1.4 var(--se-font-mono);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--se-muted);
  margin: 0 0 10px;
}
.dash-metric-value {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dash-metric-of {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--se-muted);
  letter-spacing: 0;
}
.dash-metric-note {
  margin: 0;
  font-size: 14px;
  color: var(--se-muted);
}
.dash-ok { color: var(--se-success); font-weight: 600; }
.dash-meter {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: var(--se-line);
  overflow: hidden;
}
.dash-meter > span {
  display: block;
  height: 100%;
  background: var(--se-primary);
  border-radius: inherit;
}
.dash-card {
  padding: 24px 28px;
}
.dash-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dash-card-head h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 0 0 4px;
}
.dash-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.dash-link::after { content: " →"; }
.usage-chart svg {
  width: 100%;
  height: auto;
}
.usage-legend {
  display: flex;
  gap: 20px;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--se-muted);
}
.usage-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 2px;
}
.usage-legend .lg-compilers { background: #1046BB; }
.usage-legend .lg-problems { background: #7BA3F5; }

@media (max-width: 1100px) {
  .dash-metrics { grid-template-columns: 1fr; }
  .dash-account-meta { grid-template-columns: 1fr; }
  .param-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .param-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform var(--se-motion-fast);
    box-shadow: 8px 0 32px rgba(16, 29, 56, 0.25);
  }
  .app-shell.is-nav-open .app-sidebar { transform: translateX(0); }
  .app-menu-toggle { display: inline-flex; }
  .app-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 29, 56, 0.45);
    z-index: 25;
  }
  .app-main { padding: 20px 16px 40px; }
  .app-topbar { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .se-button, .card-link { transition: none; }
  .app-sidebar { transition: none; }
}
