:root {
  --public-accent: #00c9a7;
  --public-accent-strong: #00a889;
  --public-navy: #152551;
  --public-ink: #081018;
  --public-shell: color-mix(in srgb, var(--page-surface) 88%, white 12%);
  --public-shell-soft: color-mix(in srgb, var(--page-surface-soft) 82%, white 18%);
  --public-outline: color-mix(in srgb, var(--page-border) 72%, white 28%);
}

* {
  box-sizing: border-box;
}

body.public-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  color: var(--page-text);
  background:
    radial-gradient(circle at top left, rgba(0, 201, 167, 0.16), transparent 36%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(180deg, color-mix(in srgb, var(--page-bg) 88%, #091224), var(--page-bg) 58%, color-mix(in srgb, var(--page-bg) 82%, #04070d));
}

body.site-shell-body {
  display: flex;
  flex-direction: column;
}

.public-page a {
  color: inherit;
}

.public-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-shell-content {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-shell-content--centered {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-shell-content--tool {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-shell-content--dashboard {
  width: min(1320px, calc(100% - 2rem));
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--page-bg) 78%, transparent);
  border-bottom: 1px solid var(--public-outline);
}

.public-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-lockup img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--page-heading);
}

.brand-tag {
  font-size: 0.82rem;
  color: var(--page-muted);
}

.public-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.nav-button,
.cta-link,
.feature-link,
.docs-link {
  text-decoration: none;
}

.nav-link {
  color: var(--page-muted);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--page-heading);
  background: rgba(255, 255, 255, 0.06);
}

.auth-gated-link {
  cursor: pointer;
}

.nav-button,
.cta-button,
.cta-button-secondary,
.feature-link,
.docs-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.82rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-button,
.cta-button,
.feature-link,
.docs-link {
  background: linear-gradient(135deg, var(--public-accent), var(--public-accent-strong));
  color: var(--public-ink);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.cta-button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--public-outline);
  color: var(--page-heading);
}

.nav-button:hover,
.cta-button:hover,
.cta-button-secondary:hover,
.feature-link:hover,
.docs-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.public-main {
  padding: 2.5rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.page-panel,
.docs-panel,
.contact-panel,
.notice-panel,
.feature-card,
.step-card,
.callout-card {
  background: var(--public-shell);
  border: 1px solid var(--public-outline);
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
}

.hero-copy {
  padding: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 201, 167, 0.12);
  color: var(--page-heading);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.page-title {
  margin: 1rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
}

.hero-copy p,
.page-intro,
.section-intro {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--page-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.metric-card {
  padding: 1rem;
  border-radius: 20px;
  background: var(--public-shell-soft);
  border: 1px solid var(--public-outline);
}

.metric-card strong {
  display: block;
  color: var(--page-heading);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.metric-card span {
  color: var(--page-muted);
  font-size: 0.92rem;
}

.hero-panel {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-stack {
  display: grid;
  gap: 1rem;
  margin-top: auto;
}

.hero-stack-card {
  padding: 1.1rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(21, 37, 81, 0.95), rgba(9, 17, 36, 0.94));
  color: #edf4ff;
}

html[data-theme="light"] .hero-stack-card {
  background: linear-gradient(145deg, #1f3b79, #152551);
}

.hero-stack-card strong,
.list-card strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.hero-stack-card p,
.list-card p {
  margin: 0;
  color: rgba(237, 244, 255, 0.84);
  line-height: 1.6;
}

.section-block {
  margin-top: 1.5rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.7rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.step-card,
.callout-card,
.page-panel,
.docs-panel,
.contact-panel,
.notice-panel {
  padding: 1.4rem;
}

.feature-card h3,
.step-card h3,
.callout-card h3,
.page-panel h2,
.docs-panel h3,
.contact-panel h3,
.notice-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 1.12rem;
}

.feature-card p,
.step-card p,
.callout-card p,
.page-panel p,
.docs-panel p,
.contact-panel p,
.notice-panel p,
.page-panel li,
.docs-panel li {
  margin: 0;
  color: var(--page-muted);
  line-height: 1.65;
}

.steps-grid,
.docs-grid,
.contact-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.api-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.code-block {
  margin: 0.85rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 18px;
  background: #07111f;
  color: #f5f9ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
  line-height: 1.6;
}

html[data-theme="light"] .code-block {
  background: #101d34;
}

.list-card {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: var(--public-shell-soft);
  border: 1px solid var(--public-outline);
}

.bullet-list {
  padding-left: 1.2rem;
  margin: 0.7rem 0 0;
}

.bullet-list li + li {
  margin-top: 0.55rem;
}

.number-list {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
  color: var(--page-muted);
}

.number-list li + li {
  margin-top: 0.55rem;
}

.footer {
  border-top: 1px solid var(--public-outline);
  padding: 1.2rem 0 2.8rem;
  color: var(--page-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr;
  align-items: start;
}

.footer-block {
  min-width: 0;
}

.footer-block strong,
.footer-brand {
  display: block;
  color: var(--page-heading);
  margin-bottom: 0.55rem;
}

.footer-block p {
  margin: 0;
  line-height: 1.65;
}

.footer-block p + p {
  margin-top: 0.55rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.footer-links a,
.footer-block a {
  color: var(--page-heading);
  text-decoration: none;
}

.footer-links a:hover,
.footer-block a:hover {
  text-decoration: underline;
}

.auth-required-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.auth-required-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 24, 0.68);
  backdrop-filter: blur(10px);
}

.auth-required-panel {
  position: relative;
  width: min(560px, calc(100% - 2rem));
  margin: 10vh auto 0;
  padding: 2rem;
  border-radius: 28px;
  background: var(--public-shell);
  border: 1px solid var(--public-outline);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.auth-required-logo,
.login-required-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.auth-required-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.auth-required-back {
  border: none;
  background: transparent;
}

.login-required-page {
  min-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-required-card {
  max-width: 760px;
  text-align: center;
}

.countdown-copy {
  margin-top: 1rem;
  color: var(--page-muted);
}

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

.public-main .page-panel code,
.public-main .docs-panel code,
.public-main .notice-panel code {
  color: var(--page-heading);
}

.site-form-panel,
.site-auth-panel {
  background: var(--public-shell);
  border: 1px solid var(--public-outline);
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
}

.site-auth-panel {
  width: min(100%, 420px);
  padding: 2rem;
}

.site-page-heading {
  color: var(--page-heading);
  text-align: center;
  margin: 0 0 1rem;
}

.site-page-subheading {
  text-align: center;
  color: var(--page-muted);
  margin: 0 0 1.2rem;
}

.site-shell-main-footer-space {
  margin-top: auto;
}

.site-floating-preferences {
  margin-top: 2rem;
}

.site-auth-links {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

@media (max-width: 1080px) {
  .hero,
  .api-summary,
  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid,
  .contact-grid--triple {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .public-shell {
    width: min(100% - 1.2rem, 1180px);
  }

  .public-nav-inner,
  .public-links,
  .hero-actions,
  .footer-inner {
    align-items: stretch;
  }

  .public-nav-inner,
  .steps-grid,
  .docs-grid,
  .contact-grid,
  .about-grid,
  .hero-metrics,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .public-nav-inner {
    display: grid;
  }

  .public-links {
    justify-content: flex-start;
  }

  .hero-copy,
  .hero-panel {
    padding: 1.35rem;
  }

  .site-shell-content,
  .site-shell-content--dashboard {
    width: min(100% - 1.2rem, 1320px);
  }

  .auth-required-panel {
    margin-top: 8vh;
    padding: 1.35rem;
  }
}

/* ==========================================================
   Levida theme readability hardening
   Add this to the very bottom of public.css
   Fixes light/dark visibility for dark cards, code blocks,
   public hero panels, docs examples, and inline code.
   ========================================================== */

:root {
  --page-on-dark: #f8fbff;
  --page-on-dark-muted: rgba(237, 244, 255, 0.86);
  --page-on-dark-soft: rgba(237, 244, 255, 0.72);

  --code-bg: #07111f;
  --code-bg-light-mode: #101d34;
  --code-text: #f5f9ff;
  --code-muted: rgba(245, 249, 255, 0.82);
  --code-border: rgba(255, 255, 255, 0.1);

  --inline-code-bg: color-mix(in srgb, var(--page-chip-bg) 74%, var(--page-surface) 26%);
  --inline-code-text: var(--page-heading);
}

/* Dark feature cards must keep light text in both modes. */
.hero-stack-card,
.hero-stack-card *,
.hero-stack-card strong,
.hero-stack-card h1,
.hero-stack-card h2,
.hero-stack-card h3,
.hero-stack-card h4,
.hero-stack-card span {
  color: var(--page-on-dark) !important;
}

.hero-stack-card p,
.hero-stack-card li,
.hero-stack-card small {
  color: var(--page-on-dark-muted) !important;
}

/* Preserve the dark hero-card background in light mode, but make the text readable. */
html[data-theme="light"] .hero-stack-card {
  background: linear-gradient(145deg, #1f3b79, #152551) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--page-on-dark) !important;
}

/* Code blocks should be readable in both themes. */
.code-block,
pre.code-block {
  background: var(--code-bg) !important;
  color: var(--code-text) !important;
  border: 1px solid var(--code-border) !important;
}

html[data-theme="light"] .code-block,
html[data-theme="light"] pre.code-block {
  background: var(--code-bg-light-mode) !important;
  color: var(--code-text) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* This overrides broad light-mode p/code rules from preferences.css. */
.code-block code,
.code-block pre,
.code-block span,
.code-block *,
pre.code-block code,
pre.code-block * {
  color: var(--code-text) !important;
  background: transparent !important;
  text-shadow: none !important;
}

/* Inline code outside code blocks should follow the page theme. */
.public-main :not(.code-block) > code,
.docs-panel p code,
.page-panel p code,
.notice-panel p code,
.callout-card p code,
.feature-card p code,
.step-card p code {
  display: inline-block;
  padding: 0.12rem 0.35rem;
  border-radius: 8px;
  background: var(--inline-code-bg) !important;
  color: var(--inline-code-text) !important;
  border: 1px solid var(--public-outline);
}

/* Keep panel text tied to theme variables. */
.page-panel,
.docs-panel,
.contact-panel,
.notice-panel,
.feature-card,
.step-card,
.callout-card,
.metric-card,
.list-card {
  color: var(--page-text) !important;
}

.page-panel h1,
.page-panel h2,
.page-panel h3,
.docs-panel h1,
.docs-panel h2,
.docs-panel h3,
.contact-panel h1,
.contact-panel h2,
.contact-panel h3,
.notice-panel h1,
.notice-panel h2,
.notice-panel h3,
.feature-card h1,
.feature-card h2,
.feature-card h3,
.step-card h1,
.step-card h2,
.step-card h3,
.callout-card h1,
.callout-card h2,
.callout-card h3,
.metric-card strong,
.list-card strong {
  color: var(--page-heading) !important;
}

.page-panel p,
.page-panel li,
.docs-panel p,
.docs-panel li,
.contact-panel p,
.contact-panel li,
.notice-panel p,
.notice-panel li,
.feature-card p,
.feature-card li,
.step-card p,
.step-card li,
.callout-card p,
.callout-card li,
.metric-card span,
.list-card p,
.number-list,
.number-list li,
.bullet-list,
.bullet-list li {
  color: var(--page-muted) !important;
}

/* Buttons should never inherit unreadable page text accidentally. */
.cta-button,
.nav-button,
.feature-link,
.docs-link {
  color: var(--public-ink) !important;
}

.cta-button-secondary {
  color: var(--page-heading) !important;
  background: color-mix(in srgb, var(--page-surface) 82%, transparent) !important;
}

/* Public nav readability in both modes. */
.public-nav,
.public-nav * {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-link {
  color: var(--page-muted) !important;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--page-heading) !important;
  background: color-mix(in srgb, var(--page-chip-bg) 82%, transparent) !important;
}

/* Generator page cards and method panels. */
.card,
.lead-method-panel,
.method-card {
  color: var(--page-text) !important;
}

.search-method-title,
.method-heading,
.lead-method-panel h3,
.field-label,
.keyword-label {
  color: var(--page-heading) !important;
}

.method-helper,
.section-helper,
.lead-method-panel p {
  color: var(--page-muted) !important;
}

.method-card.active,
.method-card[aria-pressed="true"] {
  background: var(--page-panel-active) !important;
  border-color: rgba(0, 201, 167, 0.55) !important;
}

/* Inputs/selects stay readable after theme changes. */
input,
textarea,
select {
  background: var(--page-input-bg) !important;
  color: var(--page-input-text) !important;
  border-color: var(--page-border) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--page-placeholder) !important;
}

/* Progress panel text should not get washed out. */
.lead-progress-panel,
.lead-progress-panel * {
  color: var(--page-text);
}

.lead-progress-copy h3,
.lead-progress-meta {
  color: var(--page-heading) !important;
}

.lead-progress-copy p,
.lead-progress-details {
  color: var(--page-muted) !important;
}

/* Download/action button inside generated progress area. */
.lead-progress-actions .dashboard-button {
  color: #06131c !important;
}

.lead-progress-secondary {
  color: var(--page-heading) !important;
}

/* Toasts should always use white text on colored backgrounds. */
.toast,
.levida-toast,
.toast *,
.levida-toast * {
  color: #ffffff !important;
}

/* Tutorial flyover keeps intentional fixed colors. */
.tf-banner {
  color: #ffffff !important;
}

.tf-close {
  color: #005030 !important;
}




/* ==========================================================
   Landing page light/dark polish
   Add this to the very bottom of public.css, after the last patch.
   ========================================================== */

:root {
  --landing-panel-dark-bg: rgba(11, 21, 45, 0.82);
  --landing-panel-dark-bg-strong: rgba(12, 24, 52, 0.92);
  --landing-panel-dark-border: rgba(237, 244, 255, 0.16);
  --landing-on-dark: #f8fbff;
  --landing-on-dark-muted: rgba(237, 244, 255, 0.84);
  --landing-on-dark-soft: rgba(237, 244, 255, 0.66);

  --landing-preview-light-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
  --landing-preview-dark-bg: linear-gradient(145deg, rgba(13, 29, 61, 0.96), rgba(6, 15, 34, 0.96));
}

/* Make the landing hero consistent across theme changes. */
.landing-hero {
  align-items: stretch;
}

.landing-hero-copy,
.landing-hero-panel {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Light mode landing panels. */
html[data-theme="light"] .landing-hero-copy,
html[data-theme="light"] .landing-hero-panel,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .step-card,
html[data-theme="light"] .callout-card,
html[data-theme="light"] .notice-panel,
html[data-theme="light"] .page-panel,
html[data-theme="light"] .docs-panel,
html[data-theme="light"] .metric-card {
  background: var(--public-shell) !important;
  border-color: var(--public-outline) !important;
  color: var(--page-text) !important;
}

/* Dark mode landing panels. */
html:not([data-theme="light"]) .landing-hero-copy,
html:not([data-theme="light"]) .landing-hero-panel,
html:not([data-theme="light"]) .feature-card,
html:not([data-theme="light"]) .step-card,
html:not([data-theme="light"]) .callout-card,
html:not([data-theme="light"]) .notice-panel,
html:not([data-theme="light"]) .page-panel,
html:not([data-theme="light"]) .docs-panel,
html:not([data-theme="light"]) .metric-card,
html[data-theme="dark"] .landing-hero-copy,
html[data-theme="dark"] .landing-hero-panel,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .callout-card,
html[data-theme="dark"] .notice-panel,
html[data-theme="dark"] .page-panel,
html[data-theme="dark"] .docs-panel,
html[data-theme="dark"] .metric-card {
  background: var(--landing-panel-dark-bg) !important;
  border-color: var(--landing-panel-dark-border) !important;
  color: var(--landing-on-dark) !important;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34) !important;
}

/* Dark mode text clarity. */
html:not([data-theme="light"]) .landing-hero h1,
html:not([data-theme="light"]) .landing-hero h2,
html:not([data-theme="light"]) .landing-hero h3,
html:not([data-theme="light"]) .landing-hero strong,
html:not([data-theme="light"]) .feature-card h3,
html:not([data-theme="light"]) .step-card h3,
html:not([data-theme="light"]) .callout-card h3,
html:not([data-theme="light"]) .notice-panel h3,
html:not([data-theme="light"]) .page-panel h2,
html[data-theme="dark"] .landing-hero h1,
html[data-theme="dark"] .landing-hero h2,
html[data-theme="dark"] .landing-hero h3,
html[data-theme="dark"] .landing-hero strong,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .step-card h3,
html[data-theme="dark"] .callout-card h3,
html[data-theme="dark"] .notice-panel h3,
html[data-theme="dark"] .page-panel h2 {
  color: var(--landing-on-dark) !important;
}

html:not([data-theme="light"]) .landing-hero p,
html:not([data-theme="light"]) .landing-hero span,
html:not([data-theme="light"]) .feature-card p,
html:not([data-theme="light"]) .step-card p,
html:not([data-theme="light"]) .callout-card p,
html:not([data-theme="light"]) .notice-panel p,
html:not([data-theme="light"]) .page-panel p,
html[data-theme="dark"] .landing-hero p,
html[data-theme="dark"] .landing-hero span,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .step-card p,
html[data-theme="dark"] .callout-card p,
html[data-theme="dark"] .notice-panel p,
html[data-theme="dark"] .page-panel p {
  color: var(--landing-on-dark-muted) !important;
}

/* Fix the empty top-right hero area. */
.landing-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.landing-hero-stack {
  margin-top: 0 !important;
}

/* New right-column preview card. */
.landing-preview-card {
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px solid var(--public-outline);
  background: var(--landing-preview-light-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--page-text);
}

html:not([data-theme="light"]) .landing-preview-card,
html[data-theme="dark"] .landing-preview-card {
  background: var(--landing-preview-dark-bg) !important;
  border-color: rgba(237, 244, 255, 0.14) !important;
  color: var(--landing-on-dark) !important;
}

.landing-preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.landing-preview-badge,
.landing-preview-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.landing-preview-badge {
  padding: 0.45rem 0.68rem;
  background: rgba(0, 201, 167, 0.13);
  color: var(--page-heading);
}

.landing-preview-status {
  padding: 0.45rem 0.62rem;
  background: linear-gradient(135deg, var(--public-accent), var(--public-accent-strong));
  color: #06131c !important;
}

html:not([data-theme="light"]) .landing-preview-badge,
html[data-theme="dark"] .landing-preview-badge {
  color: var(--landing-on-dark) !important;
  background: rgba(0, 201, 167, 0.18) !important;
}

.landing-preview-search {
  padding: 1rem;
  border-radius: 20px;
  background: color-mix(in srgb, var(--page-surface-soft) 68%, transparent);
  border: 1px solid var(--public-outline);
}

html:not([data-theme="light"]) .landing-preview-search,
html[data-theme="dark"] .landing-preview-search {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(237, 244, 255, 0.12) !important;
}

.landing-preview-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--page-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.landing-preview-search strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--page-heading);
  font-size: 1.15rem;
}

.landing-preview-search p {
  margin: 0;
  color: var(--page-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.landing-preview-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 1rem;
}

.landing-preview-flow span {
  display: inline-flex;
  justify-content: center;
  padding: 0.55rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--page-chip-bg) 82%, transparent);
  color: var(--page-heading);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

html:not([data-theme="light"]) .landing-preview-flow span,
html[data-theme="dark"] .landing-preview-flow span {
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--landing-on-dark) !important;
}

.landing-preview-progress {
  height: 12px;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--page-chip-bg) 88%, transparent);
}

.landing-preview-progress span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--public-accent), #38bdf8);
}

.landing-preview-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.landing-preview-mini-card {
  padding: 0.8rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--page-surface) 82%, transparent);
  border: 1px solid var(--public-outline);
}

html:not([data-theme="light"]) .landing-preview-mini-card,
html[data-theme="dark"] .landing-preview-mini-card {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(237, 244, 255, 0.12) !important;
}

.landing-preview-mini-card strong {
  display: block;
  color: var(--page-heading);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.landing-preview-mini-card span {
  display: block;
  color: var(--page-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

/* Right-column dark cards always use readable white text. */
.hero-stack-card,
.hero-stack-card *,
html[data-theme="light"] .hero-stack-card,
html[data-theme="light"] .hero-stack-card *,
html:not([data-theme="light"]) .hero-stack-card,
html:not([data-theme="light"]) .hero-stack-card *,
html[data-theme="dark"] .hero-stack-card,
html[data-theme="dark"] .hero-stack-card * {
  color: var(--landing-on-dark) !important;
}

.hero-stack-card p,
html[data-theme="light"] .hero-stack-card p,
html:not([data-theme="light"]) .hero-stack-card p,
html[data-theme="dark"] .hero-stack-card p {
  color: var(--landing-on-dark-muted) !important;
}

.hero-stack-card {
  background: linear-gradient(145deg, #1f3b79, #0d1b3a) !important;
  border: 1px solid rgba(237, 244, 255, 0.12);
}

/* Light-mode metric cards stay light and readable. */
html[data-theme="light"] .metric-card strong,
html[data-theme="light"] .feature-card h3,
html[data-theme="light"] .step-card h3,
html[data-theme="light"] .callout-card h3,
html[data-theme="light"] .notice-panel h3,
html[data-theme="light"] .page-panel h2 {
  color: var(--page-heading) !important;
}

html[data-theme="light"] .metric-card span,
html[data-theme="light"] .feature-card p,
html[data-theme="light"] .step-card p,
html[data-theme="light"] .callout-card p,
html[data-theme="light"] .notice-panel p,
html[data-theme="light"] .page-panel p,
html[data-theme="light"] .section-intro {
  color: var(--page-muted) !important;
}

/* Keep code blocks readable inside callouts. */
.callout-card .code-block,
.callout-card .code-block *,
html[data-theme="light"] .callout-card .code-block,
html[data-theme="light"] .callout-card .code-block *,
html:not([data-theme="light"]) .callout-card .code-block,
html:not([data-theme="light"]) .callout-card .code-block *,
html[data-theme="dark"] .callout-card .code-block,
html[data-theme="dark"] .callout-card .code-block * {
  color: #f5f9ff !important;
}

/* Mobile layout: preview card stacks cleanly above feature cards. */
@media (max-width: 1080px) {
  .landing-hero-panel {
    min-height: auto;
  }

  .landing-preview-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-preview-flow,
  .landing-preview-mini-grid {
    grid-template-columns: 1fr;
  }

  .landing-preview-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
