/* Site additions, linked after the vendored nebula CSS (public/ds, public/nebula), which stays unmodified. */

/* Frosted glass over the nebula, shared by the home featured card, the project header facts and
   post code blocks: mostly see-through, the art behind it blurred and a little richer */
:root {
  --glass: color-mix(in srgb, var(--bg) 35%, transparent);
  --glass-blur: blur(18px) saturate(150%);
}

/* Prism tokens in post code samples, in the template's .c1 / .k1 / .s1 colours */
.code .token.comment {
  color: var(--pfaint);
}
.code .token.keyword {
  color: var(--p);
}
.code .token.string,
.code .token.string-interpolation {
  color: var(--c);
}

/* Code blocks (components/PostElements.tsx) are frosted glass over a small nebula of their own, as
   on the home featured card. The wrapper takes the card's spacing and clips, so its box is the
   card's box and the art, drawn with no bleed, can't spill into the page. The terminal bar's copy
   icon (components/CodeCopy.tsx) turns into a tick for a moment once the code is copied. */
.code-wrap {
  position: relative;
  isolation: isolate;
  margin: 34px 0;
  overflow: clip;
}
.code-wrap > .card.code {
  margin: 0;
}
[data-frame='brackets'] .card.code {
  background-color: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.code-copy {
  display: inline-flex;
  margin: -6px -6px -6px auto;
  padding: 6px; /* a 28px target in the 11px bar */
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--pfaint);
  cursor: pointer;
  transition: color 0.15s;
}
.code-copy:hover {
  color: var(--c);
}
.code-copy[data-done='copied'] {
  color: var(--c);
}
.code-copy[data-done='failed'] {
  color: var(--k);
}
.code-copy:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 0;
}

/* Read by screen readers, not shown */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The breadcrumb carries the page's blinking cursor, so the nav's active link ("> /blog") drops
   the template's block cursor rather than blinking in a second place. */
.views a::after {
  display: none;
}
/* ...and its label is simply there, rather than typing in on every page load */
.views a.on .lbl,
.views a[aria-current='page'] .lbl {
  animation: none;
}

/* Breadcrumb: the page's location as a shell prompt, "~/blog > ls▌" (components/Breadcrumb.tsx).
   It replaces the template's "// label" kickers, back links and About prompt at the top of pages.
   The command types in key by key, with the cursor following it. */
.crumb {
  display: flex;
  align-items: baseline;
  max-width: 100%;
  font: 500 13px/1.5 var(--font-mono);
  color: var(--dim);
  white-space: nowrap;
}
.crumb ol {
  display: flex;
  flex: none;
  list-style: none;
}
.crumb .sep {
  padding: 0 1px; /* keeps a 24px tap zone around the one-character "~" link */
  color: var(--faint);
}
.crumb a {
  color: var(--dim);
  transition: color 0.15s;
}
.crumb a:hover {
  color: var(--c);
}
.crumb [aria-current] {
  color: var(--ink);
}
.crumb .pr {
  flex: none;
  margin: 0 0.7em;
  color: var(--c);
  font-weight: 600;
}
.crumb .cmd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
/* Typing: each character waits, at no width, until its keystroke time (--at, lib/keystrokes.ts),
   so the cursor sits right after what has been typed so far. The cursor holds solid while typing
   and blinks from the last keystroke (--typed), like a terminal's. */
.crumb .cmd > span > span {
  animation: il-keystroke 0s var(--at) backwards;
}
@keyframes il-keystroke {
  from {
    font-size: 0;
  }
}
.crumb .cur {
  flex: none;
  align-self: center;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  background: var(--c);
  animation: il-cursor-blink 1.1s steps(1) var(--typed, 0ms) infinite;
}
/* Reduced motion: the command is simply there, and the cursor is solid (as the nav was) */
@media (prefers-reduced-motion: reduce) {
  .crumb .cmd > span > span,
  .crumb .cur {
    animation: none;
  }
}
/* One place on every page: each page opens with its breadcrumb, which sits 72px under the nav at
   the left edge of the content column. It is positioned rather than in the flow, so the page
   headers (and the nebula art they carry) keep their own boxes; the headers leave room for it. */
main:has(> .crumb) {
  position: relative;
}
/* It spans the column, between main's gutters, as it did in the headers: the art carves around
   its box, so the same box keeps the nebula the same. */
main > .crumb {
  position: absolute;
  top: 72px;
  right: 40px;
  left: 40px;
  z-index: 2;
}
@media (max-width: 640px) {
  main > .crumb {
    right: 18px;
    left: 18px;
  }
}
/* Titles start under the breadcrumb's slot: 72px, its 19.5px line and 18px of space (less the
   post title's own 22px margin) */
main > .crumb + .ph {
  padding-top: 109.5px;
}
main > .crumb + .post .post-head {
  padding-top: 87.5px;
}
/* About's copy is centred beside the photo on wide screens, well below the breadcrumb; stacked,
   it starts under the breadcrumb like the other pages. */
@media (max-width: 900px) {
  main > .crumb + .ab-hero {
    padding-top: 109.5px;
  }
}

/* Home pillars as links (components/Pillars.tsx). The stickers lift 2px on hover, keeping their
   tilt. Each "// what_we_do" row is one link (its title, stretched over the row) and takes the
   pillar's accent on hover. */
a.stk {
  transition: transform 0.2s ease-out;
}
a.stk:nth-child(1):hover {
  transform: rotate(-3deg) translateY(-2px);
}
a.stk:nth-child(2):hover {
  transform: rotate(2deg) translateY(-2px);
}
a.stk:nth-child(3):hover {
  transform: rotate(-1.5deg) translateY(-2px);
}
a.stk:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 3px;
}
/* Buttons match the stickers: the secondary button keeps the purple dashed outline it only had on
   hover (its faint outline was hard to see, in light mode especially), and every button lifts 2px
   on hover instead of changing colour. A stretched card-link button doesn't lift: its transform
   would shrink the overlay that makes the whole card the link. */
.btn {
  border-color: var(--p);
  transition: transform 0.2s ease-out;
}
.btn.pri:hover {
  background: var(--il-cyan);
}
.btn:not(.card-link):hover {
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  a.stk,
  .btn {
    transition: none;
  }
}
#what_we_do .pos [data-acc='c'] {
  --acc: var(--c);
}
#what_we_do .pos [data-acc='p'] {
  --acc: var(--p);
}
#what_we_do .pos [data-acc='k'] {
  --acc: var(--k);
}
#what_we_do .pos h3 a {
  color: inherit;
  background: var(--g1) no-repeat 0 100% / 0 1px;
  transition: background-size 0.2s ease-out;
}
#what_we_do .pos h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
#what_we_do .pos h3 a:focus-visible {
  outline: none;
}
#what_we_do .pos h3 a:focus-visible::after {
  outline: 2px solid var(--p);
  outline-offset: -2px;
}
/* On hover the section-rule hairline draws in under the title, rather than recolouring it under
   the glitch shadow. */
#what_we_do .pos article:hover h3 a,
#what_we_do .pos h3 a:focus-visible {
  background-size: 100% 1px;
}
/* Each row is the prompt, title and description, without the design's fourth column for a file
   label */
@media (min-width: 901px) {
  [data-wwd='rows'][data-frame='brackets'] #what_we_do .pos article {
    grid-template-columns: 64px minmax(0, 0.8fr) minmax(0, 1.3fr);
  }
}

/* Linked cards: a card that goes somewhere is one link, either an a.card or a .card-link stretched
   over the card (like the what-we-do rows). On hover or keyboard focus its corner brackets run
   along the edges and meet, closing into a full frame in the card's accent (cyan when it has none),
   which also stands in for the focus outline. The frame is an overlay that fades in over the
   resting brackets, so it also shows where an image covers the card's edge (the blog's featured
   post). The title keeps its colour rather than turning cyan under the glitch. */
.card .card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
[data-frame='brackets'] .card {
  --fc: var(--bc);
}
[data-frame='brackets'] a.card:not([data-acc], .hl),
[data-frame='brackets'] .card:has(.card-link):not([data-acc], .hl) {
  --fc: var(--c);
}
[data-frame='brackets'] a.card::before,
[data-frame='brackets'] .card:has(.card-link)::before,
[data-frame='brackets'] .ph .pj-meta::before {
  --arm: 16px;
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--fc) 0 0) 0 0 / var(--arm) 2px,
    linear-gradient(var(--fc) 0 0) 0 0 / 2px var(--arm),
    linear-gradient(var(--fc) 0 0) 100% 0 / var(--arm) 2px,
    linear-gradient(var(--fc) 0 0) 100% 0 / 2px var(--arm),
    linear-gradient(var(--fc) 0 0) 0 100% / var(--arm) 2px,
    linear-gradient(var(--fc) 0 0) 0 100% / 2px var(--arm),
    linear-gradient(var(--fc) 0 0) 100% 100% / var(--arm) 2px,
    linear-gradient(var(--fc) 0 0) 100% 100% / 2px var(--arm);
  background-repeat: no-repeat;
  opacity: 0;
  transition:
    background-size 0.25s ease-out,
    opacity 0.15s ease-out;
}
/* The project header facts are a plain bracket card, but the template's backdrop shorthand
   (nebula-v2.css) clears a card's bracket images, so they wear this overlay instead, at rest */
[data-frame='brackets'] .ph .pj-meta::before {
  opacity: 1;
}
/* The template pulls the facts 20px into the gutter so their text lines up with the page's; on
   phones the gutter is 18px, which put the left brackets off-screen, so pull in less there */
@media (max-width: 640px) {
  .ph .pj-meta {
    margin-left: -12px;
    padding-inline: 12px;
  }
}
/* Hover only where there is a pointer to hover with, so the frame doesn't stay on after a tap;
   a tap shows it while pressed. Each arm runs just past halfway, so they meet without a seam. */
@media (hover: hover) {
  [data-frame='brackets'] a.card:hover::before,
  [data-frame='brackets'] .card:has(.card-link):hover::before {
    --arm: calc(50% + 1px);
    opacity: 1;
  }
}
[data-frame='brackets'] a.card:focus-visible::before,
[data-frame='brackets'] a.card:active::before,
[data-frame='brackets'] .card:has(.card-link:focus-visible)::before,
[data-frame='brackets'] .card:has(.card-link:active)::before {
  --arm: calc(50% + 1px);
  opacity: 1;
}
[data-frame='brackets'] a.card:focus-visible,
[data-frame='brackets'] .card:has(.card-link) .card-link:focus-visible {
  outline: none;
}
[data-frame='brackets'] a.card:hover h3 {
  color: inherit;
}
/* The related-project card at the foot of a post hints at its link as the project cards do,
   "{prompt} view" in the project's accent, brightening as the frame closes; no button. */
.related .go {
  flex: none;
  font: 600 12px var(--font-mono);
  color: var(--bc);
  transition: color 0.15s;
}
.related .go:hover {
  color: var(--pi);
}
@media (prefers-reduced-motion: reduce) {
  [data-frame='brackets'] a.card::before,
  [data-frame='brackets'] .card:has(.card-link)::before {
    transition: none;
  }
}

/* Blog filter: the project folders, as the output of the breadcrumb's `ls` (BlogIndex.tsx).
   Styled like the nav: a dim ">" fades in on hover, and the chosen folder reads "> doctrack/"
   in its project accent. Replaces the template's pill chips. */
.ls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 30px;
}
.ls button {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  border: 0;
  background: none;
  font: 500 13px var(--font-mono);
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s;
}
.ls button::before {
  content: '> ';
  white-space: pre;
  color: var(--acc);
  opacity: 0;
  transition: opacity 0.15s;
}
.ls button:hover {
  color: var(--ink);
}
.ls button:hover::before {
  opacity: 0.5;
}
.ls button[aria-pressed='true'] {
  color: var(--acc);
}
.ls button[aria-pressed='true']::before {
  opacity: 1;
}
.ls button:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 2px;
}
.ls [data-acc='c'] {
  --acc: var(--c);
}
.ls [data-acc='p'] {
  --acc: var(--p);
}
.ls [data-acc='k'] {
  --acc: var(--k);
}
.ls [data-acc='v'] {
  --acc: var(--v);
}

/* About on wide screens: the // bio section sits closer to the hero. The hero keeps the exact same
   content box (and so the orbit nebula around the photo is unchanged); only the space below shrinks.
   Small screens keep their spacing, which stays clear of the nebula's bleed. */
@media (min-width: 901px) {
  .ab3o {
    padding-bottom: 0;
    min-height: calc(min(74vh, 640px) - 36px);
  }
  .ab3o + #bio {
    padding-top: 40px; /* keeps the heading clear of the nebula's 60px bleed, so the art stays the same */
  }
  /* The photo sits on the orbit nebula's left arm, the arm running on behind it, so it reads as part
     of the art; the art itself is unchanged. The nebula spreads right as the window widens (it bleeds
     to the right edge), so the shift follows it: fitted to the arm's position at 960-2560px wide
     (seed 12). Stacked under 900px, the photo stays centred. */
  .orbit-wrap .ring {
    translate: max(-33px, 12vw - 165px, 21vw - 310px) 0;
  }
}

/* A real photo in the About ring (the template only styles the generated placeholder) */
.ring > div img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Search: an icon button beside the theme toggle opens a kbar palette styled as a terminal
   prompt (components/Search.tsx). The palette's thin top rule is its one gradient. */
.tb .search {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s;
}
.tb .search:hover {
  color: var(--ink);
}
.tb .search:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 2px;
}
.tb .search svg {
  display: block;
}
.kb {
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.kb-panel {
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-top: 0;
  color: var(--ink);
}
.kb-panel::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--g1);
}
.kb-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bd);
  font: 500 15px var(--font-mono);
}
.kb-input .pr {
  color: var(--c);
  font-weight: 600;
}
.kb-q {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink);
  font: inherit;
  caret-color: var(--c);
}
.kb-q::placeholder {
  color: var(--faint);
}
.kb-input kbd {
  flex: none;
  padding: 2px 6px;
  border: 1px dashed var(--bd);
  border-radius: 4px;
  font: 500 11px var(--font-mono);
  color: var(--faint);
}
.kb-sec {
  padding: 16px 20px 8px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 3px;
  color: var(--c);
}
.kb-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 20px 10px 44px;
  cursor: pointer;
}
.kb-item::before {
  content: '>';
  position: absolute;
  left: 20px;
  font: 600 15px/1.45 var(--font-mono);
  color: var(--c);
  opacity: 0;
}
.kb-item b {
  font: 600 16px/1.35 var(--font-sans);
  color: var(--ink);
}
.kb-item span {
  font: 500 12px var(--font-mono);
  color: var(--faint);
  white-space: nowrap;
}
.kb-item.on {
  background: color-mix(in srgb, var(--p) 12%, transparent);
}
.kb-item.on::before {
  opacity: 1;
}
@media (max-width: 640px) {
  .kb-input kbd {
    display: none;
  }
}
.kb-note {
  padding: 18px 20px 20px;
  font: 500 12px var(--font-mono);
  color: var(--faint);
}

/* Page menu for small screens. The design hides the page paths under 640px; with four of them the
   bar runs out of room sooner, so under 760px they fold into a menu button left of the theme
   toggle, which keeps its corner. The panel reuses the .views link styles, so the active page
   still reads "> /blog" and types in when the menu opens. */
.menu,
.views.menu-panel {
  display: none;
}
@media (max-width: 760px) {
  .tb .views:not(.menu-panel) {
    display: none;
  }
  .tb {
    gap: 12px;
    padding-inline: 18px;
  }
  .tb .search {
    margin-left: auto;
    margin-right: -6px;
  }
  .menu {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: -6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dim);
    cursor: pointer;
    transition: color 0.15s;
  }
  .menu:hover,
  .menu[aria-expanded='true'] {
    color: var(--ink);
  }
  .menu:focus-visible {
    outline: 2px solid var(--p);
    outline-offset: 2px;
  }
  .menu svg {
    grid-area: 1 / 1;
    display: block;
    transition:
      opacity 0.25s,
      transform 0.25s;
  }
  .menu .i-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
  }
  .menu[aria-expanded='true'] .i-menu {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
  }
  .menu[aria-expanded='true'] .i-close {
    opacity: 1;
    transform: none;
  }
  .views.menu-panel {
    display: flex;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 4px 28px 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--bd);
  }
  .views.menu-panel[hidden] {
    display: none;
  }
  .views.menu-panel a {
    padding: 14px 0;
    font-size: 14px;
  }
  .views.menu-panel a + a {
    border-top: 1px solid var(--bd);
  }
}

/* Home hero: the featured card (components/FeaturedCard.tsx) is a bracket card across the foot
   of the hero, under the copy: label, title, summary and link on the left, a wide image on the
   right. On small screens the scroll cue goes and the card follows the stickers closely. */
.hero3 {
  grid-template-rows: auto 1fr auto;
}
.hero3 .spot {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  justify-self: stretch;
  width: auto;
  margin-top: 48px;
}
.hero3 .cue {
  grid-row: 3;
}
.feat-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  grid-template-areas:
    'kick shot'
    'title shot'
    'text shot'
    'link shot';
  grid-template-rows: auto auto auto 1fr;
  column-gap: 40px;
  padding: 24px;
}
/* The home featured card and the project header facts (layouts/ProjectLayout.tsx) are bracket cards
   of frosted glass over the page nebula, which runs on behind them (their carve is soft; small
   labels and links carve strong, so they stay crisp). The template gave the facts an almost solid
   backdrop and no frame. As specific as the theme's "cards have no fill" rule, so they keep a fill. */
.hero3 .spot .feat-strip,
[data-frame='brackets'] .ph .pj-meta {
  background-color: var(--glass); /* colour only: the card's brackets are background images */
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.feat-strip .spot-k {
  grid-area: kick;
  justify-content: flex-start;
  gap: 18px;
}
/* An h2 (it follows the hero's h1), sized as a card title: without the section headings' width
   cap or their glitch shadow */
.feat-strip h2 {
  grid-area: title;
  margin: 14px 0 8px;
  max-width: none;
  font: 700 clamp(28px, 2.8vw, 40px) / 1.05 var(--font-sans);
  letter-spacing: -0.5px;
  text-shadow: none;
}
.feat-strip p {
  grid-area: text;
  max-width: 54ch;
  color: var(--pdim);
  font-size: 15px;
  line-height: 1.6;
}
.feat-strip .spot-link {
  grid-area: link;
  align-self: end;
  justify-self: start;
  margin-top: 16px;
}
.fs-shot {
  position: relative;
  grid-area: shot;
  align-self: center;
  aspect-ratio: 21 / 9;
  overflow: clip;
}
/* The image slot fills its frame. The placeholder generator sizes its pattern in screen pixels,
   so a small slot shows only the pattern's top-left corner, which can be blank (Doctrack's is).
   On smaller screens the slot is drawn 2× or 4× larger and shrunk to fit: a miniature of the
   whole picture. The border sits on the slot at full size, over the image's ground colour, and on
   the frame once the slot is shrunk, so it stays 1px. */
.fs-shot > .shot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--pbd);
  transform-origin: 0 0;
}
@media (max-width: 900px) {
  .hero3 {
    padding-top: 40px;
  }
  .hero3 .cue {
    display: none;
  }
  .hero3 .spot {
    margin-top: 32px;
  }
  .hero3 + .sec {
    padding-top: 96px;
  }
  .feat-strip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
    column-gap: 24px;
  }
  .fs-shot {
    aspect-ratio: 16 / 9;
    border: 1px solid var(--pbd);
  }
  .fs-shot > .shot {
    width: 200%;
    height: 200%;
    border: 0;
    transform: scale(0.5);
  }
}
@media (max-width: 640px) {
  .feat-strip {
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-areas:
      'kick kick'
      'title shot'
      'text text'
      'link link';
    grid-template-rows: auto;
    column-gap: 16px;
    padding: 18px;
  }
  .feat-strip .spot-k {
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-bottom: 14px;
  }
  .feat-strip h2 {
    align-self: center;
    margin: 0;
    font-size: 26px;
  }
  .feat-strip p {
    margin-top: 14px;
    font-size: 14px;
  }
  .feat-strip .spot-link {
    margin-top: 12px;
  }
  .fs-shot > .shot {
    width: 400%;
    height: 400%;
    transform: scale(0.25);
  }
}

/* Footer contact as icon links, like the design system's SocialLinks: subtle at rest, each one's
   pillar accent on hover. The padding gives a 32px tap target without moving anything. */
.foot {
  align-items: center;
}
.foot-links a,
.foot-links a:nth-child(2),
.foot-links a:nth-child(3) {
  display: inline-flex;
  padding: 7px;
  margin: -7px;
  color: var(--faint);
  transition: color 0.15s;
}
.foot-links a:nth-child(1):hover {
  color: var(--c);
}
.foot-links a:nth-child(2):hover {
  color: var(--p);
}
.foot-links a:nth-child(3):hover {
  color: var(--k);
}
.foot-links a:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 0;
}
/* The footer line, then a pipe, then the privacy and RSS links a step brighter, cyan on hover.
   The pipe sits centred in the gap before the links. When they wrap under the footer line on a
   phone, it would start their line, so .foot-meta clips it: the 8px of padding it borrows on the
   left keeps the links' focus ring inside the clip, but not the pipe. */
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  overflow-x: clip;
  padding-left: 8px;
  margin-left: -8px;
}
.foot-more {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.foot-sep {
  position: absolute;
  right: 100%;
  width: 20px;
  text-align: center;
}
.foot-more a {
  padding: 7px 4px; /* a 26px tap target without moving anything */
  margin: -7px -4px;
  color: var(--dim);
  transition: color 0.15s;
}
.foot-more a:hover {
  color: var(--c);
}
.foot-more a:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 0;
}

/* Plain text pages (/privacy, /rss): short sections in a reading column, each under a "// label"
   kicker (components/DocSection.tsx), with ">" lists. */
.doc {
  max-width: 72ch;
}
.ph + .doc {
  padding-top: 24px; /* the template leaves 120px for header art; this page has none */
}
.doc section + section {
  margin-top: 48px;
}
.doc h2 {
  max-width: none;
  margin-bottom: 14px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 3px;
  color: var(--c);
  text-shadow: none;
}
.doc p {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--dim);
}
/* Links inside running text: project and post write-ups, and the privacy and RSS pages */
.prose p a,
.prose li a,
.post-body p a,
.post-body li a,
.doc p a {
  color: var(--c);
  text-decoration: underline; /* not told apart by colour alone */
  text-underline-offset: 3px;
}
.doc ul {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
}
.doc li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--dim);
}
.doc li::before {
  content: '>';
  position: absolute;
  left: 0;
  font: 600 13px/27.2px var(--font-mono); /* the item's 16px × 1.7 line, so it sits on its baseline */
  color: var(--c);
}
.opt-out {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 20px;
}
.doc .opt-out p {
  margin: 0;
  color: var(--ink);
}
.opt-out .btn {
  cursor: pointer;
}
.doc .doc-meta {
  margin-top: 28px;
  font: 500 12px var(--font-mono);
  color: var(--faint);
}
/* /rss: the feed address in a box (one click selects all of it, if copying fails), its copy button,
   and the "> open the feed" link with a quiet note */
.feed-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 4px 0 22px;
}
.feed-url code {
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--bd);
  font: 500 14px var(--font-mono);
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}
.copy {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.copy .btn {
  cursor: pointer;
}
.copy [role='status'] {
  font: 500 12px var(--font-mono);
  color: var(--dim);
}
.doc p a.spot-link {
  margin: 0;
  color: var(--c);
  text-decoration: none; /* a link on its own line, not inside a sentence */
}
.doc-note {
  margin-left: 8px;
  font: 500 12px var(--font-mono);
  color: var(--faint);
}

/* Project facts card: the template keeps each value on one line, so a long one ("iOS prototype;
   Android & desktop in development") ran out of the card. Values wrap, right-aligned; labels don't. */
.facts .row span:first-child {
  flex: none;
}
.facts .row span:last-child {
  min-width: 0;
  white-space: normal;
}

/* Single column under 900px (HANDOFF.md). nebula-v2.css collapses .feat there, but its
   `a.card.feat` grid rule is more specific, so the featured post stayed two narrow columns. */
@media (max-width: 900px) {
  a.card.feat {
    grid-template-columns: 1fr;
  }
}

/* The ">> development" sticker reads purple on the card surface at 4.46:1, just under WCAG AA
   (the template's only dark-mode contrast failure). The page colour behind it lifts it to about
   4.9:1 in both themes, with no visible change. */
.stk:nth-child(2) {
  background: var(--bg);
}
