/* NTM interface foundation. Loaded after legacy layout rules; no financial state logic. */
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-control: 3px; --radius-surface: 3px;
  --font-title: clamp(2.5rem, 4.8vw, 4.5rem);
  --font-section: clamp(1.5rem, 2.5vw, 2rem);
  --font-metric: clamp(1.5rem, 2.5vw, 2rem);
  /* Visual System V3 roles. Palette and spacing remain the shared foundation. */
  --width-reading: 720px; --width-editor: 800px; --width-workspace: 1248px;
  --type-display: clamp(2rem, 4vw, 3.5rem);
  --type-page: clamp(1.875rem, 3.2vw, 2.5rem);
  --type-body: 1rem; --type-data: .875rem; --type-meta: .8125rem;
  --type-financial-primary: clamp(2.25rem, 4vw, 3rem);
  --type-financial-secondary: clamp(1.5rem, 2.5vw, 1.75rem);
  --radius-dialog: 16px; --shadow-overlay: 0 16px 48px #00000030;
  --motion-state: 140ms; --chart-revenue: var(--primary);
}
body { background: var(--bg); font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.6; }
body, button, input, select, textarea { font-variant-numeric: tabular-nums; }
#cloudAccount a { color: var(--primary); }
#cloudLogin label { display: block; margin-top: 1rem; }
#cloudLogin input { width: 100%; box-sizing: border-box; }
#cloudConnected button { margin-block: .25rem; }
h1, h2, h3, h4, p { overflow-wrap: break-word; }
h1 { font-family: var(--font-reading); font-size: var(--font-title); line-height: 1.15; letter-spacing: -.035em; font-weight: 400; }
h2 { font-family: var(--font-reading); font-size: var(--font-section); line-height: 1.3; letter-spacing: -.02em; font-weight: 400; }
h3 { font-family: var(--font-reading); font-size: 1.05rem; line-height: 1.4; font-weight: 400; }
p { line-height: 1.65; }
.note, .field-help, .category-description, .page-intro p, .post-lead, .section-subtitle { color: var(--muted); }
.section-kicker, .section-kicker-small { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.container, .topbar-inner { max-width: 1296px; }
.container { padding: 36px 28px 64px; }
.page-intro, .tool-intro { margin-bottom: 32px; }
.page-intro h1, .post-header h1 { font-size: var(--font-title); margin-block: 10px 16px; }
.page-intro p { max-width: 70ch; }
.topbar { padding: 0 28px; border-bottom: 1px solid var(--border); background: var(--bg); }
.topbar-inner, body.light-theme .topbar-inner { min-height: 76px; padding: 12px 0; background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.brand-logo { border-radius: 7px; }
.main-nav { gap: 8px; }
.main-nav a { font-size: .9rem; font-weight: 550; padding: 10px 14px; border-radius: var(--radius-control); }
.main-nav a.active, .main-nav a[aria-current=page] { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
.nav-learn summary { min-height: 44px; padding: 10px 14px; font-size: .9rem; }
.nav-learn:has([aria-current]) > summary { color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
.main-nav > a, .nav-learn > summary { white-space: nowrap; min-height: 44px; }
.main-nav > a { display: inline-flex; align-items: center; }
.nav-learn-links a { min-height: 44px; }
.main-nav [data-account-nav] { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
.nav-learn-links, body.light-theme .nav-learn-links { background: var(--panel); border-radius: 3px; border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 235px; padding: 10px; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: none; min-width: 44px; min-height: 44px; }
.toggle-icon { filter: grayscale(1); font-family: 'Segoe UI Symbol', sans-serif; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 2000; transform: translateY(-160%); padding: 10px 20px; background: var(--panel); color: var(--text); border: 2px solid var(--primary); border-radius: 6px; }
.skip-link:focus { transform: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
:where(button, a, summary) { -webkit-tap-highlight-color: transparent; }
:where(button, .primary-btn, .secondary-btn, .ghost-btn) { transition: background-color 120ms ease, border-color 120ms ease; }
button, .primary-btn, .secondary-btn, .ghost-btn { border-radius: var(--radius-control); min-height: 44px; line-height: 1.4; font-weight: 600; box-shadow: none; }
button:hover, .primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover { transform: none; box-shadow: none; }
.primary-btn, .calculator-form button[type=submit], .valuation-submit-btn { background: var(--primary); color: var(--bg); border: 1px solid var(--primary); padding: 12px 20px; }
body.light-theme .primary-btn, body.light-theme .calculator-form button[type=submit], body.light-theme .valuation-submit-btn { color: #fff; }
.primary-btn:hover, .calculator-form button[type=submit]:hover { background: var(--primary-strong); }
.secondary-btn { background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 11px 18px; }
.ghost-btn { background: transparent; color: var(--text); border-color: var(--border); }
button:disabled { opacity: .55; cursor: not-allowed; }
.destructive-action, .thesis-delete-btn, #delete-scenario, #goal-delete-scenario { color: var(--danger); background: none; border: 1px solid var(--danger) !important; }
input:not([type=checkbox]):not([type=radio]), select, textarea,
body.light-theme input, body.light-theme select { min-height: 46px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg); color: var(--text); box-shadow: none; font-size: 1rem; padding: 11px 12px; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; line-height: 1.6; }
label, .field-group label { font-size: .83rem; font-weight: 600; color: var(--text); line-height: 1.45; }
.field-group { gap: 7px; min-width: 0; }
.form-grid { gap: 22px 24px; }
.calculator-form { gap: 24px; }
.mode-toggle, .tools-filters { padding: 4px; gap: 4px; background: var(--panel-alt); border-radius: 3px; }
.mode-tab, .stock-mode-tab, .return-mode-tab, .tools-filter { border-radius: 5px; background: none; border-color: transparent; color: var(--muted); }
.mode-tab.active, .stock-mode-tab.active, .return-mode-tab.active, .tools-filter.is-active { background: var(--panel-strong); color: var(--text); border-color: var(--border); box-shadow: none; }
.card, body.light-theme .card, .comparison-section, body.light-theme .comparison-section,
.feature-card, .resource-card, .post-article, body.light-theme .post-article,
.market-status-card, .ntm-event-panel, .macro-day-group, .weekly-sidebar,
body.light-theme .feature-card, body.light-theme .resource-card, body.light-theme .macro-day-group {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-surface); box-shadow: none;
}
.calculator-card, .page-card, .research-card-block, .research-header-card { padding: 28px; }
.section-heading { margin-bottom: 24px; }
.feature-card, .resource-card { padding: 22px; }
.feature-card:hover, .resource-card:hover, .research-company-card:hover { transform: none; border-color: var(--primary); box-shadow: none; }
.page-card:has(.tools-directory), .page-card:has(.archive-grid), .homepage-content { background: none !important; border: 0; padding: 0; }
.tools-category { margin-block: 28px; }
.tools-grid, .resource-grid, .archive-grid { gap: 18px; }
.tool-card .secondary-btn { border: 0; padding: 8px 0; background: none; justify-content: flex-start; color: var(--primary); }
.tool-labels span, .post-tags span, .badge { border-radius: 4px; font-weight: 500; }
.product-intro, body.light-theme .product-intro { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 0 20px; margin-bottom: 8px; }
.product-intro > .section-kicker { margin-bottom: 0; }
.product-intro h1 { max-width: 850px; font-size: clamp(2.25rem, 3.5vw, 3rem); line-height: 1.12; text-wrap: balance; margin: 8px 0 12px; }
.product-intro > p { max-width: 82ch; color: var(--muted); margin-block: 0; }
.product-intro .feature-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 10px; }
.product-intro .feature-grid a { min-width: 230px; }
.product-intro > p:last-child { font-size: .9375rem; margin-bottom: 0; }
.ntm-today-shell, body.light-theme .ntm-today-shell { padding: 24px 0; background: none; border: 0; border-radius: 0; }
.ntm-greeting-wrap h2 { font-size: 1.4rem; }
.market-status-card, body.light-theme .market-status-card { background: none; border: 0; border-block: 1px solid var(--border); border-radius: 0; padding: 16px 0; }
.ntm-event-panel { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 20px 0 0; }
.ntm-today-panels { gap: 28px; }
/* Home calendar surfaces keep their content inset in populated and empty states. */
.ntm-today-panels .ntm-event-panel { padding: 20px 24px 24px; }
.ntm-today-panels .ntm-event-panel .ntm-panel-header { gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ntm-today-panels .ntm-panel-header .text-link { display: inline-flex; align-items: center; min-height: 44px; white-space: normal; }
.ntm-today-panels .ntm-event-list { gap: 12px; }
.ntm-today-panels .ntm-empty-state { padding: 0; line-height: 1.5; }
@media (max-width: 600px) {
  .ntm-today-panels .ntm-event-panel { padding: 16px 18px 20px; }
  .ntm-today-panels .ntm-event-panel .ntm-panel-header { margin-bottom: 12px; }
}
.ntm-market-overview { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 20px 0 0; }
.homepage-content { margin-top: 48px; }
.homepage-content .resource-category + .resource-category { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 28px; }
.results { gap: 24px; background: none; border-block: 1px solid var(--border); border-radius: 0; overflow: hidden; margin-block: 24px; }
.result-box, body.light-theme .result-box { border: 0; border-radius: 0; background: none; padding: 20px 0; box-shadow: none; min-width: 0; }
.result-box .label { color: var(--muted); font-size: .78rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.result-value { font-family: var(--font-reading); font-size: var(--font-metric); font-weight: 400; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.result-box.highlight, body.light-theme .result-box.highlight { background: none; border: 0; border-bottom: 1px solid var(--border); grid-column: 1 / -1; }
.result-box.highlight .result-value { color: var(--primary); font-size: clamp(2.5rem, 4vw, 3.5625rem); }
.result-box.highlight .label { color: var(--text); }
.chart-panel, .scenario-chart-panel, body.light-theme .chart-panel, body.light-theme .scenario-chart-panel,
.research-chart-wrap { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 24px 0; margin-top: 16px; }
.chart-header { margin-bottom: 18px; }
.chart-header h3 { font-size: 1rem; }
.chart-wrap, .research-chart-wrap { min-width: 0; }
.research-section { margin-block: 28px; }
.research-header-card { background: none !important; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 0 24px; }
.company-title-wrap h1 { font-size: var(--font-title); text-transform: none; }
.source-stamp-wrap { max-width: 360px; gap: 12px; }
.company-cik-pill, .cik-tag, .company-meta-line, .last-updated-text { color: var(--muted); font-size: .75rem; background: none; border: 0; }
.research-pill { border-radius: 5px; background: none; min-height: 44px; padding: 8px 12px; }
.research-pill.active, body.light-theme .research-pill.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
[data-metrics-toggle] { margin-top: 12px; font-size: .82rem; }
.growth-margins-grid { gap: 12px; }
.research-company-card { padding: 24px; }
.company-highlights { gap: 16px; }
.section-local-nav { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.section-local-nav a { color: var(--muted); font-size: .82rem; padding: 8px 4px; min-height: 40px; text-decoration: none; }
.section-local-nav a:hover, .section-local-nav a:focus-visible { color: var(--primary); text-decoration: underline; }
.section-local-nav.research-journeys a { font-size: .95rem; min-height: 44px; }
.research-journeys a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
#thesisSection, #thesisReview { border-inline-start: 3px solid var(--primary); }
.research-card-block { margin-block: 24px; }
.valuation-section { border-top: 2px solid var(--primary); }
.reverse-valuation-card, .reverse-context-box, body.light-theme .reverse-context-box { background: none; border: 0; padding: 24px 0; border-top: 1px solid var(--border); border-radius: 0; }
.scenario-assumption { background: var(--panel-alt); border: 1px solid var(--border); border-radius: 3px; padding: 18px; }
.scenario-assumption h3 { color: var(--text); font-size: .95rem; }
.scenario-base { border-top: 3px solid var(--primary); }
#thesisHistorySection { border-inline-start: 3px solid var(--accent); }
#revisionSnapshotPreview { background: var(--panel-alt); }
.snapshot-grid { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.snapshot-cell { background: var(--panel); border-color: var(--border); padding: 12px; }
.snapshot-label { text-transform: none; letter-spacing: 0; }
#valuationForm button { border-radius: var(--radius-control, 7px); }
.depth-panel { border-block: 1px solid var(--border); margin-block: 24px; }
.depth-panel > summary, .valuation-accordion > summary, .thesis-snapshot-details > summary { cursor: pointer; color: var(--text); font-weight: 600; padding: 16px 4px; min-height: 48px; font-size: .95rem; }
.depth-panel > summary::marker { color: var(--primary); }
.depth-panel > summary small { display: inline; margin-left: 12px; font-weight: 400; color: var(--muted); }
.depth-panel[open] > summary { border-bottom: 1px solid var(--border); }
.depth-panel .research-card-block { background: none; border: 0; padding: 24px 0; }
.depth-panel .research-card-block + .research-card-block { border-top: 1px solid var(--border); }
.saved-scenarios { background: var(--panel-alt); border: 1px solid var(--border); border-radius: 3px; padding: 20px; }
.saved-scenarios-heading .section-kicker { display: none; }
.calculator-card > .depth-panel { margin-top: 28px; }
table { border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; width: 100%; }
table :is(th, td) { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); }
table :is(th, td):first-child { text-align: left; }
table thead th { background: var(--panel-alt); color: var(--muted); font-size: .74rem; font-weight: 400; white-space: nowrap; }
table tbody tr:hover { background: var(--primary-soft); }
table caption { text-align: left; padding: 12px 0; color: var(--muted); }
.table-wrap, .table-wrapper, .stock-scenario-table-wrap, .sensitivity-table-wrap { overflow-x: auto; max-width: 100%; border-radius: 0; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.financial-scroll { outline-offset: 3px; }
.financial-scroll table { min-width: 560px; }
.financial-scroll table :is(th, td):first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.financial-scroll table thead th:first-child { background: var(--panel-alt); }
.min-ntm-intro h1 { margin-bottom: 12px; }
.min-ntm-card { margin-block: 24px; }
.min-ntm-card:first-of-type { background: var(--panel) !important; border: 0; border-inline-start: 3px solid var(--primary); }
.min-ntm-card .section-kicker { display: none; }
.min-ntm-empty, .min-ntm-empty-state { background: none; border: 1px dashed var(--border); padding: 24px; border-radius: 3px; }
.min-ntm-list-item { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 20px 0; }
.min-ntm-thesis-item .min-ntm-thesis-date { color: var(--muted); }
.post-article, body.light-theme .post-article { max-width: 880px; padding: 36px 0; margin-inline: auto; background: none; border: 0; }
.post-header h1 { max-width: 23ch; }
.post-content, .ai-summary-body, .editorial-note, .content-journey { font-size: 1rem; line-height: 1.8; }
.post-content p, .summary-content p { margin-block: 0 1.35em; max-width: 70ch; }
.post-content, .summary-content { max-width: 70ch; margin-inline: auto; }
.summary-content p:has(> strong:only-child) { margin-top: 1.8em; margin-bottom: .65em; }
.post-media { margin-block: 28px; }
.carousel-dot, .carousel-dot.is-active { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; position: relative; }
.carousel-dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); position: absolute; top: 18px; left: 18px; }
.carousel-dot.is-active::after { background: var(--primary); outline: 2px solid var(--primary); outline-offset: 3px; }
.ai-summary { border: 1px solid var(--border); border-radius: 3px; margin-block: 28px; }
.ai-summary > summary { padding: 18px; font-weight: 600; min-height: 48px; }
.summary-language-toggle { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.summary-language-button { min-width: 100px; }
.editorial-note { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 24px 0; font-size: .86rem; color: var(--muted); }
.editorial-note h2 { font-size: 1.05rem; color: var(--text); }
.content-journey, .related-tools { border-inline-start: 3px solid var(--primary); border-radius: 0; padding: 24px; background: var(--panel-alt); }
.content-journey h2 { font-size: 1.35rem; }
.related-tools .feature-card { background: none; border: 0; padding: 12px; }
.weekly-layout { gap: 28px; }
.macro-day-group, body.light-theme .macro-day-group { margin-bottom: 20px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.macro-event-card { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.macro-metrics { border-radius: 6px; background: var(--panel-alt); }
.trust-page { max-width: 960px; padding-top: 28px; }
.trust-page .card { padding: 28px 0; background: none !important; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.trust-page .card:first-child { border: 0; }
.trust-page p, .trust-definitions { max-width: 72ch; }
[data-ntm-status], .calc-status-banner { border-radius: 5px; font-size: .84rem; box-shadow: none; }
.calc-status-banner { padding: 14px 16px; }
[data-ntm-status=calculated], [data-ntm-status=saved] { background: var(--primary-soft); color: var(--text); }
.instagram-footer-inner { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 28px 0; }
.instagram-footer-copy h2 { font-size: 1.15rem; }
.trust-footer { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border); padding: 24px; }
dialog { color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 3px; padding: 24px; max-width: min(760px, calc(100vw - 32px)); max-height: 85dvh; overflow: auto; }
dialog::backdrop { background: #06110db3; backdrop-filter: none; }
[id] { scroll-margin-top: 24px; }
/* Use the existing mobile disclosure while all seven desktop entries cannot fit. */
@media (max-width: 1200px) {
  .topbar { padding-inline: 20px; }
  .topbar-inner { min-height: 68px; }
  .main-nav, body.light-theme .main-nav { display: none; position: absolute; top: 74px; left: 20px; right: 20px; flex-direction: column; align-items: stretch; background: var(--panel); border: 1px solid var(--border); border-radius: 3px; padding: 12px; box-shadow: var(--shadow); max-height: calc(100dvh - 90px); overflow-y: auto; }
  .main-nav.open, body.light-theme .main-nav.open { display: flex; }
  .nav-toggle { display: grid; place-items: center; }
  .topbar-inner > #themeToggle { display: none; }
  .mobile-theme-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
  .main-nav [data-account-nav] { max-width: 100%; }
  .main-nav > a, .nav-learn summary { min-height: 46px; }
  .nav-learn-links, body.light-theme .nav-learn-links { position: static; min-width: 0; box-shadow: none; border: 0; border-left: 1px solid var(--border); border-radius: 0; margin-left: 14px; }
}
@media (max-width: 600px) {
  .container { padding: 24px 16px 40px; }
  .topbar { padding-inline: 16px; }
  .topbar-inner { min-height: 64px; }
  .calculator-card, .page-card, .research-card-block, .research-company-card { padding: 20px 16px; border-radius: 3px; }
  .product-intro, body.light-theme .product-intro { padding: 4px 0 24px; margin-bottom: 8px; }
  .page-intro h1 { font-size: clamp(1.65rem, 7vw, 1.95rem); hyphens: auto; }
  .product-intro .feature-grid { display: grid; grid-template-columns: 1fr; }
  .product-intro .feature-grid a { width: 100%; min-width: 0; }
  .ntm-today-shell { padding: 18px 16px; }
  .ntm-market-status-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .market-status-card { padding: 12px; }
  .market-flag { display: none; }
  .form-grid { gap: 18px; }
  .mode-toggle { display: flex; flex-wrap: wrap; }
  .mode-toggle button { flex: 1 1 auto; width: auto; padding: 10px; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-box { padding: 16px 12px; }
  .result-value { font-size: 1.5rem; }
  .result-box.highlight .result-value { font-size: 2.15rem; }
  .section-title-row { align-items: start; gap: 8px; }
  .section-title-row h2 { font-size: 1.15rem; }
  .section-local-nav { gap: 0 14px; }
  .section-local-nav a { font-size: .78rem; }
  .source-stamp-wrap { max-width: 100%; align-items: start; text-align: left; }
  .research-card-block { margin-block: 18px; }
  .scenario-assumption-grid { grid-template-columns: 1fr; gap: 12px; }
  .scenario-assumption { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .scenario-assumption h3 { grid-column: 1 / -1; margin: 0; }
  .depth-panel > summary small { display: block; margin: 4px 0 0 16px; }
  .post-article { padding: 24px 16px; border: 0; background: none !important; }
  .post-header h1 { font-size: 1.85rem; }
  .post-lead, .post-content, .summary-content { font-size: 1rem; }
  .ai-summary-body { padding: 16px; }
  .post-actions { gap: 10px; }
  .content-journey { padding: 20px 16px; }
  .min-ntm-card { padding: 22px 16px; }
  .min-ntm-actions { gap: 10px; }
  .trust-page { padding: 20px 20px 40px; }
  .trust-page .card { padding: 20px 0; }
  .trust-page h1 { font-size: 1.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .ntm-relations { display: none !important; }
  .skip-link, .section-local-nav, .trust-footer { display: none !important; }
  body { background: white; }
  .research-print-view { color: #111; background: white; }
}

/* Shared canonical control and semantic-state behavior. Palette has one owner: visual-v3-tokens.css. */
body :is(.primary-btn, button[type=submit], .thesis-submit-btn),
body.light-theme :is(.primary-btn, button[type=submit], .thesis-submit-btn), #valuationForm button[type=submit] {
  background: var(--action); color: var(--action-text); border-color: var(--action); box-shadow: none;
}
body :is(.primary-btn, button[type=submit], .thesis-submit-btn):hover, #valuationForm button[type=submit]:hover {
  background: var(--action-hover); color: var(--action-text);
}
body :is(.primary-btn, button[type=submit], .thesis-submit-btn):active { background: var(--action-hover); }
body :is(.secondary-btn, .ghost-btn), body.light-theme :is(.secondary-btn, .ghost-btn) {
  color: var(--text); background: var(--panel); border-color: var(--border); box-shadow: none;
}
body .ghost-btn, body.light-theme .ghost-btn { background: transparent; }
body :is(.secondary-btn, .ghost-btn):hover { background: var(--panel-alt); border-color: var(--muted); }
body :is(.destructive-action, .thesis-delete-btn, #delete-scenario, #goal-delete-scenario) {
  color: var(--danger); border-color: var(--danger); background: transparent;
}
body button:disabled, body.light-theme button:disabled { opacity: 1; color: var(--muted); background: var(--panel-alt); border-color: var(--border); cursor: not-allowed; }
body button:disabled:hover, body.light-theme button:disabled:hover { background: var(--panel-alt); color: var(--muted); }
body .theme-toggle, body.light-theme .theme-toggle { color: var(--text); background: var(--panel); border-color: var(--border); border-radius: 7px; box-shadow: none; }
body .theme-toggle:hover { background: var(--panel-alt); border-color: var(--muted); }
.toggle-icon, body.light-theme .toggle-icon { font-size: 20px; width: 20px; height: 20px; transform: none; transition: opacity 120ms ease; }
.toggle-icon svg { display: block; }
body :is(.main-nav a.active, .main-nav a[aria-current=page], .research-pill.active) { background: var(--panel-alt); color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
body :is(.mode-tab.active, .stock-mode-tab.active, .return-mode-tab.active, .tools-filter.is-active, .summary-language-button.is-active) {
  background: var(--panel-strong); color: var(--text); border-color: var(--border); box-shadow: inset 0 -2px var(--primary);
}
body :is(.section-kicker, .section-kicker-small, .resource-tag, .post-tag, .pill-badge, .company-ticker-tag, .company-badge-row .badge, .sec-source-badge, .eps-source-badge) {
  color: var(--muted); background: transparent; border-color: var(--border); box-shadow: none;
}
.sec-dot { background: var(--muted); }
body .eps-source-badge.manual { color: var(--manual); background: var(--primary-soft); }
body .min-ntm-card:first-of-type { background: var(--panel) !important; }
body :is(.scenario-cell.scenario-bear, .scenario-cell.scenario-base, .scenario-cell.scenario-bull) { background: var(--panel-alt); border-color: var(--border); }
body .scenario-cell.scenario-base { border-top-color: var(--primary); }
body :is(.growth-value.val-positive, .change-positive) { color: var(--market-positive); }
body :is(.growth-value.val-negative, .change-negative) { color: var(--market-negative); }
body [data-ntm-status] { background: var(--panel-alt); color: var(--informational); }
body [data-ntm-status=saved] { color: var(--success); }
body :is([data-ntm-status=warning], [data-ntm-status=stale], [data-ntm-status=unsafe]) { color: var(--warning); }
body [data-ntm-status=error] { color: var(--danger); }
body [data-ntm-status=manual] { color: var(--manual); }
body [data-ntm-status=derived] { color: var(--derived); }
body :is([data-ntm-status=unavailable], [data-ntm-status=neutral], [data-ntm-status=local]) { color: var(--unavailable); }
body .calc-status-banner { background: var(--panel-alt); border-color: var(--border); }
body .calc-status-banner.calc-status-success { color: var(--informational); background: var(--panel-alt); border-color: var(--border); }
body .calc-status-banner.calc-status-error { color: var(--danger); }
body .calc-status-banner[data-ntm-status=saved] { color: var(--success); }
/* Older calculator ID selectors must not override the shared action colors. */
body form button[type=submit] { background: var(--action); color: var(--action-text); border-color: var(--action); }
body form button[type=submit]:hover { background: var(--action-hover); }
body form button[type=submit]:disabled { color: var(--muted) !important; background: var(--panel-alt) !important; border-color: var(--border) !important; }
body .youtube-play { background: var(--action); color: var(--action-text); box-shadow: none; }
body .youtube-preview:hover .youtube-play, body .youtube-preview:focus-visible .youtube-play { background: var(--action-hover); transform: translate(-50%, -50%); }
body .summary-language-button { background: var(--panel); border-color: var(--border); color: var(--muted); }
body .summary-language-button.is-active { color: var(--text); background: var(--panel-alt); box-shadow: inset 0 -2px var(--primary); }
body .sens-header-row { color: var(--muted); background: var(--panel-alt); }
body .sens-cell-base { background: var(--panel-alt) !important; }
body .company-sector { color: var(--muted); background: var(--panel-alt); }
body .research-company-card .badge { color: var(--muted); background: transparent; border-color: var(--border); }
body :is(.archive-item.active, .chart-view-tab.is-active, .filter-button.is-active, .pagination-button.is-active) {
  color: var(--text); background: var(--panel-alt); border-color: var(--border); box-shadow: inset 0 -2px var(--primary);
}
body :is(.filter-button, .pagination-button, .summary-language-button):hover { background: var(--panel-alt); border-color: var(--muted); }
body .week-visual { background-color: var(--panel-alt); }
body .youtube-post .resource-card-link { color: var(--primary); background: var(--panel); border-color: var(--border); }
body .youtube-post .resource-card-link:hover { background: var(--panel-alt); border-color: var(--primary); }
body .valuation-section { border-color: var(--border); border-top-color: var(--primary); }
body :is(.ai-summary summary, .summary-language-button):focus-visible { border-color: var(--primary); }

/* Contextual next steps share one quiet pattern across content and tools. */
.ntm-relations { margin-block: 32px; padding-block: 24px; border-block: 1px solid var(--border); }
.ntm-relations h2 { font-size: 1.2rem; margin: 0 0 20px; }
.ntm-relations ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.ntm-relations li { min-width: 0; display: flex; flex-direction: column; align-items: start; }
.ntm-relations h3 { font-size: 1rem; margin: 0 0 8px; }
.ntm-relations p { color: var(--muted); font-size: .9rem; line-height: 1.65; margin: 0 0 12px; }
.ntm-relations a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; font-weight: 600; font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; margin-top: auto; }
.ntm-relations[hidden] { display: none; }

/* Resources share the same content rhythm; row height follows content, not a fixed size. */
.resource-recommendation { display: flex; flex-direction: column; }
.resource-recommendation .resource-card-meta { flex-wrap: wrap; }
.resource-recommendation .resource-card-detail::before { content: '·'; margin-right: 8px; }
.resource-recommendation .resource-card-footer { margin-top: auto; padding-top: 8px; }
.resource-recommendation .resource-card-link { min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.resource-recommendation:focus-within { border-color: var(--primary); }

/* Group money only at rest; the original accessible native input remains editable. */
.grouped-number-input { position: relative; display: block; min-width: 0; width: 100%; }
.grouped-number-input > input { width: 100%; }
.grouped-number-display {
  display: none; position: absolute; inset: 0; align-content: center;
  padding: 11px 12px; border: 1px solid transparent; pointer-events: none;
  font-size: 1rem; color: var(--text); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.grouped-number-input.has-grouped-value > input:not(:focus) { -webkit-text-fill-color: transparent; }
.grouped-number-input.has-grouped-value > input:not(:focus) + .grouped-number-display { display: block; }
.grouped-number-input > input:disabled + .grouped-number-display { opacity: .5; }
@media (forced-colors: active) {
  .grouped-number-input.has-grouped-value > input:not(:focus) { -webkit-text-fill-color: currentColor; }
  .grouped-number-input.has-grouped-value > input:not(:focus) + .grouped-number-display { display: none; }
}

/* Optional lifecycle controls reuse the shared disclosure/form treatment. */
.assumption-detail .field-group, #reportQuestionsEditor .field-group { margin-block: 12px; }
.lifecycle-text, #revisionAssumptions, #revisionQuestions { white-space: pre-wrap; overflow-wrap: anywhere; }
#manualThesisEntry { margin-block: 20px; }
#manualCompanyField { margin-block: 16px; }

#researchDetail.is-manual [hidden] { display: none !important; }

/* Native details provide the shared optional-depth interaction. */
.depth-panel > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.depth-panel p, #followup-history li { overflow-wrap: anywhere; }
#goal-followup { padding: 24px; }
#goal-followup input, #goal-followup select { max-width: 100%; min-width: 0; }
#followup-history li { margin-block: 12px; }
body .week-report-image { min-height: 0; height: auto; aspect-ratio: 16 / 9; padding: 0; }
.week-report-image picture, .week-report-image img { display: block; width: 100%; height: auto; }
#earnings-readable { margin-block: 24px; }
@media (max-width: 720px) { #goal-followup { padding: 16px; } }

[data-calc-state="neutral"] [data-depth-event="fire_stress_view_opened"],
[data-calc-state="error"] [data-depth-event="fire_stress_view_opened"] { display: none; }

.ntm-earnings-more > summary, .ntm-macro-more > summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
.ntm-earnings-more > summary:focus-visible, .ntm-macro-more > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

[aria-labelledby="academyMiniHeading"] a {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
[hidden].ntm-menu-backdrop { display:none; }
.ntm-menu-backdrop { position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:2147483000;pointer-events:auto;touch-action:none; }
.topbar.ntm-menu-layer { position:relative;z-index:2147483001; }
.ntm-menu-layer .main-nav.open { max-height:calc(100dvh - 90px);overflow-y:auto;overscroll-behavior:contain; }
.year-return-grid { display:grid;grid-template-columns:1fr;gap:12px;margin-block:16px; }
.year-return-grid[hidden],.comparison-section[hidden] { display:none; }
.year-return-grid label { display:grid;grid-template-columns:1fr minmax(100px,10rem);align-items:center;gap:12px; }
#growth-yearly-depth > label { display:flex;align-items:center;gap:12px;min-height:44px; }
#growth-yearly-depth #growth-yearly-mode { width:20px;height:20px;min-height:20px;margin:0;flex:0 0 20px; }
#growth-yearly-depth a { color:var(--primary);display:inline-flex;align-items:center;min-height:44px; }
#growth-yearly-depth > p:not(.note) { color:var(--text); }

[aria-labelledby="academyMiniHeading"] [data-xp-bar] {width:100%;accent-color:var(--primary)}

/* Canonical purpose-specific compositions; data and interaction owners are unchanged. */
body .page-card, body.light-theme .page-card { background: none; border: 0; border-radius: 0; padding: 0; }
.page-intro h1, .tool-landing .section-heading h2, .weekly-sidebar h2 { color: var(--text); }
body .calculator-card:not(.product-intro), body.light-theme .calculator-card:not(.product-intro) {
  background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 28px 0;
}
.tool-landing { max-width: 1120px; }
.tool-intro > p { max-width: 65ch; font-size: 15px; }
.calculator-form { max-width: 800px; }
.calculator-card .section-heading h2 { font-size: 26px; }
.calculator-card .result-value { font-family: var(--font-reading); font-weight: 400; }
.mode-toggle, .tools-filters { background: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.saved-scenarios { background: none; border: 0; border-radius: 0; padding: 16px 0; }
body .min-ntm-card, body.light-theme .min-ntm-card { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 28px 0; }
body .min-ntm-card:first-of-type { background: none !important; border-left: 0; border-top: 2px solid var(--primary); }
.min-ntm-list-item h3 { font-size: 25px; }
.min-ntm-empty, .min-ntm-empty-state { border: 0; border-top: 1px solid var(--border); padding: 24px 0; }
.post-content, .summary-content { font-family: var(--font-reading); font-size: 20px; line-height: 1.8; }
.post-lead { font-family: var(--font-reading); font-size: 25px; }
.trust-page { max-width: 900px; }
.trust-page p, .trust-definitions { font-family: var(--font-reading); font-size: 20px; }
.trust-footer { max-width: 1296px; margin-inline: auto; }
.instagram-footer { margin-top: 48px; }
.weekly-sidebar, body.light-theme .weekly-sidebar { background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.macro-metrics { background: none; border-top: 1px solid var(--border); border-radius: 0; }
.ntm-event-panel h3, .macro-day-group h3 { font-size: 25px; }
.ntm-event-title { font-weight: 600; }
.resource-card, .feature-card { border-radius: 3px; }
.tools-grid .feature-card { background: none; border: 0; border-top: 1px solid var(--border); padding: 22px 0; }
@media(max-width:600px) {
  .product-intro h1 { font-size: clamp(2rem, 8vw, 2.25rem); line-height: 1.15; }
  .page-intro h1 { font-size: clamp(2.25rem,8vw,3rem); }
  .container { padding-inline: 20px; }
  .post-content, .summary-content, .trust-page p, .trust-definitions { font-size: 19px; }
  .results { gap: 16px; }
  .ntm-today-shell { padding-inline: 0; }
  .tool-intro { margin-bottom: 20px; }
  .tool-intro p { font-size: 14px; line-height: 1.55; }
  .tool-landing .section-heading { margin-bottom: 16px; }
}
