/* Roots Ads – price list (online page and A4 print document).
   Neutral class names (cenik-*): ad blockers hide elements named after ads.
   All component rules are nested under .cenik:not(#cenik-root): the ID in :not()
   lifts their specificity above the theme's content styles (.page-content ul, h2…),
   so the price list looks the same in any page template. */

.cenik:not(#cenik-root) {
    & {
        --cenik-green: #28a745;
        --cenik-green-dark: #1b6e30;
        --cenik-green-soft: #eaf6ed;
        --cenik-purple: #7848a8; /* the "časopis s kořeny" line of the logo; white text 6.4:1 */
        --cenik-ink: #343a40;
        --cenik-muted: #5f6b64; /* 5.6:1 on white, 5.0:1 on green-soft */
        --cenik-line: #dde4de;
        --cenik-paper: #fff;
        --cenik-shadow: 0 10px 28px rgba(27, 52, 34, 0.16), 0 2px 6px rgba(27, 52, 34, 0.08);
        color: var(--cenik-ink);
        font-family:
            "Inter",
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            Roboto,
            sans-serif;
        line-height: 1.5;
        font-variant-numeric: tabular-nums;
        container-type: inline-size;
        /* Padding inside the width, so the print sheet is exactly A4 on screen as on paper */
        box-sizing: border-box;
    }

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

    & h1,
    & h2,
    & h3,
    & p,
    & ul,
    & dl,
    & figure {
        margin: 0;
    }

    & p,
    & li {
        text-wrap: pretty;
    }

    & h1,
    & h2,
    & h3 {
        text-wrap: balance;
    }

    & ::selection {
        background: var(--cenik-green-soft);
        color: var(--cenik-green-dark);
    }

    & a {
        color: var(--cenik-green-dark);
        text-underline-offset: 0.18em;
    }

    & a:focus-visible {
        outline: 2px solid var(--cenik-green);
        outline-offset: 2px;
        border-radius: 3px;
    }

    /* Variant switch (online only) */
    & .cenik-switch {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
        font-size: 0.9375rem;
    }

    & .cenik-switch a,
    & .cenik-switch__current {
        padding: 0.4rem 0.9rem;
        border: 1px solid var(--cenik-line);
        border-radius: 999px;
        text-decoration: none;
        color: var(--cenik-ink);
    }

    & .cenik-switch a:hover {
        border-color: var(--cenik-green);
        color: var(--cenik-green-dark);
    }

    & .cenik-switch__current {
        background: var(--cenik-green-dark);
        border-color: var(--cenik-green-dark);
        color: #fff;
        font-weight: 600;
    }

    & .cenik-switch .cenik-switch__pdf {
        margin-left: auto;
        font-weight: 600;
    }

    & .cenik-switch .cenik-switch__language {
        font-weight: 600;
    }

    /* Sections */
    & .cenik-page {
        position: relative;
        margin-bottom: 3.5rem;
    }

    & .cenik-heading {
        display: flex;
        align-items: baseline;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.5rem;
        border-bottom: 3px solid var(--cenik-green);
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.01em;
        color: var(--cenik-green-dark);
    }

    & .cenik-heading__part {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--cenik-ink);
    }

    /* Cover */
    & .cenik-cover {
        display: grid;
        gap: 2.5rem;
        align-items: center;
        padding: 2.5rem;
        border-radius: 14px;
        background: var(--cenik-green-soft);
    }

    & .cenik-cover__logo {
        display: block;
        max-width: 200px;
        max-height: 80px;
        width: auto;
        height: auto;
        margin-bottom: 2rem;
    }

    & .cenik-cover__title {
        margin-bottom: 1rem;
        font-size: clamp(2rem, 4vw, 2.9rem);
        font-weight: 700;
        line-height: 1.08;
        letter-spacing: -0.025em;
        color: var(--cenik-ink);
    }

    & .cenik-cover__lead {
        max-width: 36em;
        font-size: 1.125rem;
    }

    & .cenik-cover__date {
        margin-top: 1.5rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--cenik-muted);
    }

    /* Real screenshots in a browser window and a phone */
    & .cenik-devices {
        position: relative;
        padding: 0 9% 9% 0;
    }

    & .cenik-devices img {
        display: block;
        width: 100%;
        height: auto;
    }

    & .cenik-devices__browser {
        overflow: hidden;
        border-radius: 10px;
        background: #fff;
        box-shadow: var(--cenik-shadow);
    }

    & .cenik-devices__bar {
        display: block;
        padding: 0.45em 1em;
        border-bottom: 1px solid var(--cenik-line);
        background: #f4f6f4;
        font-size: 0.7rem;
        color: var(--cenik-muted);
    }

    & .cenik-devices__phone {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 27%;
        overflow: hidden;
        border: 5px solid var(--cenik-ink);
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--cenik-shadow);
    }

    /* Side by side only where the price list itself is wide (not the window: the page column may be narrow) */
    @container (min-width: 900px) {
        & .cenik-cover--visual {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        }
    }

    /* Why us */
    /* Three plain facts, set as large type (not stat tiles) */
    & .cenik-facts {
        display: grid;
        gap: 0.35em;
        max-width: 40ch;
        margin: 0 0 2.25rem;
        padding: 0;
        list-style: none;
        font-size: clamp(1.3rem, 2.4vw, 1.75rem);
        font-weight: 600;
        line-height: 1.22;
        letter-spacing: -0.015em;
        color: var(--cenik-green-dark);
    }

    & .cenik-facts li:first-child {
        color: var(--cenik-purple);
    }

    & .cenik-reasons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
        gap: 1.5rem 2rem;
    }

    & .cenik-reason {
        padding-top: 1rem;
        border-top: 1px solid var(--cenik-line);
    }

    & .cenik-reason h3 {
        margin-bottom: 0.6rem;
        font-size: 1.1rem;
        line-height: 1.3;
    }

    & .cenik-checks {
        padding: 0;
        list-style: none;
    }

    & .cenik-checks li {
        position: relative;
        margin-bottom: 0.4rem;
        padding-left: 1.4em;
    }

    & .cenik-checks li::before {
        content: "";
        position: absolute;
        left: 0.15em;
        top: 0.45em;
        width: 0.6em;
        height: 0.35em;
        border-left: 2px solid var(--cenik-green);
        border-bottom: 2px solid var(--cenik-green);
        transform: rotate(-45deg);
    }

    /* Item: picture + details */
    & .cenik-item {
        display: grid;
        grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
        gap: 1.75rem;
        align-items: start;
        padding: 1.5rem 0;
        border-top: 1px solid var(--cenik-line);
        break-inside: avoid;
    }

    & .cenik-heading + .cenik-item,
    & .cenik-overview + .cenik-page--pair .cenik-item:first-child {
        border-top: 0;
        padding-top: 0;
    }

    & .cenik-item__media .cenik-shot {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border: 1px solid var(--cenik-line);
        border-radius: 8px;
        box-shadow: 0 4px 14px rgba(27, 52, 34, 0.1);
    }

    & .cenik-item__title {
        margin-bottom: 0.35rem;
        font-size: 1.25rem;
        line-height: 1.25;
    }

    & .cenik-item__text {
        margin-bottom: 0.75rem;
        max-width: 60ch;
    }

    & .cenik-item__note {
        margin-top: 0.5rem;
        font-size: 0.875rem;
        color: var(--cenik-muted);
    }

    & .cenik-specs {
        display: grid;
        gap: 0.2rem;
        font-size: 0.9375rem;
    }

    & .cenik-specs div {
        display: flex;
        flex-wrap: wrap;
        gap: 0 0.5rem;
    }

    & .cenik-specs dt {
        color: var(--cenik-muted);
    }

    & .cenik-specs dt::after {
        content: ":";
    }

    & .cenik-specs dd {
        margin: 0;
        font-weight: 600;
    }

    & .cenik-price {
        margin-top: 0.85rem;
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.2;
        color: var(--cenik-green-dark);
    }

    & .cenik-price__unit {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.9375rem;
        font-weight: 500;
        line-height: 1.35;
        color: var(--cenik-ink);
    }

    & .cenik-options {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    & .cenik-option {
        flex: 1 1 10rem;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.9rem 1rem;
        border: 1px solid var(--cenik-line);
        border-radius: 10px;
    }

    & .cenik-option .cenik-price {
        margin: 0;
    }

    & .cenik-option small {
        display: block;
        font-size: 0.8125rem;
        color: var(--cenik-muted);
    }

    & .cenik-options--list {
        flex-direction: column;
    }

    & .cenik-options--list .cenik-option {
        flex: none;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    & .cenik-options--list .cenik-price {
        white-space: nowrap;
    }

    & .cenik-option--highlight {
        border-color: var(--cenik-green);
        background: var(--cenik-green-soft);
    }

    & .cenik-option--highlight small {
        font-weight: 700;
        color: var(--cenik-purple); /* 5.8:1 on green-soft */
    }

    & .cenik-extra {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        margin-top: 1rem;
        padding: 1rem 1.25rem;
        border-radius: 10px;
        background: #f3f6f3;
    }

    & .cenik-extra h3 {
        margin-bottom: 0.25rem;
        font-size: 1rem;
    }

    & .cenik-extra p {
        font-size: 0.9375rem;
    }

    & .cenik-extra .cenik-price {
        margin: 0;
        white-space: nowrap;
    }

    & .cenik-vat {
        margin-top: 1rem;
        font-size: 0.8125rem;
        color: var(--cenik-muted);
    }

    /* Banner overview */
    & .cenik-overview__lead {
        max-width: 70ch;
        margin-bottom: 1.25rem;
    }

    & .cenik-pair-lead {
        grid-column: 1 / -1;
        max-width: 70ch;
        margin: -0.5rem 0 1.25rem;
        color: var(--cenik-muted);
    }

    /* Wireframes */
    & .cenik-schema {
        display: block;
        width: 100%;
        height: auto;
    }

    & .cenik-schema__page {
        fill: #f6f8f6;
        stroke: #cfd6cf;
        stroke-width: 1;
    }
    & .cenik-schema__bar {
        fill: #fff;
    }
    & .cenik-schema__logo {
        fill: #c3ccc3;
    }
    & .cenik-schema__block {
        fill: #dfe5df;
    }
    & .cenik-schema__line {
        fill: #d2d9d2;
    }
    & .cenik-schema__card {
        fill: #fff;
        stroke: #cfd6cf;
        stroke-width: 1;
    }
    & .cenik-schema__dim {
        fill: rgba(52, 58, 64, 0.45);
    }
    & .cenik-schema__outline {
        fill: none;
        stroke: #1b6e30;
        stroke-width: 1.5;
        stroke-dasharray: 4 3;
    }
    & .cenik-schema__fb {
        fill: #1877f2;
    }
    & .cenik-schema__yours {
        fill: #1b6e30; /* white label 6.3:1 */
    }
    & .cenik-item__media--phone .cenik-schema--phone {
        width: min(100%, 15rem);
        margin-inline: auto;
        filter: drop-shadow(0 10px 18px rgba(27, 52, 34, 0.18));
    }
    & .cenik-schema__bezel {
        fill: var(--cenik-ink);
    }
    & .cenik-schema__screen {
        fill: #fff;
    }
    & .cenik-schema__fbbar {
        fill: #e7f0fd;
    }
    & .cenik-schema__button {
        fill: #fff;
    }
    & .cenik-schema__label {
        fill: #fff;
        font-family: "Inter", sans-serif;
        font-size: 7.5px;
        font-weight: 700;
    }

    /* Closing page */
    & .cenik-end {
        padding: 2.5rem;
        border-radius: 14px;
        background: var(--cenik-green-dark);
        color: #fff;
    }

    & .cenik-end__logo {
        display: inline-block;
        margin-bottom: 2rem;
    }

    /* The logo reversed to white on the dark green */
    & .cenik-end__logo img {
        display: block;
        max-width: 180px;
        max-height: 70px;
        width: auto;
        height: auto;
        filter: brightness(0) invert(1);
    }

    & .cenik-end__title {
        margin-bottom: 0.5rem;
        font-size: clamp(2rem, 4vw, 2.9rem);
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.025em;
        color: #fff;
    }

    & .cenik-end__note {
        margin-bottom: 1.5rem;
        font-size: 1.2rem;
        color: #e3f1e6;
    }

    & .cenik-end .cenik-contact a {
        color: #fff;
    }

    & .cenik-end__address {
        margin-top: 0.4rem;
        color: #e3f1e6;
    }

    & .cenik-end__needs {
        max-width: 60ch;
        margin-top: 1.25rem;
        color: #e3f1e6;
    }

    & .cenik-end__needs strong {
        color: #fff;
    }

    & .cenik-end__photo {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 16rem;
        object-fit: cover;
        border-radius: 10px;
    }

    @container (min-width: 760px) {
        & .cenik-end--photo {
            display: grid;
            grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
            gap: 2.5rem;
            align-items: stretch;
        }
    }

    /* How an order works: the sequence is the information, so the steps are numbered */
    & .cenik-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
        margin: 2rem 0 0;
        padding: 1.25rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        list-style: none;
        counter-reset: cenik-step;
    }

    & .cenik-steps li {
        counter-increment: cenik-step;
        font-size: 0.9375rem;
        line-height: 1.4;
        color: #e3f1e6;
    }

    & .cenik-steps li::before {
        content: counter(cenik-step);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        margin-bottom: 0.5rem;
        border-radius: 50%;
        background: var(--cenik-purple);
        font-weight: 700;
        color: #fff;
    }

    & .cenik-steps strong {
        display: block;
        font-size: 1.05rem;
        color: #fff;
    }

    /* Items wrap as whole units and are spaced by the gap: no separator can be left at a line end */
    & .cenik-contact {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.1em 1.1em;
    }

    & .cenik-contact a {
        font-weight: 600;
    }

    & .cenik-contact--large {
        font-size: 1.35rem;
        line-height: 1.5;
    }

    & .cenik-contact__name {
        font-weight: 700;
    }

    & .cenik-contact--stack {
        display: flex;
        flex-direction: column;
        font-size: 0.875rem;
        line-height: 1.45;
    }

    /* Compact variant */
    & .cenik-compact-head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
        border-bottom: 3px solid var(--cenik-green);
    }

    & .cenik-compact-head__logo {
        max-width: 120px;
        max-height: 52px;
        width: auto;
        height: auto;
    }

    & .cenik-compact-head__title {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.15;
        letter-spacing: -0.02em;
    }

    & .cenik-compact-head__meta {
        font-size: 0.8125rem;
        color: var(--cenik-muted);
    }

    & .cenik-compact-head__contact {
        padding: 0.6rem 0.9rem;
        border-radius: 10px;
        background: var(--cenik-green-soft);
    }

    & .cenik-compact-head__address {
        margin-top: 0.2rem;
        font-size: 0.8125rem;
        color: var(--cenik-muted);
    }

    & .cenik-compact-head__note {
        margin-bottom: 0.15rem;
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--cenik-green-dark);
    }

    & .cenik-table-title {
        margin: 1.1rem 0 0.35rem;
        font-size: 1.05rem;
        color: var(--cenik-green-dark);
    }

    & .cenik-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9375rem;
    }

    & .cenik-table th,
    & .cenik-table td {
        padding: 0.5rem 0.5rem;
        border-bottom: 1px solid var(--cenik-line);
        text-align: left;
        vertical-align: top;
    }

    & .cenik-table thead th {
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--cenik-muted);
        vertical-align: bottom;
    }

    & .cenik-table tbody th {
        font-weight: 600;
    }

    & .cenik-table .cenik-table__num {
        text-align: right;
        white-space: nowrap;
    }

    & .cenik-table__price {
        font-weight: 700;
        color: var(--cenik-green-dark);
    }

    & .cenik-table__sizes {
        font-size: 0.92em;
    }

    @media (max-width: 640px) {
        & .cenik-item {
            grid-template-columns: 1fr;
        }

        & .cenik-cover,
        & .cenik-end {
            padding: 1.5rem;
        }

        & .cenik-compact-head {
            grid-template-columns: 1fr;
        }

        & .cenik-extra {
            flex-direction: column;
            align-items: flex-start;
        }

        & .cenik-table thead {
            display: none;
        }

        & .cenik-table tr {
            display: grid;
            grid-template-columns: 1fr auto;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--cenik-line);
        }

        & .cenik-table th,
        & .cenik-table td {
            padding: 0.15rem 0;
            border: 0;
        }

        & .cenik-table td:not(.cenik-table__num) {
            grid-column: 1 / -1;
        }

        & .cenik-table .cenik-table__num {
            text-align: left;
        }
    }

    /* ---------- Print document: magazine = A4 landscape sheets, compact = A4 portrait ---------- */

    &.cenik--print {
        width: 297mm;
        margin: 1.5rem auto;
        counter-reset: cenik-sheet;
    }

    &.cenik--print .cenik-page {
        min-height: 210mm;
        margin: 0 0 1.5rem;
        padding: 14mm 16mm 20mm;
        border-radius: 0;
        background: var(--cenik-paper);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
        counter-increment: cenik-sheet;
    }

    &.cenik--print .cenik-cover {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 10mm;
        padding: 16mm 0 16mm 18mm;
        overflow: hidden;
        background: var(--cenik-green-soft);
    }

    &.cenik--print .cenik-cover__title {
        font-size: 2.8rem;
    }

    &.cenik--print .cenik-cover__logo {
        max-width: 300px;
        max-height: 130px;
        margin-bottom: 10mm;
    }

    /* The browser window bleeds off the right edge of the sheet */
    &.cenik--print .cenik-devices {
        padding: 0 0 12% 0;
    }

    &.cenik--print .cenik-devices__browser {
        border-radius: 10px 0 0 10px;
    }

    &.cenik--print .cenik-devices__phone {
        right: 12mm;
        width: 25%;
    }

    /* Single-topic sheets: heading on top, content composed over the whole sheet */
    &.cenik--print .cenik-why,
    &.cenik--print .cenik-page--single {
        display: flex;
        flex-direction: column;
    }

    &.cenik--print .cenik-facts {
        margin: 4mm 0 0;
        font-size: 2.15rem;
    }

    &.cenik--print .cenik-why .cenik-reasons {
        margin-top: 14mm;
    }

    &.cenik--print .cenik-page--single .cenik-item {
        margin-top: 4mm;
        align-items: start;
        grid-template-columns: 128mm minmax(0, 1fr);
        padding-bottom: 4mm;
    }

    &.cenik--print .cenik-reasons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10mm;
    }

    &.cenik--print .cenik-reason h3 {
        font-size: 1.2rem;
    }

    &.cenik--print .cenik-item {
        grid-template-columns: 105mm minmax(0, 1fr);
        gap: 12mm;
    }

    /* Two offers side by side on a landscape sheet */
    &.cenik--print .cenik-page--pair {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12mm;
        align-content: start;
    }

    &.cenik--print .cenik-page--pair > .cenik-heading {
        grid-column: 1 / -1;
    }

    &.cenik--print .cenik-page--pair .cenik-item {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 5mm;
        padding: 0;
        border-top: 0;
    }

    &.cenik--print .cenik-page--pair .cenik-item__media {
        width: min(100%, 108mm);
    }

    &.cenik--print .cenik-page--pair .cenik-item__media:has(.cenik-shot) {
        width: 100%;
    }

    &.cenik--print .cenik-end {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 16mm 20mm;
        background: var(--cenik-green-dark);
    }

    /* Photo bleeds off the right edge of the sheet */
    &.cenik--print .cenik-end--photo {
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        gap: 0;
        padding: 0;
    }

    &.cenik--print .cenik-end--photo .cenik-end__main {
        align-self: center;
        padding: 14mm 14mm 14mm 20mm;
    }

    &.cenik--print .cenik-end__photo {
        border-radius: 0;
    }

    &.cenik--print .cenik-end__title {
        font-size: 3.2rem;
    }

    /* Footer of each printed sheet (not on the cover and the closing page) */
    & .cenik-sheet-foot {
        position: absolute;
        left: 16mm;
        right: 16mm;
        bottom: 8mm;
        display: flex;
        align-items: baseline;
        gap: 1rem;
        padding-top: 2mm;
        border-top: 1px solid var(--cenik-line);
        font-size: 9pt;
        line-height: 1.4;
        color: #495057;
    }

    & .cenik-sheet-foot .cenik-contact {
        margin-left: auto;
    }

    & .cenik-sheet-foot a {
        color: inherit;
        font-weight: 400;
        text-decoration: none;
    }

    & .cenik-sheet-foot__number::before {
        content: counter(cenik-sheet);
        font-weight: 700;
        color: var(--cenik-green-dark);
    }

    &.cenik--kompakt.cenik--print {
        width: 210mm;
        min-height: 297mm;
        padding: 12mm 14mm 16mm;
        background: var(--cenik-paper);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    /* One A4 page: dense tables, the size column takes the room it needs */
    &.cenik--kompakt.cenik--print .cenik-compact-head__title {
        font-size: 1.55rem;
    }

    &.cenik--kompakt.cenik--print .cenik-compact-head__meta {
        font-size: 0.8rem;
    }

    &.cenik--kompakt.cenik--print .cenik-table-title {
        margin: 0.8rem 0 0.2rem;
        font-size: 0.95rem;
    }

    &.cenik--kompakt.cenik--print .cenik-table {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    &.cenik--kompakt.cenik--print .cenik-table th,
    &.cenik--kompakt.cenik--print .cenik-table td {
        padding: 0.26rem 0.35rem;
    }

    &.cenik--kompakt.cenik--print .cenik-table tbody th {
        width: 36%;
    }

    &.cenik--kompakt.cenik--print .cenik-table:has(thead) tbody th {
        width: 24%;
    }

    /* Narrow number columns: their headings may wrap, the values never do */
    &.cenik--kompakt.cenik--print .cenik-table thead .cenik-table__num {
        width: 1%;
        white-space: normal;
    }

    @media print {
        &,
        & * {
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }

        &.cenik--print {
            width: auto;
            margin: 0;
        }

        &.cenik--print .cenik-page {
            height: 210mm;
            min-height: 0;
            margin: 0;
            overflow: hidden;
            box-shadow: none;
            break-after: page;
        }

        &.cenik--print .cenik-page:last-child {
            break-after: auto;
        }

        /* Flowing tables: page margins keep room for the repeated footer */
        &.cenik--kompakt.cenik--print {
            page: cenik-compact;
            min-height: 0;
            margin: 0;
            padding-top: 0;
            padding-bottom: 0;
            box-shadow: none;
        }

        &.cenik--kompakt.cenik--print tr {
            break-inside: avoid;
        }
    }
}

/* ---------- Stand-alone print document ---------- */

/* Larger type: a landscape A4 sheet is read like a presentation slide */
.cenik-html {
    font-size: 17px;
}

.cenik-document {
    margin: 0;
    background: #e9ecef;
}

.cenik-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    padding: 0.75rem 1rem;
    background: #343a40;
    color: #fff;
    font:
        0.875rem/1.4 "Inter",
        sans-serif;
}

.cenik-toolbar p {
    margin: 0;
}

.cenik-toolbar button {
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 6px;
    background: #1b6e30;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cenik-toolbar button:hover {
    background: #145424;
}

.cenik-toolbar button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.cenik-print-foot {
    display: none;
}

@page {
    size: A4 landscape;
    margin: 0;
}

@page cenik-compact {
    size: A4 portrait;
    margin: 12mm 0 16mm;
}

@media print {
    .cenik-document {
        background: #fff;
    }

    .cenik-toolbar {
        display: none;
    }

    /* Compact variant: repeats at the bottom of every sheet */
    .cenik-print-foot {
        position: fixed;
        left: 14mm;
        right: 14mm;
        bottom: 6mm;
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding-top: 2mm;
        border-top: 1px solid #dde4de;
        font:
            9pt/1.4 "Inter",
            sans-serif;
        color: #495057;
    }
}
