:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #eef2f5;
    --text: #20242a;
    --muted: #657282;
    --line: #d8e0e8;
    --primary: #c92f3b;
    --primary-dark: #a92531;
    --green: #26834f;
    --torque: #26834f;
    --blue: #275db3;
    --warning-bg: #fff4d8;
    --warning-text: #775400;
    --danger-bg: #ffe6e6;
    --danger-text: #9a1e1e;
    --success-bg: #e5f7ec;
    --success-text: #17633a;
    --shadow: 0 10px 28px rgba(32, 36, 42, 0.08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    padding: 9px 13px;
    color: #ffffff;
    background: var(--primary);
    cursor: pointer;
}

button:hover {
    background: var(--primary-dark);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 10px;
    color: var(--text);
    background: #ffffff;
}

textarea {
    min-height: 72px;
    resize: vertical;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 5px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

h2 {
    margin-bottom: 5px;
    font-size: 1.22rem;
}

h3 {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

p {
    margin-bottom: 0;
    color: var(--muted);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px clamp(16px, 4vw, 46px);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand img {
    width: 142px;
    height: auto;
    flex: 0 0 auto;
}

.brand p {
    max-width: 760px;
}

.app-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 22px clamp(12px, 3vw, 34px) 42px;
}

.panel,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel {
    min-width: 0;
    padding: 18px;
}

.report-input-panel,
.control-panel {
    margin-bottom: 18px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.compact-heading {
    margin-bottom: 10px;
}

.state-badge {
    flex: 0 0 auto;
    min-width: 112px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
}

.state-badge.is-ready {
    color: var(--success-text);
    border-color: #b8e3c8;
    background: var(--success-bg);
}

.state-badge.is-warning {
    color: var(--warning-text);
    border-color: #ecd189;
    background: var(--warning-bg);
}

.state-badge.is-error {
    color: var(--danger-text);
    border-color: #eab0b0;
    background: var(--danger-bg);
}

.report-form-grid,
.load-grid,
.control-grid {
    display: grid;
    gap: 12px;
    align-items: end;
}

.report-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.wide-field {
    grid-column: span 2;
}

.medium-field {
    grid-column: span 1;
}

.full-field {
    grid-column: 1 / -1;
}

.panel-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.load-grid {
    grid-template-columns: minmax(320px, 2fr) repeat(2, minmax(180px, 1fr));
}

.control-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    margin-top: 12px;
}

.file-drop {
    min-height: 98px;
    align-content: center;
    border: 1px dashed #9ba8b5;
    border-radius: 8px;
    padding: 16px;
    color: var(--text);
    background: #fbfcfd;
    cursor: pointer;
}

.file-drop.is-dragging {
    border-color: var(--primary);
    background: #fff3f4;
}

.file-drop.is-disabled {
    color: #8d98a5;
    background: #f1f4f7;
    cursor: not-allowed;
}

.file-drop span {
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.file-drop small {
    color: var(--muted);
    font-weight: 500;
}

.file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.log-guidance-panel {
    margin-bottom: 18px;
}

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

.guidance-grid > div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.guidance-grid ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.45;
}

.guidance-confirm {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #ecd189;
    border-radius: 8px;
    background: var(--warning-bg);
}

.technical-note,
.report-note p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.45;
}

.toggle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.compact-actions {
    margin-top: 12px;
}

.advanced-options {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.advanced-options summary,
.manual-entry > summary {
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.check-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    color: var(--text);
    font-weight: 700;
}

.check-option input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.secondary-button {
    color: var(--text);
    border: 1px solid var(--line);
    background: #ffffff;
}

.secondary-button:hover {
    background: var(--surface-soft);
}

.ghost-button {
    color: var(--muted);
    background: transparent;
}

.ghost-button:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.message-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.message {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--muted);
    background: #ffffff;
}

.message.warning {
    color: var(--warning-text);
    border-color: #ecd189;
    background: var(--warning-bg);
}

.message.error {
    color: var(--danger-text);
    border-color: #eab0b0;
    background: var(--danger-bg);
}

.manual-entry {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.manual-heading,
.manual-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.manual-heading h2 {
    margin-bottom: 5px;
}

.manual-grid label {
    flex: 1 1 210px;
}

.manual-grid button {
    flex: 0 0 auto;
}

.manual-table-wrap {
    max-height: 260px;
}

.manual-input-table {
    min-width: 520px;
}

.manual-input-table input {
    min-width: 120px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 34px 18px;
    text-align: center;
}

.empty-state p {
    max-width: 680px;
}

.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.dashboard > * {
    min-width: 0;
}

.report-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 24px;
    align-items: start;
}

.report-overview h2 {
    margin-bottom: 4px;
    font-size: 1.5rem;
}

.section-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-facts {
    display: grid;
    gap: 6px;
    min-width: 260px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.report-summary-text {
    grid-column: 1 / -1;
    max-width: 980px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}

.performance-references {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reference-card {
    min-width: 0;
    min-height: 132px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.reference-card span,
.reference-card small {
    display: block;
    color: var(--muted);
}

.reference-card span {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reference-card strong,
.reference-card em {
    display: block;
    color: var(--text);
    font-style: normal;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.reference-card strong {
    margin-bottom: 3px;
    font-size: 1.65rem;
}

.reference-card em {
    margin: 10px 0 3px;
    font-size: 1.22rem;
}

.comparison-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.comparison-highlight-card {
    min-width: 0;
    min-height: 142px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.comparison-highlight-card span,
.comparison-highlight-card small {
    display: block;
    color: var(--muted);
}

.comparison-highlight-card span {
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comparison-highlight-card strong,
.comparison-highlight-card em {
    display: block;
    color: var(--text);
    font-style: normal;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.comparison-highlight-card strong {
    margin-bottom: 3px;
    font-size: 1.72rem;
}

.comparison-highlight-card em {
    margin: 10px 0 3px;
    font-size: 1.28rem;
}

.gain-card strong,
.gain-card em {
    color: var(--green);
}

.gain-card strong {
    font-size: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.metric {
    min-width: 0;
    min-height: 96px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.metric span,
.metric small {
    display: block;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.metric strong {
    display: block;
    margin: 5px 0;
    font-size: 1.55rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.metric:nth-child(4) strong,
.metric:nth-child(5) strong {
    color: var(--green);
}

.chart-panel {
    overflow: hidden;
}

#comparisonChart {
    display: block;
    width: 100%;
    height: 520px;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.small-table {
    margin-bottom: 12px;
}

.reference-table {
    max-height: 420px;
}

.data-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
    background: #ffffff;
}

.manufacturer-table {
    min-width: 760px;
}

.wheel-power-table {
    min-width: 760px;
}

.wheel-config-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.wheel-config-grid > div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.wheel-config-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.wheel-config-grid strong {
    display: block;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.wheel-note {
    display: grid;
    gap: 8px;
    color: var(--muted);
    line-height: 1.45;
}

.wheel-note strong {
    color: var(--text);
}

.data-table th,
.data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--muted);
    background: #f7f9fb;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.data-table td:nth-child(n+3),
.data-table th:nth-child(n+3) {
    text-align: right;
}

#logTableBody td:nth-child(3),
#logTableBody td:nth-child(4),
.log-summary-table th:nth-child(3),
.log-summary-table th:nth-child(4) {
    max-width: 260px;
    text-align: left;
    white-space: normal;
}

.log-summary-table th:nth-child(1),
.log-summary-table td:nth-child(1),
.log-summary-table th:nth-child(4),
.log-summary-table td:nth-child(4),
.log-summary-table th:nth-child(5),
.log-summary-table td:nth-child(5),
.log-summary-table th:nth-child(6),
.log-summary-table td:nth-child(6) {
    text-align: left;
}

.log-summary-table th:nth-child(2),
.log-summary-table td:nth-child(2),
.log-summary-table th:nth-child(3),
.log-summary-table td:nth-child(3) {
    text-align: center;
}

.log-name-input,
.analysis-type-select,
.fuel-type-select {
    min-width: 160px;
}

.log-label-control {
    display: grid;
    grid-template-columns: minmax(130px, 0.9fr) minmax(160px, 1.1fr);
    gap: 8px;
    min-width: 320px;
}

.curve-toggle-cell,
.active-toggle-cell {
    text-align: center !important;
}

.curve-toggle-cell input,
.active-toggle-cell input {
    width: 18px;
    min-height: 18px;
    padding: 0;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.quality-badge.quality-excellent {
    color: var(--success-text);
    background: var(--success-bg);
}

.quality-badge.quality-good {
    color: #1f5575;
    background: #e6f3fb;
}

.quality-badge.quality-limited {
    color: var(--warning-text);
    background: var(--warning-bg);
}

.quality-badge.quality-failed {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.source-cell {
    max-width: 240px;
    color: var(--muted);
    white-space: normal !important;
}

.report-note {
    display: grid;
    gap: 4px;
}

.delta-positive {
    color: var(--success-text);
    font-weight: 800;
}

.delta-negative {
    color: var(--danger-text);
    font-weight: 800;
}

.remove-button {
    min-height: 32px;
    padding: 6px 9px;
    color: var(--danger-text);
    background: var(--danger-bg);
}

.remove-button:hover {
    background: #ffd6d6;
}

@media (max-width: 1050px) {
    .report-form-grid,
    .control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .file-drop {
        grid-column: 1 / -1;
    }

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

    .performance-references,
    .comparison-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wheel-config-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-header,
    .brand,
    .panel-heading,
    .report-overview {
        align-items: stretch;
        flex-direction: column;
    }

    .brand img {
        width: 120px;
    }

    .app-header > button {
        width: 100%;
    }

    .report-form-grid,
    .load-grid,
    .control-grid,
    .summary-grid,
    .performance-references,
    .comparison-highlights {
        grid-template-columns: 1fr;
    }

    .wide-field,
    .medium-field,
    .full-field {
        grid-column: auto;
    }

    .report-facts {
        min-width: 0;
        text-align: left;
    }

    .manual-grid button,
    .manual-heading button {
        width: 100%;
    }

    #comparisonChart {
        height: 420px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    html,
    body {
        width: auto;
        overflow: visible;
        background: #ffffff;
        font-size: 9pt;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body {
        position: relative;
    }

    body::before {
        content: "";
        position: fixed;
        inset: 6mm 10mm;
        z-index: 0;
        pointer-events: none;
        background: url("mosler_m_watermark.png") center center / 92% auto no-repeat;
        opacity: 0.045;
    }

    .app-header,
    .app-shell {
        position: relative;
        z-index: 1;
    }

    .control-panel,
    .report-input-panel,
    .log-guidance-panel,
    .empty-state,
    .manual-entry,
    .app-header > button,
    .remove-button,
    .color-input {
        display: none !important;
    }

    .app-header {
        display: flex;
        justify-content: flex-end;
        min-height: 0;
        height: 0;
        overflow: visible;
        padding: 0;
        margin-bottom: 0;
        border-bottom: 0;
        background: transparent;
    }

    .brand {
        width: 100%;
        display: block;
    }

    .brand > div {
        display: none;
    }

    .brand img {
        position: absolute;
        top: 0;
        right: 0;
        width: 46mm;
        max-height: 22mm;
        object-fit: contain;
    }

    h1 {
        margin-bottom: 2mm;
        font-size: 18pt;
    }

    h2 {
        font-size: 12pt;
    }

    p {
        font-size: 8pt;
    }

    .app-shell {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .panel,
    .metric {
        border-color: #cfd8e2;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.94);
    }

    .panel {
        margin-bottom: 3mm;
        padding: 3mm;
        break-inside: auto;
        page-break-inside: auto;
    }

    .metric {
        min-height: auto;
        padding: 3mm;
        break-inside: avoid;
    }

    .metric strong {
        font-size: 15pt;
    }

    .metric small {
        white-space: normal;
    }

    .dashboard {
        display: block;
        gap: 10px;
    }

    .summary-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 2.5mm;
        margin-bottom: 3mm;
    }

    .performance-references {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5mm;
        margin-bottom: 2.5mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .reference-card {
        min-height: 19mm;
        border-color: #cfd8e2;
        border-radius: 2mm;
        padding: 2.4mm 3mm;
        background: rgba(255, 255, 255, 0.94);
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .reference-card span {
        margin-bottom: 1.2mm;
        font-size: 6.8pt;
        letter-spacing: 0.03em;
    }

    .reference-card strong {
        margin-bottom: 0.5mm;
        font-size: 13pt;
    }

    .reference-card em {
        margin: 1.5mm 0 0.5mm;
        font-size: 10pt;
    }

    .reference-card small {
        font-size: 6.6pt;
        line-height: 1.15;
    }

    .comparison-highlights {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2.5mm;
        margin-bottom: 2.8mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .comparison-highlight-card {
        min-height: 18mm;
        border-color: #cfd8e2;
        border-radius: 2mm;
        padding: 2.2mm 2.6mm;
        background: rgba(255, 255, 255, 0.94);
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .comparison-highlight-card span {
        margin-bottom: 1mm;
        font-size: 6.4pt;
        letter-spacing: 0.03em;
    }

    .comparison-highlight-card strong {
        margin-bottom: 0.4mm;
        font-size: 12pt;
    }

    .comparison-highlight-card em {
        margin: 1.2mm 0 0.4mm;
        font-size: 9.2pt;
    }

    .comparison-highlight-card small {
        font-size: 6.3pt;
        line-height: 1.2;
    }

    .gain-card strong {
        font-size: 15pt;
    }

    .report-overview {
        display: block;
        position: relative;
        min-height: 35mm;
        margin-bottom: 2.5mm;
        padding: 0 66mm 2.5mm 0;
        border: 0;
        border-bottom: 1px solid var(--line);
        background: transparent;
    }

    .report-overview h2 {
        font-size: 16pt;
    }

    .section-kicker {
        font-size: 7pt;
    }

    .report-facts {
        position: absolute;
        top: 21mm;
        right: 0;
        width: 62mm;
        min-width: 0;
        padding-top: 0;
        gap: 2px;
        font-size: 7pt;
        line-height: 1.15;
    }

    .report-summary-text {
        margin-top: 5mm;
        max-width: calc(100% - 68mm);
        font-size: 9pt;
    }

    .chart-panel {
        overflow: visible;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 4mm;
        padding: 2.4mm;
    }

    .chart-panel .panel-heading {
        margin-bottom: 1.5mm;
    }

    #comparisonChart {
        width: 100% !important;
        height: 92mm !important;
    }

    .manufacturer-panel {
        break-before: page;
        page-break-before: always;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .reference-table {
        max-height: none;
    }

    .data-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        border: 1px solid var(--line);
        font-size: 6.2pt;
    }

    .data-table th,
    .data-table td {
        padding: 2.2pt 2.5pt;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.18;
    }

    .data-table th {
        position: static;
        display: table-cell;
        font-size: 5.8pt;
    }

    .data-table thead {
        display: table-header-group;
    }

    .data-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .log-summary-table th:last-child,
    .log-summary-table td:last-child {
        display: none;
    }

    .comparison-detail-panel {
        break-before: page;
        page-break-before: always;
    }

    .comparison-detail-panel .reference-table {
        display: block;
        margin-top: 3mm;
    }

    .reference-data-table {
        font-size: 6.4pt;
    }

    .source-cell,
    .log-summary-table th:nth-child(2),
    .log-summary-table td:nth-child(2),
    .log-summary-table th:nth-child(3),
    .log-summary-table td:nth-child(3),
    .log-summary-table th:nth-child(6),
    .log-summary-table td:nth-child(6),
    .log-summary-table th:nth-child(13),
    .log-summary-table td:nth-child(13) {
        display: none;
    }

    .log-name-input {
        min-width: 0;
        border: 0;
        padding: 0;
        background: transparent;
    }

    .analysis-type-select,
    .fuel-type-select {
        min-width: 0;
        border: 0;
        padding: 0;
        color: var(--text);
        background: transparent;
        appearance: none;
    }

    .log-label-control {
        display: block;
        min-width: 0;
    }

    .log-label-control select {
        display: none;
    }

    #logTableBody td:nth-child(3),
    #logTableBody td:nth-child(4) {
        max-width: none;
    }

    .report-note {
        border: 0;
        padding: 0;
        font-size: 8pt;
        background: transparent;
    }

    .wheel-power-panel {
        break-before: page;
        page-break-before: always;
    }

    .wheel-config-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5mm;
        margin-bottom: 3mm;
    }

    .wheel-config-grid > div {
        border-color: #cfd8e2;
        border-radius: 2mm;
        padding: 2.8mm;
        background: rgba(255, 255, 255, 0.94);
    }

    .wheel-config-grid span {
        margin-bottom: 1mm;
        font-size: 6.8pt;
    }

    .wheel-config-grid strong {
        font-size: 11pt;
    }

    .wheel-note {
        gap: 2mm;
        font-size: 8.2pt;
        line-height: 1.35;
    }
}

@media print {
    body.print-portrait .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.print-portrait .performance-references {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.print-portrait .comparison-highlights {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.print-portrait #comparisonChart {
        height: 105mm !important;
    }

    body.print-portrait::before {
        background-size: 96% auto;
    }
}
