/* Valthor Labs editorial design, shared theme tokens and the XRM5-first homepage. */
:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --panel: #fffefa;
  --panel2: #edf2ef;
  --line: #d5ddda;
  --line-strong: #b8c6c4;
  --text: #18272d;
  --muted: #53666d;
  --dim: #667b81;
  --gold: #96703a;
  --gold2: #80602e;
  --green: #287453;
  --red: #a44850;
  --ink: #18272d;
  --radius: 10px;
  --shadow: 0 14px 36px rgba(25, 45, 49, .055);
  --enterprise-surface: #fffefa;
  --enterprise-raised: #eaf0ed;
  --enterprise-nav: rgba(247, 247, 244, .97);
  --enterprise-cta: #20353d;
  --enterprise-cta-text: #ffffff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1114;
  --panel: #151b20;
  --panel2: #1b242a;
  --line: #303b42;
  --line-strong: #4d5a61;
  --text: #edf1ef;
  --muted: #aab8bc;
  --dim: #91a0a6;
  --gold: #d3b177;
  --gold2: #e2c591;
  --green: #71c797;
  --red: #dc8188;
  --ink: #edf1ef;
  --shadow: none;
  --enterprise-surface: #151b20;
  --enterprise-raised: #1b242a;
  --enterprise-nav: rgba(13, 17, 20, .97);
  --enterprise-cta: #d3b177;
  --enterprise-cta-text: #111a1e;
}
html, body { background: var(--bg) !important; color: var(--text); }
body::before { display: none !important; }
/* Instagram-inspired artwork: decorative only, with quiet space behind copy. */
body {
  background-image: linear-gradient(180deg, rgba(247,247,244,.94) 0, rgba(247,247,244,.96) 520px, #f7f7f4 780px), url("assets/brand-background-v1.webp") !important;
  background-position: center top !important;
  background-size: 100% 1080px, max(100%, 1440px) auto !important;
  background-repeat: no-repeat !important;
}
html[data-theme="dark"] body {
  background-image: linear-gradient(180deg, rgba(13,17,20,.16) 0, rgba(13,17,20,.25) 520px, #0d1114 1080px), url("assets/brand-background-v1.webp") !important;
}
@media (max-width: 760px) {
  body { background-size: 100% 900px, auto 900px !important; background-position: 62% top !important; }
  html[data-theme="dark"] body {
    background-image: linear-gradient(180deg, rgba(13,17,20,.4) 0, rgba(13,17,20,.6) 540px, #0d1114 900px), url("assets/brand-background-v1.webp") !important;
  }
}
.topbar { background: var(--enterprise-nav) !important; border-color: var(--line); backdrop-filter: blur(14px); }
.brand__name strong { color: var(--text); }
.nav a, .nav a[aria-current="page"] { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.topbar .nav a[aria-current="page"]::after { background: var(--gold); }
.theme-toggle {
  order: 3; flex: 0 0 auto; margin-left: 18px; padding: 10px 13px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  background: var(--enterprise-surface); color: var(--text);
  font: 700 11px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.theme-toggle .theme-toggle__icon { margin-right: 7px; color: var(--gold); }
.nav-toggle { order: 2; }
.btn--gold, .btn--primary { color: var(--enterprise-cta-text) !important; background: var(--enterprise-cta) !important; border-color: var(--enterprise-cta) !important; box-shadow: none !important; }
.btn--ghost { color: var(--text) !important; background: transparent !important; border-color: var(--line-strong) !important; }
.text-link, .footer a { color: var(--gold2); }
.text-link { white-space: normal; max-width: 100%; }
.footer { color: var(--muted); border-color: var(--line); }
.cookie-notice, .topbar .nav.is-open { background: var(--enterprise-surface) !important; color: var(--text); border-color: var(--line) !important; }
.archive-notice, .faq-list details, .system-status-panel, .evidence-card,
.system-card, .hero-panel, .pipeline-grid article, .principles-grid article,
.research-note-grid article, .tooling-shortcuts a, .detail-grid article,
.updates-panel, .comparison-table, .comparison-table-wrap, .system-profile-table-wrap,
.contact-channel-card, .contact-hero aside, .validation-table-wrap {
  background: var(--enterprise-surface) !important;
  color: var(--text);
  border-color: var(--line) !important;
  box-shadow: var(--shadow) !important;
  border-radius: 8px !important;
}
.system-card p, .evidence-card p, .pipeline-grid p, .principles-grid p,
.research-note-grid p, .tooling-shortcuts p, .updates-panel p,
.section__head p, .lead, .focus-disclaimer, .evidence-label,
.system-detail-hero p, .detail-grid p, .comparison-table td { color: var(--muted) !important; }
.system-card h3, .tooling-shortcuts strong, .evidence-card strong { color: var(--text) !important; }
.system-card--featured { border-left: 3px solid var(--gold) !important; }
.system-detail-page #architecture .pipeline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .system-detail-page #architecture .pipeline-grid { grid-template-columns: 1fr; } }
.maturity-badge, .archive-notice { color: var(--gold2); }
.system-status-panel dd { color: var(--text) !important; }
.motion-enabled .motion-reveal, .motion-enabled .motion-reveal.is-visible { opacity: 1 !important; transform: none !important; transition: none !important; }
.motion-enabled .hero h1, .motion-enabled .page-hero h1, .motion-enabled .calculator-hero h1,
.motion-enabled .tools-hero h1, .motion-enabled .hero .lead, .motion-enabled .page-hero p,
.motion-enabled .calculator-hero p, .motion-enabled .tools-hero p { animation: none !important; }
main h1, main h2, main h3 { color: var(--text) !important; }
main p { color: var(--muted); }
.enterprise-home .enterprise-hero h1 em { color: var(--gold) !important; }
.enterprise-home .section__head h2 { font-family: var(--font-display) !important; font-weight: 630 !important; }
html[data-theme="light"] .tools-hero__status,
html[data-theme="light"] .hero-terminal,
html[data-theme="light"] .analytics-hero-card,
html[data-theme="light"] .analytics-module,
html[data-theme="light"] .profile-hero-card,
html[data-theme="light"] .tool-card,
html[data-theme="light"] .planned-tool-frame,
html[data-theme="light"] .calculator-panel,
html[data-theme="light"] .result-card,
html[data-theme="light"] .reference-card,
html[data-theme="light"] .methodology-card,
html[data-theme="light"] .scenario-card,
html[data-theme="light"] .article-callout,
html[data-theme="light"] .article-summary {
  background: var(--enterprise-surface) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="light"] .tools-hero__status strong,
html[data-theme="light"] .tools-hero__status b,
html[data-theme="light"] .tools-hero__status h2,
html[data-theme="light"] .tools-hero__status h3,
html[data-theme="light"] .tool-card strong,
html[data-theme="light"] .tool-card h2 { color: var(--text) !important; }
html[data-theme="light"] .tools-hero__status span,
html[data-theme="light"] .tools-hero__status small,
html[data-theme="light"] .tools-hero__status p { color: var(--muted) !important; }
.comparison-table th, .comparison-table td { border-color: var(--line) !important; }
.comparison-table thead, .comparison-table thead tr { background: var(--enterprise-raised) !important; }
html[data-theme="light"] .comparison-table tbody tr,
html[data-theme="light"] .comparison-table tbody th,
html[data-theme="light"] .comparison-table tbody td { background: var(--enterprise-surface) !important; color: var(--text); }
html[data-theme="light"] .kicker,
html[data-theme="light"] .pipeline-grid span,
html[data-theme="light"] .principles-grid span,
html[data-theme="light"] .tooling-shortcuts span { color: var(--gold2) !important; }

/* The homepage uses the same content boundaries as the current public record. */
.enterprise-home .enterprise-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr); gap: clamp(34px, 5vw, 72px); align-items: start; padding: clamp(54px, 6vw, 90px) 0 70px; border-bottom: 1px solid var(--line); }
.enterprise-home .enterprise-hero h1 { max-width: 720px; margin: 20px 0 27px; font: 650 clamp(43px, 4.5vw, 68px)/1.06 var(--font-display) !important; letter-spacing: -.035em; }
.enterprise-home .enterprise-hero h1 em { color: var(--gold); font-style: normal; }
.enterprise-home .enterprise-hero .lead { max-width: 610px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.62; }
.enterprise-home .enterprise-hero .focus-disclaimer { max-width: 590px; font-size: 13px; line-height: 1.6; }
.enterprise-home .hero-actions { margin-top: 34px; }
.enterprise-home .hero-actions .btn { border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.enterprise-status { border: 1px solid var(--line); background: var(--enterprise-surface); box-shadow: var(--shadow); }
.enterprise-status__head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 20px 24px; background: var(--enterprise-raised); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.enterprise-status__tag { padding: 5px 8px; border: 1px solid var(--gold); color: var(--gold2); font-size: 10px; }
.enterprise-status__title { padding: 25px 24px 17px; }
.enterprise-status__title strong { display: block; font: 650 40px var(--font-display); line-height: 1; }
.enterprise-status__title small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.enterprise-status dl { margin: 0 24px; }
.enterprise-status dl div { display: flex; justify-content: space-between; gap: 15px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 13px; }
.enterprise-status dt { color: var(--muted); }
.enterprise-status dd { margin: 0; text-align: right; font-weight: 700; }
.enterprise-status dd.is-current { color: var(--gold2); }
.enterprise-status__foot { padding: 15px 24px; border-top: 1px solid var(--line); background: var(--enterprise-raised); color: var(--muted); font-size: 12px; }
.enterprise-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.enterprise-facts div { padding: 28px 22px; border-right: 1px solid var(--line); }
.enterprise-facts div:first-child { padding-left: 0; }
.enterprise-facts div:last-child { border-right: 0; }
.enterprise-facts span { display: block; color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.enterprise-facts strong { display: block; margin-top: 10px; font-size: 18px; }
.enterprise-home .section { padding: 70px 0; }
.enterprise-home .section h2 { font: 630 clamp(31px, 3vw, 40px)/1.14 var(--font-display); letter-spacing: -.02em; }
.enterprise-evidence { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .55fr); gap: 20px; }
.enterprise-evidence__table { border: 1px solid var(--line); background: var(--enterprise-surface); overflow-x: auto; }
.enterprise-evidence__row { display: grid; grid-template-columns: 150px minmax(200px, 1fr) 132px; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.enterprise-evidence__row:last-child { border: 0; }
.enterprise-evidence__row span:nth-child(2) { color: var(--muted); }
.enterprise-evidence__row span:last-child { color: var(--gold2); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-align: right; text-transform: uppercase; }
.enterprise-evidence__row--head { background: var(--enterprise-raised); color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.enterprise-evidence__note { padding: 25px; border-left: 2px solid var(--gold); background: var(--enterprise-raised); }
.enterprise-evidence__note h3 { font: 630 25px var(--font-display); }
.enterprise-evidence__note p { color: var(--muted); font-size: 13px; }
.enterprise-programs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.enterprise-programs article { padding: 24px; border: 1px solid var(--line); background: var(--enterprise-surface); }
.enterprise-programs article span { color: var(--gold2); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.enterprise-programs h3 { margin: 16px 0 8px; font: 630 25px var(--font-display); }
.enterprise-programs p { color: var(--muted); font-size: 13px; }
.enterprise-home .updates-panel { background: var(--enterprise-raised) !important; }
@media (max-width: 1040px) { .enterprise-home .enterprise-hero { grid-template-columns: minmax(0, 1fr); } .enterprise-evidence { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .topbar { flex-wrap: nowrap; width: calc(100% - 32px); }
  .topbar .brand { min-width: 0; flex: 0 1 auto; }
  .theme-toggle { margin-left: auto; order: 1; padding: 10px; }
  .nav-toggle { margin-left: 8px; order: 2; flex: 0 0 42px; }
  .topbar .nav { background: var(--enterprise-surface) !important; }
  .enterprise-home .enterprise-hero { padding: 46px 0 48px; min-width: 0; }
  .enterprise-home .enterprise-hero > *, .enterprise-status { min-width: 0; }
  .enterprise-home .enterprise-hero h1 { font-size: clamp(38px, 10vw, 51px) !important; }
  .enterprise-home .hero-actions { display: grid; }
  .enterprise-facts, .enterprise-programs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enterprise-facts div:nth-child(2) { border-right: 0; }
  .enterprise-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .enterprise-facts div:nth-child(3) { padding-left: 0; }
  .enterprise-evidence__row { min-width: 620px; }
  .enterprise-home .section { padding: 55px 0; }
}
@media (max-width: 430px) { .enterprise-programs { grid-template-columns: 1fr; } .brand__name strong { font-size: 13px; } .theme-toggle { font-size: 10px; } }

/* Released tools use the same editorial rhythm and surfaces as the research pages. */
.tools-directory .section { padding: 64px 0; }
.tools-directory .tools-directory-hero { padding-top: 76px; border-bottom: 1px solid var(--line); }
.tools-directory .tools-directory-hero h1 { max-width: 850px; font: 650 clamp(38px, 4.2vw, 60px)/1.1 var(--font-display); letter-spacing: -.03em; }
.tools-directory .tools-directory-hero .lead { max-width: 760px; font-size: 19px; line-height: 1.65; }
.tools-directory-trust { font-size: 13px; color: var(--muted); }
.tools-directory .tools-directory-hero > p:last-child { max-width: 720px; font-size: 12px; line-height: 1.65; }
.research-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.research-tool-card { min-width: 0; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--enterprise-surface); box-shadow: var(--shadow); }
.research-tool-card__category { color: var(--gold2); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.research-tool-card h3 { margin: 17px 0 12px; font: 630 24px/1.25 var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.research-tool-card p, .research-tool-features { color: var(--muted); font-size: 14px; line-height: 1.7; }
.research-tool-features { padding-left: 20px; margin: 16px 0 24px; }
.research-tool-card > .text-link { margin-top: auto; align-self: flex-start; font-size: 12px; }
.research-tool-card:hover { border-color: var(--line-strong); }
.research-tool-card:focus-within { border-color: var(--gold); }
.tools-directory .pipeline-grid, .tools-directory .principles-grid { margin-top: 28px; }
.tools-directory .pipeline-grid, .validation-page .pipeline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tools-directory .principles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.validation-page .validation-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-status { margin: 20px 0 0; }
.public-status > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.public-status dt { color: var(--muted); }
.public-status dd { margin: 0; text-align: right; font-weight: 650; }
.tools-directory .pipeline-grid article, .tools-directory .principles-grid article { min-width: 0; padding: 24px; }
@media (max-width: 1040px) { .research-tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 1040px) { .tools-directory .pipeline-grid, .tools-directory .principles-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .tools-directory .section { padding: 46px 0; }
  .tools-directory .tools-directory-hero { padding-top: 46px; }
  .research-tool-card { padding: 22px; }
  .tools-directory .pipeline-grid, .tools-directory .principles-grid { grid-template-columns: 1fr; }
  .validation-page .pipeline-grid { grid-template-columns: 1fr; }
  .validation-page .validation-status-grid { grid-template-columns: 1fr; }
}
