@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#f5f4f0, #05070d);
  --bg-band: light-dark(#ecebe5, #0a0e18);
  --surface: light-dark(#ffffff, #0c1120);
  --surface-2: light-dark(#f8f7f3, #111829);
  --surface-3: light-dark(#efede7, #18213a);
  --line: light-dark(rgb(17 24 39 / 0.09), rgb(148 163 184 / 0.13));
  --line-2: light-dark(rgb(17 24 39 / 0.17), rgb(148 163 184 / 0.25));
  --ink: light-dark(#0b1220, #eaeef6);
  --ink-2: light-dark(#3a4456, #b6bfce);
  --ink-3: light-dark(#596374, #8f9aae);
  --accent: light-dark(#1f4fd8, #84a8ff);
  --accent-strong: light-dark(#173eb0, #adc4ff);
  --accent-soft: light-dark(rgb(31 79 216 / 0.08), rgb(132 168 255 / 0.12));
  --accent-line: light-dark(rgb(31 79 216 / 0.32), rgb(132 168 255 / 0.4));
  --antares: light-dark(#cf2440, #ff5d71);
  --antares-soft: light-dark(rgb(207 36 64 / 0.1), rgb(255 93 113 / 0.16));
  --ok: light-dark(#157f3c, #4ade80);
  --ok-soft: light-dark(rgb(21 127 60 / 0.1), rgb(74 222 128 / 0.12));
  --warn: light-dark(#9a5b05, #fbbf24);
  --warn-soft: light-dark(#fffbeb, rgb(245 158 11 / 0.12));
  --warn-line: light-dark(#f2c46b, rgb(251 191 36 / 0.35));
  --bad: light-dark(#b42318, #ff8a80);
  --bad-soft: light-dark(rgb(180 35 24 / 0.08), rgb(255 138 128 / 0.12));
  --shadow-c: light-dark(rgb(15 23 42 / 0.14), rgb(0 0 0 / 0.6));
  --shadow-soft: light-dark(rgb(15 23 42 / 0.06), rgb(0 0 0 / 0.35));
  --star: light-dark(rgb(30 41 59 / 0.32), rgb(226 232 240 / 0.75));
  --star-dim: light-dark(rgb(30 41 59 / 0.18), rgb(226 232 240 / 0.38));
  --constellation: light-dark(rgb(30 41 59 / 0.42), rgb(203 213 225 / 0.45));
  --chart-line: light-dark(rgb(30 41 59 / 0.1), rgb(148 163 184 / 0.14));
  --grid-c: light-dark(rgb(15 23 42 / 0.06), rgb(148 163 184 / 0.07));
  --grid-hot: light-dark(rgb(31 79 216 / 0.22), rgb(132 168 255 / 0.28));
  --logo-halo: light-dark(rgb(255 255 255 / 0), rgb(226 232 240 / 0.7));
  --btn-bg: light-dark(#0b1220, #f2f5fb);
  --btn-ink: light-dark(#ffffff, #05070d);
  --btn-bg-hover: light-dark(#1d2738, #ffffff);
  --app-bg: light-dark(#f8fafc, #090d16);
  --app-surface: light-dark(#ffffff, #111827);
  --app-side: light-dark(#ffffff, #0d131f);
  --app-line: light-dark(#e2e8f0, #243045);
  --app-ink: light-dark(#0f172a, #f8fafc);
  --app-ink-2: light-dark(#475569, #cbd5e1);
  --app-ink-3: light-dark(#586980, #94a3b8);
  --app-primary: light-dark(#2563eb, #3b82f6);
  --app-primary-solid: #2563eb;
  --app-primary-soft: light-dark(#eff6ff, rgb(59 130 246 / 0.15));
  --app-primary-text: light-dark(#1d4ed8, #93c5fd);
  --app-bar: light-dark(#2563eb, #142245);
  --app-bubble: light-dark(#eef2ff, #1c2740);
  --app-ok: light-dark(#16a34a, #4ade80);
  --font-sans: "Geist", "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Noto Sans TC", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1200px;
  --nav-h: 64px;
  --radius-card: 22px;

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  background: var(--bg);

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.75 var(--font-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-feature-settings: "palt";
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

p {
  text-wrap: pretty;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent);
  color: var(--btn-ink);
}

.sprite,
[hidden]:is(.approval, .approval__result, .link-btn) {
  display: none;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.nw {
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -200%;
  transition: translate 0.3s var(--ease-out);

  &:focus-visible {
    translate: 0 0;
  }
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.btn {
  --tx: 0px;
  --ty: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.975rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  translate: var(--tx) var(--ty);
  transition:
    translate 0.6s var(--spring),
    scale 0.45s var(--spring),
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    color 0.25s var(--ease-out);

  &:active {
    scale: 0.96;
    transition-duration: 0.12s, 0.12s, 0.25s, 0.25s, 0.35s, 0.25s;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    translate: none;
  }
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 10px 30px -12px var(--shadow-c);

  &:hover {
    background: var(--btn-bg-hover);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 18px 40px -14px var(--shadow-c);
  }
}

.btn--quiet {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);

  &:hover {
    border-color: var(--ink-3);
    box-shadow: 0 10px 28px -16px var(--shadow-c);
  }
}

.btn:not([data-magnetic]):hover {
  --ty: -2px;
}

.btn--sm {
  min-height: 38px;
  padding: 0 1rem;
  font-size: 0.9rem;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: scale 0.45s var(--spring), border-color 0.2s, background-color 0.2s;

  &:hover {
    border-color: var(--line-2);
  }

  &:active {
    scale: 0.9;
  }

  .icon {
    width: 18px;
    height: 18px;
  }
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: translate 0.5s var(--spring), scale 0.4s var(--spring), border-color 0.2s, color 0.2s, background-color 0.2s;

  &:hover {
    translate: 0 -1px;
    border-color: var(--ink-3);
    color: var(--ink);
  }

  &:active {
    scale: 0.95;
  }

  &[aria-pressed="true"],
  &.is-on {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-strong);
  }
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size 0.45s var(--ease-out);

  &:hover {
    background-size: 100% 1px;
  }

  .icon {
    transition: translate 0.45s var(--spring);
  }

  &:hover .icon {
    translate: 2px -2px;
  }
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), backdrop-filter 0.3s;

  &.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom-color: var(--line);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
  }
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;

  img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 0.6px var(--logo-halo)) drop-shadow(0 0 0.6px var(--logo-halo));
    transition: rotate 0.6s var(--spring);
  }

  &:hover img {
    rotate: -8deg;
  }
}

.nav__links {
  display: none;
  gap: 4px;
  margin-inline: auto;

  a {
    position: relative;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;

    &:hover {
      color: var(--ink);
      background: var(--line);
    }

    &[aria-current="true"] {
      color: var(--ink);
    }

    &[aria-current="true"]::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -2px;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--antares);
      box-shadow: 0 0 8px var(--antares);
      translate: -50% 0;
    }
  }
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav__repo {
  display: none;
}

.theme-toggle__to-light {
  display: none;
}

.theme-toggle__to-dark,
.theme-toggle__to-light {
  place-items: center;
}

.theme-toggle__to-dark {
  display: grid;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    .theme-toggle__to-light {
      display: grid;
    }

    .theme-toggle__to-dark {
      display: none;
    }
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  .theme-toggle__to-light {
    display: grid;
  }

  .theme-toggle__to-dark {
    display: none;
  }
}

.theme-toggle .icon {
  transition: rotate 0.6s var(--spring);
}

.theme-toggle:hover .icon {
  rotate: 25deg;
}

@media (min-width: 1080px) {
  .nav__links {
    display: flex;
  }

  .nav__actions {
    margin-left: 0;
  }

  .nav__menu-btn {
    display: none;
  }
}

@media (min-width: 640px) {
  .nav__repo {
    display: inline-flex;
  }
}

.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 16px var(--gutter) 32px;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  flex-direction: column;
  gap: 24px;

  &[open] {
    display: flex;
  }

  &::backdrop {
    background: rgb(0 0 0 / 0.4);
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: opacity 0.3s var(--ease-out), translate 0.4s var(--ease-out), display 0.4s allow-discrete, overlay 0.4s allow-discrete;
    opacity: 0;
    translate: 0 -12px;

    &[open] {
      opacity: 1;
      translate: 0 0;

      @starting-style {
        opacity: 0;
        translate: 0 -12px;
      }
    }
  }
}

.menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.menu__title {
  margin: 0;
  font-weight: 700;
}

.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;

  a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
  }
}

.hero {
  --mx: 74%;
  --my: 22%;
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: calc(var(--nav-h) + clamp(28px, 6vh, 72px));
  padding-bottom: clamp(48px, 7vw, 96px);
}

.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__grid-lines {
  position: absolute;
  inset: 0;

  &::before,
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(var(--grid-c) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-c) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center top;
  }

  &::before {
    mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  }

  &::after {
    background-image:
      linear-gradient(var(--grid-hot) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-hot) 1px, transparent 1px);
    mask-image: radial-gradient(320px circle at var(--mx) var(--my), #000 0%, transparent 72%);
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
  }
}

.hero.is-lit .hero__grid-lines::after {
  opacity: 1;
}

.hero__stars {
  position: absolute;
  inset: -10% 0 0;
  background-repeat: repeat;
}

.hero__stars--far {
  background-image:
    radial-gradient(1px 1px at 12px 30px, var(--star-dim) 99%, transparent),
    radial-gradient(1px 1px at 86px 140px, var(--star-dim) 99%, transparent),
    radial-gradient(1px 1px at 190px 60px, var(--star-dim) 99%, transparent),
    radial-gradient(1px 1px at 240px 210px, var(--star-dim) 99%, transparent),
    radial-gradient(1px 1px at 150px 250px, var(--star-dim) 99%, transparent),
    radial-gradient(1px 1px at 300px 110px, var(--star-dim) 99%, transparent);
  background-size: 320px 280px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.hero__stars--near {
  background-image:
    radial-gradient(1.6px 1.6px at 40px 80px, var(--star) 99%, transparent),
    radial-gradient(1.4px 1.4px at 260px 40px, var(--star) 99%, transparent),
    radial-gradient(1.8px 1.8px at 420px 300px, var(--star) 99%, transparent),
    radial-gradient(1.2px 1.2px at 520px 140px, var(--star) 99%, transparent),
    radial-gradient(1.5px 1.5px at 130px 360px, var(--star) 99%, transparent);
  background-size: 580px 420px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

.hero__constellation {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  right: max(var(--gutter), (100% - var(--wrap)) / 2);
  width: min(540px, 100% - 2 * var(--gutter) - 660px);
  height: auto;
  display: none;

  @media (min-width: 1180px) {
    display: block;
  }

  .hero__chart :is(circle, path) {
    stroke: var(--chart-line);
    stroke-width: 1;
  }

  .hero__chart .hero__ticks {
    stroke-width: 6;
    stroke-dasharray: 1 13.2;
  }

  .hero__lines path {
    stroke: var(--constellation);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 0;
  }

  .hero__dots circle {
    fill: var(--star);
  }

  .hero__antares {
    fill: var(--antares);
  }

  .hero__antares-glow {
    fill: var(--antares);
    opacity: 0.18;
    filter: blur(8px);
  }

  .hero__labels text {
    fill: var(--accent);
    font: 500 13px var(--font-mono);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__constellation .hero__lines path {
    animation: draw 2.4s var(--ease-out) 0.2s both;
  }

  .hero__constellation .hero__antares-glow {
    animation: pulse 3.6s var(--ease-in-out) infinite;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1200;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.34;
  }
}

.hero__inner {
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: translate 0.5s var(--spring), border-color 0.2s;

  &:hover {
    translate: 0 -2px;
    border-color: var(--accent-line);
  }

  .icon {
    transition: translate 0.45s var(--spring);
  }

  &:hover .icon {
    translate: 3px 0;
  }
}

.pill__tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--antares-soft);
  color: var(--antares);
  font: 600 0.8rem var(--font-mono);
}

.pill__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--ink-2) 0 40%, var(--accent) 50%, var(--ink-2) 60% 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  @media (prefers-reduced-motion: no-preference) {
    animation: shimmer 3.2s var(--ease-in-out) 1.2s infinite;
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }

  60%,
  100% {
    background-position: 0% 0;
  }
}

.hero__head {
  display: grid;
  gap: 28px;
  max-width: 660px;
  margin-top: 28px;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.05rem, 0.9rem + 5.2vw, 4.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero__line {
  display: block;
}

.hero__line--accent {
  color: var(--accent);
  position: relative;
  width: fit-content;

  &::after {
    content: "[1]";
    position: absolute;
    left: 100%;
    top: 0.1em;
    margin-left: 0.12em;
    color: var(--antares);
    font: 500 0.32em/1 var(--font-mono);
    letter-spacing: 0;
    white-space: nowrap;
  }
}

.hero__side {
  display: grid;
  gap: 28px;
  max-width: 560px;
}

.hero__lead {
  margin: 0;
  font-size: clamp(1.02rem, 0.96rem + 0.35vw, 1.2rem);
  line-height: 1.8;
  color: var(--ink-2);
}

.cite-inline {
  color: var(--antares);
  font-size: 0.9em;
}

.hero__actions,
.closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  @media (max-width: 520px) {
    .btn {
      flex: 1 1 100%;
    }
  }
}

.hero__facts {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;

  li {
    display: grid;
    gap: 2px;
    padding-top: 14px;
    border-top: 1px solid var(--line-2);
  }

  b {
    font: 600 1.35rem/1.2 var(--font-mono);
    letter-spacing: -0.02em;
  }

  span {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ink-3);
  }

  @media (min-width: 900px) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hero__app {
  margin-top: clamp(40px, 6vw, 72px);
  transform-origin: 50% 0;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    .hero__app {
      animation: unfold linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 75vh;
    }

    .hero__stars--far {
      animation: drift-far linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 100vh;
    }

    .hero__stars--near {
      animation: drift-near linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 100vh;
    }

    .hero__constellation {
      animation: drift-art linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 100vh;
    }
  }
}

@keyframes unfold {
  from {
    transform: perspective(1800px) rotateX(14deg) scale(0.95);
  }
}

@keyframes drift-far {
  to {
    translate: 0 60px;
  }
}

@keyframes drift-near {
  to {
    translate: 0 140px;
  }
}

@keyframes drift-art {
  to {
    translate: 0 90px;
  }
}

.app {
  margin: 0;
  position: relative;
  border: 1px solid var(--app-line);
  border-radius: 20px;
  background: var(--app-bg);
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.6;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.06) inset,
    0 50px 120px -50px var(--shadow-c),
    0 20px 40px -30px var(--shadow-c);
  overflow: hidden;
}

.app__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  margin: 10px 10px 0;
  padding: 0 12px 0 20px;
  border-radius: 14px;
  background: var(--app-bar);
  color: #ffffff;
}

.app__brand {
  font-weight: 700;
  font-size: 15px;
}

.app__tabs {
  display: none;
  gap: 6px;
  margin-left: auto;

  span {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(255 255 255 / 0.88);
  }

  .is-on {
    background: light-dark(#ffffff, rgb(255 255 255 / 0.12));
    color: light-dark(#1d4ed8, #ffffff);
  }
}

.app__avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: light-dark(#dbeafe, #2b3d66);
  color: light-dark(#1d4ed8, #dbeafe);
  font-size: 13px;
  font-weight: 700;
}

.app__body {
  display: grid;
  margin: 10px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-surface);
  overflow: hidden;
}

.app__side {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  border-right: 1px solid var(--app-line);
  background: var(--app-side);
  min-width: 0;
}

.app__new {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--app-primary-solid);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.app__group {
  margin: 10px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--app-ink-3);
}

.app__conv {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--app-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  &.is-on {
    background: var(--app-primary-soft);
    color: var(--app-primary-text);
    font-weight: 600;
  }
}

.app__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-line);

  b {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

.app__selects {
  display: flex;
  gap: 6px;
  flex: none;
}

.app__select {
  padding: 4px 10px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--app-ink-2);
  white-space: nowrap;

  &:last-child {
    display: none;
  }
}

.app__thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding: 18px 16px 8px;
}

.app__bubble {
  align-self: flex-end;
  max-width: 86%;
  margin: 0;
  padding: 9px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--app-bubble);
  font-size: 14px;
}

.app__trace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 0;
  padding: 3px 10px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--app-ink-3);

  .icon {
    color: var(--app-ok);
  }
}

.app__answer {
  p {
    margin: 0 0 12px;
    line-height: 1.85;
  }

  .cite {
    margin-inline: 1px;
    color: var(--app-primary-text);
    font: 500 0.82em var(--font-mono);
    cursor: default;
  }
}

.app__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  overflow: hidden;

  th,
  td {
    padding: 7px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--app-line);
  }

  th {
    background: var(--app-bg);
    font-weight: 600;
    color: var(--app-ink-2);
  }

  tr:last-child td {
    border-bottom: 0;
  }

  td:first-child {
    white-space: nowrap;
    color: var(--app-ink-2);
  }
}

.app__sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--app-line);
}

.app__sources-title {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-ink-3);
}

.src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: var(--app-surface);
  font-size: 12.5px;
  white-space: nowrap;
  transition: border-color 0.25s, background-color 0.25s, translate 0.45s var(--spring), box-shadow 0.25s;

  b {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--app-bg);
    font: 600 11px var(--font-mono);
  }

  small {
    color: var(--app-ink-3);
    font-size: 11.5px;
  }

  .icon {
    width: 13px;
    height: 13px;
    color: var(--app-primary-text);
  }
}

.app__answer:has(.cite[data-c="1"]:hover) .src[data-c="1"],
.app__answer:has(.cite[data-c="2"]:hover) .src[data-c="2"],
.app__answer:has(.cite[data-c="3"]:hover) .src[data-c="3"],
.app__answer:has(.cite[data-c="4"]:hover) .src[data-c="4"] {
  border-color: var(--app-primary);
  background: var(--app-primary-soft);
  translate: 0 -2px;
}

.app__composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 728px;
  margin: 8px auto 16px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  color: var(--app-ink-3);
  font-size: 13.5px;
}

.app__composer-tools {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.app__send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--app-line);
  color: var(--app-ink-3);
}

@media (min-width: 720px) {
  .app__tabs {
    display: flex;
  }

  .app__avatar {
    margin-left: 0;
  }

  .app__select:last-child {
    display: inline-block;
  }

  .app__thread {
    padding: 22px 28px 8px;
  }

  .app__answer p {
    font-size: 14.5px;
  }

  .app__table {
    font-size: 13px;
  }
}

@media (min-width: 960px) {
  .app__body {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .app__side {
    display: flex;
  }
}

.js .app__answer:not(.is-done) [data-sblock]:not(.is-on) {
  visibility: hidden;
  animation: unhide 0s 6s forwards;
}

.app__answer:not(.is-done) .tk:not(.is-on) {
  visibility: hidden;
}

@keyframes unhide {
  to {
    visibility: visible;
  }
}

.tk.is-caret {
  position: relative;

  &::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 0.25em;
    width: 0.5em;
    height: 1.1em;
    margin-left: 1px;
    border-radius: 2px;
    background: var(--app-primary);
    animation: caret 0.9s steps(1) infinite;
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.app__sources.is-on .src {
  @media (prefers-reduced-motion: no-preference) {
    animation: pop 0.6s var(--spring) both;
    animation-delay: calc(var(--n) * 90ms);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    scale: 0.85;
    translate: 0 6px;
  }
}

.stack {
  padding-block: 28px 32px;
  border-block: 1px solid var(--line);
  background: var(--bg-band);
}

.stack__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stack__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-3);
}

.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 44px;
  flex: none;
  margin: 0;
  padding: 0 44px 0 0;
  list-style: none;

  li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    transition: color 0.2s;
  }

  li:hover {
    color: var(--ink);
  }
}

.logo {
  width: 22px;
  height: 22px;
  flex: none;
  background: currentColor;
  mask: var(--logo) center / contain no-repeat;
}

.logo--none {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__track {
    animation: marquee 52s linear infinite;
  }

  .marquee:hover .marquee__track,
  .marquee:focus-within .marquee__track,
  .marquee.is-paused .marquee__track {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    mask-image: none;
  }

  .marquee__track {
    flex-wrap: wrap;
    flex: 1;
    gap: 16px 32px;
    padding: 0 var(--gutter);
    justify-content: center;
  }

  .marquee__track[aria-hidden="true"],
  [data-marquee-toggle] {
    display: none;
  }
}

@keyframes marquee {
  to {
    translate: -100% 0;
  }
}

.section {
  position: relative;
  padding-block: clamp(96px, 11vw, 168px);
}

.section__head {
  max-width: 780px;
  margin-bottom: clamp(40px, 5vw, 72px);

  h2 {
    margin: 0;
    font-size: clamp(1.85rem, 1rem + 2.9vw, 3.25rem);
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.012em;
  }
}

.section__head--split {
  max-width: none;
  display: grid;
  gap: 20px;

  .section__lead {
    margin: 0;
  }

  @media (min-width: 960px) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: 56px;
  }
}

.section__lead {
  margin: 20px 0 0;
  max-width: 40em;
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
  line-height: 1.85;
  color: var(--ink-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);

  &::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--antares);
    box-shadow: 0 0 0 4px var(--antares-soft), 0 0 14px var(--antares);
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 30px 80px -50px var(--shadow-c);
}

.reveal {
  --i: 0;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i) * 6%) entry calc(70% + var(--i) * 6%);
    }
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    translate: 0 36px;
  }
}

.story {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(56px, 8vw, 96px);
}

.story__step {
  display: grid;
  gap: 28px;
  view-timeline: --step block;
}

.story__num {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 500 0.9rem var(--font-mono);
  color: var(--ink-3);

  &::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--ink-3);
    transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
  }

  &::after {
    content: "";
    width: 120px;
    height: 1px;
    background: var(--accent);
    transform-origin: 0 50%;
    opacity: 0.8;
  }
}

.story__step.is-active .story__num {
  color: var(--antares);

  &::before {
    background: var(--antares);
    border-color: var(--antares);
    box-shadow: 0 0 0 4px var(--antares-soft), 0 0 14px var(--antares);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .story__num::after {
      animation: grow-x linear both;
      animation-timeline: --step;
      animation-range: entry 40% exit 30%;
    }

    .story__scene>.ui {
      animation: scene-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 35%;
    }
  }
}

@keyframes grow-x {
  from {
    scale: 0 1;
  }
}

@keyframes scene-in {
  from {
    opacity: 0;
    translate: 0 56px;
    scale: 0.96;
  }
}

.story__text {
  h3 {
    margin: 14px 0 12px;
    font-size: clamp(1.4rem, 1rem + 1.3vw, 2.1rem);
    line-height: 1.3;
    font-weight: 700;
  }

  p {
    margin: 0;
    max-width: 30em;
    color: var(--ink-2);
    line-height: 1.85;
  }
}

@media (min-width: 1024px) {
  .story {
    gap: 0;
  }

  .story__step {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: 72px;
    min-height: 92vh;
    padding-block: 6vh;
  }

  .story__text {
    position: sticky;
    top: calc(var(--nav-h) + 18vh);
  }

  .story__scene {
    padding-top: 8vh;
  }

  .story__step:last-child {
    min-height: 0;
  }
}

.ui {
  position: relative;
  padding: clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-card);
  background: var(--app-surface);
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 40px 100px -56px var(--shadow-c);
}

.ui--compose {
  display: grid;
  gap: 14px;
}

.ui__bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ui__select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;

  &.is-open {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px var(--app-primary-soft);
  }

  .icon {
    width: 14px;
    height: 14px;
    color: var(--app-ink-3);
  }
}

.effort {
  list-style: none;
  margin: -6px 0 0;
  padding: 6px;
  width: min(100%, 280px);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-surface);
  box-shadow: 0 18px 40px -24px var(--shadow-c);
  font-size: 13px;

  @media (min-width: 560px) {
    margin-left: 92px;
  }

  li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
  }

  .is-on {
    background: var(--app-primary-soft);
    color: var(--app-primary-text);
    font-weight: 600;
  }

  .is-off {
    color: var(--app-ink-3);
    opacity: 0.75;
  }

  small {
    font-size: 11.5px;
  }

  .icon {
    width: 15px;
    height: 15px;
  }
}

.ui__composer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--app-primary);
  border-radius: 14px;
  box-shadow: 0 0 0 3px var(--app-primary-soft);
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-bg);
  font-size: 12.5px;
  font-weight: 500;

  small {
    color: var(--app-ink-3);
  }

  .icon {
    color: var(--app-primary-text);
  }
}

.ui__typed {
  margin: 0;
  font-size: 15px;
}

.ui__composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui__icon {
  color: var(--app-ink-3);
}

.ui__send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--app-primary-solid);
  color: #ffffff;
}

.trace__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--app-line);
  border-top-color: var(--app-primary);

  @media (prefers-reduced-motion: no-preference) {
    animation: spin 0.9s linear infinite;
  }
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.shimmer-text {
  background: linear-gradient(100deg, var(--app-ink) 0 38%, var(--app-primary) 50%, var(--app-ink) 62% 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  @media (prefers-reduced-motion: no-preference) {
    animation: shimmer 2.6s linear infinite;
  }
}

.trace__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;

  li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    padding: 12px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    background: var(--app-bg);
  }

  div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  b {
    font-size: 13.5px;
  }

  code {
    font-size: 12px;
    color: var(--app-ink-2);
    overflow-wrap: anywhere;
  }

  .is-wait {
    border-color: var(--warn-line);
    background: var(--warn-soft);
  }
}

.trace__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--app-primary-soft);
  color: var(--app-primary-text);
}

.trace__out {
  font-size: 12.5px;
  color: var(--app-ink-3);
  overflow-wrap: anywhere;
}

.trace__time {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12px var(--font-mono);
  color: var(--app-ink-3);

  .icon {
    color: var(--app-ok);
  }
}

@media (min-width: 560px) {
  .trace__list li {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .trace__time {
    grid-column: auto;
    align-self: start;
  }
}

.ui--approval {
  display: grid;
  gap: 14px;
}

.approval {
  position: relative;
  padding: 18px;
  border: 1px solid var(--warn-line);
  border-radius: 16px;
  background: var(--warn-soft);
}

.approval__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--warn);
  font-weight: 700;
  font-size: 14px;
}

.approval__meta,
.approval__params {
  margin: 0;
  display: grid;
  gap: 6px;

  div {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr);
    gap: 10px;
  }

  dt {
    color: var(--app-ink-3);
    font-size: 13px;
  }

  dd {
    margin: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
  }
}

.approval__params {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-surface);

  div {
    grid-template-columns: 7.5em minmax(0, 1fr);
  }

  dt {
    font: 500 12.5px var(--font-mono);
    color: var(--app-ink-2);
  }

  dd {
    font-family: var(--font-mono);
    font-size: 12.5px;
  }
}

.approval__note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--app-ink-2);
}

.approval__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.approval__result {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-bg);
  font-size: 13.5px;

  p {
    margin: 0;
  }

  &[data-kind="approve"] {
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
    background: var(--ok-soft);
  }

  &[data-kind="deny"],
  &[data-kind="timeout"] {
    border-color: color-mix(in srgb, var(--bad) 35%, transparent);
    background: var(--bad-soft);
  }

  @media (prefers-reduced-motion: no-preference) {
    animation: pop 0.6s var(--spring) both;
  }
}

.approval__outcome {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.approval__result[data-kind="approve"] .approval__outcome {
  color: var(--ok);
}

.approval__result:is([data-kind="deny"], [data-kind="timeout"]) .approval__outcome {
  color: var(--bad);
}

.events {
  list-style: none;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #0b1020;
  color: #c8d2e3;
  display: grid;
  gap: 6px;
  font: 12px/1.5 var(--font-mono);

  li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    min-width: 0;
  }

  @media (min-width: 560px) {
    li {
      grid-template-columns: 11.5em minmax(0, 1fr);
      gap: 10px;
    }
  }

  .events__name {
    color: #84a8ff;
  }

  .events__data {
    color: #9aa6ba;
    overflow-wrap: anywhere;
  }

  .is-ok .events__name {
    color: #4ade80;
  }

  .is-bad .events__name {
    color: #ff8a80;
  }

  .is-new {
    @media (prefers-reduced-motion: no-preference) {
      animation: pop 0.5s var(--spring) both;
      animation-delay: calc(var(--n) * 120ms);
    }
  }
}

.beam {
  isolation: isolate;

  &::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--beam), transparent 0deg 230deg, var(--beam-c) 300deg, var(--beam-tip) 334deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
    opacity: 0;
  }
}

.approval.beam {
  --beam-c: #f59e0b;
  --beam-tip: light-dark(#9a3412, #fff4d6);
}

@media (prefers-reduced-motion: no-preference) {
  .beam::before {
    opacity: 1;
    animation: beam 3.4s linear infinite;
  }
}

@keyframes beam {
  to {
    --beam: 360deg;
  }
}

.ui--answer {
  display: grid;
  gap: 16px;
}

.ui__answer {
  margin: 0;
  font-size: 15px;
  line-height: 1.95;
}

.cite {
  font: inherit;
}

.ui__answer .cite {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  margin: 0 2px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--app-primary-soft);
  color: var(--app-primary-text);
  font: 600 12px/1 var(--font-mono);
  vertical-align: 1px;
  cursor: pointer;
  transition: scale 0.45s var(--spring), background-color 0.2s, color 0.2s, border-color 0.2s;

  &:hover {
    border-color: var(--app-primary);
  }

  &:active {
    scale: 0.9;
  }

  &[aria-pressed="true"] {
    background: var(--app-primary-solid);
    color: #ffffff;
  }
}

.cite-detail {
  padding: 14px 16px;
  border: 1px solid var(--app-line);
  border-left: 3px solid var(--app-primary);
  border-radius: 12px;
  background: var(--app-bg);

  blockquote {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.8;
  }

  &.is-swap {
    @media (prefers-reduced-motion: no-preference) {
      animation: swap 0.45s var(--ease-out);
    }
  }
}

@keyframes swap {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

.cite-detail__src {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
  font-size: 13px;

  span {
    font: 500 12px var(--font-mono);
    color: var(--app-ink-3);
  }
}

.ui__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--app-line);
}

.ui__sources-title {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-ink-3);
}

.ui__sources .src.is-on {
  border-color: var(--app-primary);
  background: var(--app-primary-soft);
  translate: 0 -2px;
  box-shadow: 0 8px 20px -12px var(--shadow-c);
}

.film {
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
  overflow: clip;
}

.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  overflow: hidden;
  background: #04060c;
  box-shadow: 0 60px 140px -60px rgb(0 0 0 / 0.9);
}

.film__poster,
.film__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .film__poster {
      animation: film-parallax linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}

@keyframes film-parallax {
  from {
    scale: 1.12;
    translate: 0 -4%;
  }

  to {
    scale: 1.12;
    translate: 0 4%;
  }
}

.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px 10px 10px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  background: rgb(5 7 13 / 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: scale 0.5s var(--spring), background-color 0.25s;

  small {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: rgb(255 255 255 / 0.7);
  }

  &:hover {
    scale: 1.04;
    background: rgb(5 7 13 / 0.75);
  }

  &:active {
    scale: 0.97;
  }
}

.film__play-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: #05070d;

  .icon {
    width: 20px;
    height: 20px;
    translate: 1px 0;
  }
}

.film__transcript {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 0.95rem;

  summary {
    width: fit-content;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
  }

  ol {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    max-width: 52em;
  }

  li {
    display: grid;
    grid-template-columns: 3.2em minmax(0, 1fr);
    gap: 10px;
  }

  b {
    font: 500 0.85rem var(--font-mono);
    color: var(--ink-3);
    padding-top: 0.2em;
  }
}

.flow {
  list-style: none;
  margin: 0 0 clamp(36px, 5vw, 56px);
  padding: 0;
  display: grid;
  gap: 28px;
  justify-items: stretch;

  >li {
    position: relative;
  }

  >li+li::before,
  >li+li::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 1px;
    height: 28px;
    background: var(--line-2);
  }

  >li+li::after {
    width: 5px;
    height: 5px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    bottom: calc(100% + 23px);
    opacity: 0;
  }

  ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
  }
}

.flow__node {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}

.flow__node--q {
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-color: transparent;
}

.flow__node--gate {
  border-color: var(--antares);
  box-shadow: 0 0 0 4px var(--antares-soft);
}

.flow__k {
  font-weight: 700;
  font-size: 0.95rem;
}

.flow__v {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.flow__lanes {
  padding: 10px;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
}

@media (prefers-reduced-motion: no-preference) {
  .flow>li+li::after {
    animation: pulse-y 2.4s var(--ease-in-out) infinite;
    animation-delay: calc(var(--d) * 1s);
  }
}

.flow>li:nth-child(2) {
  --d: 0;
}

.flow>li:nth-child(3) {
  --d: 0.4;
}

.flow>li:nth-child(4) {
  --d: 0.8;
}

.flow>li:nth-child(5) {
  --d: 1.2;
}

@keyframes pulse-y {
  0% {
    opacity: 0;
    translate: 0 0;
  }

  20%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    translate: 0 23px;
  }
}

@keyframes pulse-x {
  0% {
    opacity: 0;
    translate: 0 0;
  }

  20%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    translate: 31px 0;
  }
}

@media (min-width: 640px) {
  .flow ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .flow {
    grid-template-columns: 0.6fr 2.4fr 1fr 1.15fr 1.1fr;
    align-items: center;
    gap: 36px;

    >li+li::before {
      left: auto;
      right: 100%;
      bottom: auto;
      top: 50%;
      width: 36px;
      height: 1px;
    }

    >li+li::after {
      left: auto;
      right: calc(100% + 31px);
      bottom: auto;
      top: 50%;
      margin: -2px 0 0;
    }

    ol {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .flow__node {
    text-align: left;
  }

  .flow__lanes .flow__node {
    padding: 10px 14px;
  }

  @media (prefers-reduced-motion: no-preference) {
    .flow>li+li::after {
      animation-name: pulse-x;
    }
  }
}

.rrf {
  display: grid;
  gap: 28px;
  padding: clamp(18px, 3vw, 36px);

  @media (min-width: 1024px) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 44px;
  }
}

.rrf__controls {
  display: grid;
  align-content: start;
  gap: 24px;
}

.rrf__queries {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;

  legend {
    margin-bottom: 10px;
    padding: 0;
    font-weight: 700;
  }

  label {
    position: relative;
    display: block;
    cursor: pointer;
  }

  input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
  }

  span {
    display: block;
    padding: 10px 14px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s, background-color 0.2s, translate 0.45s var(--spring);
  }

  label:hover span {
    border-color: var(--ink-3);
  }

  input:checked+span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
  }

  input:focus-visible+span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

.rrf__sliders {
  display: grid;
  gap: 18px;
}

.slider {
  display: grid;
  gap: 8px;

  >span {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
  }

  output {
    color: var(--accent);
  }

  input {
    --fill: 50%;
    width: 100%;
    height: 22px;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }

  input::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) var(--fill), var(--line-2) var(--fill));
  }

  input::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) var(--fill), var(--line-2) var(--fill));
  }

  input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--surface);
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: scale 0.35s var(--spring);
  }

  input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--surface);
  }

  input:active::-webkit-slider-thumb {
    scale: 1.2;
  }
}

.rrf__caption {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink-2);
}

.rrf__board {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.rrf__lanes {
  display: grid;
  gap: 14px;
  margin-bottom: 8px;

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr;
  }
}

.rrf__lane-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);

  span {
    font-weight: 400;
  }
}

.rrf__lane {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;

  li {
    display: grid;
    grid-template-columns: 1.6em minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.82rem;
    transition: background-color 0.2s, border-color 0.2s;
  }
}

.rrf__rank {
  font: 500 0.78rem var(--font-mono);
  color: var(--ink-3);
}

.rrf__name {
  display: flex;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;

  b {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  span {
    color: var(--ink-3);
    flex: none;
  }
}

.rrf__results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rrf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.86rem;
  transition: background-color 0.25s, border-color 0.25s, opacity 0.25s;

  &.is-fail {
    background: transparent;
    border-style: dashed;
  }

  &.is-pass {
    border-color: color-mix(in srgb, var(--ok) 35%, transparent);
    background: var(--ok-soft);
  }

  @media (min-width: 720px) {
    grid-template-columns: minmax(0, 1.4fr) 7.5em minmax(0, 1.4fr) 5.5em;
  }
}

.rrf-row__rrf {
  font: 500 0.8rem var(--font-mono);
  color: var(--ink-2);

  small {
    display: block;
    font-family: var(--font-sans);
    color: var(--ink-3);
  }
}

.relbar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
}

.relbar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: var(--ink-3);
  transform-origin: 0 50%;
  scale: var(--p) 1;
  transition: scale 0.6s var(--spring);
}

.is-pass .relbar__fill {
  background: var(--ok);
}

.relbar__mark {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: calc(var(--t) * 100%);
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--antares);
  transition: left 0.2s var(--ease-out);
}

.rrf-row__state {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;

  b {
    display: block;
    font: 500 0.78rem var(--font-mono);
  }
}

.is-pass .rrf-row__state {
  color: var(--ok);
}

.is-fail .rrf-row__state {
  color: var(--ink-3);
}

.rrf [data-chunk].is-linked {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.rrf__verdict {
  margin: 6px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.7;

  small {
    display: block;
    margin-top: 2px;
    font-weight: 400;
    font-size: 0.86rem;
    color: var(--ink-2);
  }

  &[data-kind="pass"] {
    background: var(--ok-soft);
    color: var(--ok);
  }

  &[data-kind="none"] {
    background: var(--antares-soft);
    color: var(--antares);
  }
}

.metrics {
  list-style: none;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  display: grid;
  gap: 16px;

  @media (min-width: 900px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.metric {
  padding: 26px 24px;
  border-top: 1px solid var(--line-2);

  p {
    margin: 0;
  }
}

.metric__k {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-3);
}

.metric .metric__v {
  margin: 10px 0 12px;
  font-size: clamp(2.6rem, 1.8rem + 2.6vw, 4rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;

  small {
    margin-left: 6px;
    font-size: 0.32em;
    letter-spacing: 0;
    color: var(--ink-3);
  }
}

.metric__d {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.features {
  background: var(--bg-band);
}

.bento {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;

  @media (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (min-width: 1080px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.bento__card {
  --x: 50%;
  --y: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: translate 0.6s var(--spring), box-shadow 0.4s var(--ease-out), border-color 0.3s;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--x) var(--y), var(--accent-soft), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
  }

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(260px circle at var(--x) var(--y), var(--accent-line), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
    pointer-events: none;
  }

  &:hover {
    translate: 0 -4px;
    box-shadow: 0 28px 60px -36px var(--shadow-c);
  }

  &:hover::before,
  &:hover::after {
    opacity: 1;
  }

  h3 {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
    line-height: 1.4;
  }

  p {
    margin: 0;
    color: var(--ink-2);
    font-size: 0.95rem;
    line-height: 1.8;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: box-shadow 0.3s, border-color 0.3s;

    &:hover {
      translate: none;
    }
  }
}

@media (min-width: 768px) {

  .bento__card--wide,
  .bento__card--full {
    grid-column: span 2;
  }
}

@media (min-width: 1080px) {
  .bento__card--full {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 40px;

    .bento__text {
      flex: 0 0 34%;
    }

    .bento__ui {
      flex: 1;
      min-width: 0;
    }
  }

  .bento__card--wide {
    flex-direction: row;
    align-items: center;
    gap: 32px;

    .bento__text {
      flex: 0 0 44%;
    }

    .bento__ui {
      flex: 1;
      min-width: 0;
    }
  }
}

.frag {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 0.85rem;
}

.frag--skills {
  display: grid;
  gap: 8px;
}

.frag__menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 30px -20px var(--shadow-c);

  li {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
  }

  b {
    font: 500 0.85rem var(--font-mono);
  }

  span {
    font-size: 0.8rem;
    color: var(--ink-3);
  }

  .is-on {
    background: var(--accent-soft);

    b {
      color: var(--accent-strong);
    }
  }
}

.frag__input {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--surface);
}

.frag__caret {
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--accent);

  @media (prefers-reduced-motion: no-preference) {
    animation: caret 1s steps(1) infinite;
  }
}

.frag--providers {
  list-style: none;
  display: grid;
  gap: 2px;
  padding: 8px;

  li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 8px;
    font-weight: 500;
  }

  li:hover {
    background: var(--surface);
  }

  .logo {
    width: 18px;
    height: 18px;
  }

  .logo--none {
    display: block;
    background: none;
  }
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;

  &.is-ok {
    background: var(--ok);
    box-shadow: 0 0 0 3px var(--ok-soft);
  }
}

.frag--endpoints {
  list-style: none;
  display: grid;
  gap: 6px;

  li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .mono {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }
}

.m {
  flex: none;
  min-width: 3.4em;
  padding: 2px 6px;
  border-radius: 6px;
  font: 600 0.7rem var(--font-mono);
  text-align: center;
}

.m--get {
  background: var(--ok-soft);
  color: var(--ok);
}

.m--post {
  background: var(--warn-soft);
  color: var(--warn);
  outline: 1px solid var(--warn-line);
}

.m--query {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.m--flow {
  background: var(--antares-soft);
  color: var(--antares);
}

.tag {
  flex: none;
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag--muted {
  background: var(--line);
  color: var(--ink-3);
}

.frag--code,
.frag--log {
  color-scheme: dark;
  background: #0b1020;
  border-color: #1d2740;
  color: #c8d2e3;
  font: 0.78rem/1.75 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  .k {
    color: #84a8ff;
  }

  .c {
    color: #6f7d95;
  }

  .t {
    color: #6f7d95;
  }

  .id {
    color: #ff8a96;
  }
}

.frag--types {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  li {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font: 500 0.78rem var(--font-mono);
    transition: translate 0.4s var(--spring), border-color 0.2s;
  }

  li:hover {
    translate: 0 -2px;
    border-color: var(--accent-line);
  }

  .is-more {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-color: transparent;
  }
}

.inspector {
  display: grid;
  gap: 28px;
  padding: clamp(18px, 3vw, 36px);

  @media (min-width: 1024px) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 44px;
  }
}

.inspector__input {
  display: grid;
  align-content: start;
  gap: 14px;

  label {
    font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
    font-weight: 700;
    line-height: 1.45;
  }

  input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: var(--surface-2);
    font: 500 0.9rem var(--font-mono);
    transition: border-color 0.2s, box-shadow 0.2s;

    &:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 4px var(--accent-soft);
    }
  }
}

.inspector__examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inspector__out {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;

  li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    gap: 2px 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: background-color 0.25s;
  }

  .checks__m {
    grid-column: 2;
  }

  @media (min-width: 560px) {
    li {
      grid-template-columns: 26px 7.5em minmax(0, 1fr);
      gap: 10px;
    }

    .checks__m {
      grid-column: auto;
    }
  }

  b {
    font-weight: 600;
  }

  [data-state="fail"] {
    background: var(--bad-soft);
  }
}

.checks__i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font: 700 12px/1 var(--font-sans);
  color: var(--ink-3);

  &::before {
    content: "";
  }
}

[data-state="pass"] .checks__i {
  border-color: transparent;
  background: var(--ok-soft);
  color: var(--ok);

  &::before {
    content: "✓";
  }
}

[data-state="fail"] .checks__i {
  border-color: transparent;
  background: var(--bad);
  color: var(--surface);

  &::before {
    content: "✕";
  }
}

[data-state="skip"] .checks__i::before {
  content: "–";
}

[data-state="server"] .checks__i {
  border-style: dashed;
  border-color: var(--accent-line);
  color: var(--accent);

  &::before {
    content: "↗";
  }
}

.checks__m {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

[data-state="skip"] :is(b, .checks__m) {
  color: var(--ink-3);
}

.verdict {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.6;

  small {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--ink-2);
  }

  &[data-kind="block"] {
    background: var(--bad-soft);
    color: var(--bad);
  }

  &[data-kind="allow"] {
    background: var(--ok-soft);
    color: var(--ok);
  }

  &[data-kind="server"] {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }
}

.guards {
  list-style: none;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  display: grid;
  gap: 0 32px;

  @media (min-width: 640px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guard {
  padding: 26px 0;
  border-top: 1px solid var(--line-2);

  .icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
  }

  h3 {
    margin: 14px 0 8px;
    font-size: 1.1rem;
  }

  p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.8;
    color: var(--ink-2);
  }
}

.quickstart {
  background: var(--bg-band);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;

  @media (min-width: 1100px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);

  h3 {
    margin: 0;
    font-size: 1.15rem;
  }
}

.step__n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font: 600 0.9rem var(--font-mono);
}

.step__note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--ink-2);

  code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--surface-3);
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }
}

.code {
  color-scheme: dark;
  position: relative;
  padding-top: 42px;
  border-radius: 14px;
  background: #0b1020;
  border: 1px solid #1d2740;

  &::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5d71;
    box-shadow: 14px 0 0 #3a4560, 28px 0 0 #3a4560;
  }

  &::after {
    content: "";
    position: absolute;
    inset: 41px 0 auto;
    height: 1px;
    background: #1d2740;
  }

  pre {
    margin: 0;
    padding: 14px 18px 16px;
    color: #d6deeb;
    font-size: 0.82rem;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

.code__copy {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 8px;
  background: #121a2e;
  color: #c8d2e3;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: scale 0.4s var(--spring), border-color 0.2s, color 0.2s;

  &:hover {
    border-color: rgb(255 255 255 / 0.3);
    color: #ffffff;
  }

  &:active {
    scale: 0.92;
  }

  &.is-done {
    color: #4ade80;
    border-color: rgb(74 222 128 / 0.4);
  }
}

.quickstart__more {
  margin: 28px 0 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;

  @media (min-width: 640px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.release {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: translate 0.55s var(--spring), border-color 0.3s, box-shadow 0.3s;

  &:hover {
    translate: 0 -3px;
    border-color: var(--line-2);
    box-shadow: 0 22px 50px -34px var(--shadow-c);
  }

  time {
    font: 500 0.82rem var(--font-mono);
    color: var(--ink-3);
  }

  p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--ink-2);
  }

  @media (prefers-reduced-motion: reduce) {
    &:hover {
      translate: none;
    }
  }
}

.release .release__v {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);

  span {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--antares-soft);
    color: var(--antares);
    font: 600 0.75rem var(--font-sans);
    letter-spacing: 0;
  }
}

.release--latest {
  --beam-c: var(--accent);
  --beam-tip: light-dark(#0b1f6b, #ffffff);
  border-color: var(--accent-line);

  @media (min-width: 640px) {
    grid-column: span 2;
  }

  background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%),
  var(--surface);

  @media (min-width: 1024px) {
    grid-column: span 1;
  }
}

.releases__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 28px 0 0;
}

.closing {
  color-scheme: dark;
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(96px, 12vw, 176px) 40px;
  background: var(--bg);
  color: var(--ink);

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(1.4px 1.4px at 40px 60px, var(--star) 99%, transparent),
      radial-gradient(1px 1px at 200px 140px, var(--star-dim) 99%, transparent),
      radial-gradient(1.2px 1.2px at 330px 40px, var(--star) 99%, transparent),
      radial-gradient(1px 1px at 120px 230px, var(--star-dim) 99%, transparent);
    background-size: 380px 260px;
    mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent);
  }

  &::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    z-index: -1;
    width: min(900px, 120vw);
    aspect-ratio: 2;
    translate: -50% -30%;
    background: radial-gradient(closest-side, rgb(132 168 255 / 0.18), transparent);
    pointer-events: none;
  }
}

.closing__cta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 22px;
  max-width: 760px;
  margin-inline: auto;
}

.closing__mascot {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 0 0.8px var(--logo-halo)) drop-shadow(0 0 0.8px var(--logo-halo)) drop-shadow(0 20px 40px rgb(255 93 113 / 0.25));
  transition: rotate 0.7s var(--spring), scale 0.7s var(--spring);

  &:hover {
    rotate: -6deg;
    scale: 1.05;
  }
}

.closing__title {
  margin: 0;
  font-size: clamp(2rem, 1rem + 3.4vw, 3.6rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.closing__lead {
  margin: 0;
  max-width: 38em;
  color: var(--ink-2);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
}

.closing__actions {
  justify-content: center;
}

.closing__links {
  display: grid;
  gap: 32px;
  margin-top: clamp(80px, 10vw, 140px);
  padding-top: 36px;
  border-top: 1px solid var(--line);

  @media (min-width: 720px) {
    grid-template-columns: 1fr 1fr 1.4fr;
  }

  h3 {
    margin: 0 0 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-3);
  }

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }

  a {
    color: var(--ink-2);
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
    transition: color 0.2s, background-size 0.4s var(--ease-out);

    &:hover {
      color: var(--ink);
      background-size: 100% 1px;
    }
  }
}

.closing__meta {
  display: grid;
  align-content: start;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--ink-3);

  p {
    margin: 0;
  }

  @media (min-width: 720px) {
    justify-items: end;
    text-align: right;
  }
}

.rrf.is-vt .rrf-row {
  view-transition-name: var(--vt);
}

::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {

  :root.is-theme-swap::view-transition-old(root),
  :root.is-theme-swap::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }

  :root.is-theme-swap::view-transition-new(root) {
    animation: theme-reveal 0.7s var(--ease-out);
  }
}

@keyframes theme-reveal {
  from {
    clip-path: circle(0 at var(--vt-x) var(--vt-y));
  }

  to {
    clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y));
  }
}

.sound-btn {
  position: relative;

  .sound-btn__on {
    display: none;
  }

  &[data-state="on"] {
    color: var(--accent);
    border-color: var(--accent-line);

    .sound-btn__on {
      display: block;
    }

    .sound-btn__off {
      display: none;
    }
  }

  &::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--antares);
    box-shadow: 0 0 0 2px var(--surface);
    opacity: 0;
    scale: 0.4;
    transition: opacity 0.3s var(--ease-out), scale 0.5s var(--spring);
  }

  &[data-music="playing"]::after,
  &[data-music="armed"]::after {
    opacity: 1;
    scale: 1;
  }

  &[data-music="armed"]::after {
    background: var(--ink-3);
  }

  @media (prefers-reduced-motion: no-preference) {
    &[data-music="playing"]::after {
      animation: sound-pulse 1.8s var(--ease-in-out) infinite;
    }
  }
}

@keyframes sound-pulse {
  50% {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 6px var(--antares-soft);
  }
}

.sound-panel {
  position: fixed;
  inset: calc(var(--nav-h) + 6px) var(--gutter) auto auto;
  width: min(320px, 100vw - 2 * var(--gutter));
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 70px -30px var(--shadow-c), 0 0 0 1px var(--line);

  @media (prefers-reduced-motion: no-preference) {
    transition: opacity 0.25s var(--ease-out), translate 0.4s var(--spring), display 0.4s allow-discrete, overlay 0.4s allow-discrete;
    opacity: 0;
    translate: 0 -8px;

    &:popover-open {
      opacity: 1;
      translate: 0 0;

      @starting-style {
        opacity: 0;
        translate: 0 -8px;
      }
    }
  }
}

.sound-panel__title {
  margin: 0 0 8px;
  font-weight: 700;
}

.sound-panel__note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-3);
}

.switch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
  cursor: pointer;

  input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  .switch__text {
    display: grid;
    gap: 1px;
    order: -1;
  }

  b {
    font-size: 0.95rem;
  }

  small {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--ink-3);
  }
}

.switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: light-dark(#7c8597, #5b6882);
  transition: background-color 0.25s var(--ease-out);

  &::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 1px 3px var(--shadow-soft);
    transition: translate 0.45s var(--spring);
  }
}

.switch input:checked+.switch__track {
  background: var(--accent);

  &::after {
    translate: 18px 0;
  }
}

.switch input:focus-visible+.switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}