/* NET4NINJA .ORG — the NIDSARK grade (NDStudio minimalist), shared across the NET4NINJA and NIDSARK brands.
   Paper white by default, pure black under [data-theme="dark"]. One accent: burgundy #cd0019 (#a30014 hover).
   Hairline borders, near-invisible shadows. No gradients, no glass (except the nav pill), no glows. */

@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif_400Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif_400Regular_Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans_400Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans_600SemiBold.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --well: #f7f6f3;
  --ink: #141414;
  --ink-2: rgba(0, 0, 0, 0.62);
  --ink-3: rgba(0, 0, 0, 0.38);
  --line: rgba(0, 0, 0, 0.10);
  --line-2: rgba(0, 0, 0, 0.16);
  --line-3: rgba(0, 0, 0, 0.28);
  --acc: #cd0019;
  --acc-deep: #a30014;
  --acc-soft: rgba(205, 0, 25, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.55);
  --nav-line: rgba(0, 0, 0, 0.12);
  --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r-card: 20px;
  --r-tile: 14px;
  --pill: 999px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --well: #101010;
  --ink: rgba(255, 255, 255, 0.94);
  --ink-2: rgba(255, 255, 255, 0.60);
  --ink-3: rgba(255, 255, 255, 0.36);
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.18);
  --line-3: rgba(255, 255, 255, 0.30);
  --nav-bg: rgba(16, 16, 16, 0.55);
  --nav-line: rgba(255, 255, 255, 0.14);
  --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body, header, nav, footer, section, article, div, a, button, p, li { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }
::selection { background: rgba(205, 0, 25, 0.18); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
em.acc, h1 em, h2 em { font-style: italic; color: var(--acc); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 200; background: var(--bg); color: var(--ink); padding: 10px 16px; border-radius: var(--pill); border: 1px solid var(--line-3); }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Eyebrow: 11px uppercase, tracked +0.06em, burgundy when introducing a section. */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font: 600 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0; font-variant-numeric: tabular-nums; }
.eyebrow .n { color: var(--ink-3); }
.eyebrow .rule { width: 24px; height: 1px; background: var(--line-2); }
.eyebrow .acc { color: var(--acc); }

/* Nav: floating sticky pill, the one translucent surface. */
.nav { position: sticky; top: 12px; z-index: 100; padding: 0 12px; }
.nav-pill {
  max-width: 1200px; margin: 0 auto; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 8px 0 18px; border-radius: var(--pill);
  background: var(--bg); border: 1px solid var(--nav-line); box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .nav-pill { background: var(--nav-bg); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); }
}
.nav.raised .nav-pill { box-shadow: var(--nav-shadow); }
.brand { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); flex-shrink: 0; }
.brand img, .brand svg { height: 40px; width: auto; }
.brand .wordmark { filter: none; }
[data-theme="dark"] .brand .wordmark { filter: invert(1); }
.brand .tld { font: 600 12px/1 var(--sans); letter-spacing: .08em; color: var(--acc); padding: 4px 8px; border: 1px solid rgba(205, 0, 25, .3); border-radius: var(--pill); margin-left: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--pill); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--well); }
.nav-end { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--well); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: block; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
.menu-btn { display: none; }
.sheet { display: none; }

@media (max-width: 1023px) {
  .nav-links, .nav-end .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .sheet[data-open="true"] {
    display: block; position: absolute; left: 12px; right: 12px; top: calc(100% + 8px);
    max-width: 1200px; margin: 0 auto; padding: 12px; border-radius: var(--r-card);
    background: var(--bg); border: 1px solid var(--line-3); box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
  }
  .sheet ul { list-style: none; margin: 0; padding: 0; }
  .sheet a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: var(--r-tile); font-size: 16px; font-weight: 500; color: var(--ink-2); }
  .sheet a:not(.btn):hover, .sheet a[aria-current="page"] { background: var(--well); color: var(--ink); }
  .sheet .btn { width: 100%; margin-top: 12px; }
  .sheet hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; }
}

/* Buttons: pills. Primary solid burgundy; secondary hairline. Hover lifts 2px, press scales .97. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--pill);
  font: 600 14px/1 var(--sans); white-space: nowrap; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  transition: transform .25s var(--spring), background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-3); background: var(--well); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-deep); border-color: var(--acc-deep); color: #fff; }
.btn.lg { min-height: 50px; padding: 0 28px; font-size: 15px; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--pill); border: 1px solid rgba(205, 0, 25, .3); color: var(--acc); font: 600 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Sections */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.head { margin-bottom: clamp(40px, 5vw, 64px); }
.head .eyebrow { padding-top: 20px; }
.split { display: grid; gap: 24px; margin-top: 28px; align-items: end; }
@media (min-width: 900px) { .split { grid-template-columns: 7fr 5fr; gap: 32px; } .split > :nth-child(2):is(p) { justify-self: end; max-width: 440px; } .split > p:first-child { max-width: 560px; } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); line-height: 1.55; }

/* Hero */
.hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 6vw, 72px); }
.hero .chip { margin-bottom: 28px; }
.hero h1 { max-width: 17ch; margin-top: 24px; }
.hero .split { margin-top: 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .hero .actions { justify-content: flex-end; } }
@media (max-width: 599px) { .actions .btn { width: 100%; } }

/* Statement */
.statement { font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 30ch; }
.prose-cols { display: grid; gap: 24px; color: var(--ink-2); }
@media (min-width: 900px) { .prose-cols { grid-template-columns: 7fr 5fr; gap: 32px; align-items: start; } }

/* Cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.card {
  display: flex; flex-direction: column; height: 100%;
  padding: 28px; border-radius: var(--r-card); border: 1px solid var(--line);
  background: var(--bg); box-shadow: var(--shadow);
  transition: transform .25s var(--spring), border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-3); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; }
.tile { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-tile); border: 1px solid var(--line); color: var(--ink); }
.tile svg { width: 20px; height: 20px; }
.idx { font: 600 11px/1 var(--sans); letter-spacing: .06em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
ol.grid, ul.grid { list-style: none; margin: 0; padding: 0; }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--ink-2); }

/* CTA */
.cta .eyebrow { padding-top: 20px; }
.cta h2 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.04; max-width: 18ch; margin-top: 28px; }
.cta .split { margin-top: 40px; }
@media (min-width: 900px) { .cta .actions { justify-content: flex-end; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: clamp(40px, 5vw, 64px) 0 32px; color: var(--ink-2); font-size: 14px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer .footer-note { margin-top: 12px; }
.footer .tagline { margin-top: 18px; font: 600 13px/1.4 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.footer h2 { font: 600 11px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--ink); }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.footer-base a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* Legal pages */
.legal { display: grid; gap: 48px; }
@media (min-width: 900px) { .legal { grid-template-columns: 240px 1fr; gap: 64px; } .toc { position: sticky; top: 100px; align-self: start; } }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 12px; }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 600 11px/1.9 var(--sans); color: var(--acc); font-variant-numeric: tabular-nums; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--ink); }
.prose { max-width: 68ch; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--ink); margin-top: 2.2em; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--acc); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.meta { font-size: 13px; color: var(--ink-3); margin-top: 16px; }

/* Hero layout with art */
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; } }
.hero-copy h1 { max-width: 15ch; }
.hero-copy .lead { margin-top: 32px; max-width: 34rem; }
.hero-copy .actions { margin-top: 32px; justify-content: flex-start !important; }
.hero-art { margin: 0; width: 100%; max-width: 520px; justify-self: center; }
@media (max-width: 1023px) { .hero-art { max-width: 420px; } }

/* Steps */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 32px; counter-reset: step; position: relative; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } .steps::before { content: ""; position: absolute; left: 0; right: 0; top: 24px; height: 1px; background: var(--line); } }
.steps li { position: relative; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-3); background: var(--bg); box-shadow: 0 0 0 8px var(--bg); font: 600 13px/1 var(--sans); font-variant-numeric: tabular-nums; position: relative; margin-bottom: 20px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 15px; }
.sub-head { margin-top: clamp(56px, 7vw, 88px); }

/* ---------------------------------------------------------------------------
   Animated graphics (inline SVG from scripts/make-art.py). Ink and burgundy
   hairlines only. The resting state is the finished picture; intro motion runs
   only under html.anim, which theme-init.js sets unless reduced motion is on.
   ------------------------------------------------------------------------- */
.art { display: block; width: 100%; height: auto; overflow: visible; }
.art-line { fill: none; stroke: var(--line-2); stroke-width: 1; }
.art-ringtext { font: 600 13px var(--sans); fill: var(--ink-2); }
.art-ticks line { stroke: var(--line-2); stroke-width: 1; }
.art-orbit { fill: none; stroke: var(--line-3); stroke-width: 1; stroke-dasharray: 2 6; }
.art-spoke { stroke: var(--line); stroke-width: 1; }
.art-node { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.art-core { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.art-inner { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 5; }
.art-shield-body { fill: none; stroke: var(--ink); stroke-width: .6; stroke-linejoin: round; }
.art-shield-check { fill: none; stroke: var(--acc); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.art-spin, .art-spin-rev { transform-box: view-box; transform-origin: center; }
.art-spin { animation: art-spin 90s linear infinite; }
.art-spin-rev { animation: art-spin 40s linear infinite reverse; }
.art-pulse { stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 14 100; stroke-dashoffset: 14; animation: art-pulse 3.2s cubic-bezier(.45, 0, .25, 1) infinite; }
.art-ping { fill: none; stroke: var(--acc); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: art-ping 3.2s ease-out infinite; }
.art-breathe { fill: none; stroke: var(--acc); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; animation: art-breathe 1.6s ease-out .6s infinite; }
.p1 { animation-delay: .4s; } .p2 { animation-delay: .8s; } .p3 { animation-delay: 1.2s; }
.p4 { animation-delay: 1.6s; } .p5 { animation-delay: 2s; } .p6 { animation-delay: 2.4s; } .p7 { animation-delay: 2.8s; }
@keyframes art-spin { to { transform: rotate(360deg); } }
@keyframes art-pulse { 0% { stroke-dashoffset: 14; opacity: 1; } 70% { stroke-dashoffset: -86; opacity: 1; } 71%, 100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes art-ping { 0% { opacity: .9; transform: scale(1); } 35%, 100% { opacity: 0; transform: scale(2.4); } }
@keyframes art-breathe { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes art-draw { to { stroke-dashoffset: 0; } }
@keyframes art-fade { to { opacity: 1; } }
@keyframes art-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* Seal intro: rings draw, ring text fades in, nodes pop, the shield draws itself. */
.anim .art-seal .art-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: art-draw 1.6s var(--spring) forwards; }
.anim .art-seal .art-draw.d2 { animation-delay: .15s; }
.anim .art-seal .art-ringtext, .anim .art-seal .art-ticks, .anim .art-seal .art-orbit { opacity: 0; animation: art-fade 1.2s ease .5s forwards; }
.anim .art-seal .art-node { opacity: 0; transform-box: fill-box; transform-origin: center; animation: art-pop .6s var(--spring) forwards; }
.anim .art-seal .n0 { animation-delay: .7s; } .anim .art-seal .n1 { animation-delay: .78s; } .anim .art-seal .n2 { animation-delay: .86s; } .anim .art-seal .n3 { animation-delay: .94s; }
.anim .art-seal .n4 { animation-delay: 1.02s; } .anim .art-seal .n5 { animation-delay: 1.1s; } .anim .art-seal .n6 { animation-delay: 1.18s; } .anim .art-seal .n7 { animation-delay: 1.26s; }
.anim .art-seal .art-shield-body, .anim .art-seal .art-shield-check { stroke-dasharray: 1; stroke-dashoffset: 1; animation: art-draw 1.2s var(--spring) .9s forwards; }
.anim .art-seal .art-shield-check { animation-delay: 1.6s; animation-duration: .6s; }

/* The gap */
.gap-art { margin: clamp(48px, 6vw, 80px) 0 0; }
.art-gap-tall { display: none; }
@media (max-width: 719px) { .art-gap-wide { display: none; } .art-gap-tall { display: block; max-width: 400px; margin: 0 auto; } }
.art-gapline { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 6; }
.art-edge { stroke: var(--line-3); stroke-width: 1.25; }
.art-gnode { stroke-width: 1.5; }
.art-gnode.solid, .art-gnode.loose { fill: var(--ink); stroke: var(--ink); }
.art-bridge { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; }
.art-bridge-pulse { fill: none; stroke: var(--acc); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 100; stroke-dashoffset: 2; opacity: 0; }
.art-anchor { fill: var(--bg); stroke: var(--acc); stroke-width: 2; }
.art-label { font: 600 15px var(--sans); letter-spacing: .08em; fill: var(--ink); }
.art-sub { font: 400 15px var(--sans); fill: var(--ink-2); }
.art-sub.after { fill: var(--acc); }
.art-sub.before { opacity: 0; }
.art-bridge-label { font: 600 13px var(--sans); letter-spacing: .1em; fill: var(--acc); }
/* Before it plays: right cluster loose and unconnected, no bridge. */
.anim .art-gap .art-gnode.loose { fill: var(--bg); stroke-dasharray: 3 3; }
.anim .art-gap .art-edge.late { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim .art-gap .art-bridge { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim .art-gap .art-anchor.late, .anim .art-gap .art-bridge-label, .anim .art-gap .art-sub.after { opacity: 0; }
.anim .art-gap .art-sub.before { opacity: 1; }
/* Playing (site.js adds .play when the graphic scrolls into view). */
.anim .art-gap.play .art-bridge { animation: art-draw 1.6s cubic-bezier(.65, 0, .35, 1) .2s forwards; }
.anim .art-gap.play .art-bridge-label { animation: art-fade .6s ease .9s forwards; }
.anim .art-gap.play .art-anchor.late { animation: art-fade .3s ease 1.7s forwards; }
.anim .art-gap.play .art-edge.late { animation: art-draw .7s ease forwards; }
.anim .art-gap.play .art-edge.late.e0 { animation-delay: 1.8s; } .anim .art-gap.play .art-edge.late.e1 { animation-delay: 1.88s; } .anim .art-gap.play .art-edge.late.e2 { animation-delay: 1.96s; }
.anim .art-gap.play .art-edge.late.e3 { animation-delay: 2.04s; } .anim .art-gap.play .art-edge.late.e4 { animation-delay: 2.12s; } .anim .art-gap.play .art-edge.late.e5 { animation-delay: 2.2s; }
.anim .art-gap.play .art-edge.late.e6 { animation-delay: 2.28s; } .anim .art-gap.play .art-edge.late.e7 { animation-delay: 2.36s; } .anim .art-gap.play .art-edge.late.e8 { animation-delay: 2.44s; }
.anim .art-gap.play .art-gnode.loose { animation: art-solid .5s ease forwards; }
.anim .art-gap.play .art-gnode.loose.g0 { animation-delay: 1.9s; } .anim .art-gap.play .art-gnode.loose.g1 { animation-delay: 2s; } .anim .art-gap.play .art-gnode.loose.g2 { animation-delay: 2.1s; }
.anim .art-gap.play .art-gnode.loose.g3 { animation-delay: 2.2s; } .anim .art-gap.play .art-gnode.loose.g4 { animation-delay: 2.3s; } .anim .art-gap.play .art-gnode.loose.g5 { animation-delay: 2.4s; }
.anim .art-gap.play .art-sub.before { animation: art-fade-out .4s ease 1.9s forwards; }
.anim .art-gap.play .art-sub.after { animation: art-fade .5s ease 2.3s forwards; }
.anim .art-gap.play .art-bridge-pulse { animation: art-travel 2.6s cubic-bezier(.45, 0, .25, 1) 2.8s infinite; }
@keyframes art-solid { to { fill: var(--ink); stroke-dasharray: none; } }
@keyframes art-fade-out { to { opacity: 0; } }
@keyframes art-travel { 0% { stroke-dashoffset: 2; opacity: 1; } 85% { stroke-dashoffset: -98; opacity: 1; } 86%, 100% { stroke-dashoffset: -100; opacity: 0; } }

/* Icons redraw when their card is hovered. */
@media (prefers-reduced-motion: no-preference) {
  .card:hover .tile svg [pathLength] { stroke-dasharray: 1; animation: art-redraw .9s var(--spring); }
}
@keyframes art-redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Scroll reveal: fade + 28px rise + un-blur, CSS-only where supported. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  }
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-transparency: reduce) { .nav-pill { background: var(--bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; } }
@media (prefers-contrast: more) { :root { --line: rgba(0, 0, 0, .4); --ink-2: rgba(0, 0, 0, .8); } [data-theme="dark"] { --line: rgba(255, 255, 255, .45); --ink-2: rgba(255, 255, 255, .8); } }
@media print { .reveal { animation: none !important; } .nav, .footer, .actions { display: none !important; } body { background: #fff; color: #000; } }
