/* =========================================================
   APOTEK DAMMFRI — Legal page styles
   Shared by Köpvillkor, Integritetspolicy, Cookies
   ========================================================= */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
section[id], [id] { scroll-margin-top: 84px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hdr .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.hdr .lockup {
  font-family: 'Manrope', sans-serif;
  font-size: 18px; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-decoration: none; white-space: nowrap;
}
.hdr .lockup .light { font-weight: 300; }
.hdr .lockup .heavy { font-weight: 800; }
.hdr nav { display: flex; gap: 28px; font-size: 14px; color: var(--ink-2); }
.hdr nav a { text-decoration: none; font-weight: 500; }
.hdr nav a:hover { color: var(--navy); }
.hdr .back {
  font-size: 13px; font-weight: 600; color: var(--navy);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.hdr .back::before { content: "←"; }

/* ---------- page head ---------- */
.legal-head {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--line);
}
.legal-head .crumb {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.legal-head .crumb a { color: var(--ink-3); text-decoration: none; }
.legal-head .crumb a:hover { color: var(--navy); }
.legal-head h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  color: var(--ink);
  max-width: 18ch;
}
.legal-head .lede {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 56ch;
  margin: 0 0 24px;
}
.legal-head .meta {
  display: flex;
  gap: 32px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.legal-head .meta strong { color: var(--ink); font-weight: 600; }

/* sibling-tabs */
.legal-tabs {
  display: flex; gap: 4px;
  margin-top: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: -1px;
}
.legal-tabs a {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.legal-tabs a:hover { color: var(--navy); }
.legal-tabs a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* ---------- body layout ---------- */
.legal-body {
  padding: 64px 0 120px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* sticky TOC */
.toc {
  position: sticky; top: 96px;
  font-size: 13px;
  line-height: 1.5;
  padding-top: 4px;
}
.toc .lbl {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
.toc ol li { counter-increment: toc; }
.toc ol a {
  display: block;
  padding: 8px 14px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  border-left: 1px solid transparent;
  margin-left: -1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.toc ol a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-right: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.toc ol a:hover { color: var(--navy); }
.toc ol a.active {
  color: var(--navy);
  border-left-color: var(--navy);
  font-weight: 600;
}

/* article */
article.legal { max-width: 70ch; }
article.legal section + section { margin-top: 56px; }
article.legal h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
  display: flex; align-items: baseline; gap: 14px;
}
article.legal h2::before {
  content: attr(data-n);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  flex: none;
}
article.legal h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin: 24px 0 8px;
  letter-spacing: -0.005em;
}
article.legal p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
}
article.legal p strong { color: var(--ink); font-weight: 600; }
article.legal a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
article.legal a:hover { color: var(--navy-deep); }

article.legal .callout {
  margin: 20px 0;
  padding: 18px 22px;
  background: var(--navy-tint);
  border-left: 3px solid var(--navy);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
article.legal .callout.warning {
  background: var(--warning-bg);
  border-left-color: var(--warning);
}

/* cookie table */
article.legal table.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}
article.legal table.cookie-table th,
article.legal table.cookie-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
article.legal table.cookie-table th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
article.legal table.cookie-table td.name {
  font-weight: 600;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
}

/* contact card */
.contact-card {
  margin-top: 56px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.contact-card .lbl {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
  margin-bottom: 10px;
}
.contact-card .who { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.contact-card .lines { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---------- footer ---------- */
.ftr {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 28px;
}
.ftr .top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ftr .lockup {
  font-family: 'Manrope', sans-serif;
  font-size: 20px; line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.ftr .lockup .light { font-weight: 300; }
.ftr .lockup .heavy { font-weight: 800; }
.ftr .brand p {
  color: rgba(255,255,255,0.6);
  font-size: 13px; line-height: 1.6;
  max-width: 320px; margin: 16px 0 0;
}
.ftr h5 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 14px;
}
.ftr ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ftr ul a, .ftr ul li {
  color: rgba(255,255,255,0.85);
  text-decoration: none; font-size: 14px;
}
.ftr ul a:hover { color: #fff; }
.ftr .bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap; gap: 12px;
}
.ftr .bottom .legal { display: flex; gap: 18px; flex-wrap: wrap; }
.ftr .bottom .legal a { color: inherit; text-decoration: none; }
.ftr .bottom .legal a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hdr nav { display: none; }
  .legal-head { padding: 56px 0 40px; }
  .legal-body { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 40px 0 80px; }
  .toc { position: static; }
  .ftr .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contact-card { grid-template-columns: minmax(0, 1fr); }
}
