/* GovHub: ljust, luftigt och enkelt. Fungerar från 320 px och uppåt. */
:root {
  --text: #0f172a;
  --muted: #5b6475;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --subtle: #eef2f7;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8efff;
  --accent-text: #ffffff;
  --teal: #0d9488;
  --border: #e3e7ee;
  --error: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 4px 16px rgb(15 23 42 / .05);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e7ecf3;
    --muted: #9aa5b5;
    --bg: #0b1120;
    --surface: #121a2b;
    --subtle: #1a2336;
    --accent: #6ea0ff;
    --accent-strong: #93b8ff;
    --accent-soft: #1b2a4a;
    --accent-text: #0b1120;
    --teal: #2dd4bf;
    --border: #243049;
    --error: #ff8a80;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body { margin: 0; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 980px; margin: 0 auto; padding: 1.5rem 1rem 4rem; flex: 1; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: .5rem 0 .75rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem .75rem; }
.muted { color: var(--muted); }
.error { color: var(--error); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sidhuvud. På mobil fälls menyn ihop bakom en knapp (details, ingen JavaScript). */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand b { color: var(--accent); font-weight: 700; }
.menu > summary { display: none; }
.menu nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.menu nav a, .menu nav button.link { padding: .45rem .7rem; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .95rem; }
.menu nav a:hover, .menu nav button.link:hover { background: var(--subtle); color: var(--text); }
.menu nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
@media (max-width: 1199px) {
  .menu { position: relative; }
  .menu > summary { display: inline-flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu > summary::before { content: ""; width: 1rem; height: .7rem; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
  .menu:not([open]) nav { display: none; }
  .menu nav { position: absolute; right: 0; top: calc(100% + .5rem); flex-direction: column; align-items: stretch; min-width: 14rem; padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(15 23 42 / .15); }
  .menu nav a, .menu nav button.link { padding: .7rem .85rem; border-radius: 10px; text-align: left; }
}

.site-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 1.5rem 1rem; text-align: center; font-size: .875rem; }
.site-footer p { max-width: 60ch; margin: .25rem auto; }

/* Formulär och knappar. */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; min-height: 2.75rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.button, button.button, .search button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; padding: .6rem 1.2rem; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover, button.button:hover, .search button:hover { background: var(--accent-strong); color: var(--accent-text); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
form.inline { display: inline; margin: 0; }

.search { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin: 1rem 0; }
.search > label { grid-column: 1 / -1; font-weight: 600; }
.search input[type="search"] { font-size: 1.05rem; padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--shadow); }
.filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; border: 0; padding: 0; margin: .5rem 0 0; }
.filters label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); }
.filters label.check { flex-direction: row; align-items: center; gap: .4rem; }
.filters p { grid-column: 1 / -1; margin: 0; }
details.filter-panel { grid-column: 1 / -1; }
details.filter-panel > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: .25rem 0; }
@media (max-width: 520px) {
  .search { grid-template-columns: 1fr; }
  .search button { width: 100%; }
}

/* Startsida. */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); max-width: 18ch; margin-top: 1rem; }
.hero .lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--muted); max-width: 46rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gradient-text { background: linear-gradient(90deg, var(--accent), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.1rem; }
.features { margin-top: 2.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.cards article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.cards h3 { margin: 0 0 .4rem; }
.cards p { margin: 0; color: var(--muted); }

/* Listor av träffar. */
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.results > li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.results h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.results h3 a { text-decoration: none; color: var(--text); }
.results h3 a:hover { color: var(--accent); }
.results p { margin: .3rem 0; }
.feedback { margin-top: .6rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.feedback button.link { padding: .25rem .8rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--muted); min-height: 2rem; }
.feedback button.link:hover { border-color: var(--accent); color: var(--accent); }
.button.secondary { background: var(--surface); color: var(--accent-strong); border: 1px solid var(--border); }
.button.secondary:hover { background: var(--accent-soft); color: var(--accent-strong); }

.chips { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .85rem; font-size: .92rem; }
.chips li a { text-decoration: none; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent-strong); border-radius: 999px; padding: .05rem .55rem; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: .85rem 1rem; }

/* Tabeller rullar i sidled på smala skärmar i stället för att trycka ut sidan. */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { white-space: nowrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--subtle); }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: .5rem .6rem; }
}

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: .1rem; } .facts dd { margin-bottom: .6rem; } }

.conclusions { padding-left: 1.25rem; }
.conclusions li { margin: .5rem 0; }
.bars td:last-child { width: 80%; }
.bar { display: inline-block; height: .7rem; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 999px; vertical-align: middle; min-width: 3px; }

.compare-form { display: grid; gap: .6rem; margin: 1rem 0; }
.compare-form label { font-weight: 600; }
.compare-form textarea { min-height: 10rem; }
.compare-form button { justify-self: start; }

.watches { list-style: none; padding: 0; display: grid; gap: .5rem; }
.watches li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.watches .what { flex: 1 1 16rem; }

section[aria-live] { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: .25rem 1.15rem 1rem; margin: 1rem 0; }

/* Verktygen: vad man får och när man ska välja det. */
.cards p.when { margin-top: .5rem; font-size: .92rem; }
.tool-hint { margin: .75rem 0 1.25rem; font-size: .95rem; }
.tool-hint summary { cursor: pointer; color: var(--accent); }
.tool-hint ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.tool-hint li { margin-bottom: .35rem; }

/* Löptextsidor, t.ex. integritet. */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .5rem; }

/* Anmälan som testanvändare. */
.signup { max-width: 34rem; }
.signup-form { display: grid; gap: .45rem; margin: 1rem 0 2rem; }
.signup-form label { font-weight: 600; margin-top: .4rem; }
.signup-form button { justify-self: start; margin-top: .8rem; }
div.error { border: 1px solid var(--error); border-radius: var(--radius); padding: .5rem 1rem; }

/* AI-märkning och sidan om AI. */
.tag.ai { font-size: .72rem; vertical-align: middle; text-decoration: none; background: linear-gradient(90deg, var(--accent), var(--teal)); color: #fff; }
.ai-uses dt { font-weight: 600; margin-top: 1rem; }
.ai-uses dd { margin: .25rem 0 0; }
.locked { background: var(--accent-soft); border-radius: var(--radius); padding: .75rem 1rem; }
.locked { background: var(--accent-soft); border-radius: var(--radius); padding: .75rem 1rem; }
