/* Bento-сетка 3×2 для важных статей (референс token grid) */

body.case-study.journal .journal-bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 0 0 48px 0;
    padding: 0;
}

body.case-study.journal .journal-bento-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    padding: 28px 28px 24px;
    border-radius: 28px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

body.case-study.journal .journal-bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] body.case-study.journal .journal-bento-card:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

body.case-study.journal .journal-bento-card--lavender {
    background: #e4e9f7;
    color: #111;
}

body.case-study.journal .journal-bento-card--surface {
    background: #ffffff;
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.case-study.journal .journal-bento-card--dark {
    background: #111111;
    color: #f5f5f5;
}

body.case-study.journal .journal-bento-card--slate {
    background: #4a5568;
    color: #f5f5f5;
}

[data-theme="dark"] body.case-study.journal .journal-bento-card--lavender {
    background: #2d3548;
    color: #f0f0f0;
}

[data-theme="dark"] body.case-study.journal .journal-bento-card--surface {
    background: #1a1a1a;
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] body.case-study.journal .journal-bento-card--dark {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] body.case-study.journal .journal-bento-card--slate {
    background: #3d4654;
}

body.case-study.journal .journal-bento-body {
    flex: 1 1 auto;
    min-width: 0;
}

body.case-study.journal .journal-bento-title {
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: clamp(18px, 2vw, 22px) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    color: inherit !important;
}

body.case-study.journal .journal-bento-deck {
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.72;
    color: inherit !important;
    max-width: 36ch;
}

body.case-study.journal .journal-bento-card--dark .journal-bento-deck,
body.case-study.journal .journal-bento-card--slate .journal-bento-deck {
    opacity: 0.85;
}

body.case-study.journal .journal-bento-foot {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

body.case-study.journal .journal-bento-foot--start {
    justify-content: flex-start;
}

/* Pill footer */
body.case-study.journal .journal-bento-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    margin: 0 !important;
}

body.case-study.journal .journal-bento-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a78bfa;
    flex-shrink: 0;
}

/* Icon row footer */
body.case-study.journal .journal-bento-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

body.case-study.journal .journal-bento-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.case-study.journal .journal-bento-card--dark .journal-bento-icon {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

body.case-study.journal .journal-bento-icon--figma {
    background: linear-gradient(135deg, #f24e1e 0%, #ff7262 100%);
}

body.case-study.journal .journal-bento-icon--token {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

body.case-study.journal .journal-bento-icon--github {
    background: #24292f;
}

body.case-study.journal .journal-bento-icon--sync {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

/* Numbered steps (dark card) */
body.case-study.journal .journal-bento-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 200px;
}

body.case-study.journal .journal-bento-step {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: center;
}

body.case-study.journal .journal-bento-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

body.case-study.journal .journal-bento-step-num--1 {
    background: #fbbf24;
}

body.case-study.journal .journal-bento-step-num--2 {
    background: #22d3ee;
}

body.case-study.journal .journal-bento-step-num--3 {
    background: #f472b6;
}

body.case-study.journal .journal-bento-step-bar {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
}

/* Color bars footer */
body.case-study.journal .journal-bento-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 180px;
    margin-top: 4px;
}

body.case-study.journal .journal-bento-bar {
    height: 14px;
    border-radius: 8px;
}

body.case-study.journal .journal-bento-bar--1 {
    background: #fbbf24;
    width: 100%;
}

body.case-study.journal .journal-bento-bar--2 {
    background: #fb923c;
    width: 88%;
}

body.case-study.journal .journal-bento-bar--3 {
    background: #f472b6;
    width: 72%;
}

body.case-study.journal .journal-bento-bar--4 {
    background: #22d3ee;
    width: 56%;
}

@media (max-width: 900px) {
    body.case-study.journal .journal-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.case-study.journal .journal-bento {
        grid-template-columns: 1fr;
    }

    body.case-study.journal .journal-bento-card {
        min-height: 200px;
    }
}
