/*
 * WP Health Inspector - Stylesheet v2.0.0
 * Mobile-first, responsive design using CSS custom properties.
 * Table of Contents:
 *    -Design Tokens
 *    -Global / Reset
 *    -Feature Header
 *    -Tables
 *    -Cards & Panels
 *    -Details / Accordion
 *    -Dashboard
 *      a. Health Score Gauge
 *      b. Stats Row
 *      c. Module Grid
 *      d. System Snapshot
 *    -What Changed?
 *    -DB Health
 *    -Blast Radius / Modal
 *    -Cron Inspector
*     -Asset Inspector
 *    -Autoload Governor
 *    -Risk Indicators
 *    -Time Bomb
 *    -Server Environment
 *    -Status Badges & Chips
 *    -Responsive Breakpoints
 *    -Utilities (text, layout, spacing)
 *    -Dynamic Color Components (CSS custom properties)
 *    -Component Extras (modals, summary tiles, metric cards)
 *    -WP style override
 */

/* ============================================================
    Design Tokens
   ============================================================ */
#wphi-page {
    --wphi-bg:         #f0f2f5;
    --wphi-surface:    #ffffff;
    --wphi-border:     #d1d5db;
    --wphi-border-strong: #9ca3af;

    --wphi-text:       #111827;
    --wphi-text-muted: #6b7280;
    --wphi-text-light: #9ca3af;

    --wphi-primary:    #0d6efd;
    --wphi-primary-dk: #0a58ca;
    --wphi-accent:     #0891b2;

    --wphi-good:       #48C626;
    --wphi-warn:       #f59e0b;
    --wphi-danger:     #ef4444;

    --wphi-head-bg:    #1e293b;
    --wphi-head-fg:    #f1f5f9;
    --wphi-thead-bg:   #1e3a5f;

    --wphi-radius:     8px;
    --wphi-radius-lg:  12px;
    --wphi-shadow:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --wphi-shadow-md:  0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);

    --wphi-font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --wphi-mono:       'Consolas', 'SFMono-Regular', monospace;

    --wphi-space-xs:   4px;
    --wphi-space-sm:   8px;
    --wphi-space-md:   16px;
    --wphi-space-lg:   24px;
    --wphi-space-xl:   40px;

    --wphi-content-max: 1100px;
}

/* ============================================================
    Global / Reset
   ============================================================ */
#wphi-page {
    background: var(--wphi-bg);
    min-height: 100vh;
    font-family: var(--wphi-font);
    font-size: 14px;
    color: var(--wphi-text);
    line-height: 1.6;
}

#wphi-page * {
    box-sizing: border-box;
    font-family: var(--wphi-font);
}

#wphi-page p   { color: var(--wphi-text-muted); margin: 0 0 8px; }
#wphi-page a   { color: var(--wphi-primary); text-decoration: none; cursor: pointer;}
#wphi-page a:hover { text-decoration: underline; }
#wphi-page pre { white-space: pre-wrap; word-break: break-all; font-family: var(--wphi-mono); font-size: 13px; }
#wphi-page code {
    background: #f3f4f6;
    border: 1px solid var(--wphi-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--wphi-mono);
    font-size: 12px;
    color: #1d4ed8;
    word-break: break-all;
}
#wphi-page ul  { list-style: none; padding: 0; margin: 0; }

#wphi-page .wrap { margin: 0 !important; padding: var(--wphi-space-lg); max-width: var(--wphi-content-max); margin: 0 auto !important; }

#wphi-page .button{ border-radius: 20px !important;}
#wphi-page .wphi-button-primary{ border-radius: 10px !important; padding: 10px 14px; background-color: #3A7EF2; color: #fff; border: none;}
#wphi-page .wphi-button-primary.wphi-button--compact,
#wphi-page .wphi-button-secondary.wphi-button--compact { padding: 2px 10px; height: auto; }

.white-text{
    color: #fff !important;
}

.gate-icon-orange{
    content: "\f120";
    background: #d97706 !important;
}

.black-square-icon{
    content: "\f534";
    background: #000;
}

.dashicons {
    font-family: dashicons !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.white-text{
    color: #fff;
}

.wphi-flex-center{
    align-items: center;
}

.red-white-button{
    padding: 6px 10px;
    background: #b32d2e;
    color: #fff;
    vertical-align: middle;
    border-radius: 20px;
    border: none;
}

.trans-bg{background-color: rgba(0,0,0,0);}

.wphi-zero-margin{ margin: 0 !important;}

/* ============================================================
    Feature Header
   ============================================================ */
#wphi-page .wphi-feature-head {
    background: var(--wphi-head-bg);
    color: var(--wphi-head-fg);
    padding: 28px 24px 24px;
    text-align: center;
    border-bottom: 3px solid var(--wphi-accent);
}

#wphi-page .wphi-feature-head h1 {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 700;
    color: #3BC5FF;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

#wphi-page .wphi-feature-head p {
    font-size: 15px;
    color: #94a3b8;
    margin: 0 auto;
    max-width: 600px;
}
#wphi-page .wphi-feature-head p strong { color: #e2e8f0; }

/* ============================================================
    Tables
   ============================================================ */

.wphi-table-header-row{
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

a.wphi-autoload-link{
    margin-right: 50px;
    background: var(--wphi-accent);
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    text-decoration: none !important;
}

a.wphi-autoload-link:hover{
    text-decoration: none !important;
}

#wphi-page table {
    width: 100%;
    border-collapse: collapse;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-thead-bg);
    border-radius: var(--wphi-radius);
    overflow: hidden;
    box-shadow: var(--wphi-shadow);
    table-layout: auto;
}

#wphi-page thead { 
    background: var(--wphi-thead-bg); 
}
#wphi-page thead th {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
}

#wphi-page tbody tr:nth-child(even) { background: #f8fafc; }
#wphi-page tbody tr:hover { background: #eff6ff; transition: background .15s; }
#wphi-page td {
    width: max-content;
    padding: 10px 8px;
    font-size: 13px;
    color: var(--wphi-text);
    vertical-align: middle;
    border-bottom: 1px solid var(--wphi-border);
    word-break: break-word;
}
#wphi-page tbody tr:last-child td { border-bottom: none; }
#wphi-page .bold-td, #wphi-page th { font-weight: 600; }
#wphi-page .wphi-snap-table th {
    background: none;
    color: var(--wphi-text-muted);
    text-transform: none;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0;
    width: 200px;
}

/* Scrollable table wrappers on mobile */
.wphi-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--wphi-radius); }

/* ============================================================
    Cards & Panels
   ============================================================ */
#wphi-page .wphi-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: var(--wphi-space-md);
    box-shadow: var(--wphi-shadow);
    margin-bottom: var(--wphi-space-md);
}

#wphi-page .wphi-notice {
    border-radius: var(--wphi-radius);
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
#wphi-page .wphi-notice-warn   { background:#fffbeb; border: 1px solid var(--wphi-warn);border-left: 4px solid var(--wphi-warn); color: #92400e; }
#wphi-page .wphi-notice-danger { background:#fef2f2; border: 1px solid var(--wphi-danger); border-left: 4px solid var(--wphi-danger); color: #991b1b; }
#wphi-page .wphi-notice-good   { background:#f0fdf4; border: 1px solid var(--wphi-good); border-left: 4px solid var(--wphi-good); color: #166534; }

#wphi-page .wphi-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wphi-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--wphi-radius);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
}
#wphi-page .wphi-button:hover { background: var(--wphi-primary-dk); transform: translateY(-1px); text-decoration: none; }

.full-version-callout{
    color: #888;
    margin: 2px 5px 0 5px;
}

/* ============================================================
    Details / Accordion
   ============================================================ */
#wphi-page details {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    margin-bottom: var(--wphi-space-md);
    box-shadow: var(--wphi-shadow);
    overflow: hidden;
    padding: 10px 15px;
}

#wphi-page summary {
    list-style: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 14px 16px;
    gap: 8px;
    user-select: none;
    background: var(--wphi-surface);
    border-bottom: 1px solid transparent;
    transition: background .15s;
}
#wphi-page summary:hover { background: #f8fafc; }
#wphi-page details[open] > summary { border-bottom-color: var(--wphi-border); }

#wphi-page summary::-webkit-details-marker { display: none; }
#wphi-page summary::marker { content: ""; }

#wphi-page summary h2,
#wphi-page summary h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--wphi-text) !important;
    flex: 1;
}

#wphi-page .wphi-arrow {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--wphi-text-muted);
    border-bottom: 2px solid var(--wphi-text-muted);
    transform: rotate(-135deg);
    transition: transform .25s ease;
    margin-top: 2px;
}
#wphi-page details[open] .wphi-arrow { transform: rotate(45deg); }

#wphi-page details > *:not(summary) { padding: 0 }
#wphi-page details > table {border: none; box-shadow: none; }

/* ============================================================
    Dashboard
   ============================================================ */
.wphi-dashboard-wrap {
    max-width: var(--wphi-content-max);
    margin: 0 auto;
    padding: var(--wphi-space-lg) var(--wphi-space-md);
}

#wphi-page .wphi-section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--wphi-text) !important;
    margin: var(--wphi-space-xl) 0 var(--wphi-space-md) !important;
    padding: 0 !important;
    border-bottom: 2px solid var(--wphi-border);
    padding-bottom: 8px !important;
}

/* a. Health Score Gauge */
.wphi-score-card {
    display: flex;
    align-items: center;
    gap: var(--wphi-space-xl);
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: var(--wphi-space-xl);
    box-shadow: var(--wphi-shadow-md);
    margin-bottom: var(--wphi-space-lg);
    flex-wrap: wrap;
}

.wphi-gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.wphi-gauge-svg {
    width: 140px;
    height: 140px;
}
.wphi-gauge-arc {
    transition: stroke-dashoffset 1s ease-in-out, stroke .4s;
}
.wphi-gauge-num {
    font-size: 26px;
    font-weight: 700;
    font-family: var(--wphi-font);
}
.wphi-gauge-label {
    font-size: 11px;
    font-family: var(--wphi-font);
}

#wphi-page p.wphi-status-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}
.wphi-status-good     { background: #dcfce7; color: #166534; }
.wphi-status-warning  { background: #fffbeb; color: #92400e; }
.wphi-status-critical { background: #fef2f2; color: #991b1b; }

.wphi-score-issues { flex: 1; min-width: 200px; }
.wphi-score-issues h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--wphi-text) !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
}
.wphi-all-clear { color: var(--wphi-good) !important; font-weight: 600; font-size: 15px; }

.wphi-issue-list { display: flex; flex-direction: column; gap: 8px; }
.wphi-issue-list li { font-size: 13px; line-height: 1.5; }
.wphi-issue-critical { color: #991b1b; }
.wphi-issue-warning  { color: #92400e; }

/* b. Stats Row */
.wphi-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--wphi-space-md);
    margin-bottom: var(--wphi-space-lg);
}

.wphi-stat-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 14px 16px;
    box-shadow: var(--wphi-shadow);
    flex-direction:column;
}
.wphi-stat-chip .dashicons {
    font-size: 32px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.wphi-stat-chip > div { display: flex; flex-direction: column; }
.wphi-stat-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    display: block;
}
.wphi-stat-label {
    font-size: 11px;
    color: var(--wphi-text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

a.wphi-stat-label {
    text-decoration: underline 2px;
}

/* c. Module Grid */
.wphi-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: var(--wphi-space-md);
    margin-bottom: var(--wphi-space-xl);
}

.wphi-module-card {
    display: flex;
    flex-direction: column;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: var(--wphi-space-lg);
    text-decoration: none !important;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    box-shadow: var(--wphi-shadow);
    color: var(--wphi-text) !important;
}

#wphi-pro-features-cards{
    margin: 10px 0;
}

.wphi-pro-feature-cards-title{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.wphi-pro-features-cards-container{
    background: #bdb6b6;
    border: 1px solid #000;
    border-radius: var(--wphi-radius-lg);
    padding: 16px;
    margin-bottom: 30px;
}
.wphi-module-card-pro{
    background: #c4ecd6;
}
.wphi-module-card:hover {
    box-shadow: var(--wphi-shadow-md);
    transform: translateY(-2px);
    border-color: var(--wphi-primary);
}
.wphi-mod-icon {
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
    color: var(--wphi-accent) !important;
    margin-bottom: 10px;
}
.wphi-module-card h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--wphi-text) !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
}
.wphi-module-card p {
    font-size: 12px;
    color: var(--wphi-text-muted);
    flex: 1;
    line-height: 1.5;
    margin-bottom: 12px;
}
.wphi-mod-cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--wphi-primary);
    margin-top: auto;
}

/* d. System Snapshot */
.wphi-snapshot {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: var(--wphi-space-lg);
    box-shadow: var(--wphi-shadow);
}

#wphi-page .wphi-snapshot h2.wphi-section-title{
    margin-top: 10px !important;
}

.wphi-snap-table { box-shadow: none; border: none; border-radius: 0; }
.wphi-snap-table td { font-size: 13px; }

/* e. Misc */

.wphi-view-diag-paths{
    float: right;
    padding-right: 30px;
    margin-top: 2px;
    font-size: 14px;
    text-decoration: underline !important;
}

/* ============================================================
    DB Health Page
   ============================================================ */
#wphi-page .wphi-db-health-page,
#wphi-page .wphi-script-style-page,
#wphi-page .wphi-blast-radius-page,
#wphi-page .wphi-cron-bg-page,
#wphi-page .wphi-autoload-gov-page,
#wphi-page .wphi-risk-indicators-page,
#wphi-page .wphi-time-bomb-page,
#wphi-page .wphi-server-env-page {
    display: flex;
    flex-direction: column;
    gap: var(--wphi-space-md);
}

/* autoload color coding */
#wphi-page .al-good { color: var(--wphi-good); font-weight: 600; }
#wphi-page .al-med  { color: var(--wphi-warn);  font-weight: 600; }
#wphi-page .al-high { color: var(--wphi-danger); font-weight: 600; }

/* collapsed autoload table */
#all-autoloaded-table.collapsed tbody tr:nth-child(n+11) { display: none; }

/* Change autoload button */
#wphi-page #change-autoload-display {
    padding: 2px 6px;
    margin: 10px 18px;
    border-radius: 5px;
}

/* ============================================================
    Blast Radius / Hook Modal
   ============================================================ */
#wphi-page #wphi-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
}

#wphi-page #hook-inspector-container {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 1100px);
    height: 88vh;
    background: #1e1e1e;
    z-index: 10000;
    border-radius: var(--wphi-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

#wphi-page .wphi-modal-header {
    padding: 12px 20px;
    background: #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid #444;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

#wphi-page .wphi-modal-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 96%;
    margin: 0 auto;
    text-align: center;
}

#wphi-page .hook-search-text p { color: #94a3b8 !important; font-size: 12px; margin: 0; text-align: center; }

#wphi-page .wphi-modal-body { flex: 1; overflow: hidden; }
#wphi-page #hook-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    opacity: 1;
    transition: opacity .3s;
}

/* Spinner */
#wphi-page #wphi-loader.spinner {
    float: none;
    margin: 0;
    visibility: hidden;
    height: 36px;
    width: 36px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#wphi-page #wphi-loader.spinner.is-active { visibility: visible; }

/* Close button */
#wphi-page .wphi-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #555;
    background: transparent;
    cursor: pointer;
    position: relative;
    padding: 0;
    flex-shrink: 0;
}
#wphi-page .wphi-close::before,
#wphi-page .wphi-close::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 14px;
    background: #ef4444;
}
#wphi-page .wphi-close::before { transform: rotate(45deg); }
#wphi-page .wphi-close::after  { transform: rotate(-45deg); }
#wphi-page .wphi-close:hover { border-color: #ef4444; background: rgba(239,68,68,.1); }

/* ============================================================
    Clickable table rows (row-detail modal — What Changed?)
   ============================================================ */
#wphi-page tr.wphi-row-clickable {
    cursor: pointer;
    transition: background-color .12s ease;
}
#wphi-page tr.wphi-row-clickable:hover,
#wphi-page tr.wphi-row-clickable:focus-visible {
    background-color: #eff6ff;
}
#wphi-page tr.wphi-row-clickable:focus-visible {
    outline: 2px solid var(--wphi-primary);
    outline-offset: -2px;
}

/* REST method badges */
#wphi-page .wphi-method {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--wphi-mono);
}
#wphi-page .method-GET    { background: #dbeafe; color: #1d4ed8; }
#wphi-page .method-POST   { background: #dcfce7; color: #166534; }
#wphi-page .method-PUT,
#wphi-page .method-PATCH  { background: #fef9c3; color: #854d0e; }
#wphi-page .method-DELETE { background: #fee2e2; color: #991b1b; }

#wphi-page .wphi-namespace-header { background: #1e3a5f; }
#wphi-page .wphi-namespace-header td { color: #fff; font-weight: 600; }

/* ============================================================
   Cron Inspector
   ============================================================ */
#wphi-page .wphi-cron-std { border-left: 3px solid var(--wphi-accent); }
#wphi-page .wphi-cron-as  { border-left: 3px solid #8b5cf6; }

/* ============================================================
   Asset Inspector
   ============================================================ */
/* (handled by global table styles) */

/* ============================================================
   Autoload Governor
   ============================================================ */
#wphi-page .wphi-progress-bar-wrap {
    background: #e5e7eb;
    border-radius: 20px;
    height: 10px;
    overflow: hidden;
    margin-top: 6px;
}
#wphi-page .wphi-progress-bar {
    height: 100%;
    border-radius: 20px;
    background: var(--wphi-primary);
    transition: width .5s;
}

/* ============================================================
   Risk Indicators
   ============================================================ */
/* (handled by global table + badge styles) */

/* ============================================================
   Time Bomb
   ============================================================ */
#wphi-page .wphi-time-bomb-page .wphi-card { margin-bottom: 16px; }

/* ============================================================
   Server Environment
   ============================================================ */
.wphi-ext-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
}
.wphi-ext-chip {
    display: inline-block;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-family: var(--wphi-mono);
}

/* ============================================================
   Status Badges & Chips
   ============================================================ */
#wphi-page .wphi-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
#wphi-page .wphi-badge-good     { background: #dcfce7; color: #166534; }
#wphi-page .wphi-badge-warn     { background: #fffbeb; color: #92400e; }
#wphi-page .wphi-badge-danger   { background: #fef2f2; color: #991b1b; }
#wphi-page .wphi-badge-neutral  { background: #f3f4f6; color: #374151; }

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Tablet and up (≥768px) */
@media (min-width: 768px) {
    .wphi-dashboard-wrap { padding: var(--wphi-space-xl) var(--wphi-space-lg); }
    #wphi-page .wphi-feature-head { padding: 36px 40px 28px; }
    #wphi-page .wrap { padding: var(--wphi-space-xl); }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
    .wphi-score-card    { flex-direction: column; align-items: center; padding: var(--wphi-space-lg); gap: var(--wphi-space-lg); }
    .wphi-stats-row     { grid-template-columns: 1fr 1fr; }
    .wphi-module-grid   { grid-template-columns: 1fr; }
    .wphi-dashboard-wrap { padding: var(--wphi-space-md); }
    #wphi-page .wrap    { padding: var(--wphi-space-md); }

    /* Shrink table text for mobile */
    #wphi-page td, #wphi-page th { padding: 8px 10px; font-size: 12px; }
    #wphi-page code { font-size: 11px; }

    /* Stack tables as cards */
    #wphi-page .wphi-responsive-stack thead { display: none; }
    #wphi-page .wphi-responsive-stack tr { display: block; margin-bottom: 12px; border: 1px solid var(--wphi-border); border-radius: var(--wphi-radius); background: var(--wphi-surface); }
    #wphi-page .wphi-responsive-stack td { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--wphi-border); }
    #wphi-page .wphi-responsive-stack td::before { content: attr(data-label); font-weight: 600; color: var(--wphi-text-muted); font-size: 11px; text-transform: uppercase; flex-shrink: 0; margin-right: 8px; }

    /* Modal: full screen on mobile */
    #wphi-page #hook-inspector-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }

    .wphi-snapshot .wphi-snap-table { table-layout: auto; }
    .wphi-snapshot .wphi-snap-table th { width: auto; min-width: 120px; }
}

/* Very small screens (≤400px) */
@media (max-width: 400px) {
    .wphi-stats-row { grid-template-columns: 1fr; }
    #wphi-page .wphi-feature-head h1 { font-size: 18px; }
}

/* ============================================================
   LICENSE & PRO GATE STYLES
   ============================================================ */

/* ── Pro button (shared with lite) ── */
#wphi-page .wphi-pro-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f59e0b;
    color: #1c1917 !important;
    border: none;
    border-radius: var(--wphi-radius);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none !important;
    white-space: nowrap;
}
#wphi-page .wphi-pro-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,.35);
    text-decoration: none !important;
}
#wphi-page .wphi-pro-btn-lg  { padding: 12px 28px; font-size: 15px; }

/* ── Full-page gate (Pro module information page) ── */
.wphi-gate-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--wphi-space-xl) var(--wphi-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--wphi-space-xl);
}

.wphi-gate-card {
    background: var(--wphi-surface);
    border: 2px dashed #d97706;
    border-radius: var(--wphi-radius-lg);
    padding: 48px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--wphi-shadow-md);
}
.wphi-gate-icon {
    font-size: 48px !important;
    width: 48px !important;
    height: 48px !important;
    color: #d97706 !important;
}
.wphi-gate-card h2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--wphi-text) !important;
    margin: 0 !important;
    padding: 0 !important;
}
.wphi-gate-card p {
    font-size: 15px;
    color: var(--wphi-text-muted);
    max-width: 520px;
    margin: 0;
    line-height: 1.6;
}
.wphi-gate-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.wphi-gate-buy-btn {
    font-size: 16px;
    font-weight: 600;
    color: var(--wphi-primary);
}
.wphi-gate-buy-btn:hover { text-decoration: underline; }

.wphi-gate-modules {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: var(--wphi-space-lg) 24px;
    box-shadow: var(--wphi-shadow);
}
.wphi-gate-modules h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--wphi-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--wphi-space-md) !important;
    padding: 0 !important;
}
.wphi-gate-module-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}
.wphi-gate-module-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--wphi-radius);
    border: 1px solid transparent;
}
.wphi-gate-module-active {
    background: #fffbeb;
    border-color: #fde68a;
}
.wphi-gate-module-item .dashicons {
    color: var(--wphi-text-muted);
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    margin-top: 1px;
}
.wphi-gate-module-active .dashicons { color: #d97706 !important; }
.wphi-gate-module-item > div { display: flex; flex-direction: column; gap: 2px; }
.wphi-gate-module-item strong { font-size: 13px; color: var(--wphi-text); }
.wphi-gate-module-item span   { font-size: 12px; color: var(--wphi-text-muted); }
.wphi-gate-module-active strong { color: #92400e; }
.wphi-gate-module-item em { font-size: 11px; color: #d97706; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .wphi-gate-wrap       { padding: var(--wphi-space-md); }
    .wphi-gate-card       { padding: 28px 20px; }
}

/* ============================================================
   New v3 Modules — Shared Components
   ============================================================ */

/* Inline notices */
#wphi-page .wphi-inline-notice {
    border-radius: var(--wphi-radius);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 14px;
    border:1px solid;
    border-left: 16px solid;    
}
#wphi-page .wphi-notice-info  { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }
#wphi-page .wphi-notice-warn  { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
#wphi-page .wphi-notice-error { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
#wphi-page .wphi-notice-info strong,
#wphi-page .wphi-notice-warn strong,
#wphi-page .wphi-notice-error strong { color: inherit; }

/* Section card */
#wphi-page .wphi-section-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: var(--wphi-space-lg);
    box-shadow: var(--wphi-shadow);
    margin-bottom: var(--wphi-space-lg);
}

/* Data table (new modules) */
#wphi-page .wphi-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    overflow: hidden;
}
#wphi-page .wphi-data-table thead th {
    background: var(--wphi-thead-bg);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 12px;
    text-align: left;
    font-weight: 600;
}
#wphi-page .wphi-data-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--wphi-border);
    vertical-align: middle;
    word-break: break-word;
}
#wphi-page .wphi-data-table tbody tr:last-child td { border-bottom: none; }
#wphi-page .wphi-data-table tbody tr:nth-child(even) { background: #f8fafc; }
#wphi-page .wphi-data-table tbody tr:hover { background: #eff6ff; }
#wphi-page .wphi-muted { color: var(--wphi-text-muted) !important; font-size: 12px; }
#wphi-page .wphi-sql  { font-size: 11px; white-space: pre-wrap; word-break: break-all; max-width: 400px; display: block; }

/* Summary banner */
#wphi-page .wphi-summary-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--wphi-shadow);
}
#wphi-page .wphi-summary-icon { font-size: 32px; line-height: 1; }
#wphi-page .wphi-summary-banner strong { font-size: 15px; display: block; margin-bottom: 4px; }

/* Finding cards (RCA) */
#wphi-page .wphi-finding-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-left: 5px solid var(--wphi-border);
    border-radius: 0 var(--wphi-radius) var(--wphi-radius) 0;
    padding: 16px 20px;
    margin-bottom: 14px;
}
#wphi-page .wphi-finding-critical    { border-left-color: var(--wphi-danger); }
#wphi-page .wphi-finding-performance { border-left-color: var(--wphi-warn); }
#wphi-page .wphi-finding-informational { border-left-color: var(--wphi-primary); }
#wphi-page .wphi-finding-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
#wphi-page .wphi-finding-title-row { display: flex; align-items: center; gap: 10px; }
#wphi-page .wphi-finding-severity { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; }
#wphi-page .wphi-finding-title { margin: 0; font-size: 14px; }
#wphi-page .wphi-finding-confidence { font-size: 12px; color: var(--wphi-text-muted); }
#wphi-page .wphi-finding-desc { margin: 0 0 10px; color: var(--wphi-text); font-size: 13px; }
#wphi-page .wphi-finding-evidence,
#wphi-page .wphi-finding-suggestions { font-size: 12px; margin-top: 8px; }
#wphi-page .wphi-finding-evidence ul,
#wphi-page .wphi-finding-suggestions ul { list-style: disc; padding-left: 18px; margin: 6px 0 0; }
#wphi-page .wphi-finding-evidence li { color: #374151; margin-bottom: 3px; }
#wphi-page .wphi-finding-suggestions li { color: var(--wphi-text-muted); margin-bottom: 3px; }

/* Conflict item */
#wphi-page .wphi-conflict-item {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 14px 18px;
    margin-bottom: 12px;
}
#wphi-page .wphi-conflict-header { margin-bottom: 8px; }
#wphi-page .wphi-badge-warn {
    display: inline-block;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Metric grid (profiler) */
#wphi-page .wphi-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
#wphi-page .wphi-metric-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 12px 14px;
}
#wphi-page .wphi-metric-chip .dashicons { font-size: 22px; width: 22px; height: 22px; }

/* Hook timeline */
#wphi-page .wphi-hook-timeline { max-height: 400px; overflow-y: auto; border: 1px solid var(--wphi-border); border-radius: var(--wphi-radius); }
#wphi-page .wphi-timeline-row {
    display: grid;
    grid-template-columns: 200px 1fr 70px 70px;
    gap: 8px;
    align-items: center;
    padding: 5px 12px;
    border-bottom: 1px solid var(--wphi-border);
    font-size: 12px;
}
#wphi-page .wphi-timeline-row:last-child { border-bottom: none; }
#wphi-page .wphi-timeline-hook { color: var(--wphi-text); font-family: var(--wphi-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wphi-page .wphi-timeline-bar-wrap { background: #f3f4f6; border-radius: 3px; height: 6px; }
#wphi-page .wphi-timeline-bar { background: var(--wphi-primary); border-radius: 3px; height: 6px; min-width: 2px; width: var(--bar-pct, 0%); }
#wphi-page .wphi-timeline-time { color: var(--wphi-text-muted); text-align: right; }
#wphi-page .wphi-timeline-delta { color: #48C626; text-align: right; font-size: 11px; }

/* RCA / Profiler page wrappers */
#wphi-page .wphi-rca-wrap,
#wphi-page .wphi-profiler-wrap,
#wphi-page .wphi-conflict-wrap,
#wphi-page .wphi-ext-wrap {
    padding: var(--wphi-space-lg);
    max-width: var(--wphi-content-max);
    margin: 0 auto;
}

/* all-clear */
#wphi-page .wphi-all-clear { color: #48C626; font-weight: 600; }

/* Pointer Cursor */
.wphi-svg-pointer{cursor: pointer !important;}

/* ============================================================
    Utility Classes — replaces scattered inline styles
   ============================================================ */

/* Text colour utilities */
#wphi-page .wphi-text-good       { color: var(--wphi-good); }
#wphi-page .wphi-text-warn       { color: var(--wphi-warn); }
#wphi-page .wphi-text-danger     { color: var(--wphi-danger); }
#wphi-page .wphi-text-wp-danger  { color: #d63638; }   /* WP admin red */
#wphi-page .wphi-text-css-green  { color: green; }     /* literal CSS keyword, distinct from --wphi-good */
#wphi-page .wphi-text-muted-sm   { color: var(--wphi-text-muted); font-size: 11px; }

/* Icon colour */
#wphi-page .wphi-icon-caution { color: #dba617; }

/* ── Cron Inspector ─────────────────────── */
#wphi-page .wphi-section-h3 { margin-top: 40px; }
#wphi-page .wphi-cron-row--custom { color: #d63638; }
#wphi-page .wphi-job-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#wphi-page .wphi-job-badge--std    { background: #00a32a; }
#wphi-page .wphi-job-badge--custom { background: #d63638; }
#wphi-page .wphi-as-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
#wphi-page .wphi-as-stat-card {
    padding: 15px;
    border: 1px solid #ccd0d4;
    background: #fff;
}

/* ── Dashboard ──────────────────────────── */
#wphi-page .wphi-pro-teaser {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--wphi-border);
}
#wphi-page .wphi-pro-teaser .dashicons {
    vertical-align: middle;
    color: var(--wphi-text-light);
    font-size: 14px;
    margin-right: 4px;
}
#wphi-page .wphi-no-wrap { white-space: nowrap; }

/* ── Error Log ──────────────────────────── */
#wphi-page .wphi-all-clear--padded { padding: 20px; }
#wphi-page .wphi-h3-tight          { margin: 0 0 10px; }
#wphi-page .wphi-th-width-90       { width: 90px; }
#wphi-page .wphi-th-width-80       { width: 80px; }
#wphi-page .wphi-sev               { font-weight: 600; }
#wphi-page .wphi-sev--critical     { color: var(--wphi-danger); }
#wphi-page .wphi-sev--performance  { color: var(--wphi-warn); }
#wphi-page .wphi-sev--info         { color: var(--wphi-text-muted); }
#wphi-page .wphi-td-message        { font-size: 12px; word-break: break-word; }
#wphi-page .wphi-td-count          { font-weight: 700; }
#wphi-page .wphi-td-count--high    { color: var(--wphi-danger); }
#wphi-page .wphi-td-file           { font-size: 11px; color: var(--wphi-text-muted); word-break: break-all; }
#wphi-page .wphi-td-muted          { font-size: 11px; color: var(--wphi-text-muted); }

/* ── DB Health ──────────────────────────── */
#wphi-page .wphi-db-warn-critical  { color: #d63638; font-weight: bold; }
#wphi-page .wphi-db-warn-moderate  { color: var(--wphi-warn); font-weight: bold; }
#wphi-page .wphi-p-spaced          { margin: 10px 0; }

/* ── Asset Inspector ────────────────────── */
#wphi-page .wphi-asset-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
#wphi-page .wphi-asset-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
#wphi-page .wphi-th-num  { width: 40px; }
#wphi-page .wphi-th-size { width: 110px; }
#wphi-page .wphi-row--large      { background: rgba(239, 68, 68, .06); }
#wphi-page .wphi-total-row       { font-weight: 700; background: rgba(59, 130, 246, .06); }
#wphi-page .wphi-total-label     { text-align: right; }
#wphi-page .wphi-total-value--over { color: var(--wphi-danger); }

/* ── Inline Pro Gate ────────────────────── */
#wphi-page .wphi-inline-gate {
    text-align: center;
    padding: 28px 24px;
    margin: 8px 0 20px;
    border: 2px dashed var(--wphi-border);
    background: var(--wphi-surface-alt, #f9fafb);
}
#wphi-page .wphi-inline-gate .dashicons {
    font-size: 36px;
    color: var(--wphi-text-light);
    margin-bottom: 10px;
    display: block;
    height: auto;
    width: auto;
}
#wphi-page .wphi-inline-gate-title {
    margin: 0 0 6px;
    font-weight: 600;
    color: var(--wphi-text);
}
#wphi-page .wphi-inline-gate-desc    { margin: 0 0 16px; }
#wphi-page .wphi-inline-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Autoload size threshold warnings */
#wphi-page .wphi-al-warn           { margin-top: 5px; }
#wphi-page .wphi-al-warn--critical { color: #d63638; }
#wphi-page .wphi-al-warn--moderate { color: var(--wphi-warn); }

/* ── Time Bomb ──────────────────────────── */
#wphi-page .wphi-h3-spaced { margin-top: 28px; }

/* ── Report Export ──────────────────────── */
#wphi-page .wphi-card--narrow { max-width: 600px; }
#wphi-page .wphi-card--narrow-pad { max-width: 620px; padding: 20px; }
#wphi-page .wphi-card--branding { max-width: 640px; padding: 20px; }
#wphi-page .wphi-report-list  { list-style: disc; padding-left: 20px; color: #374151; }
#wphi-page .wphi-privacy-note {
    margin-top: 16px;
    padding: 10px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
}
#wphi-page .wphi-form-mt { margin-top: 20px; }

/* ============================================================
   v3.1 ADDITIONS — Bar Charts, Fix Guides, Status Strips,
   Integrity Cards, CLI Blocks, Error Cards, Trend Bars
   ============================================================ */

/* ── Bar Chart (horizontal, CSS-animated) ──────────────────── */
.wphi-bar-chart-wrap {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: 0;
    padding: 16px;
    margin: 4px 0;
}

.wphi-chart-legend {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--wphi-text-muted);
    margin: 0 0 10px;
}

.wphi-chart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}
.wphi-chart-header-row .wphi-chart-legend { margin: 0; }

.wphi-bar-chart { display: flex; flex-direction: column; gap: 6px; }
.wphi-bar-chart--compact .wphi-bar-row { min-height: 22px; }

.wphi-bar-row {
    display: grid;
    grid-template-columns: 180px 1fr 68px;
    align-items: center;
    gap: 8px;
    min-height: 26px;
}
.wphi-bar-row--wide { grid-template-columns: 220px 1fr 80px; }

.wphi-bar-name {
    font-size: 12px;
    font-family: var(--wphi-mono);
    color: var(--wphi-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wphi-bar-track {
    background: #e5e7eb;
    border-radius: 4px;
    height: 16px;
    overflow: hidden;
    position: relative;
}
.wphi-bar-track--sm  { height: 8px; }
.wphi-bar-track--inline { height: 6px; flex: 1; margin-left: 8px; }
.wphi-bar-track--table  { height: 10px; min-width: 60px; max-width: 140px; }

.wphi-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--bar-color, var(--wphi-accent));
    border-radius: 4px;
    transition: width .95s cubic-bezier(.4,0,.2,1);
    will-change: width;
}
.wphi-bars-ready .wphi-bar-fill { width: var(--bar-pct, 0%); }

.wphi-bar-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--wphi-text);
    text-align: right;
    white-space: nowrap;
}

/* ── Status / Summary Strips ────────────────────────────────── */
.wphi-status-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--wphi-radius);
    margin: 14px 16px 0;
    font-weight: 600;
    font-size: 14px;
}
.wphi-status-strip--good     { background:#f0fdf4;border:1px solid #bbf7d0;color:#166534; }
.wphi-status-strip--warning  { background:#fffbeb;border:1px solid #fde68a;color:#92400e; }
.wphi-status-strip--critical { background:#fef2f2;border:1px solid #eaafaf;color:#991b1b; }

.wphi-status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; align-items: center;}

.wphi-db-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.wphi-chip--good,.wphi-badge--good { background:#dcfce7;color:#166534;}
.wphi-chip--warn,.wphi-badge--warn { background:#fef9c3;color:#854d0e;}
.wphi-chip--danger,.wphi-badge--dange { background:#fee2e2;color:#991b1b;}
.wphi-chip--info,.wphi-badge--info    { background:#dbeafe;color:#1e40af;}

.wphi-chip--good,.wphi-badge--good,.wphi-chip--warn,.wphi-badge--warn,.wphi-chip--danger,.wphi-badge--dange,
.wphi-chip--info,.wphi-badge--info { border: 1px solid #666; }

/* ── Badges ──────────────────────────────────────────────────── */
.wphi-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
    line-height: 1.6;
}

.wphi-badge--xs     { font-size:9px;padding:1px 6px;margin-left:4px; }

/* Dynamic-color badge variant: PHP supplies the runtime color plus
   its pre-tinted background/border (same "#rrggbb" + alpha-suffix
   convention used throughout this codebase, e.g. "#ef444422"). */
.wphi-badge--dynamic {
    background: var(--wphi-dyn-bg);
    color: var(--wphi-dyn-color);
    border: 1px solid var(--wphi-dyn-border);
}

/* ── Section blocks ──────────────────────────────────────────── */

.wphi-db-section, .wphi-db-section-flat-top, .wphi-db-section-round-top{
    padding: 20px;
    margin: 14px 0;
    border: 1px solid var(--wphi-border);    
}
.wphi-db-section {
    background: var(--wphi-surface);
    border-radius: var(--wphi-radius-lg);
    border: #4a4a4a6d 1px solid;
}

.wphi-db-section-flat-top {
    background: var(--wphi-surface);
    border-radius: var(--wphi-radius-lg);
    border:#0d6efd 1px solid;
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -16px;
}

.wphi-db-section-round-top {
    background-color:#ddd;
    color: #fff;
    border:#0d6efd 1px solid;
    border-bottom: none;
    border-top-left-radius: var(--wphi-radius-lg);
    border-top-right-radius: var(--wphi-radius-lg);
    margin-bottom: 0;
}

.wphi-db-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--wphi-text);
}
.wphi-db-section-title .dashicons { color: var(--wphi-accent); }

/* ── Integrity Grid ──────────────────────────────────────────── */
.wphi-integrity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.wphi-integrity-card {
    border: 1px solid #bbb;
    border-radius: var(--wphi-radius);
    padding: 12px 14px;
}
.wphi-ic--good   { border: 1px solid var(--wphi-good); border-left: 4px solid var(--wphi-good); }
.wphi-ic--warn   { border: 1px solid var(--wphi-warn);border-left: 4px solid var(--wphi-warn); }
.wphi-ic--danger { border: 1px solid var(--wphi-danger); border-left: 4px solid var(--wphi-danger); }

.wphi-ic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 13px;
}
.wphi-ic-value { font-weight: 700; font-size: 14px; color: var(--wphi-text); }
.wphi-ic-desc  { font-size: 12px; color: var(--wphi-text-muted); margin: 0; line-height: 1.5; }

/* ── Autoload meter ──────────────────────────────────────────── */
.wphi-al-meter-track {
    background: #e5e7eb;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
}
.wphi-al-meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--wphi-text-muted);
    margin-top: 2px;
}

/* ── Fix Guide ───────────────────────────────────────────────── */
.wphi-fix-guide {
    border: 1px solid #d1fae5;
    border-radius: var(--wphi-radius);
    background: #f0fdf4;
    margin-top: 12px;
    overflow: hidden;
}
.wphi-fix-guide summary {
    cursor: pointer;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    list-style: none;
}
.wphi-fix-guide summary::-webkit-details-marker { display: none; }
.wphi-fix-guide summary::after { content:'▶';margin-left:auto;font-size:10px;transition:transform .2s; }
.wphi-fix-guide[open] summary::after { transform:rotate(90deg); }

.wphi-fix-guide--neutral {
    border-color: var(--wphi-border);
    background: #fafafa;
}
.wphi-fix-guide--neutral summary { color: var(--wphi-text); font-size: 12px; }

.wphi-fix-body {
    padding: 4px 14px 14px;
    font-size: 13px;
    line-height: 1.7;
}
.wphi-fix-body p  { margin: 0 0 8px; color: var(--wphi-text); }
.wphi-fix-body ol { margin: 6px 0 8px 20px; color: var(--wphi-text); }
.wphi-fix-body li { margin-bottom: 4px; }

.wphi-fix-note {
    font-size: 12px;
    color: var(--wphi-text-muted);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 8px;
}

/* ── CLI Code Block ──────────────────────────────────────────── */
.wphi-cli-block {
    background: #1e293b;
    border-radius: 6px;
    padding: 12px 14px 12px;
    margin: 8px 0;
    position: relative;
}
.wphi-cli-block code {
    background: none;
    border: none;
    color: #a3e635;
    font-family: var(--wphi-mono);
    font-size: 12px;
    padding: 0;
    word-break: break-all;
    display: block;
    line-height: 1.8;
}
.wphi-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    transition: background .15s;
    line-height: 1.8;
}
.wphi-copy-btn:hover { background: rgba(255,255,255,.2); }

/* ── Inline notices (consistent across modules) ─────────────── */
.wphi-inline-notice      { padding:10px 14px;border-radius:var(--wphi-radius);font-size:13px;margin:10px 0;line-height:1.6; }
.wphi-notice-danger  { background:#fef2f2;border:1px solid #fecaca;color:#991b1b; }
.wphi-notice-warning { background:#fffbeb;border:1px solid #fde68a;color:#92400e; }
.wphi-notice-success { background:#f0fdf4;border:1px solid #bbf7d0;color:#166534; }
.wphi-notice-info    { background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af; }
.wphi-notice-warn    { background:#fffbeb;border:1px solid #fde68a;color:#92400e; } /* alias */

/* ── Error Cards ─────────────────────────────────────────────── */
.wphi-error-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 14px 0;
}
.wphi-error-groups-list { display:flex;flex-direction:column;gap:10px;margin-top:12px; }

.wphi-error-group-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 13px 15px;
    transition: box-shadow .2s;
}
.wphi-error-group-card:hover { box-shadow: var(--wphi-shadow-md); }
.wphi-error-group-card[data-severity="critical"]      { border:1px solid var(--wphi-danger);border-left:4px solid var(--wphi-danger); }
.wphi-error-group-card[data-severity="performance"]   { border:1px solid var(--wphi-warn);border-left:4px solid var(--wphi-warn); }
.wphi-error-group-card[data-severity="informational"] { border:1px solid var(--wphi-accent);border-left:4px solid var(--wphi-accent); }

.wphi-error-group-header {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.wphi-error-level { font-size:11px;background:#f3f4f6;border:1px solid #d1d5db;color:#374151;padding:1px 6px;border-radius:4px; }
.wphi-error-count { font-size:12px;font-weight:600;color:var(--wphi-text-muted);margin-left:auto; }
.wphi-error-count--high { color:var(--wphi-danger); }
.wphi-error-count--med  { color:var(--wphi-warn); }
.wphi-error-time  { font-size:11px;color:var(--wphi-text-muted); }
.wphi-error-message { font-size:13px;font-family:var(--wphi-mono);color:var(--wphi-text);margin:0 0 7px;word-break:break-word;line-height:1.5; }
.wphi-error-meta  { display:flex;align-items:center;gap:9px;margin-bottom:3px; }
.wphi-error-file  { font-size:11px;color:var(--wphi-text-muted);display:flex;align-items:center;gap:3px; }
.wphi-error-file .dashicons { font-size:13px;width:13px;height:13px; }
.wphi-error-group-card.wphi-hidden { display:none; }
#wphi-page .wphi-hidden { display: none; }

/* ── Filter tabs ─────────────────────────────────────────────── */
.wphi-filter-tabs { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;padding:0; }
.wphi-filter-tab {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--wphi-border);
    background: var(--wphi-surface);
    cursor: pointer;
    color: var(--wphi-text-muted);
    transition: all .15s;
}
.wphi-filter-tab:hover          { border-color:var(--wphi-primary);color:var(--wphi-primary); }
.wphi-filter-tab.wphi-tab-active { background:var(--wphi-primary);border-color:var(--wphi-primary);color:#fff; }
.wphi-filter-tab--danger.wphi-tab-active  { background:var(--wphi-danger);border-color:var(--wphi-danger); }
.wphi-filter-tab--warn.wphi-tab-active    { background:var(--wphi-warn);border-color:var(--wphi-warn);color:#fff; }
.wphi-filter-tab--muted.wphi-tab-active   { background:#6b7280;border-color:#6b7280; }

/* ── Asset Inspector stacked bar ────────────────────────────── */
.wphi-asset-stacked-bar { display:flex;height:28px;border-radius:5px;overflow:hidden;margin-bottom:5px; }
.wphi-asset-stacked-js  { background:#3b82f6;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#fff;overflow:hidden;padding:0 5px;transition:width .9s cubic-bezier(.4,0,.2,1);white-space:nowrap;width:var(--bar-pct,0%); }
.wphi-asset-stacked-css { background:#8b5cf6;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#fff;overflow:hidden;padding:0 5px;transition:width .9s cubic-bezier(.4,0,.2,1);white-space:nowrap;width:var(--bar-pct,0%); }
.wphi-asset-stacked-legend { display:flex;gap:14px;font-size:12px;color:var(--wphi-text-muted);align-items:center;flex-wrap:wrap; }
.wphi-dot { display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:3px;vertical-align:middle; }
.wphi-dot--js { background:#3b82f6; } .wphi-dot--css { background:#8b5cf6; }
.wphi-asset-budget-warn { font-weight:600;margin-left:auto; }
.wphi-th-bar { width:120px; }

/* ── Autoload Governor improvements ─────────────────────────── */
.wphi-attr-card {
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 12px 14px;
    background: var(--wphi-surface);
}
.wphi-attr-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:8px; }
.wphi-attr-prefix { font-family:var(--wphi-mono);font-size:13px;font-weight:600;color:var(--wphi-text); }
.wphi-attr-meta   { font-size:11px;color:var(--wphi-text-muted); }
.wphi-attr-grid   { display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:12px; }

/* ── Cron improvements ───────────────────────────────────────── */
.wphi-cron-overdue td { background:#fef2f2 !important; }
.wphi-cron-overdue .wphi-overdue-badge {
    display:inline-flex;
    align-items:center;
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fecaca;
    border-radius:999px;
    font-size:10px;
    font-weight:700;
    padding:1px 8px;
    margin-left:6px;
}

/* ── Performance Baseline trend sparkline ───────────────────── */
.wphi-sparkline-wrap {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 14px;
    margin-bottom: 16px;
}
.wphi-sparkline-row { display:flex;align-items:flex-end;gap:3px;height:60px;padding-top:8px; }
.wphi-sparkline-bar {
    flex: 1;
    background: var(--wphi-primary);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    height: var(--spark-h, 4px);
    transition: height .4s ease;
    position: relative;
}
.wphi-sparkline-bar:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
}
.wphi-sparkline-regressing .wphi-sparkline-bar { background: var(--wphi-danger); }
.wphi-sparkline-improving  .wphi-sparkline-bar { background: var(--wphi-good); }
.wphi-sparkline-stable     .wphi-sparkline-bar { background: var(--wphi-primary); }

/* ── Dashboard improvements ─────────────────────────────────── */
.wphi-health-issue-link { font-size:11px;color:var(--wphi-primary);text-decoration:none;margin-left:4px; }
.wphi-health-issue-link:hover { text-decoration:underline; }
.wphi-stat-chip--clickable { cursor:pointer;transition:box-shadow .15s; }
.wphi-stat-chip--clickable:hover { box-shadow:var(--wphi-shadow-md); }

/* ── Security Audit cleanup ──────────────────────────────────── */
.wphi-sec-role-row     { display:flex;align-items:center;gap:10px;padding:4px 0; }
.wphi-sec-role-count   { font-size:22px;font-weight:700;min-width:40px; }
.wphi-sec-flagged-row  { background:#fef2f2 !important; }
.wphi-sec-cap-pill { display:inline-flex;align-items:center;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:600;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;margin:2px; }
.wphi-sec-section  { background:var(--wphi-surface);border:1px solid var(--wphi-border);border-radius:var(--wphi-radius-lg);padding:20px;margin-bottom:16px; }

/* ── Root Cause Analysis improvements ───────────────────────── */
.wphi-finding-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.wphi-finding-critical    { border-left:5px solid var(--wphi-danger); }
.wphi-finding-performance { border-left:5px solid var(--wphi-warn); }
.wphi-finding-informational { border-left:5px solid var(--wphi-accent); }

/* ── Table search input ──────────────────────────────────────── */
.wphi-table-search-input {
    width: 100%;
    max-width: 360px;
    padding: 6px 10px;
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    font-size: 13px;
    margin-bottom: 10px;
    display: block;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .wphi-error-charts-row { grid-template-columns: 1fr; }
    .wphi-bar-row           { grid-template-columns: 110px 1fr 54px; }
    .wphi-status-strip      { flex-direction: column; align-items: flex-start; }
    .wphi-status-chips      { margin-left: 0; }
    .wphi-integrity-grid    { grid-template-columns: 1fr; }
    .wphi-attr-grid         { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .wphi-filter-tabs       { gap: 6px; }
    .wphi-error-group-header { flex-direction: column; align-items: flex-start; }
    .wphi-error-count       { margin-left: 0; }
}

/* ============================================================
   Error Log — Code Snippet Block
   ============================================================ */
.wphi-error-filepath{display:flex;align-items:flex-start;gap:6px;flex:1;min-width:0;}
.wphi-error-filepath .dashicons{font-size:13px;width:13px;height:13px;flex-shrink:0;margin-top:2px;color:var(--wphi-text-muted);}
.wphi-error-filepath-text{font-size:11px;font-family:var(--wphi-mono);color:var(--wphi-text-muted);word-break:break-all;line-height:1.5;}
.wphi-error-lineno{color:var(--wphi-danger);font-size:12px;}
.wphi-copy-path-btn{flex-shrink:0;background:none;border:1px solid var(--wphi-border);border-radius:4px;font-size:12px;padding:0 5px;cursor:pointer;color:var(--wphi-text-muted);line-height:1.6;transition:background .15s,color .15s;}
.wphi-copy-path-btn:hover{background:var(--wphi-primary);color:#fff;border-color:var(--wphi-primary);}
.wphi-fix-location{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#f8fafc;border:1px solid var(--wphi-border);border-radius:6px;padding:8px 12px;margin-bottom:10px;font-size:12px;}
.wphi-fix-location strong{color:var(--wphi-text);white-space:nowrap;}
.wphi-fix-filepath{font-family:var(--wphi-mono);font-size:11px;background:none;border:none;padding:0;color:var(--wphi-primary);word-break:break-all;flex:1;}
.wphi-copy-btn--sm{position:static;font-size:12px;margin: 0 18px;padding:2px 7px;background:var(--wphi-primary);color:#fff;border-color:var(--wphi-primary);border-radius:4px;cursor:pointer;white-space:nowrap;transition:background .15s;flex-shrink:0;}
.wphi-copy-btn--sm:hover{background:rgba(0,0,0,.05);color:var(--wphi-text-muted);border:1px solid var(--wphi-border);}
.wphi-code-snippet{border:1px solid #2d3748;border-radius:6px;overflow:hidden;margin-bottom:12px;font-size:12px;}
.wphi-code-header{display:flex;align-items:center;justify-content:space-between;background:#2d3748;padding:5px 12px;font-size:11px;color:#a0aec0;font-family:var(--wphi-mono);}
.wphi-code-hint{color:#fc8181;}
.wphi-code-pre{background:#1a202c;margin:0;padding:8px 0;overflow-x:auto;font-size:12px;line-height:1.7;white-space:pre;font-family:var(--wphi-mono);color:#e2e8f0;}
.wphi-code-line{display:block;padding:0 12px;white-space:pre;}
.wphi-code-line--error{background:rgba(245,101,101,.18);border-left:3px solid #fc8181;padding-left:9px;}
.wphi-code-gutter{display:inline-block;min-width:48px;color:#4a5568;user-select:none;font-size:11px;}
.wphi-code-line--error .wphi-code-gutter{color:#fc8181;}
.wphi-dispatcher-note{display:flex;align-items:flex-start;gap:8px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;padding:10px 12px;margin-bottom:12px;font-size:12px;color:#1e40af;line-height:1.6;}
.wphi-dispatcher-note .dashicons{flex-shrink:0;font-size:16px;width:16px;height:16px;margin-top:1px;}
.wphi-dispatcher-note--warn{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.wphi-dispatcher-note code{background:rgba(0,0,0,.06);padding:1px 4px;border-radius:3px;font-size:11px;}
.wphi-find-caller-steps{background:#fafafa;border:1px solid var(--wphi-border);border-radius:6px;padding:12px 14px;margin-bottom:12px;font-size:13px;}
.wphi-find-caller-steps p{margin:0 0 6px;}
.wphi-find-caller-steps ol{margin:0 0 8px 18px;}
.wphi-find-caller-steps li{margin-bottom:6px;line-height:1.6;}

/* ============================================================
   Unified Visual Timeline — matches plugin design system
   ============================================================ */

/* Section head — extends .wphi-db-section-title layout */
.wphi-tl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.wphi-tl-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.wphi-tl-head-actions .description { white-space: nowrap; }

/* Legend bar */
.wphi-tl-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--wphi-text-muted);
    margin-bottom: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--wphi-border);
    border-bottom: 1px solid var(--wphi-border);
}
.wphi-tl-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.wphi-tl-legend-corr-icon {
    display: inline-block;
    width: 18px;
    height: 8px;
    border-bottom: 2px solid #9ca3af;
    border-right: 2px solid #9ca3af;
    border-radius: 0 0 4px 0;
    margin-right: 2px;
}
.wphi-tl-legend-hint {
    margin-left: auto;
    font-style: italic;
    color: var(--wphi-text-light);
}

/* Canvas wrapper */
.wphi-tl-canvas-wrap {
    position: relative;
    width: 100%;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    overflow: hidden;
    min-height: 100px;
    box-shadow: var(--wphi-shadow);
}
.wphi-tl-svg { display: block; width: 100%; }

/* Tooltip */
.wphi-tl-tooltip {
    position: absolute;
    background: var(--wphi-head-bg);
    color: var(--wphi-head-fg);
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: var(--wphi-radius);
    pointer-events: none;
    max-width: 280px;
    white-space: normal;
    z-index: 200;
    opacity: 0;
    transition: opacity .1s;
    box-shadow: var(--wphi-shadow-md);
}
.wphi-tl-tip-on { opacity: 1; }

/* Detail panel — reuses .wphi-card */
.wphi-tl-detail-panel {
    position: relative;
    margin-top: 10px;
    animation: wphiTlSlide .2s ease;
}
@keyframes wphiTlSlide { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.wphi-tl-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* What Changed full-page chronological list */
.wphi-wc-timeline  { display: flex; flex-direction: column; }
.wphi-wc-day-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 8px;
}
.wphi-wc-day-divider > span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--wphi-text-muted);
    background: var(--wphi-bg);
    padding: 0 8px 0 0;
    white-space: nowrap;
}
.wphi-wc-day-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wphi-border);
}

.wphi-wc-entry {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 6px;
}
.wphi-wc-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 38px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.wphi-wc-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: var(--wphi-shadow);
}
.wphi-wc-dot-icon { font-size: 9px; line-height: 1; }
.wphi-wc-line { width: 2px; flex: 1; min-height: 12px; background: var(--wphi-border); margin-top: 2px; }

.wphi-wc-card {
    flex: 1;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 8px 12px;
    margin-left: 6px;
    margin-bottom: 2px;
    min-width: 0;
    box-shadow: var(--wphi-shadow);
}
.wphi-wcc--error.wphi-wcc--critical      { border-left: 3px solid var(--wphi-danger); }
.wphi-wcc--error.wphi-wcc--performance   { border-left: 3px solid var(--wphi-warn); }
.wphi-wcc--error.wphi-wcc--informational { border-left: 3px solid #d1d5db; }
.wphi-wcc--change                        { border-left: 3px solid var(--wphi-accent); }

.wphi-wc-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.wphi-wc-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid;
}
.wphi-wc-time  { font-size: 11px; color: var(--wphi-text-muted); margin-left: auto; white-space: nowrap; }
.wphi-wc-count { font-size: 11px; font-weight: 700; color: var(--wphi-danger); }
.wphi-wc-label { font-size: 13px; font-weight: 600; color: var(--wphi-text); margin: 0 0 2px; word-break: break-word; line-height: 1.4; }
.wphi-wc-filepath { display:flex;align-items:center;gap:4px;font-size:11px;font-family:var(--wphi-mono);color:var(--wphi-text-muted);margin-top:4px;word-break:break-all;flex-wrap:wrap; }
.wphi-wc-filepath .dashicons { font-size:12px;width:12px;height:12px;flex-shrink:0; }
.wphi-wc-last-seen { font-size:10px;color:var(--wphi-text-muted);margin:2px 0 0; }
.wphi-wc-end-cap { display:flex;align-items:center;padding:10px 0 0 10px;gap:0; }

/* Responsive */
@media (max-width: 782px) {
    .wphi-tl-section-head { flex-direction: column; align-items: flex-start; }
    .wphi-tl-legend       { gap: 8px; }
    .wphi-tl-legend-hint  { display: none; }
}


/* ============================================================
   WPHI Table Pagination — v3.1.0
   ============================================================ */

.wphi-pg-hidden     { display: none !important; }
.wphi-search-hidden { display: none !important; }

/* Outer wrapper */
.wphi-pg-wrap { margin: 0; }

/* Shared bar (top + bottom) */
.wphi-pg-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    flex-wrap: wrap;
}
.wphi-pg-bar--top { border-bottom: 1px solid var(--wphi-border, #e5e7eb); margin-bottom: 0; padding: 10px 8px; }
.wphi-pg-bar--bot { border-top:    1px solid var(--wphi-border, #e5e7eb); margin-top:    0; padding: 10px 8px; }

.wphi-pg-side {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Size selector */
.wphi-pg-size-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--wphi-text-muted, #6b7280);
}
.wp-core-ui select.wphi-pg-size-sel {
    font-size: 12px;
    padding: 2px 20px 2px 8px;
    border: 1px solid var(--wphi-border, #e5e7eb);
    border-radius: var(--wphi-radius, 6px);
    color: var(--wphi-text, #111827);
    cursor: pointer;
    min-height: 28px;
}
.wphi-pg-size-sel:focus { outline: 2px solid var(--wphi-accent, #3b82f6); outline-offset: 1px; }

/* Info text (bottom left) */
.wphi-pg-info {
    font-size: 12px;
    color: var(--wphi-text-muted, #9ca3af);
    white-space: nowrap;
    padding: 0 2px;
}

/* Nav buttons container */
.wphi-pg-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

/* Individual nav buttons */
.wphi-pg-btn {
    min-width: 30px;
    height: 28px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--wphi-border, #e5e7eb);
    border-radius: var(--wphi-radius, 6px);
    background: var(--wphi-surface, #fff);
    color: var(--wphi-text, #374151);
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    line-height: 1;
    white-space: nowrap;
}
.wphi-pg-btn:hover:not(:disabled) {
    border-color: var(--wphi-accent, #3b82f6);
    color: var(--wphi-accent, #3b82f6);
    background: var(--wphi-accent-light, #eff6ff);
}
.wphi-pg-btn:disabled { opacity: 0.35; cursor: default; }
.wphi-pg-btn--active {
    background: var(--wphi-accent, #3b82f6) !important;
    border-color: var(--wphi-accent, #3b82f6) !important;
    color: #fff !important;
    font-weight: 700;
}
.wphi-pg-ellipsis {
    padding: 0 3px;
    color: var(--wphi-text-muted, #9ca3af);
    font-size: 12px;
    line-height: 28px;
}

/* Scroll container — active class applied by JS when showing > 25 rows */
.wphi-pg-scroll { }
.wphi-pg-scroll--active {
    max-height: 620px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--wphi-border, #e5e7eb);
    border-radius: var(--wphi-radius, 6px);
}
/* Sticky header inside the scroll container */
.wphi-pg-scroll--active thead th,
.wphi-pg-scroll--active thead td {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--wphi-surface, #fff);
    box-shadow: 0 1px 0 var(--wphi-border, #e5e7eb);
}
/* When scroll-wrap has border, remove table's own border to avoid doubling */
.wphi-pg-scroll--active > table {
    border: none;
    border-radius: 0;
    margin: 0;
}

/* ============================================================
   Bar chart custom hover tooltip (replaces native title delay)
   ============================================================ */
#wphi-page .wphi-bar-name {
    position: relative;
    cursor: default;
}
/* Tooltip bubble */
#wphi-page .wphi-bar-name::after {
    content: attr(data-label);
    display: block;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: var(--wphi-head-bg, #1e293b);
    color: var(--wphi-head-fg, #f1f5f9);
    font-size: 12px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: var(--wphi-radius, 6px);
    white-space: normal;
    max-width: 320px;
    min-width: 120px;
    word-break: break-word;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
    z-index: 50;
}
/* Arrow */
#wphi-page .wphi-bar-name::before {
    content: '';
    display: block;
    position: absolute;
    bottom: calc(100% + 1px);
    left: 14px;
    border: 5px solid transparent;
    border-top-color: var(--wphi-head-bg, #1e293b);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
    z-index: 51;
}
#wphi-page .wphi-bar-name:hover::after,
#wphi-page .wphi-bar-name:hover::before {
    opacity: 1;
    transform: translateY(0);
}
/* Don't show tooltip if data-label is empty */
#wphi-page .wphi-bar-name:not([data-label])::after,
#wphi-page .wphi-bar-name:not([data-label])::before { display: none; }

/* ============================================================
   Blue / primary buttons — always white text
   ============================================================ */
#wphi-page .button.wphi-button-primary,
#wphi-page .button.wphi-button-primary:hover,
#wphi-page .button.wphi-button-primary:focus,
#wphi-page .button.wphi-button-primary:active,
#wphi-page a.button.wphi-button-primary,
#wphi-page a.button.wphi-button-primary:hover,
.wphi-pg-btn--active,
.wphi-pg-btn--active:hover {
    color: #fff !important;
    text-decoration: none;
}

/* ============================================================
   Error Map — structured fix guide sections
   ============================================================ */

/* Section wrapper */
.wphi-fix-map-section {
    border-left: 3px solid var(--wphi-border, #e5e7eb);
    padding: 8px 0 8px 14px;
    margin-bottom: 14px;
}
.wphi-fix-map-section:last-child { margin-bottom: 0; }
.wphi-fix-map-section--prevention {
    border-left-color: #48C626;
    background: #f0fdf422;
    border-radius: 0 var(--wphi-radius, 6px) var(--wphi-radius, 6px) 0;
    padding-right: 10px;
}

/* Section label */
.wphi-fix-map-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--wphi-text-muted, #6b7280);
    margin-bottom: 5px;
}

/* Section body text */
.wphi-fix-map-text {
    font-size: 13px;
    line-height: 1.65;
    color: var(--wphi-text, #111827);
    margin: 0;
}
.wphi-fix-map-text code {
    background: var(--wphi-bg, #f3f4f6);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--wphi-text, #111827);
}

/* Impact coloring */
.wphi-fix-impact { padding: 6px 10px; border-radius: var(--wphi-radius, 6px); }
.wphi-fix-impact--critical     { background: #fef2f2; color: #991b1b; }
.wphi-fix-impact--performance  { background: #fffbeb; color: #92400e; }
.wphi-fix-impact--informational{ background: #eff6ff; color: #1e40af; }

/* Numbered fix steps */
.wphi-fix-steps {
    margin: 4px 0 0 0;
    padding-left: 22px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--wphi-text, #111827);
}
.wphi-fix-steps li {
    margin-bottom: 6px;
}
.wphi-fix-steps li:last-child { margin-bottom: 0; }
.wphi-fix-steps code {
    background: var(--wphi-bg, #f3f4f6);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}


/* ============================================================
    Utilities (text, layout, spacing)
   ============================================================ */

/* Text color/size utilities */
#wphi-page .wphi-text-muted-xs    { color: var(--wphi-text-muted); font-size: 11px; }
#wphi-page .wphi-text-light-xs    { color: var(--wphi-text-light); font-size: 11px; }
#wphi-page .wphi-text-xs          { font-size: 11px; }
#wphi-page .wphi-text-10          { font-size: 10px; }
#wphi-page .wphi-text-sm          { font-size: 12px; }
#wphi-page .wphi-text-13          { font-size: 13px; }
#wphi-page .wphi-text-14          { font-size: 14px; }
#wphi-page .wphi-text-18          { font-size: 18px; }
#wphi-page .wphi-text-bold        { font-weight: 700; }
#wphi-page .wphi-text-semibold    { font-weight: 600; }
#wphi-page .wphi-text-mono-xs     { font-family: var(--wphi-mono); font-size: 11px; }
#wphi-page .wphi-text-mono-sm     { font-family: var(--wphi-mono); font-size: 12px; }
#wphi-page .wphi-cursor-link      { cursor: pointer; font-size: 12px; color: var(--wphi-primary); }
#wphi-page .wphi-word-break-all   { word-break: break-all; }

/* Flex layout utilities */
#wphi-page .wphi-flex-row              { display: flex; align-items: center; }
#wphi-page .wphi-flex-row-gap-sm       { display: flex; align-items: center; gap: 8px; }
#wphi-page .wphi-flex-row-gap-md       { display: flex; align-items: center; gap: 10px; }
#wphi-page .wphi-flex-row-wrap         { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
#wphi-page .wphi-flex-1                { flex: 1; }
#wphi-page .wphi-flex-shrink-0         { flex-shrink: 0; }
#wphi-page .wphi-mt-neg4               { margin-top: -4px; }
#wphi-page .wphi-align-stretch         { align-items: stretch; }
#wphi-page .wphi-ml-5                  { margin-left: 5px; }
#wphi-page .wphi-ml-auto               { margin-left: auto; }
#wphi-page .wphi-ml-10                 { margin-left: 10px; }
#wphi-page .wphi-ml-8                  { margin-left: 8px; }

/* Spacing utilities */
#wphi-page .wphi-mt-0   { margin-top: 0; }
#wphi-page .wphi-mt-1   { margin-top: 1px; }
#wphi-page .wphi-mt-2   { margin-top: 2px; }
#wphi-page .wphi-mt-4   { margin-top: 4px; }
#wphi-page .wphi-mt-6   { margin-top: 6px; }
#wphi-page .wphi-mt-8   { margin-top: 8px; }
#wphi-page .wphi-mt-10  { margin-top: 10px; }
#wphi-page .wphi-mt-12  { margin-top: 12px; }
#wphi-page .wphi-mt-14  { margin-top: 14px; }
#wphi-page .wphi-mt-16  { margin-top: 16px; }
#wphi-page .wphi-mt-18  { margin-top: 18px; }
#wphi-page .wphi-mt-20  { margin-top: 20px; }
#wphi-page .wphi-mt-24  { margin-top: 24px; }
#wphi-page .wphi-mt-28  { margin-top: 28px; }
#wphi-page .wphi-mt-40  { margin-top: 40px; }
#wphi-page .wphi-mb-0   { margin-bottom: 0; }
#wphi-page .wphi-mb-4   { margin-bottom: 4px; }
#wphi-page .wphi-mb-5   { margin-bottom: 5px; }
#wphi-page .wphi-mb-6   { margin-bottom: 6px; }
#wphi-page .wphi-mb-8   { margin-bottom: 8px; }
#wphi-page .wphi-mb-10  { margin-bottom: 10px; }
#wphi-page .wphi-mb-12  { margin-bottom: 12px; }
#wphi-page .wphi-mb-14  { margin-bottom: 14px; }
#wphi-page .wphi-mb-16  { margin-bottom: 16px; }
#wphi-page .wphi-mb-20  { margin-bottom: 20px; }

/* Sizing utilities (column/box widths used in tables and badges) */
#wphi-page .wphi-w-60   { width: 60px; }
#wphi-page .wphi-w-70   { width: 70px; }
#wphi-page .wphi-w-75   { width: 75px; }
#wphi-page .wphi-w-80   { width: 80px; }
#wphi-page .wphi-w-90   { width: 90px; }
#wphi-page .wphi-w-100  { width: 100px; }
#wphi-page .wphi-w-110  { width: 110px; }
#wphi-page .wphi-w-120  { width: 120px; }
#wphi-page .wphi-w-130  { width: 130px; }
#wphi-page .wphi-w-140  { width: 140px; }
#wphi-page .wphi-w-150  { width: 150px; }
#wphi-page .wphi-w-160  { width: 160px; }
#wphi-page .wphi-w-180  { width: 180px; }
#wphi-page .wphi-w-200  { width: 200px; }
#wphi-page .wphi-w-220  { width: 220px; }
#wphi-page .wphi-w-240  { width: 240px; }
#wphi-page .wphi-w-280  { width: 280px; }

/* ============================================================
    Dynamic Color Components (CSS custom properties)
   ============================================================ */

/* A piece of text colored by a runtime value (status/severity color
   computed in PHP or JS). Set --wphi-dyn-color on the element. */
#wphi-page .wphi-dyn-text {
    color: var(--wphi-dyn-color);
}

/* Small uppercase pill colored by a runtime value, e.g. severity or
   confidence-score badges. --wphi-dyn-bg is the same color with an
   alpha suffix already appended in PHP/JS (the codebase's existing
   convention, e.g. "#ef444422"), so no CSS color-mixing is needed. */
#wphi-page .wphi-dyn-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--wphi-dyn-bg);
    color: var(--wphi-dyn-color);
    border: 1px solid var(--wphi-dyn-border, transparent);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}
#wphi-page .wphi-dyn-pill--uc {
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
#wphi-page .wphi-dyn-pill--sm  { padding: 1px 6px; font-size: 9px; }
#wphi-page .wphi-dyn-pill--lg  { padding: 3px 10px; font-size: 11px; }

/* Solid (filled) version for high-visibility badges */
#wphi-page .wphi-dyn-pill-solid {
    display: inline-block;
    background: var(--wphi-dyn-color);
    color: #fff;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 3px;
}

/* Left accent border colored by a runtime value */
#wphi-page .wphi-dyn-accent-left {
    border: 1px solid var(--wphi-dyn-color);
    border-left: 4px solid var(--wphi-dyn-color);
}
#wphi-page .wphi-dyn-accent-left--thin {
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--wphi-dyn-color);
    border-radius: 6px;
    padding: 11px 14px;
    margin-bottom: 10px;
}

/* Big numeric stat colored by a runtime value */
#wphi-page .wphi-dyn-num {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--wphi-dyn-color);
}

/* ============================================================
    Component Extras (modals, summary tiles, metric cards)
   ============================================================ */

/* Row-detail modal (What Changed? + DB Health "Chronological Event
   Log" / "Error Onset Analysis" click-through detail) */
#wphi-page .wphi-row-modal-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#wphi-page .wphi-row-modal-box {
    background: #fff;
    border-radius: var(--wphi-radius-lg);
    width: min(92vw, 660px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
#wphi-page .wphi-row-modal-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
#wphi-page .wphi-row-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
#wphi-page .wphi-row-detail-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}
#wphi-page .wphi-row-detail-label { color: var(--wphi-text-muted); }
#wphi-page .wphi-row-detail-value { font-weight: 600; text-align: right; }
#wphi-page .wphi-row-detail-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}
#wphi-page .wphi-row-nearest-card {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
#wphi-page .wphi-row-nearest-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wphi-text-muted);
    margin-bottom: 6px;
}
#wphi-page .wphi-row-nearest-empty { color: var(--wphi-text-light); font-size: 13px; margin-top: 10px; }
#wphi-page .wphi-row-nearest-plugin { font-size: 11px; color: var(--wphi-text-muted); margin-top: 2px; font-family: var(--wphi-mono); }
#wphi-page .wphi-row-nearest-ts { font-size: 11px; color: var(--wphi-text-light); margin-top: 4px; }

/* Summary tile grid (used by Cron Inspector, Abandonment Radar,
   Hosting Benchmark, Blast Radius, Security Audit headline stats) */
#wphi-page .wphi-br-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
#wphi-page .wphi-br-summary-tile {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius);
    padding: 14px;
    text-align: center;
}
#wphi-page .wphi-br-summary-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--tile-color, var(--wphi-text));
}
#wphi-page .wphi-br-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wphi-text-muted);
    margin-top: 4px;
}

/* DB Health metric cards (Autoload size, Orphaned postmeta,
   Revisions, etc.) — accent stripe + big colored number */
#wphi-page .wphi-dbh-visual-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
#wphi-page .wphi-dbh-metric-card {
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-top: 3px solid var(--card-accent, var(--wphi-accent));
    border-radius: var(--wphi-radius);
    padding: 14px;
}
#wphi-page .wphi-big-num {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--card-accent, var(--wphi-text));
}

/* Compact "flat" bar chart wrap used inside metric cards (no border/
   background/padding, just the bar itself) */
#wphi-page .wphi-dbh-bar-wrap { width: 100%; margin-top: 6px; }
#wphi-page .wphi-bar-chart-wrap--flat {
    padding: 6px 0;
    background: none;
    border: none;
    margin: 0;
}

/* Orphaned-rows comparison bars (DB Health) */
#wphi-page .wphi-orphan-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
#wphi-page .wphi-orphan-label {
    width: 90px;
    font-size: 12px;
    color: var(--wphi-text-muted);
    flex-shrink: 0;
}
#wphi-page .wphi-orphan-track {
    flex: 1;
    background: #e5e7eb;
    border-radius: 4px;
    height: 10px;
    overflow: hidden;
}
#wphi-page .wphi-orphan-fill {
    height: 100%;
    width: var(--bar-pct, 0%);
    background: var(--bar-color, var(--wphi-accent));
    border-radius: 4px;
}
#wphi-page .wphi-orphan-count {
    width: 60px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

#wphi-page .wphi-dbh-no-info { margin: 10px 0; color: #d63638; }
#wphi-page .wphi-dbh-stat-num { font-size: 18px; color: var(--wphi-dyn-color); }
#wphi-page .wphi-options-audit-row { margin-bottom: 16px; display: flex; gap: 24px; flex-wrap: wrap; }
#wphi-page .wphi-my-8-0 { margin: 8px 0; }
#wphi-page .wphi-fw-500 { font-weight: 500; }
#wphi-page .wphi-fw-600 { font-weight: 600; }
#wphi-page .wphi-fw-700 { font-weight: 700; }
#wphi-page .wphi-my-6-0 { margin: 6px 0; }
#wphi-page .wphi-flex-row-gap-16-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#wphi-page .wphi-dbh-alert { margin: 4px 0 0; font-weight: 600; }
#wphi-page .wphi-dbh-alert--danger { color: #ef4444; }
#wphi-page .wphi-dbh-alert--warn { color: #f59e0b; }
#wphi-page .wphi-nowrap { white-space: nowrap; }

/* Plugin version + action buttons toolbar row (Pre-Update Impact) */
#wphi-page .wphi-version-actions-row {
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
#wphi-page .wphi-pua-impact-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
#wphi-page .wphi-gauge-label { text-align: center; }
#wphi-page .wphi-gauge-caption {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--wphi-dyn-color);
}
#wphi-page .wphi-pua-summary-col { min-width: 180px; }
#wphi-page .wphi-pua-impact-intro { font-size: 13px; font-weight: 600; color: var(--wphi-text); margin: 0 0 8px; }
#wphi-page .wphi-pua-impact-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.8; }
#wphi-page .wphi-summary-toggle { cursor: pointer; font-size: 11px; }
#wphi-page .wphi-pua-hooks-list { margin: 6px 0 0; padding-left: 14px; font-size: 11px; }
#wphi-page .wphi-pua-tables-list { margin: 4px 0 0; padding-left: 14px; font-size: 11px; font-family: var(--wphi-mono); }
#wphi-page .wphi-pua-mono-line { font-family: var(--wphi-mono); font-size: 10px; margin-top: 3px; }
#wphi-page .wphi-pua-error-line { margin-top: 3px; font-size: 11px; }

/* What Changed? — Blame Report */
#wphi-page .wphi-blame-report-section { margin-bottom: 16px; }
#wphi-page .wphi-blame-report-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 6px 0 10px;
}
#wphi-page .wphi-blame-score-col { text-align: center; min-width: 90px; }
#wphi-page .wphi-blame-score-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wphi-text-muted);
}
#wphi-page .wphi-blame-narrative { flex: 1; min-width: 240px; font-size: 13px; line-height: 1.5; }
#wphi-page .wphi-blame-timing-note { color: var(--wphi-text-muted); font-size: 13px; }
#wphi-page .wphi-text-muted-inherit { color: var(--wphi-text-muted); font-size: inherit; }

/* ── Critical Diagnostics panel (triage layer above the Error Log) ── */
#wphi-page .wphi-critical-diagnostics { margin: 0 0 20px; }
#wphi-page .wphi-critical-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
#wphi-page .wphi-crit-icon { font-size: 22px; }
#wphi-page .wphi-crit-title { margin: 0; font-size: 18px; color: #b32d2e; }
#wphi-page .wphi-crit-count {
    background: #b32d2e;
    color: #fff;
    border-radius: 10px;
    padding: 1px 9px;
    font-size: 12px;
    font-weight: 700;
}
#wphi-page .wphi-crit-card {
    border: 1px solid #ef4444;
    border-left: 4px solid var(--wphi-dyn-color);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    padding: 14px 16px;
    margin-bottom: 12px;
}
#wphi-page .wphi-crit-card-head { display: flex; align-items: center; gap: 8px; }
#wphi-page .wphi-crit-card-title { margin: 0; font-size: 15px; flex: 1; }
#wphi-page .wphi-crit-card-meta { font-size: 12px; color: #777; }
#wphi-page .wphi-crit-explainer {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}
#wphi-page .wphi-crit-explainer--danger { background: #fcf0f1; }
#wphi-page .wphi-crit-explainer--warn   { background: #fcf9e8; }
#wphi-page .wphi-crit-location {
    margin: 8px 0;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    color: #444;
}
#wphi-page .wphi-crit-location-line { color: #b32d2e; }
#wphi-page .wphi-crit-context { margin: 8px 0; font-size: 12px; color: #666; }
#wphi-page .wphi-crit-allclear {
    padding: 12px 16px;
    background: #edfaef;
    border-left: 4px solid #00a32a;
    border-radius: 6px;
}
#wphi-page .wphi-crit-allclear-title { font-weight: 600; color: #00712a; }
#wphi-page .wphi-crit-allclear-body { color: #3c613c; }

/* ── Early-Boot Capture notice + modal ── */
#wphi-page .wphi-eb-notice { border-left-color: #2271b1; padding: 14px 16px; position: relative; }
#wphi-page .wphi-eb-title { margin: 0 0 6px; font-size: 15px; }
#wphi-page .wphi-eb-intro { margin: 0 0 10px; max-width: 760px; }
#wphi-page .wphi-eb-muted-link { color: #646970; }
#wphi-page .wphi-eb-subnotice { margin: 8px 0 0; padding: 10px 12px; }
#wphi-page .wphi-eb-steps { margin: 0 0 6px 18px; }
#wphi-page .wphi-eb-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0,0,0,.5);
}
#wphi-page .wphi-eb-modal-box {
    max-width: 640px;
    margin: 6vh auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    padding: 24px 28px;
    max-height: 84vh;
    overflow: auto;
}
#wphi-page .wphi-eb-list { list-style: disc; margin-left: 20px; }
#wphi-page .wphi-eb-actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; }

/* ── Export Report admin settings page ── */
#wphi-page .wphi-card--export-report { max-width: 600px; }
#wphi-page .wphi-export-report-list { list-style: disc; padding-left: 20px; color: #374151; }
#wphi-page .wphi-export-report-notice {
    margin-top: 16px;
    padding: 10px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
}

/* ── Cron Inspector: 24h density chart, ratio bar, AS cards, job badge ── */
#wphi-page .wphi-cron-density-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 40px;
}
#wphi-page .wphi-cron-hour-bar {
    flex: 1;
    height: 2px; /* placeholder until JS sets the real height from data-count */
    background: var(--wphi-primary);
    opacity: .7;
    border-radius: 1px 1px 0 0;
    transition: height .6s ease;
}
#wphi-page .wphi-cron-hour-bar--overdue { background: var(--wphi-danger); opacity: 1; }
#wphi-page .wphi-cron-legend-row { display: flex; gap: 16px; margin-top: 8px; font-size: 11px; }
#wphi-page .wphi-cron-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
}
#wphi-page .wphi-cron-legend-swatch--scheduled { background: var(--wphi-primary); opacity: .7; }
#wphi-page .wphi-cron-legend-swatch--overdue { background: var(--wphi-danger); }

#wphi-page .wphi-ratio-bar {
    display: flex;
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
    background: #e5e7eb;
}
#wphi-page .wphi-ratio-segment { height: 100%; }
#wphi-page .wphi-ratio-segment--wp { background: #3b82f6; }
#wphi-page .wphi-ratio-segment--custom { background: #0891b2; }
#wphi-page .wphi-ratio-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; }
#wphi-page .wphi-ratio-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
}
#wphi-page .wphi-ratio-legend-swatch--wp { background: #3b82f6; }
#wphi-page .wphi-ratio-legend-swatch--custom { background: #0891b2; }

#wphi-page .wphi-cron-job-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--wphi-dyn-bg);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#wphi-page .wphi-cron-as-cards { display: flex; gap: 20px; margin-bottom: 20px; }
#wphi-page .wphi-cron-as-card { padding: 15px; border: 1px solid #ccd0d4; background: #fff; }
#wphi-page .wphi-text-css-red { color: red; }

/* ── Dashboard: PRO badge, stat chips, error/changes panels, donut ── */
#wphi-page .wphi-pro-badge {
    background: #3b82f622;
    color: #7dd3fc;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 6px;
}
#wphi-page .wphi-issue-view-link { margin-left: 6px; font-size: 11px; white-space: nowrap; }
#wphi-page .wphi-stat-label--linked { text-decoration: underline 2px; color: var(--wphi-dyn-color); }
#wphi-page .wphi-text-purple { color: #8b5cf6; }
#wphi-page .wphi-text-purple-15 { color: #8b5cf6; font-size: 15px; }
#wphi-page .wphi-text-danger-15 { color: #ef4444; font-size: 15px; }

#wphi-page .wphi-dash-panel {
    flex: 1 1 auto;
    background: var(--wphi-surface);
    border: 1px solid var(--wphi-border);
    border-radius: var(--wphi-radius-lg);
    padding: 14px 16px;
    min-width: 0;
}
#wphi-page .wphi-dash-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#wphi-page .wphi-dash-panel-title { font-size: 13px; color: var(--wphi-text); }
#wphi-page .wphi-dash-panel-link { margin-left: auto; font-size: 11px; }
#wphi-page .wphi-dash-error-row { padding: 4px 8px; margin-bottom: 5px; font-size: 11px; }
#wphi-page .wphi-dash-error-msg { color: var(--wphi-text); margin-left: 5px; }
#wphi-page .wphi-dash-change-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; font-size: 11px; }
#wphi-page .wphi-dash-change-label { color: var(--wphi-text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#wphi-page .wphi-donut-section { margin: 0 16px 16px; }
#wphi-page .wphi-donut-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
}
#wphi-page .wphi-donut-swatch--critical { background: #ef4444; }
#wphi-page .wphi-donut-swatch--warning { background: #f59e0b; }

/* ── Asset Inspector: type swatches, histogram bars, url cell ── */
#wphi-page .wphi-asset-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}
#wphi-page .wphi-asset-swatch--js  { background: #f59e0b; }
#wphi-page .wphi-asset-swatch--css { background: #3b82f6; }
#wphi-page .wphi-asset-hist-track { background: #e5e7eb; border-radius: 4px; height: 8px; overflow: hidden; flex: 1; }
#wphi-page .wphi-asset-hist-fill {
    height: 100%;
    width: var(--bar-pct, 0%);
    background: var(--bar-color, var(--wphi-accent));
    border-radius: 4px;
    transition: width .9s cubic-bezier(.4,0,.2,1);
}
#wphi-page .wphi-url-cell { font-size: 11px; word-break: break-all; }

/* ── Abandonment Radar ── */
#wphi-page .wphi-notice--closed-plugin { border-left-color: #dc2626; }
#wphi-page .wphi-radar-risk-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--wphi-dyn-bg);
}

/* ── Diagnostic Paths: module chain + path cards ── */
#wphi-page .wphi-chain-arrow { color: var(--wphi-text-muted); margin: 0 4px; }
#wphi-page .wphi-chain-step {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
#wphi-page .wphi-chain-step--locked { background: #f3f4f6; color: #9ca3af; }
#wphi-page .wphi-chain-step--linked {
    background: var(--wphi-accent-light, #eff6ff);
    color: var(--wphi-accent, #3b82f6);
    font-weight: 700;
    padding: 3px 10px;
    border: 1px solid var(--wphi-accent, #3b82f6)33;
}
#wphi-page .wphi-chain-pro-badge {
    font-size: 9px;
    background: #6b7280;
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

#wphi-page .wphi-path-card {
    border: 1px solid var(--wphi-dyn-color);
    border-left: 4px solid var(--wphi-dyn-color);
    border-radius: var(--wphi-radius);
    margin-bottom: 12px;
    overflow: hidden;
}
#wphi-page .wphi-path-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--wphi-dyn-bg);
    flex-wrap: wrap;
}
#wphi-page .wphi-text-20 { font-size: 20px; }
#wphi-page .wphi-flex-1-minw0 { flex: 1; min-width: 0; }
#wphi-page .wphi-path-card-title { font-size: 14px; color: var(--wphi-text); display: block; margin-bottom: 2px; }
#wphi-page .wphi-path-card-scenario { font-size: 12px; color: var(--wphi-text-muted); }
#wphi-page .wphi-path-card-body { padding: 12px 16px; }
#wphi-page .wphi-path-card-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--wphi-text-muted);
    margin: 0 0 5px;
}
#wphi-page .wphi-path-signal-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 3px; font-size: 12px; color: #374151; }
#wphi-page .wphi-path-signal-arrow { flex-shrink: 0; margin-top: 1px; }
#wphi-page .wphi-path-chain-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; line-height: 2; }
#wphi-page .wphi-path-errors-summary {
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
#wphi-page .wphi-path-error-card { margin-bottom: 6px; }
#wphi-page .wphi-path-error-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
#wphi-page .wphi-path-error-count { font-size: 11px; color: var(--wphi-text-light); margin-left: auto; }
#wphi-page .wphi-path-error-message { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: #111827; word-break: break-word; }
#wphi-page .wphi-path-error-file { margin: 0; font-size: 10px; font-family: var(--wphi-mono); color: var(--wphi-text-light); }
#wphi-page .wphi-path-view-all-btn { font-size: 11px; padding: 2px 10px; height: auto; line-height: 1.8; }
#wphi-page .wphi-full-width-spacer { width: 100%; }
#wphi-page .wphi-common-diag-paths-panel { display: none; margin-top: 12px; }

/* ── Error Log: log-source row, actions row, What-Changed trigger ── */
#wphi-page .wphi-p-20 { padding: 20px; }
#wphi-page .wphi-m-0 { margin: 0; }
#wphi-page .wphi-log-source-row { display: inline-flex; align-items: center; gap: 10px; }
#wphi-page .wphi-inline-block { display: inline-block; }
#wphi-page .wphi-inline-form { margin: 0; display: inline; }
#wphi-page .wphi-log-actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
#wphi-page .wphi-wc-trigger-btn { font-size: 11px; padding: 2px 10px; height: auto; line-height: 1.7; }
#wphi-page .wphi-wc-trigger-icon { font-size: 13px; width: 13px; height: 13px; vertical-align: middle; margin: -1px 3px 0 0; }

/* ── Hosting Benchmark ── */
#wphi-page .wphi-hb-overall-badge {
    margin-left: 12px;
    padding: 2px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--wphi-dyn-bg);
}
#wphi-page .wphi-hb-tile-sub { font-size: 11px; color: #374151; text-transform: none; letter-spacing: 0; }

/* ── Mail Health: DNS table ── */
#wphi-page .wphi-mh-status { font-weight: 800; }
#wphi-page .wphi-mh-detail { font-size: 12px; word-break: break-word; }

/* ============================================================
    What Changed?
   ============================================================ */
.what-changed-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.wphi-tl-controls-top, .wphi-tl-toolbar{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.wphi-tl-toolbar{
    margin-top: 10px;
}

#wphi-page .wphi-tl-range-select{height: 12px; min-height: 12px; padding: 7px 4px;}
.wphi-tl-top-dates{position: relative; top: -40px;}
#wphi-page .wphi-tl-snap-icon { font-size: 14px; width: 14px; height: 14px; vertical-align: middle; margin: -1px 3px 0 0; }
#wphi-page .wphi-text-css-blue { color: #3b82f6; }
#wphi-page .wphi-text-css-pink { color: #ec4899; }
#wphi-page .wphi-text-css-orange { color: #f97316; }
#wphi-page .wphi-text-css-teal { color: #0d9488; }
#wphi-page .wphi-text-light-xs-inline { color: #9ca3af; }

#wphi-page .wphi-tl-toolbar, #wphi-page .wphi-tl-key-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#wphi-page .wphi-tl-preset-btn{
    background: #9ca3af;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
}

#wphi-page .wphi-tl-toolbar{
    justify-content: space-between;
    padding: 5px 20px;
    margin: 10px auto;
    background: rgba(0,0,0,.20); 
    border-top: 1px solid rgba(0,0,0,.25);
    border-bottom: 1px solid rgba(0,0,0,.25);
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);         
}

.wphi-tl-key-controls{
    margin-top: 10px;
    justify-content: space-between;
}
#wphi-page .wphi-tl-chart-legend{width: 100%;}
#wphi-page .wphi-tl-legend-text { margin: 0; text-align: center; }
#wphi-page .wphi-tl-zoom-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#wphi-page .wphi-tl-zoom-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--wphi-border);
    background: #3b82f6;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#wphi-page .wphi-tl-zoom-btn.wphi-tl-green-btn{
    background: #48C626;
    color: #fff;
}

#wphi-page .wphi-tl-zoom-btn:hover { border-color: var(--wphi-primary); color: var(--wphi-primary); background: #eff6ff; }

/* Time-range dropdown — sits left of the zoom buttons in the toolbar */
#wphi-page .wphi-tl-range-select {
    height: 28px;
    padding: 0 24px 0 8px;
    border: 1px solid var(--wphi-border);
    border-radius: 6px;
    background: #fff;
    color: var(--wphi-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}
#wphi-page .wphi-tl-range-select:hover { border-color: var(--wphi-primary); }
#wphi-page .wphi-tl-range-select:focus { outline: 2px solid var(--wphi-primary); outline-offset: 1px; }
/* Thin divider between the range dropdown and the zoom buttons */
#wphi-page .wphi-tl-zoom-sep {
    width: 1px;
    height: 18px;
    background: var(--wphi-border);
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

#wphi-page .wphi-tl-svg .wphi-tl-overflow-card { transition: filter .12s; }
#wphi-page .wphi-tl-svg .wphi-tl-overflow-card:hover { filter: brightness(.96); }
#wphi-page .wphi-tl-hint { font-size: 11px; color: var(--wphi-text-light); margin: 6px 0 8px; }

#wphi-page .wphi-tl-svg-wrap {
    padding: 0;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}
/* Overview mini-map: grab cursor signals it's draggable */
#wphi-page .wphi-tl-overview { cursor: grab; }
#wphi-page .wphi-tl-overview:active { cursor: grabbing; }
#wphi-page .wphi-tl-svg { 
    display: block; 
    width: 100%;  
    height: auto;
    margin: 0;
    border: 1px solid rgba(0,0,0, 0.15);
     }
/* aspect-ratio mirrors SVG_W (1000) : H from render() in timeline-visualization.php
   (H=280 compact, H=380 full) — keep in sync if either changes. CSS owns sizing
   entirely now; the SVG no longer carries a literal height="" attribute, which is
   what lets viewBox's internal coordinate width stay fixed regardless of the
   container's actual on-screen pixel width. */
#wphi-page .wphi-tl-svg--compact { aspect-ratio: 1000 / 280; min-height: 220px; }
#wphi-page .wphi-tl-svg--full { aspect-ratio: 1000 / 380; min-height: 280px; }
/* Fullscreen SVG — height is driven by the lightbox panel's flex layout
   so the SVG fills all available space; no fixed aspect-ratio needed here. */
#wphi-page .wphi-tl-svg--fs { display: block; width: 100%; height: 100%; }

/* The inline SVG signals it's clickable-to-expand with an expand cursor
   and a subtle hover brightness lift. No grab cursor — drag only works
   inside the fullscreen lightbox, not on the inline chart. */
#wphi-page .wphi-tl-inline-wrap .wphi-tl-svg { cursor: zoom-in; }
#wphi-page .wphi-tl-inline-wrap .wphi-tl-svg:hover { filter: brightness(.98); }

/* Lightbox overlay — fixed, full-viewport, darkened backdrop */
.wphi-tl-fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15,23,42,.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
body.wphi-tl-fs-open { overflow: hidden; } /* prevent page scroll while lightbox is open */

/* Lightbox panel — full viewport minus 10px on every side */
.wphi-tl-fs-panel {
    background: var(--wphi-surface);
    border-radius: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,.40);
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Row 1: filters left, zoom+close right — same layout as inline controls-top */
.wphi-tl-fs-controls-top {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px 4px;
    border-bottom: 1px solid var(--wphi-border);
    flex-shrink: 0;
    background: var(--wphi-surface);
}

/* Row 2: toolbar — same dark band as inline wphi-tl-toolbar */
.wphi-tl-fs-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background: rgba(0,0,0,.20);
    border-top: 1px solid rgba(0,0,0,.25);
    border-bottom: 1px solid rgba(0,0,0,.25);
    flex-shrink: 0;
}

/* Row 3: legend — same as inline legend row */
.wphi-tl-fs-legend-row {
    padding: 4px 20px 2px;
    border-bottom: 1px solid var(--wphi-border);
    flex-shrink: 0;
    margin: 0 !important;
}

/* Close button — styled like a zoom button but red on hover */
.wphi-tl-fs-close {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--wphi-border);
    background: red;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .1s, color .1s, border-color .1s;
}
.wphi-tl-fs-close:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }

/* Body: the SVG fills all remaining height */
.wphi-tl-fs-body {
    flex: 1;
    min-height: 0;
    position: relative;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.wphi-tl-fs-body .wphi-tl-svg-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
}
.wphi-tl-fs-body .wphi-tl-svg-wrap .wphi-tl-svg { cursor: default; width: 100%; height: 100%; }
.wphi-tl-fs-body .wphi-tl-overview--fs { flex-shrink: 0; padding: 0 8px 8px; }

/* Footer hint */
.wphi-tl-fs-hint {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    padding: 8px 20px;
    margin: 0;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.wphi-tl-fs-hint kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 3px;
    padding: 0 4px;
    font-family: monospace;
    font-size: 10px;
}
#wphi-page .wphi-tl-tooltip {
    display: none;
    position: absolute;
    background: var(--wphi-head-bg);
    color: var(--wphi-head-fg);
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 14px;
    border-radius: var(--wphi-radius-lg);
    pointer-events: none;
    max-width: 320px;
    white-space: normal;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
#wphi-page .wphi-cursor-pointer-plain { cursor: pointer; }
#wphi-page .wphi-ml-4 { margin-left: 4px; }
#wphi-page .wphi-tl-modal-badge-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; flex: 1; min-width: 0; }

/* ── Timeline Visualization: hover tooltips & detail modal content ── */
#wphi-page .wphi-tl-tip-head { border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 7px; padding-bottom: 7px; }
#wphi-page .wphi-tl-tip-icon { font-size: 18px; margin-right: 5px; }
#wphi-page .wphi-tl-tip-type { color: #7dd3fc; font-size: 13px; }
#wphi-page .wphi-tl-tip-label { font-size: 13px; font-weight: 600; color: #f1f5f9; margin-bottom: 5px; word-break: break-word; }
#wphi-page .wphi-tl-tip-meta { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
#wphi-page .wphi-tl-tip-plugin { font-size: 10px; color: #64748b; font-family: var(--wphi-mono); margin-bottom: 4px; }
#wphi-page .wphi-tl-tip-source { font-size: 11px; color: #64748b; }
#wphi-page .wphi-tl-tip-nocorr { margin-top: 6px; font-size: 11px; color: #64748b; }
#wphi-page .wphi-tl-tip-errmsg { font-size: 13px; font-weight: 600; color: #fca5a5; margin-bottom: 5px; word-break: break-word; }
#wphi-page .wphi-tl-tip-errmeta { font-size: 11px; color: #94a3b8; margin-bottom: 3px; }
#wphi-page .wphi-tl-tip-errfile { font-size: 10px; color: #64748b; font-family: var(--wphi-mono); margin-bottom: 3px; }
#wphi-page .wphi-tl-tip-errcount { font-size: 11px; color: #94a3b8; }
#wphi-page .wphi-tl-level-meta { color: #94a3b8; font-size: 11px; }
#wphi-page .wphi-tl-corr-note { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; }
#wphi-page .wphi-tl-corr-note--warn { color: #f59e0b; }
#wphi-page .wphi-tl-corr-note--link { color: #7dd3fc; }

#wphi-page .wphi-tl-card-err { border: 1px solid #e2e8f0; border-left: 3px solid var(--wphi-dyn-color); border-radius: 6px; padding: 11px 14px; margin-bottom: 10px; }
#wphi-page .wphi-tl-card-change { border: 1px solid #e2e8f0; border-left: 3px solid var(--wphi-dyn-color); border-radius: 6px; padding: 11px 14px; margin-bottom: 10px; }
#wphi-page .wphi-tl-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
#wphi-page .wphi-tl-card-level { font-size: 11px; color: var(--wphi-text-muted); }
#wphi-page .wphi-tl-card-count { font-size: 11px; color: var(--wphi-text-light); margin-left: auto; }
#wphi-page .wphi-tl-card-message { margin: 0 0 3px; font-size: 13px; font-weight: 600; color: #111827; word-break: break-word; }
#wphi-page .wphi-tl-card-file { margin: 0 0 3px; font-size: 11px; font-family: var(--wphi-mono); color: var(--wphi-text-muted); }
#wphi-page .wphi-tl-card-time { margin: 0 0 3px; font-size: 11px; color: var(--wphi-text-light); }
#wphi-page .wphi-tl-card-matchreason { margin: 4px 0 0; font-size: 11px; color: #3b82f6; background: #eff6ff; padding: 3px 8px; border-radius: 4px; }
#wphi-page .wphi-tl-change-icon { font-size: 16px; }
#wphi-page .wphi-tl-change-type-dyn { font-size: 12px; font-weight: 700; }

#wphi-page .wphi-tl-modal-icon { font-size: 20px; margin-right: 5px; }
#wphi-page .wphi-tl-modal-type { color: #7dd3fc; font-size: 14px; font-weight: 600; }
#wphi-page .wphi-tl-match-badge--file { background: #3b82f622; color: #3b82f6; padding: 1px 8px; border-radius: 4px; font-size: 11px; margin-left: 6px; }
#wphi-page .wphi-tl-match-badge--temporal { background: #6b728022; color: #6b7280; padding: 1px 8px; border-radius: 4px; font-size: 11px; margin-left: 6px; }
#wphi-page .wphi-tl-score-row { display: flex; align-items: center; gap: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
#wphi-page .wphi-tl-score-headline { font-size: 17px; font-weight: 700; margin-bottom: 3px; color: var(--wphi-dyn-color); }
#wphi-page .wphi-tl-score-note { font-size: 12px; color: var(--wphi-text-muted); }
#wphi-page .wphi-tl-score-matchreason { font-size: 12px; color: #3b82f6; margin-top: 3px; }
#wphi-page .wphi-tl-modal-title { font-size: 16px; font-weight: 700; color: #111827; margin: 0 0 4px; word-break: break-word; }
#wphi-page .wphi-tl-modal-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#wphi-page .wphi-text-sm-muted { font-size: 12px; color: var(--wphi-text-muted); }
#wphi-page .wphi-tl-modal-plugin-tag { font-size: 11px; font-family: var(--wphi-mono); background: #f3f4f6; padding: 2px 7px; border-radius: 4px; color: #374151; }
#wphi-page .wphi-tl-source-badge--mtime { background: #fef9c3; color: #854d0e; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
#wphi-page .wphi-tl-source-badge--snapshot { background: #dcfce7; color: #166534; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
#wphi-page .wphi-tl-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wphi-text-muted); margin: 0 0 8px; }
#wphi-page .wphi-tl-empty-note { color: var(--wphi-text-light); font-size: 13px; margin: 0; }
#wphi-page .wphi-tl-modal-meta-row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--wphi-text-muted); }
#wphi-page .wphi-tl-modal-file-tag { font-family: var(--wphi-mono); background: #f3f4f6; padding: 2px 7px; border-radius: 4px; font-size: 11px; color: #374151; }
#wphi-page .wphi-tl-info-label { color: #94a3b8; }
#wphi-page .wphi-text-sm-muted2 { color: var(--wphi-text-muted); font-size: 13px; }

/* ── Security Audit ── */
#wphi-page .wphi-sa-select { width: auto; min-width: 320px; }
#wphi-page .wphi-text-danger-plain { color: #ef4444; }
#wphi-page .wphi-sa-crit-banner { margin-bottom: 10px; border-left: 3px solid #ef4444; }
#wphi-page .wphi-sa-crit-list { margin: 8px 0 0 16px; list-style: disc; }
#wphi-page .wphi-sa-cat-heading { margin: 12px 0 6px; font-size: 13px; text-transform: capitalize; }
#wphi-page .wphi-sa-summary-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
#wphi-page .wphi-sa-allclear-chip { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 6px; border: 1px solid #bbf7d0; background: #f0fdf4; }
#wphi-page .wphi-sa-allclear-num { font-size: 22px; font-weight: 700; color: #16a34a; }
#wphi-page .wphi-sa-allclear-label { font-size: 12px; line-height: 1.4; color: #166534; }
#wphi-page .wphi-sa-neutral-chip { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 6px; border: 1px solid #e5e7eb; background: #f9fafb; }
#wphi-page .wphi-sa-neutral-num { font-size: 22px; font-weight: 700; color: #374151; }
#wphi-page .wphi-sa-neutral-label { font-size: 12px; line-height: 1.4; color: #4b5563; }
#wphi-page .wphi-sa-issues-chip { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 6px; }
#wphi-page .wphi-sa-issues-chip--danger { border: 1px solid #fecaca; background: #fef2f2; }
#wphi-page .wphi-sa-issues-chip--good { border: 1px solid #bbf7d0; background: #f0fdf4; }
#wphi-page .wphi-sa-issues-chip-num { font-size: 22px; font-weight: 700; }
#wphi-page .wphi-sa-issues-chip--danger .wphi-sa-issues-chip-num { color: #dc2626; }
#wphi-page .wphi-sa-issues-chip--good .wphi-sa-issues-chip-num { color: #16a34a; }
#wphi-page .wphi-sa-issues-chip-label { font-size: 12px; line-height: 1.4; }
#wphi-page .wphi-sa-issues-chip--danger .wphi-sa-issues-chip-label { color: #991b1b; }
#wphi-page .wphi-sa-issues-chip--good .wphi-sa-issues-chip-label { color: #166534; }
#wphi-page .wphi-sa-cat-label { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: #dc2626; text-transform: uppercase; letter-spacing: .05em; }
#wphi-page .wphi-sa-issue-card { margin-bottom: 14px; border: 1px solid #dc2626; border-left: 16px solid #dc2626; border-radius: 6px; background: #fff; }
#wphi-page .wphi-sa-issue-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #fef2f2; }
#wphi-page .wphi-sa-issue-count { font-size: 11px; color: var(--wphi-text-light); margin-left: 8px; }
#wphi-page .wphi-sa-issue-actions { display: flex; gap: 10px; align-items: center; }
#wphi-page .wphi-sa-severity-tag { font-size: 12px; font-weight: 600; color: #dc2626; background: #fef2f2; padding: 2px 10px; border-radius: 20px; }
#wphi-page .wphi-sa-issue-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
#wphi-page .wphi-sa-finding-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#wphi-page .wphi-sa-finding-tag--danger { font-size: 11px; font-weight: 700; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; padding: 2px 8px; border-radius: 4px; }
#wphi-page .wphi-sa-finding-code--danger { font-family: var(--wphi-mono); font-size: 11px; padding: 4px 10px; margin-bottom: 3px; background: #fef9f9; border-left: 3px solid #dc2626; border-radius: 0 3px 3px 0; word-break: break-all; }
#wphi-page .wphi-sa-finding-tag--warn { font-size: 11px; font-weight: 700; color: #d97706; background: #fffbeb; border: 1px solid #fde68a; padding: 2px 8px; border-radius: 4px; }
#wphi-page .wphi-sa-finding-code--warn { font-family: var(--wphi-mono); font-size: 11px; padding: 4px 10px; margin-bottom: 3px; background: #fffdf5; border-left: 3px solid #d97706; border-radius: 0 3px 3px 0; word-break: break-all; }
#wphi-page .wphi-sa-finding-tag--info { font-size: 11px; font-weight: 700; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; padding: 2px 8px; border-radius: 4px; }
#wphi-page .wphi-sa-finding-code--info { font-family: var(--wphi-mono); font-size: 11px; padding: 4px 10px; margin-bottom: 3px; background: #f5f9ff; border-left: 3px solid #2563eb; border-radius: 0 3px 3px 0; word-break: break-all; }
#wphi-page .wphi-sa-allclear-toggle { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; cursor: pointer; user-select: none; }
#wphi-page .wphi-sa-allclear-toggle-label { font-size: 13px; font-weight: 600; color: #166534; }
#wphi-page .wphi-sa-allclear-toggle-arrow { margin-left: auto; font-size: 11px; color: #16a34a; }
#wphi-page .wphi-sa-allclear-body { border: 1px solid #bbf7d0; border-top: none; border-radius: 0 0 6px 6px; }
#wphi-page .wphi-sa-th-80 { font-size: 12px; width: 80px; }
#wphi-page .wphi-sa-th-160 { font-size: 12px; width: 160px; }
#wphi-page .wphi-sa-passed-meta { font-size: 11px; color: var(--wphi-text-light); margin-left: 6px; }
#wphi-page .wphi-sa-passed-status { font-size: 12px; font-weight: 600; color: #16a34a; }
#wphi-page .wphi-sa-checklist-icon { font-size: 13px; margin-right: 6px; }
#wphi-page .wphi-sa-checklist-indent { font-size: 13px; margin-left: 16px; }
#wphi-page .wphi-text-warn-bold { color: #f59e0b; font-weight: 700; }
#wphi-page .wphi-text-danger-bold { color: #ef4444; font-weight: 700; }
#wphi-page .wphi-text-danger-bold-600 { color: #ef4444; font-weight: 600; }
#wphi-page .wphi-text-light-plain { color: #9ca3af; }

/* ── Blast Radius: plugin pill helper ── */
#wphi-page .wphi-br-pill-fallback { font-size: 11px; color: var(--wphi-text-muted); }
#wphi-page .wphi-br-pill-unknown { font-size: 11px; color: #9ca3af; font-style: italic; }
#wphi-page .wphi-br-plugin-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
#wphi-page .wphi-br-plugin-pill--core { background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; }
#wphi-page .wphi-br-plugin-pill--plugin { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ── Blast Radius: tables, collapsibles ── */
#wphi-page .wphi-text-right { text-align: right; }
#wphi-page .wphi-br-overdue-note { font-size: 10px; color: #ef4444; }
#wphi-page .wphi-br-collapsible { margin-bottom: 8px; border: 1px solid var(--wphi-border); border-radius: var(--wphi-radius); overflow: hidden; }
#wphi-page .wphi-br-collapsible-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--wphi-surface); cursor: pointer; flex-wrap: wrap; }
#wphi-page .wphi-br-collapsible-body { padding: 0 14px 12px; background: var(--wphi-bg); }
#wphi-page .wphi-br-toggle-link { font-size: 12px; color: var(--wphi-text-muted); cursor: pointer; padding: 4px 0; }
#wphi-page .wphi-br-route-list { margin-top: 6px; padding-left: 8px; }
#wphi-page .wphi-br-route-item { font-size: 11px; font-family: var(--wphi-mono); color: var(--wphi-text-muted); display: block; padding: 2px 0; }

/* ── Server Environment: extension presence bar, PHP config table ── */
#wphi-page .wphi-ext-loaded-label { font-size: 12px; color: var(--wphi-good); font-weight: 700; }
#wphi-page .wphi-ext-missing-label { font-size: 12px; color: var(--wphi-danger); font-weight: 700; }
#wphi-page .wphi-ext-presence-track { display: flex; height: 10px; border-radius: 4px; overflow: hidden; background: #e5e7eb; flex: 1; }
#wphi-page .wphi-ext-loaded-fill { width: var(--bar-pct, 0%); background: var(--wphi-good); height: 100%; }
#wphi-page .wphi-ext-missing-fill { width: var(--bar-pct, 0%); background: var(--wphi-danger); height: 100%; }
#wphi-page .wphi-ext-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#wphi-page .wphi-ext-chip { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
#wphi-page .wphi-ext-chip--loaded { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
#wphi-page .wphi-ext-chip--missing { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
#wphi-page .wphi-text-good-bold { color: #48C626; font-weight: 700; }
#wphi-page .wphi-text-good-mt10 { color: #48C626; margin-top: 10px; }

/* ── Autoload / Options Governor ── */
#wphi-page .wphi-aog-notice-margin { margin: 14px 16px 0; }
#wphi-page .wphi-text-muted-color { color: var(--wphi-text-muted); }
#wphi-page .wphi-aog-th-sm { font-size: 11px; padding: 4px 8px; }
#wphi-page .wphi-aog-td-pad { padding: 4px 8px 8px; }
#wphi-page .wphi-aog-card-top-accent { border-top: 3px solid var(--wphi-accent); }
#wphi-page .wphi-aog-section-icon { font-size: 13px; vertical-align: middle; margin-right: 3px; }
#wphi-page .wphi-aog-finding-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
#wphi-page .wphi-aog-finding-title { font-size: 14px; color: var(--wphi-text); }
#wphi-page .wphi-aog-finding-desc { font-size: 13px; color: #6b7280; margin: 0 0 8px; }
#wphi-page .wphi-aog-options-list { font-family: var(--wphi-mono); font-size: 11px; margin: 6px 0 0; padding-left: 16px; }
#wphi-page .wphi-aog-table-margin { margin-top: 6px; font-size: 11px; }
#wphi-page .wphi-aog-warn-card { border: 1px solid #e2e8f0; border-left: 4px solid #f59e0b; border-radius: var(--wphi-radius); padding: 10px 14px; margin-bottom: 8px; }
#wphi-page .wphi-aog-warn-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#wphi-page .wphi-aog-warn-desc { font-size: 12px; color: #6b7280; margin: 0; }
#wphi-page .wphi-treemap-code { color: #fff; font-size: 10px; word-break: break-all; }
#wphi-page .wphi-swatch-dyn-bg { background: var(--wphi-dyn-bg); }
#wphi-page .wphi-donut-swatch--gray { background: #e5e7eb; }
#wphi-page .wphi-aog-finding-card { border: 1px solid #e2e8f0; border-left: 4px solid var(--wphi-dyn-color); border-radius: var(--wphi-radius); padding: 12px 16px; margin-bottom: 10px; }

/* ── External Dependencies ── */
#wphi-page .wphi-ext-url-cell { max-width: 360px; word-break: break-all; font-size: 0.82em; }

/* ── Request Profiler ── */
#wphi-page .wphi-my-20-0 { margin: 20px 0; }

/* ── Time Bomb Detector ── */
#wphi-page .wphi-text-wp-danger-bold { color: #d63638; font-weight: bold; }
#wphi-page .wphi-text-666 { color: #666; }

/* ── Performance Baseline ── */
#wphi-page .wphi-pb-spark-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#wphi-page .wphi-pb-spark-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--wphi-text-muted); margin-top: 3px; }

/* ── Root Cause Analysis ── */
#wphi-page .wphi-rca-modal-type { color: #7dd3fc; }
#wphi-page .wphi-rca-error-banner { border-left: 4px solid #ef4444; background: #fef2f2; }
#wphi-page .wphi-rca-error-banner-title { color: #991b1b; }
#wphi-page .wphi-rca-error-banner-msg { margin: 0 0 10px; font-size: 13px; color: #7f1d1d; }
#wphi-page .wphi-rca-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
#wphi-page .wphi-rca-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
#wphi-page .wphi-rca-card-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
#wphi-page .wphi-rca-card-title { font-size: 15px; font-weight: 700; color: var(--wphi-text); margin: 0 0 5px; word-break: break-word; }
#wphi-page .wphi-rca-card-summary { font-size: 13px; color: #374151; margin: 0; line-height: 1.6; }
#wphi-page .wphi-rca-card-meta { flex-shrink: 0; white-space: nowrap; }
#wphi-page .wphi-rca-col { flex: 1 1 200px; }
#wphi-page .wphi-rca-list-16 { margin: 6px 0 0; padding-left: 16px; font-size: 12px; line-height: 1.8; }
#wphi-page .wphi-rca-list-18 { margin: 6px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.8; }
#wphi-page .wphi-summary-toggle-muted { font-size: 12px; font-weight: 600; color: var(--wphi-text-muted); cursor: pointer; padding: 4px 0; }
#wphi-page .wphi-rca-no-related { background: #f0fdf4; border-left: 3px solid #48C626; padding: 7px 12px; border-radius: 0 var(--wphi-radius) var(--wphi-radius) 0; font-size: 12px; color: #166534; }
#wphi-page .wphi-rca-severity-pill { padding: 2px 10px; }
#wphi-page .wphi-rca-confidence { font-size: 11px; font-weight: 700; }

/* ── Core Web Vitals Estimator ── */
#wphi-page .wphi-cwv-badge { color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
#wphi-page .wphi-cwv-badge--good { background: #48C626; }
#wphi-page .wphi-cwv-badge--warn { background: #f59e0b; }
#wphi-page .wphi-cwv-badge--poor { background: #ef4444; }
#wphi-page .wphi-cwv-badge--neutral { background: #6b7280; }
#wphi-page .wphi-cwv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
#wphi-page .wphi-cwv-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#wphi-page .wphi-cwv-card-title { margin: 0; font-size: 16px; }
#wphi-page .wphi-cwv-card-subtitle { font-weight: 400; font-size: 13px; color: #6b7280; }
#wphi-page .wphi-cwv-estimate { font-size: 28px; font-weight: 700; color: var(--wphi-dyn-color); margin: 0 0 12px; }
#wphi-page .wphi-cwv-thresholds { font-size: 11px; color: #9ca3af; margin: 0 0 10px; }
#wphi-page .wphi-cwv-list-signals { list-style: disc; padding-left: 18px; margin: 6px 0 10px; }
#wphi-page .wphi-cwv-signal-item { font-size: 12px; color: #374151; margin-bottom: 4px; }
#wphi-page .wphi-cwv-list-recs { list-style: disc; padding-left: 18px; margin: 6px 0 0; }
#wphi-page .wphi-cwv-rec-item { font-size: 12px; color: #6b7280; margin-bottom: 4px; }

/* ── Content Health: media summary, rewrite rules summary ── */
#wphi-page .wphi-ch-rewrite-summary { margin-bottom: 16px; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
#wphi-page .wphi-text-danger-bold-20 { color: #ef4444; font-weight: 700; font-size: 20px; }
#wphi-page .wphi-text-good-bold-20 { color: #48C626; font-weight: 700; font-size: 20px; }

/* ── Conflict Detector ── */
#wphi-page .wphi-cd-redundant-card {
    border: 1px solid var(--wphi-dyn-color);
    border-left: 4px solid var(--wphi-dyn-color);
    border-radius: var(--wphi-radius);
    padding: 14px 16px;
    margin-bottom: 12px;
}
#wphi-page .wphi-cd-cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
#wphi-page .wphi-cd-plugin-slug { margin-bottom: 6px; font-family: var(--wphi-mono); font-size: 11px; }
#wphi-page .wphi-cd-note { font-size: 12px; color: #6b7280; margin: 0; padding: 8px 10px; background: #f8fafc; border-radius: var(--wphi-radius); }
#wphi-page .wphi-cd-hook-card { border: 1px solid #e2e8f0; border: 1px solid #f59e0b; border-left: 4px solid #f59e0b; border-radius: var(--wphi-radius); padding: 12px 14px; margin-bottom: 8px; }
#wphi-page .wphi-cd-hook-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
#wphi-page .wphi-cd-hook-name { font-size: 13px; font-weight: 700; color: var(--wphi-text); }
#wphi-page .wphi-cd-pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
#wphi-page .wphi-cd-plugin-pill { display: inline-flex; align-items: center; gap: 5px; background: #f3f4f6; border: 1px solid #e5e7eb; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
#wphi-page .wphi-cd-callback-row { font-size: 12px; padding: 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#wphi-page .wphi-cd-early-pill { display: inline-flex; align-items: center; gap: 4px; background: #eff6ff; border: 1px solid #bfdbfe; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin: 1px; }
#wphi-page .wphi-cd-late-pill { display: inline-flex; align-items: center; gap: 4px; background: #fef9c3; border: 1px solid #fde68a; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin: 1px; }
#wphi-page .wphi-cd-handle-row { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#wphi-page .wphi-cd-handle-code { font-size: 11px; background: #f3f4f6; padding: 1px 6px; border-radius: 3px; }
#wphi-page .wphi-cd-handle-plugin { font-size: 11px; font-weight: 600; color: var(--wphi-text); }

/* ── Blast Radius: REST route explorer table ── */
#wphi-page .wphi-br-route-table { width: 100%; border-collapse: collapse; border: 1px solid #ccd0d4; }
#wphi-page .wphi-br-route-thead-row { text-align: left; background: #726b86; }
#wphi-page .wphi-br-route-th { padding: 10px; }
#wphi-page .wphi-br-namespace-row { background: #e2e4e7; }
#wphi-page .wphi-br-route-row { background-color: #ffffff; }
#wphi-page .wphi-br-route-row:nth-child(even) { background-color: #f7f7f7; }
#wphi-page .wphi-br-route-path-cell { padding: 12px; border: 1px solid #ccd0d4; vertical-align: top; }
#wphi-page .wphi-br-route-methods-cell { padding: 12px; border: 1px solid #ccd0d4; }
#wphi-page .wphi-br-method-row { display: flex; align-items: center; margin-bottom: 4px; }
#wphi-page .wphi-br-method-badge {
    background: var(--wphi-dyn-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    margin-right: 10px;
}

/* ── Misc fixes: orphaned class references found in final sweep ── */
#wphi-page .wphi-text-666 { color: #666; }
#wphi-page .wphi-ri-scroll-box { max-height: 400px; overflow-y: auto; border: 1px solid #ccd0d4; margin-bottom: 20px; }
#wphi-page .wphi-aog-fatal-note { color: #d63638; margin-top: 5px; }
#wphi-page .wphi-aog-warn-note { color: #f59e0b; margin-top: 5px; }

/* render_inline_gate() helper */
#wphi-page .wphi-inline-gate { text-align: center; padding: 28px 24px; margin: 8px 0 20px; border: 2px dashed var(--wphi-border, #e5e7eb); background: var(--wphi-surface-alt, #f9fafb); }
#wphi-page .wphi-inline-gate-icon { font-size: 26px; color: var(--wphi-muted, #9ca3af); margin-bottom: 10px; display: block; height: auto; width: auto; }
#wphi-page .wphi-inline-gate-desc { margin: 0 0 6px; font-weight: 600; color: var(--wphi-text, #111827); }
#wphi-page .wphi-inline-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }


/* ============================================================
    WordPress style override
   ============================================================ */

#wphi-page input[type=checkbox]{
    transform: none;
}

#wphi-page input[type=checkbox]:checked{
    border-color: 1px solid #1e1e1e !important;
}