/* Praman Invention Engine v3.0.0 — Global Editorial & Engineering Layout Styles */

/* Override Twenty Twenty-Five narrow post-content column for Praman wrappers & shortcodes */
.entry-content.wp-block-post-content > .pi-outer,
.wp-block-post-content > .pi-outer,
.entry-content.wp-block-post-content > .pw-shell,
.wp-block-post-content > .pw-shell,
.entry-content.wp-block-post-content > .pva-wrap,
.wp-block-post-content > .pva-wrap,
.entry-content.wp-block-post-content > .puth-wrap,
.wp-block-post-content > .puth-wrap {
    max-width: 1180px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.pi-outer {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    line-height: 1.7;
    overflow-x: clip;
}
.pi-outer *, .pi-outer *::before, .pi-outer *::after {
    box-sizing: border-box;
}

/* Header & Navigation subtle polish for Twenty Twenty-Five */
header.wp-block-template-part {
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}
.wp-block-site-title a {
    font-weight: 800 !important;
    letter-spacing: -0.025em;
}
.wp-block-navigation .wp-block-navigation-item__content {
    font-weight: 600;
    font-size: 0.86rem;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.wp-block-navigation .wp-block-navigation__container {
    gap: 8px 18px !important;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container {
    background: #0b1628 !important;
    border: 1px solid #243b5c !important;
    border-radius: 10px !important;
    padding: 8px 0 !important;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.3) !important;
    min-width: 210px !important;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    color: #e2e8f0 !important;
    padding: 7px 14px !important;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.08) !important;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
    color: #0284c7 !important;
}

/* Hero & Subhero */
.pi-hero {
    background:
        radial-gradient(640px 320px at 10% 0%, rgba(56, 189, 248, 0.16), transparent 65%),
        radial-gradient(520px 280px at 90% 10%, rgba(244, 199, 107, 0.10), transparent 60%),
        linear-gradient(135deg, #060d1b 0%, #0d1c34 58%, #092439 100%);
    color: #f8fafc;
    border-radius: 18px;
    padding: 42px 38px;
    margin: 14px 0 30px;
    border: 1px solid #223554;
    display: grid;
    grid-template-columns: 1.48fr 0.88fr;
    gap: 34px;
    align-items: center;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.24);
}
.pi-subhero {
    background:
        radial-gradient(560px 260px at 88% 0%, rgba(56, 189, 248, 0.14), transparent 62%),
        linear-gradient(135deg, #060e1d 0%, #101f3a 100%);
    color: #f8fafc;
    border-radius: 16px;
    padding: 32px 34px;
    margin: 14px 0 28px;
    border: 1px solid #233655;
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.16);
}
.pi-subhero h1 {
    color: #f8fafc;
    margin: 4px 0 10px;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
}
.pi-subhero p {
    color: #cbd5e1;
    margin: 0;
    max-width: 860px;
}
@media (max-width: 880px) {
    .pi-hero {
        grid-template-columns: 1fr;
        padding: 28px 22px;
    }
    .pi-subhero {
        padding: 24px 20px;
    }
}
.pi-eyebrow {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #38bdf8;
    margin-bottom: 10px;
    font-weight: 700;
}
.pi-hero h1 {
    color: #ffffff;
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 3.4vw, 2.45rem);
    line-height: 1.13;
    letter-spacing: -0.025em;
    font-weight: 800;
}
.pi-lead {
    color: #cbd5e1;
    font-size: 1.03rem;
    margin: 0 0 20px;
}
.pi-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 10px;
    margin: 18px 0 24px;
}
.pi-stat {
    background: rgba(16, 31, 56, 0.88);
    border: 1px solid #2a4168;
    border-radius: 10px;
    padding: 11px 12px;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    color: #cbd5e1;
}
.pi-stat b {
    display: block;
    font-size: 1.15rem;
    color: #34d399;
    margin-bottom: 2px;
}
.pi-stat.gold b {
    color: #fbbf24;
}
.pi-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pi-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.pi-btn:hover {
    transform: translateY(-1px);
}
.pi-btn-prim {
    background: #0284c7;
    color: #ffffff !important;
}
.pi-btn-prim:hover {
    background: #0369a1;
}
.pi-btn-sec {
    background: #17253d;
    color: #e2e8f0 !important;
    border-color: #3b5580;
}
.pi-btn-sec:hover {
    background: #1e3152;
    border-color: #38bdf8;
}
.pi-btn-gold {
    background: #b45309;
    color: #ffffff !important;
    border-color: #92400e;
}
.pi-btn-gold:hover {
    background: #92400e;
}
.pi-hero .pi-btn-gold,
.pi-subhero .pi-btn-gold {
    background: rgba(244, 199, 107, 0.16);
    color: #fde68a !important;
    border-color: rgba(244, 199, 107, 0.55);
}
.pi-hero .pi-btn-gold:hover,
.pi-subhero .pi-btn-gold:hover {
    background: rgba(244, 199, 107, 0.26);
}

/* Grids & Cards */
.pi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0 34px;
}
.pi-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    padding: 22px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.045);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    border-color: #94a3b8;
}
.pi-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #0f172a;
}
.pi-card p {
    margin: 0 0 14px;
    font-size: 0.94rem;
    color: #334155;
}
.pi-card a {
    font-weight: 700;
    text-decoration: none;
    color: #0284c7;
}
.pi-card.pi-card-dark {
    background: linear-gradient(145deg, #081223 0%, #0e1d36 100%);
    color: #e2e8f0;
    border-color: #24385c;
}
.pi-card.pi-card-dark h3 {
    color: #f8fafc;
}
.pi-card.pi-card-dark p {
    color: #cbd5e1;
}
.pi-card.pi-card-dark a {
    color: #38bdf8;
}

/* Callouts & Epistemic Badges */
.pi-callout {
    border-left: 4px solid #0284c7;
    background: #f0f9ff;
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 22px 0;
    color: #0f172a;
}
.pi-callout.pi-callout-warn {
    border-left-color: #d97706;
    background: #fffbeb;
}
.pi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.pi-tag {
    display: inline-block;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
}
.tag-m { background: #dbeafe; color: #1e40af; }
.tag-md { background: #d1fae5; color: #065f46; }
.tag-oq { background: #fef3c7; color: #92400e; }
.tag-fail { background: #fee2e2; color: #991b1b; }
.tag-perp { background: #e2e8f0; color: #0f172a; }
.tag-v3 { background: #ede9fe; color: #5b21b6; }

/* Equations, Tables, Figures & Citations */
.pi-eq-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 16px 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.katex-display {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 0;
}
.pi-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 18px 0 28px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}
.pi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}
.pi-table th, .pi-table td {
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
}
.pi-table th {
    background: #0f172a;
    color: #f8fafc;
    font-weight: 700;
    border-color: #1e293b;
}
.pi-table tr:nth-child(even) td {
    background: #f8fafc;
}
.pi-fig {
    margin: 24px 0 32px;
    background: #0b111e;
    border: 1px solid #243552;
    border-radius: 14px;
    padding: 14px;
    color: #cbd5e1;
}
.pi-fig img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.pi-fig figcaption {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 10px;
    line-height: 1.5;
}
.pi-bib-wrap {
    position: relative;
    margin: 16px 0;
}
.pi-bib {
    background: #0b111e;
    color: #a7f3d0;
    padding: 16px 110px 16px 16px;
    border-radius: 10px;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    border: 1px solid #243552;
}
.pi-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #17253d;
    color: #7dd3fc;
    border: 1px solid #3b5580;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}
.pi-section-sep {
    border: 0;
    border-top: 2px solid #e2e8f0;
    margin: 38px 0;
}

/* Live Certificate Banner ([praman_certificate_badge]) */
.pi-cert-banner {
    background: linear-gradient(135deg, #071120 0%, #0d1d35 100%);
    color: #f8fafc;
    border: 1px solid #224059;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 20px 0 26px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.18);
}
.pi-cert-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.pi-cert-pill {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.42);
    padding: 4px 12px;
    border-radius: 999px;
}
.pi-cert-ts {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    color: #94a3b8;
}
.pi-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
}
.pi-cert-grid > div {
    background: rgba(9, 17, 31, 0.85);
    border: 1px solid #1e3354;
    border-radius: 9px;
    padding: 10px 12px;
}
.pi-cert-grid b {
    display: block;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 1.15rem;
    color: #38bdf8;
}
.pi-cert-grid span {
    font-size: 11.5px;
    color: #cbd5e1;
}

/* Z3 Theorem Cards & Download Grids */
.pi-theorem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 12px;
    margin: 18px 0 28px;
}
.pi-theorem-card {
    background: #091324;
    color: #e2e8f0;
    border: 1px solid #1e3554;
    border-radius: 10px;
    padding: 13px 15px;
}
.pi-theorem-card .tid {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 800;
    color: #34d399;
    margin-bottom: 4px;
}
.pi-theorem-card .tname {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
}
.pi-download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}
.pi-download-card {
    display: block;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    padding: 15px 16px;
    color: #0f172a;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.pi-download-card:hover {
    transform: translateY(-2px);
    border-color: #0284c7;
    background: #f0f9ff;
}
.pi-download-card .ext {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 800;
    color: #0284c7;
    text-transform: uppercase;
}
.pi-download-card .ttl {
    font-weight: 700;
    margin: 4px 0 2px;
    color: #0f172a;
}
.pi-download-card .meta {
    font-size: 12px;
    color: #475569;
}

/* =========================================================================
   2026 Flagship Series, Blog Deep-Dives & Mobile Optimization (v4.4.1)
   ========================================================================= */

.single-post .wp-block-post-title {
    max-width: 1180px !important;
    width: 100% !important;
    margin: 14px auto 8px !important;
    padding: 0 20px !important;
    font-size: clamp(1.55rem, 3.2vw, 2.35rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.18 !important;
}

/* Unify Twenty Twenty-Five wrapper width & trim excess spacing on Flagship posts */
.single-post:has(.pi-outer) main#wp--skip-link--target {
    margin-top: 12px !important;
}
.single-post:has(.pi-outer) main > .wp-block-group:first-child {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.single-post:has(.pi-outer) main > .wp-block-group > .wp-block-group.has-small-font-size {
    max-width: 1180px !important;
    width: 100% !important;
    margin: 0 auto 14px !important;
    padding: 0 20px !important;
    color: #475569;
}
.single-post:has(.pi-outer) nav[aria-label="Post navigation"] {
    display: none !important;
}
.single-post:has(.pi-outer) .wp-block-comments {
    max-width: 1180px !important;
    margin: 28px auto 36px !important;
    padding: 22px 24px !important;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-sizing: border-box;
}

/* Scroll Reading Progress Bar */
.pi-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 9998;
    background: linear-gradient(90deg, #38bdf8 0%, #34d399 55%, #fbbf24 100%);
    transition: width 0.08s linear;
    pointer-events: none;
}

/* Distill-style Interactive Parameter Simulator */
.pi-sim-box {
    background: linear-gradient(155deg, #071121 0%, #0d1d35 100%);
    border: 1px solid #243c61;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 18px 0 26px;
    color: #e2e8f0;
}
.pi-sim-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.pi-sim-status {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.16);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.pi-sim-status.is-warn {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
}
.pi-sim-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.pi-sim-ctrl label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 600;
}
.pi-sim-ctrl label code {
    color: #7dd3fc;
    font-weight: 800;
}
.pi-sim-ctrl input[type="range"] {
    width: 100%;
    accent-color: #38bdf8;
    cursor: pointer;
    height: 28px;
}
.pi-sim-readout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.pi-sim-kpi {
    background: rgba(9, 17, 32, 0.9);
    border: 1px solid #1e3354;
    border-radius: 10px;
    padding: 10px 12px;
}
.pi-sim-kpi span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 3px;
}
.pi-sim-kpi strong {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 1.05rem;
    color: #fbbf24;
}

.pi-hero h1 {
    font-size: clamp(1.6rem, 3.8vw, 2.55rem);
    line-height: 1.16;
}

.pi-outer h2[id] {
    scroll-margin-top: 74px;
    font-size: clamp(1.22rem, 2.4vw, 1.55rem);
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Sticky Reading Jump-Bar (Flagship Posts) */
.pi-toc-bar {
    position: sticky;
    top: 8px;
    z-index: 40;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(8, 18, 35, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid #24385c;
    border-radius: 999px;
    padding: 6px 10px;
    margin: 14px 0 22px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.16);
}
.pi-toc-bar::-webkit-scrollbar { display: none; }
.pi-toc-pill {
    flex: 0 0 auto;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
}
.pi-toc-pill:hover,
.pi-toc-pill.is-active {
    background: #0284c7;
    color: #ffffff;
}

/* Problem Split Cards */
.pi-wall-card {
    border-top: 3px solid #dc2626;
}
.pi-tweak-card {
    border-top: 3px solid #d97706;
}

/* Path Pills */
.pi-path-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 10px 0 14px;
}
.pi-path-step {
    display: inline-block;
    background: #0f172a;
    color: #e2e8f0;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    border: 1px solid #24385c;
}
.pi-path-arrow {
    color: #0284c7;
    font-weight: 800;
}

/* Responsive Architecture Schematic (Desktop SVG + Mobile Vector Flow) */
.pi-arch-svg {
    display: block;
    margin: 18px 0 24px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #243552;
    background: #081223;
}
.pi-arch-mobile {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 22px;
    padding: 14px;
    border-radius: 14px;
    background: #081223;
    border: 1px solid #243552;
    color: #f8fafc;
}
.pi-arch-mcard {
    background: #0f1b2e;
    border-radius: 11px;
    padding: 12px 14px;
    border-left: 4px solid #38bdf8;
}
.pi-arch-mcard.stage-2 { border-left-color: #34d399; }
.pi-arch-mcard.stage-3 { border-left-color: #fbbf24; }
.pi-arch-mcard .stage-tag {
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #7dd3fc;
    margin-bottom: 4px;
}
.pi-arch-marrow {
    text-align: center;
    color: #38bdf8;
    font-weight: 800;
    font-size: 15px;
    line-height: 1;
}

/* V4 Structural Topology Card inside Post */
.pi-topo-box {
    background: linear-gradient(145deg, #071121 0%, #0e1e36 100%);
    color: #e2e8f0;
    border: 1px solid #264166;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 22px 0 26px;
}
.pi-topo-box .pi-eyebrow {
    color: #34d399;
}
.pi-topo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.pi-topo-cell {
    background: rgba(10, 20, 38, 0.85);
    border: 1px solid #1e3354;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13px;
}
.pi-topo-cell strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7dd3fc;
    margin-bottom: 3px;
}

/* Interactive Figure Zoom Hint */
.pi-fig img[data-zoomable] {
    cursor: zoom-in;
}
.pi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.pi-lightbox.is-open { display: flex; }
.pi-lightbox img {
    max-width: 96vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

/* Series Footer Navigation */
.pi-post-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #081223;
    border: 1px solid #24385c;
    color: #e2e8f0;
}

/* =========================================================================
   2026 Flagships Master Hub (/2026-flagships/)
   ========================================================================= */
.pi-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0 28px;
}
.pi-podium-card {
    background: linear-gradient(155deg, #071121 0%, #10203a 100%);
    color: #f8fafc;
    border: 1px solid #263d61;
    border-top: 4px solid #fbbf24;
    border-radius: 14px;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.pi-podium-card.rank-2 { border-top-color: #38bdf8; }
.pi-podium-card.rank-3 { border-top-color: #34d399; }
.pi-podium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.25);
    border-color: #7dd3fc;
}

.pi-filter-shell {
    background: #091324;
    border: 1px solid #24385c;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 18px 0 22px;
    color: #e2e8f0;
}
.pi-filter-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.pi-filter-input {
    flex: 1 1 240px;
    min-width: 0;
    background: #0f1b2e;
    color: #f8fafc;
    border: 1px solid #334e7a;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
}
.pi-filter-input::placeholder { color: #94a3b8; }
.pi-filter-select {
    background: #0f1b2e;
    color: #f8fafc;
    border: 1px solid #334e7a;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-weight: 600;
}
.pi-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}
.pi-chip {
    background: #102038;
    color: #cbd5e1;
    border: 1px solid #284166;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.14s ease;
}
.pi-chip.is-active,
.pi-chip:hover {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
}

.pi-flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 18px;
    margin: 18px 0 34px;
}
.pi-flag-card {
    background: linear-gradient(155deg, #081223 0%, #0e1d36 100%);
    border: 1px solid #24385c;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #e2e8f0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.pi-flag-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.22);
}
.pi-flag-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: #050a14;
    overflow: hidden;
    border-bottom: 1px solid #1e3354;
}
.pi-flag-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pi-flag-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(6, 13, 25, 0.88);
    color: #f8fafc;
    border: 1px solid #334e7a;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
}
.pi-flag-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(217, 119, 6, 0.94);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: 'Fira Code', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
}
.pi-flag-body {
    padding: 16px 18px;
    flex: 1 1 auto;
}
.pi-flag-body h3 {
    margin: 4px 0 8px;
    font-size: 1.04rem;
    color: #f8fafc;
    line-height: 1.3;
}
.pi-flag-body p {
    margin: 0 0 12px;
    font-size: 0.89rem;
    color: #cbd5e1;
    line-height: 1.5;
}
.pi-flag-foot {
    padding: 12px 18px 16px;
    border-top: 1px solid #192b48;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

@media (max-width: 960px) {
    .pi-podium {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .pi-outer {
        padding-left: 14px;
        padding-right: 14px;
    }
    .single-post .wp-block-post-title {
        padding: 0 14px;
        margin-top: 12px !important;
    }
    .pi-hero {
        padding: 24px 18px;
        border-radius: 14px;
    }
    .pi-subhero {
        padding: 20px 16px;
        border-radius: 14px;
    }
    .pi-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .pi-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .pi-arch-svg { display: none; }
    .pi-arch-mobile { display: flex; }

    /* Transform wide .pi-table-resp tables into crisp stacked mobile cards */
    .pi-table-wrap:has(.pi-table-resp) {
        border: 0;
        background: transparent;
        overflow: visible;
    }
    .pi-table.pi-table-resp {
        min-width: 0;
        width: 100%;
    }
    .pi-table.pi-table-resp thead {
        display: none;
    }
    .pi-table.pi-table-resp tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .pi-table.pi-table-resp tr {
        display: block;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        padding: 10px 12px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    }
    .pi-table.pi-table-resp td {
        display: flex;
        flex-direction: column;
        gap: 2px;
        border-right: 0;
        border-bottom: 1px solid #f1f5f9;
        padding: 7px 4px;
        background: transparent !important;
    }
    .pi-table.pi-table-resp td:last-child {
        border-bottom: 0;
        padding-bottom: 2px;
    }
    .pi-table.pi-table-resp td::before {
        content: attr(data-label);
        font-family: 'Fira Code', ui-monospace, Menlo, monospace;
        font-size: 10.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #64748b;
    }

    .pi-bib {
        padding: 44px 14px 14px 14px;
        white-space: pre-wrap;
        word-break: break-word;
        font-size: 12px;
    }
    .pi-post-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }
    .pi-post-nav a,
    .pi-post-nav .pi-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .pi-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
