/* ========================================
   DATABÁZOVÉ SCHÉMA PEDIA.DOG — BEM
   Mobile-first, fialová brand paleta
   ======================================== */

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

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

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

.schema__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;
}

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

.schema__lead {
    font-size: 15px;
    color: #475569;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ČÍSELNÉ SHRNUTÍ */
.schema__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.schema__summary-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    text-align: center;
    min-width: 130px;
    box-shadow: 0 1px 6px rgba(124, 58, 237, 0.05);
}

.schema__summary-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #7c3aed;
    line-height: 1;
    margin-bottom: 4px;
}

.schema__summary-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* LAICKÉ VYSVĚTLENÍ */
.schema__intro {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 1px 6px rgba(124, 58, 237, 0.04);
}

.schema__intro p {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    margin: 0 0 12px;
}

.schema__intro p:last-child {
    margin-bottom: 0;
}

.schema__intro code {
    background: #ede9fe;
    color: #5b21b6;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.schema__warn {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 12px 14px;
    border-radius: 6px;
    margin-top: 16px !important;
}

/* H2 */
.schema__h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px;
}

/* NAVIGACE */
.schema__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    position: sticky;
    top: 10px;
    z-index: 10;
}

.schema__nav a {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.schema__nav a:hover {
    background: #7c3aed;
    color: #fff;
}

/* SKUPINA */
.schema__group {
    margin-bottom: 36px;
}

.schema__group-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ede9fe;
    display: flex;
    align-items: center;
    gap: 12px;
}

.schema__group-count {
    font-size: 11px;
    font-weight: 600;
    background: #ede9fe;
    color: #7c3aed;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.schema__group-note {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
    font-style: italic;
}

/* TABULKA */
.schema__table {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.schema__table-name {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    color: #5b21b6;
    margin: 0 0 6px;
    padding: 3px 9px;
    background: #ede9fe;
    border-radius: 6px;
    display: inline-block;
}

.schema__table-desc {
    font-size: 13.5px;
    color: #475569;
    margin: 0 0 12px;
    line-height: 1.55;
}

.schema__table-desc:last-child {
    margin-bottom: 0;
}

.schema__table-desc code {
    background: #f1f5f9;
    color: #5b21b6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* SLOUPCE TABULKY */
.schema__cols {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}

.schema__cols thead th {
    text-align: left;
    padding: 8px 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid #e5e7eb;
}

.schema__cols tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #334155;
    line-height: 1.45;
}

.schema__cols tbody tr:last-child td {
    border-bottom: 0;
}

.schema__cols code {
    background: #f1f5f9;
    color: #5b21b6;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.schema__cols td:first-child {
    white-space: nowrap;
    font-weight: 600;
}

.schema__cols td:nth-child(2) {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

/* VZTAHY */
.schema__relations {
    margin: 36px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.schema__relations p {
    font-size: 13.5px;
    color: #475569;
    margin: 0 0 14px;
}

.schema__diagram {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.55;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    margin: 0;
}

/* POZNÁMKY */
.schema__notes {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 28px 0;
}

.schema__notes-list {
    margin: 0;
    padding-left: 18px;
}

.schema__notes-list li {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 8px;
}

.schema__notes-list code {
    background: #ede9fe;
    color: #5b21b6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12.5px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* CO ZATÍM CHYBÍ */
.schema__later {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 12px;
    padding: 20px;
    margin-top: 28px;
}

.schema__later ul {
    margin: 0;
    padding-left: 18px;
}

.schema__later li {
    font-size: 13.5px;
    color: #713f12;
    line-height: 1.7;
}

.schema__later code,
.schema__later strong {
    background: #fef3c7;
    padding: 1px 6px;
    border-radius: 4px;
    color: #92400e;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 0.92em;
}

/* ========================================
   DESKTOP — od 768px
   ======================================== */
@media (min-width: 768px) {
    .schema {
        padding: 32px 0 100px;
    }

    .schema__title {
        font-size: 34px;
    }

    .schema__lead {
        font-size: 16px;
    }

    .schema__summary-item {
        min-width: 160px;
        padding: 16px 22px;
    }

    .schema__summary-num {
        font-size: 32px;
    }

    .schema__intro {
        padding: 28px;
    }

    .schema__intro p {
        font-size: 15px;
    }

    .schema__h2 {
        font-size: 22px;
    }

    .schema__group-title {
        font-size: 22px;
    }

    .schema__table {
        padding: 20px 22px;
    }

    .schema__table-name {
        font-size: 17px;
    }

    .schema__table-desc {
        font-size: 14px;
    }

    .schema__cols {
        font-size: 13.5px;
    }

    .schema__diagram {
        font-size: 13px;
        padding: 22px;
    }

    .schema__notes-list li,
    .schema__later li {
        font-size: 14px;
    }
}
