/* Public pages: landing, legal, 404. Same colour tokens as the app (styles.css). */
:root {
  color-scheme: light;
  --bg: #f7f3ec; --surface: #ffffff; --surface-2: #efeae1; --text: #17201d; --muted: #5a6661;
  --border: #e2dcd1; --accent: #0f766e; --accent-ink: #ffffff; --warm: #ea580c; --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1412; --surface: #171e1b; --surface-2: #1f2824; --text: #e7ece9; --muted: #98a59f;
    --border: #2a3530; --accent: #2dd4bf; --accent-ink: #062b27; --warm: #fb923c; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.logo img { margin-right: 8px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; align-items: center; font-size: .95rem; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.lang-switch button { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 4px 10px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 720px) { .site-nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 99px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { min-height: 38px; padding: 8px 16px; font-size: .9rem; }
.btn:hover { filter: brightness(1.05); }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .hero { padding-top: 40px; } .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 12px; border-radius: 99px; }
h1.hero-title { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0; }
.hero-title em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.fine { font-size: .85rem; color: var(--muted); }

/* Hero visual: a mini version of the app's split */
.demo { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 14px; }
.demo-total { font-size: 2rem; font-weight: 700; margin: 0; }
.demo-label { font-size: .85rem; color: var(--muted); margin: 0; }
.demo-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 3px; }
.demo-bar i:first-child { flex: 58; background: var(--accent); border-radius: 99px; }
.demo-bar i:last-child { flex: 42; background: var(--warm); border-radius: 99px; }
.demo-person { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.demo-person .dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-person strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.demo-person small { color: var(--muted); }

/* Sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2.section-title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.01em; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
.steps, .features, .pricing { display: grid; gap: 18px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.features { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .steps, .features { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--bg); }
.card h3 { margin: 6px 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.step-no { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.icon { font-size: 1.5rem; }

/* Pricing */
.pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.price-card { display: grid; gap: 14px; align-content: start; }
.price-card.featured { border: 2px solid var(--accent); }
.price { font-size: 2rem; font-weight: 700; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--warm); color: #fff; font-size: .75rem; font-weight: 700; }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
@media (max-width: 720px) { .trust { grid-template-columns: 1fr; } }
.trust div { display: flex; gap: 12px; }
.trust strong { display: block; }
.trust p { margin: 0; color: var(--muted); }

/* FAQ */
.faq { max-width: 760px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq p { margin: 0 0 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.site-footer a { color: var(--muted); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.legal h1 { font-size: 2rem; margin: 0 0 4px; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal .updated { color: var(--muted); font-size: .9rem; margin-top: 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal .summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 22px; }
.table-scroll { overflow-x: auto; }

/* 404 */
.notfound { text-align: center; padding: 96px 20px; }
.notfound h1 { font-size: 3rem; margin: 0; }

/* Admin dashboard */
.admin { padding-top: 24px; padding-bottom: 64px; }
.admin h1 { margin: 0 0 16px; }
.admin h2 { margin: 32px 0 12px; font-size: 1.15rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 2px; padding: 16px; }
.kpi strong { font-size: 1.6rem; }
.admin table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
.admin th, .admin td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin th:first-child, .admin td:first-child { text-align: left; }
.admin tr.sum td { font-weight: 700; }
.admin select { font: inherit; margin-left: 6px; }
.feedback-item { margin-bottom: 10px; }
.feedback-item p { white-space: pre-wrap; margin: 8px 0; color: var(--text); }
.feedback-item.handled { opacity: .6; }
.feedback-item .cta { margin: 0; }

/* "Lön efter skatt" pages */
.tax-page { max-width: 860px; padding-top: 24px; padding-bottom: 64px; }
.tax-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -0.01em; }
.tax-page h2 { margin: 36px 0 12px; font-size: 1.3rem; }
.tax-page h3 { margin: 22px 0 8px; font-size: 1rem; }
.crumbs a { color: var(--muted); }
.calc { margin: 24px 0; display: grid; gap: 14px; }
.calc h2 { margin: 0; }
.calc-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
@media (max-width: 640px) { .calc-grid { grid-template-columns: 1fr; } }
.calc label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.calc input[type=number], .calc select { font: inherit; font-size: 1.05rem; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; }
.check-inline { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent); }
.calc-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-result div { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.calc-result strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.calc-result div:first-child strong { color: var(--accent); }
@media (max-width: 520px) { .calc-result { grid-template-columns: 1fr; } }
.tax-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; background: var(--surface); border-radius: 12px; overflow: hidden; }
.tax-table th, .tax-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tax-table th:first-child, .tax-table td:first-child { text-align: left; }
.tax-cta { margin: 28px 0; border: 2px solid var(--accent); display: grid; gap: 10px; justify-items: start; }
.tax-cta h2 { margin: 0; }
.kommun-list { list-style: none; padding: 0; margin: 0; columns: 3 200px; column-gap: 24px; }
.kommun-list li { padding: 3px 0; break-inside: avoid; }
.kpi.stale { border-color: var(--warm); }
.kpi.stale strong { color: var(--warm); }
