/* Own My Data.Health docs. Tokens, fonts and components follow the homepage (../index.html).
   Fonts are the site's own copies in ../fonts (SIL OFL 1.1): no third-party requests.
   --accent and --accent-2 are the logo blues, used for fills. They're too light for text on the light
   background, so links, numbers and markers use --accent-text, a deeper shade of the same blue. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #f7f9fb;
  --surface: #ffffff;
  --ink: #0d1b2a;
  --muted: #4b5c6b;
  --line: #cbd4dc;
  --accent: #38b6ff;
  --accent-2: #5ce1e6;
  --accent-text: #0a6aa8;
  --accent-ink: #ffffff;
  --code-bg: #0d1b2a;
  --code-ink: #dde6ee;
  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a121a; --surface: #111c27; --ink: #e8eef3; --muted: #9bacbb; --line: #25333f;
    --accent: #38b6ff; --accent-text: #38b6ff; --accent-ink: #ffffff; --code-bg: #060b10; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a121a; --surface: #111c27; --ink: #e8eef3; --muted: #9bacbb; --line: #25333f;
  --accent: #38b6ff; --accent-text: #38b6ff; --accent-ink: #ffffff; --code-bg: #060b10; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 3px; }
code, pre, kbd { font-family: var(--font-mono); }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.1; letter-spacing: -0.025em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* nav (same as the site) */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.mark { display: block; line-height: 0; }
.mark img { height: 40px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: inline; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }
.subnav { border-top: 1px solid var(--line); }
.subnav .wrap { display: flex; align-items: center; height: 44px; }
.subnav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 0.9rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { text-decoration: none; color: var(--muted); }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--ink); }
.subnav a[aria-current="page"] { font-weight: 700; }
html.has-subnav { scroll-padding-top: 140px; }
.has-subnav .toc { top: 128px; max-height: calc(100vh - 144px); }
.docs-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); text-decoration: none; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.6; }
.docs-label:hover { color: var(--ink); }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.nav ul a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--ink); }
.nav ul a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 6px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(0.92); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* legal pages */
.guide.single { grid-template-columns: minmax(0, 1fr); }
.doc.legal h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 10px; scroll-margin-top: 150px; }
.doc.legal h2:first-child { margin-top: 0; }
.doc.legal .table td:first-child { white-space: normal; }

/* placeholders still to fill in before publishing */
mark.tbc { background: #ffe066; color: #0d1b2a; padding: 1px 4px; border-radius: 3px; font-family: var(--font-mono); font-size: 0.85em; }

/* page header */
.hero { padding-top: 64px; padding-bottom: 56px; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; max-width: 16ch; }
h1 em { font-style: normal; position: relative; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.09em; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; margin-top: 22px; }

/* guide layout: contents on the left, the text on the right */
.guide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.toc { position: sticky; top: 84px; align-self: start; font-size: 0.92rem; max-height: calc(100vh - 100px); overflow-y: auto; }
.toc p { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 28px 1fr; text-decoration: none; color: var(--muted); padding: 4px 0; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent-text); padding-top: 2px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 700; }
.toc-mobile { display: none; }

/* previous / next between guides */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.pager a { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; background: var(--surface); }
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager small { display: block; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); margin-bottom: 4px; }
.pager strong { font-size: 1.1rem; }
.pager .next { grid-column: 2; text-align: right; }
.doc { max-width: 760px; min-width: 0; }
.doc code { overflow-wrap: anywhere; }
.doc > section { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.doc > section:last-child { border-bottom: 0; margin-bottom: 0; }
.doc h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: 18px; }
.doc h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin: 32px 0 10px; }
.doc ul, .doc ol { padding-left: 1.2em; margin: 0 0 1em; display: grid; gap: 6px; }
.doc li::marker { color: var(--accent-text); }
.doc ol.cols { display: block; columns: 2; column-gap: 40px; }
.doc ol.cols li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 600px) { .doc ol.cols { columns: 1; } }
.doc p, .doc li { color: var(--ink); }
.muted { color: var(--muted) !important; }
.doc :not(pre) > code { font-size: 0.86em; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 1px 5px; border-radius: 4px; }
kbd { font-size: 0.82em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--surface); }
pre.code { background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 16px 20px; font-size: 0.86rem; line-height: 1.75; overflow-x: auto; margin: 0 0 1.2em; white-space: pre-wrap; }
pre.code .c { color: #8497aa; }

/* blocks from the site */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.steps.two { grid-template-columns: repeat(2, 1fr); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.step .n { font-family: var(--font-mono); color: var(--muted); font-size: 0.8rem; }
.step h3 { font-size: 1.2rem; margin: 8px 0 8px; font-weight: 700; }
.step p { color: var(--muted); font-size: 0.98rem; }
a.step { display: block; text-decoration: none; }
a.step:hover { border-color: var(--ink); color: var(--ink); }
a.step h3::after { content: " ↗"; color: var(--accent-text); font-family: var(--font-mono); font-size: 0.9em; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--surface); margin: 20px 0; }
.panel h3 { margin-top: 0; }
.panel ul { color: var(--muted); }
.panel li strong { color: var(--ink); }
.warn { margin: 20px 0; padding: 16px 20px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.note { margin: 20px 0; padding: 16px 20px; border-left: 3px solid var(--line); background: var(--surface); color: var(--muted); }
.note strong { color: var(--ink); }

/* manifesto beats */
.beats { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: beat; display: grid; }
.beats li { counter-increment: beat; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; }
.beats li::before { content: counter(beat); font-family: var(--font-mono); color: var(--accent-text); font-size: 1rem; padding-top: 0.3em; }

/* tables */
.table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.96rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 700; white-space: nowrap; }
.table td code { white-space: nowrap; }
.scroll { overflow-x: auto; }

/* screenshots */
figure { margin: 24px 0 28px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 48px -32px rgba(13, 27, 42, 0.5); background: #fff; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; }

/* a conversation example */
.chat { display: grid; gap: 10px; margin: 20px 0 24px; }
.chat p { margin: 0; padding: 12px 16px; border-radius: 10px; max-width: 88%; font-size: 0.98rem; }
.chat .you { justify-self: end; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--ink); border-bottom-right-radius: 3px; }
.chat .claude { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.chat .who { display: block; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; margin-bottom: 4px; }


@media (max-width: 900px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: var(--surface); }
  .steps, .steps.two { grid-template-columns: 1fr; }
  .nav ul { gap: 18px; }
  .nav ul .hide-sm { display: none; }
  .toc { display: none; }
  .toc-mobile { display: block; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .toc-mobile summary { cursor: pointer; padding: 14px 18px; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .toc-mobile .toc { display: block; position: static; max-height: none; border: 0; padding: 0 18px 16px; background: none; }
  .toc-mobile .toc > p { display: none; }
  .hero { padding-top: 44px; padding-bottom: 40px; }
}
@media (max-width: 900px) {
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 0; row-gap: 4px; }
  .nav nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav ul { gap: 20px; padding: 6px 0 10px; white-space: nowrap; }
  html { scroll-padding-top: 108px; }
  html.has-subnav { scroll-padding-top: 150px; }
  .has-subnav .toc-mobile { margin-top: 0; }
}
@media (max-width: 640px) {
  .mark img { height: 30px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}
@media (max-width: 480px) { .table td:first-child { white-space: normal; } }
@media print {
  .nav, .toc { display: none; }
  .guide { display: block; }
  body { background: #fff; }
}
