@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-latin-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #eeece5;
  --surface: #f7f5ef;
  --surface-strong: #dfddd5;
  --ink: #11110f;
  --muted: #5f5e57;
  --quiet: #807f77;
  --line: rgb(17 17 15 / 18%);
  --line-strong: rgb(17 17 15 / 34%);
  --accent: #2445e6;
  --on-accent: #ffffff;
  --nav: rgb(238 236 229 / 82%);
  --code-bg: #151513;
  --code-ink: #efede7;
  --image-edge: rgb(255 255 255 / 16%);
  --shadow: rgb(35 34 29 / 14%);

  --sans: "Manrope", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --header-z: 30;
  --overlay-z: 20;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11110f;
    --surface: #191917;
    --surface-strong: #272724;
    --ink: #f0eee7;
    --muted: #aaa89f;
    --quiet: #85837b;
    --line: rgb(240 238 231 / 17%);
    --line-strong: rgb(240 238 231 / 33%);
    --on-accent: #ffffff;
    --nav: rgb(17 17 15 / 82%);
    --shadow: rgb(0 0 0 / 36%);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: var(--overlay-z);
  pointer-events: none;
  content: "";
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: calc(var(--header-z) + 1);
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(100% - 3rem, 1480px);
  margin-inline: auto;
}

.section-pad {
  padding-block: clamp(6rem, 10vw, 10rem);
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  z-index: var(--header-z);
  display: flex;
  width: min(calc(100% - 2rem), 920px);
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.55rem 0.45rem 1.25rem;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav);
  box-shadow: 0 16px 50px var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.wordmark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.wordmark strong {
  color: var(--accent);
  font-weight: 650;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  padding-inline: 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.site-nav a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.site-nav a:active {
  transform: scale(0.97);
}

.site-nav .nav-github {
  gap: 0.4rem;
  background: var(--ink);
  color: var(--bg);
}

.site-nav .nav-github:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.menu-toggle {
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.9rem;
  height: 1px;
  background: var(--bg);
  transition: transform 220ms var(--ease-drawer);
}

.menu-toggle span:first-child {
  transform: translate(-50%, calc(-50% - 3px));
}

.menu-toggle span:last-child {
  transform: translate(-50%, calc(-50% + 3px));
}

.hero {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 0.96fr) minmax(520px, 1.04fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 2.5rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding-left: clamp(0rem, 3vw, 3rem);
}

.hero h1 {
  max-width: 8.5em;
  margin: 0;
  font-size: clamp(3.35rem, 4.4vw, 5.4rem);
  font-weight: 520;
  letter-spacing: -0.067em;
  line-height: 0.94;
}

.hero h1 span {
  color: var(--muted);
  font-weight: 280;
}

.hero-intro {
  max-width: 31rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.18vw, 1.18rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.3rem;
}

.button {
  display: inline-flex;
  min-height: 3.45rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 0.35rem 0.38rem 0.35rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--ink);
  color: var(--bg);
}

.button-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.button-icon {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 15%);
  font-size: 0.95rem;
  transition: transform 160ms var(--ease-out);
}

.button-secondary .button-icon {
  background: var(--surface-strong);
}

.button:hover .button-icon {
  transform: translate3d(2px, -2px, 0);
}

.hero-visual {
  min-width: 0;
  margin: 0;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  background: #171714;
  box-shadow: 0 28px 90px var(--shadow);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 500ms var(--ease-out);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-corner {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border-color: rgb(255 255 255 / 52%);
  pointer-events: none;
}

.frame-corner-a {
  top: 0.75rem;
  left: 0.75rem;
  border-top: 1px solid;
  border-left: 1px solid;
}

.frame-corner-b {
  right: 0.75rem;
  bottom: 0.75rem;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.hero-visual figcaption,
.proof-visual figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
}

.hero-visual figcaption::before,
.proof-visual figcaption::before {
  width: 1.8rem;
  height: 1px;
  flex: 0 0 auto;
  background: var(--line-strong);
  content: "";
}

.thesis {
  display: block;
  border-top: 1px solid var(--line);
}

.thesis h2 {
  max-width: 15em;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 6.5rem);
  font-weight: 330;
  letter-spacing: -0.06em;
  line-height: 0.99;
}

.thesis-notes {
  display: grid;
  max-width: 54rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: end;
  margin-top: 3rem;
}

.thesis-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.thesis-notes a,
.text-link {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.75rem;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.thesis-notes a {
  margin-top: 0;
}

.thesis-notes a span,
.text-link span {
  transition: transform 160ms var(--ease-out);
}

.thesis-notes a:hover span {
  transform: translateY(3px);
}

.text-link:hover span {
  transform: translate3d(2px, -2px, 0);
}

.inspection {
  background: var(--surface);
}

.inspection-heading {
  max-width: 1480px;
}

.inspection-heading h2,
.kit h2,
.proof h2,
.tool-index h2,
.install h2 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 5.5rem);
  font-weight: 380;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.inspection-heading > p:last-child {
  max-width: 37rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.inspection-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  align-items: center;
  margin-top: clamp(4rem, 7vw, 7rem);
}

.inspection-controls {
  display: flex;
  flex-direction: column;
}

.inspection-tab {
  position: relative;
  display: grid;
  width: 100%;
  gap: 0.5rem;
  padding: 1.35rem 1rem 1.35rem 1.5rem;
  transform: translateX(0);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-out),
    color 200ms var(--ease-out),
    background-color 200ms var(--ease-out);
}

.inspection-tab::before {
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  left: 0;
  width: 3px;
  transform: scaleY(0);
  transform-origin: bottom;
  background: var(--accent);
  content: "";
  transition: transform 240ms var(--ease-out);
}

.inspection-tab:hover {
  background: var(--bg);
}

.inspection-tab.is-active {
  transform: translateX(0.7rem);
  color: var(--ink);
}

.inspection-tab.is-active::before {
  transform: scaleY(1);
}

.inspection-tab span {
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 540;
  letter-spacing: -0.035em;
}

.inspection-tab small {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.inspection-stage {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(5rem, auto);
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 26px 80px var(--shadow);
}

.inspection-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #171714;
}

.inspection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08) translate3d(-1%, 0, 0);
  transition: transform 700ms var(--ease-in-out);
}

.inspection-image[data-inspection-image="structure"] img {
  transform: scale(1.24) translate3d(-7%, 3%, 0);
}

.inspection-image[data-inspection-image="behavior"] img {
  transform: scale(1.35) translate3d(4%, -8%, 0);
}

.inspection-image[data-inspection-image="material"] img {
  transform: scale(1.3) translate3d(7%, 7%, 0);
}

.inspection-lens {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(7rem, 15vw, 13rem);
  aspect-ratio: 1;
  transform: translate3d(-50%, -110%, 0);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 22%),
    inset 0 0 0 1px rgb(0 0 0 / 14%);
  pointer-events: none;
  transition: transform 700ms var(--ease-in-out);
}

.inspection-image[data-inspection-image="structure"] .inspection-lens {
  transform: translate3d(-130%, 20%, 0);
}

.inspection-image[data-inspection-image="behavior"] .inspection-lens {
  transform: translate3d(45%, 75%, 0);
}

.inspection-image[data-inspection-image="material"] .inspection-lens {
  transform: translate3d(70%, -25%, 0);
}

.inspection-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 2rem;
  align-items: center;
  min-height: 6.5rem;
  padding: 1.3rem 1.5rem;
}

.inspection-panel[hidden] {
  display: none;
}

.inspection-panel strong {
  font-size: 0.92rem;
}

.inspection-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.kit {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(480px, 1.28fr);
  gap: clamp(4rem, 10vw, 11rem);
  align-items: center;
}

.kit-copy p,
.proof-copy > p:not(.eyebrow),
.tool-index-heading p,
.install-copy > p:not(.eyebrow) {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.kit-files {
  position: relative;
  min-height: 34rem;
  perspective: 1200px;
}

.file-sheet {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 28px 80px var(--shadow);
}

.file-sheet-back {
  transform: translate3d(2.5rem, -1.5rem, 0) rotate(3deg);
  background: var(--accent);
}

.file-sheet-mid {
  transform: translate3d(-1.5rem, 1.2rem, 0) rotate(-2deg);
  background: var(--surface-strong);
}

.file-sheet-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 4rem);
  transform: rotate(0.5deg);
}

.file-sheet-front::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.4rem;
  background: var(--accent);
  content: "";
}

.file-sheet-front > p {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.file-sheet-front ul {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.file-sheet-front li {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1.2fr);
  gap: 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.file-sheet-front code {
  font-family: var(--mono);
  font-size: 0.76rem;
}

.file-sheet-front li span {
  color: var(--muted);
  font-size: 0.78rem;
}

.proof {
  background: var(--surface);
}

.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(350px, 0.8fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: center;
}

.proof-visual {
  min-width: 0;
  margin: 0;
}

.proof-visual img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  object-fit: cover;
  box-shadow: 0 30px 80px var(--shadow);
}

.proof-copy h2 {
  max-width: 9em;
}

.proof-methods {
  display: grid;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-strong);
}

.proof-methods span {
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.69rem;
}

.tool-index-heading {
  max-width: 48rem;
}

.tool-rail {
  display: grid;
  grid-auto-columns: minmax(250px, 1fr);
  grid-auto-flow: column;
  gap: 0;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
}

.tool-rail article {
  min-height: 15rem;
  padding: 1.5rem 2rem 2rem;
  border-left: 1px solid var(--line);
  scroll-snap-align: start;
}

.tool-rail article:last-child {
  border-right: 1px solid var(--line);
}

.tool-rail code {
  font-family: var(--mono);
  font-size: 0.7rem;
}

.tool-rail p {
  max-width: 13ch;
  margin: 6rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.install {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(4rem, 10vw, 10rem);
  align-items: end;
}

.command-block {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 14%);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: 0 28px 90px var(--shadow);
}

.command-bar {
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.25rem 0.65rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.command-bar span {
  color: rgb(239 237 231 / 62%);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.command-bar button {
  min-width: 4.7rem;
  min-height: 2.4rem;
  padding-inline: 1rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: transparent;
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out);
}

.command-bar button:hover {
  background: var(--code-ink);
  color: var(--code-bg);
}

.command-bar button:active {
  transform: scale(0.97);
}

.command-block pre {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow-x: auto;
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  line-height: 1.85;
  tab-size: 2;
}

.site-footer {
  display: grid;
  min-height: 10rem;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.site-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.site-footer > div a {
  color: var(--muted);
  font-size: 0.75rem;
}

.motion-ready .hero .reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-reveal 900ms var(--ease-out) forwards;
  animation-delay: calc(90ms + var(--reveal-order, 0) * 70ms);
}

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group] [data-reveal]:nth-child(2) {
  transition-delay: 60ms;
}

[data-reveal-group] [data-reveal]:nth-child(3) {
  transition-delay: 120ms;
}

[data-reveal-group] [data-reveal]:nth-child(4) {
  transition-delay: 180ms;
}

[data-reveal-group] [data-reveal]:nth-child(5) {
  transition-delay: 240ms;
}

@keyframes hero-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .inspection-tab:hover {
    transform: translateX(0.35rem);
  }

  .inspection-tab.is-active:hover {
    transform: translateX(0.7rem);
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    gap: 2.5rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 5.5vw, 4.8rem);
  }

  .kit {
    gap: 4rem;
  }

  .proof-grid {
    gap: 4rem;
  }

  .install-grid {
    gap: 4rem;
  }
}

@media (max-width: 820px) {
  body.nav-open {
    overflow: hidden;
  }

  .shell {
    width: min(100% - 2rem, 46rem);
  }

  .section-pad {
    padding-block: 6rem;
  }

  .site-header {
    width: calc(100% - 1rem);
  }

  .menu-toggle {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 4.6rem;
    right: 0;
    left: 0;
    display: grid;
    gap: 0.35rem;
    padding: 0.6rem;
    transform: translateY(-0.75rem) scale(0.98);
    transform-origin: top;
    border: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 26px 70px var(--shadow);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    backdrop-filter: blur(24px) saturate(120%);
    transition:
      opacity 220ms var(--ease-out),
      transform 220ms var(--ease-drawer),
      visibility 0ms 220ms;
  }

  .site-nav.is-open {
    transform: translateY(0) scale(1);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition:
      opacity 220ms var(--ease-out),
      transform 220ms var(--ease-drawer),
      visibility 0ms;
  }

  .site-nav a {
    width: 100%;
    min-height: 3.3rem;
    justify-content: space-between;
    padding-inline: 1rem;
  }

  .site-nav a:not(.nav-github) {
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding-top: 8.5rem;
    padding-bottom: 4rem;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3rem, 11.5vw, 5.2rem);
  }

  .hero-intro {
    max-width: 30rem;
  }

  .thesis,
  .inspection-grid,
  .kit,
  .proof-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .thesis {
    gap: 3rem;
  }

  .thesis-notes {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .thesis h2 {
    font-size: clamp(2.8rem, 10vw, 5rem);
  }

  .inspection-grid {
    gap: 3rem;
  }

  .inspection-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-tab {
    border-right: 1px solid var(--line);
  }

  .inspection-tab.is-active {
    transform: translateX(0);
    background: var(--bg);
  }

  .inspection-tab::before {
    inset: auto 1rem 0;
    width: auto;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
  }

  .inspection-tab.is-active::before {
    transform: scaleX(1);
  }

  .kit {
    gap: 5rem;
  }

  .kit-files {
    min-height: 31rem;
    margin-inline: 1rem;
  }

  .proof-grid {
    gap: 4rem;
  }

  .proof-copy {
    order: -1;
  }

  .install-grid {
    gap: 3.5rem;
  }

  .site-footer {
    min-height: 12rem;
    grid-template-columns: 1fr auto;
  }

  .site-footer p {
    order: 3;
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .shell {
    width: calc(100% - 2rem);
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13.2vw, 4.2rem);
    line-height: 0.96;
  }

  .hero-intro {
    font-size: 0.98rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    flex: 1 1 auto;
  }

  .hero-frame {
    width: calc(100% + 2rem);
    margin-left: -1rem;
  }

  .inspection-heading h2,
  .kit h2,
  .proof h2,
  .tool-index h2,
  .install h2 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .inspection-controls {
    grid-template-columns: 1fr;
  }

  .inspection-tab {
    border-right: 0;
  }

  .inspection-stage {
    width: calc(100% + 2rem);
    margin-left: -1rem;
  }

  .inspection-panel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .kit-files {
    min-height: 29rem;
    margin-inline: 0;
  }

  .file-sheet-back {
    transform: translate3d(0.8rem, -0.8rem, 0) rotate(2deg);
  }

  .file-sheet-mid {
    transform: translate3d(-0.6rem, 0.8rem, 0) rotate(-1deg);
  }

  .file-sheet-front {
    padding: 2rem 1.4rem;
  }

  .file-sheet-front li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-block: 0.85rem;
  }

  .proof-visual {
    width: calc(100% + 2rem);
    margin-left: -1rem;
  }

  .tool-rail {
    width: calc(100% + 1rem);
    grid-auto-columns: 78vw;
  }

  .command-block {
    width: calc(100% + 2rem);
    margin-left: -1rem;
  }

  .command-block pre {
    padding: 1.4rem 1rem;
    font-size: 0.68rem;
  }

  .site-footer {
    display: flex;
    min-height: 14rem;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
  }

  .site-footer p {
    width: 100%;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .site-nav {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .motion-ready .hero .reveal,
  .motion-ready [data-reveal],
  .motion-ready [data-reveal].is-visible {
    transform: none;
    opacity: 1;
    transition: opacity 200ms ease;
  }

  .hero-frame,
  .inspection-image img,
  .inspection-lens,
  .button-icon,
  .inspection-tab {
    transform: none !important;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .command-bar button {
    display: none;
  }

  body::before {
    content: none;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }
}
