/* weiawaga.me */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/source-sans-3.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/source-sans-3-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-code-pro.woff2") format("woff2");
}

:root {
  --bg: #080b13;
  --bg-t: rgba(8, 11, 19, 0);
  --text: #d5dbe7;
  --strong: #ffffff;
  --muted: #8b94a7;
  --line: rgba(213, 219, 231, 0.13);
  --det: #2f3a5c;
  --trk: #ffd23f;
  --em: #7dff8a;
  --had: #ff7a3c;
  --mu: #ff3b5c;
  --met: #46d7ff;
  --link: #5fdcff;
  --label: #ffd23f;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "SF Mono", Consolas, monospace;
  --measure: 66ch;
  --wrap: 1080px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html {
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--trk); color: #1a1500; }
:focus-visible { outline: 2px solid var(--met); outline-offset: 3px; border-radius: 2px; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(95, 220, 255, 0.45);
}
a:hover { text-decoration-color: var(--link); }

/* Header */

.site {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.6rem var(--pad) 1rem;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.site nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site nav a:hover { color: var(--text); }
.site nav a[aria-current="page"] { color: var(--strong); }
.site nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--label);
  margin-right: 0.55em;
  vertical-align: 0.1em;
}

/* Content */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
}
.prose { max-width: var(--measure); }

h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--strong);
  margin: 1.6rem 0 1rem;
  text-wrap: balance;
}
h2 {
  font: 500 0.74rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--label);
  margin: 2.4rem 0 0.8rem;
}
h3 { font-size: 1.05rem; font-weight: 600; color: var(--strong); margin: 1.8rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1.1rem; text-wrap: pretty; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.3rem; }
li::marker { color: var(--muted); }
strong { color: var(--strong); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
blockquote { margin: 0 0 1.1rem; padding-left: 1rem; border-left: 2px solid var(--det); color: var(--muted); }
code { font-family: var(--mono); font-size: 0.88em; }
pre {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-x: auto;
  padding: 0.9rem 1rem;
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}
pre code { font-size: inherit; }
img { max-width: 100%; height: auto; }

.kicker {
  font: 500 0.74rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 2rem 0 -0.6rem;
}
.subtitle { font-size: 1.25rem; line-height: 1.35; color: var(--muted); margin: -0.4rem 0 1.6rem; text-wrap: balance; }
.meta, .note { font: 400 0.8rem/1.7 var(--mono); color: var(--muted); }
.meta a, .note a { color: var(--muted); text-decoration-color: rgba(139, 148, 167, 0.5); }
.meta a:hover, .note a:hover { color: var(--text); }

table {
  border-collapse: collapse;
  margin: 0 0 1.6rem;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}
th {
  font: 500 0.68rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: left;
  padding: 0 1.6rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
td {
  padding: 0.55rem 1.6rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td:not(:first-child) { font-family: var(--mono); font-size: 0.9rem; }
td strong { color: var(--label); font-weight: 500; }
th:last-child, td:last-child { padding-right: 0; }

/* Home: the event is the navigation. templates/nav.html is generated by tools/make_event.py;
   each physics object is an SVG link with a label, and the list under the event repeats
   them for small screens and screen readers. */

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home .site { border-bottom: 0; }
.home .brand { font-size: clamp(1.3rem, 1rem + 0.8vw, 1.5rem); letter-spacing: -0.015em; }
.home main { padding-top: 0; }
.hero { display: flex; justify-content: center; }
.nav-evt {
  display: block;
  width: min(100%, calc((100vh - 15rem) * 1400 / 1110));   /* leaves the top of the About section above the fold */
  height: auto;
  overflow: visible;
}
.nav-evt .dets { opacity: 0.9; }
.nav-evt .soft { opacity: 0.55; }
.nav-evt a { cursor: pointer; outline: none; }
.nav-evt a, .nav-evt .soft, .nav-evt .dets, .nav-evt .lead, .nav-evt text { transition: opacity 0.25s, fill 0.25s, stroke 0.25s; }
.nav-evt .hit { fill: transparent; stroke: none; }
.nav-evt .vx {
  fill: var(--label);
  opacity: 0;
  animation: evt-fade 1s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.nav-evt .lbl {
  opacity: 0;
  animation: evt-fade 1.2s ease-out forwards;
  animation-delay: var(--d, 3s);
}
.nav-evt .lead { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.7; }
.nav-evt text { font: 500 18px var(--mono); fill: var(--text); letter-spacing: 0.02em; }
.nav-evt .t2 { font-size: 14px; font-weight: 400; fill: var(--muted); }
.nav-evt a:is(:hover, :focus-visible) .t1 { fill: var(--label); }
.nav-evt a:is(:hover, :focus-visible) .t2 { fill: var(--text); }
.nav-evt a:is(:hover, :focus-visible) .lead { stroke: var(--text); opacity: 1; }
.nav-evt a:is(:hover, :focus-visible) .vx { r: 10; filter: drop-shadow(0 0 6px var(--label)); }
.nav-evt a:is(:hover, :focus-visible) .trk { filter: drop-shadow(0 0 5px var(--trk)); }
.nav-evt a:is(:hover, :focus-visible) .mu { filter: drop-shadow(0 0 5px var(--mu)); }
.nav-evt a:is(:hover, :focus-visible) .met { filter: drop-shadow(0 0 5px var(--met)); }
.nav-evt a:is(:hover, :focus-visible) .em { filter: drop-shadow(0 0 5px var(--em)); }
.nav-evt a:is(:hover, :focus-visible) .had { filter: drop-shadow(0 0 5px var(--had)); }
.nav-evt:has(a:is(:hover, :focus-visible)) a:not(:hover, :focus-visible),
.nav-evt:has(a:is(:hover, :focus-visible)) .soft { opacity: 0.18; }
.nav-evt:has(a:is(:hover, :focus-visible)) .dets { opacity: 0.45; }

.about {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(16rem, 1fr);
  gap: 2rem 4rem;
  padding-top: 2.5rem;
  scroll-margin-top: 2rem;
}
.about .prose > h2 { margin-top: 0.2rem; }
.about .prose > h2 + p { font-size: 1.12rem; }
.about .prose .note { margin-top: 1.4rem; }
.key { list-style: none; padding: 0; margin: 0.35rem 0 0; border-top: 1px solid var(--line); }
.key li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.key i { font: 500 0.72rem/1.7 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--label); font-style: normal; }
.key a { color: var(--strong); font-weight: 600; text-decoration: none; }
.key a:hover { color: var(--link); }

@media (min-width: 901px) {
  .home .site nav { display: none; }
}
@media (max-width: 900px) {
  .nav-evt .lbl { display: none; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
}
@media (max-width: 600px) {
  .hero { margin: 0 calc(-1 * var(--pad)); overflow: hidden; }
  .nav-evt { width: 140%; max-width: none; margin: -5% 0; }
}

/* Writing */

.posts { list-style: none; padding: 0; margin: 1.2rem 0; border-top: 1px solid var(--line); }
.posts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.posts li a { color: var(--strong); text-decoration: none; font-weight: 600; }
.posts li a:hover { color: var(--link); }
.posts time { font: 400 0.8rem/1.7 var(--mono); color: var(--muted); }

/* Footer */

.site-foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.2rem var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0;
  font: 400 0.78rem/1.7 var(--mono);
  color: var(--muted);
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.site-foot > * + *::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  margin: 0 0.8rem;
  vertical-align: 0.2em;
  opacity: 0.7;
}

/* Figures: inline SVG charts generated by tools/make_figures.py.
   Interaction is CSS only: radio toggles pick a series, hover reveals values. */

.fig {
  margin: 1.8rem 0 2.2rem;
  position: relative;
  width: min(760px, calc(100% + 200px), calc(100vw - 2 * var(--pad) - 1rem));
}
.fig input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fig-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.fig-title { font: 500 0.74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.fig-toggle { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.fig-toggle label {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
.fig-toggle label:hover { color: var(--text); }
.fig:has(.tog-a:checked) .lab-a, .fig:has(.tog-b:checked) .lab-b,
.fig:has(.tog-c:checked) .lab-c, .fig:has(.tog-d:checked) .lab-d { color: var(--strong); border-color: var(--label); }
.fig .ser { transition: opacity 0.35s; }
.fig:has(.tog-a:checked) :is(.ser-b, .ser-c, .ser-d),
.fig:has(.tog-b:checked) :is(.ser-a, .ser-c, .ser-d),
.fig:has(.tog-c:checked) :is(.ser-a, .ser-b, .ser-d),
.fig:has(.tog-d:checked) :is(.ser-a, .ser-b, .ser-c) { opacity: 0; pointer-events: none; }
.fig-scroll { overflow-x: auto; }
.fig-scroll .chart { display: block; width: 100%; min-width: 520px; height: auto; overflow: visible; }
.fig figcaption { font: 400 0.8rem/1.6 var(--mono); color: var(--muted); margin-top: 0.7rem; }

.chart text { font: 400 11px var(--mono); fill: var(--muted); }
.chart .lbl { fill: var(--text); font-weight: 500; }
.chart .grid { stroke: var(--line); }
.chart .axis { stroke: var(--det); stroke-width: 1.2; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .stem { stroke-width: 2; stroke-linecap: round; }
.chart .band { stroke: none; fill-opacity: 0.16; }
.chart .thr { stroke: var(--trk); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .c-a { stroke: var(--trk); fill: var(--trk); }
.chart .c-b { stroke: var(--met); fill: var(--met); }
.chart .c-c { stroke: var(--em); fill: var(--em); }
.chart .c-d { stroke: var(--had); fill: var(--had); }
.chart .c-m { stroke: var(--muted); fill: var(--muted); }
.chart .band.c-m { fill-opacity: 0.22; }
.chart .line, .chart .stem { fill: none; }
.chart .hit { fill: transparent; stroke: none; }
.chart .pt { cursor: default; }
.chart .tip { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.chart .tip rect { fill: var(--bg); stroke: var(--line); }
.chart .tiptext { fill: var(--text); font-size: 11px; }
.chart .pt:hover .tip, .chart .pt:focus-within .tip { opacity: 1; }
.chart .pt:hover .dot { r: 4.5; }

.chart .line, .chart .stem[pathLength] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: evt-draw 2.2s cubic-bezier(0.3, 0.8, 0.3, 1) forwards;
  animation-delay: 0.2s;
}
.chart .band, .chart .pt, .chart .thr, .chart .stem:not([pathLength]), .chart .dot[style] {
  opacity: 0;
  animation: evt-fade 0.8s ease-out forwards;
  animation-delay: var(--d, 1.2s);
}

/* Architecture diagram: nodes fade in along the flow, wires draw between them,
   hovering a branch dims the others. --c is the branch colour. */

.fig-narrow { width: min(600px, 100%, calc(100vw - 2 * var(--pad) - 1rem)); }
.arch .node rect { fill: rgba(255, 255, 255, 0.03); stroke: rgba(213, 219, 231, 0.3); stroke-width: 1; transition: stroke 0.25s; }
.arch .node.io rect { stroke-dasharray: 4 3; }
.arch .node text { fill: var(--text); }
.arch .node.io text { fill: var(--muted); }
.arch .br-feat { --c: var(--trk); }
.arch .br-name { --c: var(--met); }
.arch .br-gate { --c: var(--em); }
.arch .br-head { --c: rgba(213, 219, 231, 0.7); }
.arch .wire { fill: none; stroke: var(--c); stroke-width: 1.5; stroke-linejoin: round; }
.arch .ah, .arch .dot { fill: var(--c); }
.arch .dim { fill: var(--c); font-size: 10px; }
.arch .op circle { fill: var(--bg); stroke: rgba(213, 219, 231, 0.5); stroke-width: 1.2; }
.arch .op line { stroke: var(--text); stroke-width: 1.2; }
.arch .br { transition: opacity 0.25s; }
.arch:has(.br:hover) .br:not(:hover) { opacity: 0.35; }
.arch .br:hover .node rect { stroke: var(--c); }
.arch .node, .arch .ah, .arch .dim, .arch .op, .arch .dot {
  opacity: 0;
  animation: evt-fade 0.6s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.arch .wire {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: evt-draw 0.5s ease-out forwards;
  animation-delay: var(--d, 0s);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.5rem;
  margin: 1.6rem 0 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-follow { margin-top: -2rem; border-top: 0; }
.stats b { display: block; font: 500 1.55rem/1.1 var(--mono); color: var(--label); letter-spacing: -0.01em; }
.stats span { display: block; font: 400 0.7rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 0.35rem; }

@media (prefers-reduced-motion: reduce) {
  .chart .line, .chart .stem, .chart .band, .chart .pt, .chart .thr, .chart .dot { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .arch .node, .arch .ah, .arch .dim, .arch .op, .arch .dot, .arch .wire { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .arch .br, .arch .node rect { transition: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Background event: one large, dim event display fixed behind every page,
   anchored top right and faded toward the text column. */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg .evt {
  position: absolute;
  width: 1240px;
  height: 1240px;
  right: -560px;
  top: -470px;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(8, 11, 19, 0.7) 70px, var(--bg-t) 170px),
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 46%, rgba(8, 11, 19, 0.9) 56%, var(--bg-t) 80%),
    linear-gradient(180deg, var(--bg-t) 45%, var(--bg) 100%);
}
.bg .dets { opacity: 0.8; }
.bg .trks { opacity: 0.42; }
.bg .deps { opacity: 0.55; }
@media (max-width: 860px) {
  .bg { opacity: 0.85; }
  .bg .evt { width: 900px; height: 900px; right: -450px; top: -400px; }
  .bg::after {
    background:
      linear-gradient(180deg, var(--bg) 0%, rgba(8, 11, 19, 0.75) 90px, var(--bg-t) 220px),
      linear-gradient(90deg, rgba(8, 11, 19, 0.85) 0%, var(--bg-t) 60%),
      linear-gradient(180deg, var(--bg-t) 20%, var(--bg) 65%);
  }
}

.evt { overflow: visible; }
.evt .rot {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: evt-spin 240s linear infinite;
}
.evt .det {
  stroke: var(--det);
  stroke-width: 1.8;
  opacity: 0;
  animation: evt-fade 1.4s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.evt .sol { stroke-width: 3; }
.evt .trk {
  stroke: var(--trk);
  stroke-width: 2.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: evt-draw 3s cubic-bezier(0.3, 0.8, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}
.evt .mu { stroke: var(--mu); stroke-width: 2.6; }
.evt .dep {
  opacity: 0;
  animation: evt-fade 1.2s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.evt .em { fill: var(--em); }
.evt .had { fill: var(--had); }
.evt .met {
  stroke: var(--met);
  stroke-width: 2.4;
  stroke-dasharray: 16 10;
  stroke-linecap: round;
  opacity: 0;
  animation: evt-fade 1.2s ease-out forwards, evt-march 12s linear infinite;
  animation-delay: var(--d, 0s), 0s;
}

@keyframes evt-spin { to { transform: rotate(360deg); } }
@keyframes evt-fade { to { opacity: 1; } }
@keyframes evt-draw { to { stroke-dashoffset: 0; } }
@keyframes evt-march { to { stroke-dashoffset: -52; } }

@media (prefers-reduced-motion: reduce) {
  .evt .rot, .evt .det, .evt .dep, .evt .met, .evt .trk, .nav-evt .lbl, .nav-evt .vx { animation: none; }
  .evt .det, .evt .dep, .evt .met, .nav-evt .lbl, .nav-evt .vx { opacity: 1; }
  .nav-evt a, .nav-evt .soft, .nav-evt .dets, .nav-evt .lead, .nav-evt text { transition: none; }
  .evt .trk { stroke-dashoffset: 0; }
}

/* Inner pages show the finished event: no entrance, just the slow turn and the drifting dashes. */

.bg .evt .det, .bg .evt .dep { animation: none; opacity: 1; }
.bg .evt .trk { animation: none; stroke-dashoffset: 0; }
.bg .evt .met { animation: evt-march 12s linear infinite; animation-delay: 0s; opacity: 1; }

/* Page art: one drawing per inner page from templates/art/, generated by tools/make_art.py.
   It takes the event's place and fade. Elements with .in fade in and .draw draw themselves after
   their --d delay; the panopticon then keeps moving on its own. */

/* anchored to the content column, not the window edge: beside the text on wide screens, tucked right on narrow ones */
.bg .art { position: absolute; width: 820px; height: 820px; left: min(calc(50% + 10px), calc(100% - 620px)); top: -90px; overflow: visible; }
.art text { font: 400 12px var(--mono); fill: var(--muted); }
.art .in { opacity: 0; animation: evt-fade 0.9s ease-out forwards; animation-delay: var(--d, 0s); }
.art .draw {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: evt-draw 2.4s cubic-bezier(0.3, 0.8, 0.3, 1) forwards;
  animation-delay: var(--d, 0.2s);
}

/* Weiawaga: bitboard */
.a-weiawaga .grid line { stroke: var(--det); stroke-width: 1.4; }
.a-weiawaga .grid .dark { fill: rgba(255, 255, 255, 0.03); }
.a-weiawaga .ray { fill: var(--trk); fill-opacity: 0.16; stroke: var(--trk); stroke-opacity: 0.35; }
.a-weiawaga .kn { fill: var(--met); fill-opacity: 0.16; stroke: var(--met); stroke-opacity: 0.35; }
.a-weiawaga .cap { fill: var(--mu); fill-opacity: 0.2; stroke: var(--mu); stroke-opacity: 0.5; }
.a-weiawaga .pc.w { fill: var(--text); }
.a-weiawaga .pc.b { fill: #55618a; }
.a-weiawaga .pc.q { fill: var(--trk); }
.a-weiawaga .pc.n.w { fill: var(--met); }
.a-weiawaga .ring { fill: none; stroke: var(--bg); stroke-width: 2; }

/* Physics: drift tubes */
.a-physics .tube { fill: none; stroke: var(--det); stroke-width: 1.8; }
.a-physics .wire { fill: var(--det); }
.a-physics .mu { stroke: var(--mu); stroke-width: 2.4; }
.a-physics .drift { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-dasharray: 4 4; }

/* Publications: resonance search */
.bg .a-publications { top: -10px; }
.a-publications .axis { stroke: var(--det); stroke-width: 1.5; }
.a-publications .tick { stroke: var(--det); stroke-width: 1.2; }
.a-publications .bkg { fill: var(--det); fill-opacity: 0.5; stroke: var(--det); }
.a-publications .sig { fill: var(--trk); fill-opacity: 0.6; }
.a-publications .fit { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 5; opacity: 0.8; }
.a-publications .dat { fill: var(--text); }
.a-publications .err { stroke: var(--text); stroke-width: 1.2; }
.a-publications .band { fill: var(--det); fill-opacity: 0.35; }
.a-publications .unity { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }

/* PanoptOS: panopticon */
.a-panoptos .wallband { fill: rgba(85, 97, 138, 0.2); }
.a-panoptos .line { stroke: #55618a; stroke-width: 1.3; }
.a-panoptos .base { stroke: #55618a; stroke-width: 2.2; }
.a-panoptos .part { stroke: var(--det); stroke-width: 0.9; }
.a-panoptos .lodge { fill: none; stroke: #55618a; stroke-width: 1.6; }
.a-panoptos .eye { fill: var(--trk); }
.a-panoptos .skill { font-size: 10.5px; letter-spacing: 0.06em; }
.a-panoptos .cell {
  fill: var(--trk);
  fill-opacity: var(--h);
  opacity: 0;
  animation: evt-fade 0.8s ease-out forwards, pan-lit 24s linear infinite;
  animation-delay: var(--d), var(--t);
}
.a-panoptos .acct {
  fill: var(--muted);
  opacity: 0;
  animation: evt-fade 0.6s ease-out forwards, pan-loop var(--p) ease-in-out infinite;
  animation-delay: var(--d), var(--s);
}
.a-panoptos .acct.bot { fill: var(--text); }
.a-panoptos .acct.human { animation-name: evt-fade, pan-wander; }
.a-panoptos .acct.churn {
  animation: evt-fade 0.6s ease-out forwards, pan-loop var(--p) ease-in-out infinite, pan-churn 24s linear infinite;
  animation-delay: var(--d), var(--s), var(--t);
}
.a-panoptos .xp { fill: var(--trk); opacity: 0; animation: pan-xp var(--p) linear infinite; animation-delay: var(--s); }
.a-panoptos .xp.human { animation-name: pan-xp-h; }
.a-panoptos .beam { transform-box: view-box; transform-origin: 560px 690px; animation: evt-spin 24s linear infinite; }
.a-panoptos .wd { fill: var(--trk); }
.a-panoptos .ray { stroke: var(--trk); stroke-width: 1; opacity: 0.7; }

@keyframes pan-lit { 0%, 4% { fill-opacity: calc(var(--h) + var(--f)); } 18%, 100% { fill-opacity: var(--h); } }
@keyframes pan-loop { 0%, 12% { transform: translate(0, 0); } 38%, 62% { transform: translate(var(--dx), var(--dy)); } 88%, 100% { transform: translate(0, 0); } }
@keyframes pan-wander {
  0%, 18% { transform: translate(0, 0); }
  28% { transform: translate(calc(var(--dx) * 0.55 + var(--lx)), calc(var(--dy) * 0.55 + var(--ly))); }
  42%, 54% { transform: translate(var(--dx), var(--dy)); }
  64% { transform: translate(calc(var(--dx) * 0.45 - var(--lx)), calc(var(--dy) * 0.45 - var(--ly))); }
  74%, 100% { transform: translate(0, 0); }
}
@keyframes pan-xp { 0%, 40% { opacity: 0; transform: translate(0, 0); } 44% { opacity: 1; } 60%, 100% { opacity: 0; transform: translate(0, -14px); } }
@keyframes pan-xp-h { 0%, 44% { opacity: 0; transform: translate(0, 0); } 47% { opacity: 1; } 58%, 100% { opacity: 0; transform: translate(0, -14px); } }
@keyframes pan-churn {
  0%, 3% { fill: var(--text); opacity: 1; }
  6%, 14% { fill: var(--mu); opacity: 1; }
  20%, 70% { fill: var(--mu); opacity: 0; }
  78%, 100% { fill: var(--text); opacity: 1; }
}

@media (max-width: 860px) {
  .bg .art { width: 560px; height: 560px; left: auto; right: -260px; top: 40px; opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .art .in, .art .draw, .a-panoptos .cell, .a-panoptos .acct, .a-panoptos .beam { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .a-panoptos .xp { animation: none; opacity: 0; }
}

/* 404: the event comes forward a little */

.notfound .bg .evt { right: -440px; top: -400px; }
.notfound .bg .trks { opacity: 0.6; }
.notfound .bg .deps { opacity: 0.75; }
.notfound .bg::after {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(8, 11, 19, 0.55) 70px, var(--bg-t) 170px),
    linear-gradient(90deg, var(--bg) 0%, rgba(8, 11, 19, 0.85) 36%, var(--bg-t) 62%),
    linear-gradient(180deg, var(--bg-t) 55%, var(--bg) 100%);
}

/* Page transitions: a crossfade between pages in browsers with cross-document view transitions. */

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Small screens */

@media (max-width: 520px) {
  .key li { grid-template-columns: 1fr; gap: 0.1rem; }
  .site nav { width: 100%; margin-left: 0; justify-content: space-between; gap: 0.5rem; }
  .site nav a { font-size: 0.86rem; }
  .site nav a[aria-current="page"]::before { margin-right: 0.4em; }
}
@media (max-width: 40rem) {
  table { display: block; overflow-x: auto; }
}
