/* johnoscott.com — Dozable's design (dozer-sandbox-release/website: site.css + docs/docs.css), with blue as the one
   accent instead of yellow. Black on white, 1px black borders, pills, the hard black shadow, and ONE accent colour
   (--accent) with its tints. Nothing here may introduce a colour other than black, white, greys and the accent.
   tools/stamp.sh fingerprints the links to this file. */
:root {
  --accent: #3d9bff;
  --tint: color-mix(in oklch, var(--accent) 55%, white);       /* bands, table headers, chips */
  --tint-soft: color-mix(in oklch, var(--accent) 24%, white);  /* quiet fills: inline code, code captions */
  --ink: #000;
  --ink-2: #2b2b2d;               /* secondary text */
  --grey: #555;                   /* the lightest text: shell comments, heading anchors */
  --hair: rgb(0 0 0 / .22);       /* hairlines */
  --shadow: 0 4px 0 #000;         /* the hard shadow */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --navh: 48px;
  --measure: 70ch;
}
@supports not (color: color-mix(in oklch, red 50%, white)) { :root { --tint: #a9d1ff; --tint-soft: #dcecff; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--navh); }
body { margin: 0; background: #fff; color: #000; font: 400 17px/1.47 var(--font); -webkit-font-smoothing: antialiased; }
main { display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #000; outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.9em; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 16px; top: 8px; }

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 50; min-height: var(--navh); background: rgb(255 255 255 / .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid #000; color: #000; }
.nav-in { max-width: 1080px; min-height: var(--navh); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 22px; }
.nav-name { font-weight: 700; text-decoration: none; letter-spacing: -.01em; margin-right: auto; font-size: 17px; white-space: nowrap; }
.nav nav { display: flex; gap: 22px; font-size: 13px; }
.nav nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current] { color: #000; text-decoration: underline; }
.nav-gh { display: inline-flex; align-items: center; color: #000; }
.nav-gh:hover { opacity: .6; }
.nav-gh:focus-visible { outline: 2px solid #000; outline-offset: 3px; border-radius: 4px; }
.pill { display: inline-block; background: var(--accent); color: #000; border: 1px solid #000; border-radius: 980px; padding: 3px 12px; font-size: 12px; font-weight: 600; text-decoration: none; line-height: 1.5; }
.pill:hover { background: #000; color: #fff; }
.pill.big { font-size: 17px; padding: 9px 22px; }
.prose a.pill { text-decoration: none; }
.prose a.pill:hover { background: #000; color: #fff; }
@media (max-width: 420px) { .nav-in { gap: 14px; } .nav nav { gap: 14px; } }

/* ---------- footer ---------- */
.foot { background: #fff; color: #000; padding: 32px 0 56px; font-size: 13px; border-top: 1px solid #000; }
.foot .wrap { max-width: 1080px; padding: 0 24px; }
.foot ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: #000; }
.foot p { margin: 0 0 6px; color: var(--ink-2); }

/* ---------- home: a band of the accent tint ---------- */
.hero { background: var(--tint); border-bottom: 1px solid #000; }
.hero .prose { padding-top: 64px; padding-bottom: 56px; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.4; letter-spacing: -.01em; margin: 0 0 26px; }
.home .latest { padding-top: 40px; }
.eyebrow { margin: 0 0 4px !important; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- prose (one 70ch column) ---------- */
.prose { max-width: var(--measure); margin: 0 auto; padding: 40px 16px 72px; font-size: 17px; line-height: 1.65; overflow-wrap: break-word; }
.prose > * { margin: 0 0 1.1em; }
.prose h1 { font-size: clamp(34px, 6vw, 46px); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 14px; text-wrap: balance; font-weight: 700; }
.prose h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; margin: 2.2em 0 .6em; font-weight: 700; padding-top: .6em; border-top: 1px solid var(--hair); text-wrap: balance; }
.prose h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.015em; margin: 1.9em 0 .5em; font-weight: 700; }
.prose h4 { font-size: 17px; line-height: 1.3; margin: 1.6em 0 .4em; font-weight: 700; letter-spacing: 0; }
.prose h2:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.prose h2, .prose h3, .prose h4 { position: relative; scroll-margin-top: calc(var(--navh) + 16px); }
.prose h2 .anchor, .prose h3 .anchor, .prose h4 .anchor { margin-left: .4em; font-weight: 400; color: var(--grey); text-decoration: none; opacity: 0; padding: 0 .25em; border-radius: 4px; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose .anchor:hover { background: var(--accent); color: #000; }
@media (hover: none) { .prose .anchor { opacity: .45; } }
.prose :target { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--tint); } to { background: transparent; } }
.prose strong { font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { background: var(--accent); text-decoration-thickness: 2px; }
.prose a[href^="http"]::after { content: " \2197"; font-size: .8em; text-decoration: none; display: inline-block; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: 0 0 .4em; padding-left: .2em; }
.prose li > :is(ul, ol) { margin: .4em 0 0; }
.prose ul li::marker { color: #000; }
.prose ol li::marker { font-weight: 700; font-variant-numeric: tabular-nums; }
.prose hr { border: 0; border-top: 1px solid #000; margin: 2.4em 0; }

/* inline code: light accent tint, black text */
.prose :not(pre) > code { font: 0.88em var(--mono); background: var(--tint-soft); color: #000; padding: .1em .38em; border-radius: 5px; overflow-wrap: anywhere; }
.prose h2 code, .prose h3 code { font-size: .8em; }
kbd { font: 600 .85em var(--mono); background: #fff; color: #000; border: 1px solid #000; border-bottom-width: 2px; border-radius: 6px; padding: .05em .45em; white-space: nowrap; }

/* ---------- code blocks ---------- */
.code { margin: 1.4em 0 1.6em; background: #fff; border: 1px solid #000; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #000; background: var(--tint-soft); padding: 4px 6px 4px 14px; font: 600 12px var(--mono); letter-spacing: .04em; text-transform: lowercase; min-height: 34px; }
.code .copy { display: none; font: 600 12px var(--font); letter-spacing: 0; background: #fff; color: #000; border: 1px solid #000; border-radius: 980px; padding: 3px 12px; cursor: pointer; }
.js .code .copy { display: inline-block; }
.code .copy:hover, .code .copy[data-done] { background: var(--accent); }
.code pre { margin: 0; max-width: none; border: 0; border-radius: 0; padding: 16px 18px; background: #fff; text-align: left; font: 14.5px/1.65 var(--mono); overflow-x: auto; tab-size: 4; -webkit-text-size-adjust: none; }
.code pre:focus-visible { outline-offset: -3px; }
.code code { font: inherit; background: none; padding: 0; }
.code .c { color: var(--grey); }          /* shell comments: the only syntax colouring there is */
.code.diagram pre { line-height: 1.3; }
@media (max-width: 600px) { .code pre { font-size: 13px; padding: 14px; } .code { border-radius: 12px; } }

/* ---------- tables ---------- */
.tablewrap { margin: 1.4em 0 1.8em; overflow-x: auto; border: 1px solid #000; border-radius: 14px; background: #fff; max-width: 100%; }
.tablewrap:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.prose thead th { background: var(--tint); border-bottom: 1px solid #000; font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
.prose tbody tr:last-child :is(th, td) { border-bottom: 0; }
.prose tbody tr:nth-child(even) > * { background: rgb(0 0 0 / .025); }
.prose :is(td, th):first-child { position: sticky; left: 0; z-index: 1; background: #fff; border-right: 1px solid var(--hair); font-weight: 600; }
.prose thead th:first-child { background: var(--tint); z-index: 2; }
.prose tbody tr:nth-child(even) > :first-child { background: #f7f7f7; }
.prose td code { white-space: nowrap; }
.prose td { min-width: 9em; }
.prose td:first-child, .prose th:first-child { min-width: 8em; }

/* ---------- blockquotes ---------- */
.prose blockquote { margin: 1.4em 0; border-left: 4px solid var(--hair); padding: 2px 0 2px 18px; color: var(--ink-2); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose blockquote.note { border-left-color: #000; color: #000; }

/* ---------- figures ---------- */
.prose figure.shot { margin: 1.6em 0 2em; }
.shot .frame { border: 1px solid #000; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.shot img { display: block; width: 100%; height: auto; }

/* ---------- blog ---------- */
.crumbs { font-size: 14px; margin: 0 0 18px !important; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: #000; background: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--ink-2); margin: 0 0 10px !important; }
.chip { display: inline-block; border: 1px solid #000; border-radius: 980px; padding: 1px 10px; font-size: 12px; font-weight: 600; color: #000; background: var(--tint); line-height: 1.6; }
.post-head h1 { margin-bottom: 12px; }
.post-summary { font-size: 19px; line-height: 1.45; color: var(--ink-2); margin: 0 0 26px !important; }
.post-head { border-bottom: 1px solid #000; margin-bottom: 8px; }
.post.prose h2 { border-top: 0; padding-top: 0; }
.post-items { margin-top: 8px; }
.post-item { border-top: 1px solid #000; padding: 22px 0 6px; }
.post-item > * { margin: 0 0 1.1em; }
.prose .post-item h2 { border: 0; padding: 0; margin: 0 0 8px; font-size: 26px; }
.post-item h2 a { text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; background: var(--accent); }
.post-item p { color: var(--ink-2); }
.more { font-weight: 600; }

@media (max-width: 600px) { .prose { font-size: 16px; padding-top: 32px; } .prose h2 { font-size: 24px; } .hero .prose { padding-top: 44px; padding-bottom: 40px; } }
@media print { .nav, .foot, .code .copy { display: none !important; } .code, .shot .frame { box-shadow: none; } }
