@font-face { font-family: "Schibsted Grotesk"; src: url(fonts/schibsted.woff2) format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(fonts/schibsted-italic.woff2) format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }

:root { /* Night pond, the default */
  --bg: #061209; --surface: #0C1F12; --hover: #11291A; --ink: #E3F6E5; --muted: #8BAA93;
  --line: #1B3623; --line-strong: #3C6B49; --green: #31C843; --deep: #189E33; --btn-ink: #04210B;
  --mention-bg: #123D1D; --mention-ink: #7CEB8C; --selected: #123D1D; --link: #7CEB8C;
  --field: #061209; --danger: #E5484D; --good: #31C843;
  color-scheme: dark;
}
/* Lily pad. theme.js sets data-theme on <html> when the reader picks light
   or dark; without it the system setting decides. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3FAF2; --surface: #FFFFFF; --hover: #E8F4E7; --ink: #0D2414; --muted: #4A6852;
    --line: #D3E8D3; --line-strong: #0D2414; --mention-bg: #D7F5DB; --mention-ink: #0F6B24;
    --selected: #D7F5DB; --link: #0F6B24; --field: #FFFFFF; --danger: #C62D3A; --good: #0F6B24;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3FAF2; --surface: #FFFFFF; --hover: #E8F4E7; --ink: #0D2414; --muted: #4A6852;
  --line: #D3E8D3; --line-strong: #0D2414; --mention-bg: #D7F5DB; --mention-ink: #0F6B24;
  --selected: #D7F5DB; --link: #0F6B24; --field: #FFFFFF; --danger: #C62D3A; --good: #0F6B24;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* Anchor links glide (1207); headings and sections clear the sticky banner. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id], h2[id], h3[id] { scroll-margin-top: calc(24px + var(--bh, 0px)); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--green); color: var(--btn-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---- header and footer ---- */
.top { display: flex; align-items: center; gap: 28px; height: 72px; }
.mark { font-weight: 800; font-size: 26px; letter-spacing: -0.045em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.mark img { width: 32px; height: 32px; }
.top nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 16px; white-space: nowrap; }
.top nav a:not(.btn) { padding: 10px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.theme { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--selected); color: var(--ink); }
.theme-anim, .theme-anim * { transition: color .15s, background-color .15s, border-color .15s !important; }
/* Phones: the theme switcher sits opposite the brand (1237). */
.foot .brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot .theme.show-sm { display: none; }
/* Footer (1138): the brand on the left, the link columns grouped on the right so their edge lines up with the address. */
.foot { border-top: 1px solid var(--line); color: var(--muted); margin-top: 120px; padding: 56px 0 48px; font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: 1fr auto auto; gap: 40px 88px; }
.foot .mark { color: var(--ink); font-size: 22px; }
.foot .mark img { width: 28px; height: 28px; }
.foot p { margin-top: 14px; max-width: 38ch; text-wrap: pretty; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: var(--ink); text-decoration: underline 1px transparent; text-underline-offset: 4px; transition: text-decoration-color .15s; }
.foot a:hover { text-decoration-color: currentColor; }
.foot .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.foot .legal p { margin: 0; max-width: none; }
address { font-style: normal; }
.foot h2 { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 12px; letter-spacing: 0; }

/* ---- buttons and forms ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 "Schibsted Grotesk", system-ui, sans-serif; padding: 13px 20px; min-height: 46px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; -webkit-user-select: none; user-select: none;
  background: var(--green); color: var(--btn-ink);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.quiet:hover { background: var(--hover); filter: none; }
.btn.danger { background: var(--danger); color: #FFFFFF; }
.btn.small { padding: 8px 14px; min-height: 36px; font-size: 15px; }
.top .btn { padding: 10px 16px; min-height: 40px; font-size: 15px; color: var(--btn-ink); }
.top .btn:hover { color: var(--btn-ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }

.stack { display: grid; gap: 20px; }
.stack > p { margin: 0; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 15px; }
.help { font-size: 14px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input:not([type]), textarea {
  font: 400 16px/1.4 "Schibsted Grotesk", system-ui, sans-serif; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
input[aria-invalid=true] { border-color: var(--danger); }
textarea { resize: vertical; min-height: 96px; }
::placeholder { color: color-mix(in srgb, currentColor 45%, transparent); opacity: 1; }
dialog.confirm { max-width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); }
dialog.confirm::backdrop { background: rgb(0 0 0 / .5); }
dialog.confirm[open] { animation: confirm-in .16s ease-out; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.confirm[open] { animation: none; } }
dialog.confirm h2 { margin: 0 0 8px; font-size: 20px; }
dialog.confirm p { margin: 0 0 20px; color: var(--muted); }
dialog.confirm form { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--deep); flex: none; }
.msg { font-size: 14px; min-height: 0; }
.msg:empty { display: none; }
.msg .bad, .msg.bad { color: var(--danger); }
.msg .good { color: var(--good); }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 15px; border: 1px solid; }
.alert.bad { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.alert.ok { border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); }
.alert p:last-child { margin: 0; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- prose rows ---- */
.honest { margin: 0; padding: 14px 18px; font-size: 1.125rem; line-height: 1.45; font-weight: 600; border-left: 3px solid var(--green); background: color-mix(in srgb, var(--green) 6%, transparent); border-radius: 0 8px 8px 0; }
.honest + p { margin-top: 16px; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; line-height: 1.6; margin: 0 0 1em; }
pre .c { color: var(--muted); }

/* ---- documents (about, self-host, privacy, terms) ---- */
.doc { max-width: 720px; padding: 64px 0 0; }
.doc h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; margin-bottom: 28px; }
.doc .lede { font-size: 22px; line-height: 1.45; color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; margin: 48px 0 14px; }
.doc h3 { font-size: 19px; font-weight: 700; margin: 28px 0 8px; letter-spacing: -0.01em; }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.draft { display: block; border-left: 3px solid var(--danger); padding: 4px 0 4px 16px; margin-bottom: 36px; color: var(--muted); }
.draft strong { color: var(--ink); }

/* ---- docs: sidebar, page, table of contents ---- */
.docs-body .wrap { max-width: 1440px; }
.docs { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 248px minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.docside { position: sticky; top: var(--bh, 0px); max-height: calc(100vh - var(--bh, 0px)); overflow-y: auto; padding: 24px 4px 40px 4px; margin-left: -4px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.docside:hover { scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; }
.menubtn { display: none; align-items: center; gap: 8px; font: 600 15px/1 "Schibsted Grotesk", system-ui, sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; height: 44px; cursor: pointer; flex: none; transition: background-color 150ms ease-out; }
.menubtn:hover { background: var(--hover); }
.docsearch { position: relative; flex: 1; }
.docsearch > svg { position: absolute; left: 12px; top: 14px; color: var(--muted); pointer-events: none; }
.docsearch input[type=search] { -webkit-appearance: none; appearance: none; width: 100%; font: 400 16px/1.4 "Schibsted Grotesk", system-ui, sans-serif; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 36px; height: 44px; background: var(--surface); transition: border-color 150ms ease-out, box-shadow 150ms ease-out; }
.docsearch input::-webkit-search-cancel-button { display: none; }
.docsearch kbd { position: absolute; right: 10px; top: 11px; font: 500 12px/20px "JetBrains Mono", monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; pointer-events: none; }
.docsearch:focus-within kbd { opacity: 0; }
.docside:has(.results:not([hidden])) { overflow: visible; } /* the open results list is not clipped by the sidebar */
.results { position: absolute; z-index: 20; top: 50px; left: 0; width: 100%; max-height: 60vh; overflow-y: auto; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .28); animation: rise 150ms ease-out; }
.results a { display: grid; gap: 2px; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.results a:hover, .results [aria-selected=true] a { background: var(--selected); }
.results b { font-size: 15px; font-weight: 600; }
.results small { font-size: 12px; color: var(--muted); font-weight: 500; }
.results span { font-size: 13px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.results .none { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.docnav { margin-top: 20px; }
.docnav { interpolate-size: allow-keywords; }
.docnav .group + .group { margin-top: 4px; }
.docnav summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 6px; cursor: pointer; user-select: none; transition: background-color 150ms ease-out, color 150ms ease-out; }
.docnav summary::-webkit-details-marker { display: none; }
.docnav summary:hover { background: var(--hover); }
.docnav summary svg { flex: none; color: var(--muted); transition: rotate 160ms ease-out; }
.docnav details[open] > summary svg { rotate: 90deg; }
.docnav .group > summary { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.docnav .group[open] > summary { margin-bottom: 2px; }
.docnav .sub > summary { font-size: 15px; font-weight: 500; color: var(--ink); opacity: .82; }
.docnav .sub > summary:hover, .docnav .sub[open] > summary { opacity: 1; }
.docnav .sub:not([open]):has([aria-current]) > summary { color: var(--link); font-weight: 600; opacity: 1; }
.docnav .sub ul { margin: 1px 0 4px 12px; padding-left: 6px; border-left: 1px solid var(--line); }
.docnav details::details-content { block-size: 0; overflow: hidden; transition: block-size 160ms ease-out, content-visibility 160ms ease-out allow-discrete; }
.docnav details[open]::details-content { block-size: auto; }
.docnav:not(.ready) details::details-content { transition: none; } /* docs.js adds .ready after restoring open sections */
.docnav details[open] > ul { animation: none; } /* no rise on page load; the height transition shows the open */
.docnav a:focus-visible, .docnav summary:focus-visible { outline-offset: -2px; }
.docnav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.docnav a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--ink); opacity: .82; text-decoration: none; font-size: 15px; font-weight: 500; transition: background-color 150ms ease-out, opacity 150ms ease-out; }
.docnav a:hover { background: var(--hover); opacity: 1; }
.docnav a[aria-current="page"] { background: var(--selected); opacity: 1; font-weight: 600; color: var(--link); }
.docs .doc { max-width: 780px; padding-top: 32px; min-width: 0; }
.docs .doc h1 { font-size: clamp(34px, 4vw, 50px); margin-bottom: 20px; text-wrap: balance; letter-spacing: -0.035em; line-height: 1.05; }
.docs .doc h1 + p { font-size: 20px; line-height: 1.5; color: var(--muted); }
.docs .doc h2 { font-size: 27px; margin-top: 52px; }
.docs .doc h3 { font-size: 19px; margin-top: 32px; }
.docs .doc h2, .docs .doc h3 { scroll-margin-top: calc(24px + var(--bh, 0px)); }
.docs .doc h4 { font-size: 16px; margin: 24px 0 8px; }
.doc .anchor { display: inline-flex; vertical-align: middle; margin-left: 8px; color: var(--muted); opacity: 0; transition: opacity 150ms ease-out; }
.doc h2:hover .anchor, .doc h3:hover .anchor, .doc .anchor:focus-visible { opacity: 1; }
.doc :not(pre) > code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 0.84em; overflow-wrap: anywhere; }
.doc a code { color: var(--link); }
.doc blockquote { margin: 0 0 1em; padding: 12px 16px; border-left: 3px solid var(--green); background: color-mix(in srgb, var(--green) 6%, transparent); border-radius: 0 8px 8px 0; }
.doc blockquote p:last-child { margin: 0; }
.doc ol { padding-left: 1.4em; }
.doc li > p { margin: 0 0 .5em; }
.code { position: relative; }
.code .copy { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 150ms ease-out, color 150ms ease-out; }
.code:hover .copy, .code .copy:focus-visible, .code .copy.done { opacity: 1; }
.code .copy:hover, .code .copy.done { color: var(--ink); }
@media (hover: none) { .code .copy { opacity: 1; } }
.doc .table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; background: var(--surface); white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:not(:last-child) code { white-space: nowrap; }
.doc td:last-child:not(:first-child) { min-width: 15em; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color 150ms ease-out, background-color 150ms ease-out; }
.pager a:hover { border-color: var(--line-strong); background: var(--hover); }
.pager span { font-size: 13px; color: var(--muted); }
.pager b { font-size: 17px; color: var(--link); }
.pager .next { text-align: right; grid-column: 2; }
.mdlink { margin-top: 24px; font-size: 14px; }
.mdlink a { color: var(--muted); }
.toc { position: sticky; top: var(--bh, 0px); padding-top: 40px; font-size: 14px; max-height: calc(100vh - var(--bh, 0px)); overflow-y: auto; scrollbar-width: none; }
.toc p { font-weight: 600; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color 150ms ease-out, border-color 150ms ease-out; }
.toc .l3 a { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--green); }
@media (max-width: 1200px) {
  .docs { grid-template-columns: 232px minmax(0, 1fr); gap: 40px; }
  .toc { display: none; }
}
@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docside { position: sticky; top: var(--bh, 0px); z-index: 10; max-height: none; overflow: visible; margin: 0 -24px; padding: 12px 24px; background: var(--bg); } /* the menu and search stay on screen while reading */
  .docside:has(.docnav.open) .docnav { max-height: calc(100dvh - 92px - var(--bh, 0px)); overflow-y: auto; overscroll-behavior: contain; }
  .results { left: auto; right: 0; width: calc(100vw - 48px); }
  .docbar { display: flex; gap: 8px; }
  .docs .doc h2, .docs .doc h3 { scroll-margin-top: calc(88px + var(--bh, 0px)); } /* clear the sticky menu bar too (1207) */
  .menubtn { display: inline-flex; }
  .js .docnav:not(.open) { display: none; }
  .docnav { margin: 12px 0 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); animation: rise 150ms ease-out; }
  .docs .doc { padding-top: 12px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

/* ---- auth pages ---- */

.gate { max-width: 440px; margin: 40px auto 0; padding: 0 16px; }
.gate.tall { min-height: 80vh; min-height: 80svh; margin-top: 0; display: flex; flex-direction: column; justify-content: center; }
.gate.tall > .btn { align-self: flex-start; }
.gate h1 { font-size: 40px; text-wrap: balance; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 8px; }
.gate .sub { color: var(--muted); margin-bottom: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.gate .after { margin-top: 20px; font-size: 15px; color: var(--muted); text-align: center; }
.inline-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.inline-row a { font-size: 14px; }

/* ---- account ---- */
.acct { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 40px; }
.acct nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: sticky; top: 24px; }
.acct nav a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.acct nav a:hover { background: var(--hover); color: var(--ink); }
.acct nav a[aria-current="page"] { background: var(--selected); color: var(--ink); font-weight: 600; }
.acct nav .who { padding: 0 12px 16px; }
.acct nav .who b { display: block; font-size: 17px; }
.acct nav .who span { color: var(--muted); font-size: 14px; }
.acct h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 8px; }
.acct .sub { color: var(--muted); margin-bottom: 32px; max-width: 60ch; }
.sec { border-top: 1px solid var(--line); padding: 32px 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px; }
.sec > header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; }
.sec > header p { color: var(--muted); font-size: 15px; }
.sec form.stack { max-width: 460px; }
.sec h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.avatar-row > div { flex: 1 1 240px; min-width: 0; }
input[type=file] { width: 100%; font-size: 16px; }
.sec { overflow-wrap: anywhere; }
.avatar-row.drop { outline: 2px dashed var(--green); outline-offset: 10px; border-radius: 12px; background: var(--selected); }
.avpick { position: relative; flex: none; cursor: pointer; border-radius: 20px; }
.avpick:hover .bigav { filter: brightness(0.9); }
.avatar-row:has(#avatar:focus-visible) :is(.avpick, [data-pick]) { outline: 2px solid var(--green); outline-offset: 2px; } /* the hidden input has focus; its labels show it (1271) */
.avpick-icon { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.bigav { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--btn-ink); background: var(--green); flex: none; object-fit: cover; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--muted); }
.status.on::before { background: var(--good); }
.status.on { color: var(--good); }
.status.off { color: var(--muted); }
.saved { align-self: center; font-size: 14px; font-weight: 600; color: var(--good); animation: rise 160ms ease-out; } /* a save notice beside its button (1263); reduced motion drops it below */
.saved:empty { display: none; }
.qrbox { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.qr { width: 184px; height: 184px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.secret { font-family: "JetBrains Mono", monospace; font-size: 15px; letter-spacing: 0.04em; word-break: break-all; }
.steps { padding-left: 1.2em; margin: 0 0 20px; }
.steps li { margin-bottom: 6px; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 28px; font: 500 16px/1.6 "JetBrains Mono", monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 0 0 16px; list-style: none; }
.sessions { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.sessions li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; }
.sessions li + li { border-top: 1px solid var(--line); }
.sessions .ua { font-weight: 600; font-size: 15px; }
.sessions .meta { color: var(--muted); font-size: 13px; }
.sessions .this { color: var(--good); font-size: 13px; font-weight: 600; }
details.confirm > summary { list-style: none; width: fit-content; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > summary { margin-bottom: 12px; }
.mailbox { display: grid; gap: 16px; }
.mailbox article { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.mailbox pre { white-space: pre-wrap; word-break: break-all; margin: 8px 0 0; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .acct { grid-template-columns: 1fr; gap: 24px; }
  .acct nav ul { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .acct nav .who { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap, .docs { padding: 0 16px; }
  .docside { margin: 0 -16px; padding-inline: 16px; }
  .results { width: calc(100vw - 32px); }
  .top { gap: 16px; height: 64px; }
  .top nav { gap: 16px; }
  .top nav .hide-sm { display: none; }
  .foot .theme.show-sm:not([hidden]) { display: inline-flex; }
  .foot .wrap { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .foot .wrap > div:first-child { grid-column: 1 / -1; }
  .panel { padding: 20px; }
  .gate { margin-top: 16px; }
  .gate h1 { font-size: 36px; }
  .sessions li { flex-direction: column; align-items: flex-start; }
  .sec { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px 0; }
}
/* Touch screens: 44px targets for small controls (1156). */
@media (pointer: coarse) {
  .theme button { width: 40px; height: 40px; }
  .btn.small, .top .btn { min-height: 44px; }
  .code .copy { width: 40px; height: 40px; }
  .foot ul { gap: 0; }
  .foot li a { display: inline-block; padding: 10px 0; }
  .inline-row a, .gate .after a { display: inline-block; padding: 10px 0; }
  .acct nav a, .acct nav .linkbtn { padding: 12px; }
  .docnav a, .docnav summary { padding-block: 11px; }
}
@media (max-width: 400px) {
  .top { gap: 12px; }
  .top nav { gap: 14px; }
  .top .btn { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::details-content { transition: none !important; animation: none !important; }
}
.acct nav .linkbtn { padding: 7px 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
.acct nav .linkbtn:hover { color: var(--ink); }
.field label.check { font-weight: 400; }
.panel form.passkey { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel form.passkey .btn { width: 100%; }

/* ---- motion: things that appear rise in, htmx swaps fade out first ---- */
@keyframes rise { from { opacity: 0; translate: 0 4px; } }
.alert, .msg > *, details[open] > :not(summary), #totp { animation: rise 160ms ease-out; }
.htmx-swapping { opacity: 0; translate: 0 4px; transition: opacity 150ms ease-in, translate 150ms ease-in; }
/* Thin scrollbars that stay invisible until you hover or scroll the box, like Slack and Discord. */
pre, .scroll, .doc .table { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .15s; }
pre:hover, pre:focus-within, .scroll:hover, .doc .table:hover, .doc .table:focus-within { scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; }
pre::-webkit-scrollbar, .doc .table::-webkit-scrollbar { height: 6px; width: 6px; background: transparent; }
pre::-webkit-scrollbar-thumb, .doc .table::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
pre:hover::-webkit-scrollbar-thumb, .doc .table:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.beta { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1; padding: 5px 8px; border-radius: 999px; color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); margin-left: 2px; }
@media (max-width: 480px) { .mark .beta { display: none; } }

/* ---- obligatory cookie notice (cookie.js) ---- */
.cookies { position: fixed; z-index: 50; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px)); padding: 18px 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / .22); opacity: 0; translate: 0 8px; transition: opacity 160ms ease-out, translate 160ms ease-out; }
.cookies.in { opacity: 1; translate: 0 0; }
.cookies h2 { margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.cookies p { margin: 0 0 8px; text-wrap: pretty; color: var(--muted); font-size: 15px; line-height: 1.5; }
.cookies div { display: flex; gap: 8px; margin-top: 14px; }
.cookies .btn { padding: 8px 16px; min-height: 40px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .cookies { transition: none; translate: none; } }

/* Thin site-wide notice at the very top. The X hides it for good (theme.js). */
.banner { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 48px; background: color-mix(in srgb, var(--green) 10%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--green) 30%, transparent); font-size: 14px; line-height: 1.3; transition: opacity 160ms ease-out; }
.banner a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.banner a:hover span:last-child { text-decoration: underline; }
.banner .beta { margin: 0; flex: none; padding: 3px 7px; font-size: 12px; }
.banner-x { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.banner-x:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.banner.bye { opacity: 0; }
[data-banner="off"] .banner { display: none; }
html:not([data-banner="off"]):has(.banner) { --bh: 44px; }
/* Phones: the close button needs room on the right only (1232). */
@media (max-width: 640px) { .banner { justify-content: flex-start; padding: 6px 42px 6px 16px; } }
@media (prefers-reduced-motion: reduce) { .banner { transition: none; } }

/* Docs home diagram (docs.js). Bullets sit right of it; it stacks above them on phones. */
.fits { display: grid; grid-template-columns: minmax(240px, 330px) 1fr; gap: 28px; align-items: center; margin: 16px 0; }
.fits > ul { margin: 0; }
.fits-svg { width: 100%; height: auto; overflow: visible; }
.fits-wire { fill: none; stroke: var(--line-strong); stroke-width: 1.5; opacity: .45; }
.fits-hit { fill: none; stroke: none; }
.fits-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; transition: stroke 160ms ease-out; }
.fits-node.acct rect { stroke: var(--green); }
.fits-node rect.lit { stroke: var(--green); stroke-width: 2; }
.fits-node .i { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fits-node.acct .i { stroke: var(--green); }
.fits-node text { fill: var(--ink); font-size: 13px; font-weight: 700; }
.fits-node text.s { fill: var(--muted); font-size: 11px; font-weight: 500; }
.fits-pulse { fill: var(--green); }
@media (max-width: 720px) { .fits { grid-template-columns: 1fr; } .fits-svg { max-width: 330px; } }
@media (prefers-reduced-motion: reduce) { .fits-node rect { transition: none; } }

/* Docs home cards (docs.js). */
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.doc-cards > p { margin: 0; }
.doc-cards.one { grid-template-columns: 1fr; }
.doc-card strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }
.doc-card { position: relative; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color 160ms ease-out, background-color 160ms ease-out; }
.doc-card:hover { border-color: var(--green); background: var(--hover); }
.doc-card:has(a:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.doc-card a:first-of-type::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.doc-card a:first-of-type:focus-visible { outline: none; }
@media (max-width: 720px) { .doc-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .doc-card { transition: none; } }
