/* ========================================
   AKČNÍ PLÁN PEDIA.DOG — BEM
   Styl v souznění s fialovou brand paletou
   ======================================== */

.plan {
    background: linear-gradient(180deg, #faf5ff 0%, #f8fafc 50%, #ffffff 100%);
    padding: 24px 0 80px;
    min-height: calc(100vh - 80px);
}

.plan__container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

/* HERO */
.plan__hero {
    text-align: center;
    padding: 32px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
}

.plan__eyebrow {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.plan__title {
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.plan__lead {
    font-size: 16px;
    color: #475569;
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

/* CELKOVÝ PROGRESS */
.plan__overall {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 22px;
    max-width: 620px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
}

.plan__overall-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.plan__overall-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan__overall-percent {
    font-size: 32px;
    font-weight: 800;
    color: #7c3aed;
    line-height: 1;
}

.plan__overall-bar {
    width: 100%;
    height: 10px;
    background: #ede9fe;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.plan__overall-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.plan__overall-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}

.plan__reset {
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.plan__reset:hover {
    color: #dc2626;
}

/* NAVIGACE */
.plan__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 28px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.plan__nav a {
    display: inline-block;
    padding: 8px 14px;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.plan__nav a:hover {
    background: #ede9fe;
    color: #7c3aed;
    border-color: #ddd6fe;
}

/* FÁZE — akordeon (native <details>) */
.plan__phase {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.plan__phase[open] {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
    border-color: #ddd6fe;
}

.plan__phase--complete {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.plan__phase-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.plan__phase-head::-webkit-details-marker {
    display: none;
}

.plan__phase-head:hover {
    background: #fafbff;
}

.plan__phase-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.plan__phase--1 .plan__phase-num { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.plan__phase--2 .plan__phase-num { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.plan__phase--3 .plan__phase-num { background: linear-gradient(135deg, #c084fc, #9333ea); }
.plan__phase--4 .plan__phase-num { background: linear-gradient(135deg, #e879f9, #c026d3); }
.plan__phase--5 .plan__phase-num { background: linear-gradient(135deg, #f472b6, #be185d); }
.plan__phase--6 .plan__phase-num { background: linear-gradient(135deg, #fb7185, #be123c); }

.plan__phase--complete .plan__phase-num {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.plan__phase--complete .plan__phase-num::before {
    content: "✓";
    font-size: 24px;
}

.plan__phase--complete .plan__phase-num-text {
    display: none;
}

.plan__phase-title-wrap {
    flex: 1;
    min-width: 0;
}

.plan__phase-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.plan__phase-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.plan__phase-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.plan__phase-progress [data-phase-percent] {
    font-size: 16px;
    font-weight: 700;
    color: #7c3aed;
    min-width: 50px;
    text-align: right;
}

.plan__phase--complete .plan__phase-progress [data-phase-percent] {
    color: #16a34a;
}

.plan__phase-chevron {
    color: #94a3b8;
    font-size: 18px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.plan__phase[open] .plan__phase-chevron {
    transform: rotate(180deg);
}

.plan__phase-body {
    padding: 8px 22px 24px;
    border-top: 1px solid #f1f5f9;
}

/* BLOCK — skupina úkolů v rámci fáze */
.plan__block {
    background: #fafbff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 16px;
}

.plan__block--tests {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.plan__block-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.plan__block-note {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.5;
}

.plan__block-note a {
    color: #7c3aed;
    font-weight: 600;
}

/* TASKS — jednotlivé úkoly */
.plan__tasks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.plan__task {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2f7;
    transition: opacity 0.2s ease;
}

.plan__task:last-child {
    border-bottom: 0;
}

.plan__task label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    font-size: 14px;
    color: #0f172a;
}

.plan__task input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: #7c3aed;
    cursor: pointer;
}

.plan__task--done label span {
    text-decoration: line-through;
    color: #94a3b8;
}

.plan__task--done {
    opacity: 0.65;
}

.plan__task-link {
    flex-shrink: 0;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    padding: 2px 10px;
    border-radius: 6px;
    background: #ede9fe;
    align-self: center;
    transition: all 0.2s ease;
}

.plan__task-link:hover {
    background: #7c3aed;
    color: #fff;
}

/* POZOR SEKCE */
.plan__pozor {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    border: 2px solid #fde68a;
    border-radius: 14px;
    padding: 28px 24px;
    margin-top: 32px;
}

.plan__pozor-title {
    font-size: 22px;
    font-weight: 800;
    color: #78350f;
    margin: 0 0 8px;
}

.plan__pozor-lead {
    font-size: 14px;
    color: #92400e;
    margin: 0 0 22px;
    line-height: 1.6;
}

.plan__pozor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.plan__pozor-card {
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 18px;
}

.plan__pozor-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

/* RESPONZIVITA */
@media (max-width: 640px) {
    .plan__title {
        font-size: 26px;
    }

    .plan__phase-head {
        padding: 16px;
        gap: 12px;
    }

    .plan__phase-num {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .plan__phase-title {
        font-size: 16px;
    }

    .plan__phase-subtitle {
        font-size: 12px;
    }

    .plan__phase-progress [data-phase-percent] {
        font-size: 14px;
        min-width: 42px;
    }

    .plan__phase-body {
        padding: 4px 14px 18px;
    }

    .plan__block {
        padding: 14px;
    }

    .plan__task {
        flex-wrap: wrap;
    }

    .plan__task-link {
        margin-left: 30px;
        font-size: 11px;
    }

    .plan__overall-percent {
        font-size: 26px;
    }

    .plan__nav {
        justify-content: flex-start;
    }

    .plan__nav a {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ========================================
   EXPANDABLE ÚKOL — rozbalovací rozsah
   "Co v MVP ANO / Co odložit" přímo v checklist řádku
   ======================================== */

/* Expandable úkol používá column layout, aby rozbalené tělo
   bylo pod řádkem checkbox + link + tlačítko Rozsah. */
.plan__task--expandable {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.plan__task-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.plan__task-row label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    font-size: 14px;
    color: #0f172a;
}

.plan__task-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    align-self: center;
    transition: all 0.2s ease;
}

.plan__task-toggle:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.plan__task-toggle-chevron {
    font-size: 11px;
    transition: transform 0.2s ease;
    line-height: 1;
}

.plan__task-toggle[aria-expanded="true"] .plan__task-toggle-chevron {
    transform: rotate(180deg);
}

/* Rozbalené tělo — hidden attribute zajistí defaultní display:none.
   Když je odhalené, nastavujeme block (proto pravidlo s [hidden] níže). */
.plan__task-expanded {
    display: block;
    margin-top: 12px;
    padding: 14px 16px 16px;
    background: #fafbff;
    border: 1px solid #ede9fe;
    border-radius: 10px;
}

.plan__task-expanded[hidden] {
    display: none;
}

.plan__task--open {
    background: #fcfaff;
    border-radius: 8px;
    padding: 6px 8px;
    margin: 6px -8px;
}

.plan__task-intro {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 14px;
}

.plan__task-h {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 14px 0 8px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.plan__task-h--section {
    font-size: 14px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px dashed #ddd6fe;
}

.plan__task-h--section:first-of-type {
    margin-top: 6px;
    padding-top: 0;
    border-top: 0;
}

.plan__task-state {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.plan__task-state--yes {
    background: #dcfce7;
    color: #166534;
}

.plan__task-state--narrow {
    background: #fef3c7;
    color: #92400e;
}

.plan__task-state--later {
    background: #e5e7eb;
    color: #475569;
}

.plan__task-subnote {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 10px;
    font-style: italic;
}

.plan__task-mini-h {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin: 12px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.plan__task-scope {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.plan__task-scope li {
    font-size: 13px;
    line-height: 1.55;
    padding: 7px 12px 7px 30px;
    position: relative;
    color: #0f172a;
    border-bottom: 0;
}

.plan__task-scope li::before {
    position: absolute;
    left: 10px;
    top: 7px;
    font-size: 12px;
}

.plan__task-scope--yes {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.plan__task-scope--yes li::before {
    content: "✓";
    color: #16a34a;
    font-weight: 700;
}

/* Checkable verze — místo ✓ ikony máme reálný checkbox v labelu.
   Třída se přidává na <ul> a vyřazuje ::before pseudoselector. */
.plan__task-scope--checkable li {
    padding-left: 12px;
}

.plan__task-scope--checkable li::before {
    content: none;
}

.plan__task-scope--checkable label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
    line-height: 1.55;
}

.plan__task-scope--checkable input[type="checkbox"] {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: #16a34a;
    cursor: pointer;
}

.plan__task-scope--checkable li.plan__task-scope-item--done {
    opacity: 0.6;
}

.plan__task-scope--checkable li.plan__task-scope-item--done label span {
    text-decoration: line-through;
    color: #65a380;
}

.plan__task-scope--narrow {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.plan__task-scope--narrow li::before {
    content: "⚠";
    color: #b45309;
}

.plan__task-scope--later {
    background: #f8fafc;
    border-left: 3px solid #94a3b8;
}

.plan__task-scope--later li::before {
    content: "⏳";
    font-size: 11px;
    top: 8px;
}

.plan__task-scope li + li {
    border-top: 1px solid rgba(15, 23, 42, 0.04);
}

.plan__task-scope code {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Mobil — menší rozestupy, tlačítko Rozsah pod řádek */
@media (max-width: 768px) {
    .plan__task-row {
        flex-wrap: wrap;
    }

    .plan__task-row label {
        flex: 1 1 calc(100% - 80px);
    }

    .plan__task-toggle {
        font-size: 11px;
        padding: 2px 7px;
    }

    .plan__task-expanded {
        padding: 12px 12px 14px;
    }

    .plan__task-h {
        font-size: 12.5px;
    }

    .plan__task-h--section {
        font-size: 13px;
    }

    .plan__task-state {
        font-size: 9.5px;
        padding: 2px 7px;
    }

    .plan__task-scope li {
        font-size: 12.5px;
        padding-left: 28px;
    }
}

/* ========================================
   ČÍSLOVANÝ SEZNAM KROKŮ MVP (plan__step)
   Mobile-first
   ======================================== */
.plan__steps {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.plan__step {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: opacity 0.2s ease;
}

.plan__step-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.plan__step-head label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
}

.plan__step-head input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: #7c3aed;
    cursor: pointer;
}

.plan__step-body {
    margin-left: 30px;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}

.plan__step-body p {
    margin: 4px 0;
}

.plan__step-body strong {
    color: #0f172a;
}

.plan__step--done {
    opacity: 0.55;
}

.plan__step--done .plan__step-head label {
    text-decoration: line-through;
    color: #94a3b8;
}

.plan__step-group {
    margin: 26px 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ede9fe;
}

.plan__step-group:first-of-type {
    margin-top: 12px;
}

@media (min-width: 768px) {
    .plan__step {
        padding: 14px 18px;
    }
    .plan__step-head label {
        font-size: 15px;
    }
    .plan__step-body {
        font-size: 13.5px;
    }
    .plan__step-group {
        font-size: 12px;
    }
}

/* ========================================
   BADGE "Chybí stránka!" a "Interní úkol"
   ======================================== */
.plan__task-missing {
    flex-shrink: 0;
    color: #b91c1c;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    padding: 3px 9px;
    border-radius: 6px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    align-self: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.plan__task-internal {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    align-self: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
