:root {
  --ch-bg: #050505;
  --ch-bg-soft: #0b0b0b;
  --ch-surface: #121212;
  --ch-surface-2: #1a1a1a;
  --ch-surface-3: #222222;
  --ch-border: #2c2c2c;
  --ch-border-soft: rgba(255, 255, 255, 0.08);
  --ch-text: #ffffff;
  --ch-text-muted: #b8b8b8;
  --ch-text-soft: #8f8f8f;
  --ch-amber: #ffb000;
  --ch-orange: #ff9900;
  --ch-orange-strong: #ff8a00;
  --ch-orange-soft: rgba(255, 153, 0, 0.16);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ch-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 176, 0, 0.16), transparent 28rem),
    linear-gradient(180deg, #050505 0%, #0b0b0b 55%, #050505 100%);
  color: var(--ch-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 40px;
  padding: 10px;
  border: 1px solid var(--ch-border-soft);
  border-radius: var(--radius-pill);
  background: rgba(11, 11, 11, 0.84);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.section-heading,
.category-heading,
.tool-card-top,
.tool-card-bottom {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.round-icon,
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--ch-amber), var(--ch-orange-strong));
  color: #111111;
  box-shadow: 0 0 34px rgba(255, 153, 0, 0.28);
}

.brand-word {
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-word span {
  color: var(--ch-amber);
}

.site-nav {
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a,
.nav-cta,
.button,
.access-badge {
  border-radius: var(--radius-pill);
}

.site-nav a {
  padding: 10px 14px;
  color: var(--ch-text-muted);
  font-size: 0.94rem;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--ch-text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 800;
}

.nav-cta,
.button-primary {
  background: linear-gradient(135deg, var(--ch-amber), var(--ch-orange-strong));
  color: #111111;
  box-shadow: 0 12px 34px rgba(255, 153, 0, 0.22);
}

.button-secondary {
  border: 1px solid var(--ch-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ch-text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: stretch;
  min-height: 520px;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  gap: 24px;
  align-items: stretch;
  margin: 32px 0 48px;
}

.hero-content,
.hero-panel,
.tool-card,
.feature-item,
.cta-band,
.tool-hero-copy,
.tool-hero-side,
.calculator-panel,
.results-panel,
.result-card,
.content-card {
  border: 1px solid var(--ch-border-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.hero-content,
.hero-panel,
.tool-hero-copy,
.tool-hero-side,
.calculator-panel,
.results-panel,
.content-card {
  border-radius: 36px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 72px);
}

.tool-hero-copy,
.tool-hero-side {
  padding: clamp(28px, 5vw, 56px);
}

.tool-hero-copy h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 6.2rem);
}

.tool-hero-copy p {
  max-width: 720px;
  font-size: 1.12rem;
}

.tool-hero-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tool-icon-large {
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--ch-amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

p {
  color: var(--ch-text-muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 650px;
  font-size: clamp(1.24rem, 2vw, 1.7rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  padding: 24px;
  border: 1px solid var(--ch-border-soft);
  border-radius: var(--radius-xl);
  background: rgba(255, 176, 0, 0.08);
}

.metric-card span {
  color: var(--ch-text-muted);
}

.metric-card strong {
  font-size: 2.3rem;
}

.section,
.section-grid,
.cta-band,
.page-hero,
.calculator-shell {
  margin: 72px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--ch-text-soft);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--ch-amber);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 42px;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.calculator-panel,
.results-panel,
.content-card {
  padding: clamp(22px, 4vw, 36px);
}

.igv-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.field-label {
  color: var(--ch-text-muted);
  font-weight: 800;
}

.amount-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--ch-border);
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.28);
}

.amount-field span {
  color: var(--ch-amber);
  font-size: 1.3rem;
  font-weight: 900;
}

.amount-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ch-text);
  font: inherit;
  font-size: 1.6rem;
  font-weight: 900;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--ch-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.segmented-control legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: flex;
  justify-content: center;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  color: var(--ch-text-muted);
  font-weight: 800;
}

.segmented-control input:checked + span {
  background: var(--ch-orange-soft);
  color: var(--ch-amber);
}

.form-note,
.copy-status {
  min-height: 24px;
  margin: 0;
  color: var(--ch-text-soft);
  font-size: 0.92rem;
}

.results-panel {
  display: grid;
  gap: 14px;
}

.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 114px;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.result-card-accent {
  background: linear-gradient(135deg, rgba(255, 176, 0, 0.2), rgba(255, 138, 0, 0.08));
}

.result-card span {
  color: var(--ch-text-muted);
}

.result-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.icon-button {
  min-width: 86px;
  min-height: 42px;
  border: 1px solid var(--ch-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ch-text);
  cursor: pointer;
  font-weight: 900;
}

.icon-button:hover {
  border-color: rgba(255, 176, 0, 0.52);
  color: var(--ch-amber);
}

.copy-summary {
  width: 100%;
}

.formula-box {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.formula-box code {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--ch-border-soft);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ch-amber);
  white-space: normal;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.round-icon {
  width: 48px;
  height: 48px;
  background: var(--ch-orange-soft);
  color: var(--ch-amber);
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-card {
  min-height: 230px;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.tool-card-top,
.tool-card-bottom {
  justify-content: space-between;
  gap: 12px;
}

.tool-icon {
  width: 54px;
  height: 54px;
  background: color-mix(in srgb, var(--tool-accent), transparent 76%);
  color: var(--tool-accent);
}

.access-badge {
  padding: 7px 11px;
  border: 1px solid var(--ch-border-soft);
  color: var(--ch-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tool-card h3 {
  margin-top: 22px;
}

.tool-card-bottom {
  margin-top: 24px;
  color: var(--ch-text-soft);
  font-size: 0.9rem;
}

.tool-card-bottom a {
  color: var(--ch-amber);
  font-weight: 800;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border-radius: 34px;
}

.page-hero {
  max-width: 820px;
}

.page-hero h1 {
  font-size: clamp(3rem, 7vw, 5.6rem);
}

.category-heading {
  gap: 14px;
  margin-bottom: 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 70px 0 28px;
  padding-top: 28px;
  border-top: 1px solid var(--ch-border-soft);
  color: var(--ch-text-muted);
}

.footer-note {
  max-width: 420px;
  text-align: right;
}

@media (max-width: 880px) {
  .site-header,
  .hero,
  .tool-hero,
  .calculator-shell,
  .section-grid,
  .cta-band,
  .site-footer {
    display: grid;
  }

  .site-header {
    border-radius: var(--radius-xl);
  }

  .site-nav {
    width: 100%;
    justify-content: center;
  }

  .nav-cta {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .site-footer {
    align-items: start;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  .brand-word {
    display: none;
  }

  .hero-content,
  .hero-panel {
    border-radius: var(--radius-xl);
  }

  .hero-content {
    padding: 28px;
  }

  .button {
    width: 100%;
  }

  .segmented-control {
    grid-template-columns: 1fr;
    border-radius: var(--radius-xl);
  }

  .result-card {
    align-items: stretch;
    flex-direction: column;
  }

  .icon-button {
    width: 100%;
  }
}
