/* lånekalkyl.nu – design 2026-12 */
:root {
	--deep: #0b3b36;
	--teal: #0f766e;
	--teal-600: #0d9488;
	--teal-50: #ecf8f6;
	--teal-100: #d3efea;
	--amber: #fbbf24;
	--amber-50: #fff8e6;
	--amber-ink: #8a5a00;
	--red: #b42318;
	--red-50: #fef3f2;
	--ink: #10201d;
	--ink-2: #354542;
	--muted: #66756f;
	--line: #e3e8e4;
	--bg: #f6f5f0;
	--card: #ffffff;
	--radius: 20px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(16, 32, 29, .05), 0 10px 30px -10px rgba(16, 32, 29, .12);
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-num: ui-rounded, "SF Pro Rounded", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--deep); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.25rem + 2.4vw, 2.8rem); margin: 0 0 .55em; font-weight: 800; }
h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.65rem); margin: 2.1em 0 .6em; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 1.7em 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ol, ul { padding-left: 1.3em; }
li { margin-bottom: .25em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--deep); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.icon { flex-shrink: 0; }

/* Förhandsvisning */
.preview-bar { background: var(--amber); color: #3d2a00; text-align: center; font-size: .85rem; font-weight: 650; padding: .35rem 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 245, 240, .88); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-name span { color: var(--teal); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--teal); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .1rem; }
.site-nav li { margin: 0; }
.site-nav a { display: block; padding: .5rem .75rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 560; font-size: .93rem; white-space: nowrap; transition: background .15s, color .15s; }
.site-nav a:hover { background: var(--teal-50); color: var(--teal); }
.site-nav a[aria-current="page"] { background: var(--deep); color: #fff; }
.nav-toggle { display: none; margin-left: auto; align-items: center; gap: .55rem; height: 44px; padding: 0 1rem 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1120px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
	.site-nav.open { display: block; }
	.site-nav ul { flex-direction: column; padding: .6rem 1.25rem 1.1rem; width: min(1180px, 100% - 0rem); margin: 0 auto; }
	.site-nav a { padding: .75rem 1rem; font-size: 1.02rem; border-radius: var(--radius-sm); }
}

/* Layout */
.site-main { padding: 2.75rem 0 3.5rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: start; }
.page { min-width: 0; max-width: 800px; }
.page > h1:first-child { margin-top: 0; }
.sidebar { position: sticky; top: 96px; }
.sidebar__box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.sidebar__box h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .75rem .4rem; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li { margin: 0; }
.side-links a { display: flex; align-items: center; gap: .7rem; padding: .55rem .5rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 560; font-size: .97rem; }
.side-links a:hover { background: var(--teal-50); }
.side-links a[aria-current="page"] { background: var(--teal-50); color: var(--teal); }
.side-links__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal); }
.side-links a[aria-current="page"] .side-links__icon { background: var(--teal); color: #fff; }
@media (max-width: 960px) {
	.layout { grid-template-columns: 1fr; gap: 2rem; }
	.sidebar { position: static; }
	.side-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .25rem; }
}

/* Startsidan */
.hero { position: relative; overflow: hidden; background: var(--deep); color: #d6ebe7; margin-top: -2.75rem; padding: 4.25rem 0 6.5rem; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 360px at 85% 0%, rgba(13, 148, 136, .55), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(251, 191, 36, .14), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero__text { max-width: 760px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); }
.hero p { font-size: 1.1rem; color: #c3dfda; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.tools { position: relative; z-index: 2; margin-top: -4rem; }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.tool-grid li { margin: 0; }
.tool-card { display: flex; flex-direction: column; height: 100%; padding: 1.4rem 1.4rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink-2); transition: transform .18s, box-shadow .18s, border-color .18s; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--teal-100); box-shadow: 0 1px 2px rgba(16, 32, 29, .05), 0 20px 40px -16px rgba(15, 118, 110, .35); color: var(--ink-2); }
.tool-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--teal-50); color: var(--teal); margin-bottom: 1rem; transition: background .18s, color .18s; }
.tool-card:hover .tool-card__icon { background: var(--teal); color: #fff; }
.tool-card__title { font-weight: 750; font-size: 1.12rem; color: var(--ink); letter-spacing: -.01em; }
.tool-card__desc { font-size: .95rem; line-height: 1.55; color: var(--muted); margin: .3rem 0 1rem; }
.tool-card__cta { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; font-size: .93rem; color: var(--teal); }
.tool-card:hover .tool-card__cta .icon { transform: translateX(3px); }
.tool-card__cta .icon { transition: transform .18s; }
.home-text { max-width: 800px; margin-top: 3rem; }

/* Kalkylator */
.calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); margin: 1.75rem 0 2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calc-form { padding: 1.6rem; display: flex; flex-direction: column; gap: 1.05rem; }
.calc-form__title { margin: 0; font-size: 1.05rem; color: var(--ink); font-weight: 750; display: flex; align-items: center; gap: .55rem; }
.calc-form__title .icon { color: var(--teal); }
.field label { display: block; font-weight: 620; font-size: .93rem; color: var(--ink); margin-bottom: .35rem; line-height: 1.35; }
.input-wrap { position: relative; display: flex; align-items: center; }
.field input, .field select { width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fbfbf8; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .72rem .9rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input { padding-right: 3rem; font-variant-numeric: tabular-nums; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366756f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px; cursor: pointer; }
.field input:hover, .field select:hover { border-color: #cfd8d3; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(15, 118, 110, .14); }
.unit { position: absolute; right: .95rem; color: var(--muted); font-size: .95rem; pointer-events: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; font: inherit; font-weight: 700; font-size: 1.02rem; border: 0; border-radius: var(--radius-sm); padding: .85rem 1.3rem; cursor: pointer; transition: background .15s, transform .1s; }
.btn-primary { background: var(--teal); color: #fff; margin-top: .25rem; }
.btn-primary:hover { background: var(--deep); }
.btn-primary:active { transform: translateY(1px); }

.calc-result { position: relative; background: var(--deep); color: #d6ebe7; padding: 1.6rem; display: flex; flex-direction: column; justify-content: center; min-height: 260px; }
.calc-result::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 240px at 100% 0%, rgba(13, 148, 136, .45), transparent 70%); pointer-events: none; }
.calc-result > * { position: relative; }
.calc-result__empty { text-align: center; color: #9cc4bd; }
.calc-result__empty .icon { opacity: .6; margin-bottom: .5rem; }
.calc-result__empty p { margin: 0 auto; max-width: 240px; font-size: .95rem; line-height: 1.55; }
.calc-result.is-loading { opacity: .7; }
.result-hero__label { font-size: .85rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.result-hero__value { font-family: var(--font-num); font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1.15; margin: .25rem 0 .2rem; font-variant-numeric: tabular-nums; }
.result-hero__sub { font-size: .95rem; color: #b9d8d2; line-height: 1.5; }
.result-list { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.result-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: .95rem; line-height: 1.4; }
.result-list b { color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-note { margin: 1rem 0 0; font-size: .9rem; line-height: 1.55; color: #b9d8d2; }
.result-error { background: rgba(254, 243, 242, .1); border: 1px solid rgba(254, 205, 202, .4); color: #fecdca; border-radius: var(--radius-sm); padding: .9rem 1rem; font-weight: 600; }

@media (max-width: 860px) {
	.calc { grid-template-columns: 1fr; }
	.calc-result { min-height: 170px; }
}
@media (max-width: 520px) {
	.field-row { grid-template-columns: 1fr; }
	.calc-form, .calc-result { padding: 1.25rem; }
}

/* Tabell (betalningsplan) */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: auto; max-height: 560px; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.data-table th { position: sticky; top: 0; background: var(--teal-50); color: var(--deep); text-align: right; font-weight: 700; padding: .7rem .9rem; white-space: nowrap; border-bottom: 1px solid var(--teal-100); }
.data-table td { text-align: right; padding: .5rem .9rem; border-bottom: 1px solid #eff2ef; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table tbody tr:hover td { background: #fafbf8; }
.data-table tr.divider td { padding: 0; height: 6px; background: var(--bg); border-bottom: 0; }
.data-table tfoot td { font-weight: 750; color: var(--ink); background: var(--amber-50); border-top: 2px solid var(--amber); }

/* Innehåll */
.lead { font-size: 1.15rem; color: var(--ink-2); }
.page ol li::marker { color: var(--teal); font-weight: 700; }
.def-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.def-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.def-card h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.def-card p { margin: 0; font-size: .97rem; }
@media (max-width: 640px) { .def-grid { grid-template-columns: 1fr; } }
.formula-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; text-align: center; margin: 1rem 0 1.4rem; }
.formula-img img { display: inline-block; }
.callout { background: var(--teal-50); border-left: 4px solid var(--teal); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.callout p:last-child { margin: 0; }
.fact-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .6rem; }
.fact-list li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1.1rem .85rem 2.9rem; position: relative; }
.fact-list li::before { content: ""; position: absolute; left: 1.1rem; top: 1.25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }
.muted { color: var(--muted); font-size: .93em; }

/* Varning + erbjudanden */
.warning { display: flex; gap: 1rem; align-items: flex-start; background: var(--amber-50); border: 1px solid #f6dfa0; border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 2.5rem 0 1.5rem; font-size: .95rem; line-height: 1.6; }
.warning .icon { color: #b45309; margin-top: .15rem; }
.warning p { margin: 0; }
.warning a { color: var(--amber-ink); }
.offers h2 { margin-top: 1.5rem; }
.offers ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.offers li { margin: 0; }
.offers a { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; text-decoration: none; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.offers a:hover { border-color: var(--teal); box-shadow: var(--shadow); color: var(--ink-2); }
.offers strong { color: var(--ink); font-size: 1.07rem; grid-column: 1; }
.offers span { grid-column: 1; font-size: .94rem; line-height: 1.55; color: var(--muted); }
.offers .icon { grid-column: 2; grid-row: 1 / span 2; color: var(--teal); }

/* Annonsplats */
.ad { margin: 2rem 0; min-height: 90px; }
.ad--preview { display: grid; place-items: center; border: 2px dashed #d3d9d5; border-radius: var(--radius); color: #9aa6a0; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* Footer */
.site-footer { background: var(--deep); color: #a9cbc5; padding: 2rem 0 2.5rem; font-size: .95rem; }
.site-footer .ad--preview { border-color: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .35); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-top: 1rem; }
.site-footer h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .8rem; }
.footer-about h3 { margin-top: 1.3rem; }
.site-footer a { color: #e3f3f0; }
.site-footer a:hover { color: var(--amber); }
.brand--light { color: #fff; }
.brand--light:hover { color: #fff; }
.brand--light .brand-name span { color: var(--amber); }
.brand--light .brand-mark { background: rgba(255, 255, 255, .1); }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.footer-links li { margin: 0 0 .4rem; break-inside: avoid; }
.footer-links a { text-decoration: none; }
.copyright { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: #7fa59e; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .sidebar, .site-footer, .ad, .offers, .preview-bar { display: none; } .calc-result { background: #fff; color: #000; } .result-hero__value, .result-list b { color: #000; } }
