#presupuesto-multiple-page {
    --pm-bg: #f4f7fa;
    --pm-ink: #102236;
    --pm-muted: #5b6d7d;
    --pm-line: #d8e2eb;
    --pm-panel: #fff;
    --pm-soft: #f4f9ff;
    --pm-blue: #1769d2;
    --pm-blue-strong: #1459b8;
    --pm-pdf: #c64848;
    --pm-excel: #208a55;
    --pm-cyan: #168f86;
    min-height: 100vh;
    padding-bottom: 5rem;
    color: var(--pm-ink);
}
#presupuesto-multiple-page * {
    box-sizing: border-box;
}
#presupuesto-multiple-page h1,
#presupuesto-multiple-page h2,
#presupuesto-multiple-page p {
    margin-top: 0;
}
.pm-wrap {
    width: min(1080px, calc(100% - 2rem));
    margin: auto;
}
.pm-hero {
    padding: clamp(2.5rem, 6vw, 4.8rem) 0;
    background: var(--pm-soft);
    color: var(--pm-ink);
}
.pm-hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}
.pm-eyebrow,
.pm-kicker {
    margin: 0 0 1rem;
    color: var(--pm-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}
.pm-eyebrow span {
    color: var(--pm-pdf);
}
.pm-hero h1 {
    max-width: 680px;
    margin: 0 0 1rem;
    font-size: clamp(2.15rem, 5vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
}
.pm-lead {
    max-width: 650px;
    margin: 0;
    color: var(--pm-muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.55;
}
.pm-benefits {
    display: flex;
    gap: 1.3rem;
    flex-wrap: wrap;
    margin: 1.7rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--pm-muted);
    font-size: 0.84rem;
}
.pm-benefits li::before {
    content: "✓";
    margin-right: 0.4rem;
    color: var(--pm-excel);
    font-weight: 900;
}
.pm-flow {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: var(--pm-pdf);
    font:
        800 clamp(1.1rem, 2.4vw, 1.6rem) / 1.2 ui-monospace,
        monospace;
    white-space: nowrap;
}
.pm-flow b {
    color: var(--pm-ink);
}
.pm-flow .is-bc3 {
    color: var(--pm-blue);
}
.pm-tool,
.pm-result {
    position: relative;
    max-width: 820px;
    margin: -2rem auto 4rem;
    padding: clamp(1.25rem, 4vw, 2.3rem);
    border: 1px solid var(--pm-line);
    border-radius: 1rem;
    background: var(--pm-panel);
    box-shadow: 0 18px 50px #0006;
}
.pm-tool {
    border-top: 3px solid var(--pm-pdf);
}
.pm-result {
    margin-top: 0;
    border-top: 3px solid var(--pm-excel);
}
.pm-tool-heading,
.pm-result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.pm-tool h2,
.pm-result h2,
.pm-process h2,
.pm-editorial h2,
.pm-faq h2 {
    margin: 0 0 1.2rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: -0.03em;
}
.pm-chip {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--pm-pdf);
    border-radius: 99px;
    color: var(--pm-pdf);
    font:
        700 0.78rem ui-monospace,
        monospace;
}
.pm-intro,
.pm-editorial p {
    color: var(--pm-muted);
    line-height: 1.7;
}
.pm-intro {
    margin: 0 0 1.3rem;
}
.pm-tool .drop-zone {
    padding: 2.2rem 1rem;
    border: 2px dashed #5f91c2;
    border-radius: 0.8rem;
    background: #142437;
    text-align: center;
    transition: 0.2s;
}
.pm-tool .drop-zone:hover,
.pm-tool .drop-zone:focus-within {
    border-color: var(--pm-cyan);
    background: #1a3048;
}
.drop-zone-icon {
    color: var(--pm-pdf);
    font-size: 2.5rem;
}
.drop-zone .lead {
    color: var(--pm-ink);
    font-weight: 750;
}
.drop-zone .text-muted {
    color: var(--pm-muted) !important;
}
.drop-zone label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border-radius: 0.45rem;
    background: var(--pm-blue-strong);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.pm-file-list {
    min-height: 1.5rem;
    padding: 0.6rem;
    color: var(--pm-muted);
    font-size: 0.85rem;
}
.pm-file-list > * {
    margin: 0.45rem 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--pm-line);
    border-left: 3px solid var(--pm-pdf);
    background: var(--pm-soft);
}
.pm-settings {
    margin: 1.3rem 0 0;
    padding: 1.3rem 0 0;
    border: 0;
    border-top: 1px solid var(--pm-line);
}
.pm-settings legend,
.pm-label {
    margin-bottom: 0.7rem;
    color: var(--pm-ink);
    font-weight: 750;
}
.pm-settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.3rem;
}
.pm-settings label {
    display: block;
    font-weight: 700;
}
.pm-help {
    margin: 0.35rem 0 0.7rem;
    color: var(--pm-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}
.pm-help small {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.72;
}
.pm-settings input[type="password"],
.pm-result-head input,
.pm-edit-grid input,
.pm-edit-grid textarea {
    width: 100%;
    padding: 0.72rem;
    border: 1px solid var(--pm-line);
    border-radius: 0.45rem;
    background: #0d1724;
    color: var(--pm-ink);
    font: inherit;
}
.pm-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.65rem;
}
.pm-languages label {
    color: var(--pm-muted);
    font-size: 0.82rem;
    font-weight: 500;
}
.pm-languages input {
    accent-color: var(--pm-cyan);
}
.pm-submit,
.pm-secondary,
.pm-excel,
.edit-btn,
.delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 0.45rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}
.pm-submit {
    min-height: 48px;
    padding: 0.85rem 1.15rem;
    border: 1px solid #3988ed;
    border-radius: 5px;
    background: #1769d1;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(23, 105, 209, 0.25);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
.pm-submit:hover {
    transform: translateY(-2px);
    background: #0e58b5;
    border-color: #6eafff;
    box-shadow: 0 10px 26px rgba(23, 105, 209, 0.38);
}
.pm-submit:active {
    transform: translateY(0);
    background: #0a438d;
    box-shadow: 0 3px 10px rgba(23, 105, 209, 0.3);
}
.pm-submit:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(23, 105, 209, 0.6);
}
.pm-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}
.pm-tool .pm-submit {
    width: 100%;
    margin-top: 1.3rem;
}
.pm-secondary {
    border: 1px solid var(--pm-line);
    background: transparent;
    color: var(--pm-ink);
}
.pm-excel {
    border: 0;
    background: var(--pm-excel);
    color: #062015;
}
.pm-trust {
    text-align: center;
    color: var(--pm-muted);
    font-size: 0.78rem;
}
.pm-result-head label {
    display: grid;
    gap: 0.35rem;
    min-width: 200px;
    color: var(--pm-muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.pm-result table {
    width: 100%;
    margin-top: 1.3rem;
    border-collapse: collapse;
}
.pm-result th,
.pm-result td {
    padding: 0.72rem 0.5rem;
    border-bottom: 1px solid var(--pm-line);
    text-align: left;
}
.pm-result th {
    color: var(--pm-blue);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pm-result td:nth-child(n + 3),
.pm-result th:nth-child(n + 3) {
    text-align: right;
}
.edit-btn {
    min-height: 34px;
    padding: 0.4rem 0.6rem;
    border: 0;
    background: var(--pm-blue);
    color: #031220;
    font-size: 0.8rem;
}
.delete-btn {
    min-height: 34px;
    padding: 0.4rem 0.6rem;
    border: 0;
    background: transparent;
    color: var(--pm-pdf);
    font-size: 0.8rem;
}
.pm-result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.pm-result-actions span {
    color: var(--pm-muted);
}
.pm-process,
.pm-editorial,
.pm-faq {
    max-width: 800px;
    margin: 0 auto 4rem;
}
.pm-process h2,
.pm-editorial h2,
.pm-faq h2 {
    color: var(--pm-ink);
}
.pm-process ol {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pm-process li {
    display: flex;
    gap: 0.7rem;
    padding-top: 0.8rem;
    border-top: 2px solid var(--pm-cyan);
}
.pm-process b {
    color: var(--pm-cyan);
    font:
        800 0.8rem ui-monospace,
        monospace;
}
.pm-process span {
    display: grid;
    gap: 0.3rem;
}
.pm-process small {
    color: var(--pm-muted);
}
.pm-editorial {
    padding: 2rem 0;
    border-top: 1px solid var(--pm-line);
    border-bottom: 1px solid var(--pm-line);
}
.pm-faq details {
    padding: 1rem 0;
    border-top: 1px solid var(--pm-line);
}
.pm-faq summary {
    min-height: 24px;
    color: var(--pm-ink);
    font-weight: 750;
    cursor: pointer;
}
.pm-faq p {
    margin: 0.7rem 0 0;
    color: var(--pm-muted);
    line-height: 1.6;
}
.pm-related {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pm-line);
    font-size: 0.9rem;
}
.pm-related span {
    margin-right: auto;
    color: var(--pm-ink);
    font-weight: 750;
}
.pm-related a {
    font-weight: 750;
    text-decoration: none;
}
.pm-related a::after {
    content: " ↗";
}
.pm-related .is-bc3 {
    color: var(--pm-blue);
}
.pm-related .is-excel {
    color: var(--pm-excel);
}
.pm-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.pm-edit-grid label {
    display: grid;
    gap: 0.4rem;
    font-weight: 700;
}
.pm-edit-grid label:nth-last-child(-n + 2) {
    grid-column: 1 / -1;
}
.modal-content {
    background: var(--pm-panel);
    color: var(--pm-ink);
}
#presupuesto-multiple-page :focus-visible,
.modal :focus-visible {
    outline: 3px solid var(--pm-cyan);
    outline-offset: 3px;
}
html[data-theme="light"] .pm-hero {
    background: var(--pm-soft);
}
html[data-theme="light"] .pm-tool .drop-zone {
    background: #f4f9ff;
    border-color: #8ebae5;
}
html[data-theme="light"] .pm-settings input[type="password"],
html[data-theme="light"] .pm-result-head input,
html[data-theme="light"] .pm-edit-grid input,
html[data-theme="light"] .pm-edit-grid textarea {
    background: #f7f9fc;
}
@media (max-width: 700px) {
    .pm-hero-grid,
    .pm-settings-grid,
    .pm-result-head {
        grid-template-columns: 1fr;
    }
    .pm-hero-grid {
        display: grid;
    }
    .pm-flow {
        justify-self: start;
    }
    .pm-result-head {
        display: grid;
    }
    .pm-process ol {
        grid-template-columns: 1fr 1fr;
    }
    .pm-result table {
        min-width: 690px;
        font-size: 0.82rem;
    }
    .pm-related span {
        width: 100%;
    }
    .pm-related {
        align-items: flex-start;
    }
}
@media (prefers-reduced-motion: reduce) {
    #presupuesto-multiple-page * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
.pm-cases,
.pm-preview,
.pm-process,
.pm-editorial,
.pm-faq,
.pm-more {
    max-width: 800px;
    margin: 0 auto 4rem;
}
.pm-cases h2,
.pm-preview h2,
.pm-process h2,
.pm-editorial h2,
.pm-faq h2,
.pm-more h2 {
    margin: 0 0 1.2rem;
    color: var(--pm-ink);
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: -0.03em;
}
.pm-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.pm-case {
    padding: 1.15rem;
    border: 1px solid var(--pm-line);
    background: var(--pm-soft);
}
.pm-case-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 3rem;
    flex-wrap: wrap;
    font:
        800 0.68rem ui-monospace,
        monospace;
}
.pm-case-flow b {
    color: var(--pm-cyan);
    font-size: 1rem;
}
.pm-format {
    display: grid;
    place-items: center;
    min-height: 2.2rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 0.4rem;
}
.pm-pdf {
    color: var(--pm-pdf);
}
.pm-bc3 {
    color: var(--pm-blue);
}
.pm-cyan {
    color: var(--pm-cyan);
}
.pm-excel {
    color: var(--pm-excel);
}
.pm-case h3 {
    margin: 1.05rem 0 0.35rem;
    color: var(--pm-ink);
    font-size: 1rem;
}
.pm-case p {
    margin: 0;
    color: var(--pm-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}
.pm-preview {
    padding: 2rem 0;
    border-top: 1px solid var(--pm-line);
    border-bottom: 1px solid var(--pm-line);
}
.pm-preview-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
}
.pm-bc3-sheet {
    overflow: hidden;
    border: 1px solid var(--pm-line);
    border-radius: 0.5rem;
    background: var(--pm-panel);
    box-shadow: 0 12px 30px #0004;
}
.pm-sheet-bar {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    background: rgba(80, 212, 154, 0.08);
    color: var(--pm-muted);
    font:
        700 0.72rem ui-monospace,
        monospace;
}
.pm-sheet-bar b {
    color: var(--pm-excel);
}
.pm-bc3-sheet pre {
    margin: 0;
    padding: 1rem;
    color: var(--pm-blue);
    font:
        600 0.72rem / 1.7 ui-monospace,
        monospace;
    white-space: pre-wrap;
}
.pm-preview-copy > p {
    margin: 0 0 1rem;
    color: var(--pm-muted);
    line-height: 1.65;
}
.pm-preview-copy dl {
    margin: 0;
    border-top: 1px solid var(--pm-line);
}
.pm-preview-copy dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--pm-line);
    font-size: 0.78rem;
}
.pm-preview-copy dt {
    color: var(--pm-muted);
}
.pm-preview-copy dd {
    margin: 0;
    color: var(--pm-ink);
    font-weight: 700;
}
.pm-editorial {
    padding: 2rem 0;
    border-top: 1px solid var(--pm-line);
    border-bottom: 1px solid var(--pm-line);
}
.pm-editorial p {
    color: var(--pm-muted);
    line-height: 1.7;
}
.pm-more {
    padding-top: 1.5rem;
    border-top: 1px solid var(--pm-line);
}
.pm-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.pm-more-grid a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--pm-line);
    border-top: 2px solid currentColor;
    color: var(--pm-ink);
    text-decoration: none;
    transition:
        transform 0.2s,
        background 0.2s,
        border-color 0.2s;
}
.pm-more-grid a:hover {
    transform: translateY(-3px);
    background: var(--pm-soft);
    border-color: currentColor;
}
.pm-more-grid strong,
.pm-more-grid small {
    display: block;
}
.pm-more-grid strong {
    font-size: 0.92rem;
}
.pm-more-grid small {
    margin-top: 0.25rem;
    color: var(--pm-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}
.pm-more-grid > b {
    font-size: 1.25rem;
    color: currentColor;
}
.pm-more-icon {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid currentColor;
    border-radius: 0.45rem;
    font:
        800 0.68rem ui-monospace,
        monospace;
}
@media (max-width: 700px) {
    .pm-cases-grid,
    .pm-preview-grid,
    .pm-more-grid {
        grid-template-columns: 1fr;
    }
    .pm-cases,
    .pm-preview,
    .pm-process,
    .pm-editorial,
    .pm-faq,
    .pm-more {
        margin-bottom: 3rem;
    }
    .pm-case-flow {
        justify-content: flex-start;
    }
    .pm-preview {
        padding: 1.5rem 0;
    }
    .pm-more-grid a {
        grid-template-columns: auto 1fr auto;
    }
}

/* Lower-page rhythm: one continuous editorial thread from review to the next tool. */
.pm-cases,
.pm-preview,
.pm-process,
.pm-editorial,
.pm-faq,
.pm-more {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.pm-cases {
    padding: 1.1rem 0 0;
    margin-bottom: 5rem;
}
.pm-cases-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
    gap: 2rem;
    align-items: end;
}
.pm-cases h2,
.pm-preview h2,
.pm-process h2,
.pm-editorial h2,
.pm-faq h2,
.pm-more h2 {
    font-size: clamp(1.65rem, 3.2vw, 2.55rem);
    line-height: 1.05;
}
.pm-cases-heading p,
.pm-preview-lead,
.pm-more-intro {
    margin: 0;
    color: var(--pm-muted);
    line-height: 1.65;
}
.pm-case-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
    padding: 1rem 0;
    border-top: 1px solid var(--pm-line);
    border-bottom: 1px solid var(--pm-line);
    font:
        700 0.72rem ui-monospace,
        monospace;
}
.pm-case-line b {
    color: var(--pm-cyan);
    font-size: 1.1rem;
}
.pm-case-divider {
    color: var(--pm-line);
    font-size: 1.2rem;
    margin: 0 0.25rem;
}
.pm-format {
    border-radius: 2px;
    padding: 0.45rem 0.6rem;
}
.pm-preview {
    padding: 2rem 0;
    margin-bottom: 4.5rem;
    border-top: 0;
    border-bottom: 1px solid var(--pm-line);
}
.pm-preview-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}
.pm-preview-lead {
    max-width: 570px;
    font-size: 1.05rem;
}
.pm-result-note {
    padding: 1.1rem 1.2rem;
    border-left: 2px solid var(--pm-excel);
    background: var(--pm-soft);
}
.pm-result-mark {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--pm-excel);
    font-size: 1.3rem;
}
.pm-result-note strong {
    color: var(--pm-ink);
}
.pm-result-note p {
    margin: 0.35rem 0 0;
    color: var(--pm-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}
.pm-process {
    margin-bottom: 4.5rem;
}
.pm-process ol {
    gap: 0;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--pm-line);
}
.pm-process li {
    min-height: 100px;
    padding: 1rem 0.8rem 0 0;
    border-top: 0;
    border-right: 1px solid var(--pm-line);
}
.pm-process li:not(:first-child) {
    padding-left: 1rem;
}
.pm-process li:last-child {
    border-right: 0;
}
.pm-process small {
    line-height: 1.45;
}
.pm-editorial {
    padding: 2rem 0;
    margin-bottom: 4.5rem;
}
.pm-editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.pm-editorial-grid p {
    margin: 0;
}
.pm-faq {
    margin-bottom: 4.5rem;
}
.pm-faq h2 {
    margin-bottom: 1.5rem;
}
.pm-more {
    padding: 2.2rem 0 0;
    margin-bottom: 2rem;
    border-top: 2px solid var(--pm-blue);
}
.pm-more h2 {
    margin-bottom: 0.65rem;
}
.pm-more-intro {
    max-width: 560px;
    margin-bottom: 1.5rem;
}
.pm-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--pm-line);
    border-bottom: 1px solid var(--pm-line);
}
.pm-more-grid a {
    border: 0;
    border-right: 1px solid var(--pm-line);
    border-top: 0;
    border-radius: 0;
    padding: 1.15rem 1rem;
    background: transparent;
}
.pm-more-grid a:last-child {
    border-right: 0;
}
.pm-more-grid a:hover {
    transform: none;
    background: var(--pm-soft);
}
@media (max-width: 700px) {
    .pm-cases-heading,
    .pm-preview-grid,
    .pm-editorial-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pm-case-line {
        align-items: flex-start;
        line-height: 1.5;
    }
    .pm-case-divider {
        display: none;
    }
    .pm-process ol {
        grid-template-columns: 1fr 1fr;
    }
    .pm-process li:nth-child(2n) {
        border-right: 0;
    }
    .pm-process li:nth-child(n + 3) {
        border-top: 1px solid var(--pm-line);
        padding-top: 1rem;
    }
    .pm-process li:nth-child(3) {
        padding-left: 0;
    }
    .pm-more-grid {
        grid-template-columns: 1fr;
    }
    .pm-more-grid a,
    .pm-more-grid a:last-child {
        border-right: 0;
        border-bottom: 1px solid var(--pm-line);
    }
    .pm-more-grid a:last-child {
        border-bottom: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .pm-more-grid a:hover {
        transform: none;
    }
}

/* Keep the public dark canvas readable while preserving the light upload surface. */
html[data-theme="dark"] #presupuesto-multiple-page {
    --pm-bg: #101a28;
    --pm-ink: #eef5fb;
    --pm-muted: #b7c8d8;
    --pm-line: #34485d;
    --pm-panel: #182637;
    --pm-soft: #142437;
    --pm-blue: #75b7ff;
    --pm-blue-strong: #75b7ff;
    --pm-pdf: #ff9696;
    --pm-excel: #69d8a1;
    --pm-cyan: #63d9d0;
}
html[data-theme="dark"] #presupuesto-multiple-page .pm-tool {
    --pm-ink: #eef5fb;
    --pm-muted: #b7c8d8;
    --pm-line: #34485d;
    --pm-panel: #142437;
    --pm-soft: #142437;
    color: var(--pm-ink);
}
html[data-theme="dark"] #presupuesto-multiple-page .pm-result {
    --pm-ink: #eef5fb;
    --pm-muted: #b7c8d8;
    --pm-line: #34485d;
    --pm-panel: #142437;
    --pm-soft: #142437;
    color: var(--pm-ink);
}
#presupuesto-multiple-page .pm-tool {
    background: var(--pm-soft);
}
html[data-theme="dark"] #presupuesto-multiple-page .pm-tool h2,
html[data-theme="dark"] #presupuesto-multiple-page .pm-tool .pm-label,
html[data-theme="dark"]
    #presupuesto-multiple-page
    .pm-tool
    .pm-settings
    legend {
    color: var(--pm-ink);
}
#presupuesto-multiple-page .pm-more-grid a:first-child {
    color: var(--pm-blue);
}
#presupuesto-multiple-page .pm-more-grid a:nth-child(2) {
    color: var(--pm-excel);
}
#presupuesto-multiple-page .pm-more-icon.pm-excel {
    background: var(--pm-excel);
    border-color: var(--pm-excel);
    color: #062015;
}
#presupuesto-multiple-page .pm-more-grid small {
    color: var(--pm-muted);
}
#presupuesto-multiple-page .pm-tool .drop-zone .lead {
    color: #eef5fb;
}
#presupuesto-multiple-page .pm-tool .drop-zone .text-muted {
    color: #b7c8d8 !important;
}

/* Reusable public technical-grid intensity system for this landing. */
#presupuesto-multiple-page {
    --pm-grid-size: var(--public-grid-size, 72px);
    --pm-grid-line: rgba(117, 183, 255, 0.03);
    background-color: var(--pm-bg);
    background-image:
        linear-gradient(var(--pm-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--pm-grid-line) 1px, transparent 1px);
    background-size: var(--pm-grid-size) var(--pm-grid-size);
}
#presupuesto-multiple-page .pm-hero,
#presupuesto-multiple-page .pm-tool,
#presupuesto-multiple-page .pm-result,
#presupuesto-multiple-page .pm-cases,
#presupuesto-multiple-page .pm-preview,
#presupuesto-multiple-page .pm-process,
#presupuesto-multiple-page .pm-editorial,
#presupuesto-multiple-page .pm-faq,
#presupuesto-multiple-page .pm-more {
    background-image:
        linear-gradient(var(--pm-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--pm-grid-line) 1px, transparent 1px);
    background-size: var(--pm-grid-size) var(--pm-grid-size);
}
#presupuesto-multiple-page .pm-hero {
    --pm-grid-line: rgba(117, 183, 255, 0.12);
    background-image: none;
}
#presupuesto-multiple-page .pm-tool,
#presupuesto-multiple-page .pm-result {
    --pm-grid-line: rgba(117, 183, 255, 0.045);
}
#presupuesto-multiple-page .pm-cases,
#presupuesto-multiple-page .pm-preview,
#presupuesto-multiple-page .pm-process,
#presupuesto-multiple-page .pm-editorial,
#presupuesto-multiple-page .pm-faq,
#presupuesto-multiple-page .pm-more {
    --pm-grid-line: rgba(117, 183, 255, 0.018);
}
#presupuesto-multiple-page .pm-hero::before {
    opacity: 0;
}
html[data-theme="light"] #presupuesto-multiple-page {
    --pm-grid-line: rgba(30, 61, 92, 0.025);
}
html[data-theme="light"] #presupuesto-multiple-page .pm-hero {
    --pm-grid-line: rgba(30, 61, 92, 0.06);
}
html[data-theme="light"] #presupuesto-multiple-page .pm-tool,
html[data-theme="light"] #presupuesto-multiple-page .pm-result {
    --pm-grid-line: rgba(30, 61, 92, 0.018);
}
html[data-theme="light"] #presupuesto-multiple-page .pm-cases,
html[data-theme="light"] #presupuesto-multiple-page .pm-preview,
html[data-theme="light"] #presupuesto-multiple-page .pm-process,
html[data-theme="light"] #presupuesto-multiple-page .pm-editorial,
html[data-theme="light"] #presupuesto-multiple-page .pm-faq,
html[data-theme="light"] #presupuesto-multiple-page .pm-more {
    --pm-grid-line: rgba(30, 61, 92, 0.01);
}

/* The Bootstrap modal is portaled outside #presupuesto-multiple-page, so it
       must own its surface colors and scrolling instead of consuming --pm-* vars. */
#editItemModal .pm-modal-dialog {
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
}
#editItemModal .pm-modal-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    border: 1px solid #d8e2eb;
    background-color: #fff;
    color: #102236;
}
#editItemModal .pm-modal-header,
#editItemModal .pm-modal-footer {
    flex: 0 0 auto;
    background-color: #fff;
    color: #102236;
}
#editItemModal .pm-modal-header {
    border-bottom-color: #d8e2eb;
}
#editItemModal .pm-modal-footer {
    border-top: 1px solid #d8e2eb;
}
#editItemModal .pm-modal-body {
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
}
#editItemModal .pm-edit-grid {
    gap: 1rem;
}
#editItemModal .pm-edit-grid label {
    gap: 0.5rem;
    color: #102236;
    line-height: 1.35;
}
#editItemModal .pm-edit-grid input,
#editItemModal .pm-edit-grid textarea {
    border-color: #9fb3c7;
    background-color: #f7f9fc;
    color: #102236;
}
#editItemModal .pm-edit-grid input::placeholder,
#editItemModal .pm-edit-grid textarea::placeholder {
    color: #5b6d7d;
}
#editItemModal :focus-visible {
    outline-color: #168f86;
}
html[data-theme="dark"] #editItemModal .pm-modal-card,
html[data-theme="dark"] #editItemModal .pm-modal-header,
html[data-theme="dark"] #editItemModal .pm-modal-footer {
    border-color: #34485d;
    background-color: #182637;
    color: #eef5fb;
}
html[data-theme="dark"] #editItemModal .pm-modal-header {
    border-bottom-color: #34485d;
}
html[data-theme="dark"] #editItemModal .pm-modal-footer {
    border-top-color: #34485d;
}
html[data-theme="dark"] #editItemModal .pm-edit-grid label {
    color: #eef5fb;
}
html[data-theme="dark"] #editItemModal .pm-edit-grid input,
html[data-theme="dark"] #editItemModal .pm-edit-grid textarea {
    border-color: #6d89a3;
    background-color: #0d1724;
    color: #eef5fb;
}
html[data-theme="dark"] #editItemModal .pm-edit-grid input::placeholder,
html[data-theme="dark"] #editItemModal .pm-edit-grid textarea::placeholder {
    color: #b7c8d8;
}
@media (max-width: 700px) {
    #editItemModal .pm-modal-dialog {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        margin: 0.5rem;
    }
    #editItemModal .pm-modal-card {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }
    #editItemModal .pm-edit-grid {
        grid-template-columns: 1fr;
    }
}
