/* Praman Invention Engine v4.0.0-rc1 — 4-Graph UTH Explorer & Discovery UI */
.puth-wrap {
    max-width: 1180px;
    margin: 24px auto;
    background: #07101d;
    color: #e2e8f0;
    border: 1px solid #223856;
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    box-shadow: 0 22px 54px rgba(2, 6, 23, 0.34);
}
.puth-wrap *, .puth-wrap *::before, .puth-wrap *::after { box-sizing: border-box; }
.puth-loading { padding: 32px; text-align: center; color: #38bdf8; font-family: 'Fira Code', monospace; }

.puth-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    background: #0b1628;
    border-bottom: 1px solid #1e324e;
}
.puth-title { font-size: 1.06rem; font-weight: 800; color: #f8fafc; }
.puth-sub { font-family: 'Fira Code', monospace; font-size: 0.75rem; color: #7dd3fc; }

.puth-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 14px;
    background: #060d18;
    border-bottom: 1px solid #1e324e;
}
.puth-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    padding: 12px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.puth-tab:hover { color: #e2e8f0; }
.puth-tab.active { color: #38bdf8; border-bottom-color: #38bdf8; background: rgba(56, 189, 248, 0.08); }

.puth-body { padding: 20px 22px 24px; }
.puth-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr); gap: 18px; }
@media (max-width: 920px) { .puth-grid { grid-template-columns: 1fr; } }

.puth-panel {
    background: #0c1729;
    border: 1px solid #1e324e;
    border-radius: 12px;
    padding: 16px;
}
.puth-panel h3 { margin: 0 0 8px; font-size: 0.98rem; color: #f8fafc; }
.puth-muted { font-size: 0.82rem; color: #94a3b8; margin: 0 0 12px; }

.puth-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.puth-select, .puth-input {
    background: #060d18;
    color: #f8fafc;
    border: 1px solid #294163;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 0.8rem;
}
.puth-btn {
    background: #0284c7;
    color: #ffffff;
    border: 0;
    border-radius: 7px;
    padding: 7px 13px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.puth-btn:hover { background: #0369a1; }
.puth-btn-sec {
    background: #14233b;
    color: #cbd5e1;
    border: 1px solid #2b4469;
}

.puth-list { display: flex; flex-direction: column; gap: 8px; max-height: 410px; overflow-y: auto; }
.puth-row {
    background: #08111f;
    border: 1px solid #1c2f4a;
    border-radius: 9px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.14s ease;
}
.puth-row:hover, .puth-row.active { border-color: #38bdf8; background: #0e1c32; }
.puth-row-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 0.88rem; color: #f8fafc; }
.puth-row-meta { font-family: 'Fira Code', monospace; font-size: 0.74rem; color: #94a3b8; margin-top: 3px; }

.puth-badge {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #334e73;
    color: #93c5fd;
    background: rgba(56, 189, 248, 0.1);
}
.puth-badge.est { color: #34d399; border-color: #166534; background: rgba(16, 185, 129, 0.12); }
.puth-badge.und { color: #fbbf24; border-color: #92400e; background: rgba(245, 158, 11, 0.12); }
.puth-badge.pro { color: #c4b5fd; border-color: #5b21b6; background: rgba(139, 92, 246, 0.14); }
.puth-badge.rej { color: #f87171; border-color: #7f1d1d; background: rgba(239, 68, 68, 0.14); }

.puth-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.puth-kv-item { background: #070e1b; border: 1px solid #1b2d47; border-radius: 8px; padding: 8px 10px; }
.puth-kv-item span { display: block; font-size: 0.7rem; color: #94a3b8; text-transform: uppercase; }
.puth-kv-item b { font-family: 'Fira Code', monospace; font-size: 0.86rem; color: #f8fafc; word-break: break-word; }

.puth-eq {
    background: #060b14;
    border: 1px solid #243b5c;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: #a7f3d0;
    overflow-x: auto;
    margin: 10px 0;
}
.puth-note {
    border-left: 3px solid #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-top: 10px;
}

.puth-matrix { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.puth-matrix th, .puth-matrix td { border: 1px solid #1e324e; padding: 8px 10px; text-align: left; }
.puth-matrix th { background: #08101d; color: #7dd3fc; font-family: 'Fira Code', monospace; }

.puth-svg { width: 100%; height: auto; max-height: 360px; display: block; }
.puth-prims { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.puth-prim {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0a1526;
    border: 1px solid #253d5e;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    cursor: pointer;
}

/* v4.2.0 Museum-Grade 5-Pillar Dossier, Gold Flagships & Pagination */
.puth-btn-gold {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: #fffbeb;
    border: 1px solid #fbbf24;
}
.puth-btn-gold:hover { background: linear-gradient(135deg, #d97706, #f59e0b); }
.puth-btn-gold.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #090d16;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}

.puth-badge-gold {
    color: #fde68a;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
}

.puth-row.gold {
    border-left: 3px solid #f59e0b;
}

.puth-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #1e324e;
    font-size: 0.78rem;
    color: #94a3b8;
}

.puth-dossier-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e324e;
}
.puth-dossier-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
    line-height: 1.3;
}
.puth-dossier-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.puth-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 12px 0;
    padding: 10px 12px;
    background: #060d18;
    border: 1px solid #1e324e;
    border-radius: 10px;
}
.puth-flow-dom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: #0e2442;
    border: 1.5px solid #38bdf8;
    color: #e0f2fe;
    font-family: 'Fira Code', monospace;
    font-size: 0.76rem;
    font-weight: 800;
}
.puth-flow-step {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #93c5fd;
    background: rgba(56, 189, 248, 0.08);
    border: 1px dashed #2b476e;
    border-radius: 6px;
    padding: 3px 8px;
}
.puth-flow-arrow { color: #fbbf24; font-weight: 800; font-size: 0.85rem; }

.puth-pillar {
    background: #08111f;
    border: 1px solid #1c2f4a;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 10px;
}
.puth-pillar-k {
    font-family: 'Fira Code', monospace;
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd3fc;
    margin-bottom: 6px;
}
.puth-pillar p { margin: 0 0 8px; font-size: 0.87rem; line-height: 1.52; color: #e2e8f0; }
.puth-pillar p:last-child { margin-bottom: 0; }

.puth-problem-box {
    background: rgba(245, 158, 11, 0.09);
    border-left: 3px solid #f59e0b;
    padding: 8px 11px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    line-height: 1.48;
    color: #fef3c7;
}

.puth-uses { display: flex; flex-wrap: wrap; gap: 6px; }
.puth-use-chip {
    background: rgba(16, 185, 129, 0.11);
    border: 1px solid #166534;
    color: #a7f3d0;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    line-height: 1.3;
}

.puth-meas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 640px) { .puth-meas-grid { grid-template-columns: 1fr; } }
.puth-meas-cell {
    background: #060b14;
    border: 1px solid #1f3352;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.42;
    color: #cbd5e1;
}
.puth-meas-cell strong {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.69rem;
    color: #7dd3fc;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.puth-constraints {
    margin: 0;
    padding-left: 18px;
    font-size: 0.82rem;
    line-height: 1.48;
    color: #fecaca;
}
.puth-constraints li { margin-bottom: 4px; }
.puth-pillar-limit {
    border-color: #7f1d1d;
    background: rgba(127, 29, 29, 0.13);
}
.puth-pillar-limit .puth-pillar-k { color: #fca5a5; }
