/* Shared, static product navigation for the bounded Needle EU routes. */
:root {
  --product-space-1: .5rem;
  --product-space-2: .75rem;
  --product-space-3: 1rem;
  --product-space-4: 1.5rem;
  --product-space-5: 2.5rem;
  --product-radius-control: .2rem;
  --product-radius-surface: .3rem;
  --product-content: 72rem;
  --product-reading: 62ch;
  --shell-bg: #f4f6fa;
  --shell-surface: #fff;
  --shell-text: #152033;
  --shell-muted: #5d697c;
  --shell-border: #d8e0eb;
  --shell-link: #214ecf;
}

body.product-route {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--shell-bg);
  color: var(--shell-text);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.product-route > .skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  transform: translateY(-200%);
  padding: .65rem .8rem;
  border: 2px solid var(--shell-text);
  background: var(--shell-surface);
  color: var(--shell-text);
  font-weight: 750;
}
.product-route > .skip-link:focus { transform: none; }

.product-shell, .product-footer {
  box-sizing: border-box;
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
  color: var(--shell-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.product-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem 1.5rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--shell-border);
}

.product-shell__brand {
  color: var(--shell-text);
  font-weight: 850;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}

.product-shell__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.2rem;
  margin-left: auto;
  font-size: .9rem;
}

.product-shell a, .product-footer a { color: var(--shell-link); text-underline-offset: .16em; }
.product-shell__nav a { padding: .35rem 0; }
.product-shell__nav a[aria-current="page"] {
  color: var(--shell-text);
  font-weight: 750;
  text-decoration-thickness: .14em;
}

.product-shell a:focus-visible, .product-footer a:focus-visible {
  outline: .2rem solid #172554;
  outline-offset: .2rem;
}

.product-breadcrumb {
  width: min(72rem, calc(100% - 2rem));
  margin: .65rem auto 0;
  color: var(--shell-muted);
  font-size: .84rem;
}
.product-breadcrumb a { color: var(--shell-link); }

.detail-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--product-space-2);
  width: min(72rem, calc(100% - 2rem));
  margin: .45rem auto 0;
}

.product-return { display: inline-block; margin: .3rem 0 .8rem; font-weight: 700; }

.product-footer {
  padding: 1.4rem 0 2.5rem;
  border-top: 1px solid var(--shell-border);
  font-size: .86rem;
  color: var(--shell-muted);
}
.product-footer p { max-width: 75ch; margin: .3rem 0; }

.product-entry { width: min(72rem, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 5rem; }
.product-entry__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; font-weight: 800; color: var(--shell-muted); }
.product-entry h1 { max-width: 14ch; margin: .25rem 0 .8rem; font-size: clamp(2.35rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -.035em; }
.product-entry__lede { max-width: 58ch; font-size: 1.15rem; }
.product-entry__scope { max-width: 72ch; padding: 1rem 1.2rem; border-left: .25rem solid #0a669e; background: var(--shell-surface); }
.product-entry__paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.5rem 0; }
.product-entry__path { padding: 1.4rem; border: 1px solid var(--shell-border); background: var(--shell-surface); }
.product-entry__path h2 { margin: .15rem 0 .55rem; font-size: 1.45rem; line-height: 1.2; }
.product-entry__path p { max-width: 52ch; }
.product-entry__path a { font-weight: 750; }
.product-entry__limits { max-width: 72ch; border-top: 1px solid var(--shell-border); padding-top: 1.25rem; }

/* Product routes share a visual vocabulary; route-specific legal diagrams retain their own semantics. */
body.product-route main { width: min(var(--product-content), calc(100% - 2rem)); }
.product-route main h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.product-detail-label, .product-task-note { color: var(--shell-muted); font-size: .82rem; }
.product-task-note { max-width: var(--product-reading); margin: .5rem 0 0; }
.product-route main h2 { font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -.025em; }
.product-route main h3 { font-size: 1.25rem; line-height: 1.25; }
.product-route :is(.eyebrow, .section-kicker, .product-entry__eyebrow) {
  color: var(--shell-muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.product-route :is(.dek, .lede, .product-entry__lede) { max-width: var(--product-reading); font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.5; }
.product-route :is(.branch-card, .tool-shell, .act-context, .context-card, .product-entry__path, .source-baseline, .act-chip, .reg-card) {
  border-color: var(--shell-border);
  border-radius: var(--product-radius-surface);
  box-shadow: none;
}
.product-route :is(.core-card, .act-facts > div, .lineage-node, .dependency-chain li, .evidence-details, .coverage-note, .applicability-grid > div, .scope-details, .dependency-card, .dependency-node) { border-radius: var(--product-radius-surface); }
.product-route :is(.act-facts > div, .evidence-details, .applicability-grid > div, .scope-details) { border-color: var(--shell-border); }
.product-route :is(button, input, .quick-nav a, .primary-action, .source-grid a, .lookup-result) { border-radius: var(--product-radius-control); }
.product-route button { font: inherit; min-height: 2.5rem; }
.product-route button[aria-pressed="true"] { font-weight: 800; }
.product-route :is(a, button, input, select, summary):focus-visible {
  outline: .2rem solid var(--shell-link);
  outline-offset: .18rem;
}
.product-route .view-switch { border-radius: var(--product-radius-control); }
.product-route .view-switch button { border-radius: 0; }

/* One evidence/source/status contract is repeated at the top of every retained route. */
.product-evidence {
  max-width: var(--product-content);
  margin: var(--product-space-4) 0;
  padding: var(--product-space-3) var(--product-space-4);
  border: 1px solid var(--shell-border);
  border-left: .25rem solid #0a669e;
  border-radius: var(--product-radius-surface);
  background: var(--shell-surface);
  color: var(--shell-text);
}
.product-evidence h2 { margin: 0 0 var(--product-space-2); font-size: 1.1rem !important; letter-spacing: 0 !important; }
.product-evidence__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--product-space-2) var(--product-space-4); margin: 0; }
.product-evidence__facts div { min-width: 0; }
.product-evidence__facts dt { color: var(--shell-muted); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.product-evidence__facts dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.product-evidence a { color: var(--shell-link); }
.product-route :is(.warning, .boundary-note, .local-notice, .product-entry__scope) {
  border-radius: var(--product-radius-surface);
  border-color: var(--shell-border);
  background: var(--shell-surface);
}
.product-route :is(.prototype-strip, .freshness, .meta-line, .trust-strip, .context-strip) { border-radius: var(--product-radius-surface); }
.product-route .status-badge { border-radius: var(--product-radius-control); white-space: normal; }
.product-route .branch-badge { border-radius: var(--product-radius-control); }
.product-route .view-bar { align-items: flex-start; flex-wrap: wrap; }
.product-route .expert-entry { opacity: 1; }
.product-route .task-switcher { border-left: .2rem solid var(--shell-border); padding-left: var(--product-space-2); }
.product-route .task-switcher::before { content: "On this page"; flex-basis: 100%; color: var(--shell-muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.product-route .section-nav::before { content: "On this page"; flex-basis: 100%; color: var(--shell-muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }

@media (max-width: 38rem) {
  .product-evidence__facts { grid-template-columns: 1fr; }
  .product-evidence { padding: var(--product-space-3); }
}

@media (prefers-color-scheme: dark) {
  :root {
    --shell-bg: #0d121a;
    --shell-surface: #141c27;
    --shell-text: #f3f6fb;
    --shell-muted: #aeb9c9;
    --shell-border: #2d394a;
    --shell-link: #9db2ff;
  }
  body.product-route { color-scheme: dark; }
  .product-shell a:focus-visible, .product-footer a:focus-visible { outline-color: #fff; }
}

@media (max-width: 38rem) {
  .product-shell__nav { width: 100%; margin-left: 0; gap: .1rem 1rem; }
  .product-entry__paths { grid-template-columns: 1fr; }
  .product-entry { padding-top: 2rem; }
}
