:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --card: #ffffff;
  --border: #e7e5e4;
  --accent: #2563eb;
  --accent-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --fg: #f5f5f4;
    --muted: #a8a29e;
    --card: #1c1917;
    --border: #292524;
    --accent: #3b82f6;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 16px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
input, select, textarea, button {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}
button { background: var(--accent); color: var(--accent-fg); border: 0; cursor: pointer; font-weight: 600; }
footer { color: var(--muted); font-size: .875rem; margin-top: 32px; }

/* Lön efter skatt */
.bread { font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.bread a, .card a:not(.btn) { color: var(--accent); }
.kalk label { display: block; font-weight: 600; margin-bottom: 12px; }
.kalk label input, .kalk label select { margin-top: 4px; font-weight: 400; }
.kalk .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.kalk .check input { width: auto; }
.resultat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
.resultat div { background: var(--bg); border-radius: 8px; padding: 12px; }
.resultat span { display: block; font-size: .8rem; color: var(--muted); }
.resultat strong { font-size: 1.4rem; }
.resultat div:first-child strong { color: var(--accent); }
.tabell { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabell th, .tabell td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.tabell td:not(:first-child), .tabell th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tabell .summa td { font-weight: 700; }
.scroll { max-height: 480px; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); }
.faq h3 { font-size: 1rem; margin: 16px 0 4px; }

/* ISK-kalkylator */
.falt { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.resultat.tre { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.resultat small { display: block; color: var(--muted); font-size: .8rem; }
.resultat div:first-child strong { color: inherit; }
.resultat .vinnare { outline: 2px solid var(--accent); }
.resultat .vinnare strong { color: var(--accent); }
.graf svg { width: 100%; height: auto; display: block; }
.g-grid { stroke: var(--border); }
.g-ax { fill: var(--muted); font-size: 11px; }
.g-isk, .g-kf, .g-depa, .g-insatt { fill: none; stroke-width: 2.5; }
.g-isk { stroke: var(--accent); }
.g-kf { stroke: #16a34a; stroke-dasharray: 6 4; }
.g-depa { stroke: #ea580c; }
.g-insatt { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 4; }
.legend { font-size: .85rem; color: var(--muted); display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.legend i { display: inline-block; width: 16px; height: 3px; margin-right: 4px; vertical-align: middle; }
.l-isk { background: var(--accent); } .l-kf { background: #16a34a; } .l-depa { background: #ea580c; } .l-insatt { background: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }
.falt label { display: flex; flex-direction: column; justify-content: space-between; }
.annons { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.fotlankar a { color: var(--muted); }
footer p { margin: 4px 0; }
