/* Orkero docs. Colours from brand/README.md: ink for words, teal for links and actions,
   amber only for what needs a person. */
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400; font-display: swap; src: url('/assets/schibsted-grotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 600; font-display: swap; src: url('/assets/schibsted-grotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 800; font-display: swap; src: url('/assets/schibsted-grotesk-800.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('/assets/jetbrains-mono-400.woff2') format('woff2'); }

:root {
  --ink: #0F2A2E; --ink-2: #3C5A5E; --ink-3: #6B8487;
  --teal: #1B6F64; --teal-dark: #155A51; --teal-tint: #E3F0ED;
  --amber: #E8A23A; --paper: #F1F4F2; --surface: #FBFCFB; --line: #DDE5E2;
  --code-bg: #0F2A2E; --code-ink: #E6EEEC;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink); background: #fff; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: #fff; padding: 8px 12px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 24px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand .logo { height: 24px; width: auto; }
.brand span { padding-left: 10px; border-left: 1px solid var(--line); color: var(--ink-2); }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top-links a { color: var(--ink-2); text-decoration: none; }
.top-links a:hover { color: var(--ink); }
.top-links .cta { white-space: nowrap; color: #fff; background: var(--teal); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.top-links .cta:hover { background: var(--teal-dark); color: #fff; }
.menu-button { display: none; }

/* Three columns */
.frame { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; max-width: 1400px; margin: 0 auto; }
.side { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 28px 16px 40px 24px; border-right: 1px solid var(--line); }
.side ul { list-style: none; margin: 0 0 20px; padding: 0; }
.side li a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.side li a:hover { background: var(--paper); color: var(--ink); }
.side li a[aria-current="page"] { background: var(--teal-tint); color: var(--teal-dark); font-weight: 600; }
.nav-section { margin: 0 0 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 600;
  line-height: 18px; color: var(--ink); background: #FBEBD1; vertical-align: 1px; }

main { min-width: 0; padding: 40px 56px 64px; max-width: 860px; }
.toc { position: sticky; top: 64px; align-self: start; padding: 40px 24px 0 0; font-size: 14px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--ink-3); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 3px 0; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--teal); }

/* Page */
.page-tools { display: flex; gap: 14px; align-items: center; justify-content: flex-end; margin-bottom: 12px; font-size: 14px; }
.page-tools a { color: var(--ink-3); }
.copy-ai, .copy { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 7px; }
.copy-ai { padding: 6px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); }
.copy-ai:hover { border-color: var(--teal); color: var(--teal-dark); }
h1 { margin: 0 0 8px; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.lede { margin: 0 0 32px; font-size: 19px; color: var(--ink-2); }
h2 { margin: 48px 0 12px; padding-top: 8px; font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; }
h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
h2, h3 { position: relative; }
.anchor { position: absolute; left: -22px; color: var(--ink-3); text-decoration: none; opacity: 0; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
p, ul, ol { margin: 0 0 16px; }
li { margin-bottom: 4px; }
blockquote { margin: 0 0 20px; padding: 14px 18px; border-left: 3px solid var(--amber); background: #FFF8EC; border-radius: 0 8px 8px 0; }
blockquote p:last-child { margin: 0; }
:not(pre) > code { font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 5px; background: var(--paper); color: var(--ink); }
.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 600; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* Code */
pre { position: relative; margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border-radius: 10px; background: var(--code-bg); color: var(--code-ink);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
pre code { font-family: inherit; }
.code { position: relative; margin: 0 0 20px; }
.code pre { margin: 0; }
.copy { position: absolute; top: 10px; right: 10px; padding: 4px 10px; color: var(--code-ink); background: #1C3C41; border: 1px solid rgba(255,255,255,.2); box-shadow: -10px 0 12px var(--code-bg); }
.copy:hover { background: #26494E; }
.tabs { margin: 0 0 20px; border-radius: 10px; overflow: hidden; background: var(--code-bg); }
.tabs pre { margin: 0; border-radius: 0; }
.tablist { position: relative; display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.tablist button { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 7px 12px 9px; border: 0; background: none; color: #9FB4B1;
  border-bottom: 2px solid transparent; }
.tablist .copy { top: 6px; right: 8px; padding: 4px 10px; color: var(--code-ink); border-bottom: 1px solid rgba(255,255,255,.18); }
.tablist button[aria-selected="true"] { color: #fff; border-bottom-color: var(--amber); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-3); }
.foot a { color: var(--ink-3); }

@media (max-width: 1180px) { .frame { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .frame { display: block; }
  .menu-button { display: inline-block; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
  .top-links a:not(.cta) { display: none; }
  .top { padding: 0 14px; gap: 10px; }
  .brand span { display: none; }
  .top-links .cta { padding: 7px 10px; font-size: 14px; }
  .side { display: none; position: fixed; inset: 64px 0 0 0; height: auto; z-index: 15; background: #fff; border-right: 0; }
  .side.open { display: block; }
  main { padding: 28px 20px 48px; }
  h1 { font-size: 32px; }
  .anchor { display: none; }
}
@media (prefers-reduced-motion: no-preference) { a, button { transition: color .12s, background-color .12s, border-color .12s; } }
