.page-noether-symmetry-conservation-observatory {
    --noether-ink: #e8efff;
    --noether-muted: #a5b5d4;
    --noether-line: rgba(164, 192, 255, .22);
    --noether-panel: rgba(12, 24, 48, .82);
    --noether-panel-deep: #09172e;
    --noether-cyan: #72e3e9;
    --noether-blue: #7c9dff;
    --noether-amber: #ffc56b;
    --noether-coral: #ff8f84;
    --noether-green: #77e1ac;
    overflow-x: clip;
}

.noether-app {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 44px) 60px;
    color: var(--noether-ink);
}

.noether-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
    gap: 20px;
    align-items: start;
}

.noether-stage,
.noether-controls,
.noether-readouts,
.noether-diagnostics,
.noether-notes > article {
    background:
        linear-gradient(145deg, rgba(26, 54, 96, .44), rgba(7, 20, 41, .92)),
        var(--noether-panel);
    border-color: var(--noether-line);
    box-shadow: 0 16px 42px rgba(2, 9, 24, .22);
}

.noether-stage {
    min-width: 0;
    padding: clamp(18px, 2.6vw, 32px);
}

.noether-stage__head {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.noether-stage__head > div {
    min-width: 0;
}

.noether-route-chip {
    display: inline-flex;
    margin: 0 0 12px;
    padding: 7px 10px;
    border: 1px solid rgba(114, 227, 233, .38);
    border-radius: 999px;
    color: var(--noether-cyan);
    font: 700 .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .11em;
}

.noether-stage h2 {
    max-width: 18ch;
    margin: 5px 0 10px;
    font-size: clamp(1.55rem, 3.5vw, 3rem);
    line-height: 1.02;
    letter-spacing: -.035em;
}

.noether-stage__head p:not(.noether-route-chip):not(.eyebrow) {
    max-width: 72ch;
    margin: 0;
    color: var(--noether-muted);
    line-height: 1.65;
}

.noether-state-badge,
#noetherReadoutBadge,
#noetherDiagnosticsBadge {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid rgba(119, 225, 172, .48);
    border-radius: 999px;
    color: var(--noether-green);
    font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .1em;
}

.noether-state-badge[data-state="running"] {
    color: var(--noether-amber);
    border-color: rgba(255, 197, 107, .56);
}

.noether-state-badge[data-state="done"] {
    color: var(--noether-cyan);
    border-color: rgba(114, 227, 233, .52);
}

.noether-canvas-frame {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(155, 190, 255, .25);
    border-radius: 14px;
    background: #07152a;
}

#noetherCanvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
    min-height: 280px;
    outline: none;
    background: #07152a;
}

#noetherCanvas:focus-visible {
    box-shadow: inset 0 0 0 3px var(--noether-amber);
}

.noether-canvas-legend {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    padding: 7px 9px;
    border: 1px solid rgba(180, 206, 255, .17);
    border-radius: 8px;
    background: rgba(5, 14, 29, .76);
    color: var(--noether-muted);
    font-size: .74rem;
    line-height: 1.3;
    pointer-events: none;
}

.noether-canvas-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.noether-canvas-legend i {
    width: 17px;
    height: 3px;
    border-radius: 4px;
    display: inline-block;
}

.noether-legend-charge { background: var(--noether-cyan); }
.noether-legend-expected { background: var(--noether-amber); }
.noether-legend-state { background: var(--noether-coral); }

.noether-canvas-fallback {
    min-height: 280px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(114, 227, 233, .08), transparent 48%),
        #07152a;
    color: var(--noether-muted);
}

.noether-canvas-fallback strong {
    display: block;
    margin-bottom: 8px;
    color: var(--noether-amber);
    font: 700 .75rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .12em;
}

.noether-canvas-fallback p {
    margin: 0 0 12px;
    line-height: 1.55;
}

#noetherFallbackSummary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#noetherFallbackSummary div {
    padding: 9px;
    border: 1px solid var(--noether-line);
    border-radius: 7px;
    color: var(--noether-ink);
    font: .77rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.noether-canvas-help,
.noether-live {
    color: var(--noether-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.noether-canvas-help {
    margin: 11px 0 0;
}

.noether-live {
    min-height: 1.4em;
    margin: 8px 0 0;
    color: var(--noether-cyan);
}

.noether-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 17px 0 0;
}

.noether-metrics > div,
.noether-readout-grid > div {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(155, 190, 255, .18);
    border-radius: 8px;
    background: rgba(4, 12, 26, .4);
}

.noether-metrics dt,
.noether-readout-grid dt,
.noether-chamber-status dt {
    margin: 0 0 5px;
    color: var(--noether-muted);
    font: 700 .64rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.noether-metrics dd,
.noether-readout-grid dd,
.noether-chamber-status dd {
    margin: 0;
    color: var(--noether-ink);
    font: 700 .92rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.noether-controls {
    position: sticky;
    top: 18px;
    min-width: 0;
    padding: clamp(18px, 2.2vw, 28px);
}

.noether-controls .control-heading {
    margin-bottom: 18px;
}

.noether-controls .control-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.noether-controls .control-readout {
    color: var(--noether-cyan);
}

.noether-chamber-status {
    margin: 0 0 17px;
    padding: 13px;
    border: 1px solid rgba(114, 227, 233, .2);
    border-radius: 9px;
    background: rgba(4, 13, 29, .48);
}

.noether-chamber-status > p {
    margin: 0 0 9px;
    color: var(--noether-cyan);
    font: 700 .68rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .12em;
}

.noether-chamber-status dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
}

.noether-chamber-status dd {
    font-size: .76rem;
}

.noether-control-group {
    padding: 16px 0;
    border-top: 1px solid rgba(155, 190, 255, .15);
}

.noether-control-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.noether-control-group .section-heading {
    margin-bottom: 10px;
}

.noether-control-help,
.noether-inline-readout {
    margin: 9px 0 0;
    color: var(--noether-muted);
    font-size: .77rem;
    line-height: 1.48;
}

.noether-inline-readout {
    color: var(--noether-green);
    font: 700 .69rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.noether-inline-readout[data-breaking="on"] {
    color: var(--noether-amber);
}

.noether-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.noether-controls button,
.noether-diagnostics button,
.noether-controls input[type="range"] {
    min-height: 44px;
}

.noether-controls button,
.noether-diagnostics button {
    border: 1px solid rgba(155, 190, 255, .27);
    border-radius: 7px;
    padding: 9px 10px;
    background: rgba(11, 29, 56, .86);
    color: var(--noether-ink);
    font: 700 .71rem/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .07em;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

.noether-controls button:hover,
.noether-diagnostics button:hover {
    border-color: var(--noether-cyan);
    background: rgba(28, 66, 96, .9);
}

.noether-controls button:focus-visible,
.noether-diagnostics button:focus-visible,
#noetherPngDownload:focus-visible {
    outline: 3px solid var(--noether-amber);
    outline-offset: 2px;
}

.noether-controls button:active,
.noether-diagnostics button:active {
    transform: translateY(1px);
}

.noether-controls button.is-active,
.noether-controls button.primary-control,
.noether-diagnostics button.primary-control {
    border-color: rgba(114, 227, 233, .65);
    background: rgba(30, 103, 117, .7);
    color: #f3ffff;
}

.noether-controls button:disabled,
.noether-diagnostics button:disabled {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}

.noether-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.noether-action-grid #noetherPlay {
    color: #f3ffff;
}

.noether-shortcut-note {
    padding: 13px;
    border: 1px dashed rgba(255, 197, 107, .38);
    border-radius: 8px;
    background: rgba(90, 58, 29, .12);
}

.noether-shortcut-note h3 {
    margin: 0 0 7px;
    color: var(--noether-amber);
    font: 700 .69rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .11em;
}

.noether-shortcut-note p {
    margin: 0;
    color: var(--noether-muted);
    font-size: .75rem;
    line-height: 1.55;
}

kbd {
    display: inline-block;
    padding: 2px 5px;
    border: 1px solid rgba(198, 218, 255, .35);
    border-bottom-width: 2px;
    border-radius: 4px;
    color: var(--noether-ink);
    font: 700 .68rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.noether-results {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 20px;
    margin-top: 20px;
}

.noether-readouts,
.noether-diagnostics {
    min-width: 0;
    padding: clamp(18px, 2.6vw, 30px);
}

.noether-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
}

.noether-card-head h2 {
    margin: 5px 0 0;
    font-size: clamp(1.25rem, 2.4vw, 1.9rem);
}

.noether-readout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
}

.noether-readout-grid .is-wide {
    grid-column: 1 / -1;
}

.noether-readout-grid .is-wide dd {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.55;
}

.noether-readout-note,
.noether-test-case {
    color: var(--noether-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.noether-readout-note {
    margin: 13px 0 0;
}

.noether-test-case {
    min-height: 1.4em;
    margin: 0 0 12px;
    color: var(--noether-cyan);
}

.noether-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.noether-diagnostics table {
    width: 100%;
    border-collapse: collapse;
    font-size: .74rem;
}

.noether-diagnostics th,
.noether-diagnostics td {
    padding: 9px 7px;
    border-bottom: 1px solid rgba(155, 190, 255, .15);
    text-align: left;
    vertical-align: top;
}

.noether-diagnostics th {
    color: var(--noether-muted);
    font: 700 .64rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.noether-diagnostics td {
    color: var(--noether-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.noether-diagnostics td:last-child {
    color: var(--noether-green);
    font-weight: 700;
}

.noether-diagnostics > button {
    margin-top: 14px;
}

.noether-output-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.noether-report-details {
    margin-top: 14px;
    border-top: 1px solid rgba(155, 190, 255, .15);
    padding-top: 12px;
}

.noether-report-details summary {
    min-height: 44px;
    padding: 12px 0;
    color: var(--noether-cyan);
    cursor: pointer;
    font-size: .78rem;
}

#noetherReportOutput {
    max-height: 330px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(155, 190, 255, .18);
    border-radius: 7px;
    background: #061126;
    color: var(--noether-muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: .7rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#noetherPngDownload {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 9px;
    color: var(--noether-amber);
    font-size: .78rem;
}

.noether-notes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.noether-notes > article {
    min-width: 0;
    padding: 22px;
}

.noether-notes h2 {
    margin: 5px 0 10px;
    font-size: 1.25rem;
    line-height: 1.15;
}

.noether-notes p,
.noether-notes li {
    color: var(--noether-muted);
    font-size: .82rem;
    line-height: 1.62;
}

.noether-notes p {
    margin: 0 0 9px;
}

.noether-notes ul {
    margin: 0;
    padding-left: 1.2em;
}

.noether-formula-wrap {
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    gap: 20px;
    margin-top: 20px;
}

.noether-formula-wrap .formula-note,
.noether-formula-wrap .lab-observation-guide {
    min-width: 0;
    margin: 0;
}

.noether-formula-wrap code {
    color: var(--noether-amber);
    font-size: .82rem;
}

.noether-formula-wrap .lab-observation-guide {
    padding: 22px;
}

.noether-formula-wrap .lab-observation-guide h2 {
    margin-top: 5px;
}

.noether-formula-wrap .lab-observation-guide li,
.noether-formula-wrap .lab-observation-guide p {
    line-height: 1.6;
}

.noether-lower-grid {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 44px);
}

@media (max-width: 1100px) {
    .noether-layout,
    .noether-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .noether-controls {
        position: static;
    }

    .noether-notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .noether-notes > article:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .noether-app {
        padding-right: 12px;
        padding-left: 12px;
        padding-bottom: 38px;
    }

    .noether-stage,
    .noether-controls,
    .noether-readouts,
    .noether-diagnostics,
    .noether-notes > article {
        padding: 16px;
    }

    .noether-stage__head {
        display: block;
    }

    .noether-state-badge {
        margin-top: 12px;
    }

    .noether-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .noether-notes,
    .noether-formula-wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .noether-notes > article:last-child {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .noether-app {
        padding-right: 8px;
        padding-left: 8px;
    }

    .noether-stage,
    .noether-controls,
    .noether-readouts,
    .noether-diagnostics,
    .noether-notes > article {
        padding: 13px;
    }

    .noether-route-chip {
        max-width: 100%;
        white-space: normal;
        border-radius: 8px;
        line-height: 1.35;
    }

    .noether-stage h2 {
        font-size: 1.55rem;
    }

    .noether-canvas-legend {
        right: 8px;
        bottom: 8px;
        left: 8px;
        gap: 5px 9px;
        font-size: .67rem;
    }

    .noether-canvas-help {
        font-size: .72rem;
    }

    .noether-chamber-status dl,
    .noether-readout-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .noether-readout-grid .is-wide {
        grid-column: auto;
    }

    .noether-segmented,
    .noether-action-grid,
    .noether-output-row {
        gap: 4px;
    }

    .noether-controls button,
    .noether-diagnostics button {
        padding-right: 6px;
        padding-left: 6px;
        font-size: .64rem;
    }

    .noether-shortcut-note p {
        font-size: .7rem;
    }

    #noetherFallbackSummary {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .noether-controls button,
    .noether-diagnostics button {
        transition: none;
    }
}
