/* Chytrá Autozástava — public roadmap page.
   Minimalist. White background. Brand green (#24C45F) as the only strong
   accent (progress bar + done indicators). */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #ffffff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* On wide screens, switch .page to a 2-column grid:
   - column 1: the main content (max 1000px)
   - column 2: a 220px side rail for the beta callout
   The grid + max-width grow together so callouts genuinely sit in the
   dead space to the right, not crammed into the main column. */
@media (min-width: 1240px) {
    .page {
        max-width: 1280px;
        display: grid;
        grid-template-columns: minmax(0, 1000px) 220px;
        column-gap: 2.5rem;
    }
    .page > *:not(.beta-callout) {
        grid-column: 1;
    }
    .beta-callout {
        grid-column: 2;
        /* Align with the Probíhá phase-group (5th row in the grid:
           masthead, progress, sticky-timeline, Hotovo group, Probíhá group). */
        grid-row: 5;
        align-self: start;
        margin-top: 4rem;
        position: relative;
    }
}

/* ── Masthead ─────────────────────────────────────────────────── */

.masthead {
    margin-bottom: 3rem;
    text-align: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.masthead .logo {
    height: 7rem;
    width: auto;
    margin: 0 auto 2rem;
    display: block;
}

.masthead h1 {
    margin: 0 0 0.75rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.015em;
}

.masthead .subtitle {
    margin: 0 auto 1rem;
    max-width: 38rem;
    color: #6b7280;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.last-updated {
    margin: 0;
    color: #9ca3af;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.last-updated strong {
    color: #6b7280;
    font-weight: 600;
}

/* ── Progress block ───────────────────────────────────────────── */

.progress {
    margin-bottom: 1.25rem;
    padding: 1.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
}

.progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-counter {
    font-size: 0.875rem;
    color: #374151;
}

.progress-counter strong {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 700;
}

.progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.progress-bar-fill {
    height: 100%;
    background: #24C45F;
    border-radius: 9999px;
    transition: width 600ms cubic-bezier(.22, .8, .3, 1);
    animation: bar-fill-in 800ms cubic-bezier(.22, .8, .3, 1);
}

@keyframes bar-fill-in {
    from { width: 0; }
}

.progress-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid;
}

.pill-done {
    color: #14532d;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.pill-progress {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

.pill-planned {
    color: #374151;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.pill-backlog {
    color: #6b7280;
    background: #ffffff;
    border-color: #d1d5db;
    border-style: dashed;
}

/* ── Sticky timeline strip ────────────────────────────────────── */

.sticky-timeline {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -1.5rem 3rem;
    padding: 1.5rem 1.5rem 0.75rem;   /* extra top padding for current marker */
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid #e5e7eb;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(25, 1fr);
    gap: 3px;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 700;
    transition: transform 120ms ease, opacity 120ms ease;
    border: 1px solid transparent;
    position: relative;
}

.timeline-cell:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.timeline-num {
    line-height: 1;
}

.timeline-done {
    background: #24C45F;
    color: #ffffff;
}

.timeline-progress {
    background: #f59e0b;
    color: #ffffff;
}

.timeline-planned {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.timeline-backlog {
    background: #ffffff;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
}

/* Current-stage marker — arrow + "Zde jsme" label above the in-progress cell */
.timeline-current::before {
    content: '▼';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    color: #f59e0b;
    font-size: 0.6875rem;
    line-height: 1;
    pointer-events: none;
}

.timeline-current::after {
    content: 'Zde jsme';
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #f59e0b;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none;
}

/* ── Phase groups ─────────────────────────────────────────────── */

.phase-group {
    margin-bottom: 3rem;
    scroll-margin-top: 6rem;
}

.phase-group:last-of-type {
    margin-bottom: 4rem;
}

.group-heading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0 0 1.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.005em;
}

.group-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 700;
    flex-shrink: 0;
}

.group-marker-done {
    background: #24C45F;
    color: #ffffff;
}

.group-marker-progress {
    background: #f59e0b;
    color: #ffffff;
}

.group-marker-planned {
    background: #e5e7eb;
    color: #6b7280;
}

.group-marker-backlog {
    background: #ffffff;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
}

.group-intro {
    margin: -0.5rem 0 1.5rem;
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.group-intro strong {
    color: #111827;
    font-weight: 600;
}

/* ── Phase cards ──────────────────────────────────────────────── */

.phase {
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 200ms ease;
    scroll-margin-top: 6rem;
}

.phase:hover {
    border-color: #d1d5db;
}

.phase-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.phase-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.phase-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    flex: 1 1 auto;
}

.phase-status {
    font-size: 0.8125rem;
    color: #6b7280;
    flex-shrink: 0;
}

/* Meta row: difficulty */
.phase-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
    background: #fafafa;
}

.meta-difficulty-low    { color: #14532d; background: #f0fdf4; border-color: #bbf7d0; }
.meta-difficulty-medium { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }
.meta-difficulty-high   { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.meta-difficulty-xhigh  { color: #991b1b; background: #fef2f2; border-color: #fecaca; }

/* Business value callout */
.phase-why {
    margin: 0 0 1rem;
    padding: 0.875rem 1rem;
    background: #f9fafb;
    border-left: 3px solid #24C45F;
    border-radius: 4px;
    color: #374151;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.phase-progress .phase-why { border-left-color: #f59e0b; }
.phase-planned  .phase-why { border-left-color: #d1d5db; }
.phase-backlog  .phase-why { border-left-color: #d1d5db; border-left-style: dashed; }

.phase-why strong {
    color: #111827;
    font-weight: 600;
}

.phase-why code {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.875em;
    font-family: ui-monospace, "SF Mono", Monaco, Menlo, Consolas, monospace;
    color: #374151;
}

.phase-bullets {
    margin: 0;
    padding-left: 1.25rem;
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.phase-bullets li {
    margin-bottom: 0.5rem;
}

.phase-bullets li:last-child {
    margin-bottom: 0;
}

.phase-bullets code {
    background: #f3f4f6;
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.875em;
    font-family: ui-monospace, "SF Mono", Monaco, Menlo, Consolas, monospace;
    color: #374151;
}

.phase-bullets em {
    font-style: italic;
    color: #374151;
}

.phase-bullets strong {
    color: #111827;
    font-weight: 600;
}

/* Left-edge accent — visually links a card to its status group */
.phase-done     { border-left: 3px solid #24C45F; }
.phase-progress { border-left: 3px solid #f59e0b; }
.phase-planned  { border-left: 3px solid #e5e7eb; }
.phase-backlog {
    border-left: 3px dashed #d1d5db;
    background: #fafafa;
}

.phase-backlog .phase-title {
    color: #1f2937;
}

.phase-backlog .phase-status {
    color: #9ca3af;
    font-style: italic;
}

/* ── Collapsible done cards ──────────────────────────────────── */

.phase.collapsible {
    padding: 0;
    overflow: hidden;
}

.phase.collapsible details {
    background: transparent;
}

.phase.collapsible summary {
    display: block;
    position: relative;
    padding: 1.5rem 3rem 1.5rem 1.75rem;   /* extra right padding for chevron */
    cursor: pointer;
    list-style: none;
    transition: background 150ms ease;
}

.phase.collapsible summary::-webkit-details-marker {
    display: none;
}

.phase.collapsible summary:hover {
    background: #fafafa;
}

.phase.collapsible summary .phase-head,
.phase.collapsible summary .phase-meta {
    margin-bottom: 0.5rem;
}

.phase.collapsible summary .phase-meta {
    margin-bottom: 0;
}

.expand-chevron {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    width: 0.625rem;
    height: 0.625rem;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 200ms ease;
}

.phase.collapsible details[open] .expand-chevron {
    transform: translateY(-25%) rotate(225deg);
}

.phase.collapsible details > *:not(summary) {
    padding: 0 1.75rem 1.5rem;
}

.phase.collapsible details > ul.phase-bullets {
    padding: 0 1.75rem 1.5rem 3rem;   /* indent bullets without losing right padding */
}

.phase.collapsible details > p.phase-why {
    margin-left: 1.75rem;
    margin-right: 1.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ── Beta-launch callout ──────────────────────────────────────── */
/* Default (narrow screens): inline below the Probíhá section.
   Wide screens (≥1240px): placed in the right-rail grid column via
   the .page grid layout above. */

.beta-callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: 1px dashed #3b82f6;
    background: #eff6ff;
    border-radius: 8px;
    position: relative;
}

.beta-callout h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e3a8a;
}

.beta-callout p {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
}

.beta-callout code {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    padding: 0.05em 0.3em;
    font-size: 0.875em;
    font-family: ui-monospace, "SF Mono", Monaco, Menlo, Consolas, monospace;
    color: #1e3a8a;
}

.beta-callout strong {
    color: #111827;
    font-weight: 600;
}

.beta-callout-arrow {
    display: none;   /* hidden inline; only shown when callout sits in the side rail */
}

@media (min-width: 1240px) {
    .beta-callout-arrow {
        display: block;
        position: absolute;
        left: -2rem;
        top: 0.875rem;
        font-size: 1.5rem;
        line-height: 1;
        color: #3b82f6;
        font-weight: 700;
    }
}

/* ── Tail note after F25 ──────────────────────────────────────── */

.ideas-tail {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: #fafafa;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────────────── */

.page-footer {
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #ffffff;
    transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.back-to-top:hover {
    color: #111827;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.back-to-top .back-arrow {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform 150ms ease;
}

.back-to-top:hover .back-arrow {
    transform: translateY(-2px);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 900px) {
    .timeline {
        grid-template-columns: repeat(13, 1fr);
    }
    .timeline-cell {
        height: 30px;
        font-size: 0.6875rem;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 2.5rem 1.25rem 4rem;
    }

    .masthead {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    .masthead .logo {
        height: 5rem;
        margin-bottom: 1.5rem;
    }

    .masthead h1 {
        font-size: 1.75rem;
    }

    .masthead .subtitle {
        font-size: 1rem;
    }

    .progress {
        padding: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .progress-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .sticky-timeline {
        margin: 0 -1.25rem 2rem;
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .timeline {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }

    .timeline-cell {
        height: 28px;
        font-size: 0.625rem;
    }

    .phase {
        padding: 1.25rem 1.25rem;
    }

    .phase.collapsible summary {
        padding: 1.25rem 2.75rem 1.25rem 1.25rem;
    }

    .phase.collapsible details > *:not(summary) {
        padding: 0 1.25rem 1.25rem;
    }

    .phase.collapsible details > ul.phase-bullets {
        padding: 0 1.25rem 1.25rem 2.5rem;
    }

    .phase.collapsible details > p.phase-why {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }

    .phase-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar-fill,
    .timeline-cell,
    .expand-chevron {
        animation: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}
