:root {
    /* Lumotive brand palette (2024 Brand Guidelines) */
    --bg: #f0f0f0;
    --bg-deep: #e5e5e5;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: rgba(255, 255, 255, 0.97);
    --ink: #2e2e2e;
    --muted: #5a5a5a;
    --line: rgba(46, 46, 46, 0.12);
    --accent: #0078d0;
    --accent-strong: #065fa6;
    --amber: #ffb114;
    --brand-red: #ee0000;
    --valid: #0b632f;
    --near: #996a11;
    --invalid: #8f0805;
    --shadow: 0 30px 90px rgba(46, 46, 46, 0.14);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --content-width: 1440px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, #ffffff 0%, #f4f4f4 56%, #e5e5e5 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(46, 46, 46, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 46, 46, 0.03) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
    pointer-events: none;
}

.backdrop {
    display: none;
}

.backdrop-one {
    top: -10rem;
    right: -8rem;
    background: rgba(0, 120, 208, 0.25);
    animation: drift 20s ease-in-out infinite alternate;
}

.backdrop-two {
    bottom: -16rem;
    left: -12rem;
    background: rgba(238, 0, 0, 0.22);
    animation: drift 18s ease-in-out infinite alternate-reverse;
}

.page-shell {
    position: relative;
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.hero-copy,
.hero-strip,
.panel {
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
}

.hero-copy {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 24px;
    justify-content: start;
}

.hero-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 14rem);
    padding: 0.55rem 0.75rem;
    border-radius: 16px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top left, rgba(0, 120, 208, 0.12), transparent 60%);
    box-shadow: 0 18px 40px rgba(46, 46, 46, 0.08);
}

.hero-logo {
    display: block;
    width: min(100%, 12rem);
    height: auto;
}

.hero-copy-body {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
    text-align: left;
}

.hero-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto;
    gap: 0.55rem;
    align-items: stretch;
    padding: 0.55rem;
    border-radius: 18px;
}

.summary-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 1.4fr) auto;
    gap: 0.5rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid rgba(46, 46, 46, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(46, 46, 46, 0.12);
    backdrop-filter: blur(18px);
}

.summary-bar-item-wide strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-bar-item,
.summary-bar-status {
    padding: 0.48rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.summary-bar-item span {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-bar-item strong,
.summary-bar-status {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
}

.summary-bar-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
}

.summary-bar-status.is-valid,
.validation-pill.is-valid {
    color: var(--valid);
    background: rgba(11, 99, 47, 0.1);
    border-color: rgba(11, 99, 47, 0.22);
}

.summary-bar-status.is-near,
.validation-pill.is-near {
    color: var(--near);
    background: rgba(153, 106, 17, 0.11);
    border-color: rgba(153, 106, 17, 0.25);
}

.summary-bar-status.is-invalid,
.validation-pill.is-invalid {
    color: var(--invalid);
    background: rgba(143, 8, 5, 0.1);
    border-color: rgba(143, 8, 5, 0.24);
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2rem, 3.2vw, 3.15rem);
    max-width: none;
}

h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

h3 {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.hero-text,
.panel-copy,
.section-copy,
.results-note,
.guidance-card p,
.field-hint,
.metric-label,
.notes-list,
.meter-labels,
.status-strip,
.section-heading {
    color: var(--muted);
}

.hero-text {
    max-width: 40ch;
    margin: 0.25rem 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.panel-copy,
.section-copy {
    margin: 0.45rem 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.strip-item {
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

.strip-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--muted);
}

.strip-item strong {
    font-size: 1rem;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-weight: 600;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.panel {
    padding: 1.4rem;
    border-radius: var(--radius-xl);
}

.results-panel {
    align-self: start;
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.panel-heading,
.section-heading,
.status-strip,
.card-header,
.result-card-top,
.meter-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.results-heading {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.section-heading-stack {
    align-items: flex-start;
}

.panel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.toolbar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.field-compact {
    gap: 0.4rem;
}

.field-label,
.card-label,
.guidance-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: var(--muted);
}

.select-input,
.input-shell input,
.input-shell select {
    width: 100%;
    border: 1px solid rgba(46, 46, 46, 0.16);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    color: var(--ink);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.select-input {
    padding: 0.95rem 1rem;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 1.25rem) calc(1.25rem + 2px),
        calc(100% - 0.95rem) calc(1.25rem + 2px);
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
}

.select-input:focus,
.input-shell input:focus,
.input-shell select:focus {
    outline: none;
    border-color: rgba(0, 120, 208, 0.58);
    box-shadow: 0 0 0 5px rgba(0, 120, 208, 0.14);
    transform: translateY(-1px);
}

.select-input:disabled,
.secondary-button:disabled,
.primary-button:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.segmented-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.segment-button,
.primary-button,
.secondary-button,
.preset-button,
.preset-option,
.sensor-tab,
.advanced-toggle {
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.segment-button {
    min-width: 3rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    border: 1px solid transparent;
}

.segment-button.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 700;
    border-color: rgba(6, 95, 166, 0.6);
    box-shadow: 0 18px 40px rgba(6, 95, 166, 0.28);
}

.segment-button:hover,
.primary-button:hover,
.secondary-button:hover,
.preset-button:hover,
.preset-option:hover,
.sensor-tab:hover,
.advanced-toggle:hover {
    transform: translateY(-1px);
}

.primary-button {
    padding: 0.9rem 1.15rem;
    border-radius: 18px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 20px 38px rgba(6, 95, 166, 0.22);
    font-weight: 700;
}

.secondary-button,
.advanced-toggle {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    border: 1px solid var(--line);
    font-weight: 600;
}

#developerModeButton[aria-pressed="true"] {
    background: rgba(0, 120, 208, 0.12);
    color: var(--accent-strong);
    border-color: rgba(0, 120, 208, 0.25);
}

.status-strip {
    justify-content: flex-start;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.45));
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.92rem;
    color: var(--ink);
}

.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(0, 120, 208, 0.12);
}

.guidance-card,
.preset-shell,
.preset-summary,
.fov-shell,
.chart-card,
.results-highlight,
.table-shell,
.notes-shell,
.constant-card,
.sensor-card,
.result-card,
.summary-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.62));
}

.guidance-card {
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.15rem;
    border-left: 4px solid var(--amber);
}

.preset-shell,
.fov-shell {
    margin: 1.1rem 0 0;
    padding: 1.15rem;
}

.preset-grid,
.fov-grid,
.preset-summary-grid {
    display: grid;
    gap: 0.9rem;
}

.preset-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.preset-button,
.preset-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 46, 46, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    text-align: left;
    width: 100%;
}

.preset-button.is-active,
.preset-option.is-active {
    border-color: rgba(0, 120, 208, 0.32);
    background: rgba(0, 120, 208, 0.09);
}

.preset-radio {
    flex: 0 0 auto;
    width: 0.92rem;
    height: 0.92rem;
    margin-top: 0.2rem;
    border-radius: 999px;
    border: 2px solid rgba(46, 46, 46, 0.36);
}

.preset-option.is-active .preset-radio {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 3px white;
    background: var(--accent);
}

.preset-option-text {
    display: grid;
    gap: 0.2rem;
}

.preset-option-text strong {
    font-size: 0.98rem;
}

.preset-option-text span,
.preset-button-copy {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.summary-chip,
.preset-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 120, 208, 0.08);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.preset-summary {
    margin-top: 0.8rem;
    padding: 0.85rem;
    border-radius: 12px;
}

.preset-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 0.9rem;
}

.preset-summary-card {
    padding: 0.85rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background: rgba(255, 255, 255, 0.55);
}

.preset-summary-card strong {
    display: block;
    margin-top: 0.38rem;
    font-size: 1.02rem;
}

.preset-summary-note {
    margin: 0.8rem 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.preset-detail-line {
    margin: 0.45rem 0 0.7rem;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.45;
}

.reference-note {
    margin: 0.85rem 0 0;
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 120, 208, 0.12);
    background: linear-gradient(180deg, rgba(0, 120, 208, 0.08), rgba(0, 120, 208, 0.04));
    color: var(--accent-strong);
    line-height: 1.6;
}

.reference-note-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.reference-chip {
    min-width: 142px;
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 120, 208, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.reference-chip-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.reference-chip-value {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.reference-note-detail {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--accent-strong);
}

.sensor-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 0.9rem;
    align-items: end;
    margin-top: 1rem;
}

.sensor-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.constants-grid,
.summary-grid,
.sensor-card-grid,
.result-card-grid {
    display: grid;
    gap: 1rem;
}

.constants-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.constant-card,
.summary-card {
    padding: 1rem 1.05rem;
}

.constant-card {
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.34);
    border-color: rgba(46, 46, 46, 0.06);
}

.constant-card strong,
.summary-card strong,
.metric-value {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.25rem;
    color: var(--ink);
}

.constant-card strong {
    font-size: 1.02rem;
}

.sensor-card-grid,
.result-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 1rem;
}

.sensor-card-grid {
    grid-template-columns: 1fr;
}

.sensor-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 0.5rem;
}

.sensor-tab {
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 46, 46, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-weight: 800;
}

.sensor-tab.is-active {
    color: white;
    border-color: rgba(6, 95, 166, 0.45);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.sensor-card,
.result-card {
    padding: 1.1rem;
}

.sensor-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68));
}

.sensor-card-active {
    margin-top: 0.8rem;
}

.sensor-card-status {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.validation-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.68rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 800;
}

.sensor-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    align-items: start;
    margin-top: 1rem;
}

.vs-subcard {
    padding: 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 46, 46, 0.1);
    background: rgba(255, 255, 255, 0.58);
}

.section-kicker {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-header strong,
.result-card-top strong {
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: 1.55rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
}

.sensor-split-grid .field-grid {
    margin-top: 0.65rem;
}

.input-shell {
    display: grid;
    grid-template-columns: minmax(7.4rem, 0.8fr) minmax(8rem, 1fr);
    gap: 0.35rem 0.75rem;
    align-items: center;
    padding: 0.62rem 0.7rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.86));
    border: 1px solid rgba(46, 46, 46, 0.14);
    box-shadow: 0 10px 26px rgba(46, 46, 46, 0.06);
}

.input-shell:hover {
    border-color: rgba(0, 120, 208, 0.28);
    box-shadow: 0 14px 30px rgba(6, 95, 166, 0.1);
}

.input-shell.is-primary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.86));
    border-color: rgba(0, 120, 208, 0.24);
    box-shadow: 0 14px 30px rgba(6, 95, 166, 0.1);
}

.calculated-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.calculated-item {
    padding: 0.72rem;
    border-radius: 10px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background: rgba(255, 255, 255, 0.68);
}

.calculated-item-wide {
    grid-column: 1 / -1;
}

.calculated-item strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--ink);
    font-size: 1.05rem;
}

.calculated-item p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.warning-callout {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding: 0.72rem 0.8rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.88rem;
    line-height: 1.4;
}

.warning-callout strong {
    color: inherit;
}

.warning-callout span {
    color: var(--muted);
}

.warning-callout.is-near {
    color: var(--near);
    background: rgba(153, 106, 17, 0.1);
    border-color: rgba(153, 106, 17, 0.22);
}

.warning-callout.is-invalid {
    color: var(--invalid);
    background: rgba(143, 8, 5, 0.1);
    border-color: rgba(143, 8, 5, 0.22);
}

.input-shell input,
.input-shell select {
    margin-top: 0;
    padding: 0.62rem 0.7rem;
    border-radius: 14px;
    border: 1px solid rgba(46, 46, 46, 0.15);
    background: rgba(255, 255, 255, 0.98);
    font-weight: 600;
}

.input-shell input:hover,
.input-shell select:hover {
    border-color: rgba(0, 120, 208, 0.32);
}

.field-hint {
    display: block;
    grid-column: 1 / -1;
    max-height: none;
    margin-top: 0;
    opacity: 0.82;
    font-size: 0.82rem;
    line-height: 1.45;
    transition: opacity 160ms ease, color 160ms ease;
}

.input-shell:focus-within .field-hint,
.input-shell:hover .field-hint {
    opacity: 1;
    color: var(--ink);
}

.advanced-section {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.summary-grid {
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.planning-summary {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.7));
}

.planning-summary strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--ink);
    font-size: 1.1rem;
}

.planning-summary p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.summary-row {
    display: grid;
    gap: 0.9rem;
}

.summary-group-grid {
    display: grid;
    gap: 1rem;
}

.summary-group-grid-primary {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.summary-group-grid-secondary {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.summary-card {
    position: relative;
    overflow: hidden;
    grid-column: span 4;
}

.summary-card::after {
    content: "";
    position: absolute;
    inset: auto -1rem -1rem auto;
    width: 6rem;
    height: 6rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 120, 208, 0.1), transparent 68%);
}

.summary-card.is-featured {
    grid-column: span 12;
    padding: 1.35rem 1.2rem;
}

.summary-row-primary.is-single .summary-card.is-featured {
    grid-column: span 8;
}

.summary-card.is-featured strong {
    font-size: 2rem;
}

.summary-group-grid-secondary .summary-card {
    grid-column: span 6;
}

.results-highlight {
    margin: 1.25rem 0;
    padding: 1.3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    align-items: center;
    gap: 1.25rem;
}

.fov-shell {
    margin-top: 1.25rem;
}

.fov-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1rem;
}

.chart-card {
    padding: 1rem;
}

.chart-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.chart-stat {
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--ink);
}

.chart-subtitle,
.chart-footnote,
.chart-axis,
.chart-axis-label {
    color: var(--muted);
    font-size: 0.86rem;
}

.chart-svg {
    width: 100%;
    height: auto;
    margin-top: 0.85rem;
    display: block;
}

.chart-axis {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.chart-axis-label {
    margin-top: 0.4rem;
    font-weight: 700;
}

.chart-hit-point {
    fill: transparent;
    stroke: transparent;
    pointer-events: all;
}

.chart-footnote {
    margin: 0.7rem 0 0;
    line-height: 1.5;
}

.coverage-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.coverage-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(46, 46, 46, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

.coverage-item strong {
    display: block;
    margin-top: 0.2rem;
}

.coverage-copy {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.meter-card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(46, 46, 46, 0.08);
}

.meter-track {
    width: 100%;
    height: 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(238, 0, 0, 0.16), rgba(0, 120, 208, 0.12));
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--amber), var(--accent));
    transition: width 260ms ease;
}

.baseline-labels {
    margin-top: 0.65rem;
}

.metric-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 120, 208, 0.1);
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 700;
}

.result-card-top {
    align-items: flex-start;
}

.result-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.result-badges:empty {
    display: none;
}

.result-primary-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
    gap: 0.85rem;
}

.primary-metric {
    padding: 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.64);
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.result-secondary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 0.95rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.comparison-bars {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.comparison-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.comparison-track {
    margin-top: 0;
    height: 0.65rem;
}

.comparison-fill.power-fill {
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.range-track {
    width: 100%;
    height: 0.8rem;
    margin-top: 1rem;
    border-radius: 999px;
    background: rgba(46, 46, 46, 0.08);
    overflow: hidden;
}

.range-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-red), var(--amber));
}

.table-shell,
.notes-shell {
    margin-top: 1.25rem;
    padding: 1.2rem;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(46, 46, 46, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1040px;
    font-size: 0.94rem;
}

.comparison-table {
    min-width: 860px;
    font-size: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.9rem 0.85rem;
}

.table-strong {
    font-weight: 800;
    color: var(--ink);
}

.table-badge-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.table-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 120, 208, 0.09);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.result-table th,
.result-table td {
    padding: 1rem 0.9rem;
    border-bottom: 1px solid rgba(46, 46, 46, 0.08);
    text-align: right;
    white-space: nowrap;
}

.result-table th:first-child,
.result-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1;
}

.result-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.96);
}

.result-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.5);
}

.result-table tbody tr:hover td {
    background: rgba(0, 120, 208, 0.08);
}

.notes-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

.hero-strip .secondary-button {
    min-width: 92px;
    align-self: stretch;
}

.error-banner {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(238, 0, 0, 0.18);
    background: rgba(238, 0, 0, 0.09);
    color: var(--invalid);
}

.empty-state {
    padding: 1.5rem;
    grid-column: 1 / -1;
    color: var(--muted);
}

[hidden] {
    display: none !important;
}

.results-note {
    max-width: 32ch;
    text-align: left;
    font-size: 0.94rem;
    line-height: 1.5;
}

.results-panel.is-pending {
    border-color: rgba(0, 120, 208, 0.22);
    box-shadow:
        0 30px 90px rgba(46, 46, 46, 0.14),
        0 0 0 4px rgba(0, 120, 208, 0.08);
}

.results-panel.is-fresh {
    animation: results-flash 820ms ease;
}

.pdf-export-shell {
    position: fixed;
    top: 0;
    left: -200vw;
    width: 1080px;
    pointer-events: none;
    z-index: -1;
}

.pdf-export-page {
    padding: 2rem;
    background:
        radial-gradient(circle at top left, rgba(255, 177, 20, 0.13), transparent 38%),
        radial-gradient(circle at 90% 12%, rgba(0, 120, 208, 0.15), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f4f4f4 60%, #e5e5e5 100%);
}

.pdf-export-header,
.pdf-export-meta-grid {
    display: grid;
    gap: 1rem;
}

.pdf-export-header {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: start;
}

.pdf-export-copy {
    display: grid;
    gap: 0.85rem;
    padding: 1.25rem 1.35rem;
    border-radius: calc(var(--radius-xl) + 6px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84));
    box-shadow: var(--shadow);
}

.pdf-export-copy h2 {
    font-size: 2.2rem;
}

.pdf-export-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.pdf-export-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-export-meta-card {
    padding: 1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.68));
    box-shadow: 0 12px 28px rgba(46, 46, 46, 0.08);
}

.pdf-export-meta-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.25rem;
    color: var(--ink);
}

.pdf-export-section {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
}

.pdf-export-shell .preset-summary,
.pdf-export-shell .reference-note,
.pdf-export-shell .summary-grid,
.pdf-export-shell .sensor-card-grid,
.pdf-export-shell .result-card-grid,
.pdf-export-shell .results-highlight {
    margin-top: 0;
}

.pdf-export-shell .sensor-card,
.pdf-export-shell .result-card,
.pdf-export-shell .summary-card,
.pdf-export-shell .preset-summary,
.pdf-export-shell .reference-note,
.pdf-export-shell .results-highlight {
    break-inside: avoid;
}

.reveal {
    opacity: 1;
    transform: none;
}

body.is-ready .reveal {
    animation: none;
}

body.is-ready .reveal:nth-of-type(2) {
    animation-delay: 90ms;
}

body.is-ready .reveal:nth-of-type(3) {
    animation-delay: 180ms;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(18px, -24px, 0) scale(1.08);
    }
}

@keyframes results-flash {
    0% {
        box-shadow:
            0 30px 90px rgba(46, 46, 46, 0.14),
            0 0 0 0 rgba(0, 120, 208, 0.18);
    }
    35% {
        box-shadow:
            0 34px 96px rgba(46, 46, 46, 0.18),
            0 0 0 8px rgba(0, 120, 208, 0.12);
    }
    100% {
        box-shadow:
            0 30px 90px rgba(46, 46, 46, 0.14),
            0 0 0 0 rgba(0, 120, 208, 0);
    }
}

@media (max-width: 1180px) {
    .workspace {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .results-highlight,
    .toolbar-grid,
    .constants-grid,
    .field-grid,
    .sensor-split-grid,
    .result-primary-metrics {
        grid-template-columns: 1fr;
    }

    .hero-strip {
        grid-template-columns: 1fr 1fr;
    }

    .summary-group-grid-primary,
    .summary-group-grid-secondary {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-strip,
    .panel {
        padding: 1.35rem;
    }

    .panel-heading,
    .status-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .results-note {
        text-align: left;
        max-width: none;
    }

    .summary-card,
    .summary-card.is-featured,
    .summary-row-primary.is-single .summary-card.is-featured,
    .summary-group-grid-secondary .summary-card {
        grid-column: auto;
    }

    .sensor-toolbar {
        grid-template-columns: 1fr;
    }

    .summary-bar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .summary-bar-item-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(calc(100% - 1rem), var(--content-width));
        padding-top: 0.85rem;
    }

    .hero-brand-mark {
        width: 100%;
        padding: 0.85rem 1rem;
        justify-content: flex-start;
        overflow: hidden;
    }

    .hero-logo {
        width: min(100%, 14rem);
    }

    .hero-copy {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-strip {
        grid-template-columns: 1fr;
    }

    .summary-bar {
        grid-template-columns: 1fr;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .input-shell {
        grid-template-columns: 1fr;
    }

    .segment-button,
    .primary-button,
    .secondary-button,
    .preset-button,
    .preset-option,
    .advanced-toggle {
        width: 100%;
    }

    .reference-chip {
        min-width: 0;
        width: 100%;
    }

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