/* skyddadidentitet.se – mobile first, no external resources */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2327;
  --muted: #4f5b62;
  --brand: #1f4e5f;
  --brand-contrast: #ffffff;
  --link: #1a5c8a;
  --link-visited: #5b3f8a;
  --border: #d9dcd6;
  --accent-bg: #eef4f2;
  --exit-bg: #ffffff;
  --exit-text: #1f4e5f;
  --urgent: #b3261e;
  --focus: #f2b705;
  --radius: 10px;
  --wrap: 46rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --surface: #1c2226;
    --text: #e8eaeb;
    --muted: #aab4ba;
    --brand: #7fb7c9;
    --brand-contrast: #0f1416;
    --link: #8cc4f0;
    --link-visited: #c5a8f0;
    --border: #2f3a40;
    --accent-bg: #1f2b2e;
    --exit-bg: #e8eaeb;
    --exit-text: #0f1416;
    --urgent: #e0675f;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  background: var(--brand);
  color: var(--brand-contrast);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; min-height: 3.5rem;
}
.brand, .brand:visited {
  color: var(--brand-contrast); font-weight: 700; text-decoration: none; font-size: 1.1rem;
}
.quick-exit, .quick-exit:visited {
  background: var(--exit-bg); color: var(--exit-text);
  font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.95rem;
}

.site-nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-nav ul {
  list-style: none; margin: 0; padding: 0.25rem 0;
  display: flex; flex-wrap: wrap; gap: 0 1.25rem;
}
.site-nav a, .site-nav a:visited {
  display: block; padding: 0.5rem 0; color: var(--text);
  text-decoration: none; white-space: nowrap; font-size: 0.95rem;
}
.site-nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); }

/* Content */
main { padding: 1.5rem 0 3rem; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 0.5rem 0 1rem; }
h2 { font-size: 1.4rem; margin-top: 2.25rem; }
h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); }

.notice {
  background: var(--accent-bg); border-left: 4px solid var(--brand);
  padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.notice.urgent { border-left-color: var(--urgent); }

.cards { display: grid; gap: 1rem; padding: 0; list-style: none; margin: 1.5rem 0; }
@media (min-width: 40rem) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.card h2, .card h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

.contacts { list-style: none; padding: 0; }
.contacts li { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.contacts strong { display: block; }
.tel { font-size: 1.15rem; font-weight: 700; }

.checklist li { margin-bottom: 0.4rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 0.9rem; padding: 1.5rem 0 2rem;
}
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .site-nav, .quick-exit, .skip-link { display: none; }
}

/* Company guide */
.breadcrumb { margin: 0; font-size: 0.95rem; }
.muted { color: var(--muted); font-size: 0.9rem; margin-top: 2.5rem; }
.tier { margin-top: 2rem; }
.tier h2 { margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; }
.tier h2::before {
  content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; flex: none;
}
.tier-rutin h2::before { background: #2e7d4f; }
.tier-info h2::before { background: #c49a2c; }
.tier-begransning h2::before { background: var(--urgent); }
.tier-explanation { color: var(--muted); margin: 0 0 1rem; font-size: 0.95rem; }
.providers { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.provider {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.provider h3 { margin: 0; }
.provider p { margin: 0.4rem 0; }
.provider.featured { border: 2px solid #2e7d4f; padding: 1.25rem; }
.provider.featured h3 { font-size: 1.3rem; }
.provider-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.25rem; }
.provider.compact { padding: 0.75rem 1rem; }
.provider.compact h3 { font-size: 1.05rem; }
.provider.compact p { font-size: 0.95rem; }
.tier-begransning .provider { border-left: 4px solid var(--urgent); }
.logo { height: 40px; width: auto; max-width: 120px; flex: none; background: #fff; border-radius: 6px; padding: 4px; }
.sources { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.85rem; color: var(--muted); }
.best-providers {
  list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); grid-auto-rows: 1fr;
}
.best-providers a {
  display: flex; flex-direction: column; justify-content: center; height: 100%;
  padding: 0.6rem 0.85rem; background: var(--surface); text-decoration: none;
  border: 1px solid var(--border); border-left: 4px solid #2e7d4f; border-radius: var(--radius);
}
.best-providers a:hover { border-color: #2e7d4f; }
.best-providers strong { color: var(--text); line-height: 1.3; }
.best-providers span { color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.related { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.related a {
  display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 0.95rem;
}
