:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #0b6bcb;
    --primary-dark: #084f98;
    --accent: #f59e0b;
    --border: #dbe3ef;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Assistant", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0b6bcb, #38bdf8);
    color: #fff;
    font-size: 1.2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text small,
.brand-tagline {
    color: var(--muted);
    font-size: 0.82rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-nav-primary {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.nav-link:hover { background: #f1f5f9; text-decoration: none; }

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.5rem;
    z-index: 110;
}

.nav-dropdown-menu.is-open { display: block; }

.nav-dropdown-menu a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.nav-dropdown-menu a:hover { background: #f1f5f9; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-main { min-height: 50vh; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: #e2eefb;
    color: var(--primary-dark);
}

.hero,
.page-head {
    padding: 3rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

.hero-card,
.info-card,
.cta-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.cta-box {
    padding: 1.5rem;
}

.eyebrow {
    color: var(--primary);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 1rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.lead {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.note,
.table-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.section {
    padding: 2rem 0 3rem;
}

.section-muted {
    background: #eaf2fb;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.info-card {
    padding: 1.25rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
}

.filters select {
    min-width: 180px;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.plan-table th,
.plan-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
    vertical-align: top;
}

.plan-table th {
    background: #f8fbff;
    font-size: 0.95rem;
}

.subtle {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 800;
}

.inline-list {
    margin: 0;
    padding-right: 1rem;
}

.faq-list details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 700;
}

.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 36ch;
    margin-top: 0.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.footer-col li { margin-bottom: 0.45rem; }

.site-footer a {
    color: #e2e8f0;
    text-decoration: none;
}

.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 0.92rem;
}

.content-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.content-body h2,
.content-body h3 {
    margin-top: 1.5rem;
}

.content-body ul,
.content-body ol {
    padding-right: 1.25rem;
}

.meter-lookup-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
}

.meter-lookup-card,
.meter-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.meter-info-card h2,
.meter-info-card h3 {
    margin-top: 0;
}

.meter-benefits {
    padding-right: 1.2rem;
    margin: 1rem 0;
}

.meter-lookup-form {
    display: grid;
    gap: 1rem;
}

.meter-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.meter-field input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

.meter-field input:focus {
    outline: 2px solid rgba(11, 107, 203, 0.25);
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
}

.autocomplete-wrap {
    position: relative;
}

.suggestions {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    left: 0;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-height: 220px;
    overflow-y: auto;
}

.suggestions button {
    width: 100%;
    text-align: right;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
}

.suggestions button:hover {
    background: #f1f5f9;
}

.meter-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.meter-chip {
    border: 1px solid var(--border);
    background: #f8fbff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font: inherit;
    cursor: pointer;
}

.meter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.meter-result {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.meter-result-success {
    background: #ecfdf5;
    border-color: #86efac;
}

.meter-result-unknown {
    background: #fff7ed;
    border-color: #fdba74;
}

.meter-result-note {
    color: var(--muted);
    font-size: 0.95rem;
}

.meter-alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.meter-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Calculator / consumption upload */
.calc-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

.calc-upload-panel,
.calc-help-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 220px;
    padding: 2rem 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.upload-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.upload-icon {
    font-size: 2.5rem;
}

.upload-hint,
.upload-file-name {
    color: var(--muted);
    font-size: 0.95rem;
}

.upload-file-name {
    color: var(--primary);
    font-weight: 600;
}

.calc-option {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.btn-lg {
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.alert-error {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.steps-list {
    margin: 0;
    padding-right: 1.2rem;
    color: var(--muted);
}

.steps-list li + li {
    margin-top: 0.5rem;
}

.calc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card,
.calc-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.calc-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.calc-stat strong {
    display: block;
    font-size: 1.35rem;
    margin: 0.35rem 0;
}

.calc-stat small {
    color: var(--muted);
    font-size: 0.85rem;
}

.calc-best-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
    border: 1px solid #bbf7d0;
}

.calc-best-box h2 {
    margin-bottom: 0.5rem;
}

.calc-results-table .row-best {
    background: #f0fdf4;
}

.badge-best {
    background: #16a34a;
    color: #fff;
    margin-right: 0.35rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.calc-meta-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.calc-meta-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    min-height: 74px;
}

.calc-meta-item span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.calc-meta-item strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.35;
    word-break: break-word;
}

.calc-dry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calc-dry-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.calc-dry-group h3 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
}

.calc-dry-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.calc-dry-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #f8fbff;
}

.calc-dry-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.calc-dry-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.45rem;
}

.calc-period-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
}

.calc-period-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.calc-period-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.calc-period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.calc-period-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.calc-period-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calc-period-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@media (max-width: 900px) {
    .brand-tagline { display: none; }

    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 0.75rem;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open { display: flex; }

    .site-nav-primary {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link { width: 100%; text-align: right; }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: 0;
        padding: 0 0.5rem 0.5rem;
    }

    .nav-cta { width: 100%; margin-top: 0.5rem; }

    .hero-grid,
    .cards-grid,
    .footer-grid,
    .meter-lookup-layout,
    .calc-layout,
    .calc-summary-grid,
    .calc-meta-bar,
    .calc-dry-grid,
    .calc-dry-cards {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }
}
