:root {
  --home-ink: #0b1020;
  --home-panel: #11172a;
  --home-panel-soft: #171f36;
  --home-lilac: #eeecff;
  --home-line: rgba(15, 23, 42, 0.11);
}

body {
  background: #ffffff;
}

.homepage-main {
  overflow: hidden;
}

.homepage-main section {
  position: relative;
}

.homepage-main .section-intro h2,
.homepage-main .trust-copy h2 {
  font-size: clamp(2.25rem, 4.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.homepage-main .section-intro p,
.homepage-main .trust-copy p {
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-home {
  min-height: calc(100vh - 77px);
  display: flex;
  align-items: center;
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(5.5rem, 10vw, 9rem);
  background:
    radial-gradient(circle at 82% 18%, rgba(93, 86, 200, 0.17), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
}

.hero-home::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(93, 86, 200, 0.38), transparent);
}

.hero-home .hero-grid {
  gap: clamp(3rem, 7vw, 7rem);
}

.hero-home .hero-content {
  max-width: 44rem;
}

.hero-home h1 {
  max-width: 12ch;
  font-size: clamp(3.65rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin: 1.25rem 0 1.5rem;
}

.hero-home .lead {
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.6;
}

.hero-home .hero-actions {
  margin-top: 2.2rem;
}

.hero-home .btn-primary,
.hero-home .btn-secondary {
  padding: 1rem 1.35rem;
}

.hero-visual-shell {
  position: relative;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2.25rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 130, 246, 0.28), transparent 18rem),
    var(--home-panel);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.hero-visual-shell::before {
  content: "Live decision boundary";
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual-shell::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 1.65rem;
  left: 1.3rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #7dd3fc;
  box-shadow: 0 0 0 5px rgba(125, 211, 252, 0.1);
}

.hero-visual-shell .screenshot-wrapper {
  border-radius: 1.3rem;
  padding: 0.45rem;
  box-shadow: none;
}

.hero-visual-shell .screenshot-wrapper img {
  border-radius: 1rem;
}

.hero-visual-shell .thread-card {
  top: auto;
  right: -2rem;
  bottom: -2.2rem;
  width: min(15rem, 42%);
  border-radius: 1.1rem;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

.hero-visual-shell .callout {
  left: -2.25rem;
  bottom: 2rem;
  border: 0;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
}

.hero-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.2rem;
  margin-top: 2rem;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-proof-row i {
  color: var(--primary);
}

.community-proof {
  border-bottom: 1px solid var(--home-line);
  background: #ffffff;
}

.community-proof-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.community-proof-label {
  color: #64748b;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.community-proof-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.community-proof-badge {
  display: grid;
  place-items: center;
  width: 250px;
  height: 54px;
  overflow: hidden;
  border-radius: 0.35rem;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.community-proof-badge:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.community-proof-badge:focus-visible {
  outline: 3px solid #5d56c8;
  outline-offset: 3px;
}

.community-proof-badge img,
.community-proof-badge picture {
  display: block;
}

.product-hunt-badge img {
  width: 250px;
  height: 54px;
}

.npm-badge {
  border: 1px solid #d9d9d9;
  background: #ffffff;
}

.npm-badge img {
  width: 250px;
  height: 54px;
}

.control-stage {
  padding: clamp(6rem, 10vw, 10rem) 0;
  background: #ffffff;
}

.control-heading {
  display: grid;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.control-heading h2 {
  max-width: 11ch;
  margin: 0.75rem 0 0;
  font-size: clamp(2.75rem, 5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.control-heading p {
  max-width: 32rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.control-grid {
  display: grid;
  gap: 1.25rem;
}

.control-card {
  position: relative;
  overflow: hidden;
  min-height: 20rem;
  border: 1px solid var(--home-line);
  border-radius: 2rem;
  background: #f7f8fb;
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

.control-card h3 {
  margin: 0.7rem 0 0.6rem;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}

.control-card p {
  max-width: 31rem;
  margin: 0;
  color: var(--text-muted);
}

.control-card-primary {
  min-height: 31rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 0%, rgba(139, 130, 246, 0.3), transparent 25rem),
    var(--home-panel);
  border-color: transparent;
}

.control-card-primary p,
.control-card-primary .small-title {
  color: #cbd5e1;
}

.control-product-frame {
  position: absolute;
  left: clamp(1.5rem, 4vw, 3rem);
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: -1.5rem;
  padding: 0.55rem;
  border-radius: 1.4rem 1.4rem 0 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.25);
}

.control-product-frame img {
  display: block;
  width: 100%;
  border-radius: 1rem 1rem 0 0;
}

.control-card-policy {
  background:
    radial-gradient(circle at 100% 0%, rgba(93, 86, 200, 0.16), transparent 18rem),
    var(--home-lilac);
}

.policy-stack {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
}

.policy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(93, 86, 200, 0.14);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem 1rem;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
}

.policy-row span:last-child {
  color: #4f46e5;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.audit-trail {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.audit-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.audit-dot {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(93, 86, 200, 0.1);
}

.audit-item strong {
  display: block;
  font-size: 0.92rem;
}

.audit-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.workflow-band {
  padding: clamp(6rem, 10vw, 9rem) 0;
  color: #ffffff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--home-ink);
  background-size: 44px 44px;
}

.workflow-band .small-title {
  color: #a5b4fc;
}

.workflow-band h2 {
  max-width: 11ch;
  margin: 0.75rem 0 0;
  font-size: clamp(2.7rem, 5.5vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.workflow-band .workflow-copy {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  color: #94a3b8;
  font-size: 1.08rem;
}

.workflow-rail {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.workflow-step {
  position: relative;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.workflow-step::before {
  content: "";
  position: absolute;
  top: -0.28rem;
  left: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #a5b4fc;
  box-shadow: 0 0 0 7px rgba(165, 180, 252, 0.1);
}

.workflow-step span {
  color: #a5b4fc;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.workflow-step h3 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.35rem;
}

.workflow-step p {
  margin: 0;
  color: #94a3b8;
}

.foresight-stage {
  padding: clamp(6rem, 10vw, 10rem) 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(93, 86, 200, 0.13), transparent 24rem),
    #f4f3ff;
}

.foresight-layout {
  display: grid;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.foresight-copy h2 {
  max-width: 12ch;
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.foresight-copy > p {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.foresight-levels {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.foresight-level {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.foresight-level i {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 10px 25px rgba(93, 86, 200, 0.12);
}

.foresight-level strong {
  display: block;
}

.foresight-level span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.foresight-preview {
  border: 1px solid rgba(93, 86, 200, 0.18);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 35px 80px rgba(93, 86, 200, 0.16);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--home-line);
}

.preview-label {
  color: #475569;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-status {
  border-radius: 999px;
  background: rgba(93, 86, 200, 0.1);
  color: #4f46e5;
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.preview-summary {
  padding: 1.5rem 0;
}

.preview-summary h3 {
  margin: 0;
  font-size: 1.45rem;
}

.preview-summary p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.signal-list {
  display: grid;
  gap: 0.8rem;
}

.signal-row {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr auto;
  gap: 0.8rem;
  align-items: center;
  color: #475569;
  font-size: 0.82rem;
}

.signal-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.signal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d56c8, #8b82f6);
}

.signal-row strong {
  color: #334155;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.preview-advisory {
  margin-top: 1.25rem;
  border: 1px solid rgba(93, 86, 200, 0.16);
  border-radius: 1rem;
  background: #f7f5ff;
  padding: 1rem;
}

.preview-advisory span {
  display: block;
  margin-bottom: 0.4rem;
  color: #4f46e5;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.preview-advisory p {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
}

.developer-stage {
  padding: clamp(6rem, 10vw, 10rem) 0;
  background: #ffffff;
}

.developer-layout {
  display: grid;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.developer-copy h2 {
  max-width: 12ch;
  margin: 0.75rem 0 1.25rem;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.developer-copy > p {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.package-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.package-row span {
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.5rem 0.75rem;
  color: #334155;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}

.developer-console {
  overflow: hidden;
  border-radius: 1.7rem;
  background: #0b1020;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.26);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-bar i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #64748b;
}

.console-bar i:nth-child(1) { background: #fb7185; }
.console-bar i:nth-child(2) { background: #fbbf24; }
.console-bar i:nth-child(3) { background: #4ade80; }

.console-title {
  margin-left: 0.45rem;
  color: #94a3b8;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
}

.developer-console pre {
  margin: 0;
  padding: clamp(1.3rem, 3vw, 2rem);
  overflow-x: auto;
  color: #e2e8f0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(0.78rem, 1.4vw, 0.94rem);
  line-height: 1.8;
}

.code-muted { color: #64748b; }
.code-accent { color: #a5b4fc; }
.code-green { color: #86efac; }

.console-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  margin: 0 1.2rem 1.2rem;
  border: 1px solid rgba(134, 239, 172, 0.18);
  border-radius: 1rem;
  background: rgba(134, 239, 172, 0.06);
  padding: 0.9rem 1rem;
  color: #d1fae5;
  font-size: 0.84rem;
}

.console-result i {
  color: #4ade80;
}

.use-case-stage {
  padding: clamp(6rem, 10vw, 9rem) 0;
  background: #f7f8fb;
}

.use-case-heading {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.use-case-heading h2 {
  max-width: 12ch;
  margin: 0.75rem 0 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.use-case-heading p {
  max-width: 31rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.use-case-list {
  display: grid;
  border-top: 1px solid rgba(15, 23, 42, 0.15);
}

.use-case-row {
  display: grid;
  gap: 0.8rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.15);
}

.use-case-row .use-number {
  color: var(--primary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}

.use-case-row h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.use-case-row p {
  margin: 0;
  color: var(--text-muted);
}

.responsible-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  border-radius: 1.2rem;
  background: #ffffff;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.responsible-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.responsible-strip img {
  width: 1.5rem;
  height: 1.5rem;
}

.responsible-strip a {
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.closing-stage {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 8rem);
  background: #f7f8fb;
}

.closing-panel {
  position: relative;
  overflow: hidden;
  border-radius: 2.5rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(139, 130, 246, 0.38), transparent 28rem),
    var(--home-panel);
  padding: clamp(2.2rem, 6vw, 5.5rem);
  color: #ffffff;
  box-shadow: 0 35px 85px rgba(15, 23, 42, 0.24);
}

.closing-panel::after {
  content: "";
  position: absolute;
  right: -8rem;
  bottom: -11rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  box-shadow:
    0 0 0 4rem rgba(255, 255, 255, 0.025),
    0 0 0 8rem rgba(255, 255, 255, 0.018);
}

.closing-panel h2 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.7rem, 5.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.closing-panel p {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 1.2rem 0 0;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.closing-panel .hero-actions {
  position: relative;
  z-index: 1;
}

.closing-panel .btn-secondary {
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.site-footer {
  background: #ffffff;
}

@media (min-width: 850px) {
  .control-heading,
  .use-case-heading {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.55fr);
  }

  .control-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .control-card-primary {
    grid-column: span 7;
    grid-row: span 2;
  }

  .control-card-policy,
  .control-card-audit {
    grid-column: span 5;
  }

  .workflow-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .foresight-layout,
  .developer-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(25rem, 1.1fr);
  }

  .developer-layout {
    grid-template-columns: minmax(0, 0.82fr) minmax(28rem, 1.18fr);
  }

  .use-case-row {
    grid-template-columns: 4rem minmax(14rem, 0.55fr) minmax(18rem, 1fr);
    align-items: center;
  }
}

@media (max-width: 849px) {
  .hero-home {
    min-height: auto;
  }

  .hero-home h1 {
    max-width: 10ch;
  }

  .hero-visual-shell .thread-card,
  .hero-visual-shell .callout {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 1rem;
  }

  .control-card-primary {
    min-height: 27rem;
  }

  .signal-row {
    grid-template-columns: 1fr auto;
  }

  .signal-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .hero-home h1 {
    font-size: clamp(3.2rem, 16vw, 4.6rem);
  }

  .hero-proof-row {
    display: grid;
  }

  .control-card,
  .foresight-preview,
  .closing-panel {
    border-radius: 1.4rem;
  }

  .control-product-frame {
    left: 1rem;
    right: 1rem;
  }
}

/* Keep the homepage's custom surfaces in sync with the global theme. */
:root[data-theme="dark"] .homepage-main,
:root[data-theme="dark"] .community-proof,
:root[data-theme="dark"] .control-stage,
:root[data-theme="dark"] .workflow-band,
:root[data-theme="dark"] .foresight-stage,
:root[data-theme="dark"] .use-case-stage { background: #080d19; color: var(--text-dark); border-color: var(--border); }
:root[data-theme="dark"] .hero-home { background: radial-gradient(circle at 75% 12%, rgba(93,86,200,.22), transparent 32rem), #0d1322; }
:root[data-theme="dark"] .control-card:not(.control-card-primary),
:root[data-theme="dark"] .workflow-step,
:root[data-theme="dark"] .foresight-preview,
:root[data-theme="dark"] .use-case-row,
:root[data-theme="dark"] .responsible-strip { background: #111827; color: var(--text-dark); border-color: var(--border); }
:root[data-theme="dark"] .control-card-policy,
:root[data-theme="dark"] .policy-row,
:root[data-theme="dark"] .preview-advisory,
:root[data-theme="dark"] .signal-track { background-color: #17152a; border-color: #34304d; }
:root[data-theme="dark"] .control-heading p,
:root[data-theme="dark"] .control-card > p,
:root[data-theme="dark"] .workflow-copy p,
:root[data-theme="dark"] .workflow-step p,
:root[data-theme="dark"] .foresight-copy p,
:root[data-theme="dark"] .preview-summary,
:root[data-theme="dark"] .use-case-row p,
:root[data-theme="dark"] .responsible-strip { color: var(--text-muted); }
:root[data-theme="dark"] .use-case-row h3,
:root[data-theme="dark"] .policy-row,
:root[data-theme="dark"] .preview-topline { color: var(--text-dark); }
