/* The legal pages (/legal, /privacy, /terms and the rest). Same tokens, header and footer as
   index.html and company.html (keep them in step; serve.test.mjs checks the footers match),
   plus the long-form document layout: a contents list beside the text, and a print style. */
:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #10241c;
  --muted: #4c5f56;
  --line: #d6ddd8;
  --green: #0d6a4e;
  --green-soft: #e3efe9;
  --amber: #e0a02a;
  --amber-soft: #fbf1dc;
  --amber-ink: #1a1408;
  --on-green: #ffffff;
  --display: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Public Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap: 1160px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0c1612;
    --surface: #12201a;
    --ink: #e5eee9;
    --muted: #9db1a7;
    --line: #243630;
    --green: #43c393;
    --green-soft: #15302a;
    --amber: #f0b44a;
    --amber-soft: #2a2312;
    --amber-ink: #1a1408;
    --on-green: #0c1612;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
img {
  max-width: 100%;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}
a {
  color: inherit;
}
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 30;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}
.band {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
p {
  margin: 0;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.lede {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 62ch;
}

/* Header (as index.html) */
header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--green);
  display: grid;
  place-items: center;
  color: var(--on-green);
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}
.brand b {
  color: var(--green);
  font-weight: 800;
}
nav.links {
  display: flex;
  gap: 26px;
  font-size: 0.95rem;
}
nav.links a {
  text-decoration: none;
  color: var(--muted);
}
nav.links a:hover {
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: var(--on-green);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
@media (max-width: 860px) {
  nav.links {
    display: none;
  }
}
@media (max-width: 380px) {
  .top .wrap {
    gap: 10px;
  }
  .brand {
    font-size: 1.1rem;
    gap: 8px;
  }
  .top .btn {
    padding-inline: 14px;
  }
}

/* The document */
.legal {
  padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px);
}
.crumbs {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.crumbs a {
  text-underline-offset: 3px;
}
.doc-head {
  display: grid;
  gap: 16px;
  max-width: 820px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.doc-meta div {
  display: flex;
  gap: 8px;
}
.doc-meta dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.2em;
}
.doc-meta dd {
  margin: 0;
  color: var(--ink);
}
.status {
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.97rem;
  max-width: 72ch;
}
.doc {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  margin-top: 36px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 0.92rem;
}
.toc h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
  border-left-color: var(--green);
}
@media (max-width: 900px) {
  .doc {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px 20px;
  }
}

.prose {
  max-width: 74ch;
  min-width: 0;
}
.prose section {
  scroll-margin-top: 92px;
  padding-bottom: 8px;
}
.prose section + section {
  margin-top: 36px;
}
.prose h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.prose h3 {
  font-size: 1.08rem;
  margin: 22px 0 8px;
}
.prose p,
.prose ul,
.prose ol,
.prose .table-wrap,
.prose dl {
  margin: 0 0 14px;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 6px;
}
.prose a {
  color: var(--green);
  text-underline-offset: 3px;
}
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  padding: 16px 20px;
}
.callout > :last-child {
  margin-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-family: var(--display);
  font-weight: 700;
  background: var(--green-soft);
}
/* Phones: each row becomes a card, with each cell labelled by its column (data-label). */
@media (max-width: 600px) {
  .table-wrap {
    overflow-x: visible;
  }
  table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  table tr {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
  }
  tbody tr:last-child {
    border-bottom: 0;
  }
  table td {
    display: block;
    border: 0;
    padding: 6px 16px;
  }
  table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  table td:first-child {
    font-family: var(--display);
    font-weight: 700;
  }
  table td:first-child::before {
    font-weight: 400;
  }
}
.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
}
.contact-card dt {
  color: var(--muted);
}
.contact-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* The /legal hub */
.doc-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.doc-list li {
  display: grid;
}
.doc-list a {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  text-decoration: none;
}
.doc-list a:hover {
  border-color: var(--green);
}
.doc-list h2 {
  font-size: 1.2rem;
}
.doc-list p {
  color: var(--muted);
  font-size: 0.96rem;
}
.doc-list .for {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}
@media (max-width: 720px) {
  .doc-list {
    grid-template-columns: 1fr;
  }
}

/* Footer (as index.html) */
footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 40px;
  font-size: 0.9rem;
  color: var(--muted);
}
footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 32px;
  align-items: start;
}
.foot-maker {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.foot-maker .foot-logo {
  display: inline-block;
  padding-block: 11px;
}
.cp-logo {
  display: block;
  height: auto;
}
.foot-maker .cp-logo {
  width: 140px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  justify-content: flex-end;
  max-width: 560px;
}
footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
}
.foot-legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;
}
.foot-legal nav {
  justify-content: flex-start;
  max-width: none;
  column-gap: 18px;
}
@media (max-width: 760px) {
  footer .wrap {
    grid-template-columns: 1fr;
  }
  footer nav {
    justify-content: flex-start;
  }
  .foot-legal p {
    padding-top: 8px;
  }
}

@media print {
  header.top,
  footer,
  .toc,
  .skip,
  .crumbs {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .doc {
    display: block;
    margin-top: 16px;
  }
  .prose {
    max-width: none;
  }
  .prose a {
    color: inherit;
  }
  .status,
  .callout,
  .table-wrap {
    background: none;
  }
  .prose h2,
  .prose h3 {
    break-after: avoid;
  }
}
