:root {
  --page: #f2f6f4;
  --paper: #fffdf8;
  --paper-soft: #e9efec;
  --ink: #171918;
  --ink-soft: #464d4a;
  --muted: #68736e;
  --line: #c7d2ce;
  --line-strong: #8fa19b;
  --blue: #1e63d6;
  --blue-soft: #d9e6ff;
  --copper: #e2694d;
  --yellow: #edbe4a;
  --shadow: 0 24px 70px rgba(23, 25, 24, 0.14);
  --soft-shadow: 0 14px 34px rgba(23, 25, 24, 0.09);
  --wrap: min(1120px, calc(100vw - 40px));
  --reading: min(760px, calc(100vw - 40px));
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 25, 24, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 25, 24, 0.035) 1px, transparent 1px),
    var(--page);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

a:hover,
a:focus-visible {
  color: var(--blue);
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.83rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.reading {
  width: var(--reading);
  margin-right: auto;
  margin-left: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(23, 25, 24, 0.13);
  background: rgba(242, 246, 244, 0.88);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-mark {
  display: inline-grid;
  width: 1.85rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--copper);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(0.75rem, 2vw, 1.35rem);
}

.site-nav a {
  text-decoration: none;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.eyebrow,
.section-kicker,
.fact-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.case-title {
  max-width: 13ch;
  margin: 0.8rem 0 0;
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 880;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.case-title span {
  color: var(--blue);
}

.case-lead {
  max-width: 62ch;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  line-height: 1.72;
}

.case-facts {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.case-facts div {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-strong);
}

.case-facts dt,
.case-facts dd {
  margin: 0;
}

.case-facts dd {
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 650;
}

.disclosure {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid #a9b9b2;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.disclosure strong {
  color: var(--ink);
}

.disclosure-mark {
  color: var(--copper);
  font-weight: 900;
}

.artifact {
  margin: 1.5rem auto clamp(4rem, 8vw, 7rem);
}

.artifact-shell,
.image-shell {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.artifact-frame {
  display: block;
  width: 100%;
  height: clamp(580px, 72vw, 790px);
  border: 0;
  background: #fff;
}

.image-shell img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
}

.artifact figcaption,
.image-shell figcaption {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.proof-item {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 1.8rem);
}

.proof-item + .proof-item {
  border-left: 1px solid var(--line);
}

.proof-value {
  display: block;
  color: var(--blue);
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  font-weight: 880;
  letter-spacing: -0.045em;
  line-height: 1;
}

.proof-copy {
  display: block;
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.5;
}

.case-section {
  padding: clamp(3.8rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.case-section-dark {
  background: var(--ink);
  color: var(--paper);
}

.case-section-dark .section-kicker {
  color: rgba(255, 253, 248, 0.58);
}

.case-section-dark .section-intro,
.case-section-dark .body-copy,
.case-section-dark .decision-item p,
.case-section-dark .ownership-item p {
  color: rgba(255, 253, 248, 0.74);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.24fr) minmax(0, 0.76fr);
  gap: clamp(1.5rem, 6vw, 5rem);
}

.section-title {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.5rem);
  font-weight: 870;
  letter-spacing: -0.035em;
  line-height: 1;
}

.section-intro,
.body-copy {
  max-width: 66ch;
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.8;
}

.section-intro:first-child,
.body-copy:first-child {
  margin-top: 0;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.8rem 0.9rem;
  margin-top: 2.2rem;
  padding: 0;
  list-style: none;
  counter-reset: workflow;
}

.workflow li {
  position: relative;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  counter-increment: workflow;
}

.workflow li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -0.72rem;
  z-index: 2;
  width: 1.4rem;
  content: "→";
  color: var(--copper);
  font-weight: 900;
  text-align: center;
  transform: translateY(-50%);
}

.workflow li::before {
  display: block;
  margin-bottom: 0.6rem;
  content: "0" counter(workflow);
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.workflow strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.35;
}

.workflow span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.review-loop {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 680;
  text-align: center;
}

.case-section-dark .review-loop {
  border-color: rgba(255, 253, 248, 0.46);
  background: rgba(255, 253, 248, 0.045);
  color: rgba(255, 253, 248, 0.84);
}

.decision-list,
.ownership-list {
  display: grid;
  gap: 0;
  margin-top: 2rem;
}

.decision-item,
.ownership-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.2rem 0;
  border-top: 1px solid currentColor;
}

.decision-item h3,
.ownership-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.decision-item p,
.ownership-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.system-map {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.8fr;
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: stretch;
  margin-top: 2.2rem;
}

.system-node {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 170px;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}

.system-node + .system-node::before {
  position: absolute;
  top: 50%;
  left: calc(clamp(1rem, 3vw, 2.2rem) * -1);
  width: clamp(1rem, 3vw, 2.2rem);
  content: "→";
  color: var(--copper);
  font-weight: 900;
  text-align: center;
  transform: translateY(-50%);
}

.system-node strong {
  font-size: 1.05rem;
}

.system-node span {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.system-core {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.system-core ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.system-core li {
  font-size: 0.8rem;
  font-weight: 720;
}

.next-project {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.next-project h2 {
  max-width: 18ch;
  margin: 0.45rem 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.03;
}

.next-link,
.primary-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
}

.next-link:hover,
.next-link:focus-visible,
.primary-link:hover,
.primary-link:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--paper);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.footer {
  padding: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .case-hero,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .case-title {
    max-width: 11ch;
  }

  .case-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .workflow li:not(:last-child)::after {
    display: none;
  }

  .system-map {
    grid-template-columns: 1fr;
  }

  .system-node + .system-node::before {
    display: none;
  }
}

@media (max-width: 620px) {
  :root {
    --wrap: min(100% - 28px, 1120px);
    --reading: min(100% - 28px, 760px);
  }

  .site-header-inner {
    min-height: 3.65rem;
  }

  .site-nav a:not(:last-child) {
    display: none;
  }

  .case-hero {
    padding-top: 3.2rem;
  }

  .case-title {
    font-size: clamp(2.85rem, 15vw, 4.6rem);
  }

  .case-facts,
  .proof-strip,
  .workflow,
  .system-core ul {
    grid-template-columns: 1fr;
  }

  .proof-item + .proof-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .artifact-frame {
    height: 680px;
  }

  .decision-item,
  .ownership-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .next-project {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .next-link {
    width: fit-content;
  }
}

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