:root {
    --zeiss-blue: #0a4ea3;
    --zeiss-blue-dark: #07397a;
    --surface: #ffffff;
    --bg: #f7f7f7;
    --border: #e9e9e9;
    --text: #1f2a3a;
    --muted: #66748b;
    --error: #d93025;
    --warning: #f39c12;
    --ok: #1c7a33;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.paths {
    display: none;
}

.page, 
.box {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header > .box {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand img {
    width: 76px;
}

.title {
    padding: 10px 0;
}

.title h1 {
    margin: 0;
    font-size: 20px;
    color: var(--zeiss-blue-dark);
}

.title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.calculators {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.top-instruction {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--zeiss-blue-dark);
}

.top-bar {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.info-btn {
    appearance: none;
    border: 1px solid var(--zeiss-blue-dark);
    border-radius: 16px;
    background: #fff;
    color: var(--zeiss-blue-dark);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.info-btn:hover {
    background: var(--zeiss-blue-dark);
    color: #fff;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(11, 47, 99, 0.06);
}

.eye-label {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--zeiss-blue-dark);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eye-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.eye-reset-btn {
    appearance: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--zeiss-blue-dark);
    border-radius: 50%;
    background: #fff;
    color: var(--zeiss-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.eye-reset-btn:hover {
    background: var(--zeiss-blue-dark);
    color: #fff;
}

.eye-reset-icon {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.paths {
    display: none;
}

.equation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.block {
    border: 1px solid #d1d3d7;
    border-radius: 10px;
    background: #ebedf0;
    padding: 10px;
}

.equals {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.equals-icon {
    width: 26px;
    height: 26px;
    display: block;
    fill: currentColor;
}

.field {
    margin-bottom: 10px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.4px;
}

input, select {
    width: 100%;
    height: 38px;
    border: 1px solid #c7d6eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
}

input:focus, select:focus {
    outline: none;
    border-color: #6698de;
    box-shadow: 0 0 0 3px rgba(10, 78, 163, 0.12);
}

.invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.12);
}

.dirty-result {
    border-color: var(--warning) !important;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.14);
}

.status {
    margin-top: 10px;
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
}

.status.ok { color: var(--ok); }
.status.warn { color: var(--warning); }
.status.error { color: var(--error); }

.arrow-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
    fill: currentColor;
    position: relative;
}
.arrow-icon > svg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    transform: translate(0, -50%);
}

.arrow-icon-reverse {
    transform: rotate(180deg);
}

.info-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    z-index: 20;
}

.info-popup-overlay.hidden {
    display: none;
}

.info-popup {
    width: min(760px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    padding: 14px 16px;
}

.info-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-popup-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--zeiss-blue-dark);
}

.info-close-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.info-line {
    margin: 6px 0;
    color: var(--zeiss-blue-dark);
    font-size: 14px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.info-or {
    margin: 4px 0;
    font-size: 14px;
    font-weight: 400;
}

.info-note {
    margin: 8px 0 0;
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
    color: var(--zeiss-blue-dark);
}

.header .left,
.header .right {
    display: flex;
    align-items: center;
    width: 30%;
}

.header .center {
    width: 40%;
}

@media (max-width: 950px) {
    .header > .box {
        justify-content: space-between;
    }
    .header .left,
    .header .center {
        width: auto;
    }

    .header .right {
        display: none;
    }
}


.header .center img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-width: 640px;
}
/* .illustration {
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
}

.illustration h2 {
    margin: 0 0 10px;
    color: var(--zeiss-blue-dark);
    font-size: 16px;
}

.illustration img {
    width: 100%;
    height: auto;
    border: 1px solid #d8e3f2;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    max-width: 640px;
} */

.notes {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 950px) {
    .calculators {
        grid-template-columns: 1fr;
    }
    .equation {
        grid-template-columns: 1fr;
    }
    .equals {
        text-align: center;
    }

    .equals-icon {
        transform: rotate(90deg);
    }

    .top-bar {
        align-items: flex-start;
    }

    .info-popup-overlay {
        padding-top: 72px;
    }

    .info-line,
    .info-or,
    .info-note {
        font-size: 12px;
    }
}
