.eh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body:has([data-experience-hub-v2]) {
  background: var(--ui-bg-page);
  color: var(--ui-text-primary);
  font-family: var(--ui-font-sans);
}

body:has([data-experience-hub-v2])::before { display: none; }
body:has([data-experience-hub-v2]) main { background: var(--ui-bg-page); }
body:has([data-experience-hub-v2]) .footer {
  border-color: var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
}
body:has([data-experience-hub-v2]) .footer-brand small { color: var(--ui-text-secondary); }
body:has([data-experience-hub-v2]) .footer-columns b { color: var(--ui-text-primary); }
body:has([data-experience-hub-v2]) .footer-grid .nav-link {
  background: var(--ui-bg-subtle);
  color: var(--ui-text-secondary);
}

.eh-skip {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ui-text-on-brand);
  background: var(--ui-brand);
  transform: translateY(-160%);
}

.eh-skip:focus { transform: translateY(0); }

.eh-page {
  width: min(100% - 48px, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 calc(72px + env(safe-area-inset-bottom));
  color: var(--ui-text-primary);
}

.eh-page *, .eh-page *::before, .eh-page *::after { box-sizing: border-box; }

.eh-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--ui-border);
}

.eh-header h1 {
  max-width: 780px;
  margin: 7px 0 9px;
  font-size: 3.4rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.eh-header p { max-width: 760px; margin: 0; color: var(--ui-text-secondary); line-height: 1.65; }
.eh-eyebrow { color: var(--ui-brand) !important; font-size: var(--ui-font-size-xs); font-weight: 750; text-transform: uppercase; }
.eh-header__actions { display: flex; gap: 10px; align-items: center; }

.eh-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  min-height: 52px;
  padding: 3px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  background: var(--ui-bg-subtle);
}

.eh-segmented button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--ui-text-secondary);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.eh-segmented button.is-active { color: var(--ui-text-primary); background: var(--ui-surface-elevated); }

.eh-route-nav {
  display: flex;
  overflow-x: auto;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ui-border);
}

.eh-route-nav a {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 15px 18px 11px;
  border-bottom: 3px solid transparent;
  color: var(--ui-text-secondary);
  font-weight: 700;
}

.eh-route-nav a.is-active { border-color: var(--ui-brand); color: var(--ui-brand); }

.eh-panel { padding: 28px 0 36px; border-bottom: 1px solid var(--ui-border); }
.eh-panel__head { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.eh-panel h2 { margin: 0; font-size: var(--ui-font-size-xl); letter-spacing: 0; }
.eh-panel h3 { letter-spacing: 0; }

.eh-state {
  display: grid;
  gap: 12px;
  min-height: 150px;
  align-content: center;
  padding: 24px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface-elevated);
}

.eh-state p { margin: 0; color: var(--ui-text-secondary); }
.eh-status { display: inline-flex; min-height: 28px; width: fit-content; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.75rem; font-weight: 750; }
.eh-status > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eh-status--positive { color: var(--ui-success); }
.eh-status--pending { color: var(--ui-warning); }
.eh-status--restricted { color: var(--ui-error); }
.eh-status--neutral, .eh-status--unknown { color: var(--ui-text-secondary); }

.eh-filter {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eh-filter label { display: grid; gap: 7px; min-width: min(100%, 260px); font-weight: 700; }
.eh-filter p { margin: 0; color: var(--ui-text-secondary); }
.eh-prediction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.eh-prediction-card, .eh-detail {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface-elevated);
}

.eh-card__head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.eh-card__head h3 { margin: 5px 0 0; font-size: var(--ui-font-size-lg); }
.eh-card__head small, .eh-source { color: var(--ui-text-secondary); }
.eh-source { overflow-wrap: anywhere; font-size: var(--ui-font-size-sm); }
.eh-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.eh-meta div { min-width: 0; padding: 10px 0; border-top: 1px solid var(--ui-border); }
.eh-meta dt, .eh-kv dt { color: var(--ui-text-muted); font-size: 0.75rem; }
.eh-meta dd, .eh-kv dd { margin: 5px 0 0; overflow-wrap: anywhere; }

.eh-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ui-border); border-radius: 6px; overflow: hidden; }
.eh-outcomes article { min-width: 0; padding: 12px; border-right: 1px solid var(--ui-border); }
.eh-outcomes article:last-child { border-right: 0; }
.eh-outcomes span, .eh-outcomes strong, .eh-outcomes small { display: block; overflow-wrap: anywhere; }
.eh-outcomes strong { margin: 4px 0; font-size: 1.2rem; }
.eh-outcomes small { color: var(--ui-text-muted); }

.eh-boundary { margin: 0; padding: 16px; border-left: 3px solid var(--ui-info); background: var(--ui-info-soft); line-height: 1.65; }
.eh-card-list, .eh-dataset, .eh-faq { display: grid; gap: 12px; }
.eh-dataset + .eh-dataset { margin-top: 24px; }
.eh-dataset h3 { margin: 0; font-size: var(--ui-font-size-md); }
.eh-card { border: 1px solid var(--ui-border); border-radius: 7px; background: var(--ui-surface-elevated); }
.eh-card summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; min-height: 58px; align-items: center; padding: 14px 16px; cursor: pointer; }
.eh-card summary > span:first-child { display: grid; gap: 4px; min-width: 0; }
.eh-card summary small { color: var(--ui-text-muted); }
.eh-card > p { padding: 0 16px; line-height: 1.65; }

.eh-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 8px 16px 16px; }
.eh-kv div { min-width: 0; padding: 12px; border-top: 1px solid var(--ui-border); }
.eh-copy-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ui-border); }
.eh-copy-block p { line-height: 1.7; }
.eh-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.eh-action-grid .action-form, .eh-action-grid .action-row, .eh-action-grid button { width: 100%; margin: 0; }
.eh-page .action-form :is(input, select, textarea) {
  min-height: 48px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text-primary);
}
.eh-page .action-form option {
  background: var(--ui-surface);
  color: var(--ui-text-primary);
}
.eh-save-state { color: var(--ui-text-secondary); }
.eh-faq details { border-bottom: 1px solid var(--ui-border); padding: 14px 0; }
.eh-faq summary { min-height: 44px; cursor: pointer; font-weight: 750; }

.eh-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
}
.eh-footer p { max-width: 760px; color: var(--ui-text-secondary); }
.eh-page :is(a, button, input, select, summary):focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }

@media (max-width: 980px) {
  .eh-page { width: min(100% - 32px, 760px); padding-top: 16px; }
  .eh-header { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .eh-header__actions { width: 100%; justify-content: space-between; }
  .eh-prediction-grid { grid-template-columns: 1fr; }
  .eh-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body:has([data-experience-hub-v2]) .brand,
  body:has([data-experience-hub-v2]) .nav-strip .nav-link,
  body:has([data-experience-hub-v2]) .top-actions > :is(a, button),
  body:has([data-experience-hub-v2]) .footer-grid .nav-link {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }
  .eh-page { width: calc(100% - 24px); padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .eh-header { padding-top: 16px; }
  .eh-header h1 { font-size: 2.15rem; }
  .eh-header__actions { display: grid; grid-template-columns: 1fr auto; }
  .eh-segmented { min-width: 0; }
  .eh-segmented button { min-width: 0; padding-inline: 7px; }
  .eh-route-nav a { min-height: 46px; padding-inline: 14px; }
  .eh-panel { padding: 22px 0 28px; }
  .eh-filter { display: grid; }
  .eh-card__head { display: grid; }
  .eh-meta, .eh-kv, .eh-outcomes, .eh-action-grid { grid-template-columns: 1fr; }
  .eh-outcomes article { border-right: 0; border-bottom: 1px solid var(--ui-border); }
  .eh-outcomes article:last-child { border-bottom: 0; }
  .eh-card summary { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .eh-card summary > :last-child { grid-column: 1 / -1; }
  .eh-footer { grid-template-columns: 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .eh-page *, .eh-page *::before, .eh-page *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
