/* Learn Swedish guides. Colors and type follow docs/brand/BRAND.md and docs/brand/tokens.json. */
:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-variant: #F0EFED;
  --text: #37352F;
  --text-secondary: #6B6A66;
  --border: #E7E7E5;
  --primary: #1C6FC2;
  --on-primary: #FFFFFF;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --measure: 68ch;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2F3437;
    --surface: #373C3F;
    --surface-variant: #494846;
    --text: #EBECEC;
    --text-secondary: #ABAEAF;
    --border: #43484B;
    --primary: #7DB2EE;
    --on-primary: #15202B;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.625 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-s);
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  min-height: 48px;
}
.brand img { width: 32px; height: 32px; border-radius: var(--radius-s); }
.header-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.header-link:hover { color: var(--primary); }

/* Breadcrumb */
.crumbs { margin: 24px 0 0; font-size: 0.875rem; line-height: 1.43; color: var(--text-secondary); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--text-secondary); }
.crumbs a { color: var(--text-secondary); }
.crumbs a:hover { color: var(--primary); }
.crumbs [aria-current="page"] { color: var(--text); }

/* Article */
main { padding-bottom: 48px; }
h1, h2, h3 { font-weight: 600; color: var(--text); }
h1 { font-size: 1.75rem; line-height: 1.29; margin: 16px 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; line-height: 1.45; margin: 48px 0 12px; }
h3 { font-size: 1.25rem; line-height: 1.4; margin: 32px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 24px; }
li { margin-bottom: 4px; }
strong { font-weight: 600; }

.answer {
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 16px;
  margin: 0 0 32px;
}

.meta { color: var(--text-secondary); font-size: 0.875rem; margin: 0 0 24px; }

:lang(sv) { font-style: normal; }
.sv { font-weight: 600; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
caption { text-align: left; padding: 12px 16px 0; font-size: 0.875rem; color: var(--text-secondary); }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--surface-variant); }
tr:last-child td { border-bottom: 0; }

.note {
  background: var(--surface-variant);
  border-radius: var(--radius-m);
  padding: 16px;
  margin: 0 0 24px;
}
.note p:last-child { margin-bottom: 0; }

/* Hub list */
.guide-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.guide-list li { margin: 0; }
.guide-list a {
  display: block;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--text);
  text-decoration: none;
}
.guide-list a:hover { border-color: var(--primary); }
.guide-list strong { display: block; font-size: 1.125rem; line-height: 1.45; color: var(--primary); margin-bottom: 4px; }
.guide-list span { color: var(--text-secondary); font-size: 0.9375rem; }

/* Call to action */
.cta {
  margin: 48px 0 0;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.cta h2 { margin-top: 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
.button + .button { margin-left: 8px; }
@media (max-width: 480px) { .button + .button { margin-left: 0; margin-top: 8px; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0 32px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer nav li { margin: 0; }
.site-footer a { color: var(--text-secondary); display: inline-flex; min-height: 48px; align-items: center; }
.site-footer a:hover { color: var(--primary); }
.site-footer p { margin: 0; }

@media (min-width: 720px) {
  h1 { font-size: 2.125rem; line-height: 1.18; }
  .answer { padding: 20px 24px; }
  .cta { padding: 32px; }
}
