/* Study-only layout on top of brand CSS */
.kpi-waste h4 { color: #9f1239; }
.kpi-dead h4 { color: #334155; }
.kpi-block h4 { color: #7c2d12; }
.kpi-ok h4 { color: var(--brand-ink); }
.kpi-waste { border-top: 4px solid #e11d48; }
.kpi-dead { border-top: 4px solid #64748b; }
.kpi-block { border-top: 4px solid #c2410c; }
.kpi-ok { border-top: 4px solid var(--brand); }

.study-note { font-size: 14px; color: #64748b; }
.waste-callout {
    background: var(--waste-bg);
    border: 1px solid var(--waste-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    color: #881337;
    margin: 20px 0 8px;
}
.waste-callout strong { color: #9f1239; font-size: 20px; }

.method-grid, .split-2, .path-grid, .open-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}
.method-grid { grid-template-columns: repeat(3, 1fr); }
.split-2 { grid-template-columns: 1fr 1fr; }
.path-grid { grid-template-columns: repeat(2, 1fr); }
.open-grid { grid-template-columns: repeat(2, 1fr); }

.method-card, .path-card, .open-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.method-card h3, .path-card h3, .open-card h3 { margin: 0 0 8px; font-size: 18px; }
.method-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(45deg, var(--brand-ink), var(--brand));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; margin-bottom: 12px;
}

.tld-bar {
    height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; min-width: 120px;
}
.tld-bar > span { display: block; height: 100%; border-radius: 999px; background: #be123c; }
.tld-bar.is-mid > span { background: #9a3412; }
.tld-bar.is-ok > span { background: var(--brand); }

.row-waste td { background: #fff1f2; }
.row-dead td { background: #f8fafc; }

.path-card code {
    display: block;
    background: #0d1a2c;
    color: #fda4af;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
    overflow-x: auto;
}
.open-card { border-left: 4px solid var(--brand); }
.open-pct { font-size: 28px; font-weight: 800; color: var(--brand-ink); margin: 0; }
.closed-how { color: #9f1239; font-weight: 600; }

.year-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0 8px;
}
.year-cell { background: #0d1a2c; color: #e2e8f0; border-radius: var(--radius); padding: 20px; }
.year-cell strong { display: block; font-size: 36px; color: #fda4af; }
.year-cell:last-child strong { color: #6ee7b7; }

.study-langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.study-langs a {
    color: #94a3b8; text-decoration: none; font-weight: 700; font-size: 13px;
    border: 1px solid rgba(148,163,184,.35); border-radius: 999px; padding: 4px 12px;
}
.study-langs a.is-active, .study-langs a[aria-current="page"] {
    color: #fff; background: rgba(1,172,126,.2); border-color: #01ac7e;
}
.study-lang-label { color: #94a3b8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 0; }
.nav__languages a.is-active { color: #01ac7e; }

.study-toc { background: #fff; border-bottom: 1px solid var(--border); padding: 12px 0; }
.study-toc__title { font-weight: 800; margin: 0 0 8px; }
.study-toc ul {
    display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin: 0; padding: 0;
}
.study-toc a { color: var(--brand-ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.study-toc a:hover { text-decoration: underline; }

.filter-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0;
}
.filter-bar input[type="search"], .filter-bar input[type="number"] {
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px;
    min-width: 200px;
}
.filter-count { color: #64748b; font-size: 14px; }
.btn-filter {
    background: var(--brand); color: #fff !important; border-radius: 10px; padding: 10px 16px;
    font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 14px;
}
.table-wrap--tall { max-height: 640px; }
.ua-box code { display: block; white-space: pre-wrap; word-break: break-all; margin-top: 6px; }
.cmd-box {
    background: #0d1a2c; color: #6ee7b7; padding: 16px 18px; border-radius: 12px; overflow-x: auto;
    font-size: 13px;
}
.study-video { width: 100%; max-width: 960px; height: auto; border-radius: var(--radius); background: #0d1a2c; }
.prompt-box {
    width: 100%; min-height: 280px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px; line-height: 1.45; border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; box-sizing: border-box; background: #fff; color: #0f172a;
}

@media (max-width: 960px) {
    .method-grid, .year-strip { grid-template-columns: 1fr; }
}

@media print {
    .header, .footer, .hamburger, .mobile-menu, .scroll-top-btn,
    .study-toc, .si-cta, .nav__languages, #prompt, #video {
        display: none !important;
    }
    .table-wrap, .table-wrap--tall { max-height: none !important; overflow: visible !important; }
    .si-hero--dark { break-after: avoid; }
    a[href]::after { content: none !important; }
}
