/* AdVerse Help Centre. Layout: sticky header with search; three columns (page tree · article · on-page
   contents) that collapse to one on phones. Colours come from the AdVerse mark: navy, teal and gold. */
:root {
  --paper: #f7f9fc;
  --panel: #ffffff;
  --ink: #122033;
  --muted: #56657a;
  --rule: #dfe5ee;
  --navy: #0d3b6e;
  --navy-ink: #ffffff;
  --accent: #155e9c;
  --accent-soft: #e8f0f9;
  --teal: #1597a8;
  --gold: #d99a1e;
  --gold-soft: #fbf2de;
  --good: #1f7a4d; --good-soft: #e7f4ec;
  --warn: #8a5a00; --warn-soft: #fbf1dc;
  --bad: #a3312c; --bad-soft: #f9e8e7;
  --code-bg: #eef2f7;
  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --header-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c131c; --panel: #121b26; --ink: #e3e9f1; --muted: #99a7b8; --rule: #243142;
    --navy: #0a2745; --navy-ink: #ffffff; --accent: #7fb6e8; --accent-soft: #152a40; --teal: #45c2d1;
    --gold: #e8b64f; --gold-soft: #2c2410; --good: #6fcf9a; --good-soft: #12291e; --warn: #e9b95a;
    --warn-soft: #2c2410; --bad: #f08a84; --bad-soft: #321817; --code-bg: #1a2431;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

/* Header */
.kb-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: 16px;
  padding: 0 24px; background: var(--navy); color: var(--navy-ink); }
.kb-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.kb-brand img { width: 34px; height: 34px; }
.kb-brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.72rem; opacity: 0.8; letter-spacing: 0.04em; text-transform: uppercase; }
.kb-header .search { flex: 1; max-width: 32rem; margin-left: auto; position: relative; }
.kb-header .search input { width: 100%; height: 38px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.12);
  color: #fff; padding: 0 12px 0 36px; font: inherit; font-size: 0.95rem; }
.kb-header .search input::placeholder { color: rgba(255, 255, 255, 0.75); }
.kb-header .search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; opacity: 0.8; }
.kb-open { color: var(--navy); background: var(--gold); text-decoration: none; font-weight: 700; font-size: 0.9rem; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.kb-open:hover { filter: brightness(1.05); }

/* Search results dropdown */
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: 0 12px 32px -12px rgba(10, 30, 60, 0.35); max-height: 70vh; overflow-y: auto; z-index: 40; }
.results a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a.on { background: var(--accent-soft); }
.results b { display: block; font-size: 0.95rem; }
.results span { display: block; font-size: 0.82rem; color: var(--muted); }
.results .empty { padding: 12px 14px; font-size: 0.9rem; color: var(--muted); }

/* Three columns */
.kb { display: grid; grid-template-columns: 16rem minmax(0, 1fr) 15rem; gap: 2.5rem; max-width: 90rem; margin: 0 auto; padding-inline: 24px; padding-block: 0 4rem; }
.tree, .rail { position: sticky; top: calc(var(--header-h) + 8px); align-self: start; max-height: calc(100vh - var(--header-h) - 16px); overflow-y: auto; padding-block: 1.5rem; font-size: 0.9rem; }
.tree h4, .rail h4 { margin: 0 0 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.tree ul, .rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.tree a, .rail a { display: block; padding: 0.25rem 0.55rem; border-radius: 6px; color: var(--ink); text-decoration: none; border-left: 2px solid transparent; }
.tree a:hover, .rail a:hover { background: var(--accent-soft); }
.tree a.here { font-weight: 700; color: var(--accent); }
.tree ul ul { margin: 0.15rem 0 0.4rem 0.6rem; padding-left: 0.4rem; border-left: 1px solid var(--rule); }
.tree .soon { display: block; padding: 0.25rem 0.55rem; color: var(--muted); }
.tree .soon em { font-style: normal; font-size: 0.72rem; margin-left: 0.3rem; padding: 0 0.4rem; border-radius: 999px; background: var(--code-bg); }
.rail a.active { border-left-color: var(--accent); color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.rail section + section { margin-top: 1.5rem; }
.helpdesk { border: 1px solid var(--rule); background: var(--panel); border-radius: 10px; padding: 0.8rem 0.9rem; }
.helpdesk p { margin: 0.2rem 0; }
.tree-toggle { display: none; }
main.article { min-width: 0; padding-block: 1.75rem 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumbs a { color: var(--muted); }

/* Home */
.home-hero { background: linear-gradient(160deg, var(--navy) 0%, #0f4c86 60%, #116a8a 100%); color: #fff; padding: 3rem 24px 3.4rem; }
.home-hero .in { max-width: 56rem; margin: 0 auto; text-align: center; }
.home-hero h1 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.6rem; text-wrap: balance; }
.home-hero p { margin: 0 auto 1.4rem; max-width: 40rem; color: rgba(255, 255, 255, 0.86); font-size: 1.08rem; }
.big-search { position: relative; max-width: 40rem; margin: 0 auto; text-align: left; }
.big-search input { width: 100%; height: 54px; border-radius: 12px; border: 0; padding: 0 16px 0 48px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--panel); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.big-search svg { position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; color: var(--muted); }
.hint { margin-top: 0.8rem; font-size: 0.88rem; color: rgba(255, 255, 255, 0.8); }
.hint a { color: #fff; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0 0.5rem; }
.service { display: block; border: 1px solid var(--rule); background: var(--panel); border-radius: 12px; padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); }
a.service:hover { border-color: var(--accent); box-shadow: 0 6px 20px -14px rgba(10, 40, 80, 0.5); }
.service b { font-family: var(--display); font-size: 1.05rem; display: block; }
.service span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.service .tag { display: inline-block; margin-top: 0.6rem; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--good-soft); color: var(--good); }
.service.soon { opacity: 0.75; }
.service.soon .tag { background: var(--code-bg); color: var(--muted); }
.faq { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.faq td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.faq tr:last-child td { border-bottom: 0; }
.faq td:first-child { width: 42%; font-weight: 600; background: var(--accent-soft); }

/* Article content (shared with the guides) */
h1 { font-family: var(--display); font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.3rem 0 0.8rem; text-wrap: balance; }
h2 { font-family: var(--display); font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin: 3rem 0 0.6rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); text-wrap: balance; }
h2 .num { color: var(--muted); font-weight: 500; margin-right: 0.35rem; }
h3 { font-family: var(--display); font-size: 1.18rem; margin: 1.9rem 0 0.4rem; }
h4 { font-size: 1rem; margin: 1.3rem 0 0.3rem; }
p, li { max-width: 70ch; }
p.lede { font-size: 1.12rem; color: var(--muted); }
header.hero { padding-bottom: 0.5rem; }
header.hero .eyebrow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--teal); font-weight: 700; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); padding: 0.08em 0.35em; border-radius: 4px; }
.ui { font-weight: 600; }
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0.8rem 0; display: grid; gap: 0.55rem; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 2.3rem; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0.1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.85rem; display: grid; place-items: center; }
.callout { border: 1px solid var(--rule); border-left-width: 4px; border-radius: 8px; padding: 0.75rem 1rem; margin: 1.1rem 0; background: var(--panel); }
.callout > strong:first-child { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.callout.tip { border-left-color: var(--good); } .callout.tip > strong:first-child { color: var(--good); }
.callout.note { border-left-color: var(--accent); } .callout.note > strong:first-child { color: var(--accent); }
.callout.caution { border-left-color: var(--warn); background: var(--warn-soft); } .callout.caution > strong:first-child { color: var(--warn); }
.callout p { margin: 0.2rem 0; }
figure.shot { margin: 1.4rem 0 1.8rem; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); box-shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 8px 24px -12px rgba(16, 32, 48, 0.18); }
figure.shot.phone img { max-width: 20rem; margin-inline: auto; }
figure.shot figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.55rem; }
figure.shot figcaption b { color: var(--ink); font-weight: 600; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; align-items: start; }
.tablewrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.tablewrap th, .tablewrap td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tablewrap th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; background: var(--code-bg); }
.tablewrap tr:last-child td { border-bottom: 0; }
td.c, th.c { text-align: center !important; }
.yes { color: var(--good); font-weight: 700; } .no { color: var(--muted); }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--code-bg); color: var(--ink); white-space: nowrap; }
.pill.g { background: var(--good-soft); color: var(--good); } .pill.w { background: var(--warn-soft); color: var(--warn); } .pill.b { background: var(--bad-soft); color: var(--bad); } .pill.a { background: var(--accent-soft); color: var(--accent); }
.checklist { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.checklist li { padding: 0.6rem 0.8rem 0.6rem 2.4rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0.85rem; top: 0.85rem; width: 0.9rem; height: 0.9rem; border: 2px solid var(--accent); border-radius: 3px; }
dl.gloss { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); gap: 0.4rem 1.2rem; }
dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; }
footer.end, .kb-footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.86rem; }
.kb-footer { max-width: 90rem; margin: 0 auto; padding: 1.2rem 24px 2rem; }
.dl-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.6rem 0 1rem; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; padding: 0.45rem 0.9rem; border-radius: 8px; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Wide screens: chapters live in the right rail, so the tree lists guides only. */
@media (min-width: 1181px) { .tree ul ul { display: none; } }
.soon-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.soon-list li { font-size: 0.88rem; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px dashed var(--rule); color: var(--muted); background: var(--panel); }
@media (max-width: 1180px) { .kb { grid-template-columns: 15rem minmax(0, 1fr); } .rail { display: none; } }
@media (max-width: 860px) {
  .kb-header { padding: 0 16px; gap: 10px; }
  .kb-brand span { display: none; }
  .kb-open { display: none; }
  .kb { grid-template-columns: minmax(0, 1fr); gap: 0; padding-inline: 16px; }
  .tree { position: static; max-height: none; padding-block: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .tree nav { display: none; }
  .tree.open nav { display: block; padding-bottom: 0.8rem; }
  .tree-toggle { display: inline-block; font: inherit; font-size: 0.9rem; padding: 0.35rem 0.8rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; }
  .faq td { display: block; width: auto !important; }
  .faq td:first-child { border-bottom: 0; }
  dl.gloss { grid-template-columns: minmax(0, 1fr); }
  .home-hero { padding: 2rem 16px 2.4rem; }
}
