/* verifiedanalytics.dev. Tokens and the post typography follow brief/04_post1_refine_prompt.md. */
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-latin.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(fonts/newsreader-italic-latin.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/publicsans-latin.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 96%; ascent-override: 92%; descent-override: 26%; }

:root {
  --paper: #F5F7F6; --ink: #1C2228; --muted: #55606A; --rule: #D6DCDA; --accent: #2B4FCF; --on-accent: #FFFFFF;
  --yes: #256B41; --plan: #EBEFF7; --build: #ECF3EE; --code: #EBEEEC; --warn-bg: #FFF4CC; --warn-ink: #4A3B00; --err: #A8261B;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14181C; --ink: #E4E8EB; --muted: #9AA4AD; --rule: #2C343A; --accent: #9DB2FF; --on-accent: #10141A;
    --yes: #72C595; --plan: #1A2030; --build: #172720; --code: #1D2328; --warn-bg: #3F3408; --warn-ink: #F6E7A6; --err: #FF9C91;
  }
}
:root[data-theme="dark"] {
  --paper: #14181C; --ink: #E4E8EB; --muted: #9AA4AD; --rule: #2C343A; --accent: #9DB2FF; --on-accent: #10141A;
  --yes: #72C595; --plan: #1A2030; --build: #172720; --code: #1D2328; --warn-bg: #3F3408; --warn-ink: #F6E7A6; --err: #FF9C91;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-optical-sizing: auto; font-size: 19px; line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, pre:focus-visible, .table-wrap:focus-visible, input:focus-visible, textarea:focus-visible, .chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
strong, b { font-weight: 600; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); text-wrap: balance; }
h1 { font-size: 44px; line-height: 1.15; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 16px; }
h2 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 2.2em 0 0.6em; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 600; margin: 1.6em 0 0.5em; }
ol, ul { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.45em; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 10; font-family: var(--sans); font-size: 15px; }
.skip:focus { left: 8px; top: 8px; }
.sans { font-family: var(--sans); }
.muted { color: var(--muted); }

/* shell */
.wrap { max-width: 1128px; margin: 0 auto; padding: 0 24px; width: 100%; }
.site-head { font-family: var(--sans); font-size: 15px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; word-spacing: -0.2em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 1px; vertical-align: 0.22em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.site-foot { font-family: var(--sans); font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); margin-top: 72px; padding-top: 18px; padding-bottom: 24px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 2px 22px; }
.site-foot li { margin: 0; }
.site-foot a { color: var(--muted); padding: 4px 0; display: inline-block; text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-low { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 22px; margin-top: 4px; }
.site-foot p { margin: 0; padding: 4px 0; }
.one-screen-page .site-foot { margin-top: 28px; padding-top: 12px; padding-bottom: 14px; }
.draft-banner { font-family: var(--sans); font-size: 15px; background: var(--warn-bg); color: var(--warn-ink); padding: 8px 24px; text-align: center; }

/* buttons */
.btn { display: inline-block; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.2; background: var(--accent); color: var(--on-accent); text-decoration: none; padding: 12px 20px; border-radius: 6px; border: 0; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-sm { font-size: 15px; padding: 9px 14px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; font-family: var(--sans); font-size: 16px; }

/* home */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 48px; }
.home h1 { font-size: 48px; margin-bottom: 18px; }
.home-sub { font-size: 22px; line-height: 1.4; font-weight: 600; margin: -0.25em 0 0.9em; color: var(--muted); }
.home-lede { font-size: 20px; line-height: 1.55; max-width: 34em; margin: 0; }
.home .cta-row { margin-top: 24px; }
.home-links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.home-links li { margin: 0; padding: 9px 0 9px; border-bottom: 1px solid var(--rule); }
.home-links a { font-family: var(--sans); font-weight: 600; font-size: 16px; line-height: 1.4; text-decoration: none; display: block; }
.home-links a:hover { text-decoration: underline; }
.home-links span { display: block; font-size: 16.5px; line-height: 1.4; color: var(--muted); }
@media (min-width: 940px) {
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 40px; }
}

/* generic page */
.page { max-width: calc(54ch + 48px); margin: 0 auto; padding: 56px 24px 0; }
.page-wide { max-width: 908px; }
.page-wide > * { max-width: 54ch; }
.page-wide > .flow { max-width: none; }
.dek { font-size: 21px; line-height: 1.45; color: var(--muted); margin: 0 0 18px; }
.page.one-screen { max-width: 908px; padding-top: 36px; }
.one-screen h1 { font-size: 40px; margin-bottom: 12px; }
.one-screen .dek { margin-bottom: 20px; }
.vh + .dek { color: var(--ink); }   /* VA-07/08: /book/'s intro is the first visible line under its visually hidden h1, in body-text colour */
.one-screen .plain-list { max-width: 54ch; }
.one-screen .plain-list li { padding: 7px 0; }
.one-screen .cta-row { margin-top: 22px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1em; border-top: 1px solid var(--rule); }
.plain-list li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv { list-style: none; padding: 0; margin: 0 0 1em; }
.kv li { margin: 0 0 0.7em; }

/* analytics flow diagram */
.flow { margin: 2em 0; font-family: var(--sans); }
.flow ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 26px; }
.flow li { position: relative; margin: 0; background: var(--plan); border-radius: 8px; padding: 14px 16px; font-size: 15px; line-height: 1.4; }
.flow li:nth-child(n+3) { background: var(--build); }
.flow li b { display: block; font-size: 16px; }
.flow li span { color: var(--muted); }
.flow li + li::before { content: ""; position: absolute; left: 50%; top: -18px; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateX(-50%) rotate(45deg); }
.flow figcaption, .gates figcaption { font-size: 14.5px; color: var(--muted); margin-top: 12px; font-family: var(--sans); }
@media (min-width: 820px) {
  .flow ol { grid-template-columns: repeat(5, 1fr); gap: 28px; }
  .flow li + li::before { left: -18px; top: 50%; transform: translateY(-50%) rotate(-45deg); }
}

/* blog index */
.chips { list-style: none; padding: 0; margin: 20px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: 15px; }
.chips li { margin: 0; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--muted); }
.chips a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.post-list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--rule); }
.post-list li { margin: 0; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.post-list h2 { font-size: 24px; margin: 4px 0 6px; font-weight: 600; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.post-list p.meta { font-size: 15px; }
.meta { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.meta a { color: var(--accent); }
.cat-note { color: var(--muted); margin: 0 0 4px; }
.feed-link { font-family: var(--sans); font-size: 15px; margin-top: 20px; }

/* rail layout */
.with-rail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; max-width: 1128px; margin: 0 auto; padding: 56px 24px 0; }
.with-rail > .main-col { min-width: 0; max-width: 54ch; width: 100%; margin: 0 auto; }
.rail { font-family: var(--sans); font-size: 15px; line-height: 1.5; max-width: 54ch; width: 100%; margin: 0 auto; border-top: 1px solid var(--rule); padding-top: 28px; }
.rail-card { padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--rule); }
.rail-card p { margin: 0 0 10px; }
.rail-card p:last-child { margin: 0; }
.rail-quiet { font-size: 14px; }
.rail-quiet a { color: var(--muted); }
@media (min-width: 1040px) {
  .with-rail { grid-template-columns: minmax(0, 54ch) 248px; justify-content: center; column-gap: 88px; }
  .with-rail .prose pre, .with-rail .prose .table-wrap { margin-right: -64px; }
  .with-rail > .main-col { margin: 0; }
  .rail { border-top: 0; padding-top: 6px; margin: 0; position: sticky; top: 24px; align-self: start; }
}

/* post */
.cat { font-family: var(--sans); font-size: 15px; color: var(--accent); text-decoration: none; }
.cat:hover { text-decoration: underline; }
.post h1 { margin: 14px 0 16px; }
.byline { font-family: var(--sans); font-size: 15px; color: var(--muted); margin: 0 0 36px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.lead { background: var(--plan); border-left: 3px solid var(--accent); padding: 18px 22px; border-radius: 0 6px 6px 0; margin: 0 0 8px; }
.lead p { margin: 0 0 12px; }
.lead p:last-child { margin: 0; }
.prose code { font-family: var(--mono); font-size: 15px; background: var(--code); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--code); border-radius: 6px; padding: 16px 18px; overflow-x: auto; margin: 2em 0; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: 15px; white-space: pre; }
.table-wrap { overflow-x: auto; margin: 2em 0; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 15px; line-height: 1.45; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }

/* gates diagram */
.gates { margin: 2em 0; font-family: var(--sans); }
.band { border-radius: 8px; padding: 18px 20px 6px; }
.band-plan { background: var(--plan); }
.band-build { background: var(--build); margin-top: 10px; }
.band-title { font-weight: 600; font-size: 16px; margin: 0 0 14px; }
.band-title span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.gates ol { list-style: none; padding: 0; margin: 0; position: relative; }
.gates ol::before { content: ""; position: absolute; left: 23px; top: 8px; bottom: 22px; width: 2px; background: var(--rule); }
.gates li { position: relative; display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; padding: 0 0 16px; margin: 0; font-size: 15px; line-height: 1.45; }
.gates li b { grid-row: span 3; align-self: start; width: 48px; height: 30px; display: grid; place-items: center; border-radius: 15px; background: var(--paper); border: 2px solid var(--rule); font-size: 14px; font-weight: 600; position: relative; z-index: 1; }
.gates .g-name { font-weight: 600; font-size: 16px; }
.gates .g-note { color: var(--muted); }
.gates li.yes b { border-color: var(--yes); color: var(--yes); }
.stamp { justify-self: start; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--yes); border: 1.5px solid var(--yes); border-radius: 4px; padding: 2px 8px; transform: rotate(-1.2deg); }
.loop { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--muted); border-top: 1px dashed var(--rule); padding: 12px 0 10px; margin: 2px 0 0; }
.loop svg { flex: none; color: var(--accent); margin-top: 1px; }

/* post end */
.post-end { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }
.post-end > p { font-size: 17px; }
.post-end > .author-box { font-size: 15px; }
.capture { font-family: var(--sans); font-size: 15px; margin: 0 0 28px; }
.capture-title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 0 10px; }
.capture-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.capture-row .field { flex: 1 1 240px; margin: 0; }
.author-box { color: var(--muted); font-size: 15px; font-family: var(--sans); margin-top: 20px; }

/* forms */
.form { font-family: var(--sans); font-size: 16px; margin-top: 28px; }
.field { margin: 0 0 22px; }
.field label, .field legend { display: block; font-weight: 600; margin: 0 0 2px; padding: 0; }
.hint { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; margin: 0 0 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--muted); border-radius: 6px; padding: 11px 12px; min-height: 48px; }
.field textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.chip-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 6px 0 14px; }
#times { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: block; text-align: center; padding: 9px 12px; border: 1.5px solid var(--muted); border-radius: 6px; font-size: 15px; line-height: 1.3; }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sub-legend { font-size: 15px; color: var(--muted); margin: 0; }
.err { color: var(--err); font-size: 15px; margin: 6px 0 0; }
.err-summary { color: var(--err); font-weight: 600; margin: 0 0 14px; }
.consent { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 14px 0 0; }
.done-box { background: var(--build); border-left: 3px solid var(--yes); border-radius: 0 6px 6px 0; padding: 18px 22px; font-family: var(--serif); font-size: 19px; }
.done-box p:last-child { margin: 0; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .site-head { padding-top: 16px; }
  .site-head { font-size: 14.5px; }
  .site-nav { gap: 2px 13px; }
  h1, .one-screen h1 { font-size: 32px; }
  .home h1 { font-size: 36px; }
  .home { padding-top: 28px; gap: 28px; }
  .home-lede { font-size: 18px; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }
  .dek { font-size: 19px; }
  .page, .with-rail { padding: 36px 16px 0; }
  .prose code, .prose pre code { font-size: 14px; }
  .band { padding: 16px 14px 4px; }
  .lead { padding: 16px; }
  .site-foot { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-nav, .rail, .capture, .site-foot ul { display: none; } body { background: #fff; color: #000; } }

/* ---- enhancement tickets E2 and E3 (19 Nov 2026) ---- */
/* E2: the first line of a post's end section leads to the blog and its feed */
.post-end > .follow { font-family: var(--sans); font-size: 16px; }
.byline a { color: inherit; }
/* E3: an edge shadow on code blocks and tables, only on a side that has more to scroll to */
:root { --shade: rgba(28, 34, 40, .22); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shade: rgba(0, 0, 0, .6); } }
:root[data-theme="dark"] { --shade: rgba(0, 0, 0, .6); }
.prose pre { background: linear-gradient(to right, var(--code) 40%, transparent) left / 44px 100% no-repeat local, linear-gradient(to left, var(--code) 40%, transparent) right / 44px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, var(--shade), transparent) left / 14px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--shade), transparent) right / 14px 100% no-repeat scroll, var(--code); }
.table-wrap { background: linear-gradient(to right, var(--paper) 40%, transparent) left / 44px 100% no-repeat local, linear-gradient(to left, var(--paper) 40%, transparent) right / 44px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, var(--shade), transparent) left / 14px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, var(--shade), transparent) right / 14px 100% no-repeat scroll; }
/* E3: the Copy button sits in the gap above its block, so it never covers code */
.codewrap { position: relative; margin: 2em 0; }
.codewrap > pre { margin: 0; }
.copy { position: absolute; right: 0; top: -30px; min-height: 26px; padding: 0 10px; font: 600 13px/1 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--muted); border-radius: 5px; cursor: pointer; }
.copy:hover { border-color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* E3: headings of a post link to themselves and keep their look */
.prose a.toclink { color: inherit; text-decoration: none; }
.prose a.toclink:hover { text-decoration: underline; text-decoration-thickness: 1px; }
@media (min-width: 1040px) { .with-rail .prose .codewrap { margin-right: -64px; } .with-rail .prose .codewrap > pre { margin-right: 0; } }
@media print { .prose pre, .prose pre code { white-space: pre-wrap; overflow-wrap: anywhere; } .prose pre, .table-wrap { overflow: visible; background: none; } .copy { display: none; } }
