/* Nav brand */
.nav-brand {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

/* Hero banner */
.hero-banner {
    position: relative;
    margin: -1rem -1rem 2rem;
    overflow: hidden;
    border-radius: 8px;
}

.hero-banner picture img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem;
    color: #fff;
}

.hero-overlay h1 {
    color: #fff;
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    max-width: 600px;
}

.hero-overlay p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 550px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-overlay a[role="button"] {
    width: auto;
    display: inline-block;
}

@media (max-width: 768px) {
    .hero-banner picture img {
        height: 300px;
    }
    .hero-overlay {
        padding: 1.5rem;
    }
    .hero-overlay h1 {
        font-size: 1.6rem;
    }
    .hero-overlay p {
        font-size: 0.95rem;
    }
}

/* Clickable feature cards */
a.feature-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.feature-card:hover {
    border-color: var(--pico-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Score legend on landing */
.score-legend {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.score-legend h4 {
    margin: 0 0 1rem;
}

/* Mobile nav hamburger — CSS-only, no JS needed */
.nav-toggle-input {
    display: none;
}

.nav-hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    user-select: none;
    color: var(--pico-color);
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1rem;
        z-index: 10;
    }

    nav.container {
        position: relative;
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
        border-top: 1px solid var(--pico-muted-border-color);
    }

    .nav-toggle-input:checked ~ .nav-menu {
        display: flex;
    }
}

.progress-steps {
    text-align: center;
    margin-bottom: 2rem;
}

.progress-steps progress {
    width: 100%;
}

.progress-steps small {
    display: block;
    margin-top: 0.5rem;
    color: var(--pico-muted-color);
}

.score-display {
    text-align: center;
    padding: 2rem 0;
}

.score-number {
    font-size: 3rem;
    margin: 1rem 0;
}

.score-number small {
    font-size: 1.5rem;
    color: var(--pico-muted-color);
}

.recommendation {
    font-size: 1.2rem;
    font-weight: 600;
}

.rec-strong-yes { color: #2e7d32; }
.rec-yes { color: #558b2f; }
.rec-maybe { color: #f57f17; }
.rec-no { color: #c62828; }

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
}

nav .active {
    font-weight: bold;
    text-decoration: underline;
}

/* Plan comparison cards */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.plan-card {
    border-left: 4px solid var(--pico-muted-border-color);
    padding: 1rem;
    margin: 0;
}

.plan-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0;
    background: none;
}

.plan-card dl {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.plan-card dt {
    color: var(--pico-muted-color);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.plan-card dd {
    margin-left: 0;
    font-weight: 600;
}

.adequacy-dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
}

.adequacy-green { border-left-color: #2e7d32; }
.adequacy-green.adequacy-dot { background: #2e7d32; }
.adequacy-amber { border-left-color: #f57f17; }
.adequacy-amber.adequacy-dot { background: #f57f17; }
.adequacy-red   { border-left-color: #c62828; }
.adequacy-red.adequacy-dot   { background: #c62828; }

/* Battery advice */
.battery-advice {
    font-size: 1.1rem;
    padding: 0.5rem 0;
}
.battery-recommended strong { color: #2e7d32; }
.battery-optional    strong { color: #f57f17; }
.battery-not_needed  strong { color: var(--pico-muted-color); }

.form-error {
    color: #c62828;
    background: #ffebee;
    padding: 0.6rem 1rem;
    border-left: 3px solid #c62828;
    margin: 0 0 1rem 0;
}

.privacy-notice {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--pico-primary);
    background: var(--pico-card-background-color);
}

.privacy-notice header {
    padding: 0 0 0.5rem 0;
    background: none;
}

.privacy-notice p {
    margin: 0.4rem 0;
}

.privacy-notice label {
    display: block;
    margin-top: 0.8rem;
    line-height: 1.5;
}

/* Feature cards — used on landing, partner, and hub pages */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.feature-card .feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3,
.feature-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--pico-primary);
}

.feature-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--pico-muted-color);
    line-height: 1.6;
}

/* Steps list — numbered flow on partner pages */
.steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 2rem;
    height: 2rem;
    background: var(--pico-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Partner hub CTA cards */
.partner-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.partner-cta-card {
    border: 2px solid var(--pico-muted-border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.partner-cta-card:hover {
    border-color: var(--pico-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.partner-cta-card h3 {
    color: var(--pico-primary);
    margin-bottom: 1rem;
}

.partner-cta-card p {
    color: var(--pico-muted-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Highlight section (pricing, loan profile) */
.highlight-box {
    background: var(--pico-card-background-color);
    border-left: 4px solid var(--pico-primary);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.highlight-box p {
    margin: 0;
}

/* Stats row on landing */
.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pico-primary);
    display: block;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

/* Input method chooser cards */
.input-method-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-card {
    border: 2px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1.25rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.method-card:hover {
    border-color: var(--pico-primary);
}

.method-card.selected {
    border-color: var(--pico-primary);
    background: var(--pico-card-background-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.method-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.method-card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.method-card small {
    color: var(--pico-muted-color);
    font-size: 0.85rem;
}

.method-section {
    display: none;
}

/* Admin bulk action bar */
.bulk-action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.bulk-count {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    min-width: 90px;
}

.bulk-action-select {
    margin: 0;
    max-width: 250px;
}

.bulk-go-btn {
    margin: 0;
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
}

/* Pagination */
.pagination ul {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.pagination a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination a.active {
    background: var(--pico-primary);
    color: #fff;
}

/* Assessment inputs (admin view) */
.input-section {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.input-section h4 {
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pico-primary);
}

.input-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.input-group {
    padding: 1rem 1.25rem;
    background: var(--pico-background-color);
    border-radius: 6px;
    border: 1px solid var(--pico-muted-border-color);
}

.input-group strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pico-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.input-group dl {
    margin: 0;
}

.input-group dt {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    margin-top: 0.5rem;
}

.input-group dt:first-of-type {
    margin-top: 0;
}

.input-group dd {
    margin: 0.1rem 0 0 0;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-section .input-meta {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pico-muted-border-color);
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

/* Installer checklist */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checklist label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.5;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.checklist label:hover {
    border-color: var(--pico-primary);
}

.checklist label:has(input:checked) {
    background: #f0faf0;
    border-color: #2e7d32;
    text-decoration: line-through;
    color: var(--pico-muted-color);
}

.checklist input[type="checkbox"] {
    margin: 0.2rem 0 0 0;
    flex-shrink: 0;
}

.checklist.warning label {
    border-left: 3px solid #c62828;
}

.checklist.warning label:has(input:checked) {
    background: #fff5f5;
    border-color: #c62828;
}

@media print {
    nav, footer, .checklist label:has(input:checked) {
        text-decoration: none;
        color: inherit;
        background: none;
    }
    .checklist label {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* Glossary */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2.5rem;
}

.glossary-card {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.glossary-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.glossary-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #e8e8e8;
}

.glossary-card h4 {
    margin: 1rem 1.25rem 0.5rem;
    color: var(--pico-primary);
}

.glossary-card p {
    margin: 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.glossary-card .price-note {
    display: block;
    margin: 0.75rem 1.25rem 1.25rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--pico-muted-color);
}

/* Wizard navigation buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.wizard-nav .btn-back {
    --pico-background-color: transparent;
    --pico-border-color: var(--pico-primary);
    --pico-color: var(--pico-primary);
    width: auto;
}

.wizard-nav .btn-back:hover {
    --pico-background-color: var(--pico-primary-hover);
    --pico-color: var(--pico-primary-inverse);
}

.wizard-nav button[type="submit"] {
    margin-bottom: 0;
}

/* Cost breakdown */
.cost-breakdown {
    margin-top: 0.75rem;
}

.cost-breakdown > summary {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--pico-primary);
    border-radius: 4px;
    color: var(--pico-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.cost-breakdown > summary:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
}

.cost-breakdown[open] > summary {
    margin-bottom: 0.75rem;
}

.cost-breakdown table {
    margin-bottom: 0.5rem;
}

.cost-breakdown td {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.cost-breakdown .cost-total td {
    border-top: 2px solid var(--pico-primary);
    padding-top: 0.5rem;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--pico-muted-color);
    font-size: 0.85rem;
}

/* Inline cost breakdown in plan cards */
.cost-breakdown-inline {
    margin-top: 0.35rem;
}

.cost-breakdown-inline summary {
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--pico-primary);
}

.cost-items {
    margin: 0.25rem 0 0;
}

.cost-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.15rem 0;
}

.cost-item-row dt {
    font-weight: normal;
}

.cost-item-row dd {
    margin: 0;
    text-align: right;
}

/* ROI chart */
.roi-chart-wrap {
    position: relative;
    height: 350px;
    margin: 1rem 0;
}

.roi-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.roi-table {
    font-size: 0.85rem;
    white-space: nowrap;
}

.roi-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Blog */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    padding: 1.5rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.blog-card h3 {
    margin-bottom: 0.25rem;
}

.blog-card h3 a {
    text-decoration: none;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
    margin-bottom: 0.5rem;
}

.blog-article section {
    margin-bottom: 1.5rem;
}

.blog-article h3 {
    margin-bottom: 0.5rem;
}

.blog-cta {
    background: var(--pico-card-background-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

/* Partner ad cards on results page */
.partner-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.partner-ad-card {
    padding: 1rem 1.2rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    margin: 0;
}

.partner-ad-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 0.5rem;
}

.partner-type-badge {
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-installer {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-financing {
    background: #e3f2fd;
    color: #1565c0;
}

.partner-tagline {
    margin-bottom: 0.3rem;
    color: var(--pico-muted-color);
}

.partner-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.85em;
}

/* OTP verification */
#otp-area {
    margin: 0.5rem 0 1rem;
}

#otp-area button.outline {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.otp-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.otp-input-row input {
    max-width: 10rem;
    margin-bottom: 0;
    text-align: center;
    letter-spacing: 0.3em;
    font-size: 1.1rem;
}

.otp-input-row button {
    margin-bottom: 0;
    white-space: nowrap;
}

.otp-sent-msg {
    color: var(--pico-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.otp-verified {
    color: var(--pico-ins-color, #2a9d2a);
    font-weight: 600;
    font-size: 0.9rem;
}

.otp-error {
    color: var(--pico-del-color, #c62828);
    font-size: 0.9rem;
}

.otp-warn {
    color: var(--pico-mark-color, #e65100);
    font-size: 0.9rem;
}

.otp-resend {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
}
