/* BayesPharma Innovator · Scientific Capability Registry */
.capability-page {
  --registry-navy: #06172d;
  --registry-blue: #1978f2;
  --registry-violet: #7356ef;
  --registry-cyan: #14b8c8;
  --registry-green: #0f9f78;
  --registry-amber: #c47a10;
  --registry-red: #d34a62;
  min-height: 100vh;
}

.capability-topbar { top: 12px; }
.capability-nav-links { display: flex; align-items: center; gap: .15rem; }
.capability-nav-links > a,
.theme-toggle {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: .66rem .78rem;
  font-size: .8rem;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.capability-nav-links > a:hover,
.theme-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.theme-toggle { display: inline-flex; align-items: center; gap: .38rem; }
.theme-icon { font-size: 1rem; }

.capability-hero {
  position: relative;
  overflow: clip;
  padding: 7.2rem 0 5.2rem;
}
.capability-hero::before,
.capability-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}
.capability-hero::before {
  width: 34rem;
  height: 34rem;
  left: -14rem;
  top: -10rem;
  background: radial-gradient(circle, rgba(25,120,242,.17), transparent 68%);
}
.capability-hero::after {
  width: 36rem;
  height: 36rem;
  right: -14rem;
  top: -12rem;
  background: radial-gradient(circle, rgba(115,86,239,.17), transparent 67%);
}
.capability-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: clamp(2rem, 6vw, 5.6rem);
  align-items: center;
}
.capability-hero-copy { max-width: 810px; }
.eyebrow-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.registry-kicker,
.section-kicker,
.snapshot-label,
.drawer-kicker {
  display: inline-block;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, var(--good));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  padding: .3rem .65rem;
  font-size: .68rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(17, 51, 92, .06);
}
.live-pill.is-live { border-color: color-mix(in srgb, var(--good) 46%, var(--line)); color: var(--good); }
.live-pill.is-error { border-color: color-mix(in srgb, var(--danger) 46%, var(--line)); color: var(--danger); }
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--soft) 12%, transparent);
}
.live-pill.is-live .live-dot { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 15%, transparent); animation: registryPulse 2.3s ease-in-out infinite; }
.live-pill.is-error .live-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
@keyframes registryPulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--good) 0%, transparent); } }
.capability-hero h1 {
  max-width: 880px;
  margin: 0 0 1.15rem;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 920;
  text-wrap: balance;
}
.hero-lede {
  max-width: 760px;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.7;
}
.hero-trust-line {
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 760px;
  color: var(--muted);
  font-size: .83rem;
}
.hero-trust-line strong { color: var(--ink); }
.trust-divider { width: 1px; height: 24px; background: var(--line-strong); flex: 0 0 1px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.primary-action,
.secondary-action,
.icon-action,
.error-state button,
.empty-state button,
.drawer-foot a,
.drawer-foot button,
.cta-links a {
  min-height: 44px;
  border-radius: 13px;
  padding: .72rem 1rem;
  font-size: .8rem;
  font-weight: 850;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.primary-action {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  box-shadow: 0 15px 30px rgba(25, 120, 242, .22);
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(25,120,242,.28); }
.secondary-action,
.icon-action,
.error-state button,
.empty-state button,
.drawer-foot button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.secondary-action:hover,
.icon-action:hover,
.error-state button:hover,
.empty-state button:hover,
.drawer-foot button:hover { border-color: var(--line-strong); background: var(--surface-soft); }

.registry-snapshot {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 96% 8%, rgba(80, 207, 242, .14), transparent 12rem),
    linear-gradient(145deg, #07192f, #0d2546 54%, #102c52);
  color: #eef6ff;
  padding: 1.35rem;
  box-shadow: 0 30px 70px rgba(5, 27, 58, .28);
}
.registry-snapshot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.snapshot-head,
.snapshot-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.snapshot-label { color: #69d4f4; margin-bottom: .2rem; }
.snapshot-head strong { display: block; font-size: .92rem; }
.pulse-orbit {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(105,212,244,.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.pulse-orbit::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(105,212,244,.16); border-radius: 50%; }
.pulse-orbit i { width: 8px; height: 8px; border-radius: 50%; background: #5ed4b0; box-shadow: 0 0 20px rgba(94,212,176,.8); }
.snapshot-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
  margin: 1.25rem 0;
}
.snapshot-grid > div { border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(255,255,255,.055); padding: .9rem; }
.snapshot-grid dt { color: #9fb3ce; font-size: .67rem; font-weight: 750; }
.snapshot-grid dd { margin: .12rem 0 0; font-size: 1.65rem; font-weight: 900; letter-spacing: -.04em; }
.snapshot-foot { border-top: 1px solid rgba(255,255,255,.09); padding-top: 1rem; color: #9fb3ce; font-size: .68rem; }
.snapshot-foot time { color: #dcecff; font-weight: 800; }

.registry-principles { padding-bottom: 5rem; }
.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.principle-grid article { display: flex; gap: .75rem; min-height: 132px; padding: 1.15rem; border-right: 1px solid var(--line); }
.principle-grid article:last-child { border-right: 0; }
.principle-number { color: var(--blue); font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
.principle-grid strong { display: block; margin-bottom: .35rem; font-size: .84rem; line-height: 1.3; }
.principle-grid p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }

.registry-section { padding-bottom: 6.4rem; }
.registry-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.35rem; }
.registry-heading h2,
.status-explainer h2,
.registry-cta h2 { margin: .25rem 0 .55rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: -.045em; }
.registry-heading p { max-width: 720px; margin: 0; color: var(--muted); }
.registry-heading-actions { display: flex; gap: .55rem; flex: 0 0 auto; }
.icon-action { display: inline-flex; align-items: center; gap: .42rem; }
.icon-action:disabled { cursor: not-allowed; opacity: .5; }
.refresh-glyph { display: inline-block; }
.icon-action.is-refreshing .refresh-glyph { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.registry-toolbar {
  position: sticky;
  top: 94px;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(145px, auto) minmax(145px, auto);
  gap: .65rem;
  align-items: stretch;
  padding: .72rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 12px 30px rgba(14, 46, 86, .09);
}
.registry-search { position: relative; min-width: 0; }
.registry-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 0 2.7rem 0 2.45rem;
  outline: none;
  font-size: .82rem;
  font-weight: 700;
}
.registry-search input:focus { border-color: color-mix(in srgb, var(--blue) 54%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 10%, transparent); background: var(--surface); }
.registry-search input::placeholder { color: var(--soft); font-weight: 600; }
.search-mark { position: absolute; left: .82rem; top: 50%; transform: translateY(-54%); color: var(--muted); font-size: 1.25rem; pointer-events: none; }
.search-shortcut { position: absolute; right: .72rem; top: 50%; transform: translateY(-50%); min-width: 24px; border: 1px solid var(--line); border-bottom-color: var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--soft); padding: .1rem .3rem; text-align: center; font-size: .66rem; font-family: inherit; }
.layer-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.layer-switch button { border: 0; border-radius: 10px; background: transparent; color: var(--muted); padding: .48rem .64rem; font-size: .72rem; font-weight: 820; white-space: nowrap; }
.layer-switch button span { display: inline-grid; min-width: 20px; margin-left: .28rem; place-items: center; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); padding: .08rem .28rem; font-size: .61rem; }
.layer-switch button.active { background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px rgba(19, 49, 83, .09); }
.select-control { display: flex; flex-direction: column; gap: .15rem; min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: .3rem .65rem; }
.select-control span { color: var(--soft); font-size: .55rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.select-control select { min-width: 0; border: 0; outline: 0; background: transparent; font-size: .7rem; font-weight: 800; }

.category-strip {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: .8rem .05rem .35rem;
  scroll-snap-type: x proximity;
}
.category-strip button { flex: 0 0 auto; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); padding: .48rem .72rem; font-size: .68rem; font-weight: 800; }
.category-strip button:hover { border-color: var(--line-strong); color: var(--ink); }
.category-strip button.active { border-color: color-mix(in srgb, var(--blue) 46%, var(--line)); background: color-mix(in srgb, var(--blue) 9%, var(--surface)); color: var(--blue); }
.category-strip button small { margin-left: .25rem; opacity: .74; font-size: .58rem; }
.results-meta { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); padding: .45rem .2rem; font-size: .7rem; font-weight: 720; }
.results-meta button { border: 0; background: none; color: var(--blue); font-size: inherit; font-weight: 850; }

.registry-shell { position: relative; min-height: 280px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.loading-state,
.error-state,
.empty-state { min-height: 300px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 2rem; }
.loading-state strong,
.error-state strong,
.empty-state strong { margin-top: .85rem; font-size: 1rem; }
.loading-state span,
.error-state p,
.empty-state span { max-width: 560px; margin: .35rem 0 0; color: var(--muted); font-size: .76rem; }
.loading-bars { display: flex; gap: 5px; align-items: end; height: 32px; }
.loading-bars i { width: 5px; border-radius: 99px; background: linear-gradient(var(--blue), var(--violet)); animation: meter 1s ease-in-out infinite alternate; }
.loading-bars i:nth-child(1) { height: 14px; }
.loading-bars i:nth-child(2) { height: 28px; animation-delay: .15s; }
.loading-bars i:nth-child(3) { height: 20px; animation-delay: .3s; }
@keyframes meter { to { height: 30px; opacity: .55; } }
.error-state { flex-direction: row; text-align: left; gap: 1rem; }
.error-state button { margin-left: .5rem; }
.error-mark { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border-radius: 14px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); font-weight: 950; }
.empty-state button { margin-top: 1rem; }

.registry-table-wrap { overflow-x: auto; }
.registry-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.registry-table th { position: sticky; top: 0; z-index: 3; background: var(--surface-soft); color: var(--soft); padding: .8rem .75rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .57rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.registry-table th:nth-child(1) { width: 17%; }
.registry-table th:nth-child(2) { width: 18%; }
.registry-table th:nth-child(3) { width: 13%; }
.registry-table th:nth-child(4) { width: 15%; }
.registry-table th:nth-child(5) { width: 32%; }
.registry-table th:nth-child(6) { width: 5%; }
.registry-table td { padding: .92rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .73rem; }
.registry-table tbody tr { transition: background .16s ease; }
.registry-table tbody tr:last-child td { border-bottom: 0; }
.registry-table tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 74%, transparent); }
.capability-name { display: block; color: var(--ink); font-size: .78rem; font-weight: 860; line-height: 1.32; }
.capability-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.meta-chip { display: inline-flex; align-items: center; max-width: 100%; border-radius: 999px; background: var(--surface-soft); color: var(--muted); padding: .18rem .42rem; font-size: .57rem; font-weight: 780; line-height: 1.3; }
.meta-chip.layer-tech { background: color-mix(in srgb, var(--violet) 10%, var(--surface)); color: var(--violet); }
.meta-chip.layer-workspace { background: color-mix(in srgb, var(--cyan) 10%, var(--surface)); color: var(--cyan); }
.implementation-name { display: block; color: var(--ink); font-weight: 800; line-height: 1.35; }
.implementation-version { display: block; margin-top: .28rem; color: var(--muted); font-size: .62rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-word; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .3rem .5rem;
  font-size: .59rem;
  font-weight: 850;
  line-height: 1.25;
  text-transform: capitalize;
  word-break: break-word;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.status-badge.status-live,
.status-badge.status-integrated,
.status-badge.status-catalogued { background: color-mix(in srgb, var(--good) 9%, var(--surface)); border-color: color-mix(in srgb, var(--good) 22%, var(--line)); color: var(--good); }
.status-badge.status-live::before,
.status-badge.status-integrated::before,
.status-badge.status-catalogued::before { background: var(--good); }
.status-badge.status-configured,
.status-badge.status-declared { background: color-mix(in srgb, var(--blue) 8%, var(--surface)); border-color: color-mix(in srgb, var(--blue) 20%, var(--line)); color: var(--blue); }
.status-badge.status-configured::before,
.status-badge.status-declared::before { background: var(--blue); }
.status-badge.status-degraded,
.status-badge.status-not-configured,
.status-badge.status-unavailable { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 20%, var(--line)); color: var(--danger); }
.status-badge.status-degraded::before,
.status-badge.status-not-configured::before,
.status-badge.status-unavailable::before { background: var(--danger); }
.scientific-badge { display: inline-flex; max-width: 100%; border-radius: 10px; background: color-mix(in srgb, var(--violet) 8%, var(--surface)); color: color-mix(in srgb, var(--violet) 84%, var(--ink)); padding: .34rem .45rem; font-size: .58rem; font-weight: 780; line-height: 1.35; text-transform: none; word-break: break-word; }
.scientific-badge.requires-qualification { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--warn); }
.capability-description { color: var(--muted); line-height: 1.52; }
.details-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 1rem; }
.details-button:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); background: color-mix(in srgb, var(--blue) 6%, var(--surface)); }

.status-explainer {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  padding-bottom: 6.5rem;
}
.status-explainer-copy p { color: var(--muted); max-width: 600px; }
.status-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.status-legend > div { min-height: 138px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 1rem; box-shadow: var(--shadow-soft); }
.status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; margin-bottom: .7rem; }
.status-dot.live { background: var(--good); box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 12%, transparent); }
.status-dot.configured { background: var(--blue); box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 10%, transparent); }
.status-dot.qualification { background: var(--warn); box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 11%, transparent); }
.status-dot.unavailable { background: var(--danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 10%, transparent); }
.status-legend strong { display: block; font-size: .8rem; }
.status-legend small { display: block; margin-top: .38rem; color: var(--muted); font-size: .68rem; line-height: 1.5; }

.registry-cta { padding: 0 0 6rem; }
.registry-cta-inner { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; border-radius: 30px; background: linear-gradient(145deg, #06172d, #0c2a51 60%, #183e71); color: #eef6ff; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: 0 30px 70px rgba(6, 23, 45, .24); }
.registry-cta-inner::after { content: ""; position: absolute; width: 25rem; height: 25rem; right: -8rem; top: -14rem; border-radius: 50%; background: radial-gradient(circle, rgba(65,205,235,.17), transparent 68%); }
.registry-cta .section-kicker { color: #6bd5f3; }
.registry-cta h2 { max-width: 700px; }
.registry-cta p { max-width: 720px; margin: 0; color: #b8cae0; }
.cta-links { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .55rem; min-width: 190px; }
.cta-links a { display: flex; justify-content: center; align-items: center; background: #fff; color: #07172d; }
.cta-links a.subtle { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #eaf5ff; }

.capability-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 75%, transparent); padding: 2rem 0; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .65rem; }
.footer-brand img { width: 34px; height: 34px; border-radius: 10px; background: #fff; object-fit: contain; }
.footer-brand strong { display: block; font-size: .76rem; }
.footer-brand small { display: block; color: var(--muted); font-size: .58rem; }
.footer-inner p { max-width: 760px; margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.55; }
.footer-inner > a { color: var(--blue); font-size: .67rem; font-weight: 820; }

.capability-drawer-backdrop { position: fixed; inset: 0; z-index: 180; background: rgba(3, 12, 25, .48); backdrop-filter: blur(5px); }
.capability-drawer {
  position: fixed;
  z-index: 190;
  top: 0;
  right: 0;
  width: min(510px, 100vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -28px 0 70px rgba(3, 20, 43, .25);
  animation: drawerIn .22s ease-out;
}
.capability-drawer[hidden],
.capability-drawer-backdrop[hidden] { display: none; }
@keyframes drawerIn { from { transform: translateX(24px); opacity: .5; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.35rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: .2rem 0 0; font-size: 1.55rem; line-height: 1.12; letter-spacing: -.035em; }
.drawer-close { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); font-size: 1.45rem; line-height: 1; }
.drawer-body { overflow-y: auto; padding: 1.35rem; }
.drawer-implementation { margin: 0 0 1rem; color: var(--muted); font-size: .78rem; }
.drawer-implementation strong { color: var(--ink); }
.drawer-description { margin-bottom: 1.25rem; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.drawer-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1.2rem; }
.drawer-status-grid > div { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); padding: .85rem; }
.drawer-status-grid span { display: block; margin-bottom: .25rem; color: var(--soft); font-size: .55rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.drawer-status-grid strong { display: block; font-size: .72rem; line-height: 1.35; word-break: break-word; }
.drawer-detail-list { margin: 0; }
.drawer-detail-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.drawer-detail-list dt { color: var(--soft); font-size: .63rem; font-weight: 800; }
.drawer-detail-list dd { margin: 0; color: var(--ink); font-size: .68rem; font-weight: 720; word-break: break-word; }
.drawer-boundary { margin-top: 1.1rem; border: 1px solid color-mix(in srgb, var(--warn) 24%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--warn) 7%, var(--surface)); padding: .9rem; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.drawer-boundary strong { color: var(--warn); }
.drawer-foot { display: flex; gap: .55rem; padding: 1rem 1.35rem; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.drawer-foot a { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; flex: 1; background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; }
.drawer-foot button { flex: 1; }
.noscript-note { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 250; border-radius: 14px; background: #761c32; color: #fff; padding: .9rem; text-align: center; font-weight: 760; }

html[data-theme="dark"] .registry-snapshot { border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .registry-toolbar { box-shadow: 0 14px 38px rgba(0,0,0,.26); }
html[data-theme="dark"] .registry-table th { background: #10243d; }
html[data-theme="dark"] .primary-action { box-shadow: 0 15px 35px rgba(46,123,250,.2); }

@media (max-width: 1120px) {
  .capability-hero-grid { grid-template-columns: 1fr; }
  .registry-snapshot { max-width: 620px; }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid article:nth-child(2) { border-right: 0; }
  .principle-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .registry-toolbar { grid-template-columns: 1fr 1fr; }
  .registry-search { grid-column: 1 / -1; }
  .layer-switch { justify-content: center; }
  .select-control { min-width: 0; }
  .registry-table { min-width: 1050px; }
}

@media (max-width: 820px) {
  .capability-nav-links > a { display: none; }
  .theme-label { display: none; }
  .capability-hero { padding-top: 5.8rem; }
  .hero-trust-line { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .trust-divider { display: none; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .principle-grid article:last-child { border-bottom: 0; }
  .registry-heading { align-items: flex-start; flex-direction: column; }
  .registry-heading-actions { width: 100%; }
  .registry-heading-actions .icon-action { flex: 1; justify-content: center; }
  .registry-toolbar { top: 84px; grid-template-columns: 1fr; }
  .registry-search { grid-column: auto; }
  .layer-switch { width: 100%; overflow-x: auto; justify-content: stretch; }
  .layer-switch button { flex: 1; }
  .status-explainer { grid-template-columns: 1fr; }
  .registry-cta-inner { grid-template-columns: 1fr; align-items: start; }
  .cta-links { flex-direction: row; min-width: 0; }
  .cta-links a { flex: 1; }
  .footer-inner { grid-template-columns: 1fr; gap: 1rem; align-items: start; }

  /* Mobile registry is presented as readable cards while preserving the table semantics in the DOM. */
  .registry-table-wrap { overflow: visible; }
  .registry-table,
  .registry-table tbody,
  .registry-table tr,
  .registry-table td { display: block; width: 100%; }
  .registry-table { min-width: 0; }
  .registry-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .registry-table tbody { display: grid; gap: .7rem; padding: .7rem; }
  .registry-table tbody tr { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
  .registry-table tbody tr:hover { background: var(--surface); }
  .registry-table td { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: .65rem; padding: .68rem .8rem; border-bottom: 1px solid var(--line); }
  .registry-table td::before { content: attr(data-label); color: var(--soft); font-size: .55rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
  .registry-table td:last-child { display: flex; justify-content: flex-end; border-bottom: 0; }
  .registry-table td:last-child::before { display: none; }
  .details-button { width: auto; height: 36px; padding: 0 .8rem; }
  .details-button::after { content: "Details"; margin-left: .32rem; font-size: .65rem; font-weight: 800; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, var(--max)); }
  .topbar { width: calc(100% - 18px); }
  .brand small { display: none; }
  .brand img { width: 38px; height: 38px; flex-basis: 38px; }
  .brand { font-size: .8rem; gap: .5rem; }
  .capability-hero h1 { font-size: clamp(2.8rem, 16vw, 4.5rem); }
  .snapshot-grid { grid-template-columns: 1fr 1fr; }
  .registry-toolbar { margin-inline: -.15rem; }
  .layer-switch button { padding-inline: .45rem; font-size: .66rem; }
  .status-legend { grid-template-columns: 1fr; }
  .cta-links { flex-direction: column; }
  .capability-drawer { width: 100vw; }
  .drawer-status-grid { grid-template-columns: 1fr; }
  .drawer-detail-list > div { grid-template-columns: 1fr; gap: .22rem; }
  .drawer-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
