/* =========================================================================
   Diakonia Miłosierdzia — editorial overlay on Story by HTML5 UP
   Loaded AFTER assets/css/main.css
   ========================================================================= */

:root {
    --cream:       #FAF7F2;
    --cream-2:     #F2EDE3;
    --cream-3:     #E8DFCB;
    --ink:         #1A1612;
    --ink-2:       #3A3128;
    --ink-muted:   #8A7E6F;
    --ink-faint:   #C7BAA3;
    --red:         #B9342B;
    --red-deep:    #8C2520;
    --red-soft:    #D9544A;
    --gold:        #A8854B;
    --line:        #E0D5BD;
    --paper-tint:  rgba(168, 133, 75, 0.04);
}

/* ----- Hard-reset Story aesthetic ----- */

html { scroll-behavior: smooth; }

body {
    background-color: var(--cream) !important;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body, input, textarea, select, button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', 'Times New Roman', serif !important;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-optical-sizing: auto;
    font-variation-settings: "SOFT" 50, "WONK" 0;
}

h1 {
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.035em;
    font-weight: 300;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 400;
}

h3 {
    font-size: clamp(1.1rem, 1.7vw, 1.4rem);
    line-height: 1.2;
    font-weight: 400;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

/* ============ TOP NAVIGATION ============ */

.dm-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
    background-color: transparent;
}

.dm-nav.is-scrolled {
    background-color: rgba(250, 247, 242, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px clamp(20px, 4vw, 48px);
    box-shadow: 0 1px 0 var(--line);
}

.dm-nav__brand {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 17px;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-decoration: none;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.25s;
    /* Allow brand to shrink rather than push toggle out of viewport */
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
}

.dm-nav__brand-text {
    min-width: 0;
    overflow: hidden;
}

.dm-nav__brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.dm-nav__brand:hover { color: var(--red); }

.dm-nav__brand-mark {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: var(--red);
    font-size: 22px;
    line-height: 1;
}

.dm-nav__brand-logo {
    height: var(--dm-logo-nav, 36px);
    width: auto;
    display: block;
    flex-shrink: 0;
    transition: height 0.35s ease, opacity 0.35s ease;
    /* Hidden by default at the top of the page; JS reveals on scroll */
    opacity: 0;
}
/* Once scroll passes the morph threshold, nav logo is shown.
   JS sets inline opacity, but this fallback covers users with JS disabled
   or before initLogoTransition runs. */
.dm-nav.is-scrolled .dm-nav__brand-logo {
    opacity: 1;
}

.dm-nav.is-scrolled .dm-nav__brand-logo {
    height: calc(var(--dm-logo-nav, 36px) * 0.833);
}

.dm-nav__brand-name { display: inline-block; }
.dm-nav__brand-sub {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 2px;
    font-weight: 500;
}

.dm-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.5vw, 36px);
}

.dm-nav__list li { margin: 0; }

.dm-nav__link {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.25s, border-color 0.25s;
}

.dm-nav__link__num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-faint);
    transition: color 0.25s;
}

.dm-nav__link:hover {
    color: var(--ink);
}

.dm-nav__link:hover .dm-nav__link__num,
.dm-nav__link.is-active .dm-nav__link__num {
    color: var(--red);
}

.dm-nav__link.is-active {
    color: var(--ink);
    border-bottom-color: var(--red);
}

.dm-nav__cta {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream) !important;
    background: var(--red);
    padding: 10px 18px;
    text-decoration: none;
    border: 1px solid var(--red);
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.dm-nav__cta:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
}

/* Mobile hamburger — overrides Story's global button rules aggressively */
.dm-nav__toggle {
    display: none;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    line-height: 1 !important;
    border-radius: 0 !important;
    position: relative;
    z-index: 1100;
    flex-shrink: 0;
    margin-left: auto;
    -webkit-appearance: none;
    appearance: none;
    color: var(--ink) !important;
    font-size: 0 !important;
    text-transform: none !important;
}

.dm-nav__toggle span,
.dm-nav__toggle span::before,
.dm-nav__toggle span::after {
    position: absolute;
    display: block;
    height: 2px;
    width: 24px;
    background: var(--ink);
    transition: transform 0.3s, opacity 0.2s, background-color 0.3s;
    left: 8px;
    border-radius: 1px;
}

.dm-nav__toggle span { top: 19px; }
.dm-nav__toggle span::before { content: ""; top: -8px; }
.dm-nav__toggle span::after { content: ""; top: 8px; }

.dm-nav.is-mobile-open .dm-nav__toggle span { background: transparent; }
.dm-nav.is-mobile-open .dm-nav__toggle span::before {
    background: var(--cream);
    transform: translateY(8px) rotate(45deg);
}
.dm-nav.is-mobile-open .dm-nav__toggle span::after {
    background: var(--cream);
    transform: translateY(-8px) rotate(-45deg);
}

/* Hide brand SUB on smaller screens to gain space */
@media (max-width: 1100px) {
    .dm-nav__brand-sub { display: none; }
}

/* Tablet/mobile menu */
@media (max-width: 900px) {
    .dm-nav__toggle { display: block !important; }
    .dm-nav__cta { display: none !important; }

    /* Brand: bold name above smaller sub-line, both visible from the start */
    .dm-nav__brand { gap: 10px; }
    .dm-nav__brand-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
        line-height: 1.15;
        min-width: 0;
    }
    .dm-nav__brand-name {
        font-weight: 600;
        font-size: 16px;
        font-style: italic;
        font-variation-settings: "SOFT" 80;
        color: var(--ink);
        letter-spacing: -0.01em;
        white-space: nowrap;
    }
    .dm-nav__brand-sub {
        display: block !important;   /* override the ≤1100 hide */
        font-size: 10px;
        font-weight: 400;
        font-style: normal;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--ink-muted);
        margin: 0;
    }
    /* Smaller logo on mobile so 2-line text + logo + hamburger fits comfortably */
    .dm-nav__brand-logo { height: calc(var(--dm-logo-nav, 36px) * 0.65); }
    .dm-nav.is-scrolled .dm-nav__brand-logo { height: calc(var(--dm-logo-nav, 36px) * 0.55); }

    /* Mobile menu overlay — full-screen dark sheet, hidden by default */
    .dm-nav__list {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: var(--ink) !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 32px !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s, visibility 0s linear 0.3s;
        z-index: 1050;
    }

    .dm-nav.is-mobile-open .dm-nav__list {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transition: opacity 0.3s !important;
    }

    .dm-nav__list li {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .dm-nav__link {
        font-size: 22px !important;
        color: var(--cream) !important;
        letter-spacing: 0.08em;
        gap: 14px;
        padding: 8px 16px !important;
        border-bottom: none !important;
    }
    .dm-nav__link__num {
        color: var(--red-soft) !important;
        font-size: 18px;
    }
    .dm-nav__link.is-active {
        color: var(--red-soft) !important;
    }

    /* Lock body scroll when mobile menu is open */
    html.dm-modal-locked, body.dm-modal-locked { overflow: hidden !important; }
}

/* Hero top padding already handled by .fullscreen rule (max(80px, 9vh)) */

/* ----- Back to top link ----- */

.dm-back-to-top {
    display: inline-block;
    margin-top: 24px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--ink-faint);
    padding-bottom: 2px;
    transition: color 0.25s, border-color 0.25s;
}

.dm-back-to-top:hover {
    color: var(--red);
    border-bottom-color: var(--red);
}

/* ----- Story section backgrounds ----- */

#wrapper > .style1 { background-color: var(--cream) !important; color: var(--ink); }
#wrapper > .style2 { background-color: var(--cream-2) !important; color: var(--ink); }
#wrapper > .style3 { background-color: var(--ink) !important; color: var(--cream); }
#wrapper > .style3 h1,
#wrapper > .style3 h2,
#wrapper > .style3 h3 { color: var(--cream); }

.banner.style1, .spotlight.style1 {
    background-color: var(--cream);
    color: var(--ink);
}

/* ----- Generous section padding & rhythm ----- */

/* Each section fills the viewport when its content is short, but can grow
   past 100vh when needed — only the page scrolls, no internal scrollbars.
   `safe center` falls back to flex-start when content is taller than the
   section so we never crop into the top of the content. */
#wrapper > section {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: max(72px, 8vh) clamp(20px, 4vw, 50px) max(32px, 4vh);
    display: flex;
    align-items: safe center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* Content flows naturally — no internal scroll, no max-height clip */
#wrapper > section > .inner,
#wrapper > section > .content {
    width: 100%;
    max-height: none;
    overflow: visible;
}

/* Inner gets reasonable max-width and centered alignment */
#wrapper > section > .inner {
    max-width: 1120px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

/* When section has a custom text-align via inline style on .inner, respect it */

/* Sections that should be flex-vertical (so content sits naturally top-to-bottom) */
#wrapper > section.fullscreen {
    /* Same as default now — kept for compatibility */
}

/* Footer is allowed to be its own natural height (not 100vh) */
#wrapper > footer.wrapper {
    height: auto;
    min-height: auto;
    max-height: none;
    padding: 56px 24px 48px;
    overflow: visible;
}
#wrapper > footer.wrapper > .inner { overflow: visible; }

/* Hairline rule above non-hero sections */
#wrapper > section:not(.banner):not(.fullscreen)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--line);
}

/* ----- Section number + eyebrow combo ----- */

.dm-section-meta {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
    margin-bottom: clamp(20px, 3vh, 36px);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 500;
}

.dm-section-meta__num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 22px;
    letter-spacing: 0;
    color: var(--red);
    text-transform: none;
}

.dm-section-meta__divider {
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--ink-faint);
}

.dm-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    display: block;
    margin-bottom: 24px;
}

/* ----- Buttons (Story override) ----- */

input[type="submit"], input[type="reset"], input[type="button"],
button, .button {
    background-color: transparent !important;
    color: var(--ink) !important;
    border: 1px solid var(--ink) !important;
    border-radius: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    padding: 16px 32px !important;
    height: auto !important;
    line-height: 1.2 !important;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s !important;
    cursor: pointer;
}

input[type="submit"]:hover, input[type="button"]:hover,
button:hover, .button:hover {
    background-color: var(--ink) !important;
    color: var(--cream) !important;
}

.button.primary {
    background-color: var(--red) !important;
    color: var(--cream) !important;
    border-color: var(--red) !important;
}

.button.primary:hover {
    background-color: var(--red-deep) !important;
    border-color: var(--red-deep) !important;
}

/* Ghost CTA */
.button.ghost {
    border: none !important;
    padding: 0 !important;
    color: var(--ink) !important;
    background: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: 'Fraunces', serif !important;
    font-style: italic !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    border-bottom: 1px solid var(--ink) !important;
    border-radius: 0 !important;
    padding-bottom: 4px !important;
    height: auto !important;
}
.button.ghost:hover {
    color: var(--red) !important;
    border-bottom-color: var(--red) !important;
    background: none !important;
}

/* ----- Links ----- */

a {
    color: var(--red);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover { color: var(--red-deep); }

/* ----- HERO — must always fit in 100vh, no internal scroll ----- */

#hero {
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

/* Override global .content overflow so hero never scrolls internally */
#hero > .content {
    overflow: visible !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(16px, 2.5vh, 36px) 16px !important;
}

#hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, var(--paper-tint), transparent 60%),
        radial-gradient(circle at 80% 70%, var(--paper-tint), transparent 60%);
    pointer-events: none;
}

#hero > .content {
    position: relative;
    z-index: 2;
    max-width: 960px;
}

#hero .dm-hero-mark {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    color: var(--red);
    line-height: 1;
    margin-bottom: clamp(12px, 2vh, 22px);
    opacity: 0.9;
}

#hero .dm-hero-quote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 350;
    font-size: clamp(0.7rem, 2.3vw, 1.35rem);
    line-height: 1.3;
    color: var(--ink);
    max-width: 100%;
    margin: 0 auto clamp(18px, 3vh, 32px);
    padding: 0 8px;
    letter-spacing: -0.01em;
    font-variation-settings: "SOFT" 100, "opsz" 96;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

#hero .dm-hero-logo {
    display: block;
    margin: 0 auto clamp(10px, 1.6vh, 20px);
    /* Cap by viewport HEIGHT too so logo never crowds the hero on short screens */
    width: min(var(--dm-logo-hero, 180px), 26vw, 22vh);
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(140, 37, 32, 0.18));
    /* Origin for scroll-linked shrink animation (top center) */
    transform-origin: 50% 0%;
    will-change: transform, opacity;
}

#hero h1 {
    font-style: italic;
    font-weight: 300;
    color: var(--ink);
    /* Cap by viewport HEIGHT so 3 lines never push the hero past 100vh */
    font-size: min(clamp(2rem, 5vw, 4.2rem), 8vh);
    line-height: 1.12;
    margin: 0 0 clamp(12px, 2vh, 22px);
    font-variation-settings: "SOFT" 100, "opsz" 144;
}

#hero h1 .num {
    color: var(--red);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    margin-right: 0.15em;
    display: inline-block;
}

#hero .dm-hero-rule {
    display: block;
    width: 64px;
    height: 1px;
    background: var(--ink-faint);
    margin: clamp(14px, 2.5vh, 28px) auto;
}

#hero .subtitle {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    color: var(--ink-muted);
    margin: 0;
    letter-spacing: 0.01em;
}

#hero .scroll-cue {
    position: absolute;
    bottom: clamp(16px, 3vh, 36px);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    border: none;
    z-index: 3;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
}

#hero .scroll-cue::after {
    content: "";
    display: block;
    width: 1px;
    height: 40px;
    background: var(--ink-muted);
    animation: dmScrollPulse 2.4s ease-in-out infinite;
}

#hero .scroll-cue:hover { color: var(--red); }

@keyframes dmScrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: bottom; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: bottom; }
}

/* ----- INTENCJE — full-screen quote with editorial frame ----- */

#intencje {
    background: var(--cream-2) !important;
    position: relative;
}

#intencje::before { background: var(--red) !important; width: 40px !important; height: 1px !important; top: 60px !important; }

#intencje .inner {
    max-width: 880px;
    padding: 0 clamp(20px, 4vw, 40px);
    width: 100%;
}

.dm-quote-display {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 350;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.5;
    color: var(--ink);
    text-align: center;
    margin: clamp(44px, 6vh, 72px) auto;
    max-width: 760px;
    position: relative;
    padding: clamp(72px, 8vh, 96px) clamp(32px, 5vw, 64px) clamp(80px, 9vh, 112px);
    letter-spacing: -0.01em;
    font-variation-settings: "SOFT" 100, "opsz" 96;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 2px;
    box-shadow: 0 1px 0 var(--line), 0 24px 60px -28px rgba(26, 22, 18, 0.16);
}

/* Decorative giant quote mark, sitting at the top edge of the card */
.dm-quote-display::before {
    content: "\201C";
    position: absolute;
    top: clamp(8px, 1.5vh, 18px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(4.5rem, 9vw, 7rem);
    line-height: 1;
    color: var(--red);
    opacity: 1;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    pointer-events: none;
}

/* Thin red hairline beneath the quote mark, anchoring the card */
.dm-quote-display::after {
    content: "";
    position: absolute;
    top: clamp(54px, 6.5vh, 78px);
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 1px;
    background: var(--red);
    opacity: 0.55;
}

.dm-quote-source {
    display: block;
    margin-top: clamp(28px, 4vh, 44px);
    padding-top: clamp(16px, 2vh, 24px);
    border-top: 1px solid var(--line);
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 500;
}

/* ----- IDEA — asymmetric two-column ----- */

.dm-idea {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(48px, 8vw, 96px);
    align-items: start;
    margin-top: 0;
}

/* Idea — fit to content, no forced 100dvh, tight vertical rhythm */
#wrapper > #idea {
    min-height: 0;
    height: auto;
    padding-top: clamp(40px, 5vh, 64px);
    padding-bottom: clamp(40px, 5vh, 64px);
}
#idea .dm-section-meta,
#spotkania .dm-section-meta {
    margin-bottom: clamp(14px, 2vh, 22px);
}

/* Spotkania — fit to content, no forced 100dvh */
#wrapper > #spotkania {
    min-height: 0;
    height: auto;
    padding-top: clamp(40px, 5vh, 64px);
    padding-bottom: clamp(40px, 5vh, 64px);
}
#spotkania h2 { margin-top: 0; }
#spotkania .dm-meetings { margin-top: clamp(20px, 3vh, 32px); }

.dm-idea__quote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    line-height: 1.35;
    color: var(--ink);
    padding-left: 0;
    margin: 0;
    border-left: none;
    background: none;
    position: relative;
    font-variation-settings: "SOFT" 80;
}

.dm-idea__quote::before {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--red);
    margin-bottom: 32px;
}

.dm-idea__source {
    display: block;
    margin-top: 24px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 500;
}

.dm-idea__body {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
}

.dm-idea__body p:first-child::first-letter {
    font-family: 'Fraunces', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 4rem;
    color: var(--red);
    float: left;
    line-height: 0.85;
    margin: 0.05em 0.08em 0 -0.04em;
    font-variation-settings: "SOFT" 100, "opsz" 144;
}

.dm-idea__more {
    margin-top: 32px;
    display: inline-block;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 17px;
    color: var(--ink);
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.dm-idea__more:hover { color: var(--red); }

@media (max-width: 900px) {
    .dm-idea { grid-template-columns: 1fr; gap: 36px; }
}

/* ----- TRZY SPOSOBY — editorial cards ----- */

.dm-ways {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 64px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dm-ways__item {
    padding: 48px 36px 56px;
    text-align: left;
    position: relative;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.35s;
}

.dm-ways__item:last-child { border-right: none; }

.dm-ways__item:hover {
    background-color: rgba(185, 52, 43, 0.04);
}

.dm-ways__item:hover .dm-ways__num { color: var(--red); }
.dm-ways__item:hover .dm-ways__more { color: var(--red); border-bottom-color: var(--red); }

.dm-ways__num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(3rem, 4.5vw, 4.5rem);
    line-height: 0.85;
    color: var(--ink-faint);
    margin-bottom: 18px;
    transition: color 0.35s;
    font-variation-settings: "SOFT" 100;
}

.dm-ways__title {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.2rem, 1.6vw, 1.45rem);
    font-weight: 400;
    margin: 0 0 8px;
    line-height: 1.15;
    color: var(--ink);
}

.dm-ways__sub {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 22px;
}

.dm-ways__desc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-2);
    margin: 0 0 22px;
    flex: 1;
}

.dm-ways__more {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 16px;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    align-self: flex-start;
    transition: color 0.3s, border-color 0.3s;
}

@media (max-width: 900px) {
    .dm-ways { grid-template-columns: 1fr; }
    .dm-ways__item { border-right: none; border-bottom: 1px solid var(--line); padding: 36px 24px; }
    .dm-ways__item:last-child { border-bottom: none; }
}

/* ----- SPOTKANIA — date list editorial ----- */

.dm-meetings {
    list-style: none;
    padding: 0;
    margin: clamp(32px, 5vh, 56px) auto;
    max-width: 600px;
    text-align: center;
    border-top: 1px solid var(--line);
}

.dm-meetings li {
    display: block;
    padding: 22px 16px;
    border-bottom: 1px solid var(--line);
}

.dm-meetings__date {
    display: block;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 350;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    line-height: 1.3;
    color: var(--ink);
    letter-spacing: -0.005em;
    font-variation-settings: "SOFT" 80, "opsz" 96;
}

/* When a digit is detected in the text → it's a real confirmed term,
   not a placeholder like "wkrótce" or "Najbliższy termin" */
.dm-meetings__date--confirmed {
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "SOFT" 100, "opsz" 96;
    color: var(--red);
    letter-spacing: -0.01em;
}

.dm-meetings__what {
    font-size: 14px;
    color: var(--ink-muted);
    text-align: right;
    letter-spacing: 0.02em;
}

.dm-people-note {
    margin-top: 56px;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    font-weight: 500;
}

.dm-people-note strong {
    color: var(--ink);
    font-weight: 500;
}

/* ----- POMÓŻ NAM — three equal compact cards ----- */

.dm-help {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 28px);
    margin-top: clamp(28px, 4vh, 48px);
    text-align: left;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.dm-help-card {
    background: var(--cream);
    padding: clamp(24px, 3vh, 36px) clamp(22px, 2.5vw, 32px) clamp(20px, 2.5vh, 28px);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--line);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    text-align: left;
    min-height: 280px;
}

.dm-help-card:hover {
    transform: translateY(-3px);
    border-color: var(--red);
    box-shadow: 0 18px 40px rgba(140, 37, 32, 0.08);
}

.dm-help-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.dm-help-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 4px 0 0;
    line-height: 1.1;
}

.dm-help-card__num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2rem, 2.8vw, 2.5rem);
    line-height: 0.85;
    color: var(--red);
    transition: color 0.3s;
    flex-shrink: 0;
}

.dm-help-card__lead {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.4;
    color: var(--ink);
    margin: 0 0 14px;
    font-variation-settings: "SOFT" 80;
}

.dm-help-card__desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 0 0 24px;
    flex: 1;
}

.dm-help-card__meta {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 18px;
    font-weight: 500;
}

.dm-help-card__meta strong {
    color: var(--red);
    font-weight: 600;
}

.dm-help-card__cta {
    align-self: flex-start;
    margin-top: auto;
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    padding: 10px 18px !important;
    border: 1px solid var(--ink) !important;
    color: var(--ink) !important;
    background: transparent !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s !important;
    line-height: 1.2 !important;
}

.dm-help-card__cta:hover {
    background: var(--red) !important;
    color: var(--cream) !important;
    border-color: var(--red) !important;
}

.dm-help-card--primary .dm-help-card__cta {
    background: var(--red) !important;
    color: var(--cream) !important;
    border-color: var(--red) !important;
}

.dm-help-card--primary .dm-help-card__cta:hover {
    background: var(--red-deep) !important;
    border-color: var(--red-deep) !important;
}

@media (max-width: 900px) {
    .dm-help { grid-template-columns: 1fr; }
    .dm-help-card { min-height: auto; }
    /* Breathing room below the 3rd (last) card on stacked layout */
    .dm-help-card:last-child { margin-bottom: clamp(40px, 7vh, 80px); }
    #wrapper > #pomoz { padding-bottom: clamp(64px, 10vh, 112px); }
}

/* (Legacy .dm-help__col rules removed — replaced by .dm-help-card) */

.dm-bank {
    background: var(--ink);
    color: var(--cream);
    padding: 22px 24px 20px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 16px;
    position: relative;
}

.dm-bank::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--red);
}

.dm-bank__row { margin-bottom: 16px; }
.dm-bank__row:last-child { margin-bottom: 0; }

.dm-bank__label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(250, 247, 242, 0.5);
    margin-bottom: 4px;
    font-weight: 500;
}

.dm-bank__value {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--cream);
    font-weight: 400;
}

.dm-bank__value--mono {
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 14px;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* 1.5% list */
.dm-tax-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.dm-tax-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: baseline;
}

.dm-tax-list li:first-child { border-top: 1px solid var(--line); }
.dm-tax-list li:last-child { border-bottom: 1px solid var(--line); }

.dm-tax-list__name {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 17px;
    color: var(--ink);
}

.dm-tax-list__krs {
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 11px;
    color: var(--ink-muted);
    letter-spacing: 0.04em;
    align-self: end;
    grid-column: 1;
}

.dm-tax-list__copy {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
}

.dm-copy-btn {
    border: 1px solid var(--ink-faint) !important;
    background: transparent !important;
    color: var(--ink-muted) !important;
    padding: 6px 12px !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    cursor: pointer;
    height: auto !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    transition: all 0.25s !important;
}

.dm-copy-btn:hover {
    border-color: var(--red) !important;
    color: var(--red) !important;
    background: transparent !important;
}

.dm-help__more {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--ink-muted);
    margin-top: 14px;
    display: inline-block;
    border-bottom: 1px solid var(--ink-faint);
    padding-bottom: 2px;
}

.dm-help__more:hover {
    color: var(--red);
    border-bottom-color: var(--red);
}

@media (max-width: 900px) {
    .dm-help { grid-template-columns: 1fr; gap: 56px; }
    .dm-bank { padding: 24px 22px 22px; }
}

/* ----- KONTAKT — minimal editorial ----- */

#kontakt {
    background: var(--ink) !important;
    color: var(--cream);
}

#kontakt::before {
    background: var(--red) !important;
    width: 40px !important;
}

#kontakt h2,
#kontakt .dm-eyebrow,
#kontakt .dm-section-meta {
    color: var(--cream);
}

#kontakt .dm-section-meta__num { color: var(--red-soft); }
#kontakt .dm-section-meta { color: rgba(250, 247, 242, 0.6); }
#kontakt .dm-section-meta__divider { background: rgba(250, 247, 242, 0.3); }

.dm-mail {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    color: var(--cream);
    text-decoration: none;
    display: inline-block;
    margin: 24px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, color 0.3s;
    white-space: nowrap;
    max-width: 100%;
    overflow-wrap: normal;
    font-variation-settings: "SOFT" 100;
}

.dm-mail:hover {
    color: var(--red-soft);
    border-bottom-color: var(--red-soft);
}

.dm-contact-meta {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(250, 247, 242, 0.6);
    margin-top: 28px;
    line-height: 1.8;
}

.dm-contact-meta strong {
    color: var(--cream);
    font-weight: 500;
}

.dm-contact-meta a {
    color: var(--red-soft);
}

.dm-contact-link {
    display: inline-block;
    margin-top: 32px;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 16px;
    color: var(--cream);
    border-bottom: 1px solid var(--cream);
    padding-bottom: 2px;
}

.dm-contact-link:hover {
    color: var(--red-soft);
    border-bottom-color: var(--red-soft);
}

/* ----- FOOTER ----- */

footer.wrapper {
    padding: 56px 24px 48px !important;
    background: var(--cream) !important;
    color: var(--ink-muted);
    text-align: center;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid var(--line);
}

footer.wrapper p { font-size: 12px; letter-spacing: 0.1em; line-height: 1.8; margin: 0; }
footer.wrapper a { color: var(--ink-muted); border-bottom: 1px dotted var(--ink-muted); }
footer.wrapper a:hover { color: var(--red); border-bottom-color: var(--red); }

.dm-footer-attribution {
    margin-top: 16px !important;
    font-size: 10px !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ----- IntersectionObserver reveal ----- */

.dm-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.dm-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .dm-reveal { opacity: 1; transform: none; }
}

/* ----- Toast ----- */

.dm-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: var(--ink);
    color: var(--cream);
    padding: 14px 30px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.dm-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ----- Modals — editorial card ----- */

.dm-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(26, 22, 18, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.dm-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

.dm-modal__panel {
    background: var(--cream);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: clamp(2.5rem, 5vw, 4rem);
    position: relative;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.35s ease-out, opacity 0.35s ease-out;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.dm-modal.is-open .dm-modal__panel {
    transform: translateY(0);
    opacity: 1;
}

.dm-modal__close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: none;
    border: none !important;
    color: var(--ink-muted) !important;
    font-family: 'Fraunces', serif !important;
    font-size: 2rem !important;
    line-height: 1 !important;
    padding: 8px 12px !important;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    height: auto !important;
    font-weight: 300 !important;
}

.dm-modal__close:hover {
    color: var(--red) !important;
    background: none !important;
}

.dm-modal h2 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-style: italic;
    font-weight: 300;
}

.dm-modal__lead {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-muted);
    margin: 0 0 32px;
    font-weight: 300;
}

.dm-modal h3 {
    margin: 32px 0 12px;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--ink);
}

.dm-modal h3::before {
    content: "—";
    color: var(--red);
    margin-right: 10px;
}

.dm-modal p {
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 16px;
    color: var(--ink-2);
}

.dm-modal ul, .dm-modal ol {
    font-size: 16px;
    line-height: 1.7;
    padding-left: 20px;
    color: var(--ink-2);
    margin: 0 0 16px;
}

.dm-modal ul li { margin-bottom: 6px; }

.dm-modal blockquote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.3rem;
    line-height: 1.45;
    color: var(--ink);
    border-left: 2px solid var(--red);
    padding: 4px 0 4px 24px;
    margin: 0 0 28px;
}

html.dm-modal-locked, body.dm-modal-locked {
    overflow: hidden;
}

/* ----- Story nav override (if used) ----- */

#nav, #navPanel {
    background-color: var(--ink) !important;
}

#nav a, #navPanel a {
    color: var(--cream) !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: 0.12em !important;
}

#nav a:hover, #navPanel a:hover {
    color: var(--red-soft) !important;
}

/* ===== RESPONSIVE — MOBILE OVERRIDES ===== */

/* ===== Mobile typography scale: +20% across the board ===== */
/* All rem-based sizes scale via the root font-size change. Viewport-based
   (vw/vh) sizes and explicit px sizes are unaffected. */
@media (max-width: 900px) {
    html { font-size: 19.2px; }
}

/* Tablet/large phone: allow sections to grow naturally instead of forcing 100vh */
@media (max-width: 900px) {
    #wrapper > section {
        height: auto;
        min-height: auto;
        max-height: none;
        padding: max(72px, 7vh) clamp(16px, 4vw, 32px) max(40px, 5vh);
        overflow: visible;
        align-items: flex-start;
    }

    #wrapper > section > .inner,
    #wrapper > section > .content {
        overflow: visible;
        max-height: none;
        width: 100%;
    }

    /* HERO and INTENCJE keep their dramatic full-viewport feel.
       Specificity matters: #wrapper > section beats #hero alone, so we need to
       match the wrapper selector or use !important. */
    /* Only HERO needs forced full-viewport on mobile.
       Intencje grows naturally — the card already provides its own visual
       presence, no need to surround it with empty cream-2. */
    #wrapper > #hero {
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        align-items: center;
    }

    /* CRITICAL: Story's main.css forces .banner.style1 .content to min-height: 50vh
       in portrait orientation — overriding so the hero content fills the whole section. */
    #wrapper > #hero,
    #wrapper > .banner.style1.fullscreen {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
    }
    #wrapper > #hero > .content,
    #wrapper > .banner.style1.fullscreen > .content {
        min-height: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: clamp(16px, 2.5vh, 36px) clamp(16px, 4vw, 32px) !important;
    }

    /* Section meta — let it wrap if too long */
    .dm-section-meta {
        flex-wrap: wrap;
        gap: 10px 12px;
        font-size: 10px;
        letter-spacing: 0.18em;
        margin-bottom: clamp(16px, 3vh, 28px);
    }
    .dm-section-meta__divider { width: 14px; }
    .dm-section-meta__num { font-size: 18px; }

    /* Trzy sposoby cards tighter on mobile — but breathe at the bottom of the block */
    #wrapper > #sposoby { padding-bottom: clamp(64px, 10vh, 112px); }
    .dm-ways__item {
        padding: 28px 22px 32px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .dm-ways__item:last-child {
        border-bottom: none;
        padding-bottom: 48px;
    }
    .dm-ways__num { font-size: 3rem; margin-bottom: 14px; }
    .dm-ways__title { font-size: 1.2rem; }
    .dm-ways__desc { margin-bottom: 16px; }

    /* Help cards compact */
    .dm-help-card {
        min-height: auto;
        padding: 22px 20px 20px;
    }
    .dm-help-card__num { font-size: 1.9rem; }
    .dm-help-card__lead { font-size: 1rem; }
    .dm-help-card__desc { font-size: 12.5px; margin-bottom: 18px; }

    /* Idea body drop-cap smaller */
    .dm-idea__body p:first-child::first-letter { font-size: 3rem; }

    /* Hero logo — bigger on mobile per user request */
    #hero .dm-hero-logo { width: min(var(--dm-logo-hero, 220px), 58vw, 28vh); }

    /* Hero h1 — bigger on mobile */
    #hero h1 {
        font-size: min(clamp(2.3rem, 8.5vw, 3.6rem), 9vh);
        line-height: 1.12;
    }

    /* Hero quote — bump readability on mobile, allow wrap if needed */
    #hero .dm-hero-quote {
        font-size: clamp(0.95rem, 3.4vw, 1.3rem);
        white-space: normal;
        line-height: 1.35;
        max-width: 92vw;
        padding: 0 12px;
    }

    /* Hero subtitle bigger too */
    #hero .subtitle { font-size: clamp(0.95rem, 2.6vw, 1.1rem); }

    /* Bank block tighter */
    .dm-bank { padding: 18px 18px 16px; }
    .dm-bank__value { font-size: 12px; }
    .dm-bank__value--mono { font-size: 13px; }
}

/* Phone portrait — small (≤640px) */
@media (max-width: 640px) {
    #hero .dm-hero-rule { margin: 24px auto; }
    #hero h1 { line-height: 1.1; }
    #hero .subtitle { font-size: 12px; }
    .dm-section-meta { margin-bottom: 16px; }
    .dm-help { gap: 12px; }
    .dm-help-card__title { font-size: 10px; }

    /* Pomóż section meta with date too tight — let it stack */
    #intencje .dm-section-meta { flex-direction: column; gap: 6px; }
    #intencje .dm-section-meta__divider { display: none; }

    /* Intencje quote card — tighter padding on phone, smaller decorative " */
    .dm-quote-display {
        padding: 56px 22px 72px;
        margin: 32px auto;
        font-size: 1.05rem;
        line-height: 1.45;
    }
    .dm-quote-display::before { font-size: 4rem; top: 6px; }
    .dm-quote-display::after { top: 52px; width: 36px; }
    .dm-quote-source {
        margin-top: 24px;
        padding-top: 14px;
        font-size: 10px;
        letter-spacing: 0.22em;
    }

    /* Tax list breakpoint */
    .dm-tax-list li { padding: 12px 0; }
    .dm-tax-list__name { font-size: 15px; }

    /* Modals tighter */
    .dm-modal__panel { padding: 2rem 1.5rem; }
}

/* Small phone (≤420px) — make sure everything fits */
@media (max-width: 420px) {
    .dm-nav { padding: 14px 16px; }
    .dm-nav.is-scrolled { padding: 10px 16px; }
    .dm-nav__brand-logo { height: calc(var(--dm-logo-nav, 36px) * 0.78); }
    .dm-nav.is-scrolled .dm-nav__brand-logo { height: calc(var(--dm-logo-nav, 36px) * 0.72); }
    .dm-nav__brand-name { font-size: 14px; }

    #hero .dm-hero-logo { width: min(var(--dm-logo-hero, 180px), 52vw, 26vh); }
    #hero h1 { font-size: clamp(1.95rem, 8vw, 2.6rem); line-height: 1.12; }
    #hero .dm-hero-quote { font-size: clamp(0.9rem, 3.6vw, 1.1rem); }

    .dm-mail {
        font-size: 1rem !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .dm-quote-display {
        padding: 48px 16px 64px;
        margin: 24px auto;
        font-size: 1rem;
        line-height: 1.45;
    }
    .dm-quote-display::before { font-size: 3.4rem; top: 4px; }
    .dm-quote-display::after { top: 44px; width: 28px; }

    .dm-meetings__date { font-size: 1.35rem; line-height: 1.3; }
    .dm-meetings li { padding: 20px 0; }

    .dm-help-card { padding: 18px 16px 18px; }
    .dm-help-card__title { font-size: 9.5px; letter-spacing: 0.18em; }
}

/* =====================================================================
   PHOTOS, ORNAMENTS, ANIMATIONS
   ===================================================================== */

/* ---- Brushy edge mask — applied to every uploaded photo ---- */
/* The SVG mask has feathered/displaced edges so photos look painterly,
   not cropped to hard rectangles. */
.dm-photo {
    -webkit-mask-image: url('/story/assets/svg/brush-frame.svg');
            mask-image: url('/story/assets/svg/brush-frame.svg');
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    overflow: hidden;
    margin: 0;
}
.dm-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dm-photo--small {
    -webkit-mask-image: none;
            mask-image: none;
}

/* ---- Hero background ---- */

.dm-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.dm-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: center center;
}
/* Photo bg: Ken Burns slow zoom, plus cream wash on top */
.dm-hero-bg--photo img {
    animation: dmKenBurns 22s ease-in-out infinite alternate;
}
.dm-hero-bg--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cream);
    opacity: 0.92;
    mix-blend-mode: lighten;
    pointer-events: none;
}
/* SVG bg already has cream baseline — no overlay needed */
.dm-hero-bg--svg img { opacity: 0.85; }

/* Hero content sits above the bg */
.dm-hero-content {
    position: relative;
    z-index: 2;
}

@keyframes dmKenBurns {
    from { transform: scale(1.02) translate(0, 0); }
    to   { transform: scale(1.14) translate(-2%, -1.5%); }
}

/* ---- IDEA with photo: 2-col grid with image right ---- */

/* With photo: top row = quote left + photo right.
   Bottom row = body full width below both. */
.dm-idea--with-photo {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "quote photo"
        "body  body";
    gap: clamp(28px, 4vw, 48px) clamp(32px, 5vw, 64px);
    align-items: start;
}
.dm-idea--with-photo .dm-idea__quote { grid-area: quote; }
.dm-idea--with-photo .dm-idea__body  {
    grid-area: body;
    max-width: 920px;
    margin: 0 auto;
}
.dm-idea__photo {
    grid-area: photo;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: clamp(320px, 50vh, 520px);
}
.dm-idea__photo img {
    transition: transform 1.2s ease;
}
.dm-idea__photo:hover img { transform: scale(1.03); }

/* Idea SVG ornament (no photo) — subtle accent in section corner */
.dm-idea__ornament {
    position: absolute;
    right: clamp(24px, 5vw, 80px);
    top: 50%;
    transform: translateY(-30%);
    width: clamp(160px, 16vw, 260px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}
.dm-idea__ornament img { width: 100%; height: auto; display: block; }
#idea .inner { position: relative; z-index: 1; }

/* ---- SPOTKANIA photo strip / ornament ---- */

.dm-meetings__photo {
    margin: clamp(28px, 5vh, 56px) auto clamp(20px, 3vh, 32px);
    max-width: 760px;
    aspect-ratio: 21 / 9;
    width: 100%;
}
.dm-meetings__ornament {
    margin: clamp(24px, 4vh, 40px) auto clamp(20px, 3vh, 32px);
    max-width: 360px;
    opacity: 0.7;
}
.dm-meetings__ornament img { width: 100%; height: auto; display: block; }

/* ---- FOOTER decoration ---- */

.dm-footer-decoration {
    margin: 0 auto 24px;
    max-width: 220px;
}
.dm-footer-decoration img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.85;
}

/* ---- ANNOUNCEMENT section (optional, under Intencje) ---- */
/* Higher specificity (#wrapper > #id) overrides the global section
   min-height: 100vh so the announcement only takes the height of its
   card + section padding. */

#wrapper > #ogloszenie {
    background-color: var(--cream);
    min-height: 0;
    height: auto;
    padding-top: clamp(48px, 7vh, 80px);
    padding-bottom: clamp(48px, 7vh, 80px);
}

.dm-announce {
    max-width: 1080px;
    margin: 0 auto;
    border: 1px solid var(--red-soft);
    background: var(--cream);
    padding: clamp(28px, 4vh, 48px) clamp(24px, 4vw, 56px);
    position: relative;
    box-shadow: 0 18px 48px -28px rgba(140, 37, 32, 0.22);
}

.dm-announce::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 64px;
    height: 4px;
    background: var(--red);
}

.dm-announce--with-image {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

.dm-announce__body { min-width: 0; }

.dm-announce__eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 16px;
}

.dm-announce__title {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
    font-variation-settings: "SOFT" 100, "opsz" 96;
}

.dm-announce__text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    line-height: 1.6;
    color: var(--ink-2, var(--ink));
    margin-bottom: 20px;
}

.dm-announce__cta {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cream);
    background: var(--red);
    padding: 12px 22px;
    text-decoration: none;
    border: 1px solid var(--red);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.dm-announce__cta:hover {
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-1px);
}

.dm-announce__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 360px;
    margin: 0;
}

@media (max-width: 900px) {
    .dm-announce--with-image {
        grid-template-columns: 1fr;
    }
    .dm-announce__photo {
        order: -1;
        aspect-ratio: 16 / 10;
        max-height: 280px;
    }
}

/* ---- PARTNERS strip (above footer) ---- */
/* Higher specificity (#wrapper > class) to override the global section
   min-height: 100vh rule. The strip is short and shouldn't force a full
   viewport. */

#wrapper > .dm-partners-section {
    background-color: var(--cream-2);
    padding-top: clamp(56px, 8vh, 96px);
    padding-bottom: clamp(56px, 8vh, 96px);
    min-height: 0;
    height: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dm-partners__lead {
    text-align: center;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin: 0 auto clamp(28px, 4vh, 40px);
    max-width: 760px;
    position: relative;
    padding-bottom: clamp(16px, 2.4vh, 24px);
    font-variation-settings: "SOFT" 100, "opsz" 96;
}
.dm-partners__lead::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 2px;
    background: var(--red);
    border-radius: 1px;
}
@media (max-width: 640px) {
    .dm-partners__lead { font-size: clamp(1.25rem, 5vw, 1.6rem); }
}

.dm-partners {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 4vw, 56px);
    justify-content: center;
    align-items: center;
}

.dm-partners__item { margin: 0; padding: 0; }

.dm-partners__item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ink-muted);
    transition: opacity 0.25s, transform 0.25s;
    opacity: 0.95;
}
.dm-partners__item a:hover {
    opacity: 1;
    transform: translateY(-3px);
}
.dm-partners__item img {
    display: block;
    width: auto;
    object-fit: contain;
    filter: grayscale(0);
    transition: filter 0.25s, transform 0.25s;
}
.dm-partners__item a:hover img { transform: scale(1.04); }

.dm-partners__text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 18px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
}

@media (max-width: 640px) {
    .dm-partners { gap: 28px 32px; }
    .dm-partners__item img { max-height: 88px !important; height: auto !important; }
}
@media (max-width: 420px) {
    .dm-partners { gap: 24px; flex-direction: column; }
    .dm-partners__item img { max-height: 96px !important; }
}

/* ---- Hover polish: cards lift on hover ---- */

.dm-help-card,
.dm-ways__item {
    transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
                box-shadow 0.32s ease,
                border-color 0.32s ease;
}
.dm-help-card:hover,
.dm-ways__item:hover {
    transform: translateY(-4px);
}
.dm-help-card:hover {
    box-shadow: 0 24px 48px -22px rgba(26, 22, 18, 0.22);
}

/* ---- Hero entrance: staggered fade-in of children ---- */

.dm-hero-content > .dm-hero-logo,
.dm-hero-content > .dm-hero-quote,
.dm-hero-content > h1,
.dm-hero-content > .dm-hero-rule,
.dm-hero-content > .subtitle {
    opacity: 0;
    transform: translateY(8px);
}
.dm-hero-content.is-revealed > .dm-hero-logo,
.dm-hero-content.is-revealed > .dm-hero-quote,
.dm-hero-content.is-revealed > h1,
.dm-hero-content.is-revealed > .dm-hero-rule,
.dm-hero-content.is-revealed > .subtitle {
    animation: dmHeroIn 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.dm-hero-content.is-revealed > .dm-hero-logo  { animation-delay: 0.05s; }
.dm-hero-content.is-revealed > .dm-hero-quote { animation-delay: 0.25s; }
.dm-hero-content.is-revealed > h1             { animation-delay: 0.42s; }
.dm-hero-content.is-revealed > .dm-hero-rule  { animation-delay: 0.65s; }
.dm-hero-content.is-revealed > .subtitle      { animation-delay: 0.78s; }

@keyframes dmHeroIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Counter (number that animates from 0 to target) ---- */

.dm-counter {
    display: inline-block;
    min-width: 1.5ch;
    font-variant-numeric: tabular-nums;
}

/* Reduce motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
    .dm-hero-bg--photo img { animation: none; }
    .dm-hero-content.is-revealed > * {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .dm-help-card:hover,
    .dm-ways__item:hover { transform: none; }
}

/* Mobile tweaks for photos */
@media (max-width: 900px) {
    .dm-idea--with-photo {
        grid-template-columns: 1fr;
        grid-template-areas: "quote" "photo" "body";
    }
    .dm-idea__photo {
        aspect-ratio: 16 / 10;
        max-height: 56vw;
    }
    .dm-idea__ornament {
        position: static;
        margin: 24px auto -8px;
        transform: none;
        width: 50%;
        max-width: 200px;
        opacity: 0.25;
    }
    .dm-meetings__photo { aspect-ratio: 16 / 10; max-width: 100%; }
}

/* ==========================================================================
   MEETING — structured label + date + location + CTA buttons
   ========================================================================== */
.dm-meetings__label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 12px;
}
.dm-meetings__location {
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.4;
}
.dm-meetings__date--soon {
    color: var(--ink-muted);
    font-weight: 400;
}

/* CTA strip below the term */
.dm-meetings__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: clamp(16px, 2.4vh, 28px) auto clamp(24px, 3vh, 36px);
}
.dm-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    cursor: pointer;
    line-height: 1;
}
.dm-cal-btn:hover {
    background: var(--cream);
    border-color: var(--ink-faint);
    transform: translateY(-1px);
}
.dm-cal-btn--google {
    border-color: rgba(199, 32, 30, 0.25);
}
.dm-cal-btn--google:hover {
    color: var(--red);
    border-color: var(--red);
}
.dm-cal-btn--apple {
    border-color: rgba(26, 22, 18, 0.25);
}
.dm-cal-btn--apple:hover {
    color: var(--ink);
    border-color: var(--ink);
}
.dm-cal-btn svg { flex: none; opacity: 0.85; }
.dm-cal-btn:hover svg { opacity: 1; }

@media (max-width: 480px) {
    .dm-meetings__cta { gap: 10px; }
    .dm-cal-btn { padding: 10px 18px; font-size: 12.5px; }
}

/* ==========================================================================
   PRELOADER
   Full-screen cream backdrop, logo center, three expanding red rings
   (Divine Mercy rays inspired). Fades out when body.dm-loaded is set.
   ========================================================================== */
#dm-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center,
            #fbf6ec 0%,
            var(--cream) 50%,
            var(--cream-2) 100%);
    transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

body.dm-loaded #dm-preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dm-preloader__wrap {
    position: relative;
    width: clamp(120px, 18vw, 200px);
    height: clamp(120px, 18vw, 200px);
    display: grid;
    place-items: center;
}

.dm-preloader__logo {
    position: relative;
    z-index: 2;
    width: clamp(64px, 9vw, 96px);
    height: auto;
    display: block;
    animation: dmLogoPulse 2.2s ease-in-out infinite;
    filter: drop-shadow(0 4px 16px rgba(199, 32, 30, 0.18));
}

.dm-preloader__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--red);
    opacity: 0;
    transform: scale(0.4);
    animation: dmRingExpand 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
}
.dm-preloader__ring--1 { animation-delay: 0s; }
.dm-preloader__ring--2 { animation-delay: 0.6s; }
.dm-preloader__ring--3 { animation-delay: 1.2s; border-color: var(--red-soft, #d4a89c); }

@keyframes dmRingExpand {
    0%   { transform: scale(0.40); opacity: 0; border-width: 1.5px; }
    18%  { opacity: 0.55; }
    100% { transform: scale(1.7); opacity: 0; border-width: 0.5px; }
}

@keyframes dmLogoPulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50%      { transform: scale(1.05); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .dm-preloader__ring { animation: none; opacity: 0; }
    .dm-preloader__logo { animation: none; }
    #dm-preloader { transition: opacity 0.2s; }
}

/* ==========================================================================
   MEETING SIGN-UP FORM (#zapisy)
   ========================================================================== */
.dm-signup {
    margin: clamp(28px, 4vh, 44px) auto clamp(24px, 3vh, 36px);
    max-width: 520px;
    padding: clamp(24px, 4vw, 40px);
    background: #fff;
    border: 1px solid var(--line);
    text-align: left;
    scroll-margin-top: 96px;
}
.dm-signup .dm-meetings__label { text-align: center; }
.dm-signup__title {
    text-align: center;
    margin: 0 0 24px;
}
.dm-signup__form { margin: 0; }
.dm-signup__field { margin-bottom: 18px; }
.dm-signup__field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink-2);
}
.dm-signup__field label span { color: var(--red); }
.dm-signup__field input,
.dm-signup__field select {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ink);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, background 0.2s;
}
.dm-signup__field select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A7E6F' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.dm-signup__field input:focus,
.dm-signup__field select:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--ink-2);
}
.dm-signup__field.has-error input,
.dm-signup__field.has-error select { border-color: var(--red); }
.dm-signup__error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--red);
}
.dm-signup__hp {
    position: absolute !important;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.dm-signup__hint {
    margin: 4px 0 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-muted);
}
.dm-signup__submit {
    width: 100%;
    justify-content: center;
    padding: 15px 22px;
    font-size: 14px;
    color: #fff !important;
    background: var(--red);
    border-color: var(--red);
    box-shadow: none;
    height: auto;
}
.dm-signup__submit:hover {
    background: var(--ink);
    border-color: var(--ink);
}
.dm-signup__notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-left: 3px solid;
}
.dm-signup__notice--ok { background: #EEF3EA; border-color: #5B7F4A; color: #2F4526; }
.dm-signup__notice--err { background: #F8E9E7; border-color: var(--red); color: var(--red-deep); }
.dm-announce__meta {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-muted);
}

/* Sign-up inside modal + "Zapisz się" button next to calendar buttons */
.dm-modal__panel.dm-signup {
    max-width: 560px;
    margin: 0;
    border: 0;
    background: var(--cream);
    text-align: left;
}
.dm-modal__panel.dm-signup .dm-signup__title { text-align: left; margin-bottom: 8px; }
.dm-modal__panel.dm-signup .dm-modal__lead { margin-bottom: 24px; }
.dm-modal__panel.dm-signup .dm-signup__field input,
.dm-modal__panel.dm-signup .dm-signup__field select { background-color: #fff; }
.dm-cal-btn--signup {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}
.dm-cal-btn--signup:hover {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}
/* Global Story button overrides use !important — match them for the submit */
button.dm-signup__submit {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: center;
    background-color: var(--red) !important;
    color: var(--cream) !important;
    border: 1px solid var(--red) !important;
    border-radius: 999px !important;
    letter-spacing: 0.08em !important;
}
button.dm-signup__submit:hover {
    background-color: var(--ink) !important;
    border-color: var(--ink) !important;
    color: var(--cream) !important;
}
.dm-modal p.dm-signup__hint { font-size: 13px; line-height: 1.5; margin: 4px 0 20px; color: var(--ink-muted); }
.dm-modal p.dm-signup__notice { font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* ==========================================================================
   PODOPIECZNI 1,5% — full list section (#podopieczni)
   ========================================================================== */
.dm-beneficiaries__lead {
    max-width: 600px;
    margin: 16px auto 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.7;
}
.dm-beneficiaries {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
    max-width: 1100px;
    margin: clamp(28px, 4vh, 48px) auto 0;
    padding: 0;
    text-align: left;
}
.dm-beneficiary {
    position: relative;
    margin: 0;
    padding: 22px 22px 16px;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.dm-beneficiary:hover {
    border-color: var(--ink-faint);
    box-shadow: 0 14px 32px rgba(140, 37, 32, 0.06);
}
.dm-beneficiary__num {
    position: absolute;
    top: 20px;
    right: 22px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
}
.dm-beneficiary__name {
    margin: 0 36px 14px 0;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.25;
}
.dm-beneficiary__data { margin: 0; }
.dm-beneficiary__row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}
.dm-beneficiary__row dt {
    margin: 0;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.dm-beneficiary__row dd { margin: 0; }
.dm-beneficiary__value {
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.dm-beneficiary__value--mono {
    font-family: ui-monospace, "SF Mono", Monaco, monospace;
    font-size: 13px;
    letter-spacing: 0.03em;
}
@media (max-width: 980px) {
    .dm-beneficiaries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .dm-beneficiaries { grid-template-columns: 1fr; }
    .dm-beneficiary { padding: 18px 16px 12px; }
}

/* ==========================================================================
   NAV — room for a dynamic number of links (menu built from page blocks)
   ========================================================================== */
@media (min-width: 901px) {
    .dm-nav { gap: 20px; }
    .dm-nav__brand, .dm-nav__cta { flex-shrink: 0; white-space: nowrap; }
    .dm-nav__list { gap: clamp(14px, 1.7vw, 32px); }
    .dm-nav__link { white-space: nowrap; letter-spacing: 0.12em; }
}
@media (min-width: 901px) and (max-width: 1320px) {
    .dm-nav__brand-sub { display: none; }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .dm-nav__link__num { display: none; }
    .dm-nav__link { letter-spacing: 0.08em; font-size: 11.5px; }
}
@media (min-width: 901px) and (max-width: 1020px) {
    .dm-nav__cta { display: none; }
}

/* Sign-up form: placeholders instead of visible labels — compact enough for one phone screen */
.dm-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.dm-signup__field { margin-bottom: 12px; }
.dm-signup__field input::placeholder { color: var(--ink-muted) !important; opacity: 1; }
/* Select shows its empty "Rejon DK *" option in placeholder colour */
.dm-signup__field select:invalid { color: var(--ink-muted); }
.dm-signup__field select option { color: var(--ink); }
.dm-modal p.dm-signup__hint { margin: 2px 0 14px; }

@media (max-width: 600px) {
    #modal-zapisy { padding: 12px; }
    #modal-zapisy .dm-modal__panel {
        padding: 22px 18px 20px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
    #modal-zapisy .dm-signup__title { font-size: 1.45rem; margin: 0 40px 4px 0; }
    #modal-zapisy .dm-modal__lead { font-size: 14px; line-height: 1.45; margin-bottom: 16px; }
    #modal-zapisy .dm-signup__field { margin-bottom: 10px; }
    #modal-zapisy .dm-signup__field input,
    #modal-zapisy .dm-signup__field select { height: 44px; font-size: 16px; } /* 16px: iOS nie przybliża */
    #modal-zapisy .dm-signup__submit { padding: 13px 20px !important; }
    #modal-zapisy .dm-modal__close { top: 10px; right: 10px; }
}

/* Pomóż nam — number of cards depends on switches in admin */
@media (min-width: 901px) {
    .dm-help--cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
    .dm-help--cols-1 { grid-template-columns: 1fr; max-width: 420px; }
}
.dm-signup__notice--info { background: #FBF3E2; border-color: var(--gold); color: #5E4A22; }
.dm-signup__form[hidden] { display: none; }

/* ==========================================================================
   Treści bloków z edytora WYSIWYG (typ „richtext”) — akapity bez zbędnych marginesów
   ========================================================================== */
.dm-rich > p:first-child { margin-top: 0; }
.dm-rich > p:last-child { margin-bottom: 0; }
.dm-rich ul, .dm-rich ol { margin: 0 0 1em; padding-left: 1.3em; text-align: left; }
.dm-rich li { margin-bottom: 4px; }
.dm-rich a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.dm-rich a:hover { color: var(--ink); }
.dm-help-card__desc.dm-rich p, .dm-ways__desc.dm-rich p { font-size: inherit; line-height: inherit; color: inherit; }

/* Formatowanie z edytora wewnątrz treści bloków */
.dm-rich h2, .dm-rich h3, .dm-rich h4 { margin: 0.6em 0 0.4em; }
.dm-rich h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.dm-rich h3 { font-size: clamp(1.1rem, 1.7vw, 1.35rem); }
.dm-rich h4 { font-size: 1.05rem; }
.dm-rich h2:first-child, .dm-rich h3:first-child, .dm-rich h4:first-child { margin-top: 0; }
.dm-rich blockquote {
    margin: 0.8em 0;
    padding-left: 16px;
    border-left: 2px solid var(--red);
    font-family: 'Fraunces', serif;
    font-style: italic;
}
.dm-rich img { max-width: 100%; height: auto; display: block; margin: 12px auto; }
.dm-rich strong { font-weight: 600; }
.dm-rich u { text-underline-offset: 2px; }

/* ==========================================================================
   Zdjęcia sekcji — sterowane z panelu (przycinanie, ramka, szerokość)
   ========================================================================== */
.dm-photo--noframe {
    -webkit-mask-image: none;
            mask-image: none;
}
/* Całe zdjęcie w jego proporcjach — bez stałego kadru */
.dm-photo--natural {
    aspect-ratio: auto !important;
    max-height: none !important;
    height: auto !important;
}
.dm-photo--natural img {
    height: auto !important;
    object-fit: contain !important;
}
figure.dm-photo { margin-left: auto; margin-right: auto; }

/* Treści zapisane starszą wersją edytora (Quill zapisywał klasy zamiast stylów) */
.dm-rich .ql-size-small { font-size: 0.8em; }
.dm-rich .ql-size-large { font-size: 1.4em; }
.dm-rich .ql-size-huge { font-size: 2em; }
.dm-rich .ql-align-center { text-align: center; }
.dm-rich .ql-align-right { text-align: right; }
.dm-rich .ql-align-justify { text-align: justify; }
.dm-rich .ql-indent-1 { padding-left: 2em; }
.dm-rich .ql-indent-2 { padding-left: 4em; }
.dm-rich .ql-indent-3 { padding-left: 6em; }

/* Skala tekstu bloku sterowana z panelu (--dm-text-scale), z zachowaniem skalowania do szerokości ekranu */
.dm-announce__text {
    font-size: calc(clamp(0.95rem, 1.3vw, 1.05rem) * var(--dm-text-scale, 1));
}
.dm-meetings__lead {
    font-size: calc(17px * var(--dm-text-scale, 1));
}
