/* Static, offline stylesheet for the Web Competence Registry.
   No external fonts, no imported resources, no tracking pixels.
   Dark evidence-ledger theme; every accent colour is decorative only, the
   semantic state is always carried by text as well. */

:root {
  --bg-base: #0b0f16;
  --bg-surface: #121721;
  --bg-elevated: #1a202c;
  --bg-glass: rgba(13, 18, 26, 0.86);
  --border-subtle: #2a3342;
  --border-strong: #3b4657;
  --border-focus: #38bdf8;

  --text-primary: #f2f5f9;
  --text-secondary: #c2cbd7;
  --text-muted: #97a2b2;

  --accent-emerald: #34d399;
  --accent-cyan: #38bdf8;
  --accent-amber: #fbbf24;

  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.14);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.14);
  --plan: #a5b4fc;
  --plan-bg: rgba(165, 180, 252, 0.14);
  --open: #fcd34d;
  --open-bg: rgba(252, 211, 77, 0.14);
  --synthetic: #d8b4fe;
  --synthetic-bg: rgba(216, 180, 254, 0.14);

  --radius-lg: 14px;
  --radius-md: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -12px rgba(0, 0, 0, 0.7);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  --max-width: 1440px;
  --dock-height: 4.5rem;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --bg-base: oklch(13% 0.015 255);
    --bg-surface: oklch(17% 0.02 255);
    --bg-elevated: oklch(22% 0.025 255);
    --bg-glass: oklch(14% 0.02 255 / 0.86);
    --border-subtle: oklch(29% 0.025 255);
    --border-strong: oklch(38% 0.03 255);
    --text-primary: oklch(97% 0.008 255);
    --text-secondary: oklch(82% 0.015 255);
    --text-muted: oklch(68% 0.02 255);
    --accent-emerald: oklch(78% 0.17 160);
    --accent-cyan: oklch(78% 0.13 215);
    --accent-amber: oklch(82% 0.15 80);
    --ok: oklch(78% 0.17 160);
    --warn: oklch(82% 0.15 80);
    --bad: oklch(72% 0.17 25);
    --plan: oklch(76% 0.11 280);
    --open: oklch(84% 0.14 90);
    --synthetic: oklch(76% 0.12 310);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-base);
  color: var(--text-primary);
  padding-bottom: var(--dock-height);
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
}

a { color: var(--accent-cyan); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text-primary); }

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

code, pre, kbd { font-family: var(--font-mono); }
/* Long identifiers, hashes and timestamps must never widen the viewport:
   wrapping only kicks in when a token cannot fit its container. */
p, li, dd, dt, td, th, figcaption, .tile-value { overflow-wrap: anywhere; }
code {
  font-size: 0.9em;
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
pre code { background: transparent; padding: 0; color: inherit; overflow-wrap: normal; }
kbd {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
}

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link --------------------------------------------------------------- */
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 999;
  background: var(--accent-emerald); color: #04120c;
  padding: 0.6rem 1rem; font-weight: 700; border-radius: var(--radius-md);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #04120c; }

/* Telemetry bar ----------------------------------------------------------- */
.telemetry-bar {
  background: rgba(16, 32, 26, 0.65);
  border-bottom: 1px solid rgba(52, 211, 153, 0.28);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.45rem 1.25rem;
  color: var(--text-secondary);
}
.telemetry-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1.25rem;
}
.telemetry-inner strong { color: var(--text-primary); }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--accent-emerald); font-weight: 600;
}
.status-pill.is-warn { color: var(--warn); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 10px currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-primary); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  color: #04120c; font-family: var(--font-mono); font-weight: 800;
  display: grid; place-items: center; font-size: 0.95rem; flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 700; font-size: 0.95rem; }
.brand-sub { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }

.site-nav { display: none; align-items: center; gap: 0.15rem; margin-left: auto; }
.site-nav a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.86rem;
  padding: 0.45rem 0.7rem; border-radius: var(--radius-md);
}
.site-nav a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.site-nav a[aria-current="page"] {
  color: var(--text-primary); background: var(--bg-elevated);
  box-shadow: inset 0 -2px 0 var(--accent-emerald);
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.cmd-trigger {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); padding: 0.42rem 0.7rem;
  border-radius: var(--radius-md); font-size: 0.8rem;
  font-family: var(--font-mono); cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.cmd-trigger:hover { border-color: var(--accent-cyan); color: var(--text-primary); }

.nav-toggle {
  display: none; padding: 0.45rem 0.8rem; border: 1px solid var(--border-subtle);
  background: var(--bg-elevated); color: var(--text-primary);
  border-radius: var(--radius-md); font: inherit; font-size: 0.85rem; cursor: pointer;
}

@media (min-width: 960px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 959px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .site-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    margin: 0.4rem 0 0.2rem; order: 10;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.65rem 0.8rem; }
  .header-actions { order: 5; }
}

/* Provenance strip -------------------------------------------------------- */
.provenance {
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem; color: var(--text-muted);
}
.provenance-inner { padding: 0.45rem 1.25rem; }
.provenance strong { color: var(--text-secondary); }

/* Layout ------------------------------------------------------------------ */
main { padding: 2rem 1.25rem 4rem; max-width: var(--max-width); margin: 0 auto; }
.section { margin: 2.5rem 0; }
.section-head { margin-bottom: 1rem; }
.section-head p { margin: 0.25rem 0 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.86rem; }

.hero { margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.3rem 0.7rem; border-radius: 999px; margin: 0 0 1rem;
}
h1 {
  font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.1;
  letter-spacing: -0.025em; font-weight: 800; margin: 0 0 1rem;
}
h2 { font-size: 1.28rem; margin: 0 0 0.6rem; line-height: 1.3; }
h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.lead { font-size: 1.05rem; color: var(--text-secondary); max-width: 72ch; margin: 0 0 1.25rem; }

.page-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem; align-items: start; margin-bottom: 2rem;
}
.page-head-main { min-width: 0; }
.page-head-aside { min-width: 0; }
.breadcrumb { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { text-decoration: none; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin: 2rem 0; }
.split-col { min-width: 0; }
.split-col > * { max-width: 100%; }
.definition-list dd, .case-meta span, .case-limits li { overflow-wrap: anywhere; }

.panel {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; margin: 1.6rem 0;
  box-shadow: var(--shadow);
}
.panel-gate { border-left: 3px solid var(--accent-emerald); }

.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.link-card {
  display: flex; flex-direction: column; gap: 0.4rem;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.15rem;
  text-decoration: none; color: var(--text-primary); box-shadow: var(--shadow);
}
.link-card:hover { border-color: var(--accent-emerald); color: var(--text-primary); }
.link-card-title { font-weight: 700; }
.link-card-text { color: var(--text-muted); font-size: 0.9rem; }

/* Hero + KPI -------------------------------------------------------------- */
.hero-section {
  position: relative; max-width: var(--max-width); margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
@media (min-width: 1024px) {
  .hero-section { grid-template-columns: 1.15fr 0.85fr; padding: 3rem 1.25rem 2.5rem; }
}
.hero-content { position: relative; z-index: 2; min-width: 0; }
.hero-title span {
  background: linear-gradient(95deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { color: var(--text-secondary); font-size: 1rem; max-width: 66ch; margin: 0 0 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.5rem; }
.hero-cta .btn, .header-actions .btn { flex: 0 0 auto; }
.header-actions .cta-pilot { padding: 0.42rem 0.8rem; font-size: 0.8rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 0.85rem;
}
.kpi-label {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.kpi-value {
  font-family: var(--font-mono); font-size: 1.4rem; font-weight: 800;
  color: var(--text-primary); margin-top: 0.15rem; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-card[data-highlight="true"] .kpi-value { color: var(--accent-emerald); }
.kpi-card[data-alert="true"] .kpi-value { color: var(--warn); }
.kpi-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Canvas stage ------------------------------------------------------------ */
.canvas-stage {
  position: relative; height: 300px; width: 100%;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.14), transparent 72%);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
@media (min-width: 1024px) { .canvas-stage { height: 420px; } }
/* The canvas is only shown once a WebGL renderer is actually running, so the
   static chain strip is also the no-JS fallback. */
#evidence-canvas { display: none; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#evidence-canvas.is-active { display: block; }
#evidence-canvas:active { cursor: grabbing; }
.canvas-hud {
  position: absolute; bottom: 0.75rem; left: 0.75rem; right: 0.75rem;
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  pointer-events: none;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary);
  background: rgba(10, 14, 20, 0.82); padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md); border: 1px solid var(--border-subtle);
}
.canvas-hud span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-state { color: var(--accent-emerald); flex: 0 0 auto; }
.hud-state.is-warn { color: var(--warn); }

/* Static fallback for missing WebGL or disabled JS */
.graph-fallback { display: block; padding: 1rem; height: 100%; overflow: auto; }
.graph-fallback[hidden] { display: none; }
.graph-fallback p { font-size: 0.8rem; color: var(--text-secondary); margin: 0 0 0.75rem; }
.chain-strip { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 0.9rem; }
.chain-strip span {
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent-emerald); opacity: 0.85;
}
.chain-strip span[data-superseded="true"] { background: var(--text-muted); opacity: 0.4; }
.chain-legend { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* Catalog toolbar --------------------------------------------------------- */
.catalog-section { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem 2rem; }
.catalog-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.catalog-toolbar h2 { font-size: 1.35rem; margin: 0; }
.catalog-toolbar p { font-size: 0.86rem; color: var(--text-muted); margin: 0.3rem 0 0; }
.filter-input-wrap {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  flex: 1; max-width: 640px;
}
.search-input {
  flex: 1; min-width: 220px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  color: var(--text-primary); padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md); font-size: 0.9rem;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent-emerald); }

.view-toggle {
  display: inline-flex; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 0.2rem;
}
.view-toggle button {
  background: transparent; border: none; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.76rem;
  padding: 0.35rem 0.7rem; border-radius: 6px; cursor: pointer;
}
.view-toggle button[aria-pressed="true"] {
  background: var(--bg-elevated); color: var(--accent-emerald); font-weight: 600;
}
.filter-status {
  flex-basis: 100%; margin: 0; font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Product grid + container queries ---------------------------------------- */
.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 1.25rem;
}
.catalog-grid[data-layout="wide"] { grid-template-columns: 1fr; }
.card-container { container-type: inline-size; container-name: product-card; min-width: 0; }

.product-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.3rem;
  display: grid; gap: 1.1rem; position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover,
.product-card:focus-within { border-color: rgba(52, 211, 153, 0.55); box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.8); }

.card-meta-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem; font-family: var(--font-mono); font-size: 0.74rem;
}
.product-id { color: var(--accent-cyan); overflow-wrap: anywhere; }
.badge-group { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.badge-validated {
  background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 0.1rem 0.45rem; border-radius: 4px; font-weight: 700;
}
.badge-claims { background: var(--bg-elevated); color: var(--text-secondary); padding: 0.1rem 0.45rem; border-radius: 4px; }
.badge-variant { background: var(--synthetic-bg); color: var(--synthetic); padding: 0.1rem 0.45rem; border-radius: 4px; }

.product-title { font-size: 1.2rem; font-weight: 700; margin: 0.3rem 0 0; color: var(--text-primary); }
.product-summary {
  color: var(--text-secondary); font-size: 0.9rem; margin: 0.45rem 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Accordions -------------------------------------------------------------- */
.disclosure-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; min-width: 0; }
.card-main { min-width: 0; }
.claim-text, .scope-item, .product-title, .product-summary { overflow-wrap: anywhere; }
details.tech-accordion {
  background: var(--bg-base); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); overflow: hidden;
}
details.tech-accordion summary {
  padding: 0.6rem 0.85rem; font-family: var(--font-mono); font-size: 0.77rem;
  font-weight: 600; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  color: var(--text-secondary); user-select: none;
}
details.tech-accordion summary::-webkit-details-marker { display: none; }
details.tech-accordion summary::after { content: "+"; font-size: 1rem; color: var(--accent-cyan); flex: 0 0 auto; }
details.tech-accordion[open] summary {
  border-bottom: 1px solid var(--border-subtle); color: var(--text-primary);
  background: var(--bg-elevated);
}
details.tech-accordion[open] summary::after { content: "\2212"; }
.accordion-body {
  padding: 0.85rem; font-size: 0.84rem; color: var(--text-secondary);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem;
  min-width: 0;
}
.claim-item { padding-left: 0.75rem; border-left: 2px solid var(--accent-emerald); }
.scope-item { padding-left: 0.75rem; border-left: 2px solid var(--border-strong); margin: 0; }
.accordion-body .claim {
  background: transparent; border: 0; border-left: 2px solid var(--accent-emerald);
  border-radius: 0; padding: 0 0 0 0.75rem; margin: 0;
}
.accordion-body .claim:last-child { padding-bottom: 0; }
.accordion-body .claim-text { font-size: 0.84rem; margin: 0 0 0.45rem; }

/* Crypto chip + popover --------------------------------------------------- */
.crypto-chip {
  margin-top: 0.3rem; display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  background: var(--bg-elevated); color: var(--accent-cyan);
  border: 1px solid var(--border-subtle); padding: 0.2rem 0.55rem;
  border-radius: 4px; cursor: pointer;
}
.crypto-chip:hover { border-color: var(--accent-cyan); background: rgba(56, 189, 248, 0.12); }
.evidence-popover {
  margin: auto; width: min(92vw, 540px);
  background: var(--bg-surface); backdrop-filter: blur(20px);
  color: var(--text-primary); border: 1px solid var(--accent-emerald);
  border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}
.evidence-popover::backdrop { background: rgba(3, 6, 10, 0.7); backdrop-filter: blur(4px); }
.popover-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: 0.85rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-emerald);
}
.popover-product { font-family: var(--font-mono); font-weight: 700; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.popover-close {
  background: none; border: 1px solid var(--border-subtle); color: var(--text-secondary);
  cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem;
  border-radius: var(--radius-sm); padding: 0.2rem 0.45rem;
}
.hash-box {
  background: var(--bg-base); border: 1px solid var(--border-subtle);
  padding: 0.6rem; border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 0.72rem;
  word-break: break-all; color: var(--accent-cyan); margin: 0.35rem 0 0.85rem;
}
.popover-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; }

/* Commercial column ------------------------------------------------------- */
.card-commercial {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--border-subtle);
}
.price-tag { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.price-sub { display: block; font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }
.cta-group { display: flex; gap: 0.5rem; width: 100%; }
.btn {
  flex: 1; text-align: center; text-decoration: none;
  font-size: 0.82rem; font-weight: 600; padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md); border: 1px solid transparent;
}
.btn-primary { background: var(--accent-emerald); color: #04120c; }
.btn-primary:hover { filter: brightness(1.08); color: #04120c; }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-subtle); }
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

@container product-card (min-width: 620px) {
  .product-card { grid-template-columns: minmax(0, 1fr) 230px; align-items: start; }
  .product-summary { -webkit-line-clamp: unset; }
  .card-commercial {
    border-top: none; border-left: 1px solid var(--border-subtle);
    padding-top: 0; padding-left: 1.25rem;
    flex-direction: column; align-items: stretch;
    position: sticky; top: 5rem;
  }
  .cta-group { flex-direction: column; }
}

/* Badges ------------------------------------------------------------------ */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 650; white-space: nowrap;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.badge-neutral { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-experimental { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.badge-tested { background: var(--plan-bg); color: var(--plan); }
.badge-validated, .badge-ok, .badge-passed { background: var(--ok-bg); color: var(--ok); }
.badge-production_ready { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.badge-proven_in_customer_use { background: var(--synthetic-bg); color: var(--synthetic); }
.badge-failed { background: var(--bad-bg); color: var(--bad); }
.badge-degraded, .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-plan { background: var(--plan-bg); color: var(--plan); }
.badge-open { background: var(--open-bg); color: var(--open); }
.badge-synthetic { background: var(--synthetic-bg); color: var(--synthetic); }
.badge-dirty { background: var(--warn-bg); color: var(--warn); }
.badge-clean { background: var(--ok-bg); color: var(--ok); }

.chip-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-list li {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.82rem;
}

/* Tiles ------------------------------------------------------------------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.9rem; }
.tile {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 1rem;
}
.tile-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 650; margin: 0 0 0.35rem;
  font-family: var(--font-mono);
}
.tile-value { font-size: 1.6rem; font-weight: 750; margin: 0; line-height: 1.15; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.tile-hint { font-size: 0.78rem; color: var(--text-muted); margin: 0.35rem 0 0; }
.tile-alert .tile-value { color: var(--warn); }

/* Cards, cases, claims ---------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.product-card .product-desc { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: auto; padding-top: 0.4rem; }
.claim-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.claim-list li { font-size: 0.88rem; min-width: 0; overflow-wrap: anywhere; }

.claim {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-emerald); border-radius: var(--radius-md);
  padding: 1rem 1.1rem; margin: 0 0 0.9rem;
}
.claim-text { margin: 0 0 0.6rem; font-size: 1rem; }
.claim-evidence {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center;
  font-size: 0.82rem; color: var(--text-muted); overflow-wrap: anywhere;
  min-width: 0;
}
.claim-evidence span { min-width: 0; overflow-wrap: anywhere; }

.case-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
.case { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1rem 1.1rem; min-width: 0; overflow-wrap: anywhere; }
.case-head { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-bottom: 0.5rem; }
.case-head h3 { margin: 0; font-size: 1rem; }
.case-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.35rem 1.1rem; font-size: 0.84rem; color: var(--text-muted); margin: 0.5rem 0; }
.case-meta strong { color: var(--text-primary); font-weight: 600; }
.case-limits { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.84rem; color: var(--text-muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: end; }
.filter-row label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }
.filter-count { margin: 0 0 0.2rem; font-size: 0.84rem; color: var(--text-muted); }

/* Tables ------------------------------------------------------------------ */
.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; background: var(--bg-surface);
  font-size: 0.88rem; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); overflow: hidden;
}
.data-table caption { text-align: left; }
.data-table th, .data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: top; }
.data-table thead th { background: var(--bg-elevated); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.key-value-table th { width: 38%; font-weight: 600; color: var(--text-muted); }
.sha { word-break: break-all; font-family: var(--font-mono); font-size: 0.78rem; }

/* Detail blocks ----------------------------------------------------------- */
.code-block {
  background: #070b11; color: #dbe4ee; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 1rem 1.1rem; overflow-x: auto;
  font-size: 0.8rem; line-height: 1.55;
}
.contract-block { margin: 0 0 1rem; }
.definition-list { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 0.5rem 1.1rem; margin: 0; }
.definition-list dt { font-weight: 650; }
.definition-list dd { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.assumption-list, .risk-list, .flow-list { margin: 0; padding-left: 1.3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.assumption-list li, .risk-list li, .flow-list li { color: var(--text-muted); }
.aside-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.1rem; }
.aside-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 650; margin: 0 0 0.3rem; font-family: var(--font-mono); }
.aside-price { font-size: 1.8rem; font-weight: 750; margin: 0; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.aside-hint { margin: 0.3rem 0 0; font-size: 0.84rem; color: var(--text-muted); }
.aside-note { margin: 0.8rem 0 0; font-size: 0.78rem; color: var(--text-muted); }

/* Notices ----------------------------------------------------------------- */
.notice {
  border-radius: var(--radius-md); padding: 1rem 1.1rem; margin: 1.4rem 0;
  border: 1px solid var(--border-subtle); background: var(--bg-surface);
}
.notice p { margin: 0; }
.notice-warn { background: var(--warn-bg); border-color: rgba(251, 191, 36, 0.4); }
.notice-critical { background: var(--bad-bg); border-color: rgba(248, 113, 113, 0.4); }

/* Forms ------------------------------------------------------------------- */
.form-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 0.7rem 1.2rem; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.1rem 1.2rem;
}
.form-grid label { font-size: 0.88rem; font-weight: 550; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
input[type="number"], input[type="text"], select {
  font: inherit; font-size: 0.9rem; padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-subtle); border-radius: 7px;
  background: var(--bg-base); color: var(--text-primary); width: 100%;
}
input:invalid { border-color: var(--bad); }
.field-label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--text-muted); margin: 0 0 0.35rem; }
.select { margin-bottom: 0.75rem; }
.button {
  font: inherit; font-size: 0.9rem; font-weight: 650; padding: 0.6rem 1rem;
  border-radius: var(--radius-md); border: 1px solid var(--accent-emerald);
  background: var(--accent-emerald); color: #04120c; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button-secondary { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-subtle); }
.button-secondary:hover { background: var(--bg-surface); border-color: var(--text-secondary); }
.button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Replay / demo ----------------------------------------------------------- */
.replay-panel {
  margin-top: 1.1rem; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 1rem 1.1rem; min-height: 90px;
}
.replay-steps { margin: 0; padding-left: 1.3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.replay-steps li { color: var(--text-muted); min-width: 0; overflow-wrap: anywhere; }
.replay-steps li strong { color: var(--text-primary); }
.demo-status { margin: 0.75rem 0; font-size: 0.88rem; color: var(--text-muted); }
.demo-status.is-error { color: var(--bad); }
.demo-status.is-ok { color: var(--ok); }
.finding-table td { font-size: 0.84rem; }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  background: var(--bg-surface); border-top: 1px solid var(--border-subtle);
  padding: 1.6rem 0 2rem; margin-top: 2rem;
}
.footer-note { margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--text-muted); }

/* Mobile dock ------------------------------------------------------------- */
.mobile-dock {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--bg-glass); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
}
.mobile-dock a {
  text-decoration: none; color: var(--text-secondary); font-size: 0.68rem;
  font-family: var(--font-mono);
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.35rem; border-radius: var(--radius-md);
}
.mobile-dock a[aria-current="page"] { color: var(--accent-emerald); font-weight: 700; }
.mobile-dock .dock-icon { font-size: 1rem; line-height: 1; }
.mobile-dock a span { white-space: nowrap; }
@media (min-width: 960px) { .mobile-dock { display: none; } }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .page-head { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
}
@media (max-width: 760px) {
  .header-inner { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .definition-list { grid-template-columns: minmax(0, 1fr); gap: 0.1rem 0; }
  .definition-list dd { margin-bottom: 0.5rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .wrap { padding: 0 1rem; }
  .hero-section { padding: 1.75rem 1rem 1.5rem; }
  .catalog-section { padding: 0 1rem 1.5rem; }
  .telemetry-bar { font-size: 0.7rem; padding: 0.4rem 1rem; }
}

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

/* Print ------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .form-actions, .filter-row,
  .mobile-dock, .telemetry-bar, .canvas-stage, .cmd-trigger { display: none; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  a { color: inherit; }
  .product-card, .panel, .claim, .case, .tile, .aside-card { box-shadow: none; }
}
