@font-face {
    font-family: "PKOBankSans";
    src: url("../fonts/PKOFont2024-Regular.woff2?v=1788535633") format("woff2"),
         url("../fonts/PKOFont2024-Regular.woff?v=1788535633") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "PKOBankSans";
    src: url("../fonts/PKOFont2024-Medium.woff2?v=1788535633") format("woff2"),
         url("../fonts/PKOFont2024-Medium.woff?v=1788535633") format("woff");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "PKOBankSans";
    src: url("../fonts/PKOFont2024-SemiBold.woff2?v=1788535633") format("woff2"),
         url("../fonts/PKOFont2024-SemiBold.woff?v=1788535633") format("woff");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "PKOBankSans";
    src: url("../fonts/PKOFont2024-Bold.woff2?v=1788535633") format("woff2"),
         url("../fonts/PKOFont2024-Bold.woff?v=1788535633") format("woff");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --pko-red: #ff2038;
    --pko-black: #000000;
    --pko-white: #ffffff;
    --pko-navy: #000066;
    --pko-blue: #b1d2ff;
    --ink: #000000;
    --muted: #3a3a4d;
    --card: rgba(255, 255, 255, 0.88);
    --line: rgba(0, 0, 102, 0.14);
    --shadow: 0 18px 40px rgba(0, 0, 102, 0.12);
    --radius: 22px;
    --font: "PKOBankSans", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--ink);
}

body {
    line-height: 1.45;
    background-color: var(--pko-blue);
    background-image: url("../img/bg_light.jpg?v=1788535633");
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

h1, h2, h3 {
    margin: 0 0 0.4em;
    line-height: 1.15;
    font-weight: 700;
}

p {
    margin: 0 0 1em;
}

code {
    font-size: 0.92em;
}

.eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pko-red);
}

.lede,
.hint {
    color: var(--muted);
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 0.95rem 1.1rem;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-primary,
.btn-action {
    background: var(--pko-red);
    color: var(--pko-white);
}

.btn-ghost {
    background: transparent;
    color: inherit;
    border: 1px solid var(--line);
}

.btn-publish {
    background: var(--pko-white);
    color: var(--ink);
    border: 1px solid var(--line);
    text-align: left;
}

.btn-publish.is-active {
    background: var(--pko-navy);
    color: var(--pko-white);
    border-color: var(--pko-navy);
}

.btn-compare {
    background: var(--pko-blue);
    border-color: transparent;
}

.btn-danger {
    background: var(--pko-navy);
    color: var(--pko-white);
}

.form-error {
    color: var(--pko-red);
    font-weight: 700;
}

.setup-banner {
    margin: 0 1.5rem 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: #fff4cc;
    color: #5c4813;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    max-width: 22rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: var(--pko-navy);
    color: var(--pko-white);
    box-shadow: var(--shadow);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 102, 0.45);
}

.modal[hidden] {
    display: none;
}

.modal-card {
    width: min(34rem, 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--pko-white);
    box-shadow: var(--shadow);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}

.page-studio,
.page-dioda,
.page-uczestnik {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
}

.page-studio,
.page-uczestnik {
    background: none;
}

.page-uczestnik {
    overflow-x: hidden;
}

.page-studio::before,
.page-uczestnik::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--pko-blue);
    background-image: url("../img/bg_light.jpg?v=1788535633");
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
}

.page-studio > *,
.page-uczestnik > * {
    position: relative;
    z-index: 1;
}

.studio-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card,
.panel,
.phone-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.login-card {
    width: min(26rem, 100%);
    padding: 1.6rem;
}

.login-card label,
.phone-card label {
    display: block;
    margin-bottom: 1rem;
}

.login-card label > span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.login-card input,
.phone-card input[type="text"],
.phone-card input[type="password"] {
    width: 100%;
    padding: 0.9rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    background: var(--pko-white);
}

.studio-top,
.studio-layout,
.studio-bottom {
    width: min(42rem, calc(100% - 1.4rem));
    margin: 0 auto;
}

.studio-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 0 0.8rem;
}

.studio-top h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.studio-top-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pub-now {
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: var(--pko-navy);
    color: var(--pko-white);
}

.studio-layout,
.studio-bottom {
    display: grid;
    gap: 1rem;
}

.studio-layout {
    grid-template-columns: 1fr;
}

.studio-bottom {
    grid-template-columns: 1fr;
    margin-top: 1rem;
    padding-bottom: 2.5rem;
}

.panel {
    padding: 1.15rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
}

.status-pill {
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #ececec;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pill.is-open {
    background: #d9f6ea;
    color: #0d6b4c;
}

.vote-count strong {
    font-size: 2.4rem;
}

.btn-action {
    width: 100%;
    min-height: 4.6rem;
    margin: 0.55rem 0 0;
    font-size: 1rem;
}

.publish-grid {
    display: grid;
    gap: 0.55rem;
}

.btn-publish {
    min-height: 3.4rem;
}

.mini-results {
    display: grid;
    gap: 0.55rem;
}

.result-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: center;
}

.result-row .bar {
    height: 10px;
    border-radius: 999px;
    background: #e6eefc;
    overflow: hidden;
    margin-top: 0.3rem;
}

.result-row .bar > span {
    display: block;
    height: 100%;
    background: var(--pko-red);
}

.result-meta {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
}

.qr-box {
    width: 220px;
    height: 220px;
    margin: 0.6rem 0;
    background: var(--pko-white);
    padding: 4px;
}

.qr-box-lg {
    width: min(42vh, 360px);
    height: min(42vh, 360px);
}

.qr-box img,
.qr-box canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.participant-url {
    word-break: break-all;
    font-size: 0.92rem;
}

.page-dioda {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: var(--pko-black);
    background: none;
}

.page-dioda::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--pko-blue);
    background-image: url("../img/bg_light.jpg?v=1788535633");
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
}

.dioda-setup,
.dioda-stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: block;
    padding: 0;
}

.dioda-view {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8vh 16vw 8vh 14.5vw;
}

.dioda-view[hidden] {
    display: none !important;
}

.dioda-slide {
    display: flex;
    align-items: center;
    gap: 2.2vw;
    width: 100%;
}

.dioda-slide-stack {
    display: block;
}

.dioda-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.dioda-kicker {
    margin: 0 0 1.1vw;
    color: var(--pko-red);
    font-size: 1.15vw;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

.dioda-view h1 {
    margin: 0 0 1.15vw;
    font-size: 3.9vw;
    line-height: 1.12;
    max-width: 18ch;
    color: var(--pko-black);
}

.dioda-view-wide h1 {
    max-width: 18ch;
    font-size: 3.2vw;
}

#view-live h1 {
    max-width: 20ch;
    font-size: 2.7vw;
}

#view-live .dioda-bars {
    max-width: none;
    margin-top: 1.4vw;
}

.dioda-sub,
.dioda-cta,
.dioda-total {
    margin: 0 0 0.7vw;
    color: var(--pko-black);
    font-size: 1.55vw;
    font-weight: 400;
    max-width: 46ch;
}

.dioda-cta {
    margin-top: 2vw;
    font-weight: 500;
}

.dioda-qr {
    flex: 0 0 min(26vw, 44vh);
    width: min(26vw, 44vh);
    height: min(26vw, 44vh);
    padding: 0.35vw;
    background: var(--pko-white);
    box-shadow: 0 0.8vw 2.2vw rgba(0, 0, 102, 0.14);
}

.dioda-qr img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prompt-answers {
    list-style: none;
    margin: 1.6vw 0 0;
    padding: 0;
    display: grid;
    gap: 0.55vw;
}

.prompt-answers li {
    font-size: 2.15vw;
    font-weight: 700;
    color: var(--pko-black);
}

.dioda-bars,
.compare-table {
    display: grid;
    gap: 1.2vw;
    margin-top: 2vw;
    max-width: 62vw;
}

.dioda-bar {
    display: grid;
    grid-template-columns: 14vw 1fr 12vw;
    gap: 1.2vw;
    align-items: center;
}

.dioda-bar .label {
    font-size: 1.8vw;
    font-weight: 700;
    color: var(--pko-black);
}

.dioda-bar .track,
.compare-line .track {
    height: 2.3vw;
    border-radius: 999px;
    background: rgba(0, 0, 102, 0.08);
    overflow: hidden;
}

.dioda-bar .fill,
.compare-line .fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.45s ease;
}

.dioda-bar .fill {
    background: linear-gradient(90deg, var(--pko-navy), var(--pko-red));
}

.compare-line .fill-1 {
    background: linear-gradient(90deg, var(--pko-navy), #1a3a9c);
}

.compare-line .fill-2 {
    background: linear-gradient(90deg, #c41830, var(--pko-red));
}

.dioda-bar .nums,
.compare-line .nums {
    min-width: 0;
    text-align: right;
    font-size: 1.4vw;
    font-weight: 700;
}

.compare-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 2vw 2.4vw;
    margin-bottom: 0.4vw;
}

.compare-key {
    display: inline-flex;
    align-items: center;
    gap: 0.55vw;
    font-size: 1.15vw;
    font-weight: 700;
    color: var(--pko-black);
}

.compare-dot {
    width: 0.9vw;
    height: 0.9vw;
    border-radius: 50%;
    flex: 0 0 auto;
}

.compare-dot-1 {
    background: var(--pko-navy);
}

.compare-dot-2 {
    background: var(--pko-red);
}

.compare-answer {
    display: grid;
    gap: 0.7vw;
    padding: 1.1vw 0 1.3vw;
    border-bottom: 1px solid var(--line);
}

.compare-answer:last-child {
    border-bottom: 0;
}

.compare-answer strong {
    font-size: 2vw;
    color: var(--pko-black);
}

.compare-line {
    display: grid;
    grid-template-columns: 2.4vw 1fr 13vw;
    gap: 1vw;
    align-items: center;
}

.compare-tag {
    display: grid;
    place-items: center;
    width: 2.2vw;
    height: 2.2vw;
    border-radius: 50%;
    font-size: 1vw;
    font-weight: 700;
    color: var(--pko-white);
}

.compare-tag-1 {
    background: var(--pko-navy);
}

.compare-tag-2 {
    background: var(--pko-red);
}

.phone-shell {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 1.2rem 0.9rem 2rem;
}

.phone-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.2rem 1rem 1.3rem;
}

.phone-card h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    color: var(--pko-navy);
}

.answer-list {
    display: grid;
    gap: 0.7rem;
    margin: 1.1rem 0;
}

.answer-option {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

.answer-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.answer-option .answer-choice {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 4.5rem;
    padding: 0.85rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: var(--pko-white);
}

.answer-option input:checked + .answer-choice {
    border-color: var(--pko-red);
    background: #ffe8eb;
}

.answer-option .answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.2rem;
    height: 2.2rem;
    min-width: 2.2rem;
    min-height: 2.2rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    background: var(--pko-navy);
    color: var(--pko-white);
    flex: 0 0 2.2rem;
    font-family: var(--font);
    font-style: normal;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    text-align: center;
}

.answer-option .answer-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(1.15rem, 4.2vw, 1.32rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--pko-black);
    overflow-wrap: anywhere;
}

#vote-submit {
    min-height: 4.2rem;
    font-size: 1.05rem;
}

@media (max-width: 1100px) {
    .studio-layout,
    .studio-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .page-dioda {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: auto;
    }

    .dioda-stage,
    .dioda-view {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .dioda-view {
        justify-content: center;
        padding: 10vh 7vw 12vh;
        text-align: center;
    }

    .dioda-slide {
        flex-direction: column;
        align-items: center;
        gap: 7vw;
    }

    .dioda-kicker {
        font-size: 3.2vw;
    }

    .dioda-view h1,
    .dioda-view-wide h1,
    #view-live h1 {
        font-size: 8.4vw;
        max-width: 16ch;
        margin-left: auto;
        margin-right: auto;
    }

    .dioda-sub,
    .dioda-cta,
    .dioda-total {
        font-size: 4.4vw;
        margin-left: auto;
        margin-right: auto;
    }

    .dioda-qr {
        flex: none;
        width: 48vw;
        height: 48vw;
        padding: 0.8vw;
    }

    .prompt-answers li {
        font-size: 6vw;
    }

    .dioda-bars,
    .compare-table {
        max-width: none;
        text-align: left;
    }

    .dioda-bar,
    .compare-line {
        grid-template-columns: 1fr;
    }

    .dioda-bar .label,
    .dioda-bar .nums,
    .compare-answer strong,
    .compare-line .nums,
    .compare-key {
        font-size: 4.4vw;
        text-align: left;
    }

    .dioda-bar .track,
    .compare-line .track {
        height: 3.6vw;
    }

    .compare-tag {
        width: 6vw;
        height: 6vw;
        font-size: 3vw;
    }

    .compare-dot {
        width: 2.4vw;
        height: 2.4vw;
    }
}

@media (max-width: 720px) {
    .studio-top,
    .studio-top-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-line,
    .dioda-bar {
        grid-template-columns: 1fr;
    }

    .dioda-bar .nums {
        text-align: left;
    }
}
