:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f4f7f9;
    --surface-tint: #eef6f8;
    --ink: #13242c;
    --text: #1c2a31;
    --muted: #667782;
    --line: #dfe7eb;
    --line-strong: #c8d5db;
    --accent: #0e5f79;
    --accent-dark: #083344;
    --accent-soft: #e5f3f6;
    --gold: #b7791f;
    --warm: #b7791f;
    --danger: #b42318;
    --shadow: 0 18px 46px rgba(19, 36, 44, 0.08);
    --shadow-soft: 0 10px 24px rgba(19, 36, 44, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
.site-footer,
.hero,
.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(223, 231, 235, 0.75);
}

.brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.brand img {
    display: block;
    width: 236px;
    height: auto;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav a,
.nav-cta,
.button {
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 700;
}

.main-nav a {
    color: var(--muted);
}

.main-nav a.is-active,
.main-nav a:hover {
    background: var(--accent-soft);
    color: var(--text);
}

.nav-cta,
.button.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 22px rgba(14, 95, 121, 0.16);
}

.nav-cta:hover,
.button.primary:hover {
    background: var(--accent-dark);
}

.button.secondary {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--accent-dark);
}

.button.secondary:hover {
    border-color: var(--line-strong);
    background: var(--surface-muted);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 32px;
    align-items: end;
    padding: 70px 0 34px;
}

.hero h1,
.page-header h1 {
    margin: 0;
    font-size: clamp(2.3rem, 7vw, 4.9rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero p,
.page-header p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.1rem;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--warm);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.quick-estimate,
.price-band,
.calculator-result,
.notice {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.quick-estimate {
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--accent);
}

.quick-estimate::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 130px;
    height: 130px;
    border: 24px solid var(--accent-soft);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.quick-estimate > * {
    position: relative;
    z-index: 1;
}

.quick-estimate span,
.price-band span,
.calculator-result span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.quick-estimate strong,
.price-band strong,
.calculator-result strong {
    display: block;
    margin: 8px 0;
    font-size: 1.7rem;
}

.assumption-list {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.assumption-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.assumption-list dt,
.assumption-list dd {
    margin: 0;
}

.assumption-list dt {
    color: var(--muted);
}

.assumption-list dd {
    font-weight: 800;
    text-align: right;
}

.result-tips {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
    padding-left: 18px;
    color: var(--muted);
}

.page-shell {
    padding: 42px 0;
}

.section {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.proof-strip {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.proof-strip div {
    background: var(--surface);
    padding: 18px;
    border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
    border-right: 0;
}

.proof-strip strong {
    display: block;
    font-size: 1.5rem;
}

.proof-strip span {
    color: var(--muted);
}

.section.alt {
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--surface-muted);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section.alt > * {
    width: min(1120px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2,
.article-section h2 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    letter-spacing: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.card-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.guide-row {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.guide-row:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 8px;
}

.card p,
.guide-row small,
.article-section p,
.site-footer p {
    color: var(--muted);
}

.guide-list {
    display: grid;
    gap: 10px;
}

.guide-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.guide-row span {
    display: grid;
    gap: 4px;
}

.guide-row em {
    color: var(--accent);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.page-header {
    margin-bottom: 28px;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a {
    color: var(--accent);
    font-weight: 750;
}

.breadcrumbs strong {
    color: var(--text);
}

.article {
    max-width: 860px;
}

.article-section {
    margin-top: 34px;
}

.article-section.callout {
    background: var(--surface-tint);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.compare-box {
    display: grid;
    gap: 12px;
}

.compare-box div {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.compare-box span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-dark);
    color: #fff;
    font-weight: 900;
}

.compare-box p {
    margin: 0;
}

.section-list {
    display: grid;
    gap: 12px;
}

.section-list article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.section-list h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.section-list p {
    margin: 0;
}

.article-section.muted {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: var(--surface-muted);
}

.check-list {
    display: grid;
    gap: 10px;
    padding-left: 20px;
}

.faq-list {
    display: grid;
    gap: 10px;
}

details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

summary {
    cursor: pointer;
    font-weight: 800;
}

.calculator {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.calculator-form,
.lead-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 750;
}

label.wide {
    grid-column: 1 / -1;
}

.consent-field {
    grid-template-columns: 24px 1fr;
    align-items: start;
    font-weight: 600;
}

.consent-field small {
    grid-column: 2;
}

.consent-field a {
    color: var(--accent-dark);
    text-decoration: underline;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--text);
    font: inherit;
    background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--accent-soft);
    border-color: var(--accent);
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
}

label small {
    color: var(--danger);
}

.lead-form .button {
    width: fit-content;
    border: 0;
    cursor: pointer;
}

.optional-label {
    color: var(--muted);
    font-weight: 650;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 34px;
    align-items: start;
    min-width: 0;
}

.contact-intro,
.contact-card,
.contact-form,
.cookie-panel,
.cookie-copy {
    min-width: 0;
}

.contact-intro h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
}

.contact-intro > p {
    color: var(--muted);
    font-size: 1.1rem;
}

.contact-note {
    display: grid;
    gap: 10px;
    margin-top: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
}

.contact-note p {
    margin: 0;
    color: var(--muted);
}

.contact-card {
    display: grid;
    gap: 18px;
}

.contact-form textarea {
    resize: vertical;
}

.notice.success {
    margin-bottom: 18px;
    border-color: #9fd3b6;
    background: #f0fdf4;
    color: #14532d;
}

.notice.warning {
    margin-bottom: 18px;
    border-color: #fbbf24;
    background: #fffbeb;
    color: #78350f;
}

.method-band {
    width: min(1120px, calc(100% - 32px));
    margin: 22px auto 52px;
    display: grid;
    grid-template-columns: 1fr 1.1fr auto;
    gap: 22px;
    align-items: center;
    padding: 26px;
    border-radius: 8px;
    background: var(--accent-dark);
    color: #fff;
    box-shadow: var(--shadow);
}

.method-band h2,
.method-band p {
    margin: 0;
}

.method-band p:not(.eyebrow) {
    color: #dbeafe;
}

.method-band .button.secondary {
    background: #fff;
    color: var(--ink);
    white-space: nowrap;
}

.status-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.status-tabs a,
.status-pill {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 800;
}

.status-tabs a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.status-pill.status-ok {
    color: #14532d;
    background: #dcfce7;
    border-color: #86efac;
}

.status-pill.status-issue {
    color: #78350f;
    background: #fffbeb;
    border-color: #fbbf24;
}

.admin-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-summary span,
.admin-detail {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.admin-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-detail h2 {
    margin-top: 0;
}

.status-form {
    display: grid;
    gap: 10px;
}

.status-form button {
    width: fit-content;
    border: 0;
}

.admin-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.dashboard-grid,
.admin-columns {
    display: grid;
    gap: 16px;
}

.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 34px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 6px;
    font-size: 2.2rem;
}

.admin-columns {
    grid-template-columns: 1.35fr 0.85fr;
    align-items: start;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.lead-description {
    white-space: normal;
}

.copy-template {
    min-height: 260px;
    background: var(--surface);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.5;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(160px, 0.7fr) minmax(180px, 0.75fr);
    gap: 42px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
}

.footer-brand {
    display: grid;
    gap: 14px;
    align-content: start;
}

.footer-brand .brand img {
    width: 220px;
}

.footer-brand p {
    max-width: 420px;
    margin: 0;
}

.footer-column {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-column strong {
    margin-bottom: 3px;
    color: var(--ink);
}

.footer-column a,
.footer-link {
    width: fit-content;
    color: var(--muted);
    font-weight: 700;
}

.footer-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.footer-link:hover,
.site-footer a:hover {
    color: var(--accent);
}

.cookie-banner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 60;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-panel {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(19, 36, 44, 0.18);
    pointer-events: auto;
}

.cookie-copy {
    display: grid;
    gap: 6px;
}

.cookie-copy strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.cookie-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
}

.cookie-copy a {
    width: fit-content;
    color: var(--accent);
    font-weight: 800;
}

.cookie-options {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.cookie-options[hidden] {
    display: none;
}

.cookie-options label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.cookie-options input {
    width: 18px;
    height: 18px;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 820px) {
    .site-header,
    .hero,
    .calculator,
    .contact-layout,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .site-header {
        justify-items: start;
        position: static;
    }

    .hero h1,
    .page-header h1,
    .contact-intro h1 {
        font-size: clamp(1.9rem, 8vw, 2.25rem);
        line-height: 1.04;
        overflow-wrap: anywhere;
    }

    .hero-copy {
        max-width: 34ch;
    }

    .contact-intro > p,
    .contact-note p,
    .cookie-copy p {
        max-width: 28ch;
    }

    .contact-intro h1 {
        max-width: 19ch;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .card-grid,
    .card-grid.compact,
    .lead-form,
    .calculator-form,
    .admin-detail,
    .dashboard-grid,
    .admin-columns,
    .proof-strip,
    .method-band {
        grid-template-columns: 1fr;
    }

    .method-band .button.secondary {
        width: fit-content;
        white-space: normal;
    }

    .guide-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .guide-row em {
        white-space: normal;
    }

    .cookie-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .cookie-actions {
        flex-direction: column;
        justify-content: flex-start;
    }

    .cookie-actions .button {
        width: 100%;
    }
}
