:root {
  --ink: #101318;
  --paper: #f4f6f8;
  --white: #ffffff;
  --muted: #606874;
  --line: #d8dde4;
  --blue: #2457d6;
  --blue-dark: #163b91;
  --coral: #e95b36;
  --lime: #c8ef48;
  --yellow: #f7c948;
  --dark: #0b0d10;
  --dark-soft: #171b21;
  --max: 1240px;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd,
figure,
ul {
  margin: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--ink);
  transform: translateY(-160%);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(16, 19, 24, 0.16);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  background: var(--ink);
  color: var(--white);
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.85rem;
  font-weight: 700;
}

.site-nav a,
.header-link {
  position: relative;
}

.site-nav a::after,
.header-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--blue);
  transition: right 180ms ease;
}

.site-nav a:hover::after,
.header-link:hover::after {
  right: 0;
}

.header-link {
  justify-self: end;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 640px;
  height: calc(82svh - var(--header-height));
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #285ec4;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  transform: scale(1.01);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.64);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 48px));
  margin: 0 max(24px, calc((100vw - var(--max)) / 2));
  padding: 0 0 132px;
}

.eyebrow,
.section-index {
  color: var(--coral);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero .eyebrow {
  color: var(--lime);
}

.hero h1 {
  margin-top: 8px;
  font-family: "Noto Serif SC", SimSun, serif;
  font-size: clamp(4rem, 10vw, 8.8rem);
  line-height: 0.98;
  font-weight: 900;
}

.hero-lead {
  max-width: 640px;
  margin-top: 18px;
  font-size: clamp(1rem, 2vw, 1.38rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

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

.button-ghost {
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--white);
}

.button-ghost:hover {
  background: var(--white);
  color: var(--ink);
}

.hero-stats {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - var(--max)) / 2));
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-stats div {
  min-width: 0;
  padding: 17px 18px 19px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-stats div + div {
  padding-left: 22px;
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats dt {
  font-family: Consolas, monospace;
  font-size: 1.45rem;
  font-weight: 800;
}

.hero-stats dd {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.signal-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  background: var(--lime);
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  scrollbar-width: none;
}

.signal-bar::-webkit-scrollbar {
  display: none;
}

.signal-bar span {
  flex: 1 0 auto;
  min-width: 170px;
  padding: 13px 20px;
  border-right: 1px solid rgba(16, 19, 24, 0.42);
  text-align: center;
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.section,
.archive-section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 112px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.72fr);
  align-items: end;
  gap: 56px;
  margin-bottom: 58px;
}

.section-heading h2 {
  max-width: 850px;
  margin-top: 10px;
  font-family: "Noto Serif SC", SimSun, serif;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.13;
}

.section-heading > p {
  color: var(--muted);
  font-size: 0.96rem;
}

.project-stage {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 2.25fr);
  gap: 32px;
}

.project-selector {
  border-top: 2px solid var(--ink);
}

.project-tab {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.project-tab > span {
  grid-row: 1 / 3;
  font-family: Consolas, monospace;
  font-size: 0.72rem;
}

.project-tab strong {
  color: var(--ink);
  font-size: 1rem;
}

.project-tab small {
  font-size: 0.76rem;
}

.project-tab:hover,
.project-tab.is-active {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.68);
}

.project-tab:hover strong,
.project-tab.is-active strong {
  color: var(--white);
}

.project-tab.is-active > span {
  color: var(--lime);
}

.project-display {
  min-width: 0;
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--dark-soft);
  border-radius: 6px;
}

.project-media img,
.project-media canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media img.contain {
  object-fit: contain;
  background: var(--white);
}

.media-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 3px;
  background: rgba(11, 13, 16, 0.86);
  color: var(--white);
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.project-copy {
  padding: 26px 0 0;
}

.project-kicker {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-copy h3 {
  max-width: 900px;
  margin-top: 19px;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.22;
}

.project-copy > p {
  max-width: 920px;
  margin-top: 13px;
  color: #3e4651;
  font-size: 1rem;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

.project-meta div {
  min-width: 0;
  padding: 16px;
  background: var(--white);
}

.project-meta dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.project-meta dd {
  margin-top: 5px;
  font-size: 0.86rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag-list span,
.archive-tags span {
  padding: 4px 8px;
  border: 1px solid #bcc4ce;
  border-radius: 3px;
  color: #3d4651;
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.quantum-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0e1422;
  color: var(--white);
  overflow: hidden;
}

.quantum-grid {
  position: absolute;
  inset: 12% 8%;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
}

.qubit-line {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.qubit-line::before {
  content: attr(data-label);
  position: absolute;
  left: 0;
  bottom: 8px;
  color: var(--lime);
  font-family: Consolas, monospace;
  font-size: 0.78rem;
}

.gate {
  position: absolute;
  top: calc(50% - 20px);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lime);
  background: #182743;
  color: var(--white);
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  animation: gate-pulse 2.4s ease-in-out infinite;
}

.gate-a { left: 28%; }
.gate-b { left: 50%; animation-delay: 400ms; }
.gate-c { left: 72%; animation-delay: 800ms; }

.quantum-note {
  position: absolute;
  right: 7%;
  bottom: 7%;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.7);
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  text-align: right;
}

@keyframes gate-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(200, 239, 72, 0); }
  50% { box-shadow: 0 0 28px rgba(200, 239, 72, 0.28); }
}

.lab-section {
  padding: 106px max(24px, calc((100vw - var(--max)) / 2));
  background: var(--dark);
  color: var(--white);
}

.section-heading-light .section-index {
  color: var(--lime);
}

.section-heading-light > p {
  color: #a8b0bc;
}

.lab-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
  min-height: 570px;
  border-top: 1px solid #3c424c;
  border-bottom: 1px solid #3c424c;
}

.canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 520px;
  border-right: 1px solid #3c424c;
}

#physics-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-readout {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: #9ea7b3;
  font-family: Consolas, monospace;
  font-size: 0.67rem;
  pointer-events: none;
}

.canvas-readout strong {
  color: var(--lime);
  font-weight: 700;
}

.lab-controls {
  padding: 24px 0 24px 30px;
}

.control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.control-actions {
  display: flex;
  gap: 7px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #555e6a;
  border-radius: 3px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.pause-icon {
  width: 13px;
  height: 15px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.is-paused .pause-icon {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  border-right: 0;
}

.reset-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}

.lab-controls label {
  display: block;
  margin-top: 27px;
}

.lab-controls label > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #aeb6c1;
  font-size: 0.78rem;
}

.lab-controls output {
  color: var(--white);
  font-family: Consolas, monospace;
}

.lab-controls input[type="range"] {
  width: 100%;
  accent-color: var(--lime);
}

.formula-block {
  display: grid;
  gap: 7px;
  margin-top: 36px;
  padding: 16px;
  border-left: 3px solid var(--coral);
  background: #141820;
}

.formula-block code {
  color: #dbe1e8;
  font-family: Consolas, monospace;
  font-size: 0.78rem;
}

.control-note {
  margin-top: 20px;
  color: #858f9c;
  font-size: 0.76rem;
}

.workflow-board {
  border-top: 2px solid var(--ink);
}

.phase-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.phase-tab {
  padding: 16px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.phase-tab:last-child {
  border-right: 0;
}

.phase-tab:hover,
.phase-tab.is-active {
  background: var(--blue);
  color: var(--white);
}

.phase-content {
  min-height: 390px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: start;
  padding: 44px 0 54px;
}

.phase-number {
  color: var(--coral);
  font-family: Consolas, monospace;
  font-size: 3.6rem;
  line-height: 1;
}

.phase-label {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.phase-content h3 {
  margin-top: 9px;
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  line-height: 1.25;
}

.phase-content h3 + p {
  margin-top: 15px;
  color: var(--muted);
}

.phase-content ul {
  margin-top: 20px;
  padding-left: 1.2rem;
  color: #39414c;
  font-size: 0.88rem;
}

.prompt-window {
  min-height: 260px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  border-radius: 5px;
  background: var(--dark);
  color: #d7e6aa;
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.72;
}

.capability-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.capability-ledger div {
  padding: 20px 18px;
  border-right: 1px solid var(--line);
}

.capability-ledger div:last-child {
  border-right: 0;
}

.capability-ledger span {
  display: block;
  color: var(--coral);
  font-family: Consolas, monospace;
  font-size: 0.68rem;
}

.capability-ledger strong {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
}

.archive-section {
  width: 100%;
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
  background: #e9edf1;
}

.archive-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid #bfc6cf;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.archive-filter {
  min-height: 38px;
  padding: 7px 11px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.archive-filter:hover,
.archive-filter.is-active {
  background: var(--ink);
  color: var(--white);
}

.archive-search {
  width: min(300px, 100%);
  flex: 0 1 300px;
}

.archive-search input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #aeb6c1;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.archive-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.7rem;
}

.archive-list {
  border-top: 1px solid var(--ink);
}

.archive-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1.1fr) minmax(260px, 1fr) 180px;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid #c5ccd5;
}

.archive-date {
  color: var(--blue);
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.archive-title {
  font-size: 1rem;
  line-height: 1.45;
}

.archive-copy {
  color: #59616c;
  font-size: 0.82rem;
}

.archive-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.empty-archive {
  padding: 56px 0;
  color: var(--muted);
  text-align: center;
}

.load-more {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.load-more:hover {
  background: var(--ink);
  color: var(--white);
}

.load-more[hidden] {
  display: none;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 48px;
  padding: 62px max(24px, calc((100vw - var(--max)) / 2));
  background: var(--dark);
  color: #9ca5b1;
  font-size: 0.76rem;
}

.footer-name {
  color: var(--white);
  font-family: "Noto Serif SC", SimSun, serif;
  font-size: 1.8rem;
  font-weight: 800;
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--lime);
}

.footer-copy {
  font-family: Consolas, monospace;
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 150;
  width: 0;
  height: 3px;
  background: var(--coral);
  pointer-events: none;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .brand-name,
  .header-link {
    display: none;
  }

  .site-nav {
    gap: 18px;
    font-size: 0.78rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-heading > p {
    max-width: 680px;
  }

  .project-stage {
    grid-template-columns: 1fr;
  }

  .project-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

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

  .lab-workspace {
    grid-template-columns: 1fr;
  }

  .canvas-wrap {
    border-right: 0;
    border-bottom: 1px solid #3c424c;
  }

  .lab-controls {
    padding: 26px 0;
  }

  .phase-content {
    grid-template-columns: 76px 1fr;
  }

  .prompt-window {
    grid-column: 2;
  }

  .capability-ledger {
    grid-template-columns: repeat(2, 1fr);
  }

  .capability-ledger div:nth-child(2) {
    border-right: 0;
  }

  .capability-ledger div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .archive-item {
    grid-template-columns: 90px 1fr;
  }

  .archive-copy,
  .archive-tags {
    grid-column: 2;
  }

  .archive-tags {
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    padding: 0 16px;
  }

  .site-nav {
    max-width: calc(100vw - 70px);
    overflow-x: auto;
    gap: 15px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    min-height: 650px;
    height: calc(88svh - var(--header-height));
  }

  .hero-media {
    object-position: 38% center;
  }

  .hero-copy {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding-bottom: 174px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 22vw, 5.8rem);
  }

  .hero-actions {
    gap: 8px;
  }

  .button {
    flex: 1 1 150px;
  }

  .hero-stats {
    left: 16px;
    right: 16px;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats div {
    padding: 10px 10px 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .hero-stats div + div {
    padding-left: 12px;
  }

  .hero-stats div:nth-child(2) {
    border-right: 0;
  }

  .hero-stats div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .hero-stats dt {
    font-size: 1.12rem;
  }

  .section,
  .archive-section {
    width: calc(100% - 32px);
    padding: 78px 0;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .project-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-tab {
    min-height: 72px;
    padding: 10px 8px;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .project-media {
    aspect-ratio: 4 / 3;
  }

  .lab-section {
    padding: 76px 16px;
  }

  .lab-workspace {
    min-height: 0;
  }

  .canvas-wrap {
    min-height: 400px;
  }

  .canvas-readout {
    gap: 5px 14px;
  }

  .phase-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .phase-tab:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .phase-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .phase-number,
  .prompt-window {
    grid-column: 1;
  }

  .phase-number {
    font-size: 2.4rem;
  }

  .capability-ledger {
    grid-template-columns: 1fr;
  }

  .capability-ledger div,
  .capability-ledger div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability-ledger div:last-child {
    border-bottom: 0;
  }

  .archive-section {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .archive-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .archive-filter {
    flex: 0 0 auto;
  }

  .archive-search {
    width: 100%;
    flex-basis: auto;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 19px 0;
  }

  .archive-copy,
  .archive-tags {
    grid-column: 1;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 16px;
  }

  .footer-copy {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
