/* ============================================================
   STRONA GŁÓWNA (home.css)
   Wymaga: global.css, ui-platonic.css
   Prefiks klas: hm-
   ============================================================ */

.hm-main {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    color: var(--Napisy);
}

.hm-muted {
    color: var(--SzaryTekst);
    font-weight: 400;
    font-size: 0.92em;
}

/* ── MATH BG (pływające symbole) ─────────────────────────── */
.math-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    display: none;
}

body.math-on .math-bg { display: block; }

.math-bg span {
    position: absolute;
    font-size: 80px;
    color: var(--Fioletowy);
    opacity: 0.06;
    font-weight: 800;
    animation: hmFloaty 18s linear infinite;
}

@keyframes hmFloaty {
    0%   { transform: translateY(0) rotate(0); }
    50%  { transform: translateY(-30px) rotate(8deg); }
    100% { transform: translateY(0) rotate(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hm-hero {
    width: 100%;
    padding: 165px 5% 80px 5%;
    background:
        radial-gradient(1100px 520px at 88% -10%, rgba(116, 113, 217, 0.14), transparent 60%),
        radial-gradient(900px 480px at -10% 30%, rgba(59, 130, 246, 0.10), transparent 55%),
        var(--Platonic);
}

.hm-hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
    max-width: 1380px;
    margin: 0 auto;
}

.hm-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hm-hero-title {
    font-size: clamp(34px, 4.8vw, 56px);
    font-weight: 800;
    line-height: 1.13;
    color: var(--Napisy);
}

.hm-hero-title span {
    background: linear-gradient(90deg, var(--Niebieski), var(--Fioletowy));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hm-hero-sub {
    margin-top: 20px;
    max-width: 560px;
    font-size: clamp(16px, 1.9vw, 19px);
    line-height: 1.6;
    color: var(--SzaryTekst);
}

.hm-hero-btns {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hm-hero-note {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--SzaryTekst);
}

.hm-hero-note svg { color: var(--Zielony); flex-shrink: 0; }

/* Makieta panelu w hero */
.hm-hero-right {
    position: relative;
}

.hm-hero-glow {
    position: absolute;
    inset: 8% -4% -6% 4%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(116, 113, 217, 0.30));
    filter: blur(46px);
    border-radius: 40px;
    z-index: 0;
}

.hm-hero-window {
    position: relative;
    z-index: 1;
    transform: rotate(1.2deg);
    transition: transform 0.45s ease;
    animation: hmHeroFloat 7s ease-in-out infinite;
}

.hm-hero-window:hover {
    transform: rotate(0deg) scale(1.015);
    animation-play-state: paused;
}

@keyframes hmHeroFloat {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -10px; }
}

.hm-hero-window-body {
    padding: 20px;
}

.hm-hero-stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hm-hero-stats-mini .pl-stat { padding: 14px 15px; }
.hm-hero-stats-mini .pl-stat-num { font-size: 21px; }
.hm-hero-stats-mini .pl-stat-title { font-size: 14px; }
.hm-hero-stats-mini .pl-stat-icon { width: 38px; height: 38px; border-radius: 11px; }

.hm-hero-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 16px 0 6px 0;
    flex-wrap: wrap;
}

.hm-hero-filter .pl-pill { padding: 7px 14px; font-size: 13px; pointer-events: none; }

.hm-hero-filter-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--SzaryTekst);
}

.hm-hero-table-wrap { overflow-x: auto; }

.hm-hero-table { font-size: 14px; }
.hm-hero-table th { padding: 10px 10px; font-size: 11px; }
.hm-hero-table td { padding: 12px 10px; white-space: nowrap; }
.hm-hero-table .pl-status { padding: 5px 11px; font-size: 12px; }
.hm-hero-table .pl-code { padding: 4px 9px; font-size: 12.5px; }
.hm-hero-table .pl-dot { margin-right: 4px; }

/* ============================================================
   LICZBY — EDYCJA 0
   ============================================================ */
.hm-numbers {
    width: 100%;
    padding: 46px 5%;
    background: linear-gradient(120deg, var(--CiemnyNiebieski) 0%, var(--Niebieski) 45%, var(--Fioletowy) 100%);
}

.hm-numbers-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
}

.hm-number {
    text-align: center;
    padding: 8px 12px;
}

.hm-number + .hm-number {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.hm-number-num {
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.05;
}

.hm-number-label {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
}

/* ============================================================
   KONKURSY
   ============================================================ */
.hm-contests { background-color: var(--Platonic); }

.hm-contests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.hm-contest-card { padding: 30px 28px; }

.hm-contest-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--Ramka);
}

.hm-contest-head h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--Napisy);
}

.hm-contest-head p {
    margin-top: 3px;
    font-size: 14px;
    color: var(--SzaryTekst);
}

.hm-contest-mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
}

.hm-mark-blue   { background: linear-gradient(135deg, var(--Niebieski), var(--NiebieskiHover)); }
.hm-mark-violet { background: linear-gradient(135deg, var(--Fioletowy), var(--FioletowyHover)); }
.hm-mark-gray   { background-color: var(--ContestSzaryJasny); color: var(--ContestSzaryCiemny); }

.hm-check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.hm-check-list li {
    position: relative;
    padding-left: 28px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--CiemnySzaryTekst);
}

.hm-check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background-color: var(--JasnyZielony);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23065F46' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-position: center;
    background-repeat: no-repeat;
}

.hm-contest-soon {
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F4FF 100%);
    border-style: dashed;
    border-color: var(--ContestFioletJasny2);
}

.hm-contest-soon-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--SzaryTekst);
}

.hm-contest-soon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 700;
    color: var(--FioletowyHover);
    text-decoration: none;
    transition: gap 0.25s ease;
}

.hm-contest-soon-link:hover { gap: 12px; }

.hm-contests-cta {
    margin-top: 40px;
    text-align: center;
}

/* ============================================================
   JAK TO DZIAŁA — NAUCZYCIEL
   ============================================================ */
.hm-journey { background-color: #FFFFFF; }

.hm-journey-grid {
    display: flex;
    align-items: stretch;
    max-width: 1320px;
    margin: 0 auto;
}

.hm-journey-step {
    flex: 1;
    padding: 28px 24px;
    border: 1px solid var(--Ramka);
    border-radius: 18px;
    background-color: var(--SidebarBG);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.hm-journey-step:hover {
    transform: translateY(-6px);
    background-color: #FFFFFF;
    box-shadow: var(--shadow-crisp);
}

.hm-journey-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--Niebieski), var(--Fioletowy));
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hm-journey-step h3 {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--Napisy);
    margin-bottom: 10px;
    line-height: 1.3;
}

.hm-journey-step p {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--SzaryTekst);
}

.hm-journey-line {
    width: 40px;
    min-width: 20px;
    align-self: center;
    height: 2px;
    background: linear-gradient(90deg, var(--Niebieski), var(--Fioletowy));
    opacity: 0.4;
}

/* ============================================================
   PANEL — GŁÓWNA STRONA ETAPU
   ============================================================ */
.hm-panel { background-color: var(--Platonic); }

.hm-panel-inner {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 60px;
    max-width: 1360px;
    margin: 0 auto;
    align-items: center;
}

.hm-panel-left .pl-sec-title { text-align: left; }

.hm-panel-text {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--SzaryTekst);
}

.hm-panel-list {
    list-style: none;
    margin: 30px 0 34px 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hm-panel-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.hm-panel-list-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.hm-pli-green  { background-color: var(--JasnyZielony);      color: var(--CiemnyZielony); }
.hm-pli-violet { background-color: var(--ContestFioletJasny); color: var(--ContestFioletCiemny); }
.hm-pli-blue   { background-color: var(--JasnyNiebieski);    color: var(--CiemnyNiebieski); }

.hm-panel-list h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--Napisy);
    margin-bottom: 5px;
}

.hm-panel-list p {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--SzaryTekst);
}

.hm-panel-window-body { padding: 20px; }

.hm-panel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.hm-panel-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--Ramka);
}

.hm-panel-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--CiemnySzaryTekst);
}

/* ============================================================
   OMR
   ============================================================ */
.hm-omr { background-color: #FFFFFF; }

.hm-omr-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    max-width: 1320px;
    margin: 0 auto;
    align-items: center;
}

.hm-omr-card-wrap { display: flex; justify-content: center; }

.hm-omr-card {
    width: 100%;
    max-width: 380px;
    background-color: #FFFFFF;
    border: 1px solid var(--Ramka);
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    padding: 28px 26px;
    transform: rotate(-1.5deg);
    transition: transform 0.4s ease;
}

.hm-omr-card:hover { transform: rotate(0deg); }

.hm-omr-card-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--SzaryTekst);
    text-align: center;
    margin-bottom: 20px;
}

.hm-omr-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.omr-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.omr-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--CiemnySzaryTekst);
    width: 26px;
    text-align: right;
    flex-shrink: 0;
}

.bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--JasnySzary);
    background-color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.bubble:hover { border-color: var(--Niebieski); }

.bubble.active {
    background-color: var(--Niebieski);
    border-color: var(--Niebieski);
}

.bubble.gold-party {
    background-color: #FFD700 !important;
    border-color: #DAA520 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: hmWaveJump 0.5s ease-in-out;
}

@keyframes hmWaveJump {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.hm-omr-hint {
    margin-top: 20px;
    text-align: center;
    font-size: 12.5px;
    color: var(--JasnySzary);
    font-style: italic;
}

.hm-omr-content .pl-sec-title { text-align: left; }

.hm-omr-text {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--SzaryTekst);
}

.hm-omr-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 30px;
}

.hm-omr-feature {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.hm-omr-feature-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background-color: var(--JasnyNiebieski);
    color: var(--CiemnyNiebieski);
}

.hm-omr-feature h3 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--Napisy);
    margin-bottom: 4px;
}

.hm-omr-feature p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--SzaryTekst);
}

.hm-omr-result {
    margin-top: 30px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--Ramka);
    background-color: var(--SidebarBG);
}

.hm-omr-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 700;
    color: var(--Napisy);
}

.hm-omr-result-note {
    margin-top: 11px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--SzaryTekst);
}

/* ============================================================
   BEZPIECZEŃSTWO
   ============================================================ */
.hm-trust { background-color: var(--Platonic); }

.hm-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    max-width: 1320px;
    margin: 0 auto;
}

.hm-trust-card { padding: 28px 24px; }

.hm-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background-color: var(--JasnyZielony);
    color: var(--CiemnyZielony);
    margin-bottom: 18px;
}

.hm-trust-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--Napisy);
    margin-bottom: 10px;
    line-height: 1.3;
}

.hm-trust-card p {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--SzaryTekst);
}

/* ============================================================
   CHARYTATYWNA
   ============================================================ */
.hm-charity { background-color: #FFFFFF; }

.hm-charity-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--Ramka);
    box-shadow: var(--shadow-crisp);
}

.hm-charity-left {
    padding: 52px 50px;
    background-color: #FFFFFF;
}

.hm-charity-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background-color: var(--JasnyCzerwony);
    color: var(--CiemnyCzerwony);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hm-charity-left h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--Napisy);
}

.hm-charity-left p {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--SzaryTekst);
}

.hm-charity-left p strong { color: var(--Napisy); }

.hm-charity-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 26px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--CzerwonyHover);
    text-decoration: none;
    transition: gap 0.25s ease;
}

.hm-charity-link:hover { gap: 13px; }

.hm-charity-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 52px 36px;
    background: linear-gradient(150deg, var(--Czerwony) 0%, #B91C1C 100%);
    color: #FFFFFF;
}

.hm-charity-heart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    margin-bottom: 22px;
    animation: hmHeartbeat 2.4s ease-in-out infinite;
}

@keyframes hmHeartbeat {
    0%, 100% { transform: scale(1); }
    12%      { transform: scale(1.08); }
    24%      { transform: scale(1); }
}

.hm-charity-partner {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.hm-charity-name {
    margin-top: 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

/* ============================================================
   NAJBLIŻSZY KONKURS
   ============================================================ */
.hm-next { background-color: var(--Platonic); padding-top: 40px; }

.hm-next-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 50px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--Niebieski) 0%, var(--Fioletowy) 100%);
    text-decoration: none;
    box-shadow: 0 18px 50px rgba(116, 113, 217, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hm-next-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(116, 113, 217, 0.45);
}

.hm-next-content h2 {
    margin-top: 16px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: #FFFFFF;
}

.hm-next-content p {
    margin-top: 13px;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.hm-next-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding: 12px 24px;
    border-radius: 10px;
    background-color: #FFFFFF;
    color: var(--CiemnyFioletowy1);
    font-size: 15.5px;
    font-weight: 700;
}

.hm-next-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 150px;
    height: 150px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    font-size: 14.5px;
    font-weight: 700;
    text-align: center;
}

/* ============================================================
   FAQ
   ============================================================ */
.hm-faq { background-color: #FFFFFF; }

.hm-faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hm-faq-item {
    border: 1px solid var(--Ramka);
    border-radius: 15px;
    background-color: #FFFFFF;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hm-faq-item.open {
    border-color: var(--Fioletowy);
    box-shadow: 0 6px 20px rgba(116, 113, 217, 0.12);
}

.hm-faq-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--Napisy);
}

.hm-faq-chev {
    flex-shrink: 0;
    color: var(--SzaryTekst);
    transition: transform 0.3s ease, color 0.3s ease;
}

.hm-faq-item.open .hm-faq-chev {
    transform: rotate(180deg);
    color: var(--FioletowyHover);
}

.hm-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.hm-faq-content p {
    padding: 0 24px 22px 24px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--SzaryTekst);
}

.hm-faq-content a {
    color: var(--FioletowyHover);
    font-weight: 600;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.hm-news { background-color: var(--Platonic); }

.hm-news-card {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 64px 8%;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--CiemnyFioletowy1) 0%, var(--Fioletowy) 60%, var(--Niebieski) 100%);
    overflow: hidden;
    text-align: center;
}

.hm-news-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    pointer-events: none;
}

.hm-news-deco-1 { width: 260px; height: 260px; top: -100px; left: -80px; }
.hm-news-deco-2 { width: 200px; height: 200px; bottom: -70px; right: -50px; }

.hm-news-content { position: relative; }

.hm-news-title {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    color: #FFFFFF;
}

.hm-news-desc {
    margin: 16px auto 0 auto;
    max-width: 560px;
    font-size: 16.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.hm-news-form {
    margin-top: 32px;
}

.hm-news-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.hm-news-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hm-news-row .email-input {
    width: min(380px, 100%);
    padding: 14px 20px;
    border-radius: 11px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    outline: none;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.hm-news-row .email-input::placeholder { color: rgba(255, 255, 255, 0.55); }

.hm-news-row .email-input:focus {
    border-color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.20);
}

.hm-news-row .submit-btn {
    padding: 14px 30px;
    border-radius: 11px;
    border: none;
    background-color: #FFFFFF;
    color: var(--CiemnyFioletowy1);
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hm-news-row .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hm-news-legal {
    margin-top: 26px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.hm-news-legal a {
    color: #FFFFFF;
    font-weight: 600;
}

/* ============================================================
   WYNIKI I STATYSTYKI
   ============================================================ */
.hm-results {
    position: relative;
    background-color: var(--Platonic);
    overflow: hidden;
}

/* ── Wykres-strzałka w tle na całą szerokość ── */
.hm-results-bg {
    position: absolute;
    inset: auto 0 0 0;
    height: 72%;
    pointer-events: none;
    z-index: 0;
}

.hm-results-bg-svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Poświata — szeroka rozmyta linia pod główną */
.hm-chart-shadow-line {
    opacity: 0.12;
    filter: blur(12px);
    stroke-dasharray: 1700;
    stroke-dashoffset: 1700;
}

.hm-chart-line {
    opacity: 0.30;
    stroke-dasharray: 1700;
    stroke-dashoffset: 1700;
}

.hm-chart-arrow {
    opacity: 0;
}

.hm-results-bg.start-animation .hm-chart-line,
.hm-results-bg.start-animation .hm-chart-shadow-line {
    animation: hmChartDraw 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.hm-results-bg.start-animation .hm-chart-arrow {
    animation: hmChartArrow 0.5s ease 2.2s forwards;
}

@keyframes hmChartDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes hmChartArrow {
    from { opacity: 0;    transform: translate(1372px, 68px) rotate(-19deg) scale(1.2); }
    to   { opacity: 0.45; transform: translate(1400px, 58px) rotate(-19deg) scale(2.2); }
}

/* ── Układ: lewa kolumna rozciąga się do wysokości okna ── */
.hm-results .pl-sec-head,
.hm-results-inner {
    position: relative;
    z-index: 1;
}

.hm-results-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    max-width: 1360px;
    margin: 0 auto;
    align-items: stretch;
}

.hm-results-left {
    display: flex;
    flex-direction: column;
}

.hm-results-toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hm-results-list {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Boxy z tekstem — karty rozciągnięte na wysokość okna podglądu */
.hm-results-point {
    flex: 1;
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1.5px solid var(--Ramka);
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(3px);
    box-shadow: 0 4px 16px rgba(23, 25, 64, 0.05);
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.hm-results-point:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-crisp);
}

.hm-results-point.highlight {
    border-color: var(--Fioletowy);
    background-color: #F5F3FF;
    box-shadow: 0 8px 24px rgba(116, 113, 217, 0.16);
}

.hm-results-point h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--Napisy);
    margin-bottom: 5px;
}

.hm-results-point p {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--SzaryTekst);
}

/* Okna z widokami */
.hm-results-right {
    position: relative;
    display: flex;
    flex-direction: column;
}

.hm-results-window { display: none; }

.hm-results-window.active {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hm-results-window.active .hm-results-body {
    flex: 1;
}

.hm-results-window.active {
    animation: hmResFade 0.35s ease;
}

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

.hm-results-body { padding: 22px; }

.hm-res-subhead {
    margin: 20px 0 12px 0;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--SzaryTekst);
}

/* Widok ucznia — kafelki podsumowania */
.hm-res-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11px;
}

.hm-res-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 15px 8px;
    border-radius: 13px;
    background-color: #F5F3FF;
    border: 1px solid var(--ContestFioletJasny);
    text-align: center;
}

.hm-res-tile-num {
    font-size: 21px;
    font-weight: 800;
    color: var(--Napisy);
    line-height: 1;
}

.hm-res-tile-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--SzaryTekst);
}

.hm-res-good { color: var(--ZielonyHover) !important; }
.hm-res-mid  { color: var(--PomaranczyHover) !important; }
.hm-res-bad  { color: var(--CzerwonyHover) !important; }

/* Wiersze kategorii */
.hm-res-cats {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hm-res-cat {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--Ramka);
    background-color: #FFFFFF;
}

.hm-res-cat-num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    font-size: 12.5px;
    font-weight: 800;
}

.hm-cat-green  { background-color: var(--JasnyZielony);      color: var(--CiemnyZielony); }
.hm-cat-orange { background-color: var(--JasnyPomaranczowy); color: var(--CiemnyPomaranczowy); }
.hm-cat-red    { background-color: var(--JasnyCzerwony);     color: var(--CiemnyCzerwony); }

.hm-res-cat-name {
    flex: 1;
    min-width: 0;
}

.hm-res-cat-name p {
    font-size: 14px;
    font-weight: 700;
    color: var(--Napisy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-res-cat-name span {
    font-size: 12px;
    color: var(--SzaryTekst);
}

.hm-res-cat-pct {
    font-size: 14.5px;
    font-weight: 800;
    white-space: nowrap;
}

.hm-res-pp {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.hm-pp-up   { background-color: var(--JasnyZielony);  color: var(--CiemnyZielony); }
.hm-pp-down { background-color: var(--JasnyCzerwony); color: var(--CiemnyCzerwony); }

/* Percentyl */
.hm-res-percentile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 13px;
    border: 1px solid var(--Ramka);
    background-color: var(--SidebarBG);
}

.hm-res-percentile-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--Napisy);
}

.hm-res-percentile-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--SzaryTekst);
}

.hm-res-percentile-badge {
    padding: 8px 18px;
    border-radius: 11px;
    background-color: var(--ContestFioletJasny);
    color: var(--ContestFioletCiemny);
    font-size: 17px;
    font-weight: 800;
}

/* Widok nauczyciela */
.hm-res-teach-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hm-res-teach-card {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
}

.hm-rt-violet { background-color: #F5F3FF;  border-color: var(--ContestFioletJasny2); }
.hm-rt-orange { background-color: #FFFBEB;  border-color: var(--ContestPomaranczJasny2); }

.hm-res-teach-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--SzaryTekst);
}

.hm-res-teach-num {
    margin-top: 7px;
    font-size: 24px;
    font-weight: 800;
    color: var(--Napisy);
}

.hm-res-teach-num span {
    font-size: 14px;
    font-weight: 600;
    color: var(--SzaryTekst);
}

.hm-res-teach-diff {
    display: inline-block;
    margin-left: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background-color: var(--JasnyZielony);
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Heatmapa pytań */
.hm-res-heatmap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.hm-heat {
    padding: 10px 4px;
    border-radius: 11px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.5;
    border: 1px solid transparent;
}

.hm-heat-good { background-color: var(--JasnyZielony);      color: var(--CiemnyZielony);      border-color: var(--ContestZielonyJasny2); }
.hm-heat-mid  { background-color: var(--JasnyPomaranczowy); color: var(--CiemnyPomaranczowy); border-color: var(--ContestPomaranczJasny2); }
.hm-heat-bad  { background-color: var(--JasnyCzerwony);     color: var(--CiemnyCzerwony);     border-color: #FECACA; }

.hm-heat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 11px;
}

.hm-heat-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--SzaryTekst);
}

.hm-heat-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 4px;
}

.hm-heat-dot-good { background-color: var(--JasnyZielony);      border: 1px solid var(--ContestZielonyJasny2); }
.hm-heat-dot-mid  { background-color: var(--JasnyPomaranczowy); border: 1px solid var(--ContestPomaranczJasny2); }
.hm-heat-dot-bad  { background-color: var(--JasnyCzerwony);     border: 1px solid #FECACA; }

/* Wgląd w ucznia */
.hm-res-drill {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: 12px;
    background-color: var(--JasnyNiebieski);
    border: 1px solid var(--ContestNiebieskiJasny2);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--CiemnyNiebieski);
    line-height: 1.5;
}

.hm-res-drill svg { flex-shrink: 0; }
.hm-res-drill .pl-code { padding: 3px 8px; font-size: 12px; }

/* Link z OMR do wyników */
.hm-omr-result-link {
    color: var(--FioletowyHover);
    font-weight: 700;
    text-decoration: none;
}

.hm-omr-result-link:hover { text-decoration: underline; }

/* ============================================================
   REDUKCJA RUCHU
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hm-hero-window,
    .hm-charity-heart,
    .math-bg span {
        animation: none;
    }
    .hm-chart-line,
    .hm-chart-shadow-line {
        stroke-dashoffset: 0;
        animation: none !important;
    }
    .hm-chart-arrow {
        opacity: 0.45;
        animation: none !important;
    }
    .hm-results-window.active { animation: none; }
    .hm-hero-window { transform: none; }
    .hm-omr-card { transform: none; }
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 1200px) {
    .hm-hero-inner {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .hm-hero-left { text-align: center; }
    .hm-hero-badges, .hm-hero-btns, .hm-hero-note { justify-content: center; }
    .hm-hero-sub { margin-left: auto; margin-right: auto; }
    .hm-hero-window { max-width: 640px; margin: 0 auto; }

    .hm-contests-grid { grid-template-columns: 1fr 1fr; }
    .hm-contest-soon { grid-column: 1 / -1; }

    .hm-trust-grid { grid-template-columns: 1fr 1fr; }

    .hm-journey-grid { flex-wrap: wrap; gap: 20px; }
    .hm-journey-step { flex: 1 1 calc(50% - 20px); min-width: 260px; }
    .hm-journey-line { display: none; }

    .hm-panel-inner,
    .hm-omr-inner,
    .hm-results-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 46px;
    }

    .hm-results-list { gap: 14px; }
    .hm-results-point { flex: 0 1 auto; }
    .hm-results-bg { height: 45%; opacity: 0.7; }
}

@media (max-width: 768px) {
    .pl-section { padding: 60px 5%; }

    .hm-hero { padding: 140px 5% 60px 5%; }

    /* Makieta panelu w hero na telefonie — zbyt długa z filtrem i tabelą,
       zostawiamy tylko dwa kafelki statystyk */
    .hm-hero-filter,
    .hm-hero-table-wrap {
        display: none;
    }

    .hm-hero-stats-mini { margin-bottom: 0; }

    .hm-numbers-inner { grid-template-columns: 1fr 1fr; gap: 26px 0; }
    .hm-number:nth-child(3) { border-left: none; }

    .hm-contests-grid { grid-template-columns: 1fr; }
    .hm-journey-step { flex: 1 1 100%; }
    .hm-trust-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }

    .hm-charity-card { grid-template-columns: 1fr; }
    .hm-charity-left { padding: 38px 28px; }
    .hm-charity-right { padding: 38px 28px; }

    .hm-next-card {
        grid-template-columns: 1fr;
        padding: 34px 28px;
        gap: 26px;
    }
    .hm-next-date { width: 100%; height: auto; padding: 18px; flex-direction: row; }

    .hm-omr-features { grid-template-columns: 1fr; }

    .hm-res-heatmap { grid-template-columns: repeat(5, 1fr); }
    .hm-res-summary { grid-template-columns: repeat(2, 1fr); }
    .hm-res-teach-summary { grid-template-columns: 1fr; }
}


@media (max-width: 5600px) {
    .hm-hero-note {
        display: none;
    }
}

@media (max-width: 560px) {
    /* Kafelki statystyk w panelu nauczyciela — 2 kolumny są za ciasne
       dla ikony 46px + dłuższego tekstu na małym telefonie */
    .hm-panel-stats { grid-template-columns: 1fr; }

    /* Makieta tabeli w hero — zamiast poziomego przewijania,
       każdy wiersz staje się czytelną „kartą" z etykietami */
    .hm-hero-table-wrap { overflow-x: visible; }

    .hm-hero-table,
    .hm-hero-table tbody,
    .hm-hero-table tr,
    .hm-hero-table td {
        display: block;
        width: 100%;
    }

    .hm-hero-table thead { display: none; }

    .hm-hero-table tr {
        padding: 12px 4px;
        border-bottom: 1px solid var(--Ramka);
    }

    .hm-hero-table tr:last-child { border-bottom: none; }

    .hm-hero-table td {
        display: block;
        padding: 5px 0;
        border-bottom: none;
        white-space: normal;
        text-align: left;
    }

    /* Etykieta nad wartością — bezpieczne dla komórek z kilkoma
       elementami potomnymi (np. kropka + imię + span), w przeciwieństwie
       do flex + space-between, które rozjechałoby je osobno */
    .hm-hero-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: var(--SzaryTekst);
    }

    .hm-hero-badges {
        display: none;
    }
}

@media (max-width: 480px) {
    .hm-numbers-inner { grid-template-columns: 1fr 1fr; }
    .hm-number { padding: 6px 6px; }
    .hm-number-label { font-size: 12.5px; }

    .hm-hero-stats-mini { grid-template-columns: 1fr; }

    .hm-news-card { padding: 46px 6%; border-radius: 20px; }
    .hm-news-row .submit-btn { width: 100%; }
}