:root {
  color-scheme: dark;
  --rc-bg: #05070c;
  --rc-bg-soft: #0a0f17;
  --rc-panel: rgba(14, 18, 26, 0.96);
  --rc-panel-soft: rgba(255, 255, 255, 0.03);
  --rc-line: rgba(255, 255, 255, 0.08);
  --rc-line-strong: rgba(244, 200, 74, 0.24);
  --rc-text: #f4f7fb;
  --rc-text-soft: #c3cad8;
  --rc-text-muted: #8f98aa;
  --rc-gold: #f4c84a;
  --rc-gold-strong: #ffd978;
  --rc-green: #42d887;
  --rc-red: #ff6b75;
  --rc-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
  --rc-radius-xl: 28px;
  --rc-radius-lg: 22px;
  --rc-radius-md: 18px;
  --rc-radius-sm: 14px;
  --rc-page-w: 1180px;
  --rc-header-h: 72px;
  --rc-font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --rc-display: "Sora", "Manrope", "Segoe UI", system-ui, sans-serif;
  --rc-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--rc-font);
  color: var(--rc-text);
  background:
    radial-gradient(circle at 12% -4%, rgba(244, 200, 74, 0.16), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(244, 200, 74, 0.08), transparent 18rem),
    radial-gradient(circle at 80% 80%, rgba(76, 118, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #05070c 0%, #0a0f17 50%, #05070c 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

section {
  scroll-margin-top: 96px;
}

.container {
  width: min(var(--rc-page-w), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  z-index: 3000;
}

.skip-link:focus {
  left: 12px;
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 14px 0;
  background: rgba(5, 7, 12, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  transition: padding 180ms ease, box-shadow 180ms ease;
}

.navbar.is-scrolled {
  padding: 10px 0;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(244, 200, 74, 0.2);
  background: radial-gradient(circle at 50% 0%, rgba(244, 200, 74, 0.18), transparent 70%), rgba(255, 255, 255, 0.03);
  color: var(--rc-gold);
  font-family: var(--rc-display);
  font-weight: 800;
}

.brand-copy {
  font-family: var(--rc-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-copy span {
  color: var(--rc-gold);
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: inline-flex;
}

.nav-links,
.nav-actions {
  align-items: center;
  gap: 10px;
}

.nav-links a {
  color: var(--rc-text-soft);
  text-decoration: none;
  font-weight: 700;
}

.btn-nav,
.btn-primary,
.btn-secondary,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.btn-nav,
.btn-primary,
.btn-secondary {
  padding: 0 18px;
}

.btn-nav--primary,
.btn-primary {
  background: linear-gradient(135deg, var(--rc-gold-strong), #c58f1e);
  border-color: rgba(255, 231, 161, 0.3);
  color: #171309;
  box-shadow: 0 16px 28px rgba(244, 200, 74, 0.18);
}

.btn-nav--ghost,
.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--rc-text);
}

.btn-secondary--quiet {
  background: rgba(244, 200, 74, 0.06);
  border-color: rgba(244, 200, 74, 0.22);
  color: #f9efcc;
}

.btn-primary.full {
  width: 100%;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-nav:hover,
.btn-nav:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  transform: translateY(-1px);
}

.nav-toggle {
  width: 44px;
  padding: 0;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: calc(var(--rc-header-h) + 8px);
  left: 16px;
  right: 16px;
  z-index: 85;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(244, 200, 74, 0.14);
  background: rgba(10, 13, 20, 0.97);
  box-shadow: var(--rc-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  font-weight: 700;
}

.mobile-menu .btn-nav--primary {
  justify-content: center;
  background: linear-gradient(135deg, var(--rc-gold-strong), #c58f1e);
  border-color: rgba(255, 231, 161, 0.3);
  color: #171309;
}

.mobile-menu__muted {
  color: var(--rc-text-soft);
}

.hero {
  position: relative;
  padding: 116px 0 60px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 200, 74, 0.12), transparent 30rem),
    linear-gradient(180deg, rgba(5, 7, 12, 0.1), rgba(5, 7, 12, 0.56));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-items: start;
}

.badge-gold,
.section-kicker,
.result-next-step__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(244, 200, 74, 0.18);
  background: rgba(244, 200, 74, 0.08);
  color: var(--rc-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.section-header h2,
.result-header h3,
.result-next-step h3,
.cta-inner h2 {
  margin: 0;
  font-family: var(--rc-display);
  letter-spacing: -0.05em;
  color: #fff;
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(2.05rem, 9vw, 3.5rem);
  line-height: 1.02;
  max-width: 10ch;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.5;
}

.hero-intro,
.section-header p,
.framework-card p,
.edu-card p,
.result-summary,
#resultDecision,
.cta-inner p,
.form-note {
  color: var(--rc-text-soft);
  line-height: 1.56;
}

.hero-intro {
  margin: 12px 0 0;
  max-width: 54ch;
  font-size: 0.95rem;
}

.hero-btns {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #dce3ef;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero-visual {
  min-width: 0;
}

.visual-shell,
.tool-form,
.result-panel,
.framework-card,
.edu-card,
.cta-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rc-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.98), rgba(10, 13, 20, 0.96));
  box-shadow: var(--rc-shadow);
}

.visual-shell::before,
.tool-form::before,
.result-panel::before,
.framework-card::before,
.edu-card::before,
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 200, 74, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%);
}

.visual-shell {
  padding: 18px;
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--rc-text-soft);
  font-size: 0.8rem;
}

.visual-header strong {
  color: #fff;
}

.visual-metrics {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.visual-metrics article,
.result-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.visual-metrics article {
  padding: 14px;
}

.visual-metrics span,
.result-card span {
  display: block;
  color: var(--rc-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-metrics strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 0.96rem;
}

.visual-row {
  height: 2px;
  margin-top: 14px;
  background: linear-gradient(90deg, transparent, var(--rc-gold), transparent);
}

.visual-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(244, 200, 74, 0.08);
  border: 1px solid rgba(244, 200, 74, 0.18);
  color: var(--rc-gold);
  font-size: 0.76rem;
  font-weight: 700;
}

.section {
  padding: 56px 0;
}

.section-header {
  margin-bottom: 18px;
  text-align: left;
}

.section-header h2,
.cta-inner h2 {
  font-size: clamp(1.55rem, 5vw, 2.6rem);
  line-height: 1.06;
}

.section-header p {
  margin: 8px 0 0;
  max-width: 62ch;
  font-size: 0.92rem;
}

.tool-grid {
  display: grid;
  gap: 14px;
}

.tool-form,
.result-panel,
.framework-card,
.edu-card,
.cta-inner {
  padding: 18px;
}

.tool-form {
  display: grid;
  gap: 14px;
}

.input-group {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #e8edf7;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 9, 14, 0.84);
  color: #fff;
}

input::placeholder {
  color: #9098a7;
}

input:focus-visible {
  outline: 3px solid rgba(244, 200, 74, 0.34);
  outline-offset: 2px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 200, 74, 0.18);
  background: rgba(244, 200, 74, 0.05);
  color: #e6d9b3;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.preset-chip.is-active {
  background: rgba(244, 200, 74, 0.16);
  border-color: rgba(244, 200, 74, 0.38);
  color: #fff7da;
  transform: translateY(-1px);
}

.form-note {
  margin: 0;
  font-size: 0.84rem;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-header h3 {
  margin-top: 4px;
  font-size: 1.36rem;
}

.result-header span {
  color: var(--rc-text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.result-summary {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.result-card {
  padding: 14px;
}

.result-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-family: var(--rc-mono);
  font-size: 1.05rem;
  line-height: 1.2;
}

#disciplineSignal[data-tone="stable"] {
  color: var(--rc-green);
}

#disciplineSignal[data-tone="watch"] {
  color: var(--rc-gold);
}

#disciplineSignal[data-tone="alert"] {
  color: var(--rc-red);
}

.chart-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 14, 0.72);
}

#riskChart {
  width: min(220px, 62vw);
  height: auto;
}

.chart-label {
  position: absolute;
  font-family: var(--rc-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--rc-gold);
}

.result-next-step {
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(244, 200, 74, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 200, 74, 0.12), transparent 18rem),
    rgba(255, 255, 255, 0.03);
}

.result-next-step h3 {
  margin-top: 10px;
  font-size: 1.24rem;
}

.result-next-step p {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.result-actions,
.cta-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.framework-grid,
.edu-grid {
  display: grid;
  gap: 12px;
}

.framework-card h3,
.edu-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.22;
  color: #fff;
}

.framework-card p,
.edu-card p {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.cta-inner {
  display: grid;
  gap: 14px;
}

.cta-inner p {
  margin: 10px 0 0;
  max-width: 58ch;
}

:focus-visible {
  outline: 3px solid rgba(244, 200, 74, 0.34);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .hero-btns,
  .result-actions,
  .cta-actions,
  .framework-grid,
  .edu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 768px) {
  .desktop-only {
    display: flex;
  }

  .mobile-only {
    display: none;
  }

  .hero {
    padding: 146px 0 74px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
    gap: 28px;
  }

  .tool-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

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

  .nav-links a {
    min-height: 44px;
    padding: 0 4px;
  }

  .nav-actions {
    display: flex;
  }

  .mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 72px 0;
  }

  .visual-shell,
  .tool-form,
  .result-panel,
  .framework-card,
  .edu-card,
  .cta-inner {
    padding: 22px;
    border-radius: 26px;
  }

  .cta-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}
