:root {
  --visual-accent: #58c8d0;
  --visual-risk: #e66852;
}

.meta-glyph {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: currentColor;
}

.meta-glyph * {
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meta-primary,
.meta-secondary,
.meta-grid,
.meta-accent,
.meta-event,
.meta-risk,
.meta-node {
  fill: none;
}

.meta-primary { stroke: currentColor; stroke-width: 2.5; }
.meta-secondary { stroke: currentColor; stroke-width: 1.35; opacity: .55; }
.meta-grid { stroke: currentColor; stroke-width: .8; opacity: .18; stroke-dasharray: 3 5; }
.meta-accent { stroke: var(--visual-accent); stroke-width: 2.6; }
.meta-event { stroke: var(--visual-risk); stroke-width: 1.5; stroke-dasharray: 4 4; }
.meta-risk { stroke: var(--visual-risk); fill: var(--visual-risk); stroke-width: 1.5; }
.meta-node { stroke: currentColor; fill: var(--visual-accent); stroke-width: 1.5; }
.meta-fill-soft { fill: currentColor; opacity: .06; }
.meta-fill-accent { fill: var(--visual-accent); opacity: .14; }

.page-motif {
  position: absolute;
  z-index: -1;
  top: 5.4rem;
  right: 2.2rem;
  width: clamp(8rem, 13vw, 12rem);
  aspect-ratio: 1;
  color: var(--teal);
  opacity: .1;
  pointer-events: none;
}

.sheet-dark .page-motif { color: var(--cyan); opacity: .18; }
#cover .page-motif { display: none; }

.page-motif::before,
.page-motif::after {
  content: "";
  position: absolute;
  width: .55rem;
  height: .55rem;
  border-color: currentColor;
  opacity: .65;
}
.page-motif::before { top: -.5rem; left: -.5rem; border-top: 1px solid; border-left: 1px solid; }
.page-motif::after { right: -.5rem; bottom: -.5rem; border-right: 1px solid; border-bottom: 1px solid; }

.scene-tile-glyph,
.scene-index-glyph,
.scene-nav-icon,
.hub-item-glyph,
.report-scene-mark {
  display: block;
  color: var(--ink);
}

.scene-tile-glyph {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 4.25rem;
  height: 4.25rem;
  color: var(--visual-accent);
  opacity: .76;
  transition: opacity .22s var(--ease-out, ease), transform .22s var(--ease-out, ease);
}
.scene-tile:hover .scene-tile-glyph,
.scene-tile:focus-visible .scene-tile-glyph { opacity: 1; transform: translateY(-.15rem); }

.scene-index-glyph {
  width: 3.2rem;
  height: 3.2rem;
  color: var(--visual-accent);
}

.scene-nav-icon {
  width: 2rem;
  height: 2rem;
  color: var(--cyan);
}

.arch-vector {
  display: block;
  width: 4.6rem;
  height: 4.6rem;
  margin: -.35rem 0 1rem;
  color: var(--teal);
}
.arch-col.featured .arch-vector { color: var(--cyan); }

.algorithm-step > span {
  display: grid;
  justify-items: end;
  gap: .2rem;
}
.algorithm-step-visual { display: block; width: 3.3rem; height: 2.5rem; color: var(--teal); }
.algorithm-step > span em { font-style: normal; }

.product-vector-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.5rem;
  overflow: hidden;
  background: var(--line);
  border-radius: .75rem;
}
.product-vector-strip > span {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: .75rem;
  align-items: center;
  min-height: 6.5rem;
  padding: .85rem 1rem;
  color: var(--teal);
  background: rgba(255, 255, 255, .75);
}
.product-vector-strip .meta-glyph { height: 4.5rem; }
.product-vector-strip b { color: var(--ink); font-size: .86rem; }

.card-vector {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: .65rem;
  color: var(--teal);
}

.materials-document-icon { position: relative; overflow: hidden; }
.materials-document-icon .document-scene-stack {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1.7rem);
  gap: .18rem;
  color: var(--teal);
  margin: 0;
  opacity: .62;
}
.materials-document-icon .document-scene-stack .meta-glyph { width: 1.7rem; height: 1.7rem; }

#sources .card { position: relative; padding-right: 5.5rem; }
.reference-glyph {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.8rem;
  height: 3.8rem;
  color: var(--teal);
  opacity: .55;
}

.chart-unit {
  position: absolute;
  z-index: 2;
  top: .35rem;
  right: .4rem;
  padding: .25rem .38rem;
  color: var(--ink-soft);
  background: rgba(248, 250, 247, .9);
  border-radius: .25rem;
  font: 700 .62rem/1 var(--mono);
  pointer-events: none;
}
.panel-unit { float: right; margin-top: .2rem; color: var(--ink-soft); font: 700 .65rem/1 var(--mono); }

.hub-item-glyph {
  position: absolute;
  right: 1rem;
  bottom: .8rem;
  width: 5.5rem;
  height: 5.5rem;
  color: var(--visual-accent);
  opacity: .16;
  pointer-events: none;
}

.hub-system-map { max-width: 100%; margin: 0; overflow: hidden; color: var(--cyan); }
.hub-system-signal { height: clamp(2.75rem, 8cqi, 3.5rem); opacity: .9; }
.hub-system-signal svg { width: 100%; height: 100%; }
.hub-system-windows {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .35rem;
  margin-top: -.45rem;
}
.hub-system-window {
  display: grid;
  justify-items: center;
  gap: .2rem;
  min-width: 0;
  color: var(--visual-accent);
}
.hub-system-window .meta-glyph { width: clamp(2.1rem, 11cqi, 2.7rem); height: clamp(2.1rem, 11cqi, 2.7rem); }
.hub-system-window b { color: var(--white); font: 800 .68rem/1 var(--mono); }
.hub-system-window small { min-width: 0; max-width: 5.5rem; overflow-wrap: anywhere; color: #b9d1d1; font-size: .64rem; line-height: 1.2; text-align: center; }
.hub-system-map figcaption { margin-top: .75rem; color: #b9d1d1; font-size: .75rem; text-align: center; }

@container hubVisual (max-width: 48rem) {
  .hub-system-windows { grid-template-columns: repeat(4, minmax(4rem, 1fr)); row-gap: .8rem; }
}

@container hubVisual (max-width: 17rem) {
  .hub-system-windows { grid-template-columns: repeat(2, minmax(5rem, 1fr)); }
}

.scene-figure {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 14rem;
  margin: 0;
  padding: 1rem 1rem .75rem;
  color: var(--cyan);
  border: 1px solid rgba(88, 200, 208, .3);
  border-radius: var(--radius-md, .75rem);
  container: sceneFigure / inline-size;
}
.scene-figure .meta-glyph { width: clamp(10rem, 50cqi, 14rem); height: auto; aspect-ratio: 1; }
.scene-figure figcaption { max-width: 24rem; color: #c1d5d6; font-size: .76rem; line-height: 1.4; text-align: center; }

.report-scene-mark {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--visual-accent);
  opacity: .9;
}

.figure-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .45rem;
  color: var(--muted, #4d6b6f);
  font-size: .7rem;
}
.figure-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.figure-legend i { display: inline-flex; align-items: center; gap: .28rem; font-style: normal; }
.figure-legend i::before { content: ""; width: .55rem; height: .55rem; background: var(--teal); border-radius: 50%; }
.figure-legend i[data-legend="1"]::before { background: var(--visual-accent); }
.figure-legend i[data-legend="2"]::before { background: var(--visual-risk); transform: rotate(45deg); border-radius: .08rem; }

.vector-trace { stroke-dasharray: 1; stroke-dashoffset: 0; }
.sheet.is-active-section .vector-trace,
.sheet.is-active-section .page-motif .meta-draw,
.material-view.is-active .meta-draw {
  animation: vector-trace-in .82s cubic-bezier(.22, 1, .36, 1) var(--trace-delay, 0ms) both;
}

@keyframes vector-trace-in {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.table-scroll { overflow-x: auto; scrollbar-width: thin; }

@media screen and (max-width: 52rem) {
  .page-motif { top: 4.7rem; right: 1.2rem; width: 7.25rem; opacity: .08; }
  .scene-tile-glyph { width: 3.5rem; height: 3.5rem; }
  .figure-meta { align-items: flex-start; flex-direction: column; }
  .figure-legend { justify-content: flex-start; }
  .report-chart { min-width: 34rem; }
  .report-figure { overflow-x: auto; }
  .report-figure h3,
  .report-figure .figure-meta,
  .report-figure figcaption { position: sticky; left: 0; width: min(100%, calc(100vw - 4rem)); }
  .product-vector-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .algorithm-step-visual { display: none; }
}

@media screen and (max-width: 36rem) {
  .product-vector-strip { grid-template-columns: 1fr; }
  .product-vector-strip > span { min-height: 5.5rem; }
  .reference-glyph { width: 3rem; height: 3rem; }
  #sources .card { padding-right: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .vector-trace,
  .meta-draw { animation: none !important; stroke-dashoffset: 0 !important; }
  .scene-tile-glyph { transition: none; }
}

@media print {
  .page-motif { opacity: .08; }
  .scene-figure,
  .report-figure,
  .hub-system-map,
  .table-scroll { break-inside: avoid; page-break-inside: avoid; }
  .hub-item-glyph { opacity: .12; }
  .arch-vector { width: 10mm; height: 10mm; margin-bottom: 2mm; }
  .card-vector { width: 8mm; height: 8mm; margin-bottom: 1mm; }
  .product-vector-strip { margin-top: 3mm; }
  .product-vector-strip > span { grid-template-columns: 10mm 1fr; min-height: 13mm; padding: 2mm 3mm; }
  .product-vector-strip .meta-glyph { height: 9mm; }
  .report-figure h3,
  .report-figure .figure-meta,
  .report-figure figcaption { position: static; width: auto; }
}
