/* HP Energy Consumption v2 — Kadence theme integration */

#enthalpic-forecast {
    --ec-accent: #6366f1;
    --ec-accent-hover: #4f46e5;
    --ec-title: #1e293b;
    --ec-body: #475569;
    --ec-border: #e2e8f0;
    --ec-bg: #ffffff;
    --ec-bg-alt: #f8fafc;
    --ec-bg-input: #ffffff;
    --ec-danger: #ef4444;
    --ec-success: #22c55e;
    --ec-warning: #f59e0b;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ec-body);
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#enthalpic-forecast h2 {
    color: var(--ec-title);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

#enthalpic-forecast h3 {
    color: var(--ec-title);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.ec-subtitle {
    color: var(--ec-body);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
}

/* Layout: side by side on desktop */
.ec-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Input side */
.ec-inputs {
    min-width: 0;
}

.ec-form {
    background: var(--ec-bg);
    border: 1px solid var(--ec-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.ec-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ec-border);
}

.ec-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ec-section-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--ec-accent) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.75rem !important;
}

.ec-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.ec-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ec-field-row .ec-field {
    margin-bottom: 0;
}

.ec-field.ec-full {
    grid-column: 1 / -1;
}

.ec-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ec-title);
}

.ec-field label .ec-unit {
    font-weight: 400;
    color: var(--ec-body);
}

.ec-field input,
.ec-field select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ec-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--ec-bg-input);
    color: var(--ec-title);
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.ec-field input:focus,
.ec-field select:focus {
    outline: none;
    border-color: var(--ec-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ec-street-wrap {
    position: relative;
}
.ec-street-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--ec-bg-input, #fff);
    border: 1px solid var(--ec-border, #d1d5db);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.ec-street-option {
    padding: 0.4rem 0.75rem;
    font-size: 0.88rem;
    cursor: pointer;
    color: var(--ec-title, #1f2937);
}
.ec-street-option:hover,
.ec-street-active {
    background: var(--ec-accent, #6366f1);
    color: #fff;
}

/* Radio groups */
.ec-radio-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ec-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--ec-border);
    border-radius: 6px;
    transition: all 0.15s;
    font-size: 0.82rem;
}

.ec-radio-group label:has(input:checked) {
    border-color: var(--ec-accent);
    background: rgba(99, 102, 241, 0.08);
    color: var(--ec-accent);
    font-weight: 600;
}

.ec-radio-group input[type="radio"] {
    display: none;
}

.ec-radio-vertical {
    flex-direction: column;
}

.ec-radio-vertical label {
    padding: 0.5rem 0.75rem;
}

.ec-radio-vertical label small {
    color: var(--ec-body);
    font-weight: 400;
}

/* Badges */
.ec-zone-badge,
.ec-pump-badge,
.ec-inline-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--ec-accent);
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.ec-error-inline {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 4px;
    font-size: 0.78rem;
}

.ec-warning-inline {
    display: block;
    margin-top: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: #fffbeb;
    color: #92400e;
    border-left: 3px solid var(--ec-warning, #f59e0b);
    border-radius: 4px;
    font-size: 0.78rem;
    line-height: 1.4;
}
.ec-warning-inline:empty {
    display: none;
}

.ec-help-link {
    color: var(--ec-accent);
    text-decoration: underline;
    font-size: 0.78rem;
    cursor: pointer;
}

.ec-source-label {
    font-size: 0.78rem;
    color: #666;
    font-style: italic;
}

.ec-privacy-note {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.5rem;
}

a.ec-keymark-link {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--ec-accent);
    text-decoration: underline;
    font-size: 0.78rem;
}

.ec-inline-info {
    margin-top: 0.25rem;
}

/* Results panel */
.ec-results-panel {
    position: sticky;
    top: 1rem;
    background: var(--ec-bg);
    border: 1px solid var(--ec-border);
    border-radius: 12px;
    padding: 1.25rem;
    min-height: 200px;
}

.ec-results-placeholder {
    color: var(--ec-body);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

.ec-loading {
    color: var(--ec-accent);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
}

.ec-station-info {
    font-size: 0.82rem;
    color: var(--ec-body);
    margin: 0 0 0.75rem;
}

/* Results table */
.ec-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    table-layout: fixed;
}

.ec-results-table col.ec-col-label { width: 40%; }
.ec-results-table col.ec-col-data  { width: 20%; }

.ec-results-table th,
.ec-results-table td {
    padding: 0.5rem 0.5rem;
    text-align: right;
    border-bottom: 1px solid var(--ec-border);
}

.ec-results-table th {
    background: var(--ec-bg-alt);
    color: var(--ec-title);
    font-weight: 600;
    position: sticky;
    top: 0;
    font-size: 0.78rem;
}

.ec-results-table th:first-child,
.ec-results-table td:first-child {
    text-align: left;
}

.ec-results-table tr.ec-row-sub td {
    font-size: 0.75rem;
    color: var(--ec-body);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.ec-results-table tr.ec-row-sub td:first-child {
    padding-left: 1rem;
}

.ec-results-table tr.ec-row-subtotal {
    font-weight: 600;
    background: rgba(99, 102, 241, 0.03);
}

.ec-results-table tr.ec-row-subtotal td {
    border-top: 1px solid var(--ec-accent);
}

.ec-results-table tr.ec-row-total {
    font-weight: 700;
    background: rgba(99, 102, 241, 0.05);
}

.ec-results-table tr.ec-row-total td {
    border-top: 2px solid var(--ec-accent);
}

.ec-results-table td.ec-col-optimistic {
    color: #16a34a;
}

.ec-results-table td.ec-col-pessimistic {
    color: #dc2626;
}

.ec-results-table td.ec-col-unit {
    color: var(--ec-body);
    font-size: 0.75rem;
}

.ec-footnote {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.5rem 0 0;
    padding: 0;
    font-style: italic;
}

/* Metadata */
.ec-meta {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--ec-bg-alt);
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.6;
}

.ec-meta dt {
    font-weight: 600;
    display: inline;
}

.ec-meta dd {
    display: inline;
    margin: 0 1rem 0 0;
}

/* Warnings */
.ec-warnings {
    margin-top: 0.75rem;
}

.ec-warning {
    padding: 0.5rem 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #854d0e;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

/* Bar chart */
.ec-chart {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.5rem 0;
}

.ec-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec-bar-year {
    font-size: 0.7rem;
    color: var(--ec-body);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.ec-bar {
    height: 14px;
    border-radius: 3px;
    min-width: 4px;
    transition: width 0.3s;
}

.ec-bar-value {
    font-size: 0.7rem;
    color: var(--ec-body);
    flex-shrink: 0;
}
.ec-bar-spf {
    color: #6b7280;
    margin-left: 0.4em;
}

/* Disclaimer */
.ec-disclaimer {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #854d0e;
    line-height: 1.4;
}

/* Error */
.ec-error {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Modal */
.ec-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-modal-content {
    background: var(--ec-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.ec-modal-content h3 {
    margin-top: 0;
}

.ec-modal-content ul {
    padding-left: 1.2rem;
}

.ec-modal-content li {
    margin-bottom: 0.5rem;
}

.ec-modal-content a {
    color: var(--ec-accent);
}

.ec-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ec-body);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .ec-layout {
        grid-template-columns: 1fr;
    }

    .ec-results-panel {
        position: static;
    }

    .ec-field-row {
        grid-template-columns: 1fr;
    }

    .ec-results-table {
        font-size: 0.75rem;
    }

    .ec-results-table th,
    .ec-results-table td {
        padding: 0.35rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .ec-radio-group {
        flex-direction: column;
    }
}

/* Heating curve section */
.ec-hc-intro {
    font-size: 0.78rem;
    color: var(--ec-body);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.ec-hc-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ec-hc-field-row input {
    flex: 1;
    min-width: 0;
}

.ec-hc-reset {
    background: none;
    border: none;
    color: var(--ec-accent);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    align-self: flex-start;
}

.ec-hc-reset:hover {
    color: var(--ec-accent-hover);
}

.ec-hc-readonly {
    font-size: 0.82rem;
    color: var(--ec-title);
    padding: 0.35rem 0;
    font-weight: 600;
}

.ec-hc-readonly .ec-unit {
    font-weight: 400;
    color: var(--ec-body);
}

.ec-hc-error {
    font-size: 0.75rem;
    color: var(--ec-danger);
    margin-top: 0.15rem;
}

.ec-hc-caveat {
    font-size: 0.72rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.ec-hc-mode-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.ec-hc-mode-toggle label {
    cursor: pointer;
    white-space: nowrap;
}

.ec-hc-points-label {
    font-size: 0.75rem;
    color: var(--ec-body);
    margin: 0;
}

#ec-hc-points-panel .ec-field-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
}

#ec-hc-points-panel .ec-field {
    flex: 1;
    min-width: 0;
}

#ec-hc-points-panel .ec-field label {
    font-size: 0.7rem;
    white-space: nowrap;
}

#ec-hc-points-panel .ec-field input {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.25rem 0.3rem;
}

@media (max-width: 480px) {
    .ec-hc-field-row {
        grid-template-columns: 1fr;
    }
    #ec-hc-points-panel .ec-field-row {
        flex-wrap: wrap;
    }
    #ec-hc-points-panel .ec-field {
        flex: 0 0 30%;
    }
}

.ec-version {
    text-align: right;
    font-size: 0.65rem;
    color: #cbd5e1;
    margin-top: 1rem;
}

/* Location map (Change 1) */
#ec-location-map {
    margin: 12px 0 16px 0;
}
#ec-location-map iframe {
    max-width: 100%;
    border-radius: 8px;
}
.ec-map-caption {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 4px;
}

.ec-range-hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.85em;
}

/* Field hint (Change 2) */
.ec-field-hint {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.4;
}

/* Filter reset button (Change 3) */
.ec-filter-reset {
    background: none;
    border: none;
    color: var(--ec-accent);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-top: 0.25rem;
}
.ec-filter-reset:hover {
    color: var(--ec-accent-hover);
}

/* Curves chart (Change 4) */
.ec-chart-container {
    margin: 24px 0;
    max-width: 700px;
}
#ec-curves-chart {
    width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}
.ec-chart-note {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.5rem 0 0;
    font-style: italic;
    line-height: 1.4;
}

.ec-bin-hint {
    margin: 0.75em 0 1em;
    padding: 0.6em 0.9em;
    background: #eef2ff;
    border-left: 3px solid #4f46e5;
    border-radius: 4px;
    font-size: 0.9em;
    color: #3730a3;
    line-height: 1.5;
}

/* Bin overlay (Change 5) */
.ec-bin-link {
    color: #4f46e5;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    cursor: pointer;
}
.ec-bin-link:hover {
    text-decoration-style: solid;
    color: #4338ca;
}
.ec-bin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ec-bin-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 960px;
    width: 95vw;
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.ec-bin-modal-header {
    display: flex;
    align-items: center;
    padding: 6px 16px 6px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    gap: 12px;
}
.ec-bin-header-left {
    flex-shrink: 0;
    white-space: nowrap;
}
.ec-bin-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}
.ec-bin-header-metrics {
    display: grid;
    grid-template-columns: repeat(7, auto);
    gap: 2px 8px;
    margin-left: auto;
    flex-shrink: 1;
    min-width: 0;
}
.ec-bin-close {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
}
.ec-bin-close:hover {
    background: #f3f4f6;
}
.ec-bin-csv-download {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
}
.ec-bin-csv-download:hover:not([disabled]) {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.ec-bin-csv-download[disabled],
.ec-bin-csv-download[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}
.ec-bin-nav {
    padding: 4px 24px 0 24px;
    flex-shrink: 0;
}
.ec-bin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 4px;
    align-items: center;
    flex-wrap: nowrap;
}
.ec-bin-tabs-hint {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}
.ec-bin-tab {
    padding: 3px 8px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
}
.ec-bin-tab.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}
.ec-bin-tab:hover {
    background: #f3f4f6;
}
.ec-bin-years {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-left: 8px;
}
.ec-bin-year-btn {
    padding: 3px 7px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-right: none;
    background: none;
    color: #6b7280;
}
.ec-bin-year-btn:last-child {
    border-right: 1px solid #e5e7eb;
    border-radius: 0 6px 6px 0;
}
.ec-bin-year-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.ec-bin-year-btn.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}
.ec-bin-year-btn:hover {
    background: #f3f4f6;
}
.ec-bin-year-worst {
    color: #dc2626;
    font-weight: 600;
}
.ec-bin-year-worst.active {
    background: #fee2e2;
    color: #dc2626;
}
.ec-bin-year-best {
    color: #16a34a;
    font-weight: 600;
}
.ec-bin-year-best.active {
    background: #dcfce7;
    color: #16a34a;
}
.ec-bin-hint-icon {
    display: none;
}
.ec-bin-modal-body {
    overflow-y: auto;
    padding: 0 24px 8px 24px;
    flex: 1;
}
.ec-bin-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    padding-top: 2px;
}
.ec-bin-metric {
    padding: 0 4px;
    text-align: center;
}
.ec-bin-metric-label {
    font-size: 9px;
    color: #9ca3af;
    white-space: nowrap;
    line-height: 1.2;
}
.ec-bin-metric-val {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    line-height: 1.3;
}
.ec-bin-chart-area {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 8px;
}
.ec-bin-chart-full {
    height: 540px;
    margin-bottom: 8px;
}
.ec-bin-chart-half {
    height: 360px;
    margin-bottom: 4px;
}
.ec-bin-chart-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 4px 0 2px 0;
    padding: 0;
}
.ec-bin-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    font-size: 12px;
    color: #6b7280;
}
.ec-bin-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ec-bin-legend-sq {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}
.ec-bin-tbl-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 520px;
    overflow-y: auto;
}
.ec-bin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}
.ec-bin-table th {
    background: #f9fafb;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 6px 10px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
    white-space: normal;
    line-height: 1.3;
    vertical-align: bottom;
}
.ec-bin-table th:first-child {
    text-align: center;
    min-width: 55px;
}
.ec-bin-table td {
    padding: 6px 10px;
    text-align: right;
    border-bottom: 1px solid #f3f4f6;
}
.ec-bin-table td:first-child {
    text-align: center;
    font-weight: 500;
}
.ec-bin-table tr:last-child td {
    border-bottom: none;
}
.ec-bin-sum td {
    font-weight: 500;
    border-top: 2px solid #333;
    background: #f9fafb;
}
.ec-cop-bar {
    height: 6px;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}
.ec-bar-cell {
    position: relative;
}
.ec-bar-bg {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    border-radius: 2px;
    opacity: 0.18;
}
.ec-bar-val {
    position: relative;
    z-index: 1;
}
.ec-zone-label {
    font-size: 11px;
    color: #9ca3af;
    display: block;
    margin-top: 1px;
}
.ec-bin-spinner {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.ec-bin-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ec-spin 0.8s linear infinite;
}
@keyframes ec-spin {
    to { transform: rotate(360deg); }
}

/* Methodology footer */
.enthalpic-forecast-methodology {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 2em;
    line-height: 1.6;
}

.enthalpic-forecast-methodology hr {
    border: none;
    border-top: 1px solid var(--ec-border);
    margin: 0 0 1em;
}

.enthalpic-forecast-methodology h4 {
    font-size: 1em;
    font-weight: 700;
    color: var(--ec-title);
    margin: 0 0 0.5em;
}

.enthalpic-forecast-methodology h5 {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--ec-title);
    margin: 1em 0 0.3em;
}

.enthalpic-forecast-methodology p {
    margin: 0.4em 0;
}

.enthalpic-forecast-methodology ul {
    padding-left: 1.2em;
    margin: 0.4em 0;
}

.enthalpic-forecast-methodology li {
    margin-bottom: 0.3em;
}

.enthalpic-forecast-methodology blockquote {
    margin: 0.5em 0;
    padding: 0.5em 0.75em;
    border-left: 3px solid var(--ec-border);
    font-style: italic;
    font-size: 0.9em;
}

.ec-compass {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.ec-wall-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    position: relative;
}

.ec-wall-field {
    margin-bottom: 0;
}

.ec-wall-label {
    font-size: 0.85em;
}

.ec-wall-reset {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid var(--ec-border);
    border-radius: 50%;
    width: 1.6rem;
    height: 1.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--ec-text-secondary, #666);
}

.ec-wall-reset:hover {
    background: var(--ec-bg-hover, #f0f0f0);
}

@media (max-width: 600px) {
    .ec-wall-inputs {
        grid-template-columns: 1fr;
    }
}

/* Ridge azimuth lookup */
.ec-ridge-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ec-ridge-row input[type="number"] {
    flex: 1;
}

.ec-ridge-lookup {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.85em;
    background: var(--ec-accent, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.ec-ridge-lookup:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ec-ridge-lookup:hover:not(:disabled) {
    opacity: 0.9;
}

#ec-ridge-result {
    margin-top: 0.4rem;
    font-size: 0.85em;
}

.ec-ridge-info {
    margin: 0.25rem 0;
    color: var(--ec-text-secondary, #555);
}

.ec-ridge-info a {
    color: var(--ec-accent, #3b82f6);
}

.ec-ridge-error {
    margin: 0.25rem 0;
    color: var(--ec-error, #dc2626);
}

.ec-ridge-warning {
    margin: 0.25rem 0;
    color: var(--ec-warning, #d97706);
}

.ec-ridge-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 600;
}

.ec-ridge-badge-high {
    background: #dcfce7;
    color: #166534;
}

.ec-ridge-badge-medium {
    background: #fef9c3;
    color: #854d0e;
}

.ec-ridge-badge-low {
    background: #fee2e2;
    color: #991b1b;
}

.ec-ridge-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.ec-ridge-accept,
.ec-ridge-manual {
    padding: 0.3rem 0.7rem;
    font-size: 0.8em;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--ec-border, #d1d5db);
    background: #fff;
}

.ec-ridge-accept:hover,
.ec-ridge-manual:hover {
    background: var(--ec-bg-hover, #f0f0f0);
}

/* Wall blocking */
.ec-wall-blocked-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    vertical-align: middle;
}

.ec-wall-unlock {
    display: block;
    margin-top: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75em;
    background: none;
    border: 1px solid var(--ec-border, #d1d5db);
    border-radius: 4px;
    cursor: pointer;
    color: var(--ec-text-secondary, #666);
}

.ec-wall-unlock:hover {
    background: var(--ec-bg-hover, #f0f0f0);
}

.ec-wall-field input:disabled {
    opacity: 0.5;
    background: var(--ec-bg-disabled, #f3f4f6);
}

.ec-normative-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--ec-border, #d1d5db);
}

.ec-normative-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.25rem 0 0.75rem;
    font-style: italic;
}

.ec-normative-table {
    width: auto;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ec-normative-table th,
.ec-normative-table td {
    padding: 0.35rem 1rem 0.35rem 0;
    border-bottom: 1px solid var(--ec-border, #d1d5db);
}

.ec-normative-table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-align: right;
    padding-bottom: 0.5rem;
}

.ec-normative-table th:first-child {
    text-align: left;
}

.ec-normative-table th:nth-child(3) {
    padding-left: 2rem;
}

.ec-normative-table td:first-child {
    font-weight: 500;
    white-space: nowrap;
}

.ec-normative-table td:nth-child(2) {
    text-align: right;
}

.ec-normative-table td:nth-child(3) {
    text-align: right;
    padding-left: 2rem;
}

.ec-normative-table td:last-child {
    text-align: right;
}

.ec-normative-cold-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

.ec-normative-unavailable p {
    font-size: 0.82rem;
    color: #64748b;
}
