:root {
  --bg: #0B0B0C;
  --panel: #0E0E10;
  --tile: #111113;
  --line: #1F1F21;
  --line-2: #232325;
  --line-3: #2A2A2C;
  --fg: #EDEDEC;
  --fg-2: #C9C9C6;
  --muted: #8A8A87;
  --dim: #6B6B69;
  --faint: #4A4A48;
  --accent: #9DBBFF;
  --accent-2: #7AA7FF;
  --danger: #F07272;
  --ok: #5BD39A;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font-family: Geist, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }

.mono { font-family: 'Geist Mono', ui-monospace, monospace; }

/* Dither background */
.dither {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 900px;
  image-rendering: pixelated;
  pointer-events: none;
}

.page {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 44px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.page--detail { gap: 64px; }

/* Animations */
@keyframes fu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes runOk { 0% { left: 0; opacity: 0; } 6% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes runFail {
  0% { left: 0; opacity: 0; background: var(--fg); }
  6% { opacity: 1; }
  55% { left: 62%; background: var(--fg); transform: scale(1); }
  62% { left: 64%; background: var(--danger); transform: scale(2.2); }
  80% { left: 64%; opacity: 0; transform: scale(3); }
  100% { left: 64%; opacity: 0; }
}
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(122, 167, 255, 0); } 50% { box-shadow: 0 0 0 6px rgba(122, 167, 255, .15); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes shake { 0%, 40%, 100% { transform: none; } 44% { transform: translateX(-3px); } 48% { transform: translateX(3px); } 52% { transform: translateX(-2px); } 56% { transform: none; } }

.fu { animation: fu .8s var(--ease) both; }
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .2s; }
.d3 { animation-delay: .3s; }
.d15 { animation-delay: .15s; }
.d45 { animation-delay: .45s; }
.d6 { animation-delay: .6s; }

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.top .name { font-weight: 500; }
.top nav { display: flex; gap: 20px; }
.top nav a, .top .back { color: var(--muted); }
.top nav a:hover, .top .back:hover { color: var(--fg); }

.tabs { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.tabs a { font-size: 13px; color: var(--dim); transition: color .2s; }
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--fg); }

/* Hero */
.stack { display: flex; flex-direction: column; gap: 20px; }

.avail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.dot { position: relative; width: 7px; height: 7px; }
.dot::before, .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
}
.dot::after { animation: ping 1.8s ease-out infinite; }

h1 { margin: 0; font-weight: 500; text-wrap: pretty; }
.hero-title { font-size: 34px; line-height: 1.2; letter-spacing: -.025em; }
.lede { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }

.label { font-size: 13px; color: var(--dim); }

/* Flow diagram */
.flow-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.flow { display: flex; flex-direction: column; gap: 14px; }
.flow-title { font-size: 12px; color: var(--dim); }
.flow-title.accent { color: var(--accent); }
.flow-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.flow-track::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  top: 26px;
  height: 1px;
  background: var(--line-2);
}
.runner {
  position: absolute;
  top: 23px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.runner.fail { background: var(--fg); animation: runFail 3.2s cubic-bezier(.4, 0, .2, 1) infinite; }
.runner.ok { background: var(--accent); animation: runOk 3.2s cubic-bezier(.4, 0, .2, 1) infinite; }

.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.node-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line-3);
  background: var(--tile);
  display: flex;
  align-items: center;
  justify-content: center;
}
.node-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node.broken { color: var(--danger); }
.node.broken .node-icon { border: 1px dashed #6B3434; background: #140C0C; animation: shake 3.2s infinite; }
.node.broken svg { stroke: var(--danger); }
.node.dev { color: var(--accent); }
.node.dev .node-icon { border-color: var(--accent-2); background: #101828; animation: glow 3.2s infinite; }
.node.dev svg { stroke: #C9D9FF; }
.node.shipped { color: var(--fg); }
.node.shipped .node-icon { border-color: var(--fg); background: var(--fg); }
.node.shipped svg { stroke: var(--bg); }

.rule { height: 1px; background: var(--line); }

/* Work list */
.work { display: flex; flex-direction: column; }
.work .label { margin-bottom: 12px; }
.work-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px 104px;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  transition: padding .2s var(--ease);
}
.work-row:hover { padding-left: 8px; color: var(--fg); }
.work-row .w-name { font-size: 15px; font-weight: 500; }
.work-row .w-short { color: var(--muted); font-size: 14px; }
.work-row .w-cat { font-size: 11px; color: var(--faint); }
.work-row .pill { justify-self: end; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.progress { color: #E8B860; border-color: #4A3A1C; background: #17130B; }
.pill.shipped { color: var(--ok); border-color: #1E4A35; background: #0B1611; }

/* Contact */
.contact { display: flex; flex-direction: column; gap: 8px; }
.contact--foot { padding-top: 32px; border-top: 1px solid var(--line); }
.contact--box { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.contact .q { font-size: 15px; color: var(--muted); }
.contact .mail { font-size: 22px; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }

/* Detail */
.meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta-line .mono { font-size: 12px; color: var(--dim); }
.detail-title { font-size: 44px; line-height: 1.05; letter-spacing: -.035em; }
.overview { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.facts div { display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-size: 12px; color: var(--dim); }
.facts dd { margin: 0; font-size: 14px; }
.facts dd a { color: var(--accent); }
.facts dd a:hover { color: var(--fg); }

.shot {
  margin: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot--hero { height: 340px; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shots .shot { height: 220px; border-radius: 12px; }

.body-copy { margin: 0; font-size: 16px; line-height: 1.7; color: var(--fg-2); text-wrap: pretty; }

.built { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.built-head { margin-bottom: 12px; }
.built li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
  font-size: 15px;
}
.built li .mono { font-size: 11px; color: var(--faint); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; color: var(--muted); }

.next {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.next span { display: flex; flex-direction: column; gap: 6px; }
.next .label { font-size: 13px; color: var(--dim); }
.next .next-name { font-size: 26px; font-weight: 500; letter-spacing: -.025em; }
.next .arrow { font-size: 22px; }

@media (max-width: 560px) {
  .page { gap: 64px; padding-top: 32px; }
  .page--detail { gap: 52px; }
  .hero-title { font-size: 28px; }
  .detail-title { font-size: 36px; }
  .flow-card { padding: 20px; }
  .work-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name pill" "short short";
    row-gap: 4px;
  }
  .work-row .w-name { grid-area: name; }
  .work-row .w-short { grid-area: short; }
  .work-row .w-cat { display: none; }
  .work-row .pill { grid-area: pill; }
  .top { flex-wrap: wrap; gap: 12px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .shot--hero { height: 220px; }
  .shots { grid-template-columns: 1fr; }
  .shots .shot { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.footnote { margin: 12px 0 0; font-size: 12px; color: var(--dim); }

/* Headings styled as labels */
h2.label { margin: 0; font-weight: 400; }
.work h2.label, h2.built-head, .services h2.label { margin-bottom: 12px; }

/* Services */
.services { display: flex; flex-direction: column; }
.service-list { margin: 0; padding: 0; list-style: none; }
.service-list li { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.service-list h3 { margin: 0; font-size: 15px; font-weight: 500; }
.service-list p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
