/* Seitenanatomie (3.55.0, AL1 in NOWCAST_EU_PLAN §0a.2): eine Gestalt fuer nowcast.eu und die gepaarten
   poll.graphics-Seiten ohne Zugang. Markup: includes/page-anatomy.php (Klassen pga-*).

   EIN LOOK (AL0 Entscheidung 6): Navy aus dem Logo als Akzent, Titel in Source Serif 4, Text in Source Sans 3.
   Die Schriften liegen im Plugin (assets/fonts, @font-face in frontend-core.css) — kein Google-Fonts-Abruf.
   Nur hell: dunkler Modus ist ein spaeteres Feature (AL0, 15.10.).

   Die Tokens haengen an .pga, nicht an :root, damit das Theme und die bezahlte Ansicht unberuehrt bleiben.
   Ersetzt nach und nach pg-hub-* (country-hub.php, nowcast-home.php) und pg-country-* (country-page.php):
   AL2/AL3 stellen die Seiten um, dann fallen die alten Regeln in frontend-pages.css weg. */

.pga {
    --pga-paper: #ffffff;
    --pga-wash: #f2f4f8;
    --pga-ink: #1e2331;
    --pga-muted: #5c6376;
    --pga-line: #dde1ea;
    --pga-accent: #1a3a8f;
    --pga-accent-ink: #ffffff;
    --pga-up: #1d7a46;
    --pga-down: #b3261e;
    --pga-focus: #d9a400;
    --pga-f-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --pga-f-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    color: var(--pga-ink);
    font-family: var(--pga-f-body);
    font-size: 1rem;
    line-height: 1.5;
    container-type: inline-size;
}

.pga a {
    color: var(--pga-accent);
}

.pga a:focus-visible {
    outline: 3px solid var(--pga-focus);
    outline-offset: 2px;
}

.pga-block {
    padding-block: 1.25rem 1.1rem;
    border-bottom: 1px solid var(--pga-line);
    min-width: 0;
}

.pga-block:last-child {
    border-bottom: 0;
}

.pga-h {
    font: 700 1.1rem/1.25 var(--pga-f-body);
    margin: 0 0 0.6rem;
}

.pga-cap {
    font-size: 0.82rem;
    color: var(--pga-muted);
    margin: 0.5rem 0 0;
}

.pga-cap-top {
    margin: -0.25rem 0 0.5rem;
}

.pga-muted {
    color: var(--pga-muted);
}

.pga-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pga-up {
    color: var(--pga-up);
}

.pga-down {
    color: var(--pga-down);
}

.pga-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 0;
}

/* 1 Kopf */
.pga-head {
    display: grid;
    gap: 0.35rem;
    padding-top: 0.5rem;
}

.pga-eyebrow {
    margin: 0;
    font: 600 0.78rem/1.2 var(--pga-f-body);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pga-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pga-eyebrow img,
.pga-eyebrow svg {
    flex: none;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08);
}

.pga-title {
    margin: 0;
    font: 600 clamp(1.4rem, 5cqi, 1.9rem)/1.15 var(--pga-f-display);
    text-wrap: balance;
    color: var(--pga-ink);
}

.pga-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    font-size: 0.88rem;
    color: var(--pga-muted);
}

.pga-meta strong {
    color: var(--pga-ink);
}

/* 2 Karte: das Innere stylt public-map.css */
.pga-map .pg-public-map {
    margin-bottom: 0;
}

/* 3 Parlament */
.pga-parl {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: center;
}

@container (min-width: 640px) {
    .pga-parl {
        grid-template-columns: 1.15fr 1fr;
    }
}

.pga-parl-fig {
    margin: 0;
}

.pga-hemicycle {
    display: block;
    width: 100%;
    height: auto;
}

.pga-seatrow {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
}

.pga-seat {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.pga-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px 14px;
    font-size: 0.88rem;
}

.pga-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.pga-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: none;
}

.pga-legend-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pga-legend-seats {
    margin-left: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 4 Umfragen */
.pga-scroll {
    min-width: 0;
    overflow-x: auto;
}

.pga-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.pga-table th {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pga-muted);
    text-align: left;
    padding: 4px 6px;
    border-bottom: 1px solid var(--pga-line);
}

.pga-table th.pga-num {
    text-align: right;
}

.pga-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--pga-line);
    white-space: nowrap;
}

.pga-table tr:last-child td {
    border-bottom: 0;
}

.pga-bar-col {
    width: 35%;
}

.pga-bar {
    display: block;
    height: 10px;
    border-radius: 2px;
    min-width: 2px;
}

@container (max-width: 420px) {
    .pga-bar-col {
        display: none;
    }
}

/* 5 Bezahlblock */
.pga-pay {
    scroll-margin-top: 80px;
}

.pga-pay-box {
    border: 2px solid var(--pga-accent);
    border-radius: 10px;
    padding: 1.1rem;
    display: grid;
    gap: 0.6rem;
    background: var(--pga-paper);
}

.pga-pay-h {
    margin: 0;
    font: 600 1.5rem/1.1 var(--pga-f-display);
    color: var(--pga-accent);
}

.pga-pay-sub,
.pga-pay-price,
.pga-pay-act,
.pga-pay-login {
    margin: 0;
}

.pga-pay-sub {
    color: var(--pga-muted);
}

.pga-pay-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.25rem;
}

.pga-pay-act {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.pga-pay-login {
    font-size: 0.88rem;
}

/* Der Kaufkasten von heute (render_inline_cta) sitzt im Block: ohne eigenen Rahmen und Titel, die traegt der Block. */
.pga-pay-checkout .pg-paywall-cta-wrap,
.pga-pay-checkout .pg-paywall-cta {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
    max-width: none;
}

.pga-pay-checkout .pg-paywall-cta-title {
    display: none;
}

/* Kaufknopf und Umschalter im Block behalten das poll.graphics-Lila (Verlauf aus frontend-core.css; Nutzer 16.10.,
   3.63.1). Navy (.pga-btn) nur auf nowcast.eu — jede Marke ihre Knopffarbe, Form und Mass gleich. */

/* Kaufkasten auf nowcast.eu (3.63.0): Mass und Anordnung wie der Kaufkasten auf poll.graphics (frontend-core.css
   .pg-cta-*), damit beide Bloecke gleich aussehen; verkauft wird dort, der Knopf fuehrt hin. */
.pga-buy {
    text-align: center;
    margin-top: 0.4rem;
}

.pga-buy-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: var(--pga-muted);
}

.pga-buy-int.is-on {
    color: var(--pga-ink);
    font-weight: 600;
}

.pga-buy-switch {
    position: relative;
    width: 44px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: #d1d5db;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.pga-buy-switch:focus-visible {
    outline: 2px solid var(--pga-focus);
    outline-offset: 2px;
}

.pga-buy-switch span {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.pga-buy-switch[aria-checked="true"] {
    background: var(--pga-accent);
}

.pga-buy-switch[aria-checked="true"] span {
    transform: translateX(18px);
}

.pga-buy-save {
    display: inline-block;
    background: #16a34a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.pga-buy-price {
    margin: 0 0 4px;
    line-height: 1;
}

.pga-buy-price strong {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pga-ink);
}

.pga-buy-price span {
    margin-left: 2px;
    color: var(--pga-muted);
}

.pga-buy-note {
    margin: 0 0 16px;
    min-height: 1.4em;
    font-size: 12px;
    color: var(--pga-muted);
}

.pga-btn-wide {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 28px;
    font-size: 1rem;
    text-align: center;
}

.pga-buy-where {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--pga-muted);
}

.pga-btn {
    display: inline-block;
    background: var(--pga-accent);
    color: var(--pga-accent-ink) !important;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    text-decoration: none;
}

.pga-btn:hover {
    filter: brightness(1.12);
}

/* 6 Gebiete, 7 Ueber */
.pga-links {
    margin: 0.6rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    font-size: 0.88rem;
}

.pga-about-text {
    margin: 0 0 0.5rem;
    max-width: 65ch;
}

.pga-cite {
    margin: 0.6rem 0 0;
    font-size: 0.82rem;
    background: var(--pga-wash);
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    overflow-wrap: anywhere;
}

/* nowcast.eu (3.59.0, AL3): Startseite und Laenderseiten auf der Anatomie */

/* Laenderseite: ein Abschnitt je Wahl (Entscheidung 7 A). Weisser Grund wie die Seiten auf poll.graphics (3.61.0,
   Nutzer 16.10.: kein grauer Hintergrund); getrennt durch eine Linie. */
.pga-jump {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
}

.pga-election {
    margin-top: 1.5rem;
    border-top: 3px solid var(--pga-line);
    scroll-margin-top: 80px;
}

.pga-election .pga-block:last-child {
    border-bottom: 0;
}

/* Halbkreis-Karte (_parliament.css) im Block: ohne eigenen Aussenabstand, Sitzreihe mittig */
.pga-parliament .pg-parliament-section {
    margin: 0;
}

.pga-hemicycle-wrap-row,
.pg-hemicycle-wrap .pga-seatrow {
    justify-content: center;
}

.pga-h-center {
    text-align: center;
}

/* Gebietsraster im Block: der Abstand nach unten kommt vom Block */
.pga-areas .pg-area-grid {
    margin-bottom: 0;
}

/* Startseite: die Extras (Kalender, Newsletter, Redaktionen) unter den Bloecken */
.pga-home + .pg-nch {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 3px double #dde1ea;
}
