@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-elev: #f6f8fb;
  --ink: #1b1d21;
  --muted: #565c66;
  --line: #e1e5ea;
  --accent: #226ee1; /* brand blue from the manifest and the logo */
  --accent-contrast: #ffffff;
  --code-bg: #f1f4f8;
  --nav-bg: #000000;
  --nav-ink: #ffffff;
  --radius: 4px;
  --measure: 44rem;
  --page: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --bg-elev: #181b21;
    --ink: #eceef2;
    --muted: #a6adb8;
    --line: #2a2f38;
    --accent: #6ea4ff;
    --accent-contrast: #101216;
    --code-bg: #1b1f27;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6, .wordmark {
  font-family: "Barlow Condensed", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 2rem 0 0.75rem;
}
h1 { font-size: 2.6rem; margin-top: 0.5rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.55rem; }
h4, h5, h6 { font-size: 1.25rem; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }
.measure { max-width: var(--measure); }
main { flex: 1 0 auto; padding: 1.5rem 0 3rem; }

/* header: black navbar */
header.site { background: var(--nav-bg); color: var(--nav-ink); position: sticky; top: 0; z-index: 30; }
header.site .bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--nav-ink); text-decoration: none; }
.brand .logo { display: block; }
.wordmark { font-size: 1.75rem; margin: 0; color: var(--nav-ink); letter-spacing: 0.02em; }
.nav { display: none; gap: 1.25rem; flex: 1; }
.nav a { color: #d6dae0; text-decoration: none; font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.25rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.search-btn { margin-left: auto; color: var(--nav-ink); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }
.search-btn:hover, .search-btn[aria-current="page"] { background: #222; color: #fff; }
@media (min-width: 840px) { .nav { display: flex; } }

/* footer */
footer.site { border-top: 1px solid var(--line); background: var(--bg-elev); padding: 1.5rem 0 2rem; color: var(--muted); }
footer.site p { margin: 0.5rem 0; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0.75rem 0; }
footer.site a { color: var(--ink); }

/* content */
.kicker { color: var(--muted); margin: 0 0 0.25rem; }
.kicker a { color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0.25rem 0 1rem; }
.hero { padding: 1rem 0 0.5rem; }
.page-head h1 { margin-bottom: 0.25rem; }
.muted { color: var(--muted); }
.count { color: var(--muted); font-family: "Inter", sans-serif; font-size: 1rem; }

.prose { overflow-wrap: break-word; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: 0.25rem 0; }
.prose blockquote { border-left: 4px solid var(--accent); background: var(--bg-elev); padding: 0.5rem 1rem; margin-left: 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { display: block; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 1rem; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.1rem; }
th, td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }

details.toc { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 1rem; margin: 1rem 0 1.5rem; }
details.toc summary { cursor: pointer; font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.25rem; }
details.toc ul { margin: 0.5rem 0; padding-left: 1.25rem; list-style: disc; }
details.toc .toc > ul { padding-left: 0; list-style: none; }
details.toc li { margin: 0.2rem 0; }

.video { margin: 1.25rem 0; }
.video .yt-box { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-load { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: #fff; background: #111; padding: 1rem; text-align: center; font-size: 1rem; }
.yt-load:hover { background: #1c2230; }
.yt-load:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.yt-load svg { width: 56px; height: 56px; }
.gist { margin: 1rem 0; padding: 0.75rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-elev); }

section { margin: 2rem 0; }
ul.list, ul.plain, ul.results { list-style: none; padding: 0; margin: 0; }
ul.list li, ul.results li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
ul.list a, ul.results a { text-decoration: none; font-weight: 400; }
ul.list a:hover, ul.results a:hover { text-decoration: underline; }
ul.list .desc, ul.results span { display: block; color: var(--muted); font-size: 1rem; margin-top: 0.15rem; }
ul.results a { display: block; }
ul.results strong { font-weight: 400; color: var(--accent); }
ul.plain li { padding: 0.2rem 0; }

ul.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
ul.cards a { display: block; height: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); text-decoration: none; color: var(--ink); }
ul.cards a:hover { border-color: var(--accent); }
ul.cards strong { display: block; font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.4rem; line-height: 1.15; color: var(--accent); margin-bottom: 0.35rem; }
ul.cards span { display: block; color: var(--muted); font-size: 1rem; line-height: 1.5; }

ul.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
ul.chips a { display: inline-block; padding: 0.35rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--bg-elev); color: var(--ink); }
ul.chips a:hover { border-color: var(--accent); color: var(--accent); }
ul.chips span { color: var(--muted); margin-left: 0.25rem; }

.related { margin-top: 2.5rem; }

/* search */
.search-bar { margin: 1rem 0; }
.search-bar input { width: 100%; font: inherit; font-size: 1.125rem; padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.search-bar input:focus { border-color: var(--accent); outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Floating mobile toolbar */
.ftb-wrap { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: center; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
.ftb { pointer-events: auto; display: flex; align-items: stretch; gap: 2px; padding: 6px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elev) 90%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2); }
.ftb-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 62px; padding: 6px 10px 5px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 1rem; letter-spacing: 0.03em; -webkit-tap-highlight-color: transparent; }
.ftb-btn svg { display: block; flex: 0 0 auto; }
.ftb-btn:hover, .ftb-btn[aria-current="page"] { color: var(--accent); }
.ftb-btn[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }

@media (max-width: 839px) {
  body { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  footer.site { padding-bottom: 1.25rem; }
  h1 { font-size: 2.2rem; }
}
@media (min-width: 840px) { .ftb-wrap { display: none; } }
