/* Kunskap: översikt, guider, branschsidor och artiklar under /kunskap/.
   Bygger på base.css (färger, typsnitt, knappar) och sidfot.css. */

/* ---------- Brödsmulor ---------- */
.crumbs { padding-top: clamp(28px, 4vw, 48px); }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--ink-3);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Sidhuvudets länk ---------- */
.site-nav a[aria-current="page"] { color: var(--ink); background: rgb(17 18 20 / 0.05); }

/* ---------- Inledning ---------- */
.k-hero { padding-block: clamp(20px, 3vw, 36px) clamp(40px, 5vw, 64px); }
.k-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 48rem; }
.k-hero h1 { font-size: clamp(2.375rem, 1.5rem + 3.4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.03em; hyphens: auto; overflow-wrap: anywhere; }
.k-hero .lead { color: var(--ink-2); }
.k-meta { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--ink-3); }

/* ---------- Artikel ---------- */
.k-article { padding-bottom: clamp(64px, 8vw, 112px); }
.k-article__body { display: grid; gap: 20px; max-width: 44rem; }
.k-article__body > * { margin: 0; }
.k-article h2 {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.k-article h3 { margin-top: 8px; }
.k-article p, .k-article li { text-wrap: pretty; }
.k-article ul, .k-article ol { padding-left: 1.25em; display: grid; gap: 8px; }
.k-article a:not(.btn):not(.k-card) { text-decoration-color: rgb(17 18 20 / 0.35); }
.k-article a:not(.btn):not(.k-card):hover { text-decoration-color: currentColor; }
.k-article blockquote {
  margin: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--lime-deep);
  color: var(--ink-2);
  font-style: italic;
}

/* Kort svar överst */
.k-answer {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--r-md);
  background: var(--card);
  display: grid;
  gap: 10px;
}
.k-answer__label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Upplysning: förslag, inte lag / inte rådgivning */
.k-note {
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  color: #4a2f00;
  font-size: var(--fs-small);
}
.k-note strong { color: var(--warn-fg); }
.k-note--plain { background: var(--paper-2); color: var(--ink-2); }

/* Fotnoter till källor */
sup.ref { font-size: 0.7em; line-height: 0; margin-left: 1px; }
sup.ref a {
  font-family: var(--font-mono);
  color: var(--green);
  text-decoration: none;
  padding: 0 2px;
}
sup.ref a:hover { text-decoration: underline; }

/* Tabeller */
.k-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.k-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.k-table th, .k-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.k-table thead th { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; color: var(--ink-3); background: var(--card-2); }
.k-table tbody tr:last-child td, .k-table tbody tr:last-child th { border-bottom: 0; }
.k-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Illustrationer */
.k-figure {
  margin: 8px 0;
  padding: clamp(16px, 3vw, 28px);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-product), 0 0 0 1px rgb(17 18 20 / 0.07);
  display: grid;
  gap: 14px;
}
.k-figure svg { width: 100%; height: auto; }
.k-figure figcaption { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--ink-3); }
.illu text { font-family: var(--font-body); fill: var(--ink); }
.illu .t-small { font-size: 13px; fill: var(--ink-2); }
.illu .t-label { font-size: 14px; font-weight: 600; }
.illu .t-mono { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-3); }
.illu .t-big { font-size: 20px; font-weight: 600; font-family: var(--font-display); }

/* Vanliga frågor */
.k-faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.k-faq details { border-bottom: 1px solid var(--line); }
.k-faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style-position: outside;
}
.k-faq details > div { padding-bottom: 18px; color: var(--ink-2); display: grid; gap: 10px; }

/* ---------- Kort (översikt och relaterat) ---------- */
.k-section { padding-block: clamp(40px, 6vw, 80px); }
.k-section + .k-section { padding-top: 0; }
.k-section__head { display: grid; gap: 12px; max-width: 46rem; margin-bottom: clamp(24px, 3vw, 36px); }
.k-section__head h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); line-height: 1.05; letter-spacing: -0.03em; }

.k-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.k-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-2) var(--ease-out-soft), transform var(--dur-2) var(--ease-out-soft);
}
.k-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.k-card h3 { font-size: 1.125rem; }
.k-card p { color: var(--ink-2); font-size: var(--fs-small); }
.k-card__more { font-weight: 600; font-size: var(--fs-small); color: var(--green); margin-top: auto; }
.k-card__thumb { border-radius: var(--r-md); background: var(--paper-2); padding: 14px; }
.k-card__thumb svg { width: 100%; height: auto; max-height: 120px; }

/* ---------- Uppmaning ---------- */
.k-cta { padding-block: clamp(64px, 8vw, 112px); }
.k-cta__inner { display: grid; gap: 20px; max-width: 46rem; }
.k-cta h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); }
.k-cta .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  .k-card, .k-card:hover { transition: none; transform: none; }
}

.k-card .tag, .k-hero .tag { justify-self: start; }
