/*
Equiptova Professional Decision Workspace — PX v2
Production DOM Alignment v2.1.0

IMPORTANT:
- equiptova-design-tokens-v1.css is the canonical visual token source.
- This file intentionally defines no alternate brand palette.
- Presentation only: no content, canonical, publication, indexation, formula,
  expert-review or Search Launch mutation.
*/

body.eq-px-v2 {
  background: var(--eq-canvas);
  color: var(--eq-text);
  font-family: var(--eq-font-sans);
  font-size: var(--eq-text-lg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.eq-px-v2 *,
body.eq-px-v2 *::before,
body.eq-px-v2 *::after {
  box-sizing: border-box;
}

body.eq-px-v2 img,
body.eq-px-v2 svg {
  max-width: 100%;
  height: auto;
}

body.eq-px-v2 main {
  color: var(--eq-text);
}

body.eq-px-v2 main :where(p, li) {
  max-width: 72ch;
}

body.eq-px-v2 main h1 {
  color: var(--eq-brand-primary);
  font-size: var(--eq-text-3xl);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

body.eq-px-v2 main h2 {
  color: var(--eq-brand-primary);
  font-size: var(--eq-text-2xl);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

body.eq-px-v2 main h3 {
  color: var(--eq-brand-primary);
  font-size: var(--eq-text-xl);
  line-height: 1.25;
  font-weight: 600;
}

body.eq-px-v2 :where(code, kbd, samp, pre, .eq-formula, .eq-technical-value) {
  font-family: var(--eq-font-mono);
}

body.eq-px-v2 :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--eq-focus);
  outline-offset: 3px;
}

/* Accessible skip-link if theme/plugin already emits one. */
body.eq-px-v2 .skip-link,
body.eq-px-v2 .eq-skip-link {
  position: fixed;
  z-index: 10000;
  inset-inline-start: var(--eq-space-4);
  top: -6rem;
  padding: var(--eq-space-2) var(--eq-space-4);
  border-radius: var(--eq-radius-sm);
  background: var(--eq-brand-primary);
  color: var(--eq-text-inverse);
  text-decoration: none;
}
body.eq-px-v2 .skip-link:focus,
body.eq-px-v2 .eq-skip-link:focus {
  top: var(--eq-space-3);
}

/* -----------------------------------------------------------------
   Global shell
----------------------------------------------------------------- */
body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead) {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--eq-surface);
  border-bottom: 1px solid var(--eq-border);
  box-shadow: none;
}

body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead) a {
  color: var(--eq-brand-primary);
}

body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead)
  :where(nav, [role="navigation"]) a {
  border-radius: var(--eq-radius-sm);
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead)
  :where(nav, [role="navigation"]) a:hover {
  background: var(--eq-surface-alt);
}

body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead)
  :where(.current-menu-item, [aria-current="page"]) {
  text-decoration-color: var(--eq-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: var(--eq-space-2);
}

body.eq-px-v2 :where(.eq-site-footer, footer.site-footer, #colophon) {
  margin-top: var(--eq-space-16);
  background: var(--eq-brand-primary);
  color: var(--eq-text-inverse);
  border-top: 0;
  box-shadow: none;
}

body.eq-px-v2 :where(.eq-site-footer, footer.site-footer, #colophon)
  :where(a, h2, h3, h4) {
  color: var(--eq-text-inverse);
}

body.eq-px-v2 :where(.eq-site-footer, footer.site-footer, #colophon)
  :where(p, small) {
  color: var(--eq-text-inverse);
  opacity: .86;
}

/* Neutralize indiscriminate cardification without removing true objects. */
body.eq-px-v2 :where(.eq-card, .eq-panel) {
  border-color: var(--eq-border);
  border-radius: var(--eq-radius-md);
  box-shadow: none;
}

/* -----------------------------------------------------------------
   Template widths and hierarchy — nine approved templates
----------------------------------------------------------------- */
body.eq-px-v2.eq-template-calculator main,
body.eq-px-v2.eq-template-estimator main {
  --eq-current-content-width: var(--eq-content-tool);
}

body.eq-px-v2.eq-template-guide main,
body.eq-px-v2.eq-template-reference main,
body.eq-px-v2.eq-template-cost-guide main,
body.eq-px-v2.eq-template-trust main,
body.eq-px-v2.eq-template-legal main {
  --eq-current-content-width: var(--eq-content-readable);
}

body.eq-px-v2.eq-template-topic-hub main,
body.eq-px-v2.eq-template-foundation main {
  --eq-current-content-width: var(--eq-content-wide);
}

body.eq-px-v2 :where(.eq-page-main, .site-main, main > article) {
  margin-inline: auto;
}

body.eq-px-v2.eq-template-guide :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-reference :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-cost-guide :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-trust :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-legal :where(.eq-page-main, .site-main, main > article) {
  max-width: var(--eq-content-readable);
}

body.eq-px-v2.eq-template-calculator :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-estimator :where(.eq-page-main, .site-main, main > article) {
  max-width: var(--eq-content-tool);
}

body.eq-px-v2.eq-template-topic-hub :where(.eq-page-main, .site-main, main > article),
body.eq-px-v2.eq-template-foundation :where(.eq-page-main, .site-main, main > article) {
  max-width: var(--eq-content-wide);
}

/* Compact utility heroes, with Home allowed to breathe. */
body.eq-px-v2 :where(.eq-hero, .eq-page-hero, [class*="page-hero"]) {
  box-shadow: none;
  border-color: var(--eq-border);
}

body.eq-px-v2:not(.eq-page-site-001)
  :where(.eq-hero, .eq-page-hero, [class*="page-hero"]) {
  padding-block: var(--eq-space-8) var(--eq-space-6);
  background: transparent;
}

body.eq-px-v2.eq-page-site-001
  :where(.eq-hero, .eq-page-hero, [class*="page-hero"]) {
  padding-block: var(--eq-space-16) var(--eq-space-12);
  background: var(--eq-surface);
}

/* -----------------------------------------------------------------
   16 controlled component contracts
----------------------------------------------------------------- */
body.eq-px-v2 .eq-cmp {
  margin-block: var(--eq-space-8);
}

body.eq-px-v2 .eq-cmp > :first-child {
  margin-top: 0;
}

body.eq-px-v2 .eq-cmp > :last-child {
  margin-bottom: 0;
}

/* Quick Answer */
body.eq-px-v2 .eq-cmp-answer {
  padding: var(--eq-space-6);
  border-inline-start: var(--eq-space-1) solid var(--eq-brand-secondary);
  border-radius: 0 var(--eq-radius-md) var(--eq-radius-md) 0;
  background: var(--eq-surface);
  box-shadow: var(--eq-shadow-sm);
}

/* Controlled Breadcrumbs */
body.eq-px-v2 .eq-cmp-breadcrumb {
  margin-block: var(--eq-space-4);
  color: var(--eq-text-secondary);
  font-size: var(--eq-text-sm);
}
body.eq-px-v2 .eq-cmp-breadcrumb a {
  color: var(--eq-text-secondary);
  text-decoration: none;
}
body.eq-px-v2 .eq-cmp-breadcrumb a:hover {
  color: var(--eq-brand-primary);
  text-decoration: underline;
}

/* Interactive Tool Shell */
body.eq-px-v2 .eq-cmp-tool {
  padding: var(--eq-space-8);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
  box-shadow: var(--eq-shadow-sm);
}

body.eq-px-v2 .eq-cmp-tool :where(label, legend) {
  color: var(--eq-text);
  font-size: var(--eq-text-sm);
  font-weight: 600;
}

body.eq-px-v2 .eq-cmp-tool :where(input, select, textarea) {
  min-height: 46px;
  color: var(--eq-text);
  background: var(--eq-surface);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-sm);
}

body.eq-px-v2 .eq-cmp-tool :where(input, select, textarea):focus {
  border-color: var(--eq-focus);
}

body.eq-px-v2 .eq-cmp-tool :where(button, [role="button"], input[type="submit"]) {
  min-height: 46px;
  min-width: 44px;
  border-radius: var(--eq-radius-sm);
}

body.eq-px-v2 .eq-cmp-tool :where(button[type="submit"], input[type="submit"], .eq-button-primary) {
  background: var(--eq-brand-primary);
  color: var(--eq-text-inverse);
  border: 1px solid var(--eq-brand-primary);
}

/* Result Panel */
body.eq-px-v2 .eq-cmp-result {
  padding: var(--eq-space-8);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface-alt);
}

body.eq-px-v2 .eq-cmp-result
  :where(.eq-result-value, [data-result], [class*="result-value"]) {
  color: var(--eq-brand-primary);
  font-size: clamp(2.375rem, 6vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

body.eq-px-v2 .eq-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--eq-space-2);
  margin-top: var(--eq-space-6);
}

body.eq-px-v2 .eq-result-actions button {
  min-height: 44px;
  padding: var(--eq-space-2) var(--eq-space-4);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-sm);
  background: var(--eq-surface);
  color: var(--eq-brand-primary);
  font-weight: 600;
  cursor: pointer;
}

/* Calculation Details */
body.eq-px-v2 .eq-cmp-details {
  padding-block: var(--eq-space-6);
  border-block: 1px solid var(--eq-border);
}
body.eq-px-v2 .eq-cmp-details details {
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}
body.eq-px-v2 .eq-cmp-details summary {
  padding: var(--eq-space-4) var(--eq-space-6);
  color: var(--eq-brand-primary);
  font-weight: 600;
  cursor: pointer;
}

/* Controlled Data Table */
body.eq-px-v2 .eq-cmp-data {
  max-width: 100%;
}
body.eq-px-v2 .eq-table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}
body.eq-px-v2 .eq-table-scroll table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
}
body.eq-px-v2 .eq-table-scroll :where(th, td) {
  padding: var(--eq-space-3) var(--eq-space-4);
  border-bottom: 1px solid var(--eq-border);
  text-align: start;
  vertical-align: top;
}
body.eq-px-v2 .eq-table-scroll th {
  background: var(--eq-surface-alt);
  color: var(--eq-brand-primary);
  font-size: var(--eq-text-sm);
}
body.eq-px-v2 .eq-table-scroll tr:last-child td {
  border-bottom: 0;
}

/* Sources and Evidence */
body.eq-px-v2 .eq-cmp-source {
  padding-block: var(--eq-space-6);
  border-top: 1px solid var(--eq-border);
  background: transparent;
}
body.eq-px-v2 .eq-cmp-source :where(.eq-source-record, [class*="source-record"]) {
  padding-block: var(--eq-space-4);
  border-bottom: 1px solid var(--eq-border);
}

/* Freshness / data state */
body.eq-px-v2 .eq-cmp-fresh {
  padding: var(--eq-space-4) var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
  color: var(--eq-text-secondary);
  font-size: var(--eq-text-sm);
}

/* Verification Record */
body.eq-px-v2 .eq-cmp-verify {
  display: grid;
  gap: var(--eq-space-3);
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}

/* Worked Example */
body.eq-px-v2 .eq-cmp-example {
  padding: var(--eq-space-6);
  border-inline-start: 2px solid var(--eq-border);
  background: transparent;
}

/* Decision Framework */
body.eq-px-v2 .eq-cmp-decision {
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}

/* Task Navigator */
body.eq-px-v2 .eq-cmp-hub {
  display: grid;
  gap: var(--eq-space-4);
}
body.eq-px-v2 .eq-cmp-hub :where(a, [role="link"]) {
  color: var(--eq-brand-primary);
}
body.eq-px-v2 .eq-cmp-hub :where(.eq-card, [class*="card"]) {
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  box-shadow: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
body.eq-px-v2 .eq-cmp-hub :where(.eq-card, [class*="card"]):hover {
  background: var(--eq-surface-alt);
}

/* Related Next Steps */
body.eq-px-v2 .eq-cmp-related {
  padding-top: var(--eq-space-6);
  border-top: 1px solid var(--eq-border);
}
body.eq-px-v2 .eq-cmp-related a {
  color: var(--eq-brand-primary);
  font-weight: 600;
}

/* Limitations and Safety — neutral by default, semantic state if supplied. */
body.eq-px-v2 .eq-cmp-limit {
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface-alt);
}

/* Policy Section */
body.eq-px-v2 .eq-cmp-policy {
  padding-block: var(--eq-space-6);
  border-top: 1px solid var(--eq-border);
}

/* Verified Contact Route */
body.eq-px-v2 .eq-cmp-contact {
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}

/* -----------------------------------------------------------------
   Semantic component states — brand colors never stand in for states
----------------------------------------------------------------- */
body.eq-px-v2 :where([data-state], [data-eq-state]) {
  position: relative;
}

body.eq-px-v2 :where([data-state="success"], [data-eq-state="success"], .is-success) {
  color: var(--eq-success-fg);
  background-color: var(--eq-success-bg);
}
body.eq-px-v2 :where([data-state="warning"], [data-eq-state="warning"], .is-warning) {
  color: var(--eq-warning-fg);
  background-color: var(--eq-warning-bg);
}
body.eq-px-v2 :where([data-state="error"], [data-eq-state="error"], .is-error) {
  color: var(--eq-danger-fg);
  background-color: var(--eq-danger-bg);
}
body.eq-px-v2 :where([data-state="review-required"], [data-eq-state="review-required"], .is-review-required) {
  color: var(--eq-review-fg);
  background-color: var(--eq-review-bg);
}
body.eq-px-v2 :where(
  [data-state="blocked"], [data-eq-state="blocked"], .is-blocked,
  [data-state="unavailable"], [data-eq-state="unavailable"], .is-unavailable,
  [data-state="expired"], [data-eq-state="expired"], .is-expired
) {
  color: var(--eq-blocked-fg);
  background-color: var(--eq-blocked-bg);
}

body.eq-px-v2 [data-eq-state-icon]::before {
  content: attr(data-eq-state-icon);
  display: inline-block;
  margin-inline-end: var(--eq-space-2);
  font-weight: 700;
}

body.eq-px-v2 :where(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--eq-danger-fg);
}
body.eq-px-v2 :where(.error-message, [role="alert"]) {
  color: var(--eq-danger-fg);
}

/* -----------------------------------------------------------------
   Calculator / estimator productized workspace
----------------------------------------------------------------- */
body.eq-px-v2 :where(.eq-template-calculator, .eq-template-estimator) .eq-tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .92fr);
  gap: var(--eq-space-6);
  align-items: start;
  max-width: var(--eq-content-tool);
  margin-inline: auto;
}

body.eq-px-v2 :where(.eq-template-calculator, .eq-template-estimator)
  .eq-tool-workspace > .eq-cmp-result {
  position: sticky;
  top: var(--eq-space-24);
}

body.eq-px-v2 :where(.eq-template-calculator, .eq-template-estimator)
  .eq-cmp-tool + .eq-cmp-result {
  margin-top: 0;
}

/* Guide / reference / policy visual differentiation */
body.eq-px-v2.eq-template-reference .eq-formula {
  padding: var(--eq-space-6);
  overflow: auto;
  border-radius: var(--eq-radius-md);
  background: var(--eq-brand-primary);
  color: var(--eq-text-inverse);
  font-size: var(--eq-text-xl);
}

body.eq-px-v2.eq-template-guide blockquote {
  margin-inline: 0;
  padding: var(--eq-space-4) var(--eq-space-6);
  border-inline-start: 3px solid var(--eq-brand-secondary);
  background: var(--eq-surface);
  border-radius: 0 var(--eq-radius-md) var(--eq-radius-md) 0;
}

body.eq-px-v2 :where(.eq-template-trust, .eq-template-legal)
  :where(.eq-cmp, .eq-card, .eq-panel) {
  box-shadow: none;
}

/* -----------------------------------------------------------------
   Responsive contract: 320 / 768 / 1024 / 1440 and 48rem stack
----------------------------------------------------------------- */
@media (max-width: 64rem) {
  body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead) {
    position: sticky;
  }
}

@media (max-width: 48rem) {
  body.eq-px-v2 {
    font-size: 1.0625rem;
  }

  body.eq-px-v2 main h1 {
    font-size: 2rem;
  }

  body.eq-px-v2 main h2 {
    font-size: 1.625rem;
  }

  body.eq-px-v2 main h3 {
    font-size: 1.375rem;
  }

  body.eq-px-v2 :where(.eq-template-calculator, .eq-template-estimator)
    .eq-tool-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body.eq-px-v2 :where(.eq-template-calculator, .eq-template-estimator)
    .eq-tool-workspace > .eq-cmp-result {
    position: static;
  }

  body.eq-px-v2 .eq-cmp-tool,
  body.eq-px-v2 .eq-cmp-result {
    padding: var(--eq-space-6);
  }

  body.eq-px-v2 .eq-result-actions {
    flex-direction: column;
  }

  body.eq-px-v2 .eq-result-actions button {
    width: 100%;
  }
}

@media (max-width: 20rem) {
  body.eq-px-v2 .eq-cmp-tool,
  body.eq-px-v2 .eq-cmp-result,
  body.eq-px-v2 .eq-cmp-answer,
  body.eq-px-v2 .eq-cmp-limit {
    padding: var(--eq-space-4);
  }
}

/* Motion clarifies state; never delays primary result. */
@media (prefers-reduced-motion: reduce) {
  body.eq-px-v2 *,
  body.eq-px-v2 *::before,
  body.eq-px-v2 *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print: calculations, assumptions, sources and references remain useful. */
@media print {
  body.eq-px-v2 {
    background: var(--eq-surface);
    color: var(--eq-text);
    font-size: 12pt;
  }

  body.eq-px-v2 :where(.eq-site-header, header.site-header, #masthead,
    .eq-site-footer, footer.site-footer, #colophon,
    .eq-result-actions, .eq-no-print) {
    display: none !important;
  }

  body.eq-px-v2 :where(.eq-cmp-tool, .eq-cmp-result, .eq-cmp-data,
    .eq-cmp-source, .eq-cmp-example, .eq-cmp-limit) {
    break-inside: avoid;
    box-shadow: none !important;
  }

  body.eq-px-v2 .eq-table-scroll {
    overflow: visible;
    border-color: var(--eq-border);
  }
}


/* -----------------------------------------------------------------
   Production Search Launch DOM alignment — v2.1.0
   Grounded in the 36-page server capture from 2026-08-13.
   These rules target actual production markup directly; critical UX does not
   depend on JS-added component classes.
----------------------------------------------------------------- */

body.eq-px-v2 .eq-search-launch-content {
  max-width: var(--eq-current-content-width, var(--eq-content-wide));
  margin-inline: auto;
}

body.eq-px-v2 .eq-search-launch-content > :where(p, ul, ol, section) {
  margin-inline: 0;
}

/* Quick Answer / opening orientation */
body.eq-px-v2 .eq-search-lede {
  max-width: 72ch;
  margin: 0 0 var(--eq-space-8);
  padding: var(--eq-space-5) var(--eq-space-6);
  border-inline-start: 4px solid var(--eq-brand-secondary);
  border-radius: 0 var(--eq-radius-md) var(--eq-radius-md) 0;
  background: var(--eq-surface);
  box-shadow: var(--eq-shadow-sm);
  color: var(--eq-text);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* Section rhythm without turning every section into a card. */
body.eq-px-v2 .eq-search-launch-content > section {
  margin-top: var(--eq-space-10);
  padding-top: var(--eq-space-8);
  border-top: 1px solid var(--eq-border);
}

body.eq-px-v2 .eq-search-launch-content > section > h2:first-child {
  margin-top: 0;
}

/* Foundation and topic pages: the first decision map is a real object. */
body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
  .eq-search-launch-content > section:first-of-type {
  margin-top: var(--eq-space-8);
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}

body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
  .eq-search-launch-content > section:first-of-type > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--eq-space-6);
  margin: var(--eq-space-5) 0 0;
  padding: 0;
  list-style: none;
}

body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
  .eq-search-launch-content > section:first-of-type > ul > li {
  position: relative;
  padding: var(--eq-space-4) 0 var(--eq-space-4) var(--eq-space-6);
  border-bottom: 1px solid var(--eq-border);
}

body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
  .eq-search-launch-content > section:first-of-type > ul > li::before {
  content: "→";
  position: absolute;
  inset-inline-start: 0;
  color: var(--eq-accent-strong);
  font-weight: 700;
}

/* Guide decision snapshot. */
body.eq-px-v2.eq-template-guide
  .eq-search-launch-content > section:first-of-type {
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface);
}

body.eq-px-v2.eq-template-guide
  .eq-search-launch-content > section:first-of-type li {
  margin-block: var(--eq-space-3);
}

/* Reference: datasheet-like formula/relationship block. */
body.eq-px-v2.eq-template-reference
  .eq-search-launch-content > section:first-of-type {
  padding: var(--eq-space-6);
  border-inline-start: 3px solid var(--eq-brand-secondary);
  background: var(--eq-surface-alt);
}

body.eq-px-v2.eq-template-reference
  .eq-search-launch-content > section:first-of-type li {
  margin-block: var(--eq-space-3);
}

/* Trust/legal remain calm documentation, with less container noise. */
body.eq-px-v2 :where(.eq-template-trust,.eq-template-legal)
  .eq-search-launch-content > section:first-of-type {
  padding-top: var(--eq-space-6);
  border-top: 1px solid var(--eq-border);
  background: transparent;
}

/* Sources and evidence — documentation-like, never promotional. */
body.eq-px-v2 .eq-search-sources {
  padding: var(--eq-space-6) 0 0;
  border-top: 1px solid var(--eq-border);
  background: transparent;
}

body.eq-px-v2 .eq-search-sources ul {
  margin: var(--eq-space-4) 0;
  padding-inline-start: 1.25rem;
}

body.eq-px-v2 .eq-search-sources a {
  color: var(--eq-brand-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.eq-px-v2 .eq-search-sources .eq-search-note {
  max-width: 72ch;
  margin-top: var(--eq-space-4);
  color: var(--eq-text-secondary);
  font-size: var(--eq-text-sm);
}

/* Related Next Steps — real linked objects, restrained card treatment. */
body.eq-px-v2 .eq-search-related {
  padding-top: var(--eq-space-6);
  border-top: 1px solid var(--eq-border);
}

body.eq-px-v2 .eq-search-related ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--eq-space-3);
  margin: var(--eq-space-4) 0 0;
  padding: 0;
  list-style: none;
}

body.eq-px-v2 .eq-search-related li {
  margin: 0;
}

body.eq-px-v2 .eq-search-related a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: var(--eq-space-3) var(--eq-space-4);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-sm);
  background: var(--eq-surface);
  color: var(--eq-brand-primary);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

body.eq-px-v2 .eq-search-related a:hover {
  border-color: var(--eq-brand-secondary);
  background: var(--eq-surface-alt);
}

/* Review/freshness line */
body.eq-px-v2 .eq-search-reviewed {
  max-width: 72ch;
  margin-top: var(--eq-space-8);
  padding-top: var(--eq-space-4);
  border-top: 1px solid var(--eq-border);
  color: var(--eq-text-secondary);
  font-size: var(--eq-text-sm);
}

/* -----------------------------------------------------------------
   Calculator workspace — matches actual Search Launch form DOM.
----------------------------------------------------------------- */

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-tool {
  margin-top: var(--eq-space-8);
  padding: var(--eq-space-7);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-lg);
  background: var(--eq-surface);
  box-shadow: var(--eq-shadow-sm);
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-tool > h2 {
  margin-top: 0;
  margin-bottom: var(--eq-space-5);
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  form.eq-search-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .92fr);
  grid-template-areas:
    "fields result"
    "note   result"
    "button result"
    ".      actions";
  gap: var(--eq-space-4) var(--eq-space-6);
  align-items: start;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-field-grid {
  grid-area: fields;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--eq-space-4);
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-field-grid label {
  display: grid;
  gap: var(--eq-space-2);
  color: var(--eq-text);
  font-size: var(--eq-text-sm);
  font-weight: 600;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-field-grid :where(input,select,textarea) {
  width: 100%;
  min-height: 48px;
  padding: var(--eq-space-3) var(--eq-space-4);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-sm);
  background: var(--eq-surface);
  color: var(--eq-text);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-field-grid :where(input,select,textarea):focus {
  border-color: var(--eq-focus);
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  form.eq-search-calc > .eq-search-note {
  grid-area: note;
  margin: 0;
  color: var(--eq-text-secondary);
  font-size: var(--eq-text-sm);
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  form.eq-search-calc > button[type="submit"] {
  grid-area: button;
  justify-self: start;
  min-height: 48px;
  min-width: 9rem;
  padding: var(--eq-space-3) var(--eq-space-6);
  border: 1px solid var(--eq-brand-primary);
  border-radius: var(--eq-radius-sm);
  background: var(--eq-brand-primary);
  color: var(--eq-text-inverse);
  font-weight: 700;
  cursor: pointer;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-calc__result {
  grid-area: result;
  position: sticky;
  top: 6rem;
  min-height: 12rem;
  margin: 0;
  padding: var(--eq-space-6);
  border: 1px solid var(--eq-border);
  border-radius: var(--eq-radius-md);
  background: var(--eq-surface-alt);
  color: var(--eq-text);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-search-calc__result :where(strong,b) {
  color: var(--eq-brand-primary);
  font-size: clamp(2.375rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  form.eq-search-calc > .eq-result-actions {
  grid-area: actions;
  margin: 0;
}

body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
  .eq-result-actions button {
  min-height: 44px;
}

/* The assumption list immediately following the tool is supporting evidence,
   not a competing card. */
body.eq-px-v2.eq-template-calculator
  .eq-search-tool + ul {
  max-width: 72ch;
  margin-top: var(--eq-space-6);
  padding: var(--eq-space-5) var(--eq-space-6);
  border-inline-start: 2px solid var(--eq-border);
  color: var(--eq-text-secondary);
  background: transparent;
}

/* Ensure client-side component enhancement does not double-card the tool. */
body.eq-px-v2 .eq-search-tool.eq-cmp-tool {
  background: var(--eq-surface);
}
body.eq-px-v2 .eq-search-calc__result.eq-cmp-result {
  background: var(--eq-surface-alt);
}

/* Responsive alignment, including the required <=48rem stack. */
@media (max-width: 64rem) {
  body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
    form.eq-search-calc {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, .85fr);
  }
}

@media (max-width: 48rem) {
  body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
    .eq-search-launch-content > section:first-of-type > ul,
  body.eq-px-v2 .eq-search-related ul {
    grid-template-columns: 1fr;
  }

  body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
    .eq-search-tool {
    padding: var(--eq-space-5);
  }

  body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
    form.eq-search-calc {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "fields"
      "note"
      "button"
      "result"
      "actions";
  }

  body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
    .eq-search-field-grid {
    grid-template-columns: 1fr;
  }

  body.eq-px-v2 :where(.eq-template-calculator,.eq-template-estimator)
    .eq-search-calc__result {
    position: static;
    min-height: 9rem;
  }
}

@media (max-width: 20rem) {
  body.eq-px-v2 .eq-search-lede,
  body.eq-px-v2 :where(.eq-template-foundation,.eq-template-topic-hub)
    .eq-search-launch-content > section:first-of-type,
  body.eq-px-v2.eq-template-guide
    .eq-search-launch-content > section:first-of-type,
  body.eq-px-v2.eq-template-reference
    .eq-search-launch-content > section:first-of-type {
    padding: var(--eq-space-4);
  }
}

@media print {
  body.eq-px-v2 .eq-search-lede,
  body.eq-px-v2 .eq-search-tool,
  body.eq-px-v2 .eq-search-sources,
  body.eq-px-v2 .eq-search-related {
    box-shadow: none !important;
  }

  body.eq-px-v2 .eq-search-calc__result {
    position: static !important;
    min-height: 0;
  }
}
