:root {
  --aft-mint: #33ffb5;
  --aft-mint-hover: var(--aft-button-hover, #19dc95);
  --aft-charcoal: #111715;
  --aft-nav: #202825;
  --aft-ivory: #f6f5ef;
  --aft-ink: #18241f;
  --aft-muted: #42564e;
  --aft-rule: #c4d2c9;
  --aft-green-ink: #126449;
}

/* Functional edition */
.feature-page {
  --paper: var(--aft-charcoal);
  --mint: var(--aft-mint);
}
.feature-page ::selection,
body[data-catalog] ::selection { background: var(--aft-mint); color: var(--aft-ink); }
.feature-page > header { --nav-bar: var(--aft-nav); --nav-panel: var(--aft-nav); --nav-panel-filter: none; }
.feature-page > header .auth .button.small {
  border-radius: 999px;
  background: var(--aft-mint);
  color: var(--aft-ink);
}
.feature-page > header .auth .button.small:hover { background: var(--aft-mint-hover); }
.feature-page > header .bar .brand img { border-radius: 3px; }
.feature-page .aft-terrain { display: none; }

.feature-page :is(.subhero, .compare-intro) {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 72px);
  min-height: clamp(340px, 38vw, 550px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--aft-charcoal);
}
.feature-page :is(.subhero, .compare-intro) > div:first-child {
  align-self: center;
  padding: clamp(24px, 3vw, 52px) 0;
}
.feature-page main h1 {
  font-size: clamp(2.9rem, 5.65vw, 6rem);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -.038em;
  overflow-wrap: anywhere;
}
.feature-page :is(.subhero, .compare-intro) .lead { max-width: 48ch; color: #d4dfd8; }
.feature-page :is(.subhero > .visual, .compare-intro > img) {
  align-self: stretch;
  width: 100%;
  min-height: 100%;
  border-radius: 12px;
}
.feature-page .subhero .claude-visual { aspect-ratio: auto; }
.feature-page .compare-intro > img { height: 100%; }
.feature-page .subhero .photo-visual::after,
.feature-page .subhero .instrument-visual::before { display: none; }
.feature-page .subhero :is(.instrument-visual, .account-visual) { background: var(--aft-nav); }

.feature-page main :is(.button, .story-jump .button, .story-journey .action) {
  border-radius: 999px;
}
.feature-page main :is(.subhero, .campaign-summary, .story-jump, .workbox form) .button {
  background: var(--aft-mint);
  color: var(--aft-ink);
  border-color: transparent;
}
.feature-page main :is(.subhero, .campaign-summary, .story-jump, .workbox form) .button:hover {
  background: var(--aft-mint-hover);
}
.feature-page .contents { background: var(--paper); }
.feature-page .contents a[aria-current=location] { color: var(--aft-mint); }
.feature-page .section-content > h2 { font-size: clamp(2.25rem, 4.15vw, 4.5rem); font-weight: 600; line-height: 1.05; }
.feature-page .ai-example { border: 1px solid var(--line); border-radius: 12px; }
.feature-page :is(.workbox, [data-compare]) { background: #18211d; border-radius: 12px; }

/* Reading sections use the light palette. Embedded workspaces keep their own surfaces. */
.feature-page:not(.story-page) main .section.aft-reading {
  --ink: var(--aft-ink);
  --quiet: var(--aft-muted);
  --line: var(--aft-rule);
  --lav: #e3f0e8;
  --purple: var(--aft-green-ink);
  --mint: var(--aft-green-ink);
  color: var(--ink);
  color-scheme: light;
  background: var(--aft-ivory);
  box-shadow: 0 0 0 100vmax var(--aft-ivory);
  clip-path: inset(0 -100vmax);
}
.feature-page .aft-reading a:not(.button),
.feature-page .aft-reading a:not(.button):hover { color: var(--aft-green-ink); }
.feature-page .aft-reading :is(a, summary):focus-visible { outline-color: var(--aft-green-ink); }
.feature-page .aft-reading .steps li::before {
  color: var(--aft-green-ink);
  background: #dcefe4;
  border-color: var(--aft-rule);
}
.feature-page .aft-reading .section-label::before { background: var(--aft-green-ink); }
.feature-page .aft-reading .button { background: var(--aft-charcoal); color: #fff; }
.feature-page .aft-reading .button:hover { background: #24473b; }
.story-page main {
  --paper: var(--aft-ivory);
  --ink: var(--aft-ink);
  --quiet: var(--aft-muted);
  --line: var(--aft-rule);
}
.story-page .story-body .story-journey { background: var(--aft-charcoal); }
.story-page main .story-jump .contents { background: transparent; }
.story-page main .story-jump .contents a[aria-current=location] { color: var(--aft-green-ink); }
.story-page .story-body h2 { font-weight: 600; }

@media (max-width: 820px) {
  .feature-page :is(.subhero, .compare-intro) {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 4px;
  }
  .feature-page :is(.subhero, .compare-intro) > div:first-child { padding: 16px 0 20px; }
  .feature-page main h1 { font-size: clamp(2.55rem, 8.8vw, 4.75rem); }
  .feature-page :is(.subhero > .visual, .compare-intro > img) {
    min-height: 0;
    height: clamp(185px, 52vw, 360px);
  }
}

/* Archived routes retain their original templates and matching brand controls. */
body[data-catalog] .cmc-header { background: var(--aft-nav) !important; }
body[data-catalog] header.cmc-header.fixed > .site-container:first-child > nav > div > button {
  color: #f3f7f5 !important;
}
body[data-catalog] header.cmc-header.fixed > .site-container:first-child > nav > div > button:is(:hover, :focus-visible, [aria-expanded=true]) {
  color: var(--aft-mint) !important;
}
body[data-catalog] .cmc-header > .site-container > a:first-child { background: var(--aft-mint); }
body[data-catalog] header.cmc-header.fixed .site-container a:is([href*="registration"], [href*="register.afttmarkets.com"]),
body[data-catalog] header.cmc-header.fixed a.cta-btn[data-cta-type=register] {
  color: var(--aft-ink) !important;
  background: var(--aft-mint) !important;
  border-color: var(--aft-mint) !important;
  border-radius: 999px;
}
body[data-catalog] .cmc-header .site-container a:is([href*="registration"], [href*="register.afttmarkets.com"]):hover {
  background: var(--aft-mint-hover) !important;
}
body[data-catalog] main h1 {
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
body[data-catalog] main h1:lang(en) { font-family: Outfit, "Instrument Sans", sans-serif; }
body[data-catalog] main h2:lang(en) { font-family: "Source Sans 3", "Instrument Sans", sans-serif; }
body[data-catalog] main :is(section.bg-black, .help-hero, .help-category-hero) { background: var(--aft-charcoal); }
body[data-catalog] main :is(section.bg-black, .help-hero, .help-category-hero) h1 { color: #fff; }
body[data-catalog] main > :is(section.bg-white, .help-results, .help-popular) { background-color: var(--aft-ivory); }
body[data-catalog] .footer-disclosures { border-top: 1px solid var(--aft-rule); }

body[data-catalog] main :is(.help-hero .help-search-submit, .help-contact-strip > a) {
  background: var(--aft-mint);
  color: var(--aft-ink);
}
body[data-catalog] main :is(.help-hero .help-search-submit, .help-contact-strip > a):hover {
  background: var(--aft-mint-hover);
}
body[data-catalog] main :is(.help-topic-heading, .help-category-questions a:hover) { color: var(--aft-green-ink); }
body[data-catalog] main .help-popular-mark { background: var(--aft-green-ink); }
body[data-catalog] main .help-contact-strip { background: var(--aft-ivory); }
body[data-catalog] main .help-contact-strip > p,
body[data-catalog] main .help-contact-strip > div > p { color: var(--aft-muted); }

body[data-catalog] main .help-search input::placeholder { color: var(--aft-muted); }
body[data-catalog] main .help-follow-feature {
  color: var(--aft-green-ink);
  border-color: var(--aft-rule);
  background: var(--aft-ivory);
}
body[data-catalog] main .help-follow-feature strong { color: var(--aft-ink); }
body[data-catalog] main .help-follow-feature > span > span { color: var(--aft-muted); }
body[data-catalog] main .help-follow-feature:hover { background: #e3f0e8; }
