/* KonsumenTobbe – gemensam grafisk profil */
@font-face { font-family: "Sancreek"; src: url(fonts/sancreek-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Blått från profilbilden */
  --blue-deep: #183B56;
  --blue: #1F4866;
  --blue-tile: #285574;
  --blue-line: #3A6A8C;
  /* Krämvitt från tankebubblan och rubriken */
  --cream: #F3EDDC;
  --cream-soft: #E9E1CB;
  --cream-line: #D8CDB0;
  --ink: #1B2E44;
  --ink-muted: #56657A;
  --on-blue: #F3EDDC;
  --on-blue-muted: #B9CADB;
  /* Hudtonen ur illustrationen, används sparsamt för fokus */
  --warm: #E59A6B;
  --ok: #2F6B4A; --ok-bg: #E2E8D2;
  --warn: #8A5A12; --warn-bg: #F1DFC0;

  --font-display: "Sancreek", "Rockwell Extra Bold", Rockwell, Georgia, serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-letter: Georgia, "Times New Roman", serif;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); background: var(--blue-deep); }
body {
  margin: 0; color: var(--on-blue); font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  background-color: var(--blue);
  /* Rutmönster i diagonal, som i profilbildens bakgrund */
  background-image: repeating-conic-gradient(from 45deg, var(--blue) 0 25%, var(--blue-tile) 0 50%);
  background-size: 220px 220px;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--warm); outline-offset: 2px; border-radius: 4px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 22px 20px 56px; }
.wrap.wide { max-width: 1180px; }

/* Sidhuvud med avatar */
.site { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
.site .mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.site .mark img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(243,237,220,.18); }
.site .mark span { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .02em; line-height: 1; }
.site nav a { font-size: .9rem; font-weight: 600; color: var(--on-blue-muted); }
.site nav a:hover { color: var(--on-blue); }

.display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: 1.02; }
h1.display { font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0 0 14px; }
.tagline { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--on-blue-muted); margin: 0 0 14px; }
.lead { color: var(--on-blue-muted); font-size: 1.05rem; max-width: 58ch; margin: 0 0 28px; }
h2.sec { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; margin: 40px 0 12px; color: var(--on-blue); }

/* Krämvita kort, som tankebubblan */
.card { background: var(--cream); color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(10,25,40,.25); }
.card a { color: var(--blue); }

.banner { border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(10,25,40,.3); margin-bottom: 28px; }

/* Länklistor */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--cream-line); }
.list a, .list .soon { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 6px; text-decoration: none; color: var(--ink); }
.list .name { font-weight: 700; font-size: 1.15rem; display: block; }
.list .desc { display: block; color: var(--ink-muted); font-size: .92rem; margin-top: 2px; }
.list .go { flex: none; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cream); background: var(--blue); border-radius: 999px; padding: 7px 14px; }
.list a:hover .name { color: var(--blue); text-decoration: underline; }
.list .soon { color: var(--ink-muted); }

.prose p { max-width: 62ch; margin: 0 0 12px; }
.on-blue p { color: var(--on-blue); }
ol.tips { margin: 0; padding-left: 1.4em; }
ol.tips li { margin-bottom: 10px; padding-left: 4px; }
ol.tips li::marker { font-weight: 700; color: var(--blue); }

footer.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--blue-line); font-size: .85rem; color: var(--on-blue-muted); }
footer.foot p { margin: 0 0 6px; max-width: 72ch; }
footer.foot a { color: var(--on-blue); }

/* ---------- Generatorn ---------- */
header.top { max-width: 64ch; margin-bottom: 26px; }
header.top p { margin: 0; color: var(--on-blue-muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 960px) {
  .grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
  .preview { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); }
}
form.card fieldset { border: 0; padding: 0; margin: 0 0 22px; }
form.card fieldset:last-of-type { margin-bottom: 14px; }
form.card legend { font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: .82rem; margin-bottom: 12px; padding: 0; color: var(--blue); }
.row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 480px) { .row.two { grid-template-columns: 1fr 1fr; } }
label.f { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.card input[type=text], .card input[type=date], .card select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: #FBF8EF;
  border: 1px solid var(--cream-line); border-radius: 10px; padding: 9px 11px;
}
.hint { font-size: .8rem; color: var(--ink-muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--blue); width: 17px; height: 17px; flex: none; }
.check span strong { display: block; font-weight: 600; }
.check span em { font-style: normal; color: var(--ink-muted); font-size: .82rem; }
.hidden { display: none !important; }
.linkbtn { background: none; border: 0; color: var(--blue); font: inherit; font-size: .85rem; font-weight: 600; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.verdict { background: var(--cream); color: var(--ink); border-radius: 18px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 10px 30px rgba(10,25,40,.25); border-left: 8px solid var(--cream-line); }
.verdict.ok { border-left-color: var(--ok); }
.verdict.warn { border-left-color: var(--warn); }
.verdict .lbl { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted); }
.verdict .date { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 2.7rem); line-height: 1.05; margin: 4px 0 6px; color: var(--blue-deep); }
.verdict .state { font-weight: 700; font-size: .92rem; }
.verdict.ok .state { color: var(--ok); }
.verdict.warn .state { color: var(--warn); }
.verdict p { margin: 6px 0 0; font-size: .88rem; }
.verdict dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 10px 0 0; font-size: .85rem; }
.verdict dt { color: var(--ink-muted); }
.verdict dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }

.sheetbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheetbar h2 { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { font: inherit; font-size: .88rem; font-weight: 700; border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--cream); color: var(--blue-deep); border: 2px solid var(--cream); }
.btn.ghost { background: transparent; color: var(--on-blue); border: 2px solid var(--blue-line); }
.btn[aria-disabled=true] { opacity: .45; pointer-events: none; }
.sheet { background: #FBF8EF; color: var(--ink); border-radius: 6px; padding: clamp(20px, 4vw, 44px); font-family: var(--font-letter); font-size: 15.5px; line-height: 1.65; max-width: 72ch; box-shadow: 0 10px 30px rgba(10,25,40,.3); }
.sheet .subj { font-family: var(--font-body); font-size: .85rem; color: var(--ink-muted); border-bottom: 1px solid var(--cream-line); padding-bottom: 12px; margin-bottom: 18px; overflow-wrap: anywhere; }
.sheet .subj b { color: var(--ink); font-weight: 600; }
#letter { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; }
.ph { color: var(--ink-muted); background: var(--cream-soft); border-radius: 3px; padding: 0 3px; }
.note { font-size: .82rem; color: var(--on-blue-muted); margin-top: 10px; max-width: 72ch; }
.note.warnline { color: #F1C38F; }

/* ---------- Artiklar / granskningar ---------- */
.kicker { display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--blue-deep); background: var(--cream); border-radius: 999px; padding: 5px 12px; margin: 0 0 16px; }
.byline { font-size: .85rem; color: var(--on-blue-muted); margin: 0 0 28px; }
.article { background: var(--cream); color: var(--ink); border-radius: 18px; padding: clamp(22px, 5vw, 44px); box-shadow: 0 10px 30px rgba(10,25,40,.25); }
.article h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.1; color: var(--blue-deep); margin: 40px 0 12px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 1.05rem; font-weight: 700; margin: 26px 0 8px; color: var(--ink); }
.article p, .article li { max-width: 66ch; }
.article p { margin: 0 0 14px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 16px; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--blue); font-weight: 700; }
.article a { color: var(--blue); font-weight: 600; }
.article .lede { font-size: 1.12rem; font-weight: 600; line-height: 1.5; }
.article blockquote { margin: 18px 0; padding: 14px 18px; border-left: 6px solid var(--blue); background: #FBF8EF; border-radius: 0 12px 12px 0; font-size: 1.02rem; }
.article blockquote p { margin: 0 0 6px; }
.article blockquote cite { font-style: normal; font-size: .85rem; color: var(--ink-muted); }
.article .note-box { background: var(--cream-soft); border-radius: 12px; padding: 14px 18px; font-size: .92rem; margin: 18px 0; }
.tablewrap { overflow-x: auto; margin: 16px 0 20px; border-radius: 12px; border: 1px solid var(--cream-line); }
.article table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .88rem; background: #FBF8EF; }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--cream-line); }
.article thead th { background: var(--blue); color: var(--cream); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.article tbody tr:last-child td { border-bottom: 0; }
.article td:first-child { font-weight: 700; width: 22%; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 18px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--cream); font-family: var(--font-display); font-size: 1.2rem; display: grid; place-items: center; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--blue); color: var(--cream); border-radius: 14px; padding: 18px 20px; margin-top: 22px; }
.cta p { margin: 0; color: var(--cream); }
.cta a.btn-cta { background: var(--cream); color: var(--blue-deep); text-decoration: none; font-weight: 700; border-radius: 999px; padding: 10px 18px; white-space: nowrap; }

/* Skärmdumpsgalleri */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.shots figure { margin: 0; background: #FBF8EF; border: 1px solid var(--cream-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.shots a { display: block; background: #fff; }
.shots img { width: 100%; height: auto; }
.shots a:hover img { opacity: .92; }
.shots figcaption { padding: 10px 12px 12px; font-size: .84rem; line-height: 1.45; }
.shots figcaption strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); margin-bottom: 3px; }
.pair { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0; }
@media (min-width: 560px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; background: #FBF8EF; border: 1px solid var(--cream-line); border-radius: 12px; overflow: hidden; }
.pair img { width: 100%; height: auto; }
.pair figcaption { padding: 10px 12px 12px; font-size: .84rem; }
.pair figcaption strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.pair .before strong { color: var(--warn); }
.pair .after strong { color: var(--ok); }
.chain { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; counter-reset: c; }
@media (min-width: 720px) { .chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chain li { counter-increment: c; margin: 0 !important; background: #FBF8EF; border: 1px solid var(--cream-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.chain li::marker { content: none; }
.chain .head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--blue); color: var(--cream); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.chain .head::before { content: counter(c); font-family: var(--font-display); font-size: 1.1rem; line-height: 1; }
.chain p strong { color: var(--blue); }
.chain img { width: 100%; height: auto; display: block; }
.chain p { padding: 8px 10px 10px; margin: 0 !important; font-size: .8rem; line-height: 1.4; }

/* Utfällbara bevis */
.article details.evidence { margin: 14px 0; border: 1px solid var(--cream-line); border-radius: 14px; background: #FBF8EF; }
.article details.evidence > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-weight: 700; color: var(--blue-deep); }
.article details.evidence > summary::-webkit-details-marker { display: none; }
.article details.evidence > summary::before { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: var(--cream); display: grid; place-items: center; font-size: 1.2rem; line-height: 1; }
.article details.evidence[open] > summary::before { content: "–"; }
.article details.evidence > summary small { margin-left: auto; font-weight: 600; color: var(--ink-muted); font-size: .82rem; text-align: right; }
.article details.evidence > summary:hover span { text-decoration: underline; text-underline-offset: 3px; }
.article details.evidence[open] { padding-bottom: 6px; }
.article details.evidence > :not(summary) { margin-left: 18px; margin-right: 18px; }
.article details.evidence .evidence-intro { font-size: .9rem; color: var(--ink-muted); margin-top: 0; }
.article details.evidence h3:first-of-type { margin-top: 6px; }

/* Mejltråd */
.mailthread { list-style: none; padding: 0 !important; margin: 10px 0 8px; display: grid; gap: 12px; }
.mailthread li { margin: 0 !important; background: #fff; border: 1px solid var(--cream-line); border-left: 6px solid var(--blue); border-radius: 10px; padding: 12px 16px; }
.mailthread li::marker { content: none; }
.mailthread li.from-allente { border-left-color: #E8662A; }
.mailthread .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: .8rem; color: var(--ink-muted); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--cream-line); }
.mailthread .meta b { color: var(--ink); font-size: .88rem; }
.mailthread .meta time { margin-left: auto; font-variant-numeric: tabular-nums; }
.mailthread p { font-size: .9rem; margin: 0 0 8px !important; max-width: none; }
.mailthread p:last-child { margin-bottom: 0 !important; }
.mailthread .redacted { background: var(--ink); color: var(--ink); border-radius: 3px; padding: 0 6px; user-select: none; }
.mailthread .anon { background: var(--cream-soft); border-radius: 3px; padding: 0 4px; font-weight: 600; }
.mailthread mark { background: #F6E3A3; color: inherit; border-radius: 2px; padding: 0 2px; }
