/* Cogent Networks - process visual patterns. Theme-aware, no hard-coded light or dark values. */

.pv-wrap { display: flex; justify-content: center; overflow: visible; }
.pv-stage { position: relative; flex-shrink: 0; transform-origin: top center; }
.pv-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

/* ---- shared card ---- */
.pv-card { position: absolute; box-sizing: border-box; z-index: 2; padding: 13px 15px 15px;
  overflow-wrap: break-word;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--pv-shadow); transition: box-shadow .18s ease, border-color .18s ease, transform .14s ease; }
.pv-card:not(.static) { cursor: default; }
.pv-card:not(.static):hover { border-color: var(--accent); box-shadow: var(--pv-shadow-hover); transform: translateY(-4px); z-index: 5; }
.pv-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.pv-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  white-space: nowrap; flex-shrink: 0; line-height: 1.2;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.10); border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 5px; padding: 3px 7px; }
.pv-icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.pv-card-t { font-size: 13.5px; font-weight: 600; line-height: 1.34; color: var(--text); }
.pv-card-d { margin-top: 7px; font-size: 11.5px; line-height: 1.5; color: var(--body); }
.pv-tag { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); line-height: 1.45; }

/* ---- ring / cycle / chain ---- */
.pv-orbit { fill: none; stroke: var(--hub-orbit); stroke-width: 1; stroke-dasharray: 3 9;
  animation: pvSpin 180s linear infinite; transform-box: fill-box; transform-origin: center; }
.pv-spoke { stroke: var(--hub-spoke); stroke-width: 1; }
.pv-spoke-pulse { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round;
  animation: pvTravel 5.6s linear infinite; }
@keyframes pvTravel { 0% { stroke-dashoffset: var(--len); opacity: 0; } 12% { opacity: 0.8; }
  88% { opacity: 0.8; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes pvSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.pv-arrow { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round;
  stroke-linejoin: round; opacity: 0.55; }
.pv-core { position: absolute; z-index: 3; border-radius: 50%; background: var(--hub-core-bg);
  box-shadow: var(--hub-core-shadow); border: var(--hub-core-ringw) solid var(--hub-core-ring);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.pv-core-t { font-size: 14px; font-weight: 700; letter-spacing: 0.4px; line-height: 1.24; color: var(--hub-core-title); }
.pv-core-s { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; font-weight: 500;
  letter-spacing: 1.2px; margin-top: 7px; color: var(--hub-core-accent); }

/* cycle: calm, static, arrows carry the emphasis */
.pv-cycle .pv-orbit { animation: none; stroke-dasharray: none; stroke: var(--hub-orbit); }
.pv-cycle .pv-spoke-pulse { display: none; }
.pv-cycle .pv-arrow { opacity: 0.9; stroke-width: 1.9; }
.pv-cycle .pv-card { box-shadow: none; }

/* chain: linked connectors, sealed core */
.pv-chain .pv-spoke { stroke-dasharray: 7 5; stroke-width: 1.4; opacity: 0.85; }
.pv-chain .pv-orbit { stroke-dasharray: 12 7; stroke-width: 1.6; opacity: 0.7; animation-duration: 260s; }
.pv-chain .pv-card { box-shadow: var(--pv-shadow-hover); }

/* ---- roadmap / path ---- */
.pv-route { fill: none; stroke: var(--hub-spoke); }
.pv-route.road { stroke-width: 20; stroke-linecap: round; }
.pv-route.path { stroke-width: 2; stroke-dasharray: 8 8; stroke-linecap: round; }
.pv-route-dash { fill: none; stroke: var(--surface); stroke-width: 2; stroke-dasharray: 12 14; }
.pv-route-dash.path { display: none; }
.pv-route-progress { fill: none; stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 4000; stroke-dashoffset: 4000; }
.pv-route-progress.road { stroke-width: 5; }
.pv-route-progress.path { stroke-width: 2.4; }
.pv-stage.in .pv-route-progress { transition: stroke-dashoffset 2.6s cubic-bezier(.22,1,.36,1); stroke-dashoffset: 0; }
.pv-node { fill: var(--surface); stroke: var(--accent); stroke-width: 2.4; }
.pv-node-ping { fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0; animation: pvPing 3.6s ease-out infinite; }
@keyframes pvPing { 0% { opacity: 0.65; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.1); } }
.pv-node-ping { transform-box: fill-box; transform-origin: center; }
.pv-stem { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }

/* ---- stairs ---- */
.pv-stairs .pv-card { z-index: 3; }
.pv-stair { position: absolute; box-sizing: border-box; border-radius: 8px 8px 0 0;
  background: var(--pv-stair-bg); border: 1px solid var(--line); border-bottom: none; }
.pv-stair::after { content: ''; position: absolute; left: 12px; right: 12px; top: 12px; height: 1px;
  background: var(--line-soft); }
.pv-gate { position: absolute; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transform: translateX(-50%); }
.pv-gate span { display: block; width: 2px; height: 26px; background: var(--accent); opacity: 0.55;
  border-radius: 1px; animation: pvGate 3.2s ease-in-out infinite; }
.pv-gate.big span { height: 74px; opacity: 0.8; width: 3px; }
.pv-gate em { font-family: 'JetBrains Mono', monospace; font-style: normal; font-size: 8.5px;
  letter-spacing: 0.14em; color: var(--accent); }
@keyframes pvGate { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.85; } }
.pv-phase-label { position: absolute; text-align: center; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding-top: 12px; border-top: 2px solid var(--accent); }

/* ---- swimlane restyle: icons + travelling pulse ---- */
.d2-node-icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.d2-node-k { display: flex; align-items: center; gap: 7px; }

/* ---- certification logo wall ---- */
.cert-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cert-tile { display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2; max-height: 190px; padding: 18px 22px; border-radius: 12px;
  background: var(--cert-plate); border: 1px solid var(--line);
  transition: border-color .18s ease, box-shadow .18s ease, transform .14s ease; }
.cert-tile:hover { border-color: var(--accent); box-shadow: var(--pv-shadow-hover); transform: translateY(-3px); }
.cert-tile img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.cert-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cert-strip .cert-tile { aspect-ratio: auto; max-height: none; width: 66px; height: 66px; padding: 8px; border-radius: 9px; }
.cert-strip .cert-tile:hover { transform: none; }

/* compact certification wall - homepage band */
.cert-wall-compact { grid-template-columns: repeat(8, 1fr); gap: 12px; }
.cert-wall-compact .cert-tile { padding: 12px 10px; min-height: 74px; border-radius: 8px; }
.cert-wall-compact .cert-tile img { max-height: 46px; }
@media (max-width: 1100px) { .cert-wall-compact { grid-template-columns: repeat(4, 1fr); } }

/* ---- legal pages ---- */
.lg-hero { border-bottom: 1px solid var(--line); background: var(--bg-hero); padding: 56px 0 46px; }
.lg-h1 { margin: 0 0 20px; font-size: 46px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; color: var(--hero-text); }
.lg-intro { margin: 0 0 26px; font-size: 17px; line-height: 1.7; color: var(--hero-sub); max-width: 74ch; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 8px 0; font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lg-meta span:not(:last-child)::after { content: '·'; margin: 0 12px; opacity: 0.5; }
.lg-section { padding: 52px 0 78px; }
.lg-commit { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px;
  background: var(--surface); padding: 28px 30px 30px; margin-bottom: 40px; }
.lg-commit-t { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 18px; letter-spacing: -0.015em; }
.lg-commit-ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.lg-commit-ul li { position: relative; padding-left: 26px; font-size: 15px; font-weight: 600;
  line-height: 1.6; color: var(--text); max-width: 88ch; }
.lg-commit-ul li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px;
  border-radius: 2px; background: var(--accent); }
.lg-controls { display: flex; gap: 8px; margin-bottom: 16px; }
.lg-toggle-all { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; white-space: nowrap;
  text-transform: uppercase; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--body); cursor: pointer; transition: border-color .16s ease, color .16s ease; }
.lg-toggle-all:hover { border-color: var(--accent); color: var(--text); }
.lg-acc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.lg-item { border-bottom: 1px solid var(--line); }
.lg-item:last-child { border-bottom: none; }
.lg-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; transition: background .14s ease; }
.lg-sum::-webkit-details-marker { display: none; }
.lg-sum:hover { background: var(--surface-2); }
.lg-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lg-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--accent);
  flex-shrink: 0; width: 22px; }
.lg-title { flex: 1; font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.012em; }
.lg-chev { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; transition: transform .2s ease; }
.lg-item[open] > .lg-sum .lg-chev { transform: rotate(180deg); color: var(--accent); }
.lg-item[open] > .lg-sum { background: var(--surface-2); }
.lg-body { padding: 4px 24px 26px 62px; }
.lg-p { margin: 0 0 14px; font-size: 16px; line-height: 1.72; color: var(--body); max-width: 82ch; }
.lg-p:last-child { margin-bottom: 0; }
.lg-p strong { color: var(--text); font-weight: 600; }
.lg-note { font-size: 14px; color: var(--muted); font-style: italic; }
.lg-ul { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lg-ul:last-child { margin-bottom: 0; }
.lg-ul li { position: relative; padding-left: 20px; font-size: 16px; line-height: 1.66; color: var(--body); max-width: 82ch; }
.lg-ul li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); opacity: 0.75; }
.lg-ul li strong { color: var(--text); font-weight: 600; }
.lg-tbl-wrap { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lg-tbl { width: 100%; border-collapse: collapse; }
.lg-tbl th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500; color: var(--muted); background: var(--surface-2);
  padding: 12px 18px; border-bottom: 1px solid var(--line); }
.lg-tbl td { font-size: 14.5px; line-height: 1.62; color: var(--body); padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.lg-tbl tr:last-child td { border-bottom: none; }
.lg-tbl td:first-child { color: var(--text); font-weight: 500; width: 38%; }
.lg-doc { margin: 30px 0 0; font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.06em; line-height: 1.7; color: var(--muted); }
