/* deklareracrypto.se – fas 1 (slutversion 2026-09-25). Systemtypsnitt, inga externa resurser. */
:root {
  color-scheme: light dark;
  --paper: #f6f3ec;
  --paper-2: #ece7db;
  --ink: #16213a;
  --ink-2: #4a5470;
  --line: #cfc8b8;
  --accent: #9a530e;           /* AA-kontrast 5,2:1 på paper, 4,7:1 på paper-2 */
  --accent-ink: #ffffff;
  --focus: #1d5fbf;
  --ok: #2b6b3f;
  --max: 90rem;                       /* ca 1440 px */
  --gutter: clamp(1rem, 4vw, 4rem);   /* flytande sidomarginal */
  --measure: 70ch;                    /* max radlängd för löptext */
  --serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101523;
    --paper-2: #182036;
    --ink: #ebe7dd;
    --ink-2: #aeb4c6;
    --line: #2e3854;
    --accent: #e2913f;
    --accent-ink: #14100a;
    --focus: #7db0ff;
    --ok: #7fc793;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 0.5rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol, dl { max-width: var(--measure); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
small, .muted { color: var(--ink-2); }

/* Innehållscontainer: kant i kant-bakgrunder ligger på sektionerna, .wrap centrerar innehållet */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Sidhuvud */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: inherit; }
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; justify-content: flex-end; }
.top nav a { text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.top nav a:hover { text-decoration: underline; }
@media (max-width: 30rem) { .top nav { width: 100%; justify-content: flex-start; gap: 0.25rem 1rem; } }

/* Hero: en kolumn med full bredd */
.hero { padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem); border-bottom: 1px solid var(--line); background: var(--paper); }
.hero h1 { max-width: 22ch; }
.lede { font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--ink-2); max-width: 60ch; }
.badge { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.9rem; margin-top: 0.75rem; }
.badge::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--accent); margin-right: 0.5em; vertical-align: 0.05em; }
.contact { margin: 1rem 0 0; }
.footnote { font-size: 0.9rem; color: var(--ink-2); margin: 1rem 0 0; }
.footnote a { text-decoration: underline; }

/* Sektioner: bakgrund och avgränsning kant i kant */
section.block { padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: 0; }
section.block:nth-of-type(even) { background: var(--paper-2); }
.note { border-left: 3px solid var(--accent); padding: 0.75rem 1rem; background: var(--paper-2); border-radius: 0 6px 6px 0; max-width: var(--measure); margin-top: 1.5rem; }
section.block:nth-of-type(even) .note { background: var(--paper); }
.note p:last-child { margin-bottom: 0; }
.more { display: inline-block; font-weight: 600; margin-top: 0.25rem; }

/* Fyra kort i en rad på desktop, staplade på mobil */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.card { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 1.1rem 1.2rem 1.2rem; background: var(--paper); }
section.block:nth-of-type(even) .card { background: var(--paper); }
.card h3 { margin-bottom: 0.4em; }
.card p { margin-bottom: 0; }

/* Sidfot: staplade rader */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: 0.92rem; color: var(--ink-2); background: var(--paper); }
footer p { margin: 0 0 0.5rem; max-width: none; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .fine { font-size: 0.82rem; margin-top: 0; }
footer p.first-fine { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Undersidor */
.page { padding: clamp(2.5rem, 4vw, 4rem) 0 clamp(3rem, 5vw, 5rem); }
.page h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
.page dt { font-weight: 600; margin-top: 1rem; }
.page dd { margin: 0.2rem 0 0; }

/* Språkväljare i sidhuvudet: avskiljare mot övriga menylänkar */
.top nav .lang { border-left: 1px solid var(--line); padding-left: 1.25rem; }
@media (max-width: 30rem) { .top nav .lang { border-left: 0; padding-left: 0; } }

/* Frågor och svar: två spalter på breda skärmar, en på smala */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.75rem 3rem; margin-top: 1.5rem; }
.faq h3 { font-size: 1.1rem; margin-bottom: 0.4em; }
.faq p { margin-bottom: 0; }
.closing { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.closing .note { margin-top: 1.5rem; }
