/* MIN Rättighetscentrum – minlag.se
   Typografisk form utan ramverk. Ingen webbfont laddas; stacken börjar med
   Hanken Grotesk / HK Grotesk för den som har typsnittet installerat och
   faller tillbaka på systemets grotesk. Inter är medvetet borttaget. */

:root {
  color-scheme: light;
  --ink: #111111;
  --body: #333330;
  --muted: #5d5d58;
  --rule: #d2d2cc;
  --rule-strong: #111111;
  --wash: #f4f4f0;
  --white: #ffffff;
  --font: "Hanken Grotesk", "HK Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --width: 1120px;
  --measure: 68ch;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--white); font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; overflow-wrap: break-word; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid #315f8a; outline-offset: 4px; }
button { font: inherit; }
[hidden] { display: none !important; }
.wrap { width: min(100%, var(--width)); padding-inline: 32px; margin-inline: auto; }
/* Visuellt dold text som skärmläsare läser upp. Används för beskedet att
   en länk öppnas i ny flik. Får inte bli display:none, då tystnar den. */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 20px; top: 12px; z-index: 10; padding: 12px 18px; background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }
[id] { scroll-margin-top: 28px; }

/* Sidhuvud */
.masthead { border-bottom: 1px solid var(--rule-strong); }
.masthead-inner { padding-top: 22px; }
.brand { display: block; width: min(64vw, 740px); margin-inline: auto; }
.brand img { width: 100%; }
.navigation { margin-top: 18px; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 26px; }
.site-nav a { display: block; padding: 10px 0 12px; border-bottom: 2px solid transparent; font-size: 15px; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current] { border-color: var(--ink); font-weight: 600; }
.menu-toggle { display: none; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--ink); }

/* Typografi */
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(32px, 3.6vw, 44px); letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 25px; letter-spacing: -.015em; }
h3 { font-size: 19px; }
p { margin: 0 0 18px; }
.lead { font-size: 21px; line-height: 1.5; color: var(--body); }
.byline { margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.source { font-size: 13px; line-height: 1.65; color: var(--muted); }
.editorial-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.plain-links { padding: 0; margin: 0; list-style: none; }
.plain-links li { margin-top: 10px; }
.checklist { margin: 0; padding-left: 22px; color: var(--body); }
.checklist li { padding-left: 3px; margin-block: 12px; }

/* Startsida: fyra block med avsiktligt olika form, inte fyra lika rutnät. */
.home-lede { padding-block: 42px 36px; max-width: 40em; }
.home-lede .lead { margin-top: 20px; }
.home-lede > p:last-of-type { max-width: 34em; color: var(--body); }

.home-help { border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding-block: 26px 30px; }
.home-help h2 { margin-bottom: 16px; }
.home-help-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; }
.home-help p { margin-bottom: 12px; color: var(--body); }
.home-help p:last-child { margin-bottom: 0; }
.home-help .caveat { font-size: 15px; color: var(--muted); }

.home-rights { padding-block: 34px 30px; border-bottom: 1px solid var(--rule); }
.home-rights h2 { margin-bottom: 8px; }
.home-rights > p { max-width: 46em; color: var(--body); }
.rights-index { columns: 2; column-gap: 56px; list-style: none; margin: 18px 0 0; padding: 0; }
.rights-index li { break-inside: avoid; padding-block: 7px; }
.rights-index a { font-size: 17px; }
.rights-index span { display: block; color: var(--muted); font-size: 14px; }

.home-reading { padding-block: 32px 48px; max-width: 56em; }
.home-reading h2 { margin-bottom: 18px; }
.reading-list { list-style: none; margin: 0; padding: 0; }
.reading-list li { padding-block: 16px; border-top: 1px solid var(--rule); }
.reading-list li:last-child { border-bottom: 1px solid var(--rule); }
.reading-list h3 { margin-bottom: 6px; font-size: 20px; }
.reading-list p { margin: 0; color: var(--body); font-size: 16px; }
.home-reading > a { display: inline-block; margin-top: 20px; font-size: 15px; }

/* Undersidor */
.page-intro { padding-block: 30px 34px; border-bottom: 1px solid var(--rule-strong); }
.page-intro .lead { max-width: var(--measure); margin: 18px 0 0; }
.page-intro > p:not(.lead) { max-width: var(--measure); margin: 16px 0 0; color: var(--body); }
.reading-layout { display: grid; grid-template-columns: minmax(0, 225px) minmax(0, 1fr); gap: 64px; padding-block: 36px 56px; }
.page-nav { align-self: start; position: sticky; top: 28px; font-size: 14px; }
.page-nav > p:first-child { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.page-nav > a { display: flex; align-items: center; min-height: 40px; padding-block: 8px; line-height: 1.5; text-decoration: none; }
.page-nav > a:hover { text-decoration: underline; }
.reading-content { min-width: 0; max-width: var(--measure); }
.article-section { padding-top: 30px; margin-top: 32px; border-top: 1px solid var(--rule); }
.article-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.article-section h2 { margin-bottom: 18px; }
.article-section h3 { margin-block: 25px 12px; }
.article-section > p { color: var(--body); }
.article-section > :last-child { margin-bottom: 0; }
.article-section > a { display: inline-block; font-size: 15px; }
.article-section > article { border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 28px; }
.article-section > article h3 { margin-top: 0; }
.article-section:target > h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.anchor-target { display: block; }

.important-note { margin-top: 26px; padding: 20px 24px; border-left: 3px solid var(--ink); background: var(--wash); }
.important-note h2 { font-size: 20px; margin-bottom: 12px; }
.important-note p { max-width: 70ch; margin-bottom: 10px; }
.important-note > a { font-size: 15px; }
.page-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.print-page { min-height: 44px; border: 1px solid var(--muted); background: var(--white); color: var(--ink); padding: 8px 14px; cursor: pointer; font-size: 14px; }
.print-page:hover { border-color: var(--ink); background: var(--wash); }

/* Kontaktformulär */
.kontaktformular { margin-top: 4px; max-width: 34em; }
.kontaktformular fieldset { margin: 0 0 26px; padding: 0; border: 0; }
.kontaktformular legend { padding: 0; margin-bottom: 12px; font-weight: 600; font-size: 17px; }
.kontaktformular .val { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-block: 8px; color: var(--body); cursor: pointer; }
.kontaktformular .val input { margin-top: .3em; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ink); }
.falt { display: block; margin-bottom: 24px; }
.falt label { display: block; font-weight: 600; margin-bottom: 4px; }
.valfritt { font-weight: 400; color: var(--muted); }
.hjalptext { display: block; margin-bottom: 8px; font-size: 15px; color: var(--muted); }
.kontaktformular input[type="text"],
.kontaktformular input[type="email"],
.kontaktformular textarea {
  display: block; width: 100%; min-height: 48px;
  padding: 11px 12px; font: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--muted); border-radius: 0;
}
.kontaktformular textarea { min-height: 170px; line-height: 1.6; resize: vertical; }
.kontaktformular input:focus-visible,
.kontaktformular textarea:focus-visible { outline: 3px solid #315f8a; outline-offset: 2px; border-color: var(--ink); }
.kontaktformular input:hover, .kontaktformular textarea:hover { border-color: var(--ink); }
/* Honungsfälla: dold för människor, synlig för robotar som fyller i allt. */
.honungsfalla { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.villkor { margin-bottom: 22px; padding-left: 14px; border-left: 2px solid var(--rule); font-size: 15px; color: var(--muted); }
.skicka { min-height: 50px; padding: 12px 26px; font-size: 17px; font-weight: 600; color: var(--white); background: var(--ink); border: 1px solid var(--ink); cursor: pointer; }
.skicka:hover { background: #000; }
.avslojad { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.visa-epost { min-height: 44px; padding: 9px 16px; font-size: 15px; color: var(--ink); background: var(--white); border: 1px solid var(--muted); cursor: pointer; }
.visa-epost:hover { border-color: var(--ink); background: var(--wash); }
.epost-visad { font-weight: 600; font-size: clamp(19px, 3vw, 23px); }

/* Ärenden och mål. Faktarutan är en definitionslista, inte ett kort:
   inga rutor, inga skuggor, ingen rundning. Formen ska likna ett
   dagboksblad snarare än en produktsida. */
.arende { padding-top: 26px; margin-top: 30px; border-top: 1px solid var(--rule); }
.article-section > .arende:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.arende h3 { font-size: 21px; margin-bottom: 14px; }
.arende h4 { margin: 24px 0 10px; font-size: 16px; font-weight: 600; }
.arende p { color: var(--body); }
.arende-fakta { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: 4px 18px; margin: 0 0 20px; padding: 12px 0; border-block: 1px solid var(--rule); font-size: 15px; }
.arende-fakta dt { color: var(--muted); }
.arende-fakta dd { margin: 0; color: var(--ink); }
.handelser { list-style: none; margin: 0 0 18px; padding: 0; font-size: 16px; }
.handelser li { padding-left: 16px; margin-bottom: 12px; border-left: 2px solid var(--rule); color: var(--body); }
.handelser time { display: block; font-size: 14px; color: var(--muted); }

/* Redaktionell index på Aktuellt. Poster i omvänd kronologi. */
.inlagg { padding-top: 22px; margin-top: 26px; border-top: 1px solid var(--rule); }
.article-section > .inlagg:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.inlagg h3 { font-size: 21px; margin-bottom: 8px; }
.inlagg p { color: var(--body); }
.tomt-avsnitt { padding: 18px 0 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 16px; }

/* Notis om att webbplatsen byggs ut. Byggs av script.js och visas en gång
   per besökare. Utan JavaScript visas den inte alls, vilket är avsikten:
   den bär ingen information som innehållet saknar. */
.utvecklingsnotis {
  width: min(100% - 32px, 34em);
  padding: 28px 30px 26px;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.utvecklingsnotis::backdrop { background: rgba(17, 17, 17, .45); }
.utvecklingsnotis h2 { margin-bottom: 14px; font-size: 23px; }
.utvecklingsnotis p { color: var(--body); }
.utvecklingsnotis p:last-of-type { margin-bottom: 24px; }
.notis-stang {
  min-height: 48px; padding: 11px 24px;
  font-size: 16px; font-weight: 600;
  color: var(--white); background: var(--ink); border: 1px solid var(--ink);
  cursor: pointer;
}
.notis-stang:hover { background: #000; }
.notis-stang:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Felsida */
.error-page { padding-block: 56px 72px; max-width: 42em; }
.error-page h1 { margin-bottom: 20px; }
.error-page p { color: var(--body); }

/* Sidfot */
.site-footer { background: var(--ink); color: var(--white); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding-block: 34px; }
.footer-brand { display: block; width: min(100%, 280px); flex-shrink: 0; }
.footer-brand img { width: 100%; }
.footer-text { font-size: 14px; }
.footer-text p { margin-bottom: 14px; color: #e0e0dc; }
.footer-text nav { display: flex; flex-wrap: wrap; gap: 12px 25px; font-size: 13px; }
.site-footer a:focus-visible { outline-color: #ffffff; }

@media (max-width: 850px) {
  .reading-layout { grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 35px; }
  .home-help-body { gap: 16px 36px; }
  .rights-index { column-gap: 36px; }
}
@media (max-width: 650px) {
  .wrap { padding-inline: 20px; }
  .masthead-inner { padding-top: 20px; }
  .brand { width: min(100%, 440px); }
  .navigation { margin-top: 8px; }
  .menu-toggle:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 48px; padding: 10px 0;
    background: transparent; border: 0; border-top: 1px solid var(--rule);
    text-align: left; cursor: pointer; font-size: 16px;
  }
  .menu-toggle .menu-label { flex: 1 1 auto; }
  .menu-toggle .menu-icon { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; flex-shrink: 0; }
  .menu-toggle .menu-icon::before,
  .menu-toggle .menu-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); }
  .menu-toggle .menu-icon::before { top: -6px; }
  .menu-toggle .menu-icon::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  .menu-toggle:not([hidden])[aria-expanded="false"] + .site-nav { display: none; }
  .site-nav { display: block; padding-bottom: 8px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); border-left: 2px solid transparent; }
  .site-nav a[aria-current] { border-left-color: var(--ink); padding-left: 10px; }
  .breadcrumbs { padding-top: 16px; font-size: 12px; }
  /* Långa sammansatta ord som "minoritetsrättigheter" får plats på smal
     skärm: avstavning i första hand, hård brytning bara som sista utväg. */
  h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; }
  h1 { font-size: clamp(29px, 8vw, 35px); }
  h2 { font-size: 23px; }
  .lead { font-size: 19px; }
  .home-lede { padding-block: 30px 28px; }
  .home-help-body { display: block; }
  .home-help p:last-child { margin-bottom: 12px; }
  .home-rights { padding-block: 28px 24px; }
  .rights-index { columns: 1; }
  .home-reading { padding-block: 26px 36px; }
  .page-intro { padding-block: 24px 26px; }
  .reading-layout { display: block; padding-block: 24px 38px; }
  .page-nav { position: static; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
  .page-nav > p:first-child { margin-bottom: 4px; }
  /* Tva kolumner: nio avsnittslankar tog annars en hel skarmhojd innan
     brodtexten borjade. Tappmalen ar kvar pa 44 px. */
  .page-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
  .page-nav > p:first-child { grid-column: 1 / -1; }
  .page-nav > a { min-height: 44px; padding-block: 10px; font-size: 15px; line-height: 1.35; }
  .important-note { padding: 18px; }
  .utvecklingsnotis { padding: 22px 20px 20px; }
  .notis-stang { width: 100%; }
  .arende-fakta { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .arende-fakta dt { margin-top: 8px; }
  .arende-fakta dt:first-child { margin-top: 0; }
  .kontaktformular { max-width: none; }
  .skicka { width: 100%; }
  .error-page { padding-block: 34px 48px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 20px; padding-block: 26px; }
  .footer-brand { width: min(100%, 210px); }
  .footer-text nav { gap: 12px 20px; }
}
@media (max-height: 760px) { .page-nav { position: static; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  body { font-size: 11pt; color: #000; }
  .wrap { max-width: none; padding-inline: 0; }
  .brand { width: 75mm; }
  .masthead-inner { padding-top: 0; }
  .navigation, .breadcrumbs, .page-nav, .site-footer, .skip-link, .page-tools, .kontaktformular, .visa-epost, .utvecklingsnotis { display: none; }
  .reading-layout, .home-help-body { display: block; }
  .rights-index { columns: 1; }
  .reading-content { max-width: none; }
  .page-intro { padding-block: 16px; }
  h2, h3 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .important-note { break-inside: avoid; }
  h1 { font-size: 24pt; }
  h2 { font-size: 16pt; }
  .lead { font-size: 13pt; }
  .reading-content a[href^="https://"]::after { content: " (" attr(href) ")"; display: block; font-size: 8pt; line-height: 1.4; font-weight: 400; overflow-wrap: anywhere; text-decoration: none; }
}
