:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-alt: #f7f9fb;
    --ink: #0d1b2a;
    --muted: #5c6e7a;
    --border: #d8e3ec;
    --border-strong: #c0cfdb;
    --primary: #0b3b2a;
    --primary-mid: #155c40;
    --primary-light: #e4f2eb;
    --accent: #1a9067;
    --accent-hover: #14745a;
    --warning-bg: #fff8ed;
    --warning-border: #f5c97f;
    --warning-text: #8b4e0f;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-text: #b91c1c;
    --shadow-sm: 0 2px 10px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(13, 27, 42, 0.03);
    --shadow-md: 0 8px 28px rgba(13, 27, 42, 0.08), 0 2px 6px rgba(13, 27, 42, 0.04);
    --radius: 16px;
    --radius-lg: 24px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

p,
.field-hint,
.section-sub,
.tbl-note,
.faq-card p,
.content-section p {
    overflow-wrap: break-word;
    word-break: normal;
}

.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-dot {
    color: #5dd6a8;
}

.header-nav {
    display: flex;
    gap: 6px;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.header-nav a.nav-active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.section-sub {
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 60ch;
    margin-bottom: 24px;
}

.main-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-title {
    padding: 16px 20px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
}

.content-section {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 24px 0 12px;
}

.content-section p {
    font-size: 0.93rem;
    line-height: 1.75;
    color: #4a5968;
    max-width: 74ch;
    margin-bottom: 16px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.faq-section {
    margin-top: 32px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.faq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.faq-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.faq-card p {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.6;
}

.info-link {
    color: var(--muted);
    font-size: 0.85rem;
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}

.info-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Heading + ingress wrapper above calculators and sections */
.section-intro {
    margin-bottom: 24px;
}

/* «valgfritt»-labels inside field labels */
.label-optional {
    font-weight: 400;
    color: var(--muted);
}

/* Reset-button row: removes bottom margin from the last field-full */
.field--no-margin {
    margin-bottom: 0;
}

/* SEO text block below calculators */
.page-seo-text {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 8px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.page-seo-text p + p {
    margin-top: 1em;
}

/* Info-link / CTA row below SEO text */
.page-seo-cta {
    text-align: center;
    margin-top: 20px;
    padding: 0 24px 40px;
}

.share-row {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.85rem;
}

.share-label {
    font-weight: 600;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.share-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Empty-state cell in savings table */
.tbl-empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.disclaimer-note {
    margin-top: 16px;
    font-style: italic;
    font-size: 0.86rem;
    color: var(--muted);
}

.contact-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.contact-link:hover {
    text-decoration: underline;
}

.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 32px 24px;
    font-size: 0.85rem;
}

.site-footer p + p {
    margin-top: 5px;
}

.site-footer strong {
    color: rgba(255, 255, 255, 0.85);
}

.site-ref {
    display: inline-block;
    margin-top: 10px;
    opacity: 0.28;
    font-size: 0.6rem;
    font-family: monospace;
    letter-spacing: 0.05em;
    cursor: text;
    min-width: 6ch;
    transition: opacity 0.15s;
}

.site-ref::selection {
    background: rgba(255, 255, 255, 0.9);
    color: #1a3a2a;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header {
    animation: slideUpFadeIn 450ms ease-out both;
}

main {
    animation: slideUpFadeIn 450ms ease-out both 130ms;
}

.site-footer {
    animation: slideUpFadeIn 450ms ease-out both 260ms;
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    main,
    .site-footer {
        animation: none;
    }
}

@media (max-width: 820px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .wrap {
        padding: 20px 16px 48px;
    }

    .header-inner {
        height: auto;
        min-height: 60px;
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .header-nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }

    .header-nav a {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .content-section {
        padding: 20px;
    }
}
