/* =====================================================================
   stackhidden.com - stylesheet
   ---------------------------------------------------------------------
   THEME SYSTEM
     Every colour on the page comes from a custom property. Dark values
     live under :root[data-theme="dark"], light values under
     :root[data-theme="light"]. Components never hard-code a colour, so
     the toggle in app.js only flips one attribute on <html> and the
     whole page, including the canvas palette (app.js reads the same
     theme), follows. When you add a component, use the variables:
     --bg/--bg2 page background, --panel translucent surfaces,
     --card solid surfaces, --text/--muted copy, --accent/--accent2
     interactive colour, --border hairlines, --shadow elevation.
     color-scheme is set per theme so native controls and scrollbars
     match the page instead of fighting it.

   LAYOUT
     Single column, max-width 1020px, CSS grid only where it earns it
     (stats strip, publication cards). Behind the whole page is the fixed
     lineage-graph canvas (z-index -1). Since Nov 8, 2026 the top of the
     page also has its own background: a looping lineage-network video
     behind the hero (#heroBg below). Neither is a photograph; see the
     photo rule in index.html.

   MOTION
     Transitions are colour/background only, 0.35s, and
     prefers-reduced-motion turns smooth scrolling off here while
     app.js stops the canvas animation entirely.
   ===================================================================== */
:root, :root[data-theme="dark"]{
  --bg:#0d1017; --bg2:#11151f; --panel:rgba(23,27,38,.82); --card:#171b26;
  --text:#eef0f4; --muted:#a3aabd; --accent:#6ea8fe; --accent2:#8b7cf6;
  --border:#272d3d; --shadow:0 12px 32px rgba(0,0,0,.35); color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#f4f6fa; --bg2:#e9edf4; --panel:rgba(255,255,255,.85); --card:#ffffff;
  --text:#171a21; --muted:#5a6272; --accent:#1f5fd0; --accent2:#6a53d6;
  --border:#d8dde8; --shadow:0 12px 28px rgba(30,41,82,.10); color-scheme:light;
}
*{box-sizing:border-box}
/* Anchor jumps and scrollIntoView stop just below the sticky header, not
   under it. app.js keeps --header-h equal to the header's real height;
   72px (90px on phones) is the fallback without JavaScript. */
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--header-h,72px) + 12px)}
@media (max-width:640px){html{--header-h:90px}}
html,body{overflow-x:clip}
/* Skip link: off screen until a keyboard user tabs to it, then pinned
   over the header's top-left corner. main takes focus from it (and from
   the brand link) without drawing a ring around the whole page. */
.skip-link{position:absolute;left:12px;top:-80px;z-index:100;padding:10px 16px;border:2px solid var(--accent);border-radius:10px;background:var(--card);color:var(--text);font-weight:650;text-decoration:none;box-shadow:var(--shadow)}
.skip-link:focus{top:12px;outline:none}
.skip-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
main:focus{outline:none}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:linear-gradient(160deg,var(--bg),var(--bg2));color:var(--text);line-height:1.65;min-height:100vh;transition:background .35s ease,color .35s ease}
#graph{position:fixed;inset:0;width:100%;height:100%;z-index:-1;opacity:.55}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.site-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 26px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--panel);backdrop-filter:blur(10px);z-index:10}
.brand{font-weight:800;color:var(--text);letter-spacing:.02em;font-size:1.05rem}
.brand span{color:var(--accent)}
nav{display:flex;align-items:center;flex-wrap:wrap}
nav a{color:var(--muted);margin-left:16px;font-size:.95rem}
#theme-toggle{margin-left:18px;width:38px;height:38px;border-radius:999px;border:1px solid var(--border);background:var(--card);color:var(--text);cursor:pointer;font-size:1rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;box-shadow:var(--shadow)}
#theme-toggle:hover{border-color:var(--accent)}
:root[data-theme="dark"] .icon-sun{display:inline}
:root[data-theme="dark"] .icon-moon{display:none}
:root[data-theme="light"] .icon-sun{display:none}
:root[data-theme="light"] .icon-moon{display:inline}
main{max-width:1280px;margin:0 auto;padding:34px 28px 60px}
section{margin:52px 0}
h1{font-size:2.6rem;line-height:1.12;margin:.15em 0}
h2{font-size:1.55rem;margin:.2em 0 .7em}
/* Section counts (Nov 20, 2026): a small number beside the heading
   for the two counted sections — Published Writing and Featured In.
   The number is content, not computed: update it in the heading when
   an article or a quote is added. */
.section-count{font-size:.82rem;font-weight:650;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:1px 9px;margin-left:10px;vertical-align:.18em;white-space:nowrap}
h3{margin:.3em 0 .5em;line-height:1.35}
.panel,.card,.quote-card{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:24px;box-shadow:var(--shadow);backdrop-filter:blur(6px)}
.hero{position:relative;display:grid;grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr);gap:38px;align-items:start;margin-top:8px}
.points{padding-left:20px;margin:10px 0}
.points li{margin:8px 0}
/* Corner friend (Nov 8, 2026): the owner's drawing, cut out of its golden
   backdrop (scripts/cut-corner-friend.py) so he sits on the page itself,
   with no frame, ring or disc. Behind him a soft glow in the page's own
   accent, like the cursor glow, over a pool of the page's own background
   colour, invisible on bare page, so text scrolling past him fades out
   before it reaches him instead of running into his hair (at 1280px the
   text column ends under him); under him a shadow that follows his
   silhouette; his crown and shoulders, where the drawing's edge cuts
   them, fade into the page. Four nested layers so no two motions fight
   over one transform: .bot-head leans toward the pointer (app.js) and
   carries the glow, .bot-float breathes, .bot-hop hops when he laughs and
   casts the shadow, .bot-frame holds the drawing and the painted lids and
   does the fade. app.js sets .blink for 150ms every few seconds and .happy
   for 1.2s now and then, or when the pointer comes near. Every motion here
   is gated on motion being allowed, both ways (the OS setting and
   data-motion); under reduced motion he dims and shows "z z". */
:root,:root[data-theme="dark"]{--friend-glow:rgba(110,168,254,.26);--friend-pool:rgba(13,16,23,.95);--friend-shade:rgba(0,0,0,.35)}
:root[data-theme="light"]{--friend-glow:rgba(31,95,208,.14);--friend-pool:rgba(244,246,250,.95);--friend-shade:rgba(30,41,82,.14)}
#cursorBot{position:fixed;right:20px;bottom:16px;width:100px;z-index:30;pointer-events:none}
#cursorBot .bot-head{position:relative;width:100%;aspect-ratio:1;transform-origin:50% 90%}
#cursorBot .bot-head::before{content:"";position:absolute;inset:-18%;border-radius:50%;background:radial-gradient(circle at 50% 46%,var(--friend-glow),transparent 62%),radial-gradient(circle at 50% 52%,var(--friend-pool) 36%,transparent 70%)}
#cursorBot .bot-float,#cursorBot .bot-hop{position:relative;width:100%;height:100%;transform-origin:50% 90%}
#cursorBot .bot-hop{filter:drop-shadow(0 6px 10px var(--friend-shade))}
#cursorBot .bot-frame{position:relative;width:100%;height:100%;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 6%,#000 80%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 6%,#000 80%,transparent 100%);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
#cursorBot .bot-face,#cursorBot .bot-lids{position:absolute;inset:0;width:100%;height:100%;display:block}
#cursorBot .bot-face{transition:filter .4s ease}
#cursorBot .bot-blink,#cursorBot .bot-squint{opacity:0}
#cursorBot .bot-blink{transition:opacity 50ms linear}
#cursorBot .bot-squint{transition:opacity .14s ease}
#cursorBot.blink .bot-blink{opacity:1}
#cursorBot.happy .bot-squint{opacity:1}
#cursorBot .bot-spark{position:absolute;width:9px;height:9px;background:#ffd27a;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0}
#cursorBot .bot-spark-1{left:-4px;top:12%}
#cursorBot .bot-spark-2{right:-2px;top:2%;width:7px;height:7px}
#cursorBot .bot-spark-3{right:-6px;top:56%;width:6px;height:6px}
#cursorBot .bot-spark-4{left:2%;top:60%;width:6px;height:6px}
#cursorBot .bot-zz{position:absolute;right:-6px;top:-10px;font:800 15px/1 system-ui,sans-serif;letter-spacing:2px;color:var(--muted);display:none}
@keyframes bot-breathe{from{transform:translateY(0) scale(1)}to{transform:translateY(-2px) scale(1.012)}}
@keyframes bot-hop{0%{transform:none}28%{transform:translateY(-7px) rotate(-3deg)}52%{transform:translateY(0) rotate(0)}72%{transform:translateY(-3px) rotate(2deg)}100%{transform:none}}
@keyframes bot-twinkle{0%,100%{opacity:0;transform:scale(.4) rotate(0)}45%{opacity:1;transform:scale(1) rotate(45deg)}70%{opacity:.6;transform:scale(.8) rotate(70deg)}}
@media (prefers-reduced-motion: no-preference){
  :root:not([data-motion="reduced"]) #cursorBot .bot-float{animation:bot-breathe 3.4s ease-in-out infinite alternate}
  :root:not([data-motion="reduced"]) #cursorBot.happy .bot-hop{animation:bot-hop .8s ease-out}
  :root:not([data-motion="reduced"]) #cursorBot .bot-spark{animation:bot-twinkle 3.2s ease-in-out infinite}
  :root:not([data-motion="reduced"]) #cursorBot .bot-spark-2{animation-delay:.8s}
  :root:not([data-motion="reduced"]) #cursorBot .bot-spark-3{animation-delay:1.7s}
  :root:not([data-motion="reduced"]) #cursorBot .bot-spark-4{animation-delay:2.4s}
  :root:not([data-motion="reduced"]) #cursorBot.happy .bot-spark{animation-duration:.9s}
}
:root[data-motion="reduced"] #cursorBot .bot-face{filter:saturate(.55) brightness(.78)}
:root[data-motion="reduced"] #cursorBot .bot-zz{display:block}
@media (prefers-reduced-motion: reduce){#cursorBot .bot-face{filter:saturate(.55) brightness(.78);transition:none}#cursorBot .bot-zz{display:block}}
@media (max-width:640px){#cursorBot{width:76px;right:12px;bottom:10px}#cursorBot .bot-zz{font-size:12px}}
/* Hero background (Nov 8, 2026): the lineage network loop behind the top
   of the page, edge to edge and up under the translucent header. It is
   the hero's first child at z-index -1, and .hero is not a stacking
   context, so the layer sits in the page's own stack: above the fixed
   #graph canvas (earlier in the page), below every piece of content and
   the cursor glow. Its top reaches 24px past the top of the page (the
   hero starts 34px of main padding plus 8px of margin under the header).
   On desktop it covers the whole hero; at 920px and under, where the
   hero is one column and very tall, it is a band about one screen high.
   The bottom 260px fades into the page.
   Three layers, bottom to top: the still (::before), the video, and the
   tint (::after). The still is chosen here by theme and width, but only
   once app.js has set data-bg on <html>: loaded with the stylesheet, it
   shared a slow phone's bandwidth with app.js, which fills in the hero's
   clock line, and held back the first paint by about 170ms (slow 4G, 4x
   slower CPU, Nov 8, 2026). app.js adds .still once the file is in, and
   it fades in; without JavaScript a <noscript> style in index.html shows
   it at once. The video fades in over it once it plays, and its first
   frame is that still. The tint holds the text's contrast: strongest on
   the text side, lightest behind the side panel, even across on one
   column. The tints are tokens so they follow the theme like every other
   colour. */
:root[data-theme="dark"]{--scrim-a:rgba(13,16,23,.66);--scrim-b:rgba(13,16,23,.42);--scrim-c:rgba(13,16,23,.18);--scrim-n:rgba(13,16,23,.45)}
:root[data-theme="light"]{--scrim-a:rgba(244,246,250,.66);--scrim-b:rgba(244,246,250,.42);--scrim-c:rgba(244,246,250,.18);--scrim-n:rgba(244,246,250,.64)}
#heroBg{position:absolute;z-index:-1;left:calc(50% - 50vw);right:calc(50% - 50vw);top:calc(-1 * (var(--header-h,72px) + 66px));bottom:-160px;
  overflow:hidden;pointer-events:none;
  -webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 260px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 260px),transparent)}
#heroBg::before{content:"";position:absolute;inset:0;background:center/cover no-repeat;opacity:0;transition:opacity .6s ease}
:root[data-bg] #heroBg::before{background-image:url(assets/hero-network-dark.webp)}
:root[data-bg][data-theme="light"] #heroBg::before{background-image:url(assets/hero-network-light.webp)}
#heroBg.still::before{opacity:1}
#heroBg video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .4s ease}
#heroBg.playing video{opacity:1}
#heroBg::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--scrim-a) 0%,var(--scrim-b) 50%,var(--scrim-c) 100%)}
@media (max-width:920px){
  #heroBg{bottom:auto;height:clamp(700px,calc(100svh + 64px),1100px)}
  :root[data-bg] #heroBg::before{background-image:url(assets/hero-network-dark-narrow.webp)}
  :root[data-bg][data-theme="light"] #heroBg::before{background-image:url(assets/hero-network-light-narrow.webp)}
  #heroBg::after{background:var(--scrim-n)}
}
@media (prefers-reduced-motion:reduce){#heroBg::before{transition:none}}
:root[data-motion="reduced"] #heroBg::before{transition:none}
@media (forced-colors:active){#heroBg{display:none}}
.core-art{margin:0 0 16px}
.core-art canvas{width:100%;height:auto;display:block}
.hero-side{position:sticky;top:96px}
.glance{margin:10px 0 18px}
.glance div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px dashed var(--border)}
.glance div:last-child{border-bottom:none}
.glance dt{color:var(--muted);font-size:.9rem;white-space:nowrap}
.glance dd{margin:0;text-align:right;font-weight:600;font-size:.95rem}
.stats-side{grid-template-columns:1fr 1fr;margin:0 0 18px}
.side-links{margin:8px 0 0;font-weight:600}
@media(max-width:920px){ .hero{grid-template-columns:1fr} .hero-side{position:static} }
.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:.14em;font-size:.8rem;font-weight:700;margin:0}
.role{font-size:1.22rem;font-weight:650;margin:.25em 0}
.lede{color:var(--muted);font-size:1.05rem}
.button{display:inline-block;background:var(--accent);color:#fff;padding:11px 20px;border-radius:11px;font-weight:700}
:root[data-theme="dark"] .button:not(.secondary){color:#0a1220}
.button.secondary{background:transparent;color:var(--accent);border:1px solid var(--accent)}
/* Secondary button label must stay the accent colour in BOTH themes:
   the dark filled-button text colour above must never reach it (that
   combination, dark text on a transparent dark background, is what
   made this label invisible - bug found from a user screenshot, Oct 26). */
:root[data-theme="dark"] .button.secondary{color:var(--accent)}
.actions .button{margin:6px 10px 6px 0}
.hero-figure{margin:28px 0 0}
.hero-figure img,.hero-figure video{width:100%;height:auto;display:block;border:1px solid var(--border);border-radius:16px;background:var(--panel)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:26px 0 0;padding:0}
.stats div{background:var(--panel);border:1px solid var(--border);border-radius:13px;padding:13px 15px}
.stats dt{font-weight:800;font-size:1.15rem;color:var(--accent)}
.stats dd{margin:2px 0 0;color:var(--muted);font-size:.9rem}
.chips{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:10px;margin:0}
.chips li{background:var(--card);border:1px solid var(--border);padding:8px 14px;border-radius:999px;font-size:.95rem}
.trace-note{color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px}
.cards .card p{color:var(--muted)}
.meta{color:var(--muted);font-size:.85rem;text-transform:uppercase;letter-spacing:.06em;margin:0}
.quote-card{margin:0 0 16px}
.quote-card blockquote{margin:0;font-size:1.22rem;line-height:1.55;font-style:italic}
.quote-card figcaption{margin-top:12px;color:var(--muted);font-size:.92rem}
footer{border-top:1px solid var(--border);padding:24px;text-align:center;color:var(--muted);font-size:.9rem;background:var(--panel)}
@media(max-width:760px){
  .hero{grid-template-columns:1fr}
  h1{font-size:2rem}
  nav a{margin-left:10px}
}
@media (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}
.stack{color:var(--muted);font-size:.9rem;border-top:1px dashed var(--border);padding-top:10px;margin-top:12px}
.role-block{padding:14px 0;border-bottom:1px dashed var(--border)}
.role-block:last-child{border-bottom:none}

/* Lineage explorer: stage boxes drawn as pipeline nodes. Edges use the
   accent colour; .lit edges go full accent at full width while .dim
   edges and nodes fade, so the traced path reads at a glance in both
   themes. The anomaly node uses a warm colour in both themes. */
.lineage-svg{width:100%;height:auto;display:block;margin:10px 0}
.lineage-svg .edges path{stroke:var(--accent);opacity:.45;transition:opacity .25s}
.lineage-svg .edges path.lit{opacity:1;stroke-width:3.5}
.lineage-svg .edges path.dim{opacity:.07}
.lineage-svg .lnode{cursor:pointer;transition:opacity .25s}
.lineage-svg .lnode rect{fill:var(--card);stroke:var(--accent);stroke-width:1.5}
.lineage-svg .lnode text{fill:var(--text);font-size:14.5px;text-anchor:middle;pointer-events:none}
.lineage-svg .lnode.anomaly rect{stroke:#f59e0b}
.lineage-svg .lnode.dim{opacity:.25}
.lineage-svg .lnode:focus{outline:none}
.lineage-svg .lnode:focus rect{stroke-width:3}
.lineage-detail{min-height:2.6em;font-size:15.5px}
canvas#graph{opacity:.85}

/* Travelling packets on the lineage graph (SVG animateMotion). The
   anomaly packet is amber: most traffic flows clean, a little is flagged. */
.lineage-svg .packet{fill:var(--accent)}
.lineage-svg .anomaly-packet{fill:#f59e0b}
/* Scrollspy: the nav link for the section in view. */
.site-header nav a.active{color:var(--accent)}
/* Scroll progress: a pipeline-thin track under the sticky header. */
.scrollbar{position:absolute;left:0;right:0;bottom:-1px;height:3px;background:transparent}
#scrollbarFill{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent2))}
.site-header{position:sticky}
@media (prefers-reduced-motion: reduce){ .lineage-svg .packet{display:none} }

/* Featured quotes carousel. Slides are stacked in one stage; the
   active slide sits at rest, the next enters from the LEFT and the old
   one exits RIGHT, so the motion travels left to right as the owner
   asked. app.js rotates the .on class every 5 seconds.
   Only two slides ever move: the one arriving (.on) and the one leaving
   (.out). Every other slide waits on the left, hidden, and gets there
   with no transition. Before Nov 26, 2026 a slide that had just left
   slid all the way back across the stage on the next move, so three
   slides showed at once, cut off at both edges. The stage clips the
   slides; the controls sit outside it, so their focus rings are never
   cut off. */
.carousel-stage{position:relative;overflow:hidden;aspect-ratio:16/5.9}
.carousel .slide{position:absolute;inset:0;margin:0;padding:6px;transform:translateX(-104%);visibility:hidden;transition:none;pointer-events:none}
.carousel .slide.on,.carousel .slide.out{visibility:visible;transition:transform .65s ease}
.carousel .slide.on{transform:translateX(0);pointer-events:auto;z-index:2}
.carousel .slide.out{transform:translateX(104%);z-index:1}
/* A writing slide is a card: it keeps the card's own padding (the 6px
   above beat it, so logos sat against the border until Nov 26, 2026). */
.carousel .card.slide{padding:24px}
.carousel .slide figcaption{font-size:14.5px;color:var(--muted)}
/* Headline first (Nov 6, 2026). A slide is the masthead, the date, and
   the article's headline, which is the link; the quote opens below it
   from "Read my quote". The headline reads as a heading, in the text
   colour, with a quiet underline that turns accent on hover so it still
   reads as a link. */
/* The author's byline on the date line stays in one piece when a narrow
   screen wraps it. */
.carousel .byline{white-space:nowrap}
.carousel .slide-title{margin:4px 0 0;font-size:1.3rem;line-height:1.35;font-weight:700}
.carousel .slide-title a{color:var(--text);text-decoration:underline;text-decoration-color:var(--border);text-decoration-thickness:1px;text-underline-offset:5px}
.carousel .slide-title a:hover{color:var(--accent);text-decoration-color:currentColor}
.carousel .slide-title a:focus-visible,.slide-quote summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
/* The quote: a native <details>. Its summary is the "Read my quote"
   toggle (44px tall, so it is an easy tap), with a chevron drawn in CSS
   that turns over when it opens. The quote sits in a recessed well in
   both themes, at a readable measure. */
.slide-quote{margin:2px 0 0}
.slide-quote summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--accent);font-weight:650;font-size:.95rem;cursor:pointer;list-style:none}
.slide-quote summary::-webkit-details-marker{display:none}
.slide-quote summary::after{content:"";width:6px;height:6px;margin-top:-3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease}
.slide-quote[open] summary::after{margin-top:3px;transform:rotate(-135deg)}
.slide-quote summary:hover .sq-closed,.slide-quote summary:hover .sq-open{text-decoration:underline}
.slide-quote .sq-open,.slide-quote[open] .sq-closed{display:none}
.slide-quote[open] .sq-open{display:inline}
.slide-quote blockquote{max-width:72ch;margin:0 0 6px;padding:14px 18px;background:var(--bg);border:1px solid var(--border);border-radius:12px;color:var(--text);font-size:1.05rem;line-height:1.6;quotes:"\201C" "\201D"}
.slide-quote blockquote p{margin:0}
.slide-quote blockquote p::before{content:open-quote}
.slide-quote blockquote p::after{content:close-quote}
@media (prefers-reduced-motion: reduce){ .slide-quote summary::after{transition:none} }
/* Carousel controls (Nov 26, 2026). One row at every width: the
   position as a counter ("12 / 46") and a thin meter that fills to it,
   then the two arrows. They replaced one dot per slide, which at 46
   quotes ran past the panel on phones and pushed the arrows out of
   reach. The arrows are 44px round targets with drawn chevrons, so
   they sit dead centre in either theme and at any zoom. */
.carousel-controls{display:flex;align-items:center;gap:16px;margin-top:12px;padding:0 6px}
.carousel-count{margin:0;flex:none;min-width:4.6em;color:var(--muted);font-size:.9rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.carousel-count .cc-now{color:var(--text);font-weight:700}
.carousel-meter{position:relative;flex:1 1 auto;min-width:40px;height:3px;border-radius:999px;background:var(--border);overflow:hidden}
.carousel-meter-fill{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--accent2));transform-origin:left center;transform:scaleX(var(--pos,0));transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.carousel-arrows{display:flex;flex:none;gap:10px;margin-left:auto}
.carousel-btn{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;background:var(--card);color:var(--text);border:1px solid var(--border);cursor:pointer;transition:border-color .2s ease,color .2s ease,background-color .2s ease}
.carousel-btn svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.carousel-btn:hover{border-color:var(--accent);color:var(--accent)}
.carousel-btn:active{background:var(--panel)}
.carousel-btn:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* Pause and play: the same round button, its icon swapped by app.js
   (.is-paused). Hidden while motion is off, OS setting or footer
   control, since then nothing advances. After .carousel-btn, whose display
   these override. */
.carousel-play .icon-play,.carousel-play.is-paused .icon-pause{display:none}
.carousel-play.is-paused .icon-play{display:block}
.carousel-play .icon-play path{fill:currentColor}
:root[data-motion="reduced"] .carousel-play{display:none}
@media (prefers-reduced-motion: reduce){ .carousel-play{display:none} }
/* Published Writing: the slide is a card, so the row lines up with the
   card's edges and keeps the cards' 18px gap from the build log below. */
#writingCarousel{margin-bottom:18px}
#writingCarousel .carousel-controls{padding:0}
/* Small phones: tighter gaps, so the row fits a 320px screen. Under
   340px the meter steps aside; the counter still gives the position. */
@media (max-width:400px){
  .carousel-controls{gap:12px;padding:0 2px}
  .carousel-count{min-width:0}
  .carousel-meter{min-width:24px}
  .carousel-arrows{gap:8px}
}
@media (max-width:340px){
  .carousel-controls{gap:8px}
  .carousel-meter{display:none}
}
.card a{overflow-wrap:anywhere}
@media (prefers-reduced-motion: reduce){ .carousel .slide,.carousel .slide.on,.carousel .slide.out,.carousel-meter-fill{transition:none} }
.goal-line{font-size:16px;color:var(--text);font-weight:600;margin:8px 0 0}

/* =====================================================================
   V4 additions (Oct 2026): case files, command palette, print resume,
   reduce-motion control, and pointer/scroll/click graphics. Same
   variable system as the rest of the file; no new hard-coded colours
   except the palette scrim, which works over both themes.
   ===================================================================== */
/* Case files: full-width panels with an impact row up top and an
   expandable body. The impact row is the Jared Chester lesson: the
   numbers sit where a skimming reviewer lands first. */
.case{margin:0 0 18px}
.case h3{font-size:1.25rem}
.impact-row{display:flex;flex-wrap:wrap;margin:16px 0 4px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.impact-row div{flex:1 1 150px;padding:12px 14px 12px 0}
.impact-row div+div{border-left:1px solid var(--border);padding-left:14px}
.impact-row strong{display:block;font-size:1.3rem;color:var(--accent);line-height:1.2}
.impact-row span{color:var(--muted);font-size:.88rem}
.case-toggle{margin-top:14px;background:transparent;color:var(--accent);border:1px solid var(--accent);border-radius:10px;padding:9px 16px;font-weight:700;cursor:pointer;font-size:.95rem}
.case-toggle:hover{background:var(--card)}
.case-body{margin-top:8px}
.case-body h4{margin:20px 0 6px;font-size:1rem;color:var(--text)}
.case-body p,.case-body li,.case-body dd{color:var(--muted)}
.case-body ul{margin:6px 0;padding-left:20px}
.decisions{margin:6px 0}
.decisions dt{font-weight:700;color:var(--text);margin-top:12px}
.decisions dd{margin:2px 0 0}
/* Header palette button + footer text button. */
#paletteBtn{margin-left:10px;height:38px;padding:0 12px;border-radius:999px;border:1px solid var(--border);background:var(--card);color:var(--muted);cursor:pointer;font-size:.9rem;box-shadow:var(--shadow)}
#paletteBtn:hover{border-color:var(--accent);color:var(--accent)}
.footer-btn{background:none;border:none;color:var(--accent);cursor:pointer;font:inherit;padding:0;text-decoration:underline}
.colophon{font-size:.85rem}
/* Command palette overlay. */
.palette{position:fixed;inset:0;z-index:50;background:rgba(5,8,14,.55);display:flex;align-items:flex-start;justify-content:center;padding:12vh 16px 16px}
.palette[hidden]{display:none}
.palette-box{width:min(560px,100%);background:var(--card);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.palette-box input{width:100%;border:none;border-bottom:1px solid var(--border);background:var(--card);color:var(--text);font-size:1.05rem;padding:16px 18px;outline:none}
#paletteList{list-style:none;margin:0;padding:8px;max-height:46vh;overflow:auto}
#paletteList li{padding:10px 12px;border-radius:10px;cursor:pointer;color:var(--text);display:flex;justify-content:space-between;gap:12px}
#paletteList li small{color:var(--muted)}
#paletteList li.sel{background:var(--panel);outline:1px solid var(--accent)}
.palette-hint{margin:0;padding:10px 18px;color:var(--muted);font-size:.82rem;border-top:1px solid var(--border)}
/* Reduce motion (manual control mirrors prefers-reduced-motion):
   app.js stops the canvas and carousel; CSS kills transitions, the
   SVG packets, and smooth scrolling. */
:root[data-motion="reduced"]{scroll-behavior:auto}
:root[data-motion="reduced"] *{transition:none!important;animation:none!important}
:root[data-motion="reduced"] .lineage-svg .packet{display:none}
/* Pointer, scroll, and click graphics (owner request, Oct 2026).
   Cursor glow: a soft accent halo that trails the pointer (app.js
   lerps it inside the same rAF loop as the canvas). Fine pointers
   only; the element never intercepts clicks. Click burst: a ring and
   six sparks in the accent colours, spawned by app.js and removed
   when the animation ends. Scroll reveal: sections rise and fade in
   the first time they enter the viewport. All three are disabled by
   reduced motion, OS-level or via the footer control. */
#cursorGlow{position:fixed;left:0;top:0;width:340px;height:340px;margin:-170px 0 0 -170px;border-radius:50%;pointer-events:none;z-index:0;background:radial-gradient(circle,var(--glow) 0%,transparent 62%);opacity:0;transition:opacity .5s}
:root[data-theme="dark"]{--glow:rgba(110,168,254,.13)}
:root[data-theme="light"]{--glow:rgba(31,95,208,.10)}
.burst{position:fixed;z-index:40;pointer-events:none}
.burst .ring{position:absolute;left:-6px;top:-6px;width:12px;height:12px;border-radius:50%;border:2px solid var(--accent)}
.burst .spark{position:absolute;left:-2px;top:-2px;width:4px;height:4px;border-radius:50%;background:var(--accent2)}
.reveal{opacity:0;transform:translateY(22px);transition:opacity .7s ease,transform .7s ease}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1;transform:none;transition:none} #cursorGlow{display:none} }
:root[data-motion="reduced"] .reveal{opacity:1;transform:none}
:root[data-motion="reduced"] #cursorGlow{display:none}
/* Print resume mode: the page as a clean document. Interactive and
   decorative layers go away, case files print OPEN (their content is
   the resume's substance), colours flatten to black on white. */
@media print{
  @page{margin:16mm}
  body{background:#fff!important;color:#000!important;font-size:11pt;line-height:1.5}
  #graph,#heroBg,#cursorGlow,#cursorBot,.core-art,.site-header,#palette,.carousel-controls,.case-toggle,.burst{display:none!important}
  main{max-width:none;padding:0}
  section{margin:18px 0}
  .panel,.card,.case,.stats div{background:#fff!important;border:1px solid #bbb!important;box-shadow:none!important;backdrop-filter:none}
  .case-body{display:block!important}
  .case-body[hidden]{display:block!important}
  .reveal{opacity:1!important;transform:none!important}
  a{color:#000!important;text-decoration:none}
  .meta,.lede,.cards .card p,.case-body p,.case-body li,.case-body dd,.impact-row span,.trace-note{color:#333!important}
  .impact-row strong,.stats dt{color:#000!important}
  .carousel-stage{position:static;aspect-ratio:auto;overflow:visible}
  /* Every slide prints, one after another: out of the shared grid cell
     and visible, whatever the carousel was showing. */
  .carousel-track{display:block!important}
  .carousel .slide{position:static!important;transform:none!important;visibility:visible!important;pointer-events:auto}
  .carousel .slide+.slide{margin-top:12px}
  /* Every quote prints: app.js opens them on beforeprint. */
  .slide-quote summary{display:none}
  .slide-quote blockquote{background:#fff!important;border:1px solid #bbb;color:#000!important}
  .lineage-svg{display:none}
  footer{background:#fff!important;border-top:1px solid #bbb;color:#333}
  h1{font-size:22pt}
  h2{font-size:14pt;border-bottom:1px solid #999;padding-bottom:4px}
  .case,.panel{break-inside:avoid}
}

/* =====================================================================
   V5 additions (Nov 2026): the Query this page console, Trace, and the
   send-a-record controls on the lineage explorer.
   New tokens, defined for both themes:
     --mono   code face, used only where the content is code (SQL, column
              names, the pipeline log). No webfont: the system stack.
     --warn   text-safe amber for errors and failed checks. The #f59e0b
              used on the lineage graph is fine for strokes but too light
              for text on the light theme (2.1:1), so text uses this.
     --hit    the fill a pipeline stage flashes when a record reaches it.
   ===================================================================== */
:root{--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace}
:root,:root[data-theme="dark"]{--warn:#fbbf24;--hit:rgba(110,168,254,.22)}
:root[data-theme="light"]{--warn:#a16207;--hit:rgba(31,95,208,.14)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button.button{border:0;cursor:pointer;font:inherit;font-weight:700}

/* Query console. The editor is the one dark well on the panel, so the
   eye lands there first; everything around it stays quiet. */
.query-lede{color:var(--muted);max-width:70ch;margin:0 0 4px}
.sql{margin:14px 0 0}
.sql-editor{display:flex;align-items:flex-start;gap:10px;background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:13px 16px;cursor:text;transition:border-color .2s,box-shadow .2s}
.sql-editor:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--glow)}
.sql-prompt{font-family:var(--mono);font-size:.92rem;line-height:1.6;color:var(--accent);user-select:none;flex:none}
.sql-input{flex:1;min-width:0;display:block;background:transparent;border:0;outline:0;resize:none;overflow:hidden;color:var(--text);font-family:var(--mono);font-size:.92rem;line-height:1.6;padding:0;margin:0;min-height:1.6em}
.sql-complete{margin:6px 2px 0;font-family:var(--mono);font-size:.78rem;color:var(--muted);min-height:0}
.sql-complete:empty{display:none}
.sql-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:12px}
.sql-bar .button{padding:9px 18px}
.sql-hint{margin:0;color:var(--muted);font-size:.84rem;flex:1 1 280px}
.sql-examples{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0}
.sql-chip{background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:999px;padding:6px 13px;font:inherit;font-size:.86rem;line-height:1.3;cursor:pointer}
.sql-chip:hover{border-color:var(--accent);color:var(--accent)}
.sql-status{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:18px 0 8px;font-family:var(--mono);font-size:.8rem;color:var(--muted);min-height:1.4em}
.sql-status strong{color:var(--accent);font-weight:600}
.sql-status.sql-error{display:block;color:var(--warn);font-family:inherit;font-size:.93rem}
/* Scroll shadows (the local/scroll background technique): a soft shadow
   appears on whichever side has more columns to scroll to, and covers
   itself when that edge is reached. No script, both themes. */
.sql-result{overflow:auto;max-height:480px;border:1px solid var(--border);border-radius:12px;
  background:
    linear-gradient(to right,var(--card) 40%,transparent) left center/36px 100% no-repeat local,
    linear-gradient(to left,var(--card) 40%,transparent) right center/36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%,var(--edge),transparent) left center/14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%,var(--edge),transparent) right center/14px 100% no-repeat scroll,
    var(--card)}
:root,:root[data-theme="dark"]{--edge:rgba(0,0,0,.55)}
:root[data-theme="light"]{--edge:rgba(30,41,82,.18)}
.sql-result:empty{display:none}
.sql-table{width:100%;border-collapse:collapse;font-size:.9rem;line-height:1.45}
.sql-table th{position:sticky;top:0;z-index:1;background:var(--card);text-align:left;font-family:var(--mono);font-size:.76rem;font-weight:600;color:var(--muted);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}
.sql-table td{padding:9px 12px;border-bottom:1px dashed var(--border);vertical-align:top}
.sql-table tbody tr:last-child td{border-bottom:0}
.sql-table tbody tr:hover td{background:var(--panel)}
.sql-table td.sql-num{font-variant-numeric:tabular-nums}
/* Short values never wrap mid-value (a date split into "202 / 09-" is
   unreadable); a wide result scrolls sideways inside its own box. */
.sql-table td:is(.sql-num,.sql-date,.sql-null,.sql-link){white-space:nowrap}
.sql-table td:not(.sql-action){min-width:7.5em}
.sql-table td.sql-null{color:var(--muted);font-family:var(--mono);font-size:.78rem}
.sql-table td.sql-empty{color:var(--muted);text-align:center;padding:20px 12px}
.sql-table td.sql-action{width:1%;white-space:nowrap;text-align:right;padding-top:6px;padding-bottom:6px}
.sql-row-btn{background:transparent;color:var(--accent);border:1px solid var(--border);border-radius:999px;padding:3px 11px;font:inherit;font-size:.78rem;cursor:pointer}
.sql-row-btn:hover{border-color:var(--accent)}
.sql-tables{margin:14px 0 0;color:var(--muted);font-size:.84rem;line-height:1.9}
.sql-tables button{background:none;border:0;padding:0 2px;color:var(--accent);font-family:var(--mono);font-size:.82rem;cursor:pointer;border-radius:4px}
.sql-tables button:hover{text-decoration:underline}
/* The editor shows focus with its own border glow (focus-within), so
   the textarea itself gets no second ring. */
#query :is(button,a):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sql-input:focus-visible{outline:none}

/* Trace: the element a result row came from, outlined in the secondary
   accent so it is not mistaken for focus, with a ring that answers the
   click. Removed by app.js after a few seconds. */
.traced{outline:2px solid var(--accent2)!important;outline-offset:5px;border-radius:12px;animation:traced 1.1s ease-out 2}
@keyframes traced{from{box-shadow:0 0 0 0 var(--glow)}to{box-shadow:0 0 0 16px transparent}}
#backToQuery{position:fixed;left:20px;bottom:20px;z-index:31;height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--accent);background:var(--card);color:var(--accent);font:inherit;font-size:.9rem;font-weight:700;cursor:pointer;box-shadow:var(--shadow)}
#backToQuery[hidden]{display:none}
@media (max-width:640px){#backToQuery{left:12px;bottom:12px}}
@media (prefers-reduced-motion: reduce){.traced{animation:none}.sql-editor{transition:none}}
@media print{#query,#backToQuery{display:none!important}}

/* Header layout (v5). The theme and palette buttons moved out of <nav>
   into .header-tools. Desktop looks as before: brand on the left, links
   and tools together on the right. Under 640px the header was wrapping
   to four lines (146px of an 800px phone screen, before v5 too); now the
   brand and tools share the first row and the links scroll sideways in
   a single second row, with a fade at the edge to show there is more. */
.site-header nav{margin-left:auto}
.header-tools{display:flex;align-items:center;gap:10px;margin-left:18px}
.header-tools #theme-toggle,.header-tools #paletteBtn{margin-left:0}
@media (max-width:640px){
  .site-header{flex-wrap:wrap;row-gap:4px;padding:10px 16px 6px}
  .header-tools{margin-left:auto}
  .site-header nav{order:3;flex:1 1 100%;margin-left:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:2px 0 4px;
    -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent)}
  /* Once the row has scrolled, the left end fades as well (app.js sets
     .more-before), so a link cut at either edge fades out rather than
     stopping in a hard cut. Both fades are 28px: NAV_FADE in app.js
     scrolls the lit link clear of them. */
  .site-header nav.more-before{-webkit-mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,transparent,#000 28px,#000 calc(100% - 28px),transparent)}
  /* A swipe comes to rest with a link starting where the left fade ends,
     never mid-word. app.js sizes the space after the last link so the
     end of the row is one of these positions too. */
  .site-header nav{scroll-snap-type:x mandatory;scroll-padding-left:28px}
  .site-header nav a{scroll-snap-align:start}
  .site-header nav::-webkit-scrollbar{display:none}
  .site-header nav a{flex:none;margin:0 18px 0 0;padding:2px 0}
  .site-header nav a:last-child{margin-right:28px}
  #theme-toggle,#paletteBtn{height:34px}
  #theme-toggle{width:34px}
}

/* Send a record (lineage explorer, v5). The buttons reuse the outline
   style of the case-file toggles; the bad-record button is amber, the
   colour the graph already uses for anomalies. The log is a code well
   like the query editor, newest line last. */
.lin-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin:4px 0 0}
.lin-btn{background:transparent;color:var(--accent);border:1px solid var(--accent);border-radius:10px;padding:8px 15px;font:inherit;font-weight:700;font-size:.92rem;cursor:pointer}
.lin-btn:hover{background:var(--card)}
.lin-btn-bad{color:var(--warn);border-color:var(--warn)}
.lin-btn:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.lin-count{margin:0 0 0 auto;color:var(--muted);font-size:.86rem;font-variant-numeric:tabular-nums}
.lin-log{list-style:none;margin:2px 0 12px;padding:10px 14px;background:var(--bg);border:1px solid var(--border);border-radius:12px;font-family:var(--mono);font-size:.78rem;line-height:1.6}
.lin-log[hidden]{display:none}
.lin-log li{display:grid;grid-template-columns:auto 6.2em minmax(0,1fr);gap:12px;color:var(--muted)}
/* Hierarchy comes from colour, not opacity: a faded timestamp measured
   4.07:1 (dark) and 2.74:1 (light) in axe, below the 4.5:1 minimum. */
.lin-log time{font-variant-numeric:tabular-nums}
.lin-log span{color:var(--text)}
.lin-log b{color:var(--accent);font-weight:600}
.lin-log li.fail b,.lin-log li.fail span{color:var(--warn)}
@media (max-width:560px){.lin-log li{grid-template-columns:5.4em minmax(0,1fr);gap:8px}.lin-log time{display:none}.lin-count{margin-left:0;flex-basis:100%}
  /* Lines wrap on a phone, so show only the newest five. */
  .lin-log li:nth-last-child(n+6){display:none}}
.lineage-svg .rec-guides path{fill:none;stroke:none}
.lineage-svg .rec{fill:var(--accent);stroke:var(--card);stroke-width:3;pointer-events:none}
.lineage-svg .rec.caught{fill:#f59e0b}
.lineage-svg .rec.done{opacity:0;transition:opacity .4s ease}
.lineage-svg .lnode rect{transition:fill .25s ease,stroke-width .25s ease}
.lineage-svg .lnode.hit rect{fill:var(--hit);stroke-width:3}
.lineage-svg .lnode.fail rect{stroke:#f59e0b;stroke-width:3.5}
@media print{.lin-controls,.lin-log{display:none!important}}

/* Lineage graph on phones (v5). The SVG scales to its container, so at
   360px its 14.5px labels rendered near 4px. Under 760px it keeps a
   720px minimum (labels near 11px) and scrolls inside .lineage-scroll;
   a one-line hint says so. Desktop is unchanged. */
.lineage-scroll{overflow-x:auto;overscroll-behavior-x:contain}
.lineage-swipe{display:none;margin:0 0 6px;color:var(--muted);font-size:.84rem}
@media (max-width:760px){
  .lineage-scroll .lineage-svg{min-width:720px}
  .lineage-swipe{display:block}
}
@media print{.lineage-swipe{display:none!important}}

/* =====================================================================
   V5 motion (Nov 2026). One-shot animations; nothing loops.
   Each is skipped entirely under reduced motion, from the OS setting or
   the footer control (the head script applies a stored choice before
   first paint, so a visitor who turned motion off never sees the intro).
   docs/motion.md lists every moving piece on the page with its trigger,
   timing, and reduced-motion behaviour.
   ===================================================================== */

/* 1. Hero intro: the page's one orchestrated load moment. The hero's
   lines rise into place in reading order, 70ms apart; the panel on the
   right lands with the role line. About 1.2s end to end. */
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.hero-text>:nth-child(1){--i:0}.hero-text>:nth-child(2){--i:1}.hero-text>:nth-child(3){--i:2}
.hero-text>:nth-child(4){--i:3}.hero-text>:nth-child(5){--i:4}.hero-text>:nth-child(6){--i:5}
.hero-text>:nth-child(7){--i:6}.hero-text>:nth-child(8){--i:7}.hero-side{--i:2}
@media (prefers-reduced-motion: no-preference){
  :root:not([data-motion="reduced"]) .hero-text>*,
  :root:not([data-motion="reduced"]) .hero-side{animation:rise .7s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * 70ms)}
}

/* 2. The lineage graph draws itself along the data flow on first view:
   sources, ingest, transform, gate, then lake and anomalies, the API,
   and analytics. app.js sets each edge's dash length and the per-step
   delays, then removes every inline style when the drawing is done, so
   hover tracing and the dashed anomaly edge behave exactly as before. */
.lineage-svg.pre-draw .lnode{opacity:0;transform:translateY(8px)}
.lineage-svg .lnode{transform-box:fill-box}
.lineage-svg.pre-draw .packet,.lineage-svg.pre-draw .edges path.dashed-in{opacity:0}

/* =====================================================================
   Publisher mastheads (v5). One component for Published Writing,
   Speaking, and the Featured In captions: the publisher's logo (or its
   name in the site's own type), a pill for the kind of piece, then the
   date. A logo hides the name visually; the name stays in the page for
   screen readers, and the img keeps alt="". The logos are the owner's
   official files; docs/publisher-logos.md says where each came from,
   how to add one, and the recorded exceptions.
   ===================================================================== */
.pub-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:var(--logo-box,28px);margin:0 0 4px}
.pub-mark{display:inline-flex;align-items:center;flex:none;max-width:100%}
.pub-mark:empty{display:none}
.pub-head .pub-name,.cards .card .pub-head .pub-name{margin:0;color:var(--text);font-weight:750;font-size:1.02rem;line-height:1.3;letter-spacing:.005em}
.pub-head:has(.pub-logo:not(.mark)) .pub-name{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.pub-kind{margin-left:auto;flex:none;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:1px 9px;font-size:.74rem;font-weight:650;line-height:1.6;white-space:nowrap}
.pub-date{margin:0 0 8px}

/* Logo sizing. Each section has one logo box, and every masthead in it
   reserves that height, so the dates and titles of cards side by side
   line up whatever logo each card carries. Inside the box each logo has
   its own height (--h), chosen for equal visual weight: a compact mark
   stands taller than a long, heavy wordmark (roughly the equal-area
   rule, height in proportion to 1 / sqrt(aspect ratio)), then checked by
   eye in both themes. Logos are only scaled; the artwork is never
   altered. A new logo needs one line here. */
#writing{--logo-box:36px}
#featured{--logo-box:40px}
#speaking{--logo-box:52px}
.pub-logo{display:block;width:auto;max-width:100%;height:var(--h,24px);object-fit:contain}
.pub-logo[src$="/tdwi.svg"]{--h:30px}
.pub-logo[src$="/ailovesdata.png"]{--h:20px}
.pub-logo[src$="/ailovesdata-dark.svg"]{--h:19px}
.pub-logo[src$="/exchangewire.svg"]{--h:21px}
.pub-logo[src$="/esecurityplanet.png"]{--h:27px}
.pub-logo[src$="/foojay.png"]{--h:33px}
.pub-logo[src$="/crmmagazine.svg"]{--h:36px}
/* A mark-only logo (class .mark) carries no wordmark, so the publisher
   name stays visible beside it: the hiding rule above skips .mark. The
   Platform Engineering diamond is 28px, sized to sit with the name. */
.pub-logo[src$="/platformengineering.png"]{--h:28px}
.pub-logo[src$="/informatics.svg"]{--h:30px}
.pub-logo[src$="/ctosync.svg"]{--h:34px}
.pub-logo[src$="/techmagazine.png"]{--h:28px}
.pub-logo[src$="/labelyourdata.svg"]{--h:34px}
.pub-logo[src$="/ciogrid.svg"]{--h:30px}
.pub-logo[src$="/azbigmedia.png"]{--h:27px}
.pub-logo[src$="/prapi.svg"]{--h:36px}
.pub-logo[src$="/interviewfocus.png"]{--h:22px}
.pub-logo[src$="/blocktelegraph.svg"]{--h:31px}
.pub-logo[src$="/transittomorrow.png"]{--h:28px}
.pub-logo[src$="/gritdaily.png"]{--h:35px}
.pub-logo[src$="/smartechdaily.png"]{--h:32px}
.pub-logo[src$="/semiconductormagazine.png"]{--h:28px}
.pub-logo[src$="/customerrelations.svg"]{--h:28px}
.pub-logo[src$="/niceteas.svg"]{--h:38px}
/* The Marketplace Risk PNGs carry transparent margins: the light file's
   mark fills only 63% of its height. So the light logo is drawn taller
   and the empty margins are trimmed from layout with negative margins;
   the file itself is untouched. */
.pub-logo[src$="/marketplacerisk.png"]{--h:58px;margin:-12px 0 -10px}
.pub-logo[src$="/marketplacerisk-dark.png"]{--h:44px}
/* CTO Sync's file, from ctosync.com's site header, carries empty canvas
   either side of its mark (31% left, 27% right). Its box is cut to the
   artwork here, so the mark lines up with the caption under it and the
   dark chip fits it; the file itself is untouched. 53.6% centres the
   crop on the artwork, which sits a little right of the file's middle. */
.carousel .slide .pub-logo[src$="/ctosync.svg"]{width:calc(var(--h) * 2);object-fit:cover;object-position:53.6% 50%}
:root[data-theme="dark"] .carousel .slide .pub-logo[src$="/ctosync.svg"]{width:calc(var(--h) * 2 + 20px)}

/* Light and dark versions: a publisher's file made for dark backgrounds
   goes beside the usual one as <img class="pub-logo for-dark">, with the
   usual one marked for-light, and each theme shows its own. */
.pub-logo.for-dark{display:none}
:root[data-theme="dark"] .pub-logo.for-light{display:none}

/* Dark theme chips. A logo drawn for light backgrounds sits on a white
   chip. Every chip in a section is the full height of the logo box, with
   the logo centred inside it, so the chips read as one system rather
   than stickers of different sizes. Exceptions, recorded in
   docs/publisher-logos.md: logos that carry their own background (the
   NICE-TEAS tile, marked .noplate, and the Label Your Data badge) and
   versions made for dark (.for-dark) take no chip; Marketplace Risk's
   white wordmark takes a chip in its own brand red (#E84844); white or
   light artwork (CIO Grid, Block Telegraph) takes a dark plate in both
   themes, class .darkplate, below. */
:root[data-theme="dark"] .pub-logo{box-sizing:border-box;height:var(--logo-box,32px);padding:calc((var(--logo-box,32px) - var(--h,24px)) / 2) 10px;background:#fff;border-radius:8px}
:root[data-theme="dark"] .pub-logo.noplate,
:root[data-theme="dark"] .pub-logo[src$="/labelyourdata.svg"],
:root[data-theme="dark"] .pub-logo.for-dark{display:block;box-sizing:content-box;height:var(--h,24px);padding:0;background:none;border-radius:0}
:root[data-theme="dark"] .pub-logo.for-dark[src$="/marketplacerisk-dark.png"]{box-sizing:border-box;height:var(--logo-box);padding:calc((var(--logo-box) - var(--h)) / 2) 12px;background:#E84844;border-radius:8px}

/* Dark plates. A logo drawn in white or light colours (CIO Grid's
   white wordmark, Block Telegraph's light-blue letters and white icon
   details) is invisible on a light page and on the white dark-mode
   chip, so it sits on a dark plate in both themes: the full logo-box
   height, slate #0f172a, the same geometry as the dark-mode chip. */
.pub-logo.darkplate{box-sizing:border-box;height:var(--logo-box,32px);padding:calc((var(--logo-box,32px) - var(--h,24px)) / 2) 10px;background:#0f172a;border-radius:8px}
:root[data-theme="dark"] .pub-logo.darkplate{background:#0f172a}

/* Cards are equal height in a grid row; the closing link sits on the
   bottom edge, so the links of one row line up. */
.pub-card{display:flex;flex-direction:column}
.pub-card>p:last-child{margin-top:auto;padding-top:4px;margin-bottom:0}
/* Featured In captions: the masthead sits above the title link. */
.carousel .slide figcaption .pub-head{margin:2px 0 4px}
.carousel .slide figcaption .pub-name{font-size:.95rem}

/* Featured carousel sizing (v5). The stage used a fixed 16:5.9 box with
   absolutely positioned slides, so on phones (and once captions grew)
   the caption ran past the box and the arrows and dots sat on top of
   the article title: 57px of overlap at 360px before v5. Now every
   slide sits in the same grid cell, and the stage is as tall as its
   tallest slide. The grid is on .carousel-track, the slides' parent.
   Slides still move with translateX, and the stage does not change
   height between slides. An open quote makes its slide the tallest, so
   the stage grows to fit it; app.js closes a quote when its slide
   leaves, and the stage settles back. */
.carousel-stage{aspect-ratio:auto}
.carousel-track{display:grid}
.carousel .slide{grid-area:1/1;position:relative;inset:auto}

/* =====================================================================
   Career, as a trace (v5). Experience opens with every role, and the
   graduate degree in between, as a span on a year axis: flat rows
   divided by hairlines, a thin accent bar on the left edge for the
   hovered or selected row, and three bar styles (role, internship,
   degree) with a legend. app.js positions every bar from its dates and
   keeps the Amazon span ending at today; the inline positions are the
   no-JavaScript fallback.
   ===================================================================== */
.career{margin:2px 0 22px;--years:8}
.career-note{color:var(--muted);margin:0 0 8px;max-width:72ch}
.career-legend{display:flex;flex-wrap:wrap;gap:4px 18px;margin:0 0 8px;color:var(--muted);font-size:.8rem}
.career-legend span{display:inline-flex;align-items:center;gap:7px}
.career-swatch{display:inline-block;width:20px;height:8px;border-radius:999px}
.career-rows{list-style:none;margin:0;padding:0;border-top:1px dashed var(--border)}
.career-row{position:relative;display:block;width:100%;margin:0;padding:10px 10px 11px 14px;border:0;border-bottom:1px dashed var(--border);border-radius:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.career-row::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:3px;background:var(--accent);transform:scaleY(0);transition:transform .2s ease}
.career-row:hover::before,.career-row:focus-visible::before,.career-row[aria-pressed="true"]::before{transform:scaleY(1)}
.career-row:hover,.career-row[aria-pressed="true"]{background:var(--panel)}
.career-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.career-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px}
.career-org{font-weight:650;font-size:.95rem}
.career-title{margin-right:auto;color:var(--muted);font-size:.88rem}
.career-when{color:var(--muted);font-size:.84rem;font-variant-numeric:tabular-nums}
.career-track{position:relative;display:block;height:10px;margin-top:8px;border-radius:999px;background:
  repeating-linear-gradient(to right,transparent 0,transparent calc(100% / var(--years) - 1px),var(--bg) calc(100% / var(--years) - 1px),var(--bg) calc(100% / var(--years))),
  var(--border)}
.career-bar{position:absolute;top:0;bottom:0;min-width:6px;border-radius:999px}
.career-bar.kind-role,.career-swatch.kind-role{background:linear-gradient(90deg,var(--accent),var(--accent2))}
.career-bar.kind-internship,.career-swatch.kind-internship{background:var(--accent2)}
.career-bar.kind-degree,.career-swatch.kind-degree{background:repeating-linear-gradient(135deg,var(--accent) 0 3px,transparent 3px 6px);box-shadow:inset 0 0 0 1.5px var(--accent)}
.career-axis{position:relative;height:1.5em;margin:8px 10px 0 14px;color:var(--muted);font-size:.78rem}
.career-axis span{position:absolute;top:0}
/* "now" ends at today's position, so it never runs past the axis. */
.career-axis .career-now{color:var(--accent);font-weight:650;transform:translateX(-100%)}
.career-detail{min-height:2.6em;margin:10px 0 0;font-size:.95rem}
.career-detail a{margin-left:6px;white-space:nowrap}
/* app.js hides any year label that would touch its neighbour or "now". */
.career-axis .is-crowded{visibility:hidden}
@media (max-width:560px){
  /* Without JavaScript: eight year labels do not fit a phone, so show
     every other year. */
  .career-axis:not(.is-fitted) span:nth-child(even):not(.career-now){visibility:hidden}
}
/* First view: the spans render in order. */
.career-armed .career-bar{clip-path:inset(0 100% 0 0)}
.career-armed.career-drawn .career-bar{clip-path:inset(0 0 0 0);transition:clip-path .8s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i,0) * 110ms)}
@media print{.career-bar{clip-path:none!important}.career-detail,.career-note,.career-legend{display:none!important}}
