:root {
    color-scheme: light;
    --navy: #0b3b66;
    --navy-strong: #082d4e;
    --blue: #075ac8;
    --blue-hover: #064aa4;
    --blue-soft: #edf5ff;
    --ink: #162033;
    --muted: #596579;
    --line: #d8e0ea;
    --surface: #ffffff;
    --surface-soft: #f6f8fb;
    --success: #176b45;
    --success-soft: #eaf7f0;
    --warning: #7a4b00;
    --warning-soft: #fff6df;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(26, 45, 70, 0.12);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: #f2f6fa;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
}

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

button,
label,
select {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--blue-hover);
}

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

h1,
h2,
h3,
legend {
    line-height: 1.18;
}

[hidden] {
    display: none !important;
}

.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;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--navy-strong);
    color: #fff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.site-header {
    border-bottom: 1px solid rgba(11, 59, 102, 0.1);
    background: rgba(255, 255, 255, 0.94);
}

.header-inner,
.calculator-shell,
.site-footer {
    width: min(100% - 32px, 1040px);
    margin-inline: auto;
}

main {
    padding: 36px 0 64px;
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--navy-strong);
    text-decoration: none;
    font-weight: 750;
    letter-spacing: -0.015em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 700;
}

.language-select {
    min-height: 40px;
    padding: 7px 32px 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue-hover);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.calculator-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 30, 51, 0.62);
}

.print-modal {
    width: min(100%, 720px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(4, 18, 32, 0.32);
}

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

.modal-heading h2 {
    margin-bottom: 6px;
    color: var(--navy-strong);
    font-size: 1.5rem;
}

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

.icon-button {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.print-scheme-field {
    margin-bottom: 18px;
}

.print-scheme-field label,
.attachment-fields label,
.signature-input > .field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 700;
}

.print-scheme-field select,
.attachment-fields input,
.attachment-fields textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #aeb9c7;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.attachment-fields textarea {
    min-height: 92px;
    resize: vertical;
}

.attachment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.attachment-fields .full-width {
    grid-column: 1 / -1;
}

.signature-pad {
    position: relative;
    overflow: hidden;
    border: 1px solid #aeb9c7;
    border-radius: 10px;
    background: #fff;
}

.signature-pad canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
    touch-action: none;
}

.signature-pad canvas:focus-visible {
    outline-offset: -4px;
}

.signature-line {
    position: absolute;
    right: 28px;
    bottom: 34px;
    left: 28px;
    border-bottom: 1px solid #c4ccd6;
}

.signature-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.signature-footer .field-hint {
    margin-bottom: 0;
}

.small-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 4px 8px;
    font-size: 0.84rem;
}

.modal-actions {
    margin-top: 24px;
}

.print-document {
    display: none;
}

.step-navigation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    list-style: none;
}

.step-navigation li {
    position: relative;
}

.step-navigation li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -16px;
    z-index: 1;
    width: 32px;
    height: 1px;
    background: var(--line);
}

.step-navigation button {
    width: 100%;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.step-navigation button:disabled {
    cursor: default;
}

.step-navigation button > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #b7c2d0;
    border-radius: 50%;
    background: #fff;
    font-size: 0.82rem;
}

.step-navigation li.active button,
.step-navigation li.completed button {
    color: var(--navy-strong);
}

.step-navigation li.active button > span {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.step-navigation li.completed button > span {
    border-color: #99cfb0;
    background: var(--success-soft);
    color: var(--success);
}

.step-panel {
    padding: clamp(26px, 6vw, 54px);
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend,
.result-heading h2 {
    margin-bottom: 8px;
    color: var(--navy-strong);
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 780;
    letter-spacing: -0.025em;
}

.section-lead {
    margin-bottom: 28px;
    color: var(--muted);
}

.field-group,
.conditional-field {
    margin-top: 28px;
}

.field-label,
.field > label,
.conditional-field > label:not(.check-row) {
    display: block;
    margin-bottom: 9px;
    color: var(--ink);
    font-weight: 720;
}

.choice-grid {
    display: grid;
    gap: 12px;
}

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

.choice-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    top: 18px;
    left: 16px;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
}

.choice-card > span {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 14px 14px 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.choice-card:hover > span {
    border-color: #9bb8d5;
}

.choice-card input:checked + span {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 0 0 1px var(--blue);
}

.choice-card small,
.check-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 450;
}

.compact-choices .choice-card > span {
    min-height: 64px;
}

.date-time-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(120px, 0.75fr) minmax(0, 1.45fr) minmax(120px, 0.75fr);
    gap: 14px;
    margin-top: 28px;
}

.date-picker-control {
    position: relative;
}

.date-picker-control > input[type="text"] {
    padding-right: 52px;
}

.date-picker-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 10px 10px 0;
    background: var(--surface-soft);
    color: var(--blue-hover);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.date-picker-button:hover {
    background: var(--blue-soft);
}

.native-date-input {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    cursor: pointer;
}

.native-date-input:focus-visible {
    opacity: 0.01;
    outline: 3px solid #ffbf47;
    outline-offset: -3px;
}

.time-picker-control {
    position: relative;
}

.time-picker-control > input[type="text"] {
    padding-right: 52px;
}

.time-picker-button {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 10px 10px 0;
    background: var(--surface-soft);
    color: var(--blue-hover);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.time-picker-button:hover {
    background: var(--blue-soft);
}

.native-time-input {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    cursor: pointer;
}

.native-time-input:focus-visible {
    opacity: 0.01;
    outline: 3px solid #ffbf47;
    outline-offset: -3px;
}

.field input,
.conditional-field input[type="search"],
.conditional-field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #aeb9c7;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.field input::placeholder,
.conditional-field input::placeholder {
    color: #7c8797;
}

.field input[aria-invalid="true"],
.conditional-field select[aria-invalid="true"],
.conditional-field input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px var(--danger);
}

.field-hint,
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
}

.field-hint {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    cursor: pointer;
}

.check-row input,
.meal-choice input {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: var(--blue);
}

#destination {
    min-height: 190px;
    margin-top: 8px;
    padding: 6px;
}

#destination option {
    padding: 8px;
}

.context-note,
.scope-note {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.context-note,
.scope-note {
    background: var(--surface-soft);
}

.scope-note:empty {
    display: none;
}

.form-alert {
    margin: 24px clamp(26px, 6vw, 54px) 0;
    padding: 12px 14px;
    border-left: 4px solid var(--danger);
    border-radius: 8px;
    background: #fff0ef;
    color: #7a271a;
    font-weight: 650;
}

.step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 36px;
}

.step-actions.end {
    justify-content: flex-end;
}

.primary-button,
.secondary-button,
.text-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 720;
}

.primary-button {
    border: 1px solid var(--blue);
    background: var(--blue);
    color: #fff;
}

.primary-button:hover {
    border-color: var(--blue-hover);
    background: var(--blue-hover);
}

.secondary-button {
    border: 1px solid var(--navy);
    background: var(--navy);
    color: #fff;
}

.text-button {
    border: 1px solid transparent;
    background: transparent;
    color: var(--blue-hover);
}

.text-button:hover {
    background: var(--blue-soft);
}

.result-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.edit-button {
    flex: 0 0 auto;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.currency-conversion {
    margin-top: 16px;
}

.currency-conversion details {
    overflow: hidden;
    border: 1px solid #a8c8e8;
    border-radius: 12px;
    background: #fff;
}

.currency-conversion summary {
    padding: 14px 16px;
    background: var(--blue-soft);
    color: var(--navy-strong);
    cursor: pointer;
}

.currency-conversion summary > span {
    display: inline-flex;
    flex-direction: column;
    margin-left: 5px;
}

.currency-conversion summary small {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 450;
}

.conversion-body {
    padding: 16px;
}

.conversion-controls,
.manual-rate-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.conversion-controls .secondary-button,
.manual-rate-panel .secondary-button {
    white-space: nowrap;
}

.conversion-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--ink);
}

.conversion-status.success {
    background: var(--success-soft);
    color: var(--success);
}

.conversion-status.error {
    background: #fff0ef;
    color: #7a271a;
}

.conversion-status strong,
.conversion-status small {
    display: block;
}

.conversion-status small {
    margin-top: 3px;
}

.converted-amount {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(11, 59, 102, 0.18);
}

.total-card .converted-amount strong {
    margin: 2px 0 0;
    font-size: 1.15rem;
}

.manual-rate-toggle {
    margin-top: 8px;
    padding-inline: 0;
}

.manual-rate-panel {
    margin-top: 8px;
    padding: 14px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.conversion-cache-note {
    margin-top: 12px;
}

.total-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.state-card {
    border-color: #a8c8e8;
    background: var(--blue-soft);
}

.tax-card {
    border-color: #badfca;
    background: var(--success-soft);
}

.comparison-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #eed49a;
    border-radius: 14px;
    background: var(--warning-soft);
    color: var(--warning);
}

.comparison-card p {
    margin: 0;
}

.comparison-card strong {
    display: block;
    margin-top: 10px;
    color: var(--navy-strong);
    font-size: 1.35rem;
}

.total-card.primary {
    border-color: #a8c8e8;
    background: var(--blue-soft);
}

.total-card.difference {
    border-color: #badfca;
    background: var(--success-soft);
}

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

.total-card strong {
    display: block;
    margin: 6px 0;
    color: var(--navy-strong);
    font-size: clamp(1.55rem, 5vw, 2.15rem);
    line-height: 1.1;
}

.meals-section,
.calculation-details {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.meals-section h3,
.calculation-details h3 {
    margin-bottom: 5px;
    color: var(--navy-strong);
    font-size: 1.18rem;
}

.meals-section p {
    color: var(--muted);
}

.meal-periods {
    display: grid;
    gap: 12px;
}

.meal-period {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.meal-period legend {
    max-width: calc(100% - 18px);
    padding: 0 8px;
    color: var(--navy-strong);
    font-size: 0.94rem;
    font-weight: 720;
    line-height: 1.35;
}

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

.meal-choices label {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 9px;
    background: var(--surface-soft);
    cursor: pointer;
}

.meal-choices input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--blue);
}

.individual-meals {
    border: 1px solid var(--line);
    border-radius: 12px;
}

.individual-meals > summary {
    padding: 14px 16px;
    color: var(--blue-hover);
    cursor: pointer;
    font-weight: 720;
}

.individual-meal-rows {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
}

.meal-period-title strong,
.meal-period-title small {
    display: block;
}

.meal-period-title small {
    margin-top: 3px;
    color: var(--muted);
}

.meal-choice {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--surface-soft);
    cursor: pointer;
}

.breakdown-card {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.calculation-details details {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.calculation-details summary {
    padding: 14px 16px;
    background: var(--surface-soft);
    color: var(--navy-strong);
    cursor: pointer;
    font-weight: 750;
}

.breakdown-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) minmax(220px, 1fr);
    gap: 22px;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.breakdown-row > div > * {
    display: block;
}

.breakdown-row small {
    margin-top: 3px;
    color: var(--muted);
}

.breakdown-row > div:last-child {
    text-align: right;
}

.breakdown-row > div:last-child strong {
    margin-top: 5px;
    color: var(--navy-strong);
    font-size: 1.05rem;
}

.calculation-details details > a {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    font-weight: 700;
}

.breakdown-card h4 {
    margin: 0;
    padding: 13px 15px;
    background: var(--surface-soft);
    color: var(--navy-strong);
}

.breakdown-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.breakdown-list li {
    display: grid;
    grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(90px, 0.7fr));
    gap: 12px;
    padding: 12px 15px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

.breakdown-list li span:not(:first-child) {
    text-align: right;
}

.breakdown-list .breakdown-header {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.site-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 28px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
}

.site-footer a {
    display: inline-block;
    margin: 0 12px 6px 0;
}

.site-footer p {
    max-width: 360px;
    margin-bottom: 0;
    text-align: right;
}

@media (max-width: 820px) {
    .choice-grid.three {
        grid-template-columns: 1fr;
    }

    .date-time-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.65fr);
    }

    .meal-choices {
        grid-template-columns: 1fr;
    }

    .meal-period-title {
        margin-bottom: 3px;
    }
}

@media (max-width: 600px) {
    .header-inner,
    .calculator-shell,
    .site-footer {
        width: min(100% - 20px, 1040px);
    }

    .site-header {
        position: static;
    }

    .header-inner {
        min-height: 60px;
    }

    .brand > span:last-child,
    .year-badge {
        display: none;
    }

    .calculator-shell {
        border-radius: 14px;
    }

    .step-navigation button {
        min-height: 62px;
        gap: 6px;
        font-size: 0.78rem;
    }

    .step-navigation button > span {
        width: 26px;
        height: 26px;
    }

    .step-panel {
        padding: 24px 18px;
    }

    .form-alert {
        margin: 18px 18px 0;
    }

    .choice-grid.two,
    .date-time-grid {
        grid-template-columns: 1fr;
    }

    .compact-choices {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .date-time-grid .field.compact {
        margin-top: -7px;
    }

    .step-actions,
    .result-heading,
    .site-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .step-actions .primary-button,
    .result-actions .secondary-button {
        width: 100%;
    }

    .step-actions .text-button {
        order: 2;
    }

    .edit-button {
        align-self: flex-start;
    }

    .breakdown-card {
        overflow-x: auto;
    }

    .breakdown-list {
        min-width: 630px;
    }

    .site-footer p {
        text-align: left;
    }

    .modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .print-modal {
        width: 100%;
        max-height: 92vh;
        padding: 22px 18px;
        border-radius: 18px 18px 0 0;
    }

    .attachment-fields {
        grid-template-columns: 1fr;
    }

    .attachment-fields .full-width {
        grid-column: auto;
    }

    .conversion-controls,
    .manual-rate-panel {
        grid-template-columns: 1fr;
    }

    .conversion-controls .secondary-button,
    .manual-rate-panel .secondary-button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .breakdown-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .breakdown-row > div:last-child {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@page {
    size: A4;
    margin: 14mm;
}

@media print {
    body {
        background: #fff;
        color: #111;
        font-family: Arial, sans-serif;
        font-size: 9.5pt;
        line-height: 1.35;
    }

    body > *:not(.print-document) {
        display: none !important;
    }

    .print-document {
        display: block !important;
        width: 100%;
    }

    .print-header {
        position: relative;
        padding-bottom: 14px;
        border-bottom: 2px solid #111;
    }

    .print-header p:first-child {
        margin-bottom: 5px;
        font-size: 8pt;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .print-header h1 {
        margin: 0;
        font-size: 20pt;
    }

    .print-header p:last-child {
        position: absolute;
        right: 0;
        bottom: 14px;
        margin: 0;
        color: #444;
        font-size: 8pt;
    }

    .print-document section {
        margin-top: 18px;
        break-inside: avoid;
    }

    .print-document h2 {
        margin: 0 0 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid #aaa;
        font-size: 11pt;
    }

    .print-definition-grid {
        display: grid;
        grid-template-columns: 34mm 1fr 34mm 1fr;
        gap: 5px 10px;
        margin: 0;
    }

    .print-definition-grid dt {
        color: #555;
        font-weight: 700;
    }

    .print-definition-grid dd {
        margin: 0;
        white-space: pre-wrap;
    }

    .print-total {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin-bottom: 10px;
        padding: 10px 12px;
        border: 1px solid #222;
        background: #f1f1f1;
    }

    .print-total strong {
        font-size: 17pt;
    }

    .print-total > span:last-child {
        text-align: right;
    }

    .print-total small {
        display: block;
        margin-top: 2px;
        color: #444;
        font-size: 8pt;
    }

    .print-document table {
        width: 100%;
        border-collapse: collapse;
        font-size: 8.5pt;
    }

    .print-document th,
    .print-document td {
        padding: 6px;
        border: 1px solid #aaa;
        text-align: left;
        vertical-align: top;
    }

    .print-document th {
        background: #e8e8e8;
    }

    .print-document td:last-child,
    .print-document th:last-child {
        text-align: right;
        white-space: nowrap;
    }

    .print-document tr {
        break-inside: avoid;
    }

    .print-signature {
        width: 75mm;
        margin-top: 28mm !important;
    }

    .print-signature span,
    .print-signature img {
        display: block;
    }

    .print-signature img {
        width: 70mm;
        max-height: 28mm;
        object-fit: contain;
        object-position: left bottom;
    }

    .print-signature span {
        padding-top: 4px;
        border-top: 1px solid #111;
    }

    .print-document > footer {
        margin-top: 20px;
        padding-top: 8px;
        border-top: 1px solid #aaa;
        color: #555;
        font-size: 7.5pt;
        overflow-wrap: anywhere;
    }
}
