/* Albert Lab v130: LDV Phase A static optical layout */

.ldv-page-v130 {
  --ldv-measurement: #ff625c;
  --ldv-measurement-return: #ff9aa1;
  --ldv-reference: #55c8f5;
  --ldv-detector: #bb72df;
  --ldv-target: #8bd552;
  --ldv-panel: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  --ldv-panel-soft: color-mix(in srgb, var(--surface-soft) 74%, transparent);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.ldv-page-v130 .page-hero { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.ldv-page-v130 .ldv-hero-copy { max-width: 900px; }
.ldv-page-v130 .ldv-hero-copy h1 { max-width: 15ch; }
.ldv-page-v130 .ldv-hero-note,
.ldv-page-v130 .ldv-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1rem;
  padding: .48rem .78rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  color: var(--muted);
  font-size: .9rem;
}
.ldv-page-v130 .ldv-hero-note::before,
.ldv-page-v130 .ldv-phase-badge::before {
  content: "";
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  background: var(--ldv-target);
  box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--ldv-target) 18%, transparent);
}
.ldv-page-v130 .ldv-phase-badge { margin-top: .6rem; font-size: .82rem; }

.ldv-phase-a-v130 {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 34px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 86%, transparent), color-mix(in srgb, var(--surface) 84%, transparent));
  overflow: hidden;
  box-shadow: var(--shadow);
}
html.light-mode .ldv-phase-a-v130 {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,253,.9));
}
.ldv-phase-head-v130 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.ldv-phase-head-v130 h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.55rem); letter-spacing: -.045em; line-height: 1.06; }
.ldv-phase-head-v130 p { margin: .5rem 0 0; color: var(--muted); max-width: 72ch; }
.ldv-phase-status-v130 {
  flex: 0 0 auto;
  font-family: var(--font-tech);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .75rem;
  color: var(--muted);
}
.ldv-phase-layout-v130 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .72fr);
}
.ldv-schematic-card-v130 {
  min-width: 0;
  padding: clamp(1rem, 2.4vw, 1.55rem);
  border-right: 1px solid var(--line);
}
.ldv-schematic-v130 {
  width: 100%;
  height: auto;
  min-height: 440px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px) 0 0 / 42px 42px,
    color-mix(in srgb, var(--lab-bg-2) 72%, transparent);
}
html.light-mode .ldv-schematic-v130 { background-color: rgba(244,248,252,.88); }
.ldv-schematic-v130 text {
  font-family: var(--font-main);
  fill: var(--ink);
  paint-order: stroke fill;
  stroke: rgba(6,13,24,.92);
  stroke-width: 5px;
  stroke-linejoin: round;
}
html.light-mode .ldv-schematic-v130 text { stroke: rgba(248,251,255,.98); stroke-width: 6px; }
.ldv-schematic-v130 .ldv-svg-muted { fill: var(--muted); }
.ldv-schematic-v130 .ldv-svg-tech { font-family: var(--font-tech); }
.ldv-schematic-v130 .ldv-arm-measure { stroke: var(--ldv-measurement); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ldv-schematic-v130 .ldv-arm-return { stroke: var(--ldv-measurement-return); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10 8; }
.ldv-schematic-v130 .ldv-arm-reference { stroke: var(--ldv-reference); stroke-width: 5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ldv-schematic-v130 .ldv-arm-detector { stroke: var(--ldv-detector); stroke-width: 5; fill: none; stroke-linecap: round; }
.ldv-schematic-v130 .ldv-target-motion { stroke: var(--ldv-target); stroke-width: 4; }
.ldv-schematic-v130 .ldv-optic { fill: color-mix(in srgb, var(--ldv-reference) 24%, var(--surface-strong)); stroke: color-mix(in srgb, var(--ldv-reference) 82%, white); stroke-width: 2; }
.ldv-schematic-v130 .ldv-device { fill: color-mix(in srgb, var(--surface-strong) 88%, #000 8%); stroke: var(--line-strong); stroke-width: 2; }
.ldv-schematic-v130 .ldv-detector { fill: color-mix(in srgb, var(--ldv-detector) 22%, var(--surface-strong)); stroke: var(--ldv-detector); stroke-width: 2; }
.ldv-schematic-v130 .ldv-target { fill: color-mix(in srgb, white 24%, var(--surface-strong)); stroke: rgba(255,255,255,.78); stroke-width: 2; }
.ldv-schematic-v130 .ldv-lens { fill: rgba(139,213,82,.35); stroke: rgba(139,213,82,.68); stroke-width: 2; }
.ldv-schematic-v130 .ldv-laser-core { fill: var(--ldv-measurement); }
.ldv-schematic-v130 .ldv-label-measure { fill: #ffd0cd; }
.ldv-schematic-v130 .ldv-label-return { fill: #ffe2e5; }
.ldv-schematic-v130 .ldv-label-reference { fill: #b9eeff; }
.ldv-schematic-v130 .ldv-label-detector { fill: #ead2ff; }
.ldv-schematic-v130 .ldv-label-target { fill: #d7ffb5; }

.ldv-schematic-v130 .ldv-tag-box {
  fill: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  stroke: color-mix(in srgb, var(--line-strong) 70%, transparent);
  stroke-width: 1.5;
}
.ldv-schematic-v130 .ldv-tag-measure { fill: color-mix(in srgb, var(--ldv-measurement) 18%, var(--surface-strong)); }
.ldv-schematic-v130 .ldv-tag-return { fill: color-mix(in srgb, var(--ldv-measurement-return) 18%, var(--surface-strong)); }
.ldv-schematic-v130 .ldv-tag-reference { fill: color-mix(in srgb, var(--ldv-reference) 16%, var(--surface-strong)); }
.ldv-schematic-v130 .ldv-tag-detector { fill: color-mix(in srgb, var(--ldv-detector) 16%, var(--surface-strong)); }
.ldv-schematic-v130 .ldv-panel-line { stroke: rgba(255,255,255,.24); stroke-width: 2; stroke-dasharray: 8 8; }
.ldv-schematic-v130 .ldv-small-label { font-size: 16px; font-weight: 760; }

.ldv-phase-side-v130 {
  padding: clamp(1rem, 2.4vw, 1.55rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ldv-side-card-v130 {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--ldv-panel-soft);
  padding: 1rem;
}
.ldv-side-card-v130 h3,
.ldv-side-card-v130 h4 { margin: 0; }
.ldv-side-card-v130 p { margin: .55rem 0 0; color: var(--muted); }
.ldv-step-list-v130 { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .75rem; }
.ldv-step-list-v130 li { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.ldv-step-list-v130 strong { display: block; }
.ldv-step-num-v130 {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--branch), var(--branch-2));
  color: white;
  font-size: .86rem;
  font-weight: 850;
}
.ldv-legend-v130 { display: grid; gap: .72rem; margin-top: .9rem; }
.ldv-legend-item-v130 { display: grid; grid-template-columns: 1.05rem 1fr; gap: .7rem; align-items: start; }
.ldv-swatch-v130 { width: 1.05rem; height: 1.05rem; border-radius: 4px; margin-top: .14rem; }
.ldv-swatch-measure { background: var(--ldv-measurement); }
.ldv-swatch-return { background: var(--ldv-measurement-return); }
.ldv-swatch-reference { background: var(--ldv-reference); }
.ldv-swatch-detector { background: var(--ldv-detector); }
.ldv-swatch-target { background: var(--ldv-target); }
.ldv-order-v130 {
  margin-top: .9rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 62%, transparent);
}
.ldv-order-v130 code,
.ldv-frequency-grid-v130 code { font-family: var(--font-tech); font-size: .95em; }
.ldv-frequency-grid-v130 { display: grid; gap: .7rem; margin-top: .9rem; }
.ldv-frequency-row-v130 { padding: .75rem .8rem; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-strong) 64%, transparent); }
.ldv-frequency-row-v130 p { margin: .3rem 0 0; }

.ldv-concepts-v130 { width: min(1320px, calc(100% - 32px)); margin: 1.2rem auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ldv-concept-v130,
.ldv-next-v130,
.ldv-model-note-v130,
.ldv-sources-v130 {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.ldv-concept-v130 { padding: 1rem; }
.ldv-concept-v130 strong { display: block; }
.ldv-concept-v130 p { margin: .45rem 0 0; color: var(--muted); }
.ldv-next-v130,
.ldv-model-note-v130,
.ldv-sources-v130 { width: min(1180px, calc(100% - 40px)); margin: clamp(1.25rem, 3vw, 2rem) auto 0; padding: clamp(1rem, 2.6vw, 1.6rem); }
.ldv-next-v130 h2,
.ldv-model-note-v130 h2,
.ldv-sources-v130 h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.ldv-next-v130 p,
.ldv-sources-v130 p { color: var(--muted); }
.ldv-model-note-v130 ul,
.ldv-sources-v130 ol { margin: .9rem 0 0; padding-left: 1.2rem; }
.ldv-model-note-v130 li + li,
.ldv-sources-v130 li + li { margin-top: .5rem; }
.ldv-sources-v130 a, .ldv-back-v130 { color: var(--branch-2); text-underline-offset: .22em; }
.ldv-back-v130 { display: inline-flex; margin-top: 1rem; font-weight: 800; text-decoration: none; }
.ldv-back-v130:hover { text-decoration: underline; }

@media (max-width: 1080px) {
  .ldv-phase-layout-v130 { grid-template-columns: 1fr; }
  .ldv-schematic-card-v130 { border-right: 0; border-bottom: 1px solid var(--line); }
  .ldv-concepts-v130 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ldv-phase-a-v130 { width: min(100% - 18px, 1320px); }
  .ldv-phase-head-v130 { display: block; }
  .ldv-phase-status-v130 { margin-top: .8rem; }
  .ldv-schematic-v130 { min-height: 0; }
}


.ldv-schematic-v130 .ldv-tag-box { opacity: .96; }
.ldv-schematic-v130 .ldv-flow-note { font-size: 14px; }
.ldv-schematic-v130 .ldv-frequency-note { font-size: 17px; font-family: var(--font-tech); }
.ldv-schematic-v130 .ldv-component-label { font-size: 24px; font-weight: 800; }
.ldv-schematic-v130 .ldv-beam-label { font-size: 21px; font-weight: 790; }
.ldv-schematic-v130 .ldv-beam-label-small { font-size: 18px; font-weight: 770; }
.ldv-schematic-v130 .ldv-arm-return { stroke-width: 5.25; }
.ldv-schematic-v130 .ldv-arm-measure, .ldv-schematic-v130 .ldv-arm-reference { stroke-width: 5.5; }


/* v134 static image integration */
.ldv-static-figure-v134 {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  box-shadow: var(--shadow);
}
.ldv-static-figure-v134 img {
  display: block;
  width: 100%;
  height: auto;
}
.ldv-static-figure-v134 figcaption {
  padding: .9rem 1rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}


/* v135 updated approved static schematic */
.ldv-static-figure-v135 {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  box-shadow: var(--shadow);
}
.ldv-static-figure-v135 img {
  display: block;
  width: 100%;
  height: auto;
}
.ldv-static-figure-v135 figcaption {
  padding: .9rem 1rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

/* v136: interactive wave-based LDV animation */
.ldv-wave-module-v136 {
  width: min(1320px, calc(100% - 32px));
  margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 32px);
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 88%, transparent), color-mix(in srgb, var(--surface) 84%, transparent));
  box-shadow: var(--shadow);
}
html.light-mode .ldv-wave-module-v136 {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(246,249,253,.92));
}
.ldv-wave-head-v136 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}
.ldv-wave-head-v136 h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.04em; }
.ldv-wave-head-v136 p { margin: .5rem 0 0; max-width: 76ch; color: var(--muted); }
.ldv-wave-status-v136 {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  color: var(--muted);
  font-family: var(--font-tech);
  font-size: .76rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.ldv-wave-status-v136::before {
  content: "";
  width: .62rem;
  height: .62rem;
  border-radius: 50%;
  background: var(--ldv-target);
  box-shadow: 0 0 0 .24rem color-mix(in srgb, var(--ldv-target) 18%, transparent);
}
.ldv-wave-module-v136.is-paused .ldv-wave-status-v136::before { background: #e9b64d; box-shadow: 0 0 0 .24rem rgba(233,182,77,.18); }
.ldv-wave-controls-v136 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: .9rem;
  align-items: end;
  padding: clamp(1rem, 2.5vw, 1.45rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
}
.ldv-wave-control-v136 label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: .4rem;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 760;
}
.ldv-wave-control-v136 output { color: var(--ink-strong); font-family: var(--font-tech); }
.ldv-wave-control-v136 input[type="range"] { width: 100%; accent-color: var(--branch-2); }
.ldv-wave-control-v136 select {
  width: 100%; min-height: 2.55rem; border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent); color: var(--ink); padding: .45rem .7rem;
}
.ldv-wave-play-v136 {
  min-height: 2.7rem; border: 1px solid color-mix(in srgb, var(--branch-2) 56%, var(--line)); border-radius: 999px;
  padding: .58rem 1.05rem; background: linear-gradient(135deg, var(--branch), var(--branch-2)); color: white;
  font-weight: 850; cursor: pointer; white-space: nowrap;
}
.ldv-wave-play-v136:hover, .ldv-wave-play-v136:focus-visible { filter: brightness(1.1); outline: 2px solid color-mix(in srgb, var(--branch-2) 48%, white); outline-offset: 2px; }
.ldv-wave-presets-v136 { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .8rem clamp(1rem, 2.5vw, 1.45rem); border-bottom: 1px solid var(--line); }
.ldv-wave-presets-v136 > span { color: var(--muted); font-size: .82rem; font-weight: 760; }
.ldv-wave-preset-v136 { border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface-strong) 76%, transparent); color: var(--ink); padding: .42rem .75rem; cursor: pointer; font-size: .82rem; font-weight: 760; }
.ldv-wave-preset-v136:hover, .ldv-wave-preset-v136:focus-visible { border-color: var(--branch-2); outline: none; }
.ldv-wave-grid-v136 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .65fr); }
.ldv-wave-schematic-wrap-v136 { min-width: 0; padding: clamp(.85rem, 2vw, 1.3rem); border-right: 1px solid var(--line); }
.ldv-wave-schematic-v136 {
  width: 100%; height: auto; min-height: 430px; border: 1px solid var(--line); border-radius: 22px;
  background:
    linear-gradient(color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
    color-mix(in srgb, var(--lab-bg-2) 72%, transparent);
}
html.light-mode .ldv-wave-schematic-v136 { background-color: rgba(244,248,252,.9); }
.ldv-wave-schematic-v136 text { font-family: var(--font-main); fill: var(--ink); paint-order: stroke fill; stroke: rgba(6,13,24,.94); stroke-width: 4.5px; stroke-linejoin: round; }
html.light-mode .ldv-wave-schematic-v136 text { stroke: rgba(248,251,255,.98); stroke-width: 5.5px; }
.ldv-wave-schematic-v136 .muted { fill: var(--muted); }
.ldv-wave-schematic-v136 .tech { font-family: var(--font-tech); }
.ldv-wave-schematic-v136 .device { fill: color-mix(in srgb, var(--surface-strong) 88%, #000 7%); stroke: var(--line-strong); stroke-width: 2; }
.ldv-wave-schematic-v136 .splitter { fill: color-mix(in srgb, #48c8ef 20%, var(--surface-strong)); stroke: #54d8ff; stroke-width: 2; }
.ldv-wave-schematic-v136 .half-mirror { stroke: rgba(255,255,255,.86); stroke-width: 3; }
html.light-mode .ldv-wave-schematic-v136 .half-mirror { stroke: rgba(30,50,72,.8); }
.ldv-wave-schematic-v136 .mirror { fill: color-mix(in srgb, #55d7ff 20%, var(--surface-strong)); stroke: #55d7ff; stroke-width: 2; }
.ldv-wave-schematic-v136 .bragg { fill: color-mix(in srgb, #55d7ff 18%, var(--surface-strong)); stroke: #55d7ff; stroke-width: 2; }
.ldv-wave-schematic-v136 .target { fill: none; stroke: rgba(255,255,255,.84); stroke-width: 6; stroke-linecap: round; }
html.light-mode .ldv-wave-schematic-v136 .target { stroke: rgba(31,47,65,.8); }
.ldv-wave-schematic-v136 .guide-reference { stroke: #52d5ff; stroke-width: 2.2; fill: none; opacity: .32; }
.ldv-wave-schematic-v136 .guide-test { stroke: #ff5a5a; stroke-width: 2.3; fill: none; opacity: .34; }
.ldv-wave-schematic-v136 .guide-return { stroke: #ff9ba6; stroke-width: 2.2; fill: none; opacity: .3; stroke-dasharray: 8 7; }
.ldv-wave-schematic-v136 .guide-mixed { stroke: #c970e8; stroke-width: 2.4; fill: none; opacity: .36; }
.ldv-wave-schematic-v136 .wave { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.ldv-wave-schematic-v136 .wave-reference { stroke: #83e5ff; }
.ldv-wave-schematic-v136 .wave-return { stroke: #ff9ca8; }
.ldv-wave-schematic-v136 .wave-mixed { stroke: #dc8ff1; }
.ldv-wave-schematic-v136 .target-motion { stroke: #91dc52; stroke-width: 3.5; }
.ldv-wave-schematic-v136 .target-dot { fill: #91dc52; }
.ldv-wave-schematic-v136 .wave-note-bg { fill: color-mix(in srgb, var(--surface-strong) 82%, transparent); stroke: var(--line); stroke-width: 1; }
.ldv-wave-side-v136 { padding: clamp(1rem, 2.2vw, 1.4rem); display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.ldv-wave-card-v136 { border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface-soft) 72%, transparent); padding: .95rem; }
.ldv-wave-card-v136 h3 { margin: 0; font-size: 1.16rem; }
.ldv-wave-card-v136 p { margin: .45rem 0 0; color: var(--muted); }
.ldv-beat-canvas-v136 { display: block; width: 100%; height: 330px; margin-top: .75rem; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--lab-bg-2) 74%, transparent); }
html.light-mode .ldv-beat-canvas-v136 { background: rgba(247,250,253,.95); }
.ldv-wave-values-v136 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .62rem; }
.ldv-wave-value-v136 { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: .7rem; background: color-mix(in srgb, var(--surface-strong) 66%, transparent); }
.ldv-wave-value-v136 span { display: block; color: var(--muted); font-size: .72rem; font-weight: 760; line-height: 1.3; }
.ldv-wave-value-v136 strong { display: block; margin-top: .2rem; font-family: var(--font-tech); font-size: .98rem; overflow-wrap: anywhere; }
.ldv-wave-value-v136.is-positive strong { color: #91dc52; }
.ldv-wave-value-v136.is-negative strong { color: #dc8ff1; }
.ldv-wave-explainer-v136 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; padding: clamp(1rem, 2.5vw, 1.45rem); border-top: 1px solid var(--line); }
.ldv-wave-explainer-v136 article { border: 1px solid var(--line); border-radius: 16px; padding: .9rem; background: color-mix(in srgb, var(--surface-soft) 72%, transparent); }
.ldv-wave-explainer-v136 strong { display: block; }
.ldv-wave-explainer-v136 p { margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }
.ldv-wave-footnote-v136 { padding: 0 clamp(1rem, 2.5vw, 1.45rem) 1.3rem; color: var(--muted); font-size: .82rem; }
@media (max-width: 1060px) {
  .ldv-wave-controls-v136 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ldv-wave-play-v136 { grid-column: 1 / -1; justify-self: start; }
  .ldv-wave-grid-v136 { grid-template-columns: 1fr; }
  .ldv-wave-schematic-wrap-v136 { border-right: 0; border-bottom: 1px solid var(--line); }
  .ldv-wave-explainer-v136 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ldv-wave-module-v136 { width: min(100% - 18px, 1320px); }
  .ldv-wave-head-v136 { display: block; }
  .ldv-wave-status-v136 { margin-top: .75rem; }
  .ldv-wave-controls-v136 { grid-template-columns: 1fr; }
  .ldv-wave-play-v136 { width: 100%; }
  .ldv-wave-schematic-v136 { min-height: 0; }
  .ldv-wave-values-v136 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) { .ldv-wave-values-v136 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ldv-wave-module-v136 .wave { opacity: .82; } }


/* v137: correct wave direction and interference superposition */
.ldv-wave-schematic-v136 .wave-mixed-component {
  fill: none;
  stroke-width: 1.5;
  opacity: .48;
}
.ldv-wave-schematic-v136 .wave-mixed-reference { stroke: #83e5ff; }
.ldv-wave-schematic-v136 .wave-mixed-returned { stroke: #ff9ca8; }
.ldv-wave-schematic-v136 .wave-mixed-sum {
  stroke: #dc8ff1;
  stroke-width: 3.5;
  opacity: .98;
}
.ldv-wave-schematic-v136 .guide-reference,
.ldv-wave-schematic-v136 .guide-test,
.ldv-wave-schematic-v136 .guide-return,
.ldv-wave-schematic-v136 .guide-mixed {
  marker-start: none;
}


/* v139: playback speed, reset control, and biological presets */
.ldv-wave-controls-v136 {
  grid-template-columns: repeat(4, minmax(135px, 1fr)) auto auto;
}
.ldv-wave-reset-v139 {
  min-height: 2.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .58rem 1.05rem;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  color: var(--ink);
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}
.ldv-wave-reset-v139:hover,
.ldv-wave-reset-v139:focus-visible {
  border-color: var(--branch-2);
  outline: 2px solid color-mix(in srgb, var(--branch-2) 36%, transparent);
  outline-offset: 2px;
}
.ldv-wave-preset-v136 {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
}
@media (max-width: 1180px) {
  .ldv-wave-controls-v136 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ldv-wave-play-v136, .ldv-wave-reset-v139 { justify-self: start; }
}
@media (max-width: 680px) {
  .ldv-wave-controls-v136 { grid-template-columns: 1fr; }
  .ldv-wave-play-v136, .ldv-wave-reset-v139 { width: 100%; }
}


/* v140: compact static section with folding explanations; tighter animation grid */
.ldv-phase-head-v130 {
  padding: clamp(.9rem, 2vw, 1.35rem) clamp(1rem, 2.4vw, 1.55rem);
}
.ldv-phase-head-v130 h2 {
  font-size: clamp(1.45rem, 2.55vw, 2.25rem);
}
.ldv-phase-head-v130 p {
  margin-top: .38rem;
  line-height: 1.55;
}
.ldv-phase-layout-v130 {
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, .62fr);
  align-items: start;
}
.ldv-static-main-v140 {
  min-width: 0;
  border-right: 1px solid var(--line);
}
.ldv-static-main-v140 .ldv-schematic-card-v130 {
  border-right: 0;
  padding: clamp(.8rem, 1.7vw, 1.15rem);
}
.ldv-static-figure-v135 {
  border-radius: 19px;
  box-shadow: none;
}
.ldv-static-figure-v135 figcaption {
  padding: .62rem .82rem .7rem;
  font-size: .84rem;
  line-height: 1.45;
}
.ldv-phase-side-v140 {
  padding: clamp(.8rem, 1.7vw, 1.15rem);
  gap: .7rem;
}
.ldv-fold-v140 {
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: clip;
  background: var(--ldv-panel-soft);
}
.ldv-fold-v140 summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: .78rem .9rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ldv-fold-v140 summary::-webkit-details-marker { display: none; }
.ldv-fold-v140 summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--branch-2);
  font-family: var(--font-tech);
  font-size: 1rem;
  line-height: 1;
  transition: transform .2s ease, background .2s ease;
}
.ldv-fold-v140[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  background: color-mix(in srgb, var(--branch-2) 13%, transparent);
}
.ldv-fold-v140 summary:hover,
.ldv-fold-v140 summary:focus-visible {
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  outline: none;
}
.ldv-fold-title-v140 {
  font-weight: 840;
  color: var(--ink-strong);
}
.ldv-fold-hint-v140 {
  grid-column: 1;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.35;
}
.ldv-fold-body-v140 {
  padding: 0 .9rem .9rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.ldv-frequency-fold-v140 {
  margin: 0 clamp(.8rem, 1.7vw, 1.15rem) clamp(.8rem, 1.7vw, 1.15rem);
}
.ldv-frequency-fold-v140 .ldv-fold-body-v140 {
  padding-top: .8rem;
}
.ldv-frequency-fold-v140 .ldv-legend-v130 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .62rem;
  margin: 0;
}
.ldv-frequency-fold-v140 .ldv-legend-item-v130 {
  grid-template-columns: .85rem 1fr;
  gap: .5rem;
  padding: .55rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong) 52%, transparent);
}
.ldv-frequency-fold-v140 .ldv-swatch-v130 {
  width: .85rem;
  height: .85rem;
}
.ldv-frequency-fold-v140 strong {
  font-size: .79rem;
  line-height: 1.3;
}
.ldv-frequency-fold-v140 p {
  margin: .25rem 0 0;
  font-size: .74rem;
  line-height: 1.42;
}
.ldv-path-fold-v140 .ldv-step-list-v130 {
  margin: .8rem 0 0;
  gap: .58rem;
}
.ldv-path-fold-v140 .ldv-step-list-v130 li {
  grid-template-columns: 1.7rem 1fr;
  gap: .58rem;
}
.ldv-path-fold-v140 .ldv-step-num-v130 {
  width: 1.7rem;
  height: 1.7rem;
  font-size: .76rem;
}
.ldv-path-fold-v140 .ldv-step-list-v130 strong { font-size: .88rem; }
.ldv-path-fold-v140 .ldv-step-list-v130 p {
  margin-top: .24rem;
  font-size: .8rem;
  line-height: 1.46;
}
.ldv-order-fold-v140 .ldv-order-v130 {
  margin: .8rem 0 0;
  padding: .7rem .78rem;
}
.ldv-order-fold-v140 .ldv-order-v130 p {
  font-size: .78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Let the animation and detector panel size themselves instead of stretching the left column. */
.ldv-wave-grid-v136 {
  align-items: start;
}
.ldv-wave-schematic-wrap-v136 {
  align-self: start;
  padding-bottom: .9rem;
}
.ldv-wave-side-v136 {
  align-self: start;
  padding-bottom: .9rem;
}
.ldv-beat-canvas-v136 {
  height: 270px;
}
.ldv-wave-values-strip-v140 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  padding: 0 clamp(1rem, 2.5vw, 1.45rem) 1rem;
  border-top: 0;
}
.ldv-wave-values-strip-v140 .ldv-wave-value-v136 {
  padding: .72rem .8rem;
}

@media (max-width: 1180px) {
  .ldv-frequency-fold-v140 .ldv-legend-v130 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1080px) {
  .ldv-static-main-v140 {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ldv-wave-values-strip-v140 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .ldv-frequency-fold-v140 .ldv-legend-v130 {
    grid-template-columns: 1fr 1fr;
  }
  .ldv-fold-v140 summary {
    grid-template-columns: 1fr auto;
  }
}
@media (max-width: 520px) {
  .ldv-frequency-fold-v140 .ldv-legend-v130,
  .ldv-wave-values-strip-v140 {
    grid-template-columns: 1fr;
  }
}


/* v141 theme-aware static figure and refined light-mode LDV visuals */
.ldv-static-figure-v141 {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  box-shadow: var(--shadow);
}
.ldv-static-figure-v141 .ldv-static-image-dark,
.ldv-static-figure-v141 .ldv-static-image-light {
  display: block;
  width: 100%;
  height: auto;
}
.ldv-static-figure-v141 .ldv-static-image-light { display: none; }
html.light-mode .ldv-static-figure-v141 .ldv-static-image-dark { display: none; }
html.light-mode .ldv-static-figure-v141 .ldv-static-image-light { display: block; }
.ldv-static-figure-v141 figcaption {
  padding: .9rem 1rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}
html.light-mode .ldv-wave-module-v136 {
  border-color: color-mix(in srgb, var(--branch) 18%, var(--line));
  background: linear-gradient(180deg, rgba(255,255,255,.985), rgba(245,248,252,.95));
}
html.light-mode .ldv-wave-controls-v136,
html.light-mode .ldv-wave-card-v136,
html.light-mode .ldv-wave-explainer-v136 article,
html.light-mode .ldv-wave-value-v136 {
  background: color-mix(in srgb, white 92%, var(--branch-bg-a));
}
html.light-mode .ldv-wave-schematic-v136 {
  background:
    linear-gradient(rgba(36, 88, 144, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(36, 88, 144, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, #fcfdff, #eff5fb);
}
html.light-mode .ldv-wave-schematic-v136 .device { fill: rgba(255,255,255,.97); stroke: rgba(60,88,120,.92); }
html.light-mode .ldv-wave-schematic-v136 .splitter { fill: rgba(86,182,255,.10); stroke: #2f8dea; }
html.light-mode .ldv-wave-schematic-v136 .mirror,
html.light-mode .ldv-wave-schematic-v136 .bragg { fill: rgba(86,182,255,.08); stroke: #2f8dea; }
html.light-mode .ldv-wave-schematic-v136 .guide-reference { stroke: rgba(55,143,235,.42); }
html.light-mode .ldv-wave-schematic-v136 .guide-test { stroke: rgba(239,90,104,.4); }
html.light-mode .ldv-wave-schematic-v136 .guide-return { stroke: rgba(234,130,152,.5); }
html.light-mode .ldv-wave-schematic-v136 .guide-mixed { stroke: rgba(170,95,230,.42); }
html.light-mode .ldv-wave-schematic-v136 .wave-reference { stroke: #2f8cf0; }
html.light-mode .ldv-wave-schematic-v136 .wave-return { stroke: #eb6e8b; }
html.light-mode .ldv-wave-schematic-v136 .wave-mixed { stroke: #9f67e5; }
html.light-mode .ldv-wave-schematic-v136 .target-motion { stroke: #67b93f; }
html.light-mode .ldv-wave-schematic-v136 .target-dot { fill: #67b93f; }
html.light-mode .ldv-wave-schematic-v136 .wave-note-bg { fill: rgba(255,255,255,.86); stroke: rgba(87,111,138,.28); }
html.light-mode .ldv-beat-canvas-v136 { background: linear-gradient(180deg, rgba(255,255,255,.985), rgba(244,248,252,.94)); }
