/* Ritwik Finance Tech Blog: one stylesheet, no scripts, no third-party requests.
   Reading layout after long-form tech blogs: a serif body in a 680px column, bold sans titles, wide numbered figures.
   Diagrams are inline SVG coloured and animated from here; animations stop when the reader asks for reduced motion. */

@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-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: 100 900; font-display: swap; src: url(/fonts/inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-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: Manrope; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f7f7f9;
  --ink: #16182a;
  --text: #242424;
  --muted: #6b6b76;
  --line: #e8e8ee;
  --brand: #3e4775;
  --brand-dark: #2a3058;
  --brand-soft: #eef0f7;
  --brand-line: #cdd2e6;
  --gold: #c9a449;
  --gold-dark: #7d6320;
  --gold-soft: #fbf6e8;
  --gold-line: #ead9a6;
  --ok: #1f8a5b;
  --ok-soft: #e7f5ee;
  --bad: #c2413b;
  --bad-soft: #fdecea;
  --road: #2f6fde;
  --straight: #8e97ab;
  --font-ui: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: Manrope, Inter, "Segoe UI", system-ui, sans-serif;
  --font-read: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --col: 42.5rem;
  --wide: 55rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 1rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(62, 71, 117, 0.45); text-underline-offset: 3px; }
a:hover { color: var(--brand); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; text-wrap: balance; margin: 0; }
strong { color: var(--ink); font-weight: 700; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--bg); color: var(--brand); padding: 0.5rem 0.75rem; border-radius: 6px; z-index: 10; }
.skip:focus { top: 0.75rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .bar { max-width: 72rem; margin: 0 auto; padding: 0.7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); }
.brand img { display: block; height: 2.4rem; width: auto; }
.brand span { font-family: var(--font-head); font-weight: 800; font-size: 0.95rem; border-left: 1px solid var(--line); padding-left: 0.75rem; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 1.1rem; font-size: 0.875rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }

main { padding: 0 1rem 4rem; }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.site-footer .bar { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 2.25rem; font-size: 0.85rem; color: var(--muted); display: grid; gap: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer p { margin: 0; }

/* Shared bits */
.chips { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li { font-size: 0.8rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; }
.avatar {
  flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #ffffff;
  font-family: var(--font-head); font-weight: 800; width: 2.6rem; height: 2.6rem; font-size: 0.9rem; border: 2px solid var(--gold);
}
.avatar.lg { width: 4.25rem; height: 4.25rem; font-size: 1.35rem; border-width: 3px; }
.draft-tag { display: inline-block; font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700; vertical-align: middle; background: var(--gold-soft); color: var(--gold-dark); border: 1px solid var(--gold-line); border-radius: 999px; padding: 0.1rem 0.55rem; }

/* Home page: masthead and the list of posts */
.masthead { max-width: var(--wide); margin: 0 auto; padding: 2.75rem 0 2rem; border-bottom: 1px solid var(--line); display: flex; gap: 1.1rem; align-items: center; }
/* The circle is a frame around the mark, not a clip on it: the image itself is never rounded, so no part of it is cut. */
.masthead-mark { flex: none; width: 4.75rem; height: 4.75rem; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; }
.masthead-mark img { display: block; width: 66%; height: auto; }
.masthead-text { min-width: 0; overflow-wrap: break-word; }
.masthead h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.masthead p { margin: 0.35rem 0 0; color: var(--muted); font-size: 1rem; }

.post-list { list-style: none; padding: 0; margin: 0 auto; max-width: var(--wide); }
.post-list > li { border-bottom: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; text-decoration: none; color: inherit; }
.post-row:hover .title { color: var(--brand); }
.post-row .title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.015em; transition: color 0.15s; }
.post-row .desc { display: block; margin-top: 0.45rem; color: var(--muted); font-family: var(--font-read); font-size: 1.05rem; line-height: 1.5; }
.post-row .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin-top: 0.85rem; font-size: 0.85rem; color: var(--muted); }
.post-row .meta strong { color: var(--ink); font-weight: 600; }
.post-row .avatar { width: 1.6rem; height: 1.6rem; font-size: 0.6rem; border-width: 1.5px; }
.post-row .kicker { display: block; margin-bottom: 0.4rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dark); }
.post-row .thumb { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--brand-dark); }

/* A post */
.post-head { max-width: var(--col); margin: 0 auto; padding: 2.75rem 0 0; }
.post-head h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.dek { margin: 0.9rem 0 0; font-family: var(--font-read); font-size: 1.25rem; line-height: 1.45; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 0.75rem; margin: 1.75rem 0 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline-name { display: block; font-weight: 600; color: var(--ink); text-decoration: none; }
.byline-meta { display: block; font-size: 0.875rem; color: var(--muted); }
.draft-note { margin: 0 0 1.25rem; padding: 0.6rem 0.9rem; border: 1px solid var(--gold-line); border-radius: 10px; background: var(--gold-soft); color: var(--gold-dark); font-size: 0.875rem; font-weight: 600; }

.prose { max-width: var(--col); margin: 2.25rem auto 0; font-family: var(--font-read); font-size: 1.15rem; line-height: 1.68; color: var(--text); letter-spacing: -0.003em; }
.prose > * { margin: 0 0 1.35rem; }
.prose h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; margin: 3rem 0 0.9rem; scroll-margin-top: 1rem; }
.prose h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin: 2.1rem 0 0.6rem; }
.prose .part { display: block; font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.35rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: 0.45rem 0 0; padding-left: 0.2rem; }
.prose li::marker { color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.82em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.35em; }
.prose pre { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.6; background: #14172a; color: #e6e8f2; border-radius: 12px; padding: 1.1rem 1.25rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prose blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 3px solid var(--ink); font-style: italic; }

/* "In short" box */
.summary { padding: 1.25rem 1.4rem; background: var(--brand-soft); border-radius: 14px; font-family: var(--font-ui); font-size: 1rem; line-height: 1.6; }
.summary h2 { margin: 0 0 0.6rem; font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.summary ul { margin: 0; }
.summary li { color: var(--ink); }

/* A principle, set apart like a pull quote */
.callout { margin: 2.25rem 0; padding: 0.25rem 0 0.25rem 1.4rem; border-left: 4px solid var(--gold); font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }

/* A rule or formula */
.formula { padding: 1rem 1.25rem; text-align: center; border: 1px dashed var(--brand-line); border-radius: 12px; background: var(--bg); font-family: var(--font-mono); font-size: 0.95rem; line-height: 1.6; color: var(--brand-dark); }

/* Numbered figures; the build writes "Figure N." into each caption */
.fig { margin: 2.5rem 0; }
.fig.wide { max-width: var(--wide); }
.fig-canvas { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow-x: auto; }
.fig-canvas svg { display: block; width: 100%; min-width: 34rem; height: auto; }
.fig-canvas.tall svg { min-width: 0; }
.fig figcaption { margin: 0.8rem auto 0; max-width: var(--col); font-family: var(--font-ui); font-size: 0.875rem; line-height: 1.55; color: var(--muted); text-align: center; }
.fig-num { font-weight: 700; color: var(--ink); }
.legend { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; justify-content: center; font-family: var(--font-ui); font-size: 0.82rem; color: var(--text); }
.legend li { margin: 0; padding: 0; }
.sw { display: inline-block; width: 1.75rem; margin-right: 0.45rem; vertical-align: middle; border-top: 4px solid var(--brand); }
.sw-road { border-top: 4px dashed var(--road); }
.sw-straight { border-top: 3px dashed var(--straight); }
.sw-ok { border-top-color: var(--ok); }
.sw-bad { border-top-color: var(--bad); }
.sw-gold { border-top-color: var(--gold); }

/* Stages: the checks at each step of a process */
.stages { list-style: none; padding: 0 !important; display: grid; gap: 0.75rem; counter-reset: stage; font-family: var(--font-ui); }
.stages > li { margin: 0; padding: 1rem 1.1rem 1rem 3.4rem; position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); counter-increment: stage; }
.stages > li::before { content: counter(stage); position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand); color: #ffffff; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; display: grid; place-items: center; }
.stages h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.stages p { margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; font-family: var(--font-ui); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; }
th, td { padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--panel); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
tbody tr:last-child > * { border-bottom: 0; }

/* Closing line of a post: when it was published and by whom */
.post-end { max-width: var(--col); margin: 3rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.post-end strong { color: var(--ink); font-weight: 600; }

/* Author card and more posts */
.author { max-width: var(--col); margin: 1.5rem auto 0; padding: 1.5rem 1.4rem; border-radius: 16px; background: var(--panel); }
.author-label { margin: 0 0 1rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.author-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.author-name { font-size: 1.35rem; }
.author-role { margin: 0.15rem 0 0; font-size: 0.95rem; font-weight: 600; color: var(--brand); }
.author-dept { margin: 0.1rem 0 0; font-size: 0.875rem; color: var(--muted); }
.author-bio { margin: 0 0 0.5rem; color: var(--ink); }
.author-work { margin: 0; padding-left: 1.25rem; }
.author-work li { margin-top: 0.3rem; }
.author-links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-weight: 600; }

.more { max-width: var(--wide); margin: 4rem auto 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.more h2 { font-size: 1.15rem; margin-bottom: 0.25rem; }

.home-empty { max-width: var(--wide); margin: 2rem auto; color: var(--muted); }

/* Diagram parts (inline SVG) */
.d-box { fill: #ffffff; stroke: var(--brand-line); stroke-width: 2; }
.d-box-brand { fill: var(--brand); stroke: none; }
.d-box-soft { fill: var(--brand-soft); stroke: var(--brand-line); stroke-width: 2; }
.d-box-gold { fill: var(--gold-soft); stroke: var(--gold-line); stroke-width: 2; }
.d-box-ok { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 2; }
.d-box-bad { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 2; }
.d-t { font-family: var(--font-ui); font-size: 15px; fill: var(--text); }
.d-t-s { font-family: var(--font-ui); font-size: 13px; fill: var(--muted); }
.d-t-b { font-family: var(--font-head); font-size: 16px; font-weight: 800; fill: var(--ink); }
.d-t-w { font-family: var(--font-head); font-size: 16px; font-weight: 800; fill: #ffffff; }
.d-t-mono { font-family: var(--font-mono); font-size: 13px; fill: var(--brand-dark); }
.d-t-ok { fill: var(--ok); }
.d-t-bad { fill: var(--bad); }
.d-arrow { fill: none; stroke: var(--muted); stroke-width: 2; }
.d-arrow-head { fill: var(--muted); }
.d-line { fill: none; stroke: var(--line); stroke-width: 2; }
.d-house { fill: #ffffff; stroke: var(--brand-line); stroke-width: 2; }
.d-track { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.d-road { fill: none; stroke: var(--road); stroke-width: 5; stroke-dasharray: 12 9; stroke-linecap: round; stroke-linejoin: round; }
.d-straight { fill: none; stroke: var(--straight); stroke-width: 3; stroke-dasharray: 7 7; }
.d-point { fill: #ffffff; stroke: var(--ink); stroke-width: 4; }
.d-label { font-family: var(--font-head); font-size: 26px; font-weight: 800; fill: var(--ink); }
.d-dot { fill: var(--brand); }
.d-dot-gold { fill: var(--gold); }
.d-dot-bad { fill: var(--bad); }
.d-ring { fill: var(--brand-soft); stroke: var(--brand-line); stroke-width: 2; stroke-dasharray: 6 6; }

/* ---- Animations. Each figure states its still frame in the base rules, so reduced motion still reads. ---- */
.d-flow { stroke-dasharray: 6 7; animation: d-flow 1.2s linear infinite; }
@keyframes d-flow { to { stroke-dashoffset: -13; } }

/* Store and forward: points wait in the spool while offline, then leave as one batch */
.sp-off { stroke: var(--bad); stroke-width: 3; stroke-dasharray: 8 7; animation: sp-off 12s infinite; }
.sp-on { stroke: var(--ok); stroke-width: 4; opacity: 0; animation: sp-on 12s infinite; }
.sp-off-t { fill: var(--bad); animation: sp-off 12s infinite; }
.sp-on-t { fill: var(--ok); opacity: 0; animation: sp-on 12s infinite; }
@keyframes sp-off { 0%, 50% { opacity: 1; } 54%, 94% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes sp-on { 0%, 50% { opacity: 0; } 54%, 94% { opacity: 1; } 98%, 100% { opacity: 0; } }
.sp-d { fill: var(--brand); }
.sp-d1 { animation: sp-d1 12s infinite; } .sp-d2 { animation: sp-d2 12s infinite; } .sp-d3 { animation: sp-d3 12s infinite; }
.sp-d4 { animation: sp-d4 12s infinite; } .sp-d5 { animation: sp-d5 12s infinite; } .sp-d6 { animation: sp-d6 12s infinite; }
@keyframes sp-d1 { 0%, 4% { opacity: 0; transform: translateY(-46px); } 8%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
@keyframes sp-d2 { 0%, 12% { opacity: 0; transform: translateY(-46px); } 16%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
@keyframes sp-d3 { 0%, 20% { opacity: 0; transform: translateY(-46px); } 24%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
@keyframes sp-d4 { 0%, 28% { opacity: 0; transform: translateY(-46px); } 32%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
@keyframes sp-d5 { 0%, 36% { opacity: 0; transform: translateY(-46px); } 40%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
@keyframes sp-d6 { 0%, 44% { opacity: 0; transform: translateY(-46px); } 48%, 58% { opacity: 1; transform: none; } 62%, 100% { opacity: 0; transform: translateX(30px); } }
.sp-ping { fill: none; stroke: var(--gold); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: sp-ping 2s ease-out infinite; }
@keyframes sp-ping { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }
.sp-packet { opacity: 0; animation: sp-packet 12s infinite; }
@keyframes sp-packet { 0%, 57% { opacity: 0; transform: none; } 60% { opacity: 1; transform: none; } 72% { opacity: 1; transform: translateX(212px); } 75%, 100% { opacity: 0; transform: translateX(212px); } }
.sp-saved { opacity: 0; animation: sp-saved 12s infinite; }
@keyframes sp-saved { 0%, 74% { opacity: 0; } 78%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* A dot that travels a path (offset-path is set per figure below) */
.d-runner { fill: var(--gold); stroke: #ffffff; stroke-width: 3; offset-rotate: 0deg; animation: d-run 5s ease-in-out infinite; }
@keyframes d-run { 0% { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 85% { offset-distance: 100%; opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.gap-runner { offset-path: path("M150 200 L150 262 Q150 270 158 270 L442 270 Q450 270 450 262 L450 110"); }

/* Bridge messages between the web app and the phone */
.br-down { animation: br-down 3.2s ease-in-out infinite; }
.br-up { animation: br-up 3.2s ease-in-out infinite 1.6s; opacity: 0; }
@keyframes br-down { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 70% { opacity: 1; transform: translateY(60px); } 85%, 100% { opacity: 0; transform: translateY(60px); } }
@keyframes br-up { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 70% { opacity: 1; transform: translateY(-60px); } 85%, 100% { opacity: 0; transform: translateY(-60px); } }

/* Aadhaar: the full number never gets past the check */
.aa-full { animation: aa-full 6s infinite; }
.aa-masked { opacity: 0; animation: aa-masked 6s infinite; }
@keyframes aa-full { 0% { opacity: 0; transform: none; } 10%, 30% { opacity: 1; transform: translateX(0); } 52% { opacity: 1; transform: translateX(370px); } 60%, 100% { opacity: 0; transform: translateX(370px); } }
@keyframes aa-masked { 0%, 58% { opacity: 0; } 66%, 92% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .d-flow, .sp-off, .sp-on, .sp-off-t, .sp-on-t, .sp-d1, .sp-d2, .sp-d3, .sp-d4, .sp-d5, .sp-d6, .sp-ping, .sp-packet, .sp-saved,
  .d-runner, .br-down, .br-up, .aa-full, .aa-masked { animation: none; }
  .d-runner { display: none; }
  .aa-masked { opacity: 1; }
}

@media (min-width: 46rem) {
  main { padding: 0 1.5rem 5rem; }
  .masthead { padding: 3.5rem 0 2.25rem; }
  .masthead h1 { font-size: 2.25rem; }
  .post-row { grid-template-columns: 1fr 13rem; gap: 2rem; align-items: center; padding: 2rem 0; }
  .post-row .title { font-size: 1.55rem; }
  .post-head { padding-top: 3.75rem; }
  .post-head h1 { font-size: 2.85rem; }
  .prose { font-size: 1.25rem; }
  .fig-canvas { padding: 1.5rem 1.75rem; }
  .fig-canvas svg { min-width: 0; }
  .stages { grid-template-columns: repeat(3, 1fr); }
  .stages > li { padding: 3.25rem 1.1rem 1.1rem; }
}
@media (min-width: 60rem) { .fig.wide { width: var(--wide); margin-left: calc((var(--col) - var(--wide)) / 2); } }
@media (max-width: 46rem) { .fig.wide { max-width: none; } }

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { font-size: 10.5pt; }
  .skip, .site-nav, .site-footer ul, .more { display: none; }
  .site-header, .site-footer { border: 0; background: none; }
  .prose { font-size: 11pt; }
  .summary, .callout, .author, figure, .stages > li { break-inside: avoid; }
  .fig.wide { width: auto; margin-left: 0; }
  h2, h3 { break-after: avoid; }
  * { animation: none !important; }
}
