.project-picker {
  display: none;
  margin-bottom: 30px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.js .project-picker {
  display: block;
}

.project-picker-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.project-picker-copy > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.project-picker-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.project-picker-copy kbd {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.project-tabs {
  display: none;
}

.js .project-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 174px;
  cursor: pointer;
  appearance: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

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

.project-tab:hover {
  background: var(--paper);
  box-shadow: inset 0 -5px 0 var(--line);
}

.project-tab.is-active {
  background: var(--ink);
  color: white;
  box-shadow: inset 0 -6px 0 var(--acid);
}

.project-tab.is-active:focus-visible {
  outline-color: var(--acid);
}

.project-tab-index,
.project-tab-action {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.project-tab-index {
  color: var(--blue);
}

.project-tab.is-active .project-tab-index {
  color: var(--acid);
}

.project-tab strong {
  margin-top: 25px;
  font-size: 19px;
  line-height: 1.25;
}

.project-tab small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.project-tab.is-active small {
  color: #c8cbbf;
}

.project-tab-proof {
  display: inline-flex;
  margin-top: 14px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.project-tab.is-active .project-tab-proof {
  border-color: #5d653e;
  background: #262b1e;
  color: var(--acid);
}

.project-tab-action {
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
}

.project-tab.is-active .project-tab-action {
  color: var(--acid);
}

.project-panel + .project-panel {
  margin-top: 68px;
}

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

.js .project-panel.is-active {
  animation: project-in 240ms ease-out both;
}

.case-study-automation {
  border-top-color: var(--coral);
}

.rag-blueprint {
  background: #11140f;
  color: #f7f4e9;
}

.blueprint-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 27px 30px;
  border-bottom: 1px solid #42483a;
}

.blueprint-kicker,
.blueprint-step,
.blueprint-boundary,
.blueprint-paths span,
.engine-split span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.blueprint-kicker,
.blueprint-step {
  color: var(--acid);
}

.blueprint-header h4 {
  margin: 7px 0 0;
  font-size: clamp(19px, 2.5vw, 27px);
}

.blueprint-boundary {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #596149;
  color: #dce5c5;
}

.blueprint-boundary i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgb(184 242 63 / 12%);
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.blueprint-stage {
  position: relative;
  min-width: 0;
  min-height: 305px;
  padding: 25px 20px;
  border-right: 1px solid #42483a;
}

.blueprint-stage:last-child {
  border-right: 0;
}

.blueprint-stage:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -11px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #5b6447;
  border-radius: 50%;
  background: #11140f;
  color: var(--acid);
  content: "→";
  font-size: 11px;
  transform: translateY(-50%);
}

.blueprint-stage h5 {
  margin: 13px 0 22px;
  font-size: 15px;
}

.blueprint-sources ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blueprint-sources li,
.blueprint-node,
.engine-split > div {
  padding: 12px;
  border: 1px solid #42483a;
  background: #1b1f17;
}

.blueprint-sources b,
.blueprint-sources small,
.blueprint-node b,
.blueprint-node small,
.engine-split b,
.engine-split small {
  display: block;
}

.blueprint-sources b,
.blueprint-node b,
.engine-split b {
  font-size: 12px;
}

.blueprint-sources small,
.blueprint-node small,
.engine-split small {
  margin-top: 4px;
  color: #9da392;
  font-size: 10px;
  line-height: 1.4;
}

.blueprint-node + .blueprint-node {
  margin-top: 10px;
}

.blueprint-node-guard {
  border-color: #79633b;
  background: #261f14;
}

.blueprint-node-guard b {
  color: #ffd27a;
}

.engine-split {
  display: grid;
  gap: 9px;
}

.engine-split span {
  display: block;
  margin-bottom: 9px;
  color: #77a2ff;
  font-size: 8px;
}

.blueprint-engines > p {
  margin: 11px 0 0;
  color: #bec4b4;
  font-size: 10px;
  text-align: center;
}

.blueprint-node-mcp {
  border-color: #4f6dac;
  background: #16213a;
}

.agent-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.agent-pair span {
  padding: 9px;
  border: 1px solid #42483a;
  color: #cdd2c6;
  font-size: 10px;
  text-align: center;
}

.grounded-output {
  display: block;
  margin-top: 10px;
  padding: 11px;
  background: var(--acid);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-align: center;
}

.blueprint-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #42483a;
}

.blueprint-paths > div {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
}

.blueprint-paths > div:first-child {
  border-right: 1px solid #42483a;
}

.blueprint-paths span {
  flex: 0 0 auto;
  color: var(--acid);
}

.blueprint-paths p {
  margin: 0;
  color: #bec4b4;
  font-size: 11px;
}

.metrics-automation small {
  color: #b12f1e;
}

.process-map {
  padding: 34px 38px 38px;
  background: var(--ink);
  color: white;
}

.process-map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}

.process-map-heading > span,
.parallel-flow > span {
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.process-map-heading h4 {
  margin: 0;
  font-size: 21px;
  text-align: right;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid #505348;
  list-style: none;
}

.process-flow li {
  position: relative;
  min-width: 0;
  padding: 18px 13px 20px;
  border-right: 1px solid #505348;
}

.process-flow li:last-child {
  border-right: 0;
}

.process-flow li:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -8px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  background: var(--ink);
  color: var(--coral);
  content: "›";
  font-size: 16px;
  transform: translateY(-50%);
}

.process-flow span,
.process-flow small {
  display: block;
  color: #919589;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.process-flow strong {
  display: block;
  margin: 13px 0 4px;
  color: white;
  font-size: 12px;
  line-height: 1.35;
}

.parallel-flow {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #505348;
  background: #22251d;
}

.parallel-flow p {
  margin: 0;
  color: #d3d6cb;
  font-size: 12px;
}

.case-study-legal {
  border-top-color: var(--blue);
}

.metrics-legal small {
  color: var(--blue);
}

.legal-map {
  padding: 34px 38px 38px;
  background: #14213d;
  color: white;
}

.legal-map .process-map-heading > span {
  color: var(--acid);
}

.legal-flow li:not(:last-child)::after {
  background: #14213d;
  color: var(--acid);
}

.legal-flow .legal-gate {
  background: var(--acid);
  color: var(--ink);
}

.legal-flow .legal-gate span,
.legal-flow .legal-gate small {
  color: #44551e;
}

.case-role {
  margin: 10px 0 0;
  color: var(--muted);
  font: 800 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}

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

.profile-shell {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  border: 1px solid var(--ink);
}

.profile-intro {
  padding: 48px;
  background: var(--ink);
  color: white;
}

.profile-intro .eyebrow,
.profile-capability > span {
  font: 900 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.profile-intro .eyebrow { color: var(--acid); }
.profile-intro h2 { margin: 24px 0; font-size: clamp(34px, 4vw, 55px); line-height: 1.08; }
.profile-intro > p:not(.eyebrow) { color: #c6cabe; font-size: 15px; line-height: 1.8; }

.availability {
  display: inline-flex;
  margin-top: 30px;
  padding: 9px 11px;
  border: 1px solid #555b4b;
  color: var(--acid);
  font: 800 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.profile-details { display: grid; grid-template-columns: 1fr 1fr; }
.profile-capability { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-capability:nth-child(even) { border-right: 0; }
.profile-capability > span { color: var(--blue); }
.profile-capability h3 { margin: 18px 0 8px; font-size: 18px; }
.profile-capability p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.profile-capability p + p { margin-top: 10px; }
.profile-capability a { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.profile-proof {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.profile-proof li { padding: 20px 25px; border-right: 1px solid var(--line); }
.profile-proof li:last-child { border-right: 0; }
.profile-proof strong { display: block; font-size: 29px; }
.profile-proof span { color: var(--muted); font: 800 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.contact .hero-actions { margin-top: 0; }

@keyframes project-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .project-picker-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

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

  .project-tab {
    min-height: 126px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-tab:last-child {
    border-bottom: 0;
  }

  .project-tab strong {
    margin-top: 15px;
  }

  .project-tab-action {
    position: absolute;
    right: 22px;
    bottom: 19px;
  }

  .process-flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-flow li:nth-child(3) {
    border-right: 0;
  }

  .process-flow li:nth-child(n + 4) {
    border-top: 1px solid #505348;
  }

  .blueprint-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blueprint-stage {
    min-height: 290px;
    border-bottom: 1px solid #42483a;
  }

  .blueprint-stage:nth-child(2) {
    border-right: 0;
  }

  .blueprint-stage:nth-child(n + 3) {
    border-bottom: 0;
  }

  .blueprint-stage:not(:last-child)::after {
    display: none;
  }

  .profile-shell { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .project-picker {
    margin-inline: 0;
  }

  .project-picker-copy p {
    display: none;
  }

  .project-tab {
    min-height: 136px;
    padding: 20px;
  }

  .project-tab-action {
    right: 20px;
  }

  .process-map {
    padding: 28px 20px;
  }

  .process-map-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .process-map-heading h4 {
    font-size: 18px;
    text-align: left;
  }

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

  .process-flow li:nth-child(3) {
    border-right: 1px solid #505348;
  }

  .process-flow li:nth-child(even) {
    border-right: 0;
  }

  .process-flow li:nth-child(n + 3) {
    border-top: 1px solid #505348;
  }

  .parallel-flow {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .blueprint-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }

  .blueprint-boundary {
    width: 100%;
  }

  .blueprint-grid,
  .blueprint-paths {
    grid-template-columns: 1fr;
  }

  .blueprint-stage:nth-child(n) {
    min-height: 0;
    padding: 24px 20px;
    border-right: 0;
    border-bottom: 1px solid #42483a;
  }

  .blueprint-stage:last-child {
    border-bottom: 0;
  }

  .blueprint-paths > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .blueprint-paths > div:first-child {
    border-right: 0;
    border-bottom: 1px solid #42483a;
  }

  .legal-map {
    padding: 28px 20px;
  }

  .profile-intro { padding: 36px 24px; }
  .profile-details,
  .profile-proof { grid-template-columns: 1fr; }
  .profile-capability { border-right: 0; }
  .profile-proof li { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-proof li:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .project-panel.is-active {
    animation: none;
  }
}
