/* ==========================================================================
   Hedgerow — the family hub
   No build step, no third-party requests. Tokens and components come from the
   family design system (Vigilant Vole's docs/design-system.md, also used by
   the Nimble Newt and Keen Kestrel sites), so the hub reads as their sibling.
   Hedgerow's own accent is a calm hedge green, used sparingly; each app card
   wears that app's colour instead.

    1. Font
    2. Tokens (family) + hub tokens
    3. Base
    4. Typography
    5. Buttons
    6. Cards, list icons, pills
    7. Hub: nav, hero, sections, app cards, principles, together, also by me,
       footer, 404
    8. Motion, responsive, preferences
   ========================================================================== */

/* 1. Font ----------------------------------------------------------------- */
@font-face {
  font-family: "InterVariable";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens ----------------------------------------------------------------
   Same values as the apps. light-dark(): first value light, second dark.
   The site follows the system theme. */
:root {
  color-scheme: light dark;

  /* Surfaces */
  --bg: light-dark(#f5f5f7, #0b0b0d);
  --bg-2: light-dark(#ececf0, #111113);
  --card: light-dark(#ffffff, #161618);
  --fill: light-dark(rgba(118, 118, 128, 0.12), rgba(118, 118, 128, 0.22));
  --fill-2: light-dark(rgba(118, 118, 128, 0.2), rgba(118, 118, 128, 0.32));
  --hover: light-dark(rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0.045));
  --line: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.08));
  --line-strong: light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.14));

  /* Materials */
  --bar: light-dark(rgba(245, 245, 247, 0.76), rgba(11, 11, 13, 0.72));
  --blur-bar: blur(20px) saturate(180%);

  /* Text */
  --text: light-dark(#1d1d1f, #f5f5f7);
  --muted: light-dark(#606065, #a1a1a6);
  --faint: light-dark(#aeaeb2, #6e6e73); /* decorative only */
  --on-inverse: light-dark(#ffffff, #0b0b0d);

  /* Brand (the family's) — links, focus, selection. Use sparingly. */
  --brand: light-dark(#6656e8, #8b7dff);
  --brand-ring: light-dark(rgba(102, 86, 232, 0.22), rgba(139, 125, 255, 0.32));

  /* Accent: Hedgerow's hedge green (#8fbf7f, the sprig in the mark). On a
     light background text uses a darker green (5.8:1 on --bg, 5.3:1 on
     --bg-2); the light sage is only decoration there. */
  --accent: light-dark(#6f9f60, #8fbf7f);
  --accent-text: light-dark(#3d6b33, #9fcf8f);
  --accent-fill: light-dark(rgba(111, 159, 96, 0.16), rgba(143, 191, 127, 0.14));
  --accent-line: light-dark(rgba(61, 107, 51, 0.4), rgba(143, 191, 127, 0.42));
  --accent-glow: light-dark(rgba(111, 159, 96, 0.24), rgba(143, 191, 127, 0.18));

  /* Status (Apple system colours) */
  --ok: light-dark(#34c759, #30d158);
  --ok-text: light-dark(#1b7330, #30d158);
  --ok-fill: light-dark(rgba(52, 199, 89, 0.14), rgba(48, 209, 88, 0.15));
  --warn: light-dark(#ffcc00, #ffd60a);
  --warn-text: light-dark(#8f5000, #ffd60a);
  --warn-fill: light-dark(rgba(255, 204, 0, 0.2), rgba(255, 214, 10, 0.14));
  --neutral: light-dark(#8e8e93, #8e8e93);
  --neutral-text: light-dark(#606065, #a1a1a6);
  --neutral-fill: light-dark(rgba(118, 118, 128, 0.14), rgba(118, 118, 128, 0.24));

  /* Shadows */
  --shadow-color: light-dark(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
  --shadow-card: 0 1px 2px light-dark(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  --shadow-pop: 0 10px 30px -6px var(--shadow-color), 0 2px 6px light-dark(rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.3));

  /* Type */
  --font: "InterVariable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Spacing (4px grid) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-full: 999px;

  /* Layout */
  --wrap: 1120px;
  --gutter: 24px;
  --topbar-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-press: 120ms;
  --dur-ui: 200ms;

  /* Layers */
  --z-nav: 50;
  --z-skip: 120;

  /* Landing only: section rhythm, reveal */
  --section: 128px;
  --dur-reveal: 600ms;
  --stagger: 60ms;
}

/* The apps' own colours, one class per card. Text variants are darker in the
   light theme so they keep 4.5:1 on a white card. */
.app-vole {
  --app: light-dark(#6656e8, #8b7dff);
  --app-text: light-dark(#6656e8, #8b7dff);
}
.app-newt {
  --app: #b3d621;
  --app-text: light-dark(#4f6b00, #b3d621);
}
.app-kestrel {
  --app: #ff9f0a;
  --app-text: light-dark(#8f5200, #ff9f0a);
}
.app-wren {
  --app: #ff6482;
  --app-text: light-dark(#b3123a, #ff6482);
}

/* Status mapping — one class sets the trio every status-aware component reads. */
.status-up {
  --status: var(--ok);
  --status-text: var(--ok-text);
  --status-fill: var(--ok-fill);
}
.status-warning {
  --status: var(--warn);
  --status-text: var(--warn-text);
  --status-fill: var(--warn-fill);
}
.status-none {
  --status: var(--neutral);
  --status-text: var(--neutral-text);
  --status-fill: var(--neutral-fill);
}
.status-accent {
  --status: var(--accent);
  --status-text: var(--accent-text);
  --status-fill: var(--accent-fill);
}

/* 3. Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  overflow-x: clip;
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.011em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--brand-ring);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
a {
  color: var(--brand);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: currentColor;
  }
}
button,
a {
  touch-action: manipulation;
}
button,
.btn {
  -webkit-user-select: none;
  user-select: none;
}
p,
ul,
ol,
figure {
  margin: 0;
}

/* Icons (sprite: assets/icons.svg) */
.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 4. Typography ------------------------------------------------------------ */
h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.013em;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--on-inverse);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: calc(var(--safe-top) + 10px);
}

.display {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.032em;
}
.headline {
  font-size: clamp(1.875rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.027em;
}
.title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.019em;
}
.lead {
  color: var(--muted);
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.45;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}
.sub {
  margin-top: var(--sp-4);
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: -0.013em;
  text-wrap: pretty;
}
.eyebrow {
  margin-bottom: var(--sp-3);
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.006em;
}
.mono {
  font-family: var(--mono);
  letter-spacing: 0;
}
code {
  padding: 0.1em 0.4em;
  border-radius: var(--r-xs);
  background: var(--fill);
  font-family: var(--mono);
  font-size: 0.875em;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
code.nw {
  white-space: nowrap;
}

/* 5. Buttons (app) -------------------------------------------------------- */
.btn {
  --btn-bg: var(--fill);
  --btn-fg: var(--text);
  --btn-hover: var(--fill-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.009em;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-ui) ease,
    color var(--dur-ui) ease,
    box-shadow var(--dur-ui) ease;
}
.btn:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--btn-hover);
  }
}
.btn-primary {
  --btn-bg: var(--text);
  --btn-fg: var(--on-inverse);
  --btn-hover: color-mix(in srgb, var(--text) 84%, var(--bg));
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-hover: var(--hover);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
  gap: 5px;
}
.btn-lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 1.0625rem;
}
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
  }
  .btn-sm {
    min-height: 36px;
  }
  .btn-sm::before {
    content: "";
    position: absolute;
    inset: -4px;
  }
}

/* 6. App components -------------------------------------------------------- */
.card {
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.list-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--status-fill, var(--fill));
  color: var(--status-text, var(--text));
}
.list-icon .icon {
  width: 18px;
  height: 18px;
}

/* Status dot, pill */
.dot {
  position: relative;
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status, var(--neutral));
}
.dot.is-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--status, var(--accent));
  animation: hr-pulse 2s var(--ease-out) infinite;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 9px;
  border-radius: var(--r-full);
  background: var(--status-fill, var(--fill));
  color: var(--status-text, var(--muted));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}
.pill .dot {
  width: 7px;
  height: 7px;
}
.pill-lg {
  height: 28px;
  padding: 0 12px 0 10px;
  font-size: 0.8125rem;
}

/* 7. Hub ------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), var(--safe-left));
  padding-right: max(var(--gutter), var(--safe-right));
}

/* Nav: the apps' glass top bar. Hairline appears once content is under it. */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding-top: var(--safe-top);
  background: var(--bar);
  -webkit-backdrop-filter: var(--blur-bar);
  backdrop-filter: var(--blur-bar);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--dur-ui) ease;
}
.js .topbar:not(.is-scrolled):not(.menu-open) {
  border-bottom-color: transparent;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar {
    background: var(--bg);
  }
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--topbar-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  flex: none;
  width: 28px;
  height: 28px;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.topnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-full);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.006em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--dur-ui) ease,
    background-color var(--dur-ui) ease;
}
.topnav-link[aria-current="true"] {
  background: var(--fill);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  .topnav-link:hover {
    color: var(--text);
  }
}
.topnav .btn {
  margin-left: var(--sp-3);
}
.gh-mark {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur-ui) var(--ease-out);
}
.nav-toggle span:first-child {
  top: 18px;
}
.nav-toggle span:last-child {
  top: 24.5px;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Sections */
.section {
  padding: var(--section) 0;
}
.section + .section:not(.section-alt) {
  padding-top: 0;
}
.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.section-alt + .section:not(.section-alt) {
  padding-top: var(--section);
}
.section-head {
  max-width: 42rem;
  margin-bottom: var(--sp-16);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 0;
  overflow-x: clip;
  text-align: center;
}
.hero-icon {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto var(--sp-6);
}
/* The hedge's own glow, spilling past the tile */
.hero-icon::before {
  content: "";
  position: absolute;
  inset: -80%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 75%);
  pointer-events: none;
}
.hero-icon img {
  width: 96px;
  height: 96px;
  /* The tile is a squircle with transparent corners, so the shadow follows
     its shape rather than a box */
  filter: drop-shadow(0 10px 18px var(--shadow-color)) drop-shadow(0 2px 4px var(--shadow-color));
}
.kicker {
  display: block;
  margin-bottom: var(--sp-4);
  color: var(--accent-text);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 650;
  letter-spacing: -0.012em;
}
.hero .display {
  display: block;
}
.hero .lead {
  max-width: 40rem;
  margin: var(--sp-6) auto 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 0;
  margin-top: var(--sp-6);
  color: var(--muted);
  font-size: 0.875rem;
}
.hero-meta > * + *::before {
  content: "·";
  margin: 0 10px;
  color: var(--faint);
}

/* The family: one card per app, glowing in the app's colour. Four apps sit
   two by two. */
.apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border-color: color-mix(in srgb, var(--app) 26%, var(--line));
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
}
.app::before {
  content: "";
  position: absolute;
  inset: -30% 30% 55% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--app) 20%, transparent), transparent);
  pointer-events: none;
}
.app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.app-icon,
.other-icon {
  flex: none;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 6px 12px var(--shadow-color));
}
.app-name {
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.019em;
}
.app-kind {
  margin-top: 2px;
  color: var(--app-text);
  font-size: 0.9375rem;
  font-weight: 600;
}
.app-pitch {
  margin-top: var(--sp-3);
  color: var(--muted);
  font-size: 0.9375rem;
  text-wrap: pretty;
}
.app-runs {
  margin-top: auto;
  padding-top: var(--sp-5);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
}
.app-runs-label {
  display: block;
  color: var(--muted);
  font-weight: 500;
}
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

/* Principles */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6);
}
.feature .list-icon {
  margin-bottom: var(--sp-3);
  background: var(--accent-fill);
  color: var(--accent-text);
}
.feature p {
  color: var(--muted);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

/* Together */
.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
}
.link-card.is-now {
  border-color: var(--accent-line);
  box-shadow:
    0 0 0 4px var(--accent-fill),
    var(--shadow-card);
}
.link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.link-card .list-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.link-card .list-icon .icon {
  width: 22px;
  height: 22px;
}
.link-card .title .mono {
  color: var(--accent-text);
  font-size: 0.92em;
}
.nw {
  white-space: nowrap;
}
.link-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

/* Small diagram: two services on one crate */
.diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  max-width: 820px;
  margin: var(--sp-12) auto 0;
}
.node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
}
.node img {
  flex: none;
  width: 32px;
  height: 32px;
}
.node-kit {
  flex-direction: column;
  gap: 0;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-fill);
}
.node-kit .mono {
  font-size: 1rem;
  font-weight: 650;
}
.node-kit small {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}
/* Connectors from each service to the crate */
.node-vole::after,
.node-kestrel::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32px;
  height: 2px;
  background: var(--accent-line);
}
.node-vole::after {
  left: 100%;
}
.node-kestrel::after {
  right: 100%;
}
.diagram-note {
  max-width: 36rem;
  margin: var(--sp-5) auto 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  text-wrap: pretty;
}

/* Also by me */
.others {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.other {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
}
.other > picture {
  display: block;
  flex: none;
}
.other-icon {
  border-radius: 13px;
}
.other-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.other-kind {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}
.other-body > p:not(.other-kind):not(.other-meta) {
  margin-top: var(--sp-3);
  color: var(--muted);
  font-size: 0.9375rem;
  text-wrap: pretty;
}
.other-meta {
  margin-top: auto;
  padding-top: var(--sp-4);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Footer */
.footer {
  padding: var(--sp-12) 0 calc(var(--sp-16) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.section-alt + .footer {
  border-top: 0;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.footer .brand {
  font-size: 0.9375rem;
}
.footer .brand img {
  width: 24px;
  height: 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding-block: 4px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-ui) ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--text);
  }
}

/* 404 */
.notfound {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding-block: var(--sp-16);
  text-align: center;
}
.notfound .headline {
  margin-top: var(--sp-5);
}
.notfound .lead {
  max-width: 28rem;
  margin: var(--sp-4) auto 0;
}

/* 8. Motion ---------------------------------------------------------------- */
@keyframes hr-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* Hero entrance — once, CSS only */
.hero-copy > * {
  animation: rise var(--dur-reveal) var(--ease-out) both;
}
.hero-copy > :nth-child(2) {
  animation-delay: 60ms;
}
.hero-copy > :nth-child(3) {
  animation-delay: 120ms;
}
.hero-copy > :nth-child(4) {
  animation-delay: 180ms;
}
.hero-copy > :nth-child(5) {
  animation-delay: 240ms;
}

/* Scroll reveal — once per element, only while JS runs. Stagger by class
   (no inline styles, so the CSP needs no 'unsafe-inline'). */
.d1 {
  --i: 1;
}
.d2 {
  --i: 2;
}
.d3 {
  --i: 3;
}
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
/* Safety net: if app.js never runs, show everything after a moment */
@keyframes reveal-fallback {
  to {
    opacity: 1;
    transform: none;
  }
}
.js:not(.js-ok) .reveal {
  animation: reveal-fallback 1ms 2.5s forwards;
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1000px) {
  .links {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin-inline: auto;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .others {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin-inline: auto;
  }
}

@media (max-width: 880px) {
  :root {
    --section: 96px;
  }
  .js .nav-toggle {
    display: block;
  }
  .js .topnav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px var(--gutter) var(--sp-6);
    /* Opaque: a backdrop-filter nested in the top bar's own backdrop-filter
       has nothing to blur, and any translucency lets the hero show through. */
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition:
      opacity var(--dur-ui) var(--ease-out),
      transform var(--dur-ui) var(--ease-out),
      visibility 0s linear var(--dur-ui);
  }
  .js .topnav.open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
  .js .topnav-link {
    min-height: 52px;
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.0625rem;
  }
  .js .topnav-link[aria-current="true"] {
    background: none;
  }
  .js .topnav .btn {
    margin: var(--sp-5) 0 0;
    min-height: 48px;
    font-size: 1rem;
  }

  /* No JS: no menu button, the links wrap onto a second row */
  html:not(.js) .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 6px;
    gap: 0 var(--sp-4);
  }
  html:not(.js) .topnav {
    flex-wrap: wrap;
    margin-left: -12px;
  }
  html:not(.js) .topnav-link {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .apps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin-inline: auto;
  }
  .diagram {
    grid-template-columns: minmax(0, 1fr);
    max-width: 320px;
    gap: 24px;
  }
  .node-kit {
    order: 2;
  }
  .node-kestrel {
    order: 3;
  }
  .node-vole::after,
  .node-kestrel::after {
    left: 50%;
    right: auto;
    width: 2px;
    height: 24px;
  }
  .node-vole::after {
    top: 100%;
  }
  .node-kestrel::after {
    top: auto;
    bottom: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --section: 80px;
    --gutter: 20px;
  }
  .hero {
    padding-top: 56px;
  }
  .hero-icon,
  .hero-icon img {
    width: 80px;
    height: 80px;
  }
  .br-wide {
    display: none;
  }
  .section-head {
    margin-bottom: var(--sp-10);
  }
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
  .app,
  .link-card {
    padding: var(--sp-6) var(--sp-5);
  }
  .other {
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-6) var(--sp-5);
  }
}

/* Preferences (app) --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }
  .dot.is-live::after {
    animation: none;
    opacity: 0;
  }
  .hero-copy > * {
    animation-name: fade;
  }
  .js .reveal {
    transform: none;
  }
  .js .topnav {
    transform: none;
  }
  .nav-toggle span {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --bar: var(--bg);
  }
  .topbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.3));
    --line-strong: light-dark(rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.5));
    --muted: light-dark(#3a3a3c, #d1d1d6);
    --faint: light-dark(#6e6e73, #a1a1a6);
    --bar: var(--bg);
  }
  :focus-visible {
    outline-width: 3px;
  }
}

@media (forced-colors: active) {
  .btn,
  .card,
  .node {
    border: 1px solid CanvasText;
  }
  .dot {
    forced-color-adjust: none;
  }
}

@media print {
  .topbar {
    display: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
