:root {
  color-scheme: dark;
  --bg: #031210;
  --bg-2: #071b1d;
  --panel: rgba(8, 28, 28, 0.78);
  --panel-strong: rgba(8, 28, 28, 0.94);
  --field: rgba(255, 255, 255, 0.055);
  --line: rgba(219, 255, 240, 0.13);
  --line-strong: rgba(141, 244, 255, 0.38);
  --text: #f3fff8;
  --muted: rgba(231, 250, 242, 0.72);
  --soft: rgba(231, 250, 242, 0.5);
  --aqua: #8df4ff;
  --mint: #9df3a0;
  --amber: #f0c46f;
  --coral: #ff9a8e;
  --ink: #031210;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --topbar-height: 72px;
  font-family:
    "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(219, 255, 240, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 255, 240, 0.022) 1px, transparent 1px),
    linear-gradient(180deg, #031210 0%, #071719 48%, #020807 100%);
  background-size: 54px 54px, 54px 54px, auto;
  color: var(--text);
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--topbar-height);
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(219, 255, 240, 0.1);
  background: linear-gradient(180deg, rgba(3, 18, 16, 0.97), rgba(3, 18, 16, 0.86));
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(141, 244, 255, 0.72);
  border-radius: 51% 44% 55% 46%;
  transform: rotate(-12deg);
}

.brand-mark::before {
  inset: 2px 3px 4px 1px;
  box-shadow: 0 0 18px rgba(141, 244, 255, 0.2);
}

.brand-mark::after {
  inset: 8px 3px 1px 10px;
  border-color: rgba(157, 243, 160, 0.7);
  transform: rotate(20deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.72rem;
}

.topnav {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.topnav a:hover {
  color: var(--text);
}

.topnav a {
  padding: 9px 11px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}

.topnav a:hover {
  background: rgba(141, 244, 255, 0.08);
}

.topnav a[aria-current="page"] {
  background: rgba(141, 244, 255, 0.11);
  color: var(--text);
}

.mobile-menu {
  position: relative;
}

.mobile-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  list-style: none;
  border: 1px solid rgba(219, 255, 240, 0.13);
  border-radius: 999px;
  color: var(--aqua);
  cursor: pointer;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 184px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 18, 16, 0.98);
  box-shadow: var(--shadow);
}

.mobile-menu nav a {
  padding: 12px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 720;
}

.mobile-menu nav a:hover,
.mobile-menu nav a[aria-current="page"] {
  background: rgba(141, 244, 255, 0.1);
  color: var(--text);
}

.topbar-action,
.button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.topbar-action,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(219, 255, 240, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.topbar-action {
  width: auto;
  min-height: 42px;
  gap: 8px;
  padding: 0 15px;
  border-color: rgba(141, 244, 255, 0.42);
  background: rgba(141, 244, 255, 0.1);
  color: var(--aqua);
  font-size: 0.84rem;
  font-weight: 820;
  transition: background 160ms ease, transform 160ms ease;
}

.topbar-action:hover {
  background: rgba(141, 244, 255, 0.18);
  transform: translateX(1px);
}

.hero,
.logic-section,
.intake-section,
.result-section,
.story-teaser {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--topbar-height) + 28px) 0 40px;
}

.hero-media {
  display: none;
}

@media (max-width: 759px) {
  .mobile-menu + .topbar-action {
    display: none;
  }

  .logic-section {
    padding-bottom: 16px;
  }

  .intake-section {
    padding-top: 16px;
  }

  .logic-flow {
    gap: 5px;
  }

  .logic-flow article {
    padding: 14px;
  }

  .hero {
    padding-bottom: 12px;
    overflow: hidden;
  }

  .hero-media-mobile {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    overflow: hidden;
    background: #031210;
  }

  .hero-media-mobile::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(3, 18, 16, 0.88) 0%, rgba(3, 18, 16, 0.7) 30%, rgba(3, 18, 16, 0.46) 58%, rgba(3, 18, 16, 0.78) 100%),
      linear-gradient(90deg, rgba(3, 18, 16, 0.42), transparent 70%);
  }

  .hero-video-mobile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: saturate(0.84) brightness(0.86);
  }
}

.hero-inner {
  display: grid;
  gap: 22px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.overline {
  margin: 0;
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0 0;
  max-width: 680px;
  font-size: 2.72rem;
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-lede {
  margin: 18px 0 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.62;
}

.hero-lede-secondary {
  margin-top: 13px;
  color: rgba(243, 255, 248, 0.88);
  font-weight: 650;
}

.hero-actions,
.form-actions,
.assurance-strip,
.signal-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-actions {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 820;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 1;
  transform: none;
}

.button:disabled span {
  color: var(--ink);
}

.button-primary {
  background: linear-gradient(135deg, var(--aqua), var(--mint));
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(141, 244, 255, 0.16);
}

.button-primary span,
.button-primary svg {
  color: var(--ink);
  stroke: var(--ink);
}

.button-quiet {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.button-compact {
  min-height: 44px;
  padding: 0 17px;
  background: var(--aqua);
  color: var(--ink);
}

.assurance-strip {
  margin-top: 16px;
}

.assurance-strip span,
.assurance-strip a,
.signal-cloud span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(219, 255, 240, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.82rem;
}

.assurance-strip a {
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.assurance-strip a:hover {
  border-color: rgba(141, 244, 255, 0.42);
  background: rgba(141, 244, 255, 0.1);
  color: var(--text);
}

.case-console,
.logic-flow article,
.analysis-panel,
.analysis-card,
.conversion-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.console-head,
.preview-top,
.range-head,
.analysis-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.turnstile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.turnstile-row p {
  margin: 0;
}

.turnstile-row a {
  color: var(--cyan);
}

.turnstile-mount[hidden] {
  display: none;
}

.privacy-page {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.privacy-brand {
  display: inline-flex;
  margin-bottom: 2rem;
}

.privacy-card {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.privacy-card h1 {
  margin: 0.55rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.privacy-card h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
}

@media (max-width: 720px) {
  .turnstile-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.logic-flow span,
.analysis-card > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aqua);
  font-size: 0.74rem;
  font-weight: 860;
  text-transform: uppercase;
}

.logic-flow span::before,
.analysis-card > span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--aqua);
  box-shadow: 0 0 16px rgba(141, 244, 255, 0.28);
}

.logic-section,
.intake-section,
.result-section {
  padding: 48px 0;
}

.story-teaser {
  margin-bottom: 58px;
}

.story-teaser-card {
  padding: clamp(20px, 3vw, 30px);
  border-color: rgba(157, 243, 160, 0.34);
  background:
    radial-gradient(circle at 88% 18%, rgba(157, 243, 160, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(17, 58, 45, 0.9), rgba(7, 35, 31, 0.92));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.34),
    0 0 42px rgba(157, 243, 160, 0.055);
}

.story-teaser-card > span {
  color: var(--mint);
}

.story-teaser-card > span::before {
  background: var(--mint);
  box-shadow: 0 0 16px rgba(157, 243, 160, 0.3);
}

.story-page {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 60px) 0 72px;
}

.story-hero {
  max-width: 780px;
  padding: 20px 0 54px;
}

.story-hero h1 {
  max-width: 730px;
  margin: 12px 0 0;
  font-size: clamp(2.65rem, 6vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.story-lede {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.65;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 0.82rem;
}

.story-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.story-principles {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin: 0 0 44px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-principles article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.story-principles h2,
.story-signal {
  margin: 0;
  color: var(--aqua);
  font-size: 0.73rem;
  font-weight: 860;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.story-principles p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.52;
}

.story-layout {
  display: grid;
  align-items: start;
  gap: 38px;
}

.story-toc {
  display: none;
}

.story-content {
  position: relative;
  max-width: 780px;
}

.story-chapter {
  position: relative;
  padding: 0 0 56px 28px;
  border-left: 1px solid rgba(141, 244, 255, 0.22);
}

.story-chapter::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--aqua);
  box-shadow: 0 0 18px rgba(141, 244, 255, 0.42);
}

.story-chapter:last-child {
  padding-bottom: 18px;
}

.story-number {
  display: block;
  margin: 0 0 9px;
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: 0.06em;
}

.story-chapter h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.story-chapter p,
.story-chapter li {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.story-chapter p {
  margin: 17px 0 0;
}

.story-chapter ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.story-signal {
  display: inline-block;
  margin-top: 22px;
}

.story-quote {
  max-width: 670px;
  margin: 0 0 48px 28px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--mint);
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 720;
  line-height: 1.2;
}

.story-final {
  max-width: 780px;
  margin-top: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(141, 244, 255, 0.1), rgba(157, 243, 160, 0.055)),
    var(--panel);
}

.story-final h2 {
  margin: 9px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  line-height: 1.06;
}

.story-final p {
  max-width: 670px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.story-final .story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 759px) {
  .logic-section {
    padding-bottom: 12px;
  }

  .intake-section {
    padding-top: 12px;
  }

  .story-page {
    padding-top: calc(var(--topbar-height) + 32px);
  }

  .story-hero {
    padding-bottom: 38px;
  }

  .story-principles article {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .story-chapter {
    padding-left: 21px;
  }

  .story-quote {
    margin-left: 21px;
    padding-left: 16px;
  }

  .story-final {
    padding: 23px 20px;
  }
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2,
.result-copy h2 {
  margin: 9px 0 0;
  font-size: 2rem;
  line-height: 1.04;
}

.section-head p:not(.eyebrow),
.result-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.section-head.compact {
  margin-bottom: 18px;
}

.logic-flow {
  display: grid;
  gap: 10px;
}

.logic-flow-desktop {
  display: none;
}

.logic-flow article {
  padding: 17px;
  background: rgba(8, 28, 28, 0.66);
}

.logic-flow h3,
.analysis-card h3 {
  margin: 12px 0 0;
}

.logic-flow p,
.analysis-card p,
.analysis-card li {
  color: var(--muted);
  line-height: 1.56;
}

.logic-map {
  position: relative;
  display: block;
  height: 393px;
  padding: 0;
  isolation: isolate;
}

.theory-node {
  position: absolute;
  z-index: 2;
  height: 58px;
  padding: 9px 12px 8px;
  border: 1px solid rgba(120, 237, 244, 0.28);
  border-radius: 5px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(112deg, rgba(12, 54, 62, 0.94), rgba(8, 31, 36, 0.96) 48%, rgba(13, 60, 67, 0.92)),
    rgba(6, 25, 26, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.04);
}

.theory-node::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 22%, rgba(164, 255, 224, 0.5) 48%, transparent 74%);
  background-size: 52% 100%;
  background-repeat: no-repeat;
}

.theory-node h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text);
  font-size: clamp(0.8rem, 4.1vw, 1.08rem);
  font-weight: 860;
  line-height: 1.08;
  text-transform: uppercase;
  white-space: nowrap;
}

.theory-node p {
  position: relative;
  z-index: 1;
  margin: 5px 0 0;
  color: rgba(218, 235, 232, 0.82);
  font-size: clamp(0.58rem, 2.65vw, 0.72rem);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.theory-node p span {
  display: block;
}

.node-urticaria {
  top: 0;
  left: 0;
  width: 62%;
}

.node-triggers {
  top: 82px;
  right: 0;
  width: 63%;
}

.node-chronic {
  top: 164px;
  left: 0;
  width: 66%;
  height: 65px;
}

.node-immune {
  top: 253px;
  right: 0;
  width: 69%;
}

.node-predisposition {
  top: 335px;
  left: 4%;
  width: 72%;
}

.theory-path {
  position: absolute;
  z-index: 0;
  opacity: 0.68;
  color: rgba(116, 230, 235, 0.5);
  filter: drop-shadow(0 0 5px rgba(115, 233, 236, 0.2));
}

.path-one {
  top: 29px;
  left: 57%;
  width: 27%;
  height: 84px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-radius: 0 52px 0 0;
}

.path-two {
  top: 111px;
  left: 20%;
  width: 38%;
  height: 84px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-radius: 48px 0 0 0;
  animation-delay: -1.5s;
}

.path-three {
  top: 195px;
  left: 58%;
  width: 26%;
  height: 84px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-radius: 0 48px 0 0;
  animation-delay: -3s;
}

.path-four {
  top: 282px;
  left: 24%;
  width: 18%;
  height: 84px;
  border-left: 2px solid;
  border-top: 2px solid;
  border-radius: 48px 0 0 0;
}

.node-predisposition::after {
  animation: nodeShineLtr 10s cubic-bezier(0.33, 0.02, 0.16, 1) 6.4s infinite;
}

.path-one {
  animation: pathGlow 10s cubic-bezier(0.33, 0.02, 0.16, 1) 0.8s infinite;
}

.node-urticaria::after {
  animation: nodeShineLtr 10s cubic-bezier(0.33, 0.02, 0.16, 1) infinite;
}

.node-triggers::after {
  animation: nodeShineRtl 10s cubic-bezier(0.33, 0.02, 0.16, 1) 1.6s infinite;
}

.path-two {
  animation: pathGlow 10s cubic-bezier(0.33, 0.02, 0.16, 1) 2.4s infinite;
}

.node-chronic::after {
  animation: nodeShineLtr 10s cubic-bezier(0.33, 0.02, 0.16, 1) 3.2s infinite;
}

.path-three {
  animation: pathGlow 10s cubic-bezier(0.33, 0.02, 0.16, 1) 4s infinite;
}

.node-immune::after {
  animation: nodeShineRtl 10s cubic-bezier(0.33, 0.02, 0.16, 1) 4.8s infinite;
}

.path-four {
  animation: pathGlow 10s cubic-bezier(0.33, 0.02, 0.16, 1) 5.6s infinite;
}

@keyframes nodeShineLtr {
  0% { opacity: 0; background-position: -90% 0; }
  2% { opacity: 0.78; }
  8% { opacity: 0.92; background-position: 190% 0; }
  11%, 100% { opacity: 0; background-position: 190% 0; }
}

@keyframes nodeShineRtl {
  0% { opacity: 0; background-position: 190% 0; }
  2% { opacity: 0.78; }
  8% { opacity: 0.92; background-position: -90% 0; }
  11%, 100% { opacity: 0; background-position: -90% 0; }
}

@keyframes pathGlow {
  0%, 13%, 100% { opacity: 0.42; filter: drop-shadow(0 0 3px rgba(115, 233, 236, 0.12)); }
  2%, 9% { opacity: 0.92; filter: drop-shadow(0 0 9px rgba(132, 245, 202, 0.52)); }
}

.case-console {
  padding: 18px;
  background: rgba(5, 20, 22, 0.86);
}

.console-head h3,
.preview-top h3 {
  margin: 6px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.console-head p:not(.overline) {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.step-badge {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-width: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(141, 244, 255, 0.28);
  border-radius: 999px;
  background: rgba(141, 244, 255, 0.08);
  color: var(--aqua);
}

.step-badge strong {
  color: var(--text);
  font-size: 1.18rem;
}

.progress {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--aqua), var(--amber));
  transition: width 220ms ease;
}

.console-layout {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.intake-form {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field-stack {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 10px;
}

.measurements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-group label,
.field-label,
.range-head label {
  margin: 0;
  color: rgba(243, 255, 248, 0.92);
  font-size: 0.95rem;
  font-weight: 780;
}

textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(219, 255, 240, 0.14);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  background: var(--field);
  color: var(--text);
  line-height: 1.55;
}

textarea:focus {
  border-color: rgba(141, 244, 255, 0.62);
  background: rgba(141, 244, 255, 0.08);
}

.text-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(219, 255, 240, 0.14);
  border-radius: 8px;
  outline: none;
  background: var(--field);
  color: var(--text);
}

.text-input:focus {
  border-color: rgba(141, 244, 255, 0.62);
  background: rgba(141, 244, 255, 0.08);
}

::placeholder {
  color: rgba(231, 250, 242, 0.42);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(219, 255, 240, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.9rem;
}

.chip input:checked + span {
  border-color: rgba(157, 243, 160, 0.72);
  background: rgba(157, 243, 160, 0.15);
  color: var(--text);
}

.range-head {
  align-items: center;
}

.range-head strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  border-radius: 8px;
  background: rgba(141, 244, 255, 0.12);
  color: var(--aqua);
}

.range-input {
  width: 100%;
  accent-color: var(--aqua);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-size: 0.82rem;
}

.form-actions {
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(219, 255, 240, 0.09);
}

.form-actions [hidden] {
  display: none !important;
}

.icon-button.labeled {
  width: auto;
  gap: 8px;
  padding: 0 13px;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.case-preview {
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(219, 255, 240, 0.1);
}

.preview-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.preview-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(219, 255, 240, 0.08);
}

.preview-list dt {
  color: var(--soft);
  font-size: 0.84rem;
}

.preview-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 760;
  text-align: right;
}

.signal-cloud {
  margin-top: 18px;
}

.risk-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(240, 196, 111, 0.28);
  border-radius: 8px;
  background: rgba(240, 196, 111, 0.08);
}

.risk-box.has-alert {
  border-color: rgba(255, 154, 142, 0.52);
  background: rgba(255, 154, 142, 0.11);
}

.risk-label {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 860;
  text-transform: uppercase;
}

.risk-box.has-alert .risk-label {
  color: var(--coral);
}

.risk-box p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.analysis-panel {
  margin-top: 18px;
  padding: 18px;
  background: rgba(5, 20, 22, 0.86);
}

.analysis-toolbar {
  align-items: center;
  margin-bottom: 16px;
}

.analysis-toolbar > span {
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 840;
  text-transform: uppercase;
}

.analysis-toolbar div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.analysis-result {
  display: grid;
  gap: 12px;
}

.analysis-card {
  padding: 18px;
  background: rgba(8, 28, 28, 0.7);
}

.analysis-card.danger {
  border-color: rgba(255, 154, 142, 0.48);
  background: rgba(255, 154, 142, 0.1);
}

.inline-launch {
  width: fit-content;
  margin-top: 18px;
}

.analysis-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 12px 0 0;
}

.analysis-confidence {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(128, 236, 244, 0.24);
  border-radius: 999px;
  color: var(--aqua);
  font-size: 0.72em;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.loading-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 26%, rgba(141, 244, 255, 0.14), transparent 34%),
    rgba(8, 28, 28, 0.72);
}

.loading-orb {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  position: relative;
  background:
    conic-gradient(from -90deg, var(--aqua) var(--progress), rgba(219, 255, 240, 0.08) 0deg),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 40px rgba(141, 244, 255, 0.12);
}

.loading-orb::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: rgba(3, 18, 16, 0.92);
}

.loading-orb > div {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.loading-orb strong {
  color: var(--text);
  font-size: 1.72rem;
  line-height: 1;
}

.loading-orb small {
  margin-top: 5px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 760;
}

.loading-copy {
  min-width: 0;
}

.loading-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--aqua);
  font-size: 0.82rem;
  font-weight: 820;
}

.loading-pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 8px rgba(157, 243, 160, 0.08), 0 0 20px rgba(157, 243, 160, 0.32);
}

.loading-copy h3 {
  margin: 10px 0 0;
  font-size: 1.62rem;
  line-height: 1.12;
}

.loading-copy p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.loading-track {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.loading-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--aqua));
  transition: width 280ms ease;
}

.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 15px;
}

.loading-steps span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 0.8rem;
}

.loading-steps span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(231, 250, 242, 0.22);
}

.loading-steps span.active {
  color: var(--text);
}

.loading-steps span.active::before {
  background: var(--mint);
  box-shadow: 0 0 14px rgba(157, 243, 160, 0.36);
}

.freeform-card {
  padding: 0;
  overflow: hidden;
}

.freeform-answer {
  margin-top: 0;
  color: rgba(243, 255, 248, 0.9);
  font-size: 1rem;
  line-height: 1.72;
}

.freeform-card > span {
  display: none;
}

.freeform-answer h2 {
  position: relative;
  margin: 0;
  padding: 24px 22px 10px 48px;
  color: var(--text);
  font-size: 1.78rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.freeform-answer h2::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 22px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aqua), var(--mint));
  box-shadow: 0 0 0 7px rgba(141, 244, 255, 0.08), 0 0 22px rgba(141, 244, 255, 0.28);
}

.freeform-answer h2:first-child {
  padding-top: 28px;
  background:
    linear-gradient(135deg, rgba(141, 244, 255, 0.12), rgba(157, 243, 160, 0.08)),
    rgba(255, 255, 255, 0.025);
}

.freeform-answer h2:first-child::before {
  top: 35px;
}

.freeform-answer h3 {
  margin: 0;
  padding: 18px 22px 6px 48px;
  color: rgba(243, 255, 248, 0.95);
  font-size: 1.16rem;
  line-height: 1.22;
}

.freeform-answer .answer-paragraph {
  position: relative;
  margin: 0;
  padding: 8px 22px 16px 48px;
  color: rgba(231, 250, 242, 0.78);
  font-size: 1rem;
}

.freeform-answer .answer-paragraph::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 26px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(141, 244, 255, 0.62);
}

.freeform-answer strong {
  color: #f7fff9;
  font-weight: 860;
  background: linear-gradient(180deg, transparent 58%, rgba(157, 243, 160, 0.22) 0);
}

.freeform-answer em {
  color: var(--aqua);
  font-style: normal;
}

.answer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 8px 22px 18px 48px;
  list-style: none;
  counter-reset: answer-step;
}

.answer-list li {
  position: relative;
  min-height: 40px;
  padding: 11px 12px 11px 42px;
  border: 1px solid rgba(219, 255, 240, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(231, 250, 242, 0.82);
  line-height: 1.52;
}

ul.answer-list li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(157, 243, 160, 0.2);
}

ol.answer-list li {
  counter-increment: answer-step;
}

ol.answer-list li::before {
  content: counter(answer-step);
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(141, 244, 255, 0.12);
  color: var(--aqua);
  font-size: 0.75rem;
  font-weight: 860;
}

.freeform-answer > :last-child {
  margin-bottom: 10px;
}

@media (max-width: 460px) {
  .loading-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .loading-copy h3 {
    font-size: 1.32rem;
  }

  .loading-steps {
    justify-content: center;
  }

  .freeform-answer h2 {
    padding-right: 16px;
    padding-left: 42px;
    font-size: 1.48rem;
  }

  .freeform-answer h2::before {
    left: 16px;
  }

  .freeform-answer h3,
  .freeform-answer .answer-paragraph,
  .answer-list {
    padding-right: 16px;
    padding-left: 42px;
  }

  .freeform-answer .answer-paragraph::before {
    left: 20px;
  }
}

.full-output {
  grid-column: 1 / -1;
  border: 1px solid rgba(141, 244, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 16, 0.62);
  overflow: hidden;
}

.full-output summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  color: var(--aqua);
  font-size: 0.86rem;
  font-weight: 840;
  list-style: none;
}

.full-output summary::-webkit-details-marker {
  display: none;
}

.full-output[open] summary svg {
  transform: rotate(180deg);
}

.full-output pre {
  max-height: 420px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-top: 1px solid rgba(219, 255, 240, 0.1);
  color: rgba(243, 255, 248, 0.88);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.conversion-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(141, 244, 255, 0.11), rgba(157, 243, 160, 0.09)),
    var(--panel-strong);
}

.conversion-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 860;
  text-transform: uppercase;
}

.conversion-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(157, 243, 160, 0.28);
}

.conversion-card h3 {
  margin: 0;
  font-size: 1.58rem;
  line-height: 1.08;
}

.conversion-card p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.conversion-card .button {
  justify-self: start;
}

.deep-analysis-offer {
  gap: 16px;
  border-color: rgba(141, 244, 255, 0.24);
  background:
    radial-gradient(circle at 90% 0%, rgba(141, 244, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(141, 244, 255, 0.08), rgba(157, 243, 160, 0.045)),
    var(--panel-strong);
}

.deep-analysis-offer .deep-analysis-lede,
.deep-analysis-offer .deep-analysis-includes,
.deep-analysis-offer .deep-analysis-accent,
.deep-analysis-offer .deep-analysis-meta,
.deep-analysis-offer .conversion-actions {
  grid-column: 1 / -1;
  grid-row: auto;
}

.deep-analysis-offer h4 {
  margin: 0;
  font-size: 0.92rem;
}

.deep-analysis-includes {
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.deep-analysis-includes ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.deep-analysis-includes li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.48;
}

.deep-analysis-includes li::before {
  content: "";
  position: absolute;
  top: 0.56em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--aqua);
}

.deep-analysis-accent {
  margin: 0;
  padding: 3px 0 3px 15px;
  border-left: 2px solid var(--mint);
  color: rgba(243, 255, 248, 0.9);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.55;
}

.deep-analysis-offer .conversion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.deep-analysis-offer .conversion-actions .button {
  width: auto;
}

.deep-analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin: 0;
  color: var(--soft);
  font-size: 0.75rem;
}

.deep-analysis-meta strong {
  color: var(--text);
  font-size: 1.12rem;
}

.price-promo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.price-promo del {
  color: var(--soft);
  font-size: 0.86em;
  text-decoration-color: rgba(240, 196, 111, 0.9);
  text-decoration-thickness: 1.5px;
}

.price-promo strong {
  color: var(--mint);
  font-size: 1.12em;
}

.conversion-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.conversion-actions .button {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

.button-vk {
  border-color: rgba(141, 244, 255, 0.3);
  background: rgba(141, 244, 255, 0.08);
  color: var(--text);
}

.button-vk:hover {
  border-color: rgba(141, 244, 255, 0.55);
  background: rgba(141, 244, 255, 0.14);
}

.vk-brand-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #2787f5;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 460px) {
  .hero,
  .logic-section,
  .intake-section,
  .result-section {
    width: min(100% - 24px, 760px);
  }

  .hero h1 {
    font-size: 2.34rem;
  }

  .topbar-action {
    width: 42px;
    padding: 0;
  }

  .topbar-action span {
    display: none;
  }

  .hero-actions .button,
  .conversion-actions,
  .conversion-card .button {
    width: 100%;
  }

  .deep-analysis-includes ul {
    grid-template-columns: 1fr;
  }

  .deep-analysis-offer .conversion-actions .button {
    width: 100%;
  }

  .form-actions {
    align-items: stretch;
  }

  .form-actions .button,
  .form-actions .icon-button.labeled {
    flex: 1 1 auto;
  }

  .preview-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .preview-list dd {
    text-align: left;
  }
}

@media (min-width: 760px) {
  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .topnav {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }

  .hero,
  .logic-section,
  .intake-section,
  .result-section,
  .story-teaser {
    width: min(100% - 56px, 960px);
  }

  .story-layout {
    grid-template-columns: 190px minmax(0, 780px);
    gap: 58px;
  }

  .story-toc {
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
    display: grid;
    gap: 5px;
    padding: 13px 0 13px 14px;
    border-left: 1px solid var(--line);
  }

  .story-toc > span {
    margin-bottom: 5px;
    color: var(--soft);
    font-size: 0.7rem;
    font-weight: 840;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .story-toc a {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.32;
  }

  .story-toc a:hover {
    color: var(--aqua);
  }

  .hero {
    padding-top: 112px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 760px);
  }

  .hero h1 {
    font-size: 4rem;
  }

  .section-head h2,
  .result-copy h2 {
    font-size: 2.7rem;
  }

  .logic-flow-desktop {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logic-map {
    display: none;
    min-height: 390px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(152px, auto));
    gap: 42px 12px;
    padding: 8px 0;
  }

  .logic-map::before,
  .logic-map::after {
    display: none;
  }

  .logic-map .logic-node {
    padding: 18px;
  }

  .logic-map .node-symptoms {
    grid-column: 1 / 6;
    grid-row: 1;
  }

  .logic-map .node-triggers {
    grid-column: 8 / 13;
    grid-row: 1;
  }

  .logic-map .node-time {
    grid-column: 1 / 6;
    grid-row: 2;
  }

  .logic-map .node-background {
    grid-column: 7 / 12;
    grid-row: 2;
  }

  .logic-connector {
    display: block;
    position: absolute;
    z-index: 0;
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(112, 238, 243, 0.08), rgba(124, 244, 182, 0.84), rgba(112, 238, 243, 0.1));
    background-size: 190px 100%;
    box-shadow: 0 0 12px rgba(118, 236, 232, 0.24);
    animation: connectorFlow 9s linear infinite;
  }

  .logic-connector::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: #a0f9b7;
    box-shadow: 0 0 12px rgba(160, 249, 183, 0.9);
    animation: connectorPulse 9s linear infinite;
  }

  .connector-symptoms-triggers {
    top: 29%;
    left: 39%;
    width: 25%;
    transform: rotate(9deg);
  }

  .connector-symptoms-time {
    top: 43%;
    left: 20%;
    width: 19%;
    transform: rotate(74deg);
    animation-delay: -2.3s;
  }

  .connector-triggers-background {
    top: 44%;
    left: 81%;
    width: 20%;
    transform: rotate(104deg);
    animation-delay: -4.8s;
  }

  .connector-time-background {
    top: 77%;
    left: 40%;
    width: 29%;
    transform: rotate(-2deg);
    animation-delay: -6.4s;
  }

  .analysis-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-card.analysis-main {
    grid-column: 1 / -1;
  }
}

@keyframes connectorFlow {
  to { background-position: 190px 0; }
}

@keyframes connectorPulse {
  0%, 11% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  61% { left: 100%; opacity: 0.95; }
  65%, 100% { left: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .theory-node,
  .theory-node::after,
  .theory-path,
  .logic-map::after,
  .logic-map .logic-node::after,
  .logic-connector,
  .logic-connector::after {
    animation: none;
  }
}

@media (min-width: 1040px) {
  .hero,
  .logic-section,
  .intake-section,
  .result-section,
  .story-teaser {
    width: min(100% - 72px, 1080px);
  }

  .story-page {
    width: min(100% - 72px, 1180px);
  }

  .logic-flow-desktop {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .logic-map {
    min-height: 420px;
    grid-template-rows: repeat(2, minmax(166px, auto));
    gap: 46px 14px;
  }

  .hero {
    width: 100%;
    min-height: min(720px, 100vh);
    padding: calc(var(--topbar-height) + 52px) 0 54px;
    display: grid;
    align-items: center;
    overflow: hidden;
  }

  .hero-media-desktop {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    overflow: hidden;
    background: #031210;
  }

  .hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(3, 18, 16, 0.99) 0%, rgba(3, 18, 16, 0.94) 26%, rgba(3, 18, 16, 0.66) 47%, rgba(3, 18, 16, 0.16) 75%, rgba(3, 18, 16, 0.18) 100%),
      linear-gradient(180deg, rgba(3, 18, 16, 0.34) 0%, transparent 22%, rgba(3, 18, 16, 0.48) 100%);
  }

  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
    filter: saturate(0.82) brightness(0.76);
  }

  .hero-inner {
    width: min(100% - 72px, 1080px);
    margin: 0 auto;
    grid-template-columns: minmax(0, 580px);
  }

  .hero h1 {
    max-width: 580px;
  }

  .hero-lede {
    max-width: 545px;
  }

  .console-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.38fr);
    gap: 24px;
  }

  .case-preview {
    padding-top: 0;
    padding-left: 22px;
    border-top: 0;
    border-left: 1px solid rgba(219, 255, 240, 0.1);
  }

  .conversion-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .conversion-kicker,
  .conversion-card h3,
  .conversion-card p {
    grid-column: 1;
  }

  .conversion-actions {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }
}

/* Account and Supabase cabinet entry points */
.topbar-actions,
.topbar-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.account-login-button {
  display: inline-flex;
  min-height: 42px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(141, 244, 255, 0.3);
  border-radius: 999px;
  background: rgba(141, 244, 255, 0.07);
  color: var(--text);
  cursor: pointer;
}

.account-login-button span {
  font-size: 0.8rem;
  font-weight: 820;
  line-height: 1.1;
}

.account-login-button small {
  margin-top: 2px;
  color: var(--soft);
  font-size: 0.58rem;
  line-height: 1;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 5px 7px 5px 5px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(141, 244, 255, 0.35);
  border-radius: 50%;
  background: rgba(141, 244, 255, 0.1);
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 850;
}

.account-avatar.full-access {
  border-color: rgba(157, 243, 160, 0.95);
  background: rgba(157, 243, 160, 0.12);
  box-shadow:
    0 0 0 3px rgba(157, 243, 160, 0.12),
    0 0 19px rgba(157, 243, 160, 0.24);
  color: var(--mint);
}

.account-avatar.free-access {
  border-color: rgba(240, 196, 111, 0.9);
  background: rgba(240, 196, 111, 0.1);
  box-shadow:
    0 0 0 3px rgba(240, 196, 111, 0.1),
    0 0 16px rgba(240, 196, 111, 0.18);
  color: var(--amber);
}

.account-copy {
  display: grid;
  min-width: 0;
}

.account-copy small {
  color: var(--soft);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.account-copy strong {
  max-width: 155px;
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.access-badge.free {
  background: rgba(240, 196, 111, 0.1);
  color: var(--amber);
}

.access-badge.deep {
  background: rgba(157, 243, 160, 0.11);
  color: var(--mint);
}

.account-menu-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 18, 16, 0.98);
  box-shadow: var(--shadow);
}

.account-menu-popover a,
.account-menu-popover button {
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  text-align: left;
}

.account-menu-popover a:hover,
.account-menu-popover button:hover {
  background: rgba(141, 244, 255, 0.08);
  color: var(--text);
}

.intake-account-hint,
.result-save-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(141, 244, 255, 0.2);
  border-radius: 14px;
  background: rgba(141, 244, 255, 0.055);
}

.intake-account-hint p,
.result-save-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.intake-account-hint strong,
.result-save-card strong {
  color: var(--text);
}

.inline-auth-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 0;
  background: transparent;
  color: var(--aqua);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.result-save-card {
  grid-column: 1 / -1;
  align-items: center;
  margin: 0;
  padding: 18px 24px;
  border-color: rgba(157, 243, 160, 0.22);
  background: linear-gradient(135deg, rgba(157, 243, 160, 0.085), rgba(141, 244, 255, 0.045));
}

.result-save-card > div:first-child {
  min-width: 0;
}

.result-save-card h3 {
  margin: 5px 0 8px;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
}

.result-save-card .conversion-kicker {
  display: block;
}

.result-save-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.saved-account-line {
  display: block;
  margin-top: 8px;
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 760;
}

.auth-dialog {
  width: min(100% - 28px, 520px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.auth-dialog::backdrop {
  background: rgba(0, 7, 6, 0.78);
  backdrop-filter: blur(8px);
}

.auth-dialog-card {
  position: relative;
  padding: 30px;
  border: 1px solid rgba(141, 244, 255, 0.25);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(8, 31, 30, 0.99), rgba(3, 18, 16, 0.99));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.58);
}

.auth-dialog-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.08;
}

.auth-dialog-card > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.auth-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.auth-form label {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.auth-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(141, 244, 255, 0.08);
}

.auth-status {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 0.75rem;
}

.auth-status.success { color: var(--mint); }
.auth-status.error { color: var(--coral); }

.auth-privacy {
  margin-bottom: 0;
  font-size: 0.68rem;
}

.auth-demo-note {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 2px solid var(--amber);
  background: rgba(240, 196, 111, 0.06);
}

.auth-demo-note strong {
  color: var(--amber);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.auth-demo-note span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

@media (max-width: 759px) {
  .topbar-actions .topbar-action {
    display: none;
  }

  .account-login-button {
    width: 42px;
    padding: 0;
    align-items: center;
  }

  .account-login-button small,
  .account-copy,
  .account-menu .access-badge {
    display: none;
  }

  .account-menu summary {
    width: 44px;
    padding: 4px;
  }

  .intake-account-hint,
  .result-save-card {
    align-items: stretch;
    flex-direction: column;
  }

  .result-save-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .result-save-actions .button {
    width: 100%;
  }

  .auth-dialog-card {
    padding: 25px 20px 22px;
  }
}
