/**
 * Holon Pulse - Public Dashboard Styles
 */

.ptp-holon-pulse-dashboard {
    max-width: 1200px;
    margin: 0; /* was: 0 auto - removed auto to left justify */
    padding: 1.4rem; /* was 2rem - 30% reduction */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.ptp-dashboard-header {
    text-align: center;
    margin-bottom: 1.4rem; /* was 2rem */
}

.ptp-holon-name {
    font-size: 1.89rem; /* was 2.5rem - 30% reduction */
    font-weight: 700;
    margin: 0 0 0.35rem 0; /* was 0.5rem */
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ptp-tagline {
    font-size: 0.91rem; /* was 1.1rem - 30% reduction */
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

/* Section Headers with Collapse */
.ptp-section-wrapper {
    margin-bottom: 1rem; /* was 1.5rem */
}

.ptp-section-header {
    font-size: 1.05rem; /* was 1.3rem - 30% reduction */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.7rem 0; /* was 1rem */
    padding: 0.7rem 1rem; /* was 1rem 1.5rem */
    background: rgba(255,255,255,0.2);
    border-radius: 6px; /* was 8px */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.ptp-section-header:hover {
    background: rgba(255,255,255,0.25);
}

.ptp-toggle-icon {
    font-size: 0.84rem; /* was 1rem */
    transition: transform 0.3s ease;
}

.ptp-section-header.collapsed .ptp-toggle-icon {
    transform: rotate(-90deg);
}

.ptp-section-content {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.ptp-section-content.collapsed {
    max-height: 0;
    opacity: 0;
}


/* Weather Section */
.ptp-weather-section {
    padding: 1rem;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(10px);
}

/* Weather with alternates on right */
.ptp-weather-with-alternates {
    display: grid;
    grid-template-columns: 1fr auto auto; /* Forecast expands + Sidebar + NASA tiles */
    gap: 20px; /* Exact 20px gap between all three */
    align-items: start;
}

.ptp-weather-main {
    /* Primary weather and forecast */
}

.ptp-weather-main-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 20px;
    align-items: start;
}

/* NASA POWER Solar Context Tiles */
.ptp-solar-context {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Changed from 10px to match the rest of the site */
    height: 100%; /* Ensures it stretches to match the height of the middle column */
    justify-content: space-between; /* Pushes the bottom tile down to align with the others */
}

.ptp-solar-tile {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px; 
    padding: 20px; /* Changed from 10px to fix the "cramped" feel */
}

.ptp-solar-tile-label {
    font-size: 0.72rem; /* was 0.68rem - reduced 15% */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 5px; /* was 6px - reduced 15% */
}

.ptp-solar-tile-value {
    font-size: 1.5rem; /* was 1.6rem - reduced 15% */
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 3px; /* was 4px - reduced 15% */
}

.ptp-solar-tile-unit {
    font-size: 0.82rem; /* was 0.8rem - reduced 15% */
    font-weight: 400;
    opacity: 0.8;
}

.ptp-solar-tile-caption {
    font-size: 0.65rem; /* was 0.6rem - reduced 15% */
    opacity: 0.6;
    line-height: 1.3;
}

.ptp-solar-tile-comparison {
    display: flex;
    flex-direction: column;
    gap: 5px; /* was 6px - reduced 15% more */
}

.ptp-solar-comparison-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem; /* was 0.72rem - reduced 15% */
}

.ptp-solar-comparison-label {
    opacity: 0.8;
}

.ptp-solar-comparison-value {
    font-weight: 600;
}

.ptp-solar-status {
    margin-top: auto; /* This pushes the button to the bottom of the tile */
    padding: 5px 8px;
    border-radius: 3px;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.ptp-solar-status-above {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.ptp-solar-status-normal {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.ptp-solar-status-below {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.ptp-solar-source {
    font-size: 0.62rem; /* was 0.56rem - reduced 15% */
    opacity: 0.5;
    text-align: center;
    margin-top: 3px; /* was 4px - reduced 15% */
}

.ptp-solar-source a {
    color: inherit;
    text-decoration: none;
}

.ptp-solar-source a:hover {
    opacity: 0.8;
}


.ptp-weather-alternates-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
}

.ptp-alternates-sidebar-label {
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-bottom: 0.3rem;
    font-weight: 600;
    text-align: center;
}

.ptp-alternate-location-sidebar {
    background: rgba(255,255,255,0.1);
    padding: 0.7rem 1rem; /* Added right padding to match left */
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Added gap to prevent cramming */
}

.ptp-alternate-location-sidebar:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(3px);
}

.ptp-alternate-name-sidebar {
    font-size: 0.89rem;
    font-weight: 600;
}

.ptp-alternate-temp-sidebar {
    font-size: 1.04rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ptp-alternate-icon-sidebar {
    font-size: 1.24rem;
}

/* Alternate Locations Inline (below primary, above forecast) - deprecated but keeping for compatibility */
.ptp-weather-alternates-inline {
    display: none; /* Hidden - using sidebar instead */
}

.ptp-location-name {
    font-size: 0.74rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forecast Container Box (matches Other Locations sidebar style) */
.ptp-forecast-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: fit-content; /* Shrink to fit content exactly */
}

.ptp-current-weather {
    display: flex;
    align-items: center;
    justify-content: center; /* Center within forecast container */
    gap: 1rem;
    margin-bottom: 0; /* Gap from container handles spacing */
}

.ptp-weather-icon {
    font-size: 2.24rem; /* was 3rem - 30% reduction */
}

.ptp-weather-details {
    text-align: left;
}

.ptp-temperature {
    font-size: 1.89rem; /* was 2.5rem - 30% reduction */
    font-weight: 700;
    line-height: 1;
}

.ptp-conditions {
    font-size: 0.98rem; /* was 1.2rem - 30% reduction */
    font-weight: 500;
    margin-top: 0.18rem; /* was 0.25rem */
}

.ptp-cloud-cover {
    font-size: 0.77rem; /* was 0.9rem - 30% reduction */
    opacity: 0.8;
    margin-top: 0.18rem; /* was 0.25rem */
}

/* Forecast Strip */
.ptp-forecast-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.46rem; /* was 0.44rem - slightly more for wider container */
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.ptp-forecast-day {
    text-align: center;
    padding: 0.34rem; /* was 0.32rem - slightly more for wider container */
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    transition: transform 0.2s ease, background 0.2s ease;
    min-width: 72px; /* was 69px - slightly wider */
}

.ptp-forecast-day:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

.ptp-forecast-day-name {
    font-weight: 600;
    font-size: 0.77rem; /* was 0.61rem - slightly larger */
    margin-bottom: 0.36rem; /* was 0.35rem */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ptp-forecast-icon {
    font-size: 1.54rem; /* was 1.36rem - slightly larger */
    margin: 0.36rem 0; /* was 0.35rem */
}

.ptp-forecast-temps {
    display: flex;
    justify-content: center;
    gap: 0.36rem; /* was 0.35rem */
    margin: 0.36rem 0; /* was 0.35rem */
    font-size: 0.91rem; /* was 0.75rem - slightly larger */
    font-weight: 600;
}

.ptp-forecast-high {
    color: #ffd700;
}

.ptp-forecast-low {
    opacity: 0.7;
}

.ptp-forecast-condition {
    font-size: 0.51rem; /* was 0.53rem - 30% reduction */
    opacity: 0.8;
    margin-top: 0.13rem; /* was 0.18rem */
}

/* Additional Weather Metrics */
.ptp-weather-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 180px;
}

.ptp-metric-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    transition: background 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.ptp-metric-item:hover {
    background: rgba(255,255,255,0.08);
}

.ptp-metric-icon {
    font-size: 1.54rem;
    flex-shrink: 0;
}

.ptp-metric-content {
    flex: 1;
    min-width: 0;
}

.ptp-metric-label {
    font-size: 0.79rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.ptp-metric-value {
    font-size: 0.99rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Current Generation */
.ptp-current-generation {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.4rem;
    max-width: 70%; /* 30% narrower */
}

.ptp-stat-large,
.ptp-stat-medium {
    background: rgba(255,255,255,0.2);
    padding: 1rem; /* was 1.4rem - 30% reduction */
    border-radius: 6px; /* was 8px */
    text-align: center;
    backdrop-filter: blur(10px);
}

.ptp-stat-label {
    font-size: 0.58rem; /* was 0.63rem - 30% reduction */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.35rem; /* was 0.5rem */
    font-weight: 600;
}

.ptp-stat-value {
    font-size: 1.86rem; /* was 2.45rem - 30% reduction */
    font-weight: 700;
    line-height: 1.1;
}

.ptp-stat-medium .ptp-stat-value {
    font-size: 1.61rem; /* was 2.1rem - 30% reduction */
}

.ptp-current-output {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.ptp-unit {
    font-size: 0.88rem; /* was 1.05rem - 30% reduction */
    font-weight: 400;
    opacity: 0.9;
    margin-left: 0.13rem; /* was 0.18rem */
}

/* Energy Totals */
/* Electricity Overview - Two bordered boxes side by side */
.ptp-electricity-overview-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

/* Solar Power Generation Box (left) */
.ptp-generation-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
}

/* Generation subsections (solar & wind) */
.ptp-generation-subsection {
    margin-bottom: 20px;
}

.ptp-generation-subsection:last-child {
    margin-bottom: 0;
}

/* Narrow generation boxes (30% narrower) */
.ptp-narrow-generation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ptp-stat-compact {
    background: rgba(255,255,255,0.1);
    padding: 0.36rem; /* was 0.6rem - 40% narrower */
    border-radius: 6px;
    text-align: center;
}

.ptp-stat-compact .ptp-stat-label {
    font-size: 0.64rem; /* was 0.6rem - smaller for narrow */
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.ptp-stat-compact .ptp-stat-value {
    font-size: 1.24rem; /* was 1.3rem - smaller for narrow */
    font-weight: 700;
    color: #fbbf24;
}

/* Estimated Demand Box (right) */
.ptp-demand-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
}

.ptp-subsection-title {
    font-size: 1.04rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.ptp-energy-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* 50% narrower: was 98px, now ~49px min */
    gap: 0.7rem;
}

.ptp-stat-box {
    background: rgba(255,255,255,0.15);
    padding: 0.5rem; /* Reduced from 0.7rem for 50% narrower */
    border-radius: 6px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
    min-width: 70px; /* Smaller min-width */
}

.ptp-stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
}

.ptp-stat-box .ptp-stat-label {
    font-size: 0.53rem; /* was 0.56rem - 30% reduction */
    margin-bottom: 0.25rem; /* was 0.35rem */
}

.ptp-stat-box .ptp-stat-value {
    font-size: 1.12rem; /* was 1.4rem - 30% reduction */
    margin-bottom: 0.25rem; /* was 0.35rem */
}

.ptp-stat-box .ptp-unit {
    font-size: 0.63rem; /* was 0.7rem - 30% reduction */
}

.ptp-stat-period {
    font-size: 0.51rem; /* was 0.53rem - 30% reduction */
    opacity: 0.7;
    margin-top: 0.25rem; /* was 0.35rem */
}

/* Footer */
.ptp-dashboard-footer {
    text-align: center;
    padding-top: 1rem; /* was 1.5rem */
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.74rem; /* was 0.85rem - 30% reduction */
    opacity: 0.8;
}

.ptp-powered-by {
    margin: 0 0 0.35rem 0; /* was 0.5rem */
}

.ptp-powered-by a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.ptp-powered-by a:hover {
    opacity: 0.7;
}

.ptp-last-updated {
    margin: 0;
    font-size: 0.67rem; /* was 0.75rem - 30% reduction */
}

/* Error State */
.ptp-holon-pulse-error {
    padding: 2rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ptp-holon-pulse-dashboard {
        padding: 1.5rem;
    }
    
    .ptp-holon-name {
        font-size: 2.14rem;
    }
    
    .ptp-current-generation {
        grid-template-columns: 1fr;
    }
    
    .ptp-stat-value {
        font-size: 2.64rem;
    }
    
    .ptp-energy-totals {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .ptp-forecast-strip {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .ptp-forecast-day:nth-child(4),
    .ptp-forecast-day:nth-child(5) {
        display: none;
    }
    
    /* Stack weather locations on mobile */
    .ptp-weather-multi-location {
        flex-direction: column;
    }
    
    .ptp-weather-alternates {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .ptp-alternate-location {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .ptp-energy-totals {
        grid-template-columns: 1fr;
    }
    
    .ptp-forecast-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ptp-forecast-day:nth-child(3) {
        display: none;
    }
    
    .ptp-alternate-location {
        flex: 1 1 100%;
    }
}

/* Demand Display (inside demand container) */
.ptp-demand-display {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ptp-demand-value {
    font-size: 2.64rem;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 0.5rem;
}

.ptp-demand-value .ptp-unit {
    font-size: 1.34rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Methodology Blurb (inside demand container) */
.ptp-demand-container .ptp-methodology-blurb {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.89rem;
    line-height: 1.5;
    opacity: 0.85;
}

.ptp-demand-container .ptp-methodology-blurb p {
    margin: 0 0 0.8rem 0;
}

.ptp-demand-container .ptp-methodology-blurb p:last-child {
    margin-bottom: 0;
}

.ptp-demand-container .ptp-methodology-links {
    font-size: 0.84rem;
}

.ptp-demand-container .ptp-methodology-links a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 500;
}

.ptp-demand-container .ptp-methodology-links a:hover {
    text-decoration: underline;
}

/* Holon Population Section */
.ptp-population-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.ptp-population-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ptp-pop-county-total {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ptp-pop-label {
    font-size: 0.99rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 10px;
}

.ptp-pop-value {
    font-size: 3.14rem;
    font-weight: 700;
    color: #81c784;
    margin-bottom: 5px;
}

.ptp-pop-year {
    font-size: 0.89rem;
    opacity: 0.6;
    font-style: italic;
}

/* Urban/Rural Pie Chart */
.ptp-population-chart {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
}

.ptp-chart-title {
    font-size: 0.94rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

.ptp-chart-subtitle {
    font-size: 0.79rem;
    opacity: 0.7;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 15px;
    font-style: italic;
}

.ptp-pie-chart-container {
    display: flex;
    align-items: center;
    gap: 25px;
}

.ptp-pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #42a5f5 0% calc(var(--urban-pct) * 1%),
        #66bb6a calc(var(--urban-pct) * 1%) 100%
    );
    flex-shrink: 0;
}

.ptp-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.ptp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptp-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.ptp-legend-urban {
    background: #42a5f5;
}

.ptp-legend-rural {
    background: #66bb6a;
}

.ptp-legend-label {
    font-size: 0.89rem;
    font-weight: 600;
    min-width: 45px;
}

.ptp-legend-value {
    font-size: 0.89rem;
    opacity: 0.8;
}

/* Town Breakdown */
.ptp-town-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
}

.ptp-breakdown-label {
    font-size: 0.99rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 15px;
    font-weight: 600;
}

.ptp-town-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.ptp-town-row:last-child {
    border-bottom: none;
}

.ptp-town-rural {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 8px;
    padding-top: 18px;
    font-weight: 600;
}

.ptp-town-name {
    font-weight: 500;
}

.ptp-town-pop {
    font-weight: 600;
    color: #a5d6a7;
    text-align: right;
}

.ptp-town-pct {
    opacity: 0.7;
    font-size: 0.99rem;
    text-align: right;
}

/* Population Sources */
.ptp-population-sources {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(129, 199, 132, 0.5);
    padding: 15px 20px;
    margin-top: 20px;
    border-radius: 4px;
}

.ptp-source-intro {
    font-size: 0.89rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
    margin: 0 0 8px 0;
}

.ptp-source-links {
    font-size: 0.94rem;
    margin: 0 0 10px 0;
}

.ptp-source-links a {
    color: #a5d6a7;
    text-decoration: none;
    font-weight: 500;
}

.ptp-source-links a:hover {
    text-decoration: underline;
}

.ptp-source-footnote {
    font-size: 0.89rem;
    opacity: 0.7;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

/* Year-over-Year Indicators */
.ptp-yoy-indicator {
    display: inline-block;
    font-weight: 600;
    vertical-align: middle;
    opacity: 0.9;
}

/* Export Button */
.ptp-export-button {
    transition: all 0.2s ease;
}

.ptp-export-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px);
}

/* Economy Section */
.ptp-economy-section,
.ptp-gc-valuation-section {
    margin-bottom: 2rem;
}

.ptp-economy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ptp-economy-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1.2rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ptp-economy-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.ptp-economy-label {
    font-size: 0.89rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ptp-economy-value {
    font-size: 2.14rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.ptp-economy-change {
    font-size: 0.99rem;
    margin-top: 0.5rem;
}

.ptp-economy-meta {
    font-size: 0.89rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Ghost Net Credit Valuation */
.ptp-gc-valuation-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.ptp-subsection-description {
    font-size: 1.04rem;
    opacity: 0.9;
    margin: 0.5rem 0 1rem 0;
    font-style: italic;
}

.ptp-gc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ptp-gc-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ptp-gc-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.ptp-gc-card.ptp-gc-highlight {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.ptp-gc-label {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ptp-gc-value {
    font-size: 1.64rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.ptp-gc-value.ptp-gc-primary {
    font-size: 2.14rem;
    color: #ffd700;
}

.ptp-gc-meta {
    font-size: 0.84rem;
    opacity: 0.7;
}

.ptp-data-attribution {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.89rem;
    opacity: 0.8;
}

.ptp-data-attribution p {
    margin: 0;
    line-height: 1.6;
}

.ptp-data-attribution a {
    color: #81c784;
    text-decoration: none;
}

.ptp-data-attribution a:hover {
    text-decoration: underline;
}

/* Food Insecurity Section */
.ptp-food-insecurity-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 20px;
}

/* Primary Tile - Food-Insecure People */
.ptp-fi-primary-stats {
    display: flex;
}

.ptp-fi-main-tile {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 183, 77, 0.08) 100%);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    flex: 1;
}

.ptp-fi-label {
    font-size: 1.04rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 15px;
    font-weight: 600;
}

.ptp-fi-value {
    font-size: 3.64rem;
    font-weight: 700;
    color: #FF9800; /* Warm orange */
    margin-bottom: 10px;
    line-height: 1;
}

.ptp-fi-value.zero {
    color: rgba(255, 255, 255, 0.4); /* White at 40% for zero */
}

.ptp-fi-value.no-data {
    font-size: 1.64rem;
    color: #9E9E9E; /* Gray for no data */
    font-weight: 400;
}

.ptp-fi-rate {
    font-size: 1.24rem;
    opacity: 0.8;
    font-weight: 500;
    color: #FFB74D; /* Light orange for rates */
}

.ptp-fi-rate.zero {
    color: rgba(255, 255, 255, 0.4);
}

/* Secondary Tiles Grid */
.ptp-fi-secondary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 15px;
}

.ptp-fi-tile {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ptp-fi-cost {
    grid-column: 1 / -1;
}

.ptp-fi-tile-label {
    font-size: 0.89rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-bottom: 10px;
}

.ptp-fi-tile-value {
    font-size: 2.14rem;
    font-weight: 600;
    color: #FF9800; /* Warm orange */
    margin-bottom: 5px;
}

.ptp-fi-tile-value.zero {
    color: rgba(255, 255, 255, 0.4);
}

.ptp-fi-tile-value.no-data {
    font-size: 1.34rem;
    color: #9E9E9E;
    font-weight: 400;
}

.ptp-fi-tile-rate {
    font-size: 0.94rem;
    opacity: 0.7;
    color: #FFB74D;
}

.ptp-fi-tile-rate.zero {
    color: rgba(255, 255, 255, 0.4);
}

.ptp-fi-tile-subtitle {
    font-size: 0.89rem;
    opacity: 0.6;
    font-style: italic;
}

/* Budget Shortfall Banner */
.ptp-fi-shortfall {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #FF9800;
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ptp-shortfall-label {
    font-size: 0.94rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 10px;
    font-weight: 600;
}

.ptp-shortfall-value {
    font-size: 2.64rem;
    font-weight: 700;
    color: #FF9800; /* Warm orange */
    margin-bottom: 8px;
}

.ptp-shortfall-description {
    font-size: 0.99rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* Food Insecurity Sources */
.ptp-fi-sources {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(244, 67, 54, 0.5);
    padding: 15px 20px;
    border-radius: 4px;
}

.ptp-fi-sources .ptp-source-intro {
    font-size: 0.89rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
    margin: 0 0 8px 0;
}

.ptp-fi-sources .ptp-source-links {
    font-size: 0.94rem;
    margin: 0 0 10px 0;
}

.ptp-fi-sources .ptp-source-links a {
    color: #ef9a9a;
    text-decoration: none;
    font-weight: 500;
}

.ptp-fi-sources .ptp-source-links a:hover {
    text-decoration: underline;
}

.ptp-source-methodology {
    font-size: 0.89rem;
    opacity: 0.7;
    margin: 0;
    line-height: 1.5;
}

/* Derived Economic Metrics */
.ptp-info-banner {
    background: rgba(66, 165, 245, 0.1);
    border: 1px solid rgba(66, 165, 245, 0.3);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
}

.ptp-derived-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ptp-derived-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1.2rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ptp-derived-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.ptp-derived-card.ptp-derived-highlight {
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Status-based colors for derived metrics */
.ptp-derived-card.ptp-derived-low {
    border-left: 3px solid #66bb6a;
}

.ptp-derived-card.ptp-derived-moderate {
    border-left: 3px solid #ffa726;
}

.ptp-derived-card.ptp-derived-high {
    border-left: 3px solid #ef5350;
}

.ptp-derived-label {
    font-size: 0.89rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ptp-info-icon {
    cursor: help;
    opacity: 0.6;
    font-size: 1.04rem;
}

.ptp-derived-value {
    font-size: 2.14rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.ptp-derived-interpretation {
    font-size: 0.99rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.ptp-derived-formula {
    font-size: 0.84rem;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ptp-derived-meta {
    font-size: 0.84rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.ptp-derived-na {
    font-size: 1.14rem;
    opacity: 0.5;
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}
