/**
 * pm-projektmanagement.css - page-scoped styles for Projektmanagement
 * Prefix: pm- (new sections) + minimal silo component mirrors (lp-*)
 */

/* ----- Utilities ----- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----- Hero scoped tweaks ----- */
.hero--pm .hero-content {
    max-width: 44rem;
}

/* ----- Page sections ----- */
.pm-section {
    padding: clamp(2.5rem, 6vh, 4.5rem) clamp(1.25rem, 5vw, 4rem);
    max-width: 80rem;
    margin: 0 auto;
}

.pm-section-header,
.lp-section-header {
    max-width: 44rem;
    margin: 0 auto clamp(1.75rem, 3.5vh, 2.5rem);
    text-align: center;
}

.pm-section-intro {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

/* ----- Signature A: Triangle ----- */
.pm-triangle-section {
    background: linear-gradient(180deg, transparent 0%, rgba(19, 4, 234, 0.03) 50%, transparent 100%);
}

.pm-triangle-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: center;
    max-width: 56rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 12px 40px rgba(19, 4, 234, 0.08);
}

@media (min-width: 768px) {
    .pm-triangle-stage {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.pm-triangle-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.pm-triangle-svg {
    width: 100%;
    height: auto;
    display: block;
    touch-action: none;
    user-select: none;
}

.pm-triangle-shape {
    transition: points 0.35s ease;
}

.pm-triangle-core-label,
.pm-triangle-core-value {
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    fill: var(--neon-blue);
    pointer-events: none;
}

.pm-triangle-core-value {
    font-size: 9px;
    font-weight: 600;
    fill: var(--neon-purple);
}

.pm-handle-label {
    font-family: Inter, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    fill: var(--neon-blue);
    pointer-events: none;
}

.pm-handle-ring {
    fill: rgba(19, 4, 234, 0.08);
    stroke: rgba(19, 4, 234, 0.25);
    stroke-width: 1.5;
    transition: stroke 0.2s, fill 0.2s;
}

.pm-handle-dot {
    fill: url(#pm-tri-stroke);
    cursor: grab;
    transition: r 0.2s;
}

.pm-triangle-handle:focus-visible .pm-handle-ring,
.pm-triangle-handle.is-active .pm-handle-ring {
    stroke: var(--neon-purple);
    fill: rgba(129, 55, 255, 0.12);
}

.pm-triangle-handle.is-dragging .pm-handle-dot {
    cursor: grabbing;
}

.pm-edge-readout {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    fill: var(--text-muted);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

.pm-triangle-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pm-triangle-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pm-preset-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--neon-blue);
    background: rgba(19, 4, 234, 0.06);
    border: 1px solid rgba(19, 4, 234, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.pm-preset-btn:hover,
.pm-preset-btn:focus-visible,
.pm-preset-btn.is-active {
    background: linear-gradient(135deg, rgba(19, 4, 234, 0.12), rgba(129, 55, 255, 0.1));
    border-color: rgba(129, 55, 255, 0.35);
    outline: none;
}

.pm-triangle-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem;
    background: rgba(19, 4, 234, 0.04);
    border-radius: 0.85rem;
    border: 1px solid rgba(19, 4, 234, 0.1);
}

.pm-kb-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pm-kb-label {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pm-kb-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--neon-blue);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pm-kb-btn:hover,
.pm-kb-btn:focus-visible {
    border-color: var(--neon-purple);
    outline: none;
}

.pm-triangle-takeaway {
    font-size: clamp(0.88rem, 2vw, 0.95rem);
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--neon-purple);
    background: rgba(129, 55, 255, 0.05);
    border-radius: 0 0.65rem 0.65rem 0;
}

@media (pointer: fine) and (min-width: 768px) {
    .pm-triangle-keyboard {
        display: none;
    }
}

@media (pointer: coarse), (max-width: 767px) {
    .pm-triangle-handle {
        pointer-events: none;
    }
    .pm-handle-dot {
        cursor: default;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pm-triangle-handle {
        pointer-events: none;
    }
    .pm-triangle-shape {
        transition: none;
    }
}

/* ----- Alarm cards ----- */
.pm-alarm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 1.35rem);
}

@media (min-width: 640px) {
    .pm-alarm-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pm-alarm-card {
    --pm-alarm-level: 1;
    position: relative;
    padding: clamp(1.35rem, 2.5vw, 1.75rem);
    background: var(--glass-bg);
    border: 1px solid color-mix(in srgb, #e85d4c calc(var(--pm-alarm-level) * 55%), var(--glass-border));
    border-radius: 1.25rem;
    box-shadow: 0 8px 28px rgba(232, 93, 76, calc(var(--pm-alarm-level) * 0.12));
    transition:
        border-color 0.6s ease,
        box-shadow 0.6s ease,
        transform 0.4s ease;
    overflow: hidden;
}

.pm-alarm-card.is-stable {
    --pm-alarm-level: 0;
    border-color: rgba(19, 4, 234, 0.22);
    box-shadow: 0 8px 28px rgba(19, 4, 234, 0.1);
}

.pm-alarm-card.is-stable .pm-alarm-indicator {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
}

.pm-alarm-card.is-stable .pm-alarm-pulse {
    animation: none;
    opacity: 0;
}

.pm-alarm-card.is-stable .pm-alarm-icon {
    color: #fff;
}

.pm-alarm-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #e85d4c, #f0a030);
    position: relative;
    transition: background 0.6s ease;
}

.pm-alarm-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(232, 93, 76, 0.5);
    animation: pm-alarm-pulse 1.8s ease-out infinite;
}

@keyframes pm-alarm-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pm-alarm-icon {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.pm-alarm-title {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 800;
    color: var(--neon-blue);
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
}

.pm-alarm-problem {
    font-size: 0.88rem;
    line-height: 1.58;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
}

.pm-alarm-solution {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(19, 4, 234, 0.1);
}

.pm-alarm-solution strong {
    color: var(--neon-blue);
}

@media (prefers-reduced-motion: reduce) {
    .pm-alarm-card {
        --pm-alarm-level: 0;
        border-color: rgba(19, 4, 234, 0.22);
    }
    .pm-alarm-pulse { animation: none; display: none; }
    .pm-alarm-indicator {
        background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    }
}

/* ----- Kontrollturm cockpit ----- */
.pm-cockpit-section {
    background: linear-gradient(180deg, rgba(19, 4, 234, 0.02) 0%, transparent 100%);
    position: relative;
}

.pm-cockpit-section .pm-section-header {
    margin-bottom: clamp(1.5rem, 3vh, 2.25rem);
}

/* The cockpit is not pinned (pm-projektmanagement.js scrubs it with native
   scroll), so the wrapper stays transparent and keeps the section rhythm. */
.pm-cockpit-pinwrap {
    position: relative;
    width: 100%;
}

.pm-cockpit {
    max-width: 72rem;
    /* Always fits the viewport below the navbar, so the whole run is visible. */
    max-height: min(70vh, 580px);
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.35rem;
    overflow: hidden;
    box-shadow:
        0 16px 48px rgba(19, 4, 234, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.04);
}

@media (max-width: 899px) {
    .pm-cockpit {
        /* svh (stable viewport height): dvh follows the mobile address bar
           and resized the cockpit mid-scroll. */
        max-height: min(78vh, 600px);
        max-height: min(78svh, 600px);
    }
}

@media (max-width: 767px) {
    .pm-cockpit {
        max-height: min(85vh, 640px);
        max-height: min(85svh, 640px);
    }

    .pm-cockpit-kpi {
        padding: 0.7rem 0.5rem;
    }

    .pm-cockpit-kpi-value {
        font-size: clamp(1.15rem, 4.5vw, 1.4rem);
    }

    .pm-cockpit-gantt-wrap {
        --pm-cockpit-inset: 1rem;
    }

    .pm-gantt-stage {
        min-height: 8.5rem;
    }

    .pm-cockpit-side {
        grid-template-columns: 1fr;
    }

    .pm-radar-wrap {
        display: none;
    }

    .pm-burndown-wrap {
        padding: 0.85rem 0.75rem;
        border-right: none;
    }

    .pm-burndown-caption {
        margin-bottom: 0.5rem;
        font-size: 0.65rem;
    }

    .pm-burndown-svg {
        padding: 0.2rem 0.35rem 0.15rem;
    }
}

.pm-cockpit-chrome {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    background: rgba(19, 4, 234, 0.04);
    border-bottom: 1px solid rgba(19, 4, 234, 0.1);
}

.pm-cockpit-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
}

.pm-cockpit-dot--red { background: #ff5f57; }
.pm-cockpit-dot--yellow { background: #febc2e; }
.pm-cockpit-dot--green { background: #28c840; }

.pm-cockpit-title-bar {
    margin-left: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.pm-cockpit-kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-bottom: 1px solid rgba(19, 4, 234, 0.1);
}

@media (min-width: 640px) {
    .pm-cockpit-kpis {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pm-cockpit-kpi {
    padding: clamp(1rem, 2.5vw, 1.35rem) clamp(0.75rem, 2vw, 1rem);
    text-align: center;
    border-right: 1px solid rgba(19, 4, 234, 0.08);
}

.pm-cockpit-kpi:last-child {
    border-right: none;
}

.pm-cockpit-kpi-value {
    display: block;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.pm-cockpit-kpi-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pm-cockpit-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 900px) {
    .pm-cockpit-body {
        grid-template-columns: 1.4fr 0.9fr;
    }
}

.pm-cockpit-gantt-wrap {
    --pm-cockpit-inset: clamp(1.25rem, 3vw, 2rem);
    --pm-gantt-label-width: 5.5rem;
    --pm-gantt-milestone-band: clamp(4.25rem, 11vw, 5.25rem);
    --pm-gantt-ms-gap: clamp(1.1rem, 3.5vw, 1.75rem);
    position: relative;
    padding: var(--pm-cockpit-inset);
    padding-left: calc(var(--pm-cockpit-inset) + var(--pm-gantt-label-width));
    padding-bottom: calc(var(--pm-cockpit-inset) + 0.5rem);
    border-bottom: 1px solid rgba(19, 4, 234, 0.08);
}

@media (min-width: 900px) {
    .pm-cockpit-gantt-wrap {
        border-bottom: none;
        border-right: 1px solid rgba(19, 4, 234, 0.08);
    }
}

.pm-gantt-labels {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 0;
    position: absolute;
    left: var(--pm-cockpit-inset);
    top: var(--pm-cockpit-inset);
    bottom: calc(var(--pm-cockpit-inset) + var(--pm-gantt-milestone-band) + var(--pm-gantt-ms-gap));
    width: var(--pm-gantt-label-width);
    padding-right: 0.75rem;
    box-sizing: border-box;
}

.pm-gantt-labels span {
    display: flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pm-gantt-stage {
    position: relative;
    min-height: 11rem;
    padding: 0.5rem 0.75rem calc(var(--pm-gantt-milestone-band) + var(--pm-gantt-ms-gap)) 0;
}

.pm-gantt-lanes {
    position: absolute;
    inset: 0.5rem 0.75rem calc(var(--pm-gantt-milestone-band) + var(--pm-gantt-ms-gap)) 0;
    display: flex;
    flex-direction: column;
}

.pm-gantt-lane {
    flex: 1;
    border-bottom: 1px dashed rgba(19, 4, 234, 0.08);
}

.pm-gantt-lane:last-child {
    border-bottom: none;
}

.pm-gantt-bars {
    position: absolute;
    inset: 0.5rem 0.75rem calc(var(--pm-gantt-milestone-band) + var(--pm-gantt-ms-gap)) 0;
}

.pm-gantt-bar {
    position: absolute;
    top: calc(var(--pm-lane) * 25% + 12%);
    left: var(--pm-start);
    width: var(--pm-width);
    height: 18%;
    background: linear-gradient(90deg, rgba(19, 4, 234, 0.55), rgba(129, 55, 255, 0.45));
    border-radius: 4px;
    opacity: 0.85;
}

.pm-gantt-milestones {
    position: absolute;
    bottom: 0.15rem;
    left: 0;
    right: 0.75rem;
    height: calc(var(--pm-gantt-milestone-band) - 0.25rem);
}

.pm-milestone {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    padding-top: 0.65rem;
    transition: color 0.45s ease, text-shadow 0.45s ease;
}

.pm-milestone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: rgba(19, 4, 234, 0.35);
    border: 1px solid var(--neon-blue);
    transition:
        background 0.45s ease,
        border-color 0.45s ease,
        box-shadow 0.45s ease;
}

.pm-milestone.is-passed {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(19, 4, 234, 0.35);
}

.pm-milestone.is-passed::before {
    background: #28c840;
    border-color: #1fa838;
    box-shadow:
        0 0 6px rgba(40, 200, 64, 0.75),
        0 0 14px rgba(40, 200, 64, 0.4);
    animation: pm-ms-illuminate 0.55s ease forwards;
}

@keyframes pm-ms-illuminate {
    0% {
        box-shadow: 0 0 0 rgba(40, 200, 64, 0);
    }
    45% {
        box-shadow:
            0 0 10px rgba(40, 200, 64, 0.95),
            0 0 22px rgba(40, 200, 64, 0.55);
    }
    100% {
        box-shadow:
            0 0 6px rgba(40, 200, 64, 0.75),
            0 0 14px rgba(40, 200, 64, 0.4);
    }
}

.pm-cockpit-playhead {
    position: absolute;
    top: 0.5rem;
    bottom: calc(var(--pm-gantt-milestone-band) + var(--pm-gantt-ms-gap) + 0.25rem);
    left: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--neon-purple), var(--neon-blue));
    box-shadow: 0 0 12px rgba(129, 55, 255, 0.5);
    pointer-events: none;
    z-index: 2;
    transform: translateX(0);
}

.pm-cockpit-playhead::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--neon-purple);
}

.pm-cockpit-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 479px) {
    .pm-cockpit-side {
        grid-template-columns: 1fr;
    }
}

.pm-radar-wrap,
.pm-burndown-wrap {
    padding: clamp(1.15rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.35rem);
    border-top: 1px solid rgba(19, 4, 234, 0.08);
}

@media (min-width: 480px) {
    .pm-radar-wrap {
        border-right: 1px solid rgba(19, 4, 234, 0.08);
    }
}

.pm-radar-caption,
.pm-burndown-caption {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.pm-radar-stage {
    display: flex;
    justify-content: center;
    padding: 0.35rem 0.5rem;
}

.pm-radar-svg {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.pm-radar-sweep {
    transform-origin: 60px 60px;
}

.pm-radar-blip {
    fill: #e85d4c;
    opacity: 0.35;
    transition: opacity 0.4s;
}

.pm-radar-blip.is-active {
    opacity: 1;
}

.pm-burndown-wrap {
    display: flex;
    flex-direction: column;
}

.pm-burndown-svg {
    width: 100%;
    height: auto;
    display: block;
    padding: 0.35rem 0.5rem 0.25rem;
    box-sizing: border-box;
}

.pm-burndown-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.pm-burndown-fill {
    opacity: 0;
    transition: opacity 0.5s;
}

.pm-cockpit.is-animated .pm-burndown-fill {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .pm-burndown-line {
        stroke-dashoffset: 0;
    }
    .pm-burndown-fill { opacity: 1; }
    .pm-cockpit-playhead { left: 88% !important; }
    .pm-milestone { color: var(--neon-blue); }
    .pm-milestone::before {
        background: #28c840;
        border-color: #1fa838;
        animation: none;
        box-shadow:
            0 0 6px rgba(40, 200, 64, 0.75),
            0 0 14px rgba(40, 200, 64, 0.4);
    }
    .pm-radar-blip { opacity: 1; }
}

/* ----- Glide path gates ----- */
.pm-glide-stage {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) 0;
}

.pm-glide-path {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    opacity: 0.7;
}

.pm-gates {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
    align-items: start;
}

@media (min-width: 768px) {
    .pm-gates {
        grid-template-columns: repeat(5, 1fr);
        gap: clamp(0.5rem, 1.5vw, 0.85rem);
    }
}

.pm-gate {
    position: relative;
    z-index: 1;
    padding: clamp(0.85rem, 2vw, 1.1rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.pm-gate.is-expanded {
    z-index: 2;
    border-color: rgba(129, 55, 255, 0.4);
    box-shadow: 0 8px 24px rgba(19, 4, 234, 0.12);
}

@media (hover: hover) and (min-width: 768px) {
    .pm-gate:hover {
        z-index: 2;
        border-color: rgba(129, 55, 255, 0.4);
        box-shadow: 0 8px 24px rgba(19, 4, 234, 0.12);
    }
}

.pm-gate-head {
    margin-bottom: 0.5rem;
}

.pm-gate-num {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--neon-purple);
    margin-bottom: 0.35rem;
}

.pm-gate-title {
    font-size: clamp(0.78rem, 1.5vw, 0.88rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--neon-blue);
    margin: 0;
}

.pm-gate-title a {
    color: inherit;
    text-decoration: none;
}

.pm-gate-title a:hover,
.pm-gate-title a:focus-visible {
    text-decoration: underline;
}

.pm-gate-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--neon-purple);
    background: rgba(129, 55, 255, 0.08);
    border: 1px solid rgba(129, 55, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pm-gate-toggle:hover,
.pm-gate-toggle:focus-visible {
    background: rgba(129, 55, 255, 0.14);
    border-color: rgba(129, 55, 255, 0.35);
    outline: none;
}

@media (hover: hover) and (min-width: 768px) {
    .pm-gate-toggle {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

.pm-gate-details {
    margin-top: 0;
    padding: 0 1rem;
    background: rgba(19, 4, 234, 0.04);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.35s ease,
        opacity 0.3s ease,
        margin 0.3s ease,
        padding 0.3s ease,
        border-color 0.3s ease;
}

.pm-gate.is-expanded .pm-gate-details {
    margin-top: 0.65rem;
    padding: 0.75rem 1rem;
    max-height: 16rem;
    opacity: 1;
    border-color: rgba(19, 4, 234, 0.1);
}

.pm-gate-details[hidden] {
    display: block;
}

.pm-gate-details ul {
    margin: 0;
    padding: 0 0 0 1.1rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.pm-gate-details li + li {
    margin-top: 0.35rem;
}

@media (max-width: 767px) {
    .pm-gate {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pm-gate-details {
        max-height: none !important;
        opacity: 1 !important;
        display: block !important;
    }
    .pm-gate-details[hidden] {
        display: block !important;
    }
}

/* ----- Principles ----- */
.pm-principles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.85rem, 2vw, 1.1rem);
    max-width: 56rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .pm-principles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pm-principle {
    padding: clamp(1.15rem, 2.5vw, 1.5rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.15rem;
    cursor: default;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.pm-principle:hover,
.pm-principle:focus-within,
.pm-principle.is-expanded {
    border-color: rgba(129, 55, 255, 0.35);
    box-shadow: 0 10px 32px rgba(19, 4, 234, 0.1);
}

.pm-principle-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.pm-principle-icon {
    display: flex;
    color: var(--neon-purple);
}

.pm-principle h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--neon-blue);
    margin: 0;
}

.pm-principle-teaser {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

.pm-principle-konkret {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s;
}

.pm-principle:hover .pm-principle-konkret,
.pm-principle:focus-within .pm-principle-konkret,
.pm-principle.is-expanded .pm-principle-konkret {
    max-height: 6rem;
    opacity: 1;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(19, 4, 234, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .pm-principle-konkret {
        max-height: none !important;
        opacity: 1 !important;
        margin-top: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px solid rgba(19, 4, 234, 0.1);
    }
}

/* ----- Methods matrix ----- */
.pm-methods-matrix {
    max-width: 56rem;
    margin: 0 auto;
}

.pm-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
}

.pm-matrix-table th,
.pm-matrix-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(19, 4, 234, 0.08);
}

.pm-matrix-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neon-purple);
    background: rgba(19, 4, 234, 0.04);
}

.pm-matrix-table tbody th {
    font-weight: 700;
    color: var(--neon-blue);
    white-space: nowrap;
}

.pm-matrix-table tbody td {
    color: var(--text-muted);
    line-height: 1.5;
}

.pm-matrix-table tr:last-child th,
.pm-matrix-table tr:last-child td {
    border-bottom: none;
}

.pm-methods-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .pm-methods-chips {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pm-chip-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neon-purple);
    margin: 0 0 0.65rem;
}

.pm-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pm-chip {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(19, 4, 234, 0.05);
    border: 1px solid rgba(19, 4, 234, 0.12);
    border-radius: 999px;
}

.pm-chip--primary {
    background: rgba(19, 4, 234, 0.14);
    border-color: rgba(19, 4, 234, 0.35);
    color: var(--neon-blue);
    font-weight: 700;
}

.pm-cross-silo {
    max-width: 44rem;
    margin: clamp(2rem, 4vh, 3rem) auto 0;
    text-align: center;
}

.pm-cross-silo p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

/* ----- Silo component mirrors (lp-*) ----- */
.lp-cta-box .cta-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lp-cta-box .cta-title {
    margin-bottom: 1rem;
    max-width: 36rem;
}

.lp-cta-desc {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.lp-cta-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.lp-cta-contact a {
    color: var(--neon-blue);
    font-weight: 600;
    text-decoration: none;
}

.lp-cta-contact a:hover,
.lp-cta-contact a:focus-visible {
    text-decoration: underline;
}

.lp-cta-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(19, 4, 234, 0.12);
}

.lp-cta-trust span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.lp-section--related {
    max-width: 80rem;
    padding-bottom: clamp(4rem, 10vh, 7rem);
}

.lp-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.35rem);
    align-items: stretch;
}

@media (min-width: 640px) {
    .lp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lp-related-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .lp-related-card:nth-child(1) { grid-column: 1 / 3; }
    .lp-related-card:nth-child(2) { grid-column: 3 / 5; }
    .lp-related-card:nth-child(3) { grid-column: 5 / 7; }
    .lp-related-card:nth-child(4) { grid-column: 2 / 4; }
    .lp-related-card:nth-child(5) { grid-column: 4 / 6; }
}

.lp-related-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: clamp(1.35rem, 2.5vw, 1.85rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.35rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(19, 4, 234, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.lp-related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.lp-related-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(19, 4, 234, 0.07) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.lp-related-card:hover,
.lp-related-card:focus-visible {
    border-color: rgba(19, 4, 234, 0.38);
    box-shadow: 0 18px 48px rgba(19, 4, 234, 0.16), 0 4px 16px rgba(129, 55, 255, 0.08);
    transform: translateY(-5px);
    outline: none;
}

.lp-related-card:hover::before,
.lp-related-card:focus-visible::before,
.lp-related-card:hover::after,
.lp-related-card:focus-visible::after {
    opacity: 1;
}

.lp-related-tag {
    position: relative;
    z-index: 1;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--neon-purple);
    background: rgba(129, 55, 255, 0.08);
    border: 1px solid rgba(129, 55, 255, 0.18);
    border-radius: 999px;
}

.lp-related-card h3 {
    position: relative;
    z-index: 1;
    font-size: clamp(0.78rem, 1.4vw, 0.88rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--neon-blue);
    margin: 0 0 0.65rem;
    line-height: 1.35;
}

.lp-related-card p {
    position: relative;
    z-index: 1;
    font-size: clamp(0.82rem, 1.5vw, 0.88rem);
    line-height: 1.58;
    color: var(--text-muted);
    margin: 0 0 1.35rem;
    flex-grow: 1;
}

.lp-related-arrow {
    position: relative;
    z-index: 1;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--neon-purple);
    background: rgba(129, 55, 255, 0.08);
    border-radius: 50%;
    transition:
        background var(--transition-normal),
        color var(--transition-normal),
        transform var(--transition-normal);
}

.lp-related-arrow svg {
    width: 1rem;
    height: 1rem;
}

.lp-related-card:hover .lp-related-arrow,
.lp-related-card:focus-visible .lp-related-arrow {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #fff;
    transform: translateX(3px);
}

/* ----- Responsive overflow guard ----- */
@media (max-width: 360px) {
    .pm-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .pm-preset-btn {
        font-size: 0.72rem;
        padding: 0.5rem 0.65rem;
    }
    .pm-cockpit-gantt-wrap {
        --pm-gantt-label-width: 4.5rem;
        padding-left: calc(var(--pm-cockpit-inset) + var(--pm-gantt-label-width));
    }
    .pm-gantt-labels span {
        font-size: 0.6rem;
    }
}

/* ----- Scroll stability -----
   Programmatic scrolls (ScrollTrigger refresh, scroll restoration) must be
   instant: with the global `scroll-behavior: smooth` every internal refresh
   became a visible glide back towards the top of the page. In-page anchor
   links keep their smooth scroll via main.js. overflow-x: clip (instead of
   hidden) stops <html>/<body> from becoming nested scroll containers, which
   breaks momentum scrolling on iOS Safari. */
html {
    scroll-behavior: auto;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

/* Stable hero height on mobile: 100dvh follows the address bar as it
   collapses/expands mid-scroll and shifted every section below the hero.
   Only the box height changes - the hero animation is untouched. */
@supports (height: 100svh) {
    .hero {
        min-height: 100svh;
    }
}
