:root {
  --marketing-bg: #f5f5f7;
  --marketing-surface: rgba(255, 255, 255, .92);
  --marketing-text: #1d1d1f;
  --marketing-muted: #5f6368;
  --marketing-line: rgba(0, 0, 0, .12);
  --marketing-accent: #0071e3;
}

body.service-page,
body.newsroom-page,
body.legal-page,
body.contact-page {
  color: var(--marketing-text);
  background: var(--marketing-bg);
}

body.service-page .detail-shell,
body.newsroom-page .detail-shell,
body.contact-page .detail-shell,
body.legal-page .legal-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 18px;
}

body.service-page .detail-header,
body.newsroom-page .detail-header,
body.contact-page .detail-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  min-height: 58px;
  border: 1px solid var(--marketing-line);
  border-radius: 8px;
  color: var(--marketing-text);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
  backdrop-filter: saturate(160%) blur(18px);
}

body.service-page .detail-header :is(a, button),
body.newsroom-page .detail-header :is(a, button),
body.contact-page .detail-header :is(a, button) { color: var(--marketing-text); }

body.service-page :is(.hero-story, .service-hero, .guide-hero, .api-hero, .earnings-hero),
body.newsroom-page :is(.hero-story, .newsroom-hero),
body.contact-page :is(.hero-story, .contact-hero),
body.legal-page .legal-hero { color: var(--marketing-text); background: transparent; }

body.service-page :is(.service-card, .guide-card, .api-card, .earnings-card, .report-panel, .content-card),
body.newsroom-page :is(.newsroom-card, .content-card),
body.contact-page :is(.contact-card, .content-card),
body.legal-page :is(.legal-section, section) {
  border-color: var(--marketing-line);
  border-radius: 8px;
  color: var(--marketing-text);
  background: var(--marketing-surface);
  box-shadow: none;
}

body.service-page :is(.service-panel, .earnings-workspace),
body.newsroom-page .newsroom-panel,
body.contact-page :is(.contact-panel, .contact-section) {
  border: 1px solid var(--marketing-line);
  border-radius: 8px;
  color: var(--marketing-text);
  background: var(--marketing-surface);
  box-shadow: none;
}

body.service-page :is(.service-panel, .earnings-workspace, .earnings-card, .api-product-card, .guide-step, .guide-routine) :is(h2, h3, h4, strong),
body.newsroom-page :is(.newsroom-panel, .newsroom-card) :is(h2, h3, h4, strong),
body.contact-page :is(.contact-panel, .contact-section, .contact-card) :is(h2, h3, h4, strong) {
  color: var(--marketing-text);
}

body.service-page :is(.earnings-summary-grid article, .earnings-filter-panel, .earnings-card, .earnings-metric, .api-summary-grid article, .api-product-card, .guide-step, .guide-routine),
body.newsroom-page .newsroom-card {
  border-color: var(--marketing-line);
  color: var(--marketing-text);
  background: #fff;
}

body.service-page .earnings-summary-grid article strong { color: var(--marketing-text); }
body.service-page .api-trust-panel :is(.api-trust-badge, .status-pill) {
  color: #7a4b00;
  background: #fff4d6;
}

body.service-page :is(.earnings-filter-panel, .earnings-filter-panel > div, .earnings-ready-toggle) {
  color: var(--marketing-text);
  background: #fff;
}

body.service-page .earnings-filter-panel button:not(.is-active) {
  color: var(--marketing-muted);
  background: #f1f2f4;
}

body.service-page :is(p, small, .muted, .service-copy),
body.newsroom-page :is(p, small, .muted),
body.contact-page :is(p, small, .muted),
body.legal-page :is(p, li, small) { color: var(--marketing-muted); }

body.service-page :is(input, select, textarea),
body.newsroom-page :is(input, select, textarea),
body.contact-page :is(input, select, textarea) {
  border-color: var(--marketing-line);
  color: var(--marketing-text);
  background: #fff;
}

body.service-page :is(input, select, textarea):focus,
body.newsroom-page :is(input, select, textarea):focus,
body.contact-page :is(input, select, textarea):focus {
  border-color: var(--marketing-accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .12);
}

body.service-page :is(.primary-button, .section-more-link, button.is-active),
body.newsroom-page :is(.primary-button, .section-more-link),
body.contact-page :is(.primary-button, .section-more-link) { color: #fff; background: var(--marketing-accent); }

@media (max-width: 720px) {
  body.service-page .detail-shell,
  body.newsroom-page .detail-shell,
  body.contact-page .detail-shell,
  body.legal-page .legal-shell { width: min(100% - 24px, 1180px); padding-top: 8px; }
  body.service-page .detail-header,
  body.newsroom-page .detail-header,
  body.contact-page .detail-header { top: 6px; }
}

/* FINATA marketing shell v6: methodology and FAQ are first-class support pages. */
body.methodology-page :is(.methodology-keypoints, .methodology-factor-grid) > div,
body.faq-page .faq-card {
  border-color: var(--marketing-line) !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface-raised) !important;
  box-shadow: none !important;
}

body.methodology-page :is(.methodology-keypoints, .methodology-factor-grid) strong,
body.faq-page .faq-card :is(h2, h3, strong) {
  color: var(--marketing-text) !important;
}

body.methodology-page :is(.methodology-keypoints, .methodology-factor-grid) span,
body.faq-page .faq-card :is(p, li, small) {
  color: var(--marketing-muted) !important;
}

body.methodology-page .methodology-table-wrap,
body.faq-page .faq-card__body {
  border-color: var(--marketing-line) !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface-raised) !important;
}

body.methodology-page .methodology-table :is(th, td),
body.faq-page .faq-card__body :is(th, td) {
  border-color: var(--marketing-line) !important;
}

body.methodology-page .methodology-table thead th,
body.faq-page .faq-card__body thead th {
  color: var(--marketing-tertiary) !important;
  background: var(--marketing-control) !important;
}

/* FINATA marketing shell v2: paired light/dark themes and consistent controls. */
body:is(.service-page, .newsroom-page, .contact-page, .legal-page) {
  --marketing-bg: #f5f5f7;
  --marketing-surface: #ffffff;
  --marketing-surface-raised: #ffffff;
  --marketing-control: #eceef2;
  --marketing-control-hover: #e3e6eb;
  --marketing-text: #1d1d1f;
  --marketing-muted: #515154;
  --marketing-tertiary: #6e6e73;
  --marketing-line: rgba(29, 29, 31, .14);
  --marketing-line-strong: rgba(29, 29, 31, .23);
  --marketing-accent: #0071e3;
  --marketing-accent-soft: #e8f3ff;
  --marketing-shadow: 0 14px 38px rgba(0, 0, 0, .07);
  color-scheme: light;
  color: var(--marketing-text) !important;
  background: var(--marketing-bg) !important;
  scrollbar-color: #a8adb5 var(--marketing-bg);
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page)[data-marketing-theme="dark"] {
  --marketing-bg: #0b0d12;
  --marketing-surface: #14171d;
  --marketing-surface-raised: #1a1e25;
  --marketing-control: #232831;
  --marketing-control-hover: #2b313b;
  --marketing-text: #f5f5f7;
  --marketing-muted: #c5c9d0;
  --marketing-tertiary: #969da8;
  --marketing-line: rgba(255, 255, 255, .13);
  --marketing-line-strong: rgba(255, 255, 255, .22);
  --marketing-accent: #37c8f4;
  --marketing-accent-soft: rgba(55, 200, 244, .13);
  --marketing-shadow: 0 18px 44px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

/* Contact controls inherit legacy dark colors, so pin their light-theme contrast here. */
body.contact-page:not([data-marketing-theme="dark"]) .contact-form label {
  color: #3f4650;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-form :is(input, select, textarea) {
  border-color: rgba(29, 29, 31, .22);
  color: #1d1d1f;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .02);
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-form :is(input, select, textarea):focus {
  border-color: #0071e3;
  outline: 3px solid rgba(0, 113, 227, .14);
  outline-offset: 0;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-form select {
  color-scheme: light;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-form select option {
  color: #1d1d1f;
  background: #ffffff;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-consent {
  color: #33363a !important;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-consent input {
  accent-color: #0071e3;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-actions p {
  color: #515154;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-actions p[data-tone="done"] {
  color: #087443;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-actions p[data-tone="warn"] {
  color: #9a5b00;
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-actions button {
  border-color: #0071e3;
  color: #ffffff;
  background: #0071e3;
  box-shadow: 0 7px 18px rgba(0, 113, 227, .20);
}

body.contact-page:not([data-marketing-theme="dark"]) .contact-actions button:hover,
body.contact-page:not([data-marketing-theme="dark"]) .contact-actions button:focus-visible {
  border-color: #0066cc;
  background: #0066cc;
}

/* Contact controls: keep labels, entered values, placeholders, and native
   select menus legible against the dark marketing surfaces. */
body.contact-page[data-marketing-theme="dark"] .contact-form label {
  color: var(--marketing-muted);
}

body.contact-page[data-marketing-theme="dark"] .contact-form :is(input, select, textarea) {
  border-color: var(--marketing-line-strong);
  color: var(--marketing-text);
  background: var(--marketing-control);
  caret-color: var(--marketing-accent);
}

body.contact-page[data-marketing-theme="dark"] .contact-form :is(input, textarea)::placeholder {
  color: var(--marketing-tertiary);
  opacity: 1;
}

body.contact-page[data-marketing-theme="dark"] .contact-form :is(input, select, textarea):focus {
  border-color: var(--marketing-accent);
  outline: 3px solid rgba(55, 200, 244, .18);
  outline-offset: 0;
  background: var(--marketing-surface-raised);
}

body.contact-page[data-marketing-theme="dark"] .contact-form select {
  color-scheme: dark;
}

body.contact-page[data-marketing-theme="dark"] .contact-form select option {
  color: var(--marketing-text);
  background: var(--marketing-surface-raised);
}

body.contact-page[data-marketing-theme="dark"] .contact-consent {
  color: var(--marketing-muted) !important;
}

body.contact-page[data-marketing-theme="dark"] .contact-consent input {
  accent-color: var(--marketing-accent);
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page)::-webkit-scrollbar { width: 12px; }
body:is(.service-page, .newsroom-page, .contact-page, .legal-page)::-webkit-scrollbar-track { background: var(--marketing-bg); }
body:is(.service-page, .newsroom-page, .contact-page, .legal-page)::-webkit-scrollbar-thumb {
  border: 3px solid var(--marketing-bg);
  border-radius: 999px;
  background: var(--marketing-line-strong);
}

body:is(.service-page, .newsroom-page, .contact-page) .detail-header {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 4px;
  border: 0;
  border-radius: 0;
  color: var(--marketing-text);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body:is(.service-page, .newsroom-page, .contact-page) .detail-header :is(.back-link, .home-link),
.marketing-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--marketing-text);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

body:is(.service-page, .newsroom-page, .contact-page) .detail-header :is(.back-link, .home-link):hover,
body:is(.service-page, .newsroom-page, .contact-page) .detail-header :is(.back-link, .home-link):focus-visible,
.marketing-theme-toggle:hover,
.marketing-theme-toggle:focus-visible {
  color: var(--marketing-accent);
  background: var(--marketing-control);
}

body:is(.service-page, .newsroom-page, .contact-page) .detail-header :is(.back-link, .home-link):active,
.marketing-theme-toggle:active { transform: scale(.92); }
body:is(.service-page, .newsroom-page, .contact-page) .detail-header svg,
.marketing-theme-toggle svg { width: 20px; height: 20px; }

.marketing-header-actions { display: flex; align-items: center; gap: 4px; margin-left: 0; }
.marketing-theme-toggle.is-floating {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 18px;
  z-index: 80;
  color: var(--marketing-text);
  background: color-mix(in srgb, var(--marketing-surface) 86%, transparent);
  box-shadow: var(--marketing-shadow);
  backdrop-filter: blur(16px) saturate(150%);
}

body:is(.service-page, .newsroom-page, .contact-page) :is(.hero-story, .service-hero, .newsroom-hero, .contact-hero),
body.legal-page :is(.legal-hero, .legal-document),
body.service-page :is(.service-panel, .earnings-workspace, .earnings-summary-grid article, .earnings-card, .api-product-card, .guide-step, .guide-routine),
body.newsroom-page :is(.newsroom-panel, .newsroom-card),
body.contact-page :is(.contact-panel, .contact-section, .contact-card) {
  border-color: var(--marketing-line) !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface) !important;
  box-shadow: none !important;
}

body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story {
  width: 100%;
  max-width: none;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page) :is(h1, h2, h3, h4, strong, th) { color: var(--marketing-text) !important; }
body:is(.service-page, .newsroom-page, .contact-page, .legal-page) :is(p, li, small, td, .muted, .service-copy, .legal-item) { color: var(--marketing-muted) !important; }
body:is(.service-page, .newsroom-page, .contact-page, .legal-page) :is(.sector-pill, .section-head > div > span, .earnings-list-head > div > span) { color: var(--marketing-accent) !important; }

body.legal-page .legal-shell { width: min(760px, calc(100% - 32px)); }
body.legal-page .legal-hero { min-height: 0; border-radius: 8px; box-shadow: none; }
body.legal-page .legal-document { border-radius: 8px; }
body.legal-page .legal-logo img { content: url("./brand/finata-logo-horizontal-color.png"); opacity: 1; }
body.legal-page[data-marketing-theme="dark"] .legal-logo img { content: url("./brand/finata-logo-horizontal-white.png"); }
body.legal-page .legal-back-dock {
  border: 0;
  color: var(--marketing-text);
  background: var(--marketing-surface-raised);
  box-shadow: var(--marketing-shadow);
}
body.legal-page .legal-back-dock svg { width: 20px; height: 20px; }

body.service-page .earnings-filter-panel {
  align-items: end;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--marketing-line);
  border-radius: 8px;
  color: var(--marketing-text);
  background: var(--marketing-surface) !important;
}
body.service-page .earnings-filter-group legend {
  margin-bottom: 8px;
  color: var(--marketing-tertiary);
  font-size: 11px;
  font-weight: 700;
}
body.service-page .earnings-segment {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--marketing-line);
  border-radius: 8px;
  background: var(--marketing-control);
}
body.service-page .earnings-segment button,
body.service-page .earnings-filter-panel button:not(.is-active) {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: var(--marketing-muted);
  background: transparent;
  box-shadow: none;
}
body.service-page .earnings-segment button:hover,
body.service-page .earnings-segment button:focus-visible {
  color: var(--marketing-text);
  background: var(--marketing-control-hover);
  outline: 0;
}
body.service-page .earnings-segment button.is-active {
  color: #0067d2;
  background: var(--marketing-surface-raised);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
body.service-page[data-marketing-theme="dark"] .earnings-segment button.is-active { color: #78dcfa; }
body.service-page .earnings-ready-toggle {
  min-height: 48px;
  border: 1px solid var(--marketing-line);
  color: var(--marketing-muted);
  background: var(--marketing-control);
}
body.service-page[data-marketing-theme="dark"] .earnings-filter-panel .earnings-ready-toggle {
  color: var(--marketing-muted) !important;
  background: var(--marketing-control) !important;
}
body.service-page .earnings-ready-toggle__control {
  border-color: var(--marketing-line-strong);
  background: var(--marketing-surface-raised);
}
body.service-page :is(.earnings-search input, .earnings-sort-select) {
  border-color: var(--marketing-line);
  color: var(--marketing-text);
  background: var(--marketing-surface-raised);
}

@media (max-width: 720px) {
  body:is(.service-page, .newsroom-page, .contact-page) .detail-header { top: 4px; }
  body.service-page .earnings-filter-panel { gap: 12px; padding: 14px; }
  body.legal-page .legal-shell { width: min(100% - 24px, 760px); }
  .marketing-theme-toggle.is-floating { top: max(10px, env(safe-area-inset-top)); right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body:is(.service-page, .newsroom-page, .contact-page) .detail-header :is(.back-link, .home-link),
  .marketing-theme-toggle { transition: none; }
}

/* FINATA marketing shell v3: single-card heroes and accessible paired themes. */
body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero,
body:is(.service-page, .newsroom-page, .contact-page) :is(.service-hero, .newsroom-hero, .contact-hero) {
  overflow: visible;
  border: 0 !important;
  color: var(--marketing-text) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story {
  overflow: hidden;
  border: 1px solid var(--marketing-line) !important;
  border-radius: 8px !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface) !important;
}

body:is(.service-page, .newsroom-page, .contact-page) .service-hero-mark {
  max-width: 32%;
  opacity: .1;
}

body:is(.service-page, .newsroom-page, .contact-page)[data-marketing-theme="dark"] .service-hero-mark {
  opacity: .16;
}

body.service-page .earnings-ready-toggle {
  color: var(--marketing-text) !important;
  background: var(--marketing-surface-raised) !important;
}

body.service-page .earnings-ready-toggle__control {
  border-color: var(--marketing-line-strong) !important;
  background: #c8cdd5 !important;
}

body.service-page .earnings-ready-toggle__control::after {
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

body.service-page .earnings-ready-toggle input:checked + .earnings-ready-toggle__control {
  border-color: var(--marketing-accent) !important;
  background: var(--marketing-accent) !important;
}

body.service-page[data-marketing-theme="dark"] .earnings-ready-toggle__control {
  background: #424955 !important;
}

body.service-page :is(.earnings-card, .earnings-metric) {
  color: var(--marketing-text) !important;
  background: var(--marketing-surface-raised) !important;
}

body.service-page .earnings-metric {
  border: 1px solid var(--marketing-line) !important;
  border-left: 3px solid var(--marketing-accent) !important;
  border-radius: 6px;
}

body.service-page .earnings-card h3 a,
body.service-page .earnings-metric > strong {
  color: var(--marketing-text) !important;
}

body.service-page .earnings-card :is(header span, header small, time),
body.service-page .earnings-metric > span,
body.service-page .earnings-metric :is(small, .is-flat, .is-empty) {
  color: var(--marketing-tertiary) !important;
}

body.service-page .earnings-metric .is-up { color: #087f5b !important; }
body.service-page .earnings-metric .is-down { color: #c93445 !important; }
body.service-page[data-marketing-theme="dark"] .earnings-metric .is-up { color: #79e6b7 !important; }
body.service-page[data-marketing-theme="dark"] .earnings-metric .is-down { color: #ff9ca6 !important; }

body.guide-page .guide-quick-nav a {
  border-color: color-mix(in srgb, var(--marketing-accent) 32%, var(--marketing-line)) !important;
  color: #005db8 !important;
  background: var(--marketing-accent-soft) !important;
}

body.guide-page .guide-quick-nav a:hover,
body.guide-page .guide-quick-nav a:focus-visible {
  border-color: var(--marketing-accent) !important;
  color: #fff !important;
  background: var(--marketing-accent) !important;
}

body.guide-page[data-marketing-theme="dark"] .guide-quick-nav a {
  color: #8de4fb !important;
}

body.guide-page .guide-check {
  border-left-color: var(--marketing-accent) !important;
  color: var(--marketing-muted) !important;
  background: var(--marketing-control) !important;
}

body.guide-page .guide-check strong { color: var(--marketing-accent) !important; }

body.newsroom-page .newsroom-card__type,
body.service-page .sector-pill,
body.contact-page .sector-pill {
  border-color: color-mix(in srgb, var(--marketing-accent) 45%, transparent) !important;
  color: #005db8 !important;
  background: var(--marketing-accent-soft) !important;
  box-shadow: none !important;
}

body.newsroom-page .newsroom-card__type.is-service {
  border-color: rgba(111, 66, 193, .28) !important;
  color: #6842ad !important;
  background: #f1ebff !important;
}

body:is(.newsroom-page, .service-page, .contact-page)[data-marketing-theme="dark"] :is(.newsroom-card__type, .sector-pill) {
  border-color: rgba(86, 211, 244, .38) !important;
  color: #8de4fb !important;
  background: rgba(55, 200, 244, .12) !important;
}

body.newsroom-page[data-marketing-theme="dark"] .newsroom-card__type.is-service {
  border-color: rgba(190, 160, 255, .38) !important;
  color: #d7c3ff !important;
  background: rgba(155, 116, 226, .14) !important;
}

body.service-page .api-trust-head > .api-trust-state {
  border-color: var(--marketing-line-strong) !important;
  color: var(--marketing-muted) !important;
  background: var(--marketing-control) !important;
}

body.service-page .api-trust-state.ready {
  border-color: rgba(8, 127, 91, .28) !important;
  color: #087f5b !important;
  background: #e8f7f1 !important;
}

body.service-page .api-trust-state.warn {
  border-color: rgba(150, 92, 0, .28) !important;
  color: #7a4b00 !important;
  background: #fff2ce !important;
}

body.service-page .api-trust-state.failed {
  border-color: rgba(184, 38, 54, .26) !important;
  color: #a51d31 !important;
  background: #ffeaed !important;
}

body.service-page[data-marketing-theme="dark"] .api-trust-state.ready {
  border-color: rgba(121, 230, 183, .3) !important;
  color: #79e6b7 !important;
  background: rgba(8, 127, 91, .17) !important;
}

body.service-page[data-marketing-theme="dark"] .api-trust-state.warn {
  border-color: rgba(255, 211, 122, .3) !important;
  color: #ffd37a !important;
  background: rgba(150, 92, 0, .17) !important;
}

body.service-page[data-marketing-theme="dark"] .api-trust-state.failed {
  border-color: rgba(255, 156, 166, .3) !important;
  color: #ff9ca6 !important;
  background: rgba(184, 38, 54, .17) !important;
}

body.legal-page .legal-shell {
  padding-top: 8px;
}

body.legal-page .marketing-legal-header {
  position: sticky;
  top: 4px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  margin-bottom: 8px;
  padding: 4px;
  border: 0;
  color: var(--marketing-text);
  background: color-mix(in srgb, var(--marketing-bg) 88%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(150%);
}

body.legal-page .marketing-legal-header :is(.legal-back-dock, .back-link, .home-link),
body.legal-page .marketing-legal-header .marketing-theme-toggle {
  position: static;
  inset: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--marketing-text);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-decoration: none;
}

body.legal-page .marketing-legal-header :is(.legal-back-dock, .back-link, .home-link):hover,
body.legal-page .marketing-legal-header :is(.legal-back-dock, .back-link, .home-link):focus-visible {
  color: var(--marketing-accent);
  background: var(--marketing-control);
}

body.legal-page .marketing-legal-header svg { width: 20px; height: 20px; }

@media (max-width: 720px) {
  body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story {
    border-radius: 8px !important;
  }
}

/* FINATA marketing shell v4: unified hero widths and light-theme contrast. */
body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero {
  display: block !important;
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

body.legal-page .legal-shell {
  width: min(1180px, calc(100% - 40px));
}

body.legal-page :is(.legal-hero, .legal-document) {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.service-page .earnings-card-state :is(.is-growth, .is-watch, .is-mixed, .is-pending) {
  border: 1px solid transparent;
}

body.service-page .earnings-card-state .is-growth {
  border-color: rgba(8, 127, 91, .22);
  color: #087f5b !important;
  background: #e4f7ef !important;
}

body.service-page .earnings-card-state .is-watch {
  border-color: rgba(165, 29, 49, .20);
  color: #a51d31 !important;
  background: #ffeaed !important;
}

body.service-page .earnings-card-state .is-mixed {
  border-color: rgba(122, 75, 0, .22);
  color: #7a4b00 !important;
  background: #fff2ce !important;
}

body.service-page .earnings-card-state .is-pending {
  border-color: var(--marketing-line);
  color: var(--marketing-muted) !important;
  background: var(--marketing-control) !important;
}

body.service-page[data-marketing-theme="dark"] .earnings-card-state .is-growth {
  border-color: rgba(121, 230, 183, .24);
  color: #79e6b7 !important;
  background: rgba(8, 127, 91, .18) !important;
}

body.service-page[data-marketing-theme="dark"] .earnings-card-state .is-watch {
  border-color: rgba(255, 156, 166, .24);
  color: #ff9ca6 !important;
  background: rgba(184, 38, 54, .18) !important;
}

body.service-page[data-marketing-theme="dark"] .earnings-card-state .is-mixed {
  border-color: rgba(255, 211, 122, .24);
  color: #ffd37a !important;
  background: rgba(150, 92, 0, .18) !important;
}

body.guide-page .guide-actions a {
  border-color: #b9d8ef !important;
  color: #005db8 !important;
  background: #e8f3ff !important;
}

body.guide-page .guide-actions a:hover,
body.guide-page .guide-actions a:focus-visible {
  border-color: var(--marketing-accent) !important;
  background: #d9ebff !important;
  outline: 0;
}

body.guide-page .guide-actions a.primary {
  border-color: #005eb8 !important;
  color: #fff !important;
  background: #0067c9 !important;
}

body.guide-page .guide-actions a.primary:hover,
body.guide-page .guide-actions a.primary:focus-visible {
  background: #0058ad !important;
}

body.guide-page[data-marketing-theme="dark"] .guide-actions a {
  border-color: rgba(86, 211, 244, .30) !important;
  color: #8de4fb !important;
  background: rgba(55, 200, 244, .11) !important;
}

body.guide-page[data-marketing-theme="dark"] .guide-actions a.primary {
  border-color: #37c8f4 !important;
  color: #071116 !important;
  background: #37c8f4 !important;
}

body.api-page .api-code-panel pre {
  border-color: #334155 !important;
  color: #f8fafc !important;
  background: #202630 !important;
}

body.api-page .api-code-panel pre code {
  color: #f8fafc !important;
  background: transparent !important;
}

body.api-page .api-endpoint-list code {
  border: 1px solid #b9d8ef !important;
  color: #075f9f !important;
  background: #f2f7fc !important;
}

body.api-page :is(.api-product-inquiry, .api-sample-link) {
  border-color: #b9d8ef !important;
  color: #005db8 !important;
  background: #e8f3ff !important;
}

body.api-page[data-marketing-theme="dark"] .api-endpoint-list code {
  border-color: rgba(86, 211, 244, .24) !important;
  color: #b8ecfa !important;
  background: #1b222b !important;
}

body.api-page[data-marketing-theme="dark"] :is(.api-product-inquiry, .api-sample-link) {
  border-color: rgba(86, 211, 244, .28) !important;
  color: #8de4fb !important;
  background: rgba(55, 200, 244, .10) !important;
}

body.api-page .api-doc-link-row {
  border-color: var(--marketing-line) !important;
  background: var(--marketing-surface-soft) !important;
}

body.api-page .api-doc-link-row > span {
  color: var(--marketing-tertiary) !important;
}

body.api-page .api-stat-strip > div {
  border-color: var(--marketing-line) !important;
  background: var(--marketing-surface-soft) !important;
}

body.api-page .api-stat-strip span {
  color: var(--marketing-tertiary) !important;
}

body.api-page .api-stat-strip strong {
  color: var(--marketing-text) !important;
}

body.api-page .api-doc-link-row > a {
  color: #0067c9 !important;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}

body.api-page .api-doc-link-row > a:hover,
body.api-page .api-doc-link-row > a:focus-visible {
  color: #004f9f !important;
  background: transparent !important;
  outline: 0;
}

body.api-page[data-marketing-theme="dark"] .api-doc-link-row > a {
  color: #8de4fb !important;
}

body.api-page[data-marketing-theme="dark"] .api-doc-link-row > a:hover,
body.api-page[data-marketing-theme="dark"] .api-doc-link-row > a:focus-visible {
  color: #c7f2fc !important;
}

@media (max-width: 720px) {
  body.legal-page .legal-shell {
    width: min(100% - 24px, 1180px);
  }
}

/* FINATA marketing shell v5: one title-card language across support pages. */
body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story,
body.legal-page .legal-hero {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 260px !important;
  padding: clamp(30px, 4vw, 48px) !important;
  overflow: hidden;
  border: 1px solid var(--marketing-line) !important;
  border-radius: 8px !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface) !important;
  box-shadow: none !important;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page) .sector-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 22px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--marketing-accent) 45%, transparent) !important;
  border-radius: 999px;
  color: #005db8 !important;
  background: var(--marketing-accent-soft) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: none !important;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page)[data-marketing-theme="dark"] .sector-pill {
  border-color: rgba(86, 211, 244, .38) !important;
  color: #8de4fb !important;
  background: rgba(55, 200, 244, .12) !important;
}

body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story h1,
body.legal-page .legal-hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story > p,
body.legal-page .legal-hero > p {
  position: relative;
  z-index: 2;
  max-width: min(760px, calc(100% - 180px));
  margin: 22px 0 0;
  color: var(--marketing-muted) !important;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page) .service-hero-mark {
  position: absolute;
  top: 50%;
  right: clamp(28px, 5vw, 64px);
  z-index: 1;
  width: clamp(116px, 15vw, 184px);
  max-width: 28%;
  transform: translateY(-50%);
  opacity: .09;
  pointer-events: none;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page) .service-hero-mark img {
  display: block;
  width: 100%;
  height: auto;
}

body:is(.service-page, .newsroom-page, .contact-page, .legal-page)[data-marketing-theme="dark"] .service-hero-mark {
  opacity: .16;
}

body.legal-page .legal-hero { margin-bottom: 18px; }

/* FINATA marketing shell v6: service cards stay legible in both themes. */
body.service-page .service-feature-grid article,
body.service-page .service-faq-card-link {
  border-color: var(--marketing-line-strong) !important;
  color: var(--marketing-text) !important;
  background: var(--marketing-surface-raised) !important;
  box-shadow: none !important;
}

body.service-page .service-feature-grid article:hover,
body.service-page .service-faq-card-link:hover,
body.service-page .service-faq-card-link:focus-visible {
  border-color: color-mix(in srgb, var(--marketing-accent) 62%, var(--marketing-line)) !important;
  background: color-mix(in srgb, var(--marketing-accent-soft) 46%, var(--marketing-surface-raised)) !important;
}

body.service-page .service-faq-card-link > span,
body.service-page .service-faq-card-link > em {
  border-color: color-mix(in srgb, var(--marketing-accent) 52%, var(--marketing-line)) !important;
  color: #005a9c !important;
  background: color-mix(in srgb, var(--marketing-accent-soft) 82%, var(--marketing-surface)) !important;
}

body.service-page .service-faq-card-link > em {
  min-height: 42px;
  font-weight: 800;
}

body.service-page[data-marketing-theme="dark"] .service-faq-card-link > span,
body.service-page[data-marketing-theme="dark"] .service-faq-card-link > em {
  border-color: rgba(86, 211, 244, .38) !important;
  color: #8de4fb !important;
  background: rgba(55, 200, 244, .12) !important;
}

@media (max-width: 720px) {
  body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story,
  body.legal-page .legal-hero {
    min-height: 220px !important;
    padding: 28px 24px !important;
  }

  body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story h1,
  body.legal-page .legal-hero h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  body:is(.service-page, .newsroom-page, .contact-page) .diagnosis-hero > .hero-story > p,
  body.legal-page .legal-hero > p {
    max-width: calc(100% - 60px);
    margin-top: 16px;
  }

  body:is(.service-page, .newsroom-page, .contact-page, .legal-page) .service-hero-mark {
    right: 18px;
    width: 112px;
    opacity: .07;
  }
}
