/* G8DR1CH Studio, engineering look (home and /games): graphite grid, silver marks, cyan and gold accents, cut corners. */
:root {
  --bg: #070b0c; --line: #12201f; --grid: #0d1719; --panel: #0c1416; --edge: #1c3236;
  --text: #d8dee0; --muted: #8fa3a6; --dim: #7a8f92; --cyan: #5de1e6; --gold: #ffd23f; --ember: #ff9a2e;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace; --sans: "Saira", system-ui, sans-serif;
  --cut: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; background-attachment: fixed;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }

.top { position: sticky; top: 0; z-index: 10; background: rgba(7, 11, 12, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .14em; font-size: 14px; }
.logo img { width: 34px; height: auto; }
.logo span { color: var(--dim); }
.top nav { display: flex; gap: 20px; font: 13px var(--mono); color: var(--muted); }
.top nav a { text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--cyan); }

.hero { padding: 84px 0 40px; position: relative; overflow: hidden; }
.hero .live { position: absolute; right: -40px; top: 40px; width: 520px; opacity: .14; pointer-events: none; }
.path { font: 13px var(--mono); color: var(--cyan); }
h1 { font-size: clamp(42px, 8vw, 88px); line-height: 1.02; margin: 14px 0 0; font-weight: 600; letter-spacing: -.01em; }
h1 .c { color: var(--cyan); } h1 .g { color: var(--gold); }
.lead { color: var(--muted); max-width: 600px; font-size: 18px; margin: 20px 0 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { font: 14px var(--mono); text-decoration: none; padding: 12px 20px; display: inline-block; }
.btn.primary { background: var(--cyan); color: #04100f; }
.btn.line { position: relative; isolation: isolate; background: var(--gold); color: var(--gold); }
.btn.line::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--bg); clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }
.card .btn.line::before, .feature .btn.line::before { background: var(--panel); }
.bits { font: 12px var(--mono); color: #1d5a60; letter-spacing: .3em; white-space: nowrap; overflow: hidden; margin-top: 40px; }

.term { background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); max-width: 720px; }
.term .bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--edge); font: 12px var(--mono); color: var(--dim); }
.term .bar i { width: 9px; height: 9px; display: inline-block; }
.term pre { margin: 0; padding: 16px 18px; font: 14px/1.9 var(--mono); white-space: pre-wrap; }
.term .p { color: var(--dim); } .term .a { color: var(--cyan); } .term .y { color: var(--gold); }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 12px 0; margin: 56px 0 0; }
.strip .run { display: flex; gap: 32px; width: max-content; animation: run 40s linear infinite; font: 13px var(--mono); color: #8fb3b8; }
.strip .run span::before { content: "◆ "; color: var(--cyan); }
@keyframes run { to { transform: translateX(-50%); } }

section.block { padding: 72px 0 8px; }
.label { font: 13px var(--mono); color: var(--cyan); }
.label.gold { color: var(--gold); }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 6px 0 10px; font-weight: 600; }
.intro { color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); padding: 20px; }
.card .file { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--dim); }
.card .file b { color: var(--cyan); font-weight: 400; }
.card.gold .file b { color: var(--gold); }
.card h3 { font-size: 19px; margin: 10px 0 6px; font-weight: 600; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font: 11px var(--mono); color: #8fb3b8; box-shadow: inset 0 0 0 1px var(--edge); padding: 3px 8px; }

.log { border-left: 1px solid var(--edge); margin-left: 6px; }
.log .row { position: relative; padding: 0 0 22px 26px; }
.log .row::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; background: var(--cyan); }
.log .when { font: 12px var(--mono); color: var(--dim); }
.log .what { font-weight: 600; }
.log .where { color: var(--muted); font-size: 15px; }

.awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 24px; }
.awards li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.awards b { display: block; font-weight: 600; }
.awards span { font: 12px var(--mono); color: var(--dim); }

.paper { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.paper h3 { font-size: 22px; margin: 10px 0 6px; }

.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); }
.feature .art { background: #04100f; min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.feature .art img { width: 100%; height: 100%; object-fit: contain; }
.feature .body { padding: 26px; }
.feature .marks { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.feature .marks img { height: 44px; width: auto; }
.feature .marks .word { height: 26px; }
.shots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shots img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; box-shadow: inset 0 0 0 1px var(--edge); }

.contact { margin: 80px 0 0; padding: 40px 0; border-top: 1px solid var(--line); }
.contact .term { max-width: 520px; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
footer .sig { display: flex; align-items: center; gap: 12px; }
footer .sig img { height: 22px; width: auto; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; font: 13px var(--mono); }
footer a { text-decoration: none; } footer a:hover { color: var(--cyan); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .strip .run, .cursor { animation: none; } }
@media (max-width: 720px) {
  .top nav { gap: 12px; font-size: 12px; } .top nav .hide-sm { display: none; }
  .hero { padding-top: 56px; } .hero .live { display: none; }
  .feature, .paper { grid-template-columns: 1fr; }
}

/* Legal pages (privacy, terms), generated by the netforge repo tools/site/build.py. */
.legal { padding-top: 48px; padding-bottom: 64px; max-width: 820px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); margin: 10px 0 18px; }
.legal h2 { font-size: 22px; margin: 34px 0 8px; color: var(--cyan); }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--gold); }
.legal code { font-family: var(--mono); font-size: 13px; color: var(--text); }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.legal th { font: 12px var(--mono); color: var(--dim); }

.gh { display: inline-block; vertical-align: -3px; }
.top nav .ghlink { display: inline-flex; align-items: center; }
footer nav .gh { margin-right: 4px; }

/* Card dynamics (D: site v2): pointer spotlight, lift, edge glow, scan line on hover; titles type in once seen. */
.card { position: relative; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; --mx: 50%; --my: 50%; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(93, 225, 230, .13), transparent 60%); }
.card.gold::before { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 210, 63, .12), transparent 60%); }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.card.gold::after { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(93, 225, 230, .55); }
.card.gold:hover { box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .55); }
.card:hover::before { opacity: 1; }
.card:hover::after { animation: scan 1.4s ease-in-out infinite; }
@keyframes scan { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.card .file b { transition: text-shadow .3s; }
.card:hover .file b { text-shadow: 0 0 10px currentColor; }
.card .file::before { content: "● "; color: var(--dim); transition: color .3s; }
.card:hover .file::before { color: var(--cyan); }
.card.gold:hover .file::before { color: var(--gold); }
.tags span { transition: color .3s, box-shadow .3s, transform .3s; }
.card:hover .tags span { color: var(--text); box-shadow: inset 0 0 0 1px #2b5459; }
.card:hover .tags span:nth-child(2) { transition-delay: .05s; } .card:hover .tags span:nth-child(3) { transition-delay: .1s; }
.card h3 .caret { display: inline-block; width: .5em; color: var(--cyan); animation: blink 1s steps(1) infinite; }
.grid .card.reveal { transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.term pre .line { display: block; opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .35s; }
.term pre .line.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; } .card:hover::after { animation: none; }
  .term pre .line { opacity: 1; transform: none; }
}

/* Paper walkthrough: five steps, tabs with a moving gold bar, figures from the paper with credit. */
.paperflow .steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 12px 0 14px; }
.paperflow .step { font: 13px var(--mono); color: var(--muted); background: var(--panel); border: 0; padding: 12px 10px; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--edge); transition: color .25s, box-shadow .25s; }
.paperflow .step span { display: block; color: var(--dim); font-size: 11px; margin-bottom: 2px; }
.paperflow .step:hover, .paperflow .step[aria-selected="true"] { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .5); }
.paperflow .bar { position: absolute; left: 0; bottom: -4px; height: 2px; background: var(--gold); width: calc((100% - 24px) / 5); transition: transform .45s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 10px var(--gold); }
.paperflow .panes { padding: 24px; }
.paperflow .pane h3 { font-size: 22px; }
.paperflow .pane p { max-width: 760px; }
.paperflow .pane code { font-family: var(--mono); color: var(--gold); }
.paperflow .figs { display: grid; gap: 14px; margin-top: 18px; }
.paperflow figure { margin: 0; background: #fff; padding: 14px; max-width: 760px; }
.paperflow figure img { width: 100%; height: auto; }
.paperflow figcaption { font: 11px/1.5 var(--mono); color: #5b6466; margin-top: 10px; }
.paperflow figcaption a { color: #2b6f74; }
.js .paperflow .pane { display: none; }
.js .paperflow .pane.on { display: block; animation: paneIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.js .paperflow .pane.on figure { animation: paneIn .5s .08s both; }
@media (max-width: 720px) { .paperflow .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .paperflow .bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .js .paperflow .pane.on, .js .paperflow .pane.on figure { animation: none; } }
.paperflow figure:has(img[src*="/eq"]) { max-width: 520px; }
section[id], [data-flow], .contact { scroll-margin-top: 80px; }
.mnu { display: none; }
@media (max-width: 720px) {
  .top nav > a:not(.ghlink) { display: none; }
  .mnu { display: block; position: relative; }
  .mnu summary { list-style: none; color: var(--cyan); cursor: pointer; padding: 6px 10px; box-shadow: inset 0 0 0 1px var(--cyan); }
  .mnu summary::-webkit-details-marker { display: none; }
  .mnu div { position: absolute; right: 0; top: 40px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); padding: 10px 0; min-width: 180px; }
  .mnu div a { display: block; padding: 8px 18px; color: var(--muted); text-decoration: none; }
  .mnu div a::before { content: "\203A  "; color: var(--cyan); }
}
.term .err { color: #ff8a7a; }
.cite { font: 13px/1.8 var(--mono); color: var(--muted); margin: 6px 0 0; }
.cite b { color: var(--text); font-weight: 500; }
.bib { background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); padding: 14px; font: 12px/1.7 var(--mono); color: #8fb3b8; white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; }
button.btn { border: 0; cursor: pointer; }
.cf { max-width: 720px; }
.cf .in { padding: 18px; }
.cf label { display: block; font: 13px var(--mono); color: var(--cyan); margin-bottom: 12px; }
.cf input, .cf select, .cf textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; background: var(--bg); border: 0; box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font: 14px var(--mono); padding: 10px; }
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--cyan); }
.cf .or { font: 13px var(--mono); color: var(--muted); margin: 16px 0 0; }
.cf .y { color: var(--gold); }
.play { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; padding: 7px 14px; border-radius: 7px; box-shadow: 0 0 0 1px #a6a6a6; margin-top: 16px; }
.play span { font: 600 17px/1 system-ui, sans-serif; }
.play small { display: block; font: 500 9px/1.3 system-ui, sans-serif; letter-spacing: .04em; }
.byline { font: 13px var(--mono); color: var(--muted); margin-top: 14px; }
.lineage { font: 13px var(--mono); color: var(--gold); margin: 14px 0 14px 18px; }
.cred { display: inline-block; font: 13px var(--mono); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .5); padding: 6px 12px; margin: -12px 0 26px; }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.samples span { flex-basis: 100%; font: 11px var(--mono); color: var(--dim); }
.samples button { width: 74px; height: 54px; padding: 0; border: 0; background: #081012; box-shadow: inset 0 0 0 1px var(--edge); cursor: zoom-in; opacity: .85; }
.samples button:hover, .samples button:focus-visible { opacity: 1; outline: 1px solid var(--cyan); outline-offset: 2px; }
.samples img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.lb { border: 0; padding: 0; background: none; max-width: min(1100px, 94vw); color: var(--text); }
.lb::backdrop { background: rgba(4, 8, 9, .92); }
.lb figure { margin: 0; background: var(--panel); padding: 14px; max-height: 78vh; overflow: auto; }
.lb img { max-width: 100%; height: auto; display: block; }
.samples .eq { font: 9px/1.3 var(--mono); color: var(--gold); padding: 4px; text-align: left; overflow: hidden; }
.mt { padding: 6px 10px; color: var(--text); overflow-x: auto; }
.mt math { font-size: 18px; margin: 6px 0 14px; }
.mt .c { font: 12px var(--mono); color: var(--muted); }
.lb figcaption { font: 13px var(--mono); color: var(--text); background: var(--bg); margin: 14px -14px -14px; padding: 12px 14px; }
.lb form { text-align: center; margin-top: 10px; }
.lb .x { font: 13px var(--mono); color: var(--cyan); background: none; border: 1px solid var(--cyan); padding: 6px 12px; cursor: pointer; }
.grid .card { display: flex; flex-direction: column; }
.grid .card .tags { margin-top: auto; padding-top: 12px; }
.tags { gap: 4px; }
.tags span { font-size: 10px; padding: 2px 6px; }
.samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.samples span { grid-column: 1 / -1; }
.samples button { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.grid .card h3 { white-space: nowrap; overflow: hidden; }
.card h3 .mq { display: inline-flex; gap: 2.5em; animation: mq var(--mqd, 10s) linear infinite; }
.card:hover h3 .mq { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 1.25em)); } }
.mt pre.code { font: 13px/1.7 var(--mono); color: var(--text); margin: 8px 0 12px; white-space: pre; }
.mt pre.code .k { color: var(--cyan); }
@media (prefers-reduced-motion: reduce) { .grid .card h3 { white-space: normal; } }
.cf .fld { font: 13px var(--mono); color: var(--cyan); margin-bottom: 12px; }
.pick { position: relative; margin-top: 6px; }
.pick .pbtn { display: flex; justify-content: space-between; align-items: center; width: 100%; background: var(--bg); border: 0; box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font: 14px var(--mono); padding: 10px; text-align: left; cursor: pointer; }
.pick .pbtn:focus, .pick .pbtn[aria-expanded="true"] { outline: 0; box-shadow: inset 0 0 0 1px var(--cyan); }
.pick .car { color: var(--cyan); }
.pick ul { position: absolute; z-index: 5; left: 0; right: 0; list-style: none; margin: 4px 0 0; padding: 4px 0; background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge), 0 10px 30px #0008; outline: 0; }
.pick li { font: 14px var(--mono); color: var(--text); padding: 7px 10px 7px 26px; position: relative; cursor: pointer; }
.pick li[aria-selected="true"] { color: var(--cyan); }
.pick li[aria-selected="true"]::before { content: '>'; position: absolute; left: 10px; }
.pick li.hi { background: #5de1e614; }
.path .say { margin-left: 10px; color: var(--dim); }
.path .say .ipa { color: var(--text); }
.path .say i { color: var(--muted); }
.path .say b { font-weight: 400; color: var(--gold); }
.svc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.svc .card { display: flex; flex-direction: column; }
.svc .card p { margin: 8px 0 0; }
.svc .more { margin-top: 12px; font: 13px var(--mono); color: var(--cyan); }
.stage { position: relative; display: block; width: 100%; margin-top: 16px; padding: 0; border: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #081012; box-shadow: inset 0 0 0 1px var(--edge); cursor: zoom-in; }
.stage:hover { box-shadow: inset 0 0 0 1px var(--cyan); }
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 0 0; transition: transform 1.4s cubic-bezier(.65, 0, .35, 1), opacity .8s; }
.stage .grid0 { position: absolute; inset: 0; background: linear-gradient(#5de1e60d 1px, transparent 1px) 0 0 / 100% 18px, linear-gradient(90deg, #5de1e60d 1px, transparent 1px) 0 0 / 18px 100%; pointer-events: none; }
.stage .vig { position: absolute; inset: 0; box-shadow: inset 0 0 60px 20px #000a; pointer-events: none; }
.stage .ret { position: absolute; opacity: 0; pointer-events: none; transition: all 1.4s cubic-bezier(.65, 0, .35, 1), opacity .4s; }
.stage .ret i { position: absolute; width: 12px; height: 12px; border: 2px solid var(--gold); }
.stage .ret i:nth-child(1) { left: -6px; top: -6px; border-right: 0; border-bottom: 0; }
.stage .ret i:nth-child(2) { right: -6px; top: -6px; border-left: 0; border-bottom: 0; }
.stage .ret i:nth-child(3) { left: -6px; bottom: -6px; border-right: 0; border-top: 0; }
.stage .ret i:nth-child(4) { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
.stage .ret b { position: absolute; left: -6px; top: -26px; font: 500 10px var(--mono); color: #04100f; background: var(--gold); padding: 2px 6px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.stage .hud, .stage .phase, .stage .rec { position: absolute; font: 10px var(--mono); letter-spacing: .06em; pointer-events: none; }
.stage .hud { left: 10px; bottom: 8px; color: var(--cyan); opacity: 0; transition: opacity .4s; }
.stage .phase { left: 10px; top: 8px; color: var(--cyan); }
.stage .rec { right: 10px; top: 8px; color: #ff8a7a; opacity: 0; transition: opacity .4s; }
.stage .rec::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff8a7a; margin-right: 6px; animation: blink 1s steps(2) infinite; }
.stage.lock .ret, .stage.lock .hud, .stage.lock .rec { opacity: 1; }
.stage.draw svg text { opacity: 0; animation: dT 3.6s forwards; }
.stage.draw svg polygon, .stage.draw svg circle, .stage.draw svg rect:not(:first-child) { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; animation: dR 3.6s forwards; }
.stage.draw svg line, .stage.draw svg path:not(marker path) { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dP 3.6s forwards; }
@keyframes dR { 0% { stroke-dashoffset: 1; fill-opacity: 0; } 60% { stroke-dashoffset: 0; fill-opacity: 0; } 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes dP { 0%, 30% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes dT { 0%, 55% { opacity: 0; } 100% { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
.cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font: 11px var(--mono); color: var(--dim); }
.cap em { font-style: normal; color: var(--cyan); white-space: nowrap; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.trio div { background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); padding: 16px; font-size: 15px; line-height: 1.55; }
.trio b { display: block; font: 12px var(--mono); color: var(--cyan); margin-bottom: 8px; font-weight: 400; }
.svcpage .stage { aspect-ratio: 16 / 9; max-width: 900px; }
@media (max-width: 700px) { .trio { grid-template-columns: 1fr; } }
.stage .eqv { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; transform-origin: 0 0; transition: transform 1.4s cubic-bezier(.65, 0, .35, 1), opacity .8s; }
.stage .eqv .mt { margin: 0; width: 100%; }
.stage .eqv .c { font: 10px var(--mono); color: var(--dim); margin: 6px 0 2px; }
.stage .eqv math { font-size: 13px; color: var(--text); }
.stage .eqv pre.code { font-size: 11px; }
.stage.write .eqv mi, .stage.write .eqv mo, .stage.write .eqv mn, .stage.write .eqv mtext, .stage.write .eqv .c, .stage.write .eqv pre { opacity: 0; animation: dT2 .5s forwards; }
@keyframes dT2 { to { opacity: 1; } }
.sbar { display: flex; gap: 4px; margin-top: 8px; }
.sbar i { flex: 1; height: 2px; background: var(--edge); transition: background .3s; }
.sbar i.on { background: var(--cyan); }
.grid.slide { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; outline: 0; }
.grid.slide::-webkit-scrollbar { display: none; }
.grid.slide > .card { scroll-snap-align: start; min-width: 0; }
.grid.slide .card > p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.grid.slide .card:hover > p, .grid.slide .card:focus-within > p { -webkit-line-clamp: 12; }
.snav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.snav .arw { display: flex; gap: 8px; }
.snav .arw button { width: 42px; height: 42px; border: 0; background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); color: var(--cyan); font: 16px var(--mono); cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: box-shadow .2s, opacity .2s; }
.snav .arw button:hover { box-shadow: inset 0 0 0 1px var(--cyan); }
.snav .arw button:disabled { opacity: .3; cursor: default; }
.snav .nodes { display: flex; flex: 1; max-width: 420px; }
.snav .nodes button { position: relative; flex: 1; height: 22px; border: 0; background: none; padding: 0; cursor: pointer; }
.snav .nodes button::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--edge); }
.snav .nodes button:first-child::before { left: 50%; }
.snav .nodes button:last-child::before { right: 50%; }
.snav .nodes button::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--dim); transition: all .3s; }
.snav .nodes button.in::after { box-shadow: inset 0 0 0 1px var(--cyan); }
.snav .nodes button.on::after { background: var(--cyan); box-shadow: 0 0 10px #5de1e6aa; transform: scale(1.3); }
.snav .count { font: 12px var(--mono); color: var(--dim); min-width: 84px; text-align: right; }
.log .more-rows { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s cubic-bezier(.65, 0, .35, 1); }
.log .more-rows > div { overflow: hidden; }
.log.open .more-rows { grid-template-rows: 1fr; }
.log .more-rows .row { opacity: 0; transform: translateY(-8px); transition: opacity .4s, transform .4s; }
.log.open .more-rows .row { opacity: 1; transform: none; }
.tog { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0 32px; font: 13px var(--mono); color: var(--cyan); background: none; border: 0; box-shadow: inset 0 0 0 1px var(--edge); padding: 8px 12px; cursor: pointer; }
.tog:hover { box-shadow: inset 0 0 0 1px var(--cyan); }
.tog .ch { display: inline-block; transition: transform .4s; }
.tog[aria-expanded="true"] .ch { transform: rotate(180deg); }
@media (max-width: 900px) { .grid.slide { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 600px) { .grid.slide { grid-auto-columns: 88%; } }
@media (prefers-reduced-motion: reduce) { .grid.slide { scroll-behavior: auto; } .log .more-rows, .log .more-rows .row { transition: none; } }
.grid .cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stage svg line, .stage svg circle, .stage svg polygon { transition: stroke .3s, fill .3s, opacity .3s; }
.stage svg line.fire { stroke: #5de1e6; opacity: 1; stroke-width: 1.6; }
.stage svg circle.fire { fill: #5de1e6; stroke: #5de1e6; filter: drop-shadow(0 0 4px #5de1e6); }
.stage svg circle.fire.out { fill: #ffd23f; stroke: #ffd23f; filter: drop-shadow(0 0 6px #ffd23f); }
.stage svg polygon.fire { stroke: #ffd23f; fill: #1d1a0c; }
.svc .card > p { margin-bottom: 16px; }
.svc .stage { margin-top: auto; }
.fs { position: relative; display: block; overflow: hidden; }
.fs img { display: block; transform-origin: 0 0; transition: transform 1.4s cubic-bezier(.65, 0, .35, 1); clip-path: inset(0 0 100% 0); }
.fs.scan img { animation: wipe 2.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
.fs .bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--cyan); box-shadow: 0 0 14px 4px #5de1e688; opacity: 0; pointer-events: none; }
.fs.scan .bar { animation: barmove 2.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes barmove { 0% { top: 0; opacity: 1; } 95% { top: 100%; opacity: 1; } 100% { top: 100%; opacity: 0; } }
.fs .dim { position: absolute; inset: 0; background: #0002; opacity: 0; transition: opacity .6s; pointer-events: none; }
.fs .ret { position: absolute; opacity: 0; pointer-events: none; transition: all 1.4s cubic-bezier(.65, 0, .35, 1), opacity .4s; }
.fs .ret i { position: absolute; width: 14px; height: 14px; border: 2px solid #d9a400; }
.fs .ret i:nth-child(1) { left: -7px; top: -7px; border-right: 0; border-bottom: 0; }
.fs .ret i:nth-child(2) { right: -7px; top: -7px; border-left: 0; border-bottom: 0; }
.fs .ret i:nth-child(3) { left: -7px; bottom: -7px; border-right: 0; border-top: 0; }
.fs .ret i:nth-child(4) { right: -7px; bottom: -7px; border-left: 0; border-top: 0; }
.fs .ret b { position: absolute; left: -7px; top: -28px; font: 500 11px var(--mono); color: #04100f; background: var(--gold); padding: 3px 7px; white-space: nowrap; }
.fs .hud { position: absolute; left: 8px; bottom: 6px; font: 10px var(--mono); color: #0b6f73; letter-spacing: .06em; opacity: 0; transition: opacity .4s; }
.fs.lock .ret, .fs.lock .hud, .fs.lock .dim { opacity: 1; }
pre.bib .k { color: var(--cyan); }
pre.bib .hl { background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 2px no-repeat; transition: background-size .8s, color .8s; }
pre.bib .hl.on { background-size: 100% 2px; color: var(--gold); }
pre.bib .cur { display: inline-block; width: .55em; background: var(--cyan); animation: blink 1s steps(2) infinite; }
.ping { animation: ping 1.2s ease-out 2; }
@keyframes ping { 50% { transform: scale(1.06); filter: brightness(1.35); } }
