.wavefront-hero {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr);
  gap: clamp(28px,5vw,70px);
  align-items: center;
  padding-top: 74px;
  padding-bottom: 54px;
}
.wavefront-hero > *,
.wavefront-foundation-grid > *,
.wavefront-family-grid > *,
.wavefront-motion-grid > *,
.wavefront-detail-grid > *,
.wavefront-limits-grid > * { min-width: 0; }
.wavefront-hero-copy :is(h1,h2) { margin: 10px 0 18px; max-width: 900px; font-size: clamp(2.45rem,5vw,5rem); line-height: .98; letter-spacing: -.045em; }
.wavefront-hero-copy :is(h1,h2) em { color: var(--accent); font-style: normal; }
.wavefront-hero-copy p { max-width: 790px; color: var(--muted); font-size: clamp(1rem,1.5vw,1.13rem); }
.wavefront-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.wavefront-hero-card,
.wavefront-card,
.wavefront-panel,
.wavefront-note,
.wavefront-caution,
.wavefront-assumption,
.wavefront-limits-grid article { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.wavefront-hero-card { padding: 24px; border-radius: var(--radius); }
.wavefront-hero-card > span,
.wavefront-card > span,
.wavefront-reading > span,
.wavefront-limits-grid article > span { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.wavefront-equation { display: grid; place-items: center; min-height: 72px; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb,var(--bg-elevated) 78%,transparent); font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; text-align: center; overflow-wrap: anywhere; }
.wavefront-equation.large { min-height: 106px; font-size: clamp(.96rem,1.7vw,1.25rem); }
.wavefront-mini-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.wavefront-mini-grid div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb,var(--panel-solid) 72%,transparent); }
.wavefront-mini-grid span { display: block; color: var(--muted); font-size: .7rem; }
.wavefront-mini-grid strong { display: block; margin-top: 4px; font-size: .82rem; overflow-wrap: anywhere; }

.wavefront-foundation { padding: 44px 0 68px; }
.wavefront-foundation-grid,
.wavefront-family-grid,
.wavefront-motion-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.wavefront-card { padding: 22px; border-radius: var(--radius); box-shadow: none; }
.wavefront-card.primary { background: color-mix(in srgb,var(--accent) 8%,var(--panel)); border-color: color-mix(in srgb,var(--accent) 34%,var(--line)); }
.wavefront-card p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.wavefront-note,
.wavefront-caution { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; align-items: start; margin-top: 14px; padding: 20px 22px; border-radius: var(--radius-sm); box-shadow: none; }
.wavefront-note strong { color: var(--warm); }
.wavefront-caution strong { color: var(--accent-3); }
.wavefront-note p,.wavefront-caution p { margin: 0; color: var(--muted); }
.wavefront-families { padding: 66px 0; border-block: 1px solid var(--line); background: color-mix(in srgb,var(--bg-elevated) 52%,transparent); }
.wavefront-motion { padding: 66px 0 42px; }

.wavefront-lab-section { padding: 64px 0 62px; }
.wavefront-lab-shell { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 14px; align-items: start; }
.wavefront-controls { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb,var(--bg-elevated) 92%,transparent); box-shadow: var(--shadow); }
.wavefront-control-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
.wavefront-control-head > div { display: grid; gap: 3px; }
.wavefront-control-head span { color: var(--muted); font-size: .72rem; }
.wavefront-control-head strong { font-size: .88rem; }
.wavefront-status { min-width: max-content; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent) !important; font-weight: 800; letter-spacing: .04em; }
.wavefront-controls label { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; align-items: center; min-width: 0; font-size: .78rem; font-weight: 700; }
.wavefront-controls label > span { min-width: 0; }
.wavefront-controls output { color: var(--accent); font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: .75rem; }
.wavefront-controls input[type="range"] { grid-column: 1 / -1; width: 100%; min-width: 0; accent-color: var(--accent); }
.wavefront-controls label.is-disabled { opacity: .48; }
.wavefront-presets { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.wavefront-presets legend { padding: 0 5px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.wavefront-presets > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.wavefront-presets button { min-width: 0; min-height: 36px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); cursor: pointer; font-size: .68rem; font-weight: 750; }
.wavefront-presets button:hover,.wavefront-presets button:focus-visible,.wavefront-presets button.is-active { border-color: color-mix(in srgb,var(--accent) 55%,var(--line)); background: color-mix(in srgb,var(--accent) 11%,var(--panel)); }
.wavefront-reset { width: 100%; }
.wavefront-assumption { padding: 13px; border-radius: 12px; box-shadow: none; }
.wavefront-assumption strong { font-size: .76rem; }
.wavefront-assumption p { margin: 5px 0 0; color: var(--muted); font-size: .71rem; line-height: 1.45; }

.wavefront-stage { min-width: 0; display: grid; gap: 14px; }
.wavefront-panel { min-width: 0; padding: 16px; border-radius: var(--radius); box-shadow: none; }
.wavefront-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.wavefront-panel-head > div:first-child { display: grid; gap: 3px; }
.wavefront-panel-head span { color: var(--muted); font-size: .7rem; }
.wavefront-panel-head strong { font-size: .88rem; }
.wavefront-readout { text-align: right; }
.wavefront-readout strong { display: block; color: var(--accent); font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: .8rem; overflow-wrap: anywhere; }
.wavefront-geometry-svg,.wavefront-cut-svg { display: block; width: 100%; overflow: hidden; }
.wf-plot-bg { fill: color-mix(in srgb,var(--bg-elevated) 82%,transparent); stroke: var(--line); stroke-width: 1.5; }
.wf-grid line { stroke: var(--line); stroke-width: 1; }
.wf-front { fill: none; stroke: color-mix(in srgb,var(--accent-2) 65%,var(--muted)); stroke-width: 1.8; opacity: .72; }
.wf-front-highlight { fill: none; stroke: var(--accent); stroke-width: 3.4; }
.wf-front-adjacent { fill: none; stroke: var(--accent-3); stroke-width: 2.4; stroke-dasharray: 8 6; }
.wf-source-core { fill: var(--warm); stroke: var(--bg-elevated); stroke-width: 3; }
.wf-source-ring { fill: none; stroke: var(--warm); stroke-width: 1.5; opacity: .6; }
.wf-tangent { stroke: var(--accent-3); stroke-width: 2.6; stroke-dasharray: 7 6; }
.wf-normal { stroke: var(--warm); stroke-width: 3.4; stroke-linecap: round; }
.wf-probe { fill: var(--warm); stroke: var(--bg-elevated); stroke-width: 3; }
.wf-svg-label { fill: var(--muted); font: 600 15px Inter,ui-sans-serif,system-ui,sans-serif; }
.wf-svg-label.accent { fill: var(--accent); font-weight: 750; }
.wf-axis { stroke: var(--line-strong); stroke-width: 1.4; }
.wf-axis.muted { stroke: var(--line); }
.wf-cut-wave { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.wf-same-phase { stroke: var(--accent-3); stroke-width: 1.7; stroke-dasharray: 6 5; }
.wf-cut-point { fill: var(--accent-3); stroke: var(--bg-elevated); stroke-width: 2.5; }
.wf-lambda-bracket { stroke: var(--accent-3); stroke-width: 1.8; }
.wavefront-detail-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 14px; }
.wavefront-reading h3 { margin: 7px 0 8px; font-size: 1.12rem; }
.wavefront-reading p { margin: 0; color: var(--muted); font-size: .9rem; }
.wavefront-local-state { display: grid; gap: 7px; margin-top: 16px; }
.wavefront-local-state div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb,var(--bg-elevated) 62%,transparent); }
.wavefront-local-state span { display: block; color: var(--muted); font-size: .66rem; }
.wavefront-local-state strong { display: block; margin-top: 3px; font-size: .76rem; overflow-wrap: anywhere; }
.wavefront-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.wavefront-metrics div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.wavefront-metrics span,.wavefront-metrics small { display: block; color: var(--muted); font-size: .68rem; }
.wavefront-metrics strong { display: block; margin: 4px 0 2px; font-size: .88rem; overflow-wrap: anywhere; }
.wavefront-check-panel { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.wavefront-check-panel div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb,var(--bg-elevated) 62%,transparent); }
.wavefront-check-panel span,.wavefront-check-panel small { display: block; color: var(--muted); font-size: .66rem; }
.wavefront-check-panel strong { display: block; margin: 4px 0 2px; color: var(--accent-3); font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: .78rem; overflow-wrap: anywhere; }
.wavefront-cross-reference { margin: 18px 0 0; color: var(--muted); font-size: .84rem; }
.wavefront-cross-reference a { color: var(--text); }
.wavefront-limits { padding: 48px 0 54px; }
.wavefront-limits-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.wavefront-limits-grid article { padding: 18px; border-radius: var(--radius-sm); box-shadow: none; }
.wavefront-limits-grid strong { display: block; margin-top: 6px; font-size: .98rem; }
.wavefront-limits-grid p { margin: 7px 0 0; color: var(--muted); font-size: .83rem; }

@media (max-width: 1040px) {
  .wavefront-hero { grid-template-columns: 1fr; }
  .wavefront-hero-card { max-width: 680px; }
  .wavefront-lab-shell { grid-template-columns: 1fr; }
  .wavefront-controls { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wavefront-control-head,.wavefront-presets,.wavefront-reset,.wavefront-assumption { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .wavefront-hero { padding-top: 54px; }
  .wavefront-foundation-grid,.wavefront-family-grid,.wavefront-motion-grid,.wavefront-limits-grid { grid-template-columns: 1fr; }
  .wavefront-note,.wavefront-caution { grid-template-columns: 1fr; gap: 5px; }
  .wavefront-detail-grid { grid-template-columns: 1fr; }
  .wavefront-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wavefront-check-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wavefront-hero-copy :is(h1,h2) { font-size: clamp(2.2rem,11vw,3.4rem); overflow-wrap: anywhere; }
  .wavefront-controls { grid-template-columns: 1fr; padding: 14px; }
  .wavefront-controls label,.wavefront-control-head,.wavefront-presets,.wavefront-reset,.wavefront-assumption { grid-column: 1; }
  .wavefront-panel { padding: 12px; }
  .wavefront-panel-head { display: grid; gap: 6px; }
  .wavefront-readout { text-align: left; }
  .wavefront-metrics { grid-template-columns: 1fr 1fr; }
  .wf-svg-label { font-size: 17px; }
}
@media (max-width: 350px) {
  .wavefront-metrics { grid-template-columns: 1fr; }
  .wavefront-hero-actions { display: grid; }
  .wavefront-presets > div { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .wavefront-motion .section-heading h2 { overflow-wrap: anywhere; }
}
