.tool-main [hidden] {
    display: none !important;
}

.dg-select {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}

.control-note {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--g-ink-3);
    margin: 4px 0 0;
}

.dg-n-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dg-n-row input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
}

.dg-n-row .optics-num-input {
    flex: 0 0 auto;
}

.preset-note {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--g-ink-2);
    margin: 10px 0 0;
    min-height: 1.5em;
}

.dg-cursor {
    font-family: var(--g-font-mono);
    font-size: 0.78rem;
    min-height: 2.6em;
    overflow-wrap: anywhere;
}

.dg-table-title {
    margin: 18px 0 6px;
    font-family: var(--g-font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--g-ink-2);
}

.dg-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.optics-data-table td.dg-missing {
    color: var(--g-ember);
    font-weight: 600;
}

#zcSlider+.optics-num-wrap .optics-num-input,
#lcSlider+.optics-num-wrap .optics-num-input {
    width: 8.5em;
}

#detCanvas {
    cursor: crosshair;
}

body.tool-optics-lab .dg-related {
    margin: 32px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--g-rule-strong);
}

body.tool-optics-lab .dg-related h2 {
    margin: 0 0 10px;
    font-family: var(--g-font-display);
    font-size: 1.25rem;
    text-align: left;
    font-weight: 600;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--g-ink);
}

body.tool-optics-lab .dg-related ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 0 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.tool-optics-lab .dg-related li {
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--g-rule);
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--g-ink-3);
}

body.tool-optics-lab .dg-related a {
    color: var(--g-ink);
    font-weight: 500;
    text-decoration: none;
}

body.tool-optics-lab .dg-related a:hover {
    color: var(--g-gold);
    text-decoration: underline;
}

body.tool-optics-lab .dg-related {
    max-width: 1400px;
    margin: 40px auto 48px;
    box-sizing: border-box;
}

body.tool-optics-lab .dg-related a {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body.tool-optics-lab .dg-related a strong {
    font-weight: 500;
}

body.tool-optics-lab .dg-related a span {
    font-size: 0.84rem;
    color: var(--g-ink-3);
    line-height: 1.45;
}

body.tool-optics-lab .dg-related a:hover {
    text-decoration: none;
}

body.tool-optics-lab .dg-related a:hover strong {
    text-decoration: underline;
}

body.tool-optics-lab .dg-related a:hover span {
    color: var(--g-ink-2);
}

#readouts {
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    margin-top: 10px;
}