:root {
  --page-gutter: clamp(16px, 3.5vw, 56px);
  --section-space: clamp(80px, 10vw, 152px);
  --hairline: rgb(61 59 79 / 20%);
  --dark-hairline: rgb(248 250 247 / 14%);
}

.site-header {
  background: #171620;
}

.home-section {
  position: relative;
  padding-block: clamp(80px, 10vw, 144px);
  padding-block: var(--section-space);
  overflow: clip;
  scroll-margin-top: 84px;
}

.home-shell {
  width: min(calc(100% - 32px), 1280px);
  width: min(calc(100% - (2 * var(--page-gutter))), 1320px);
  margin-inline: auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 8vw, 112px);
  align-items: end;
  margin-block-end: clamp(48px, 7vw, 88px);
}

.section-heading > *,
.home-hero__layout > *,
.task-dossier__header > *,
.task-dossier__workspace > *,
.workflow-states > *,
.ownership-map > *,
.principle-row * {
  min-width: 0;
}

.section-heading h2,
.conversion-record h2 {
  max-inline-size: 14ch;
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.section-heading > p,
.conversion-record > p {
  max-inline-size: 56ch;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
}

.section-kicker,
.eyebrow,
.technical-label {
  display: block;
  margin-block: 0 14px;
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-block-start: 30px;
}

.home-actions .button,
.text-link {
  min-height: 44px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  padding-inline: 4px;
  font-weight: 720;
  text-decoration: none;
}

.text-link::after {
  margin-inline-start: 10px;
  content: "→";
  font-family: var(--font-mono);
}

code {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Promise */

.home-hero {
  position: relative;
  min-height: calc(100svh - 72px);
  padding-block: clamp(48px, 6vw, 82px) clamp(64px, 7vw, 96px);
  overflow: clip;
  background: #171620;
  color: var(--text-inverse);
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  height: 1px;
  content: "";
}

.home-hero::before {
  top: clamp(150px, 23vh, 230px);
  right: 0;
  left: max(16px, calc((100% - 1280px) / 2));
  background: linear-gradient(90deg, rgb(248 250 247 / 16%), transparent 62%);
}

.home-hero::after {
  right: 0;
  bottom: 30px;
  width: min(24vw, 320px);
  background: var(--brand-mint);
}

.home-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.home-hero__copy {
  position: relative;
  z-index: 2;
  padding-block-start: clamp(42px, 7vw, 104px);
}

.home-hero .eyebrow,
.home-hero .technical-label {
  color: var(--brand-mint);
}

.home-hero h1 {
  max-inline-size: 10.5ch;
  margin-block: 0 24px;
  color: var(--text-inverse);
  font-size: clamp(2.75rem, 5.1vw, 4rem);
  letter-spacing: -0.065em;
  line-height: 0.94;
  text-wrap: balance;
}

.home-lede {
  max-inline-size: 46ch;
  margin: 0;
  color: rgb(248 250 247 / 74%);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.text-link--dark {
  color: var(--link-on-dark);
}

.text-link--dark:hover {
  color: var(--text-inverse);
}

.graph-ledger {
  position: relative;
  min-width: 0;
  margin: 0;
  --graph-depth-x: 0px;
  --graph-depth-y: 0px;
}

.graph-ledger__surface {
  position: relative;
  aspect-ratio: 1.08 / 1;
  overflow: hidden;
  border: 1px solid rgb(248 250 247 / 18%);
  background-color: #1b1a26;
  background-image:
    linear-gradient(rgb(248 250 247 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(248 250 247 / 3.5%) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 32px 32px;
  box-shadow: 0 32px 80px rgb(0 0 0 / 28%);
  isolation: isolate;
}

.graph-ledger__header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-block-end: 1px solid rgb(248 250 247 / 16%);
  background: rgb(23 22 32 / 96%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.ledger-state {
  color: var(--brand-electric);
  text-align: end;
}

.graph-ledger__stage {
  position: absolute;
  inset: 52px 0 0;
  overflow: hidden;
}

.graph-ledger__coordinate {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 4;
  color: rgb(248 250 247 / 38%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.graph-ledger__edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translate3d(var(--graph-depth-x), var(--graph-depth-y), 0);
  transition: transform 140ms ease-out;
}

.graph-ledger__edges marker path {
  fill: var(--brand-mint);
}

.graph-ledger__edges [data-edge-topology="compact"] {
  display: none;
}

[data-graph-edge] {
  fill: none;
  opacity: 0.45;
  stroke: #737789;
  stroke-linecap: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  transition: opacity 220ms ease, stroke 220ms ease, stroke-width 220ms ease;
}

[data-edge-kind="depends_on"] {
  stroke: var(--brand-mint);
}

[data-edge-kind="relates_to"],
[data-edge-kind="constrains"],
[data-edge-kind="records_note"] {
  stroke-dasharray: 6 8;
}

[data-edge-kind="records_execution"] {
  stroke: #78a8d4;
}

[data-edge-kind="requests_review"] {
  stroke: var(--brand-electric);
  stroke-width: 2.4;
}

[data-graph-edge].is-related {
  opacity: 0.92;
  stroke-width: 2.25;
}

[data-graph-edge].is-muted {
  opacity: 0.13;
}

.graph-ledger__nodes {
  position: absolute;
  inset: 0;
}

.graph-node {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-content: center;
  gap: 4px;
  padding: 10px;
  transform: translate(-50%, -50%);
  border: 1px solid rgb(248 250 247 / 26%);
  border-radius: 2px;
  background: #252432;
  box-shadow: 0 12px 28px rgb(0 0 0 / 30%);
  color: var(--text-inverse);
  font: inherit;
  text-align: center;
  transition: opacity 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.graph-ledger__nodes--controls .graph-node {
  cursor: pointer;
}

.graph-node b,
.graph-node small {
  display: block;
  pointer-events: none;
}

.graph-node b {
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.045em;
}

.graph-node small {
  color: rgb(248 250 247 / 62%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.graph-node--task {
  width: 96px;
  min-height: 96px;
  border: 2px solid var(--brand-mint);
  border-radius: 50%;
  box-shadow:
    0 0 0 7px rgb(92 190 156 / 8%),
    inset 0 0 0 5px rgb(92 190 156 / 10%),
    0 16px 34px rgb(0 0 0 / 30%);
}

.graph-node--central {
  z-index: 3;
  width: 116px;
  min-height: 116px;
  border-color: var(--brand-electric);
  background: #20362f;
  box-shadow:
    0 0 0 8px rgb(70 233 159 / 9%),
    0 0 0 15px rgb(70 233 159 / 4%),
    inset 0 0 0 6px rgb(70 233 159 / 12%),
    0 18px 42px rgb(0 0 0 / 38%);
}

.graph-node--central::after {
  position: absolute;
  right: 2px;
  bottom: -5px;
  padding: 4px 7px;
  border: 1px solid var(--brand-electric);
  background: #171620;
  color: var(--brand-electric);
  content: "IN REVIEW";
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

[data-hero-phase="ready"] .graph-node--central::after {
  content: "READY";
}

[data-hero-phase="execution"] .graph-node--central::after {
  content: "EVIDENCE RECORDED";
}

[data-hero-phase="review"] .graph-node--central::after {
  content: "REVIEW REQUESTED";
}

.graph-node--dependent {
  border-style: dashed;
  border-color: #818493;
  background: #23222f;
}

.graph-node--decision {
  width: 120px;
  min-height: 66px;
  border-color: #668fb9;
  background: #202a38;
}

.graph-node--note {
  width: 108px;
  min-height: 74px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: #2c2b3a;
}

.graph-node--note small {
  max-inline-size: 9ch;
  margin-inline: auto;
}

.graph-node--execution,
.graph-node--review {
  width: 144px;
  min-height: 62px;
}

.graph-node--execution {
  border-color: #78a8d4;
  background: #202b38;
}

.graph-node--review {
  border-color: var(--brand-electric);
  background: #20362f;
}

[data-node-position="API-42"] { top: 49%; left: 50%; }
[data-node-position="DB-17"] { top: 23%; left: 21%; }
[data-node-position="MCP-31"] { top: 25%; left: 79%; }
[data-node-position="DOC-08"] { top: 54%; left: 14%; }
[data-node-position="DEC-12"] { top: 14%; left: 49%; }
[data-node-position="NOTE-21"] { top: 55%; left: 84%; }
[data-node-position="RUN-94"] { top: 70%; left: 69%; }
[data-node-position="REV-03"] { top: 70%; left: 29%; }

.graph-node[aria-pressed="true"] {
  border-color: var(--brand-electric);
  box-shadow:
    0 0 0 3px #171620,
    0 0 0 5px var(--brand-electric),
    0 18px 42px rgb(0 0 0 / 38%);
}

.graph-node[aria-pressed="false"]:hover,
.graph-node[aria-pressed="false"]:focus-visible {
  border-color: var(--text-inverse);
  transform: translate(-50%, -50%) scale(1.045);
}

[data-hero-phase="dependency"] [data-node-position="MCP-31"],
[data-hero-phase="dependency"] [data-node-position="DOC-08"],
[data-hero-phase="dependency"] [data-node-position="NOTE-21"],
[data-hero-phase="dependency"] [data-node-position="RUN-94"],
[data-hero-phase="dependency"] [data-node-position="REV-03"],
[data-hero-phase="ready"] [data-node-position="RUN-94"],
[data-hero-phase="ready"] [data-node-position="REV-03"],
[data-hero-phase="execution"] [data-node-position="REV-03"] {
  opacity: 0.14;
}

[data-hero-phase="dependency"] [data-graph-edge]:not([data-source="API-42"]),
[data-hero-phase="ready"] [data-graph-edge]:not([data-edge-kind="depends_on"]),
[data-hero-phase="execution"] [data-graph-edge]:not([data-source="RUN-94"]),
[data-hero-phase="review"] [data-graph-edge]:not([data-source="REV-03"]) {
  opacity: 0.12;
}

[data-hero-phase="dependency"] [data-source="API-42"],
[data-hero-phase="ready"] [data-edge-kind="depends_on"],
[data-hero-phase="execution"] [data-source="RUN-94"],
[data-hero-phase="review"] [data-source="REV-03"] {
  opacity: 1;
  stroke: var(--brand-electric);
  stroke-width: 2.8;
}

.graph-ledger figcaption {
  margin-block-start: 10px;
  color: rgb(248 250 247 / 62%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.graph-ledger__inspector {
  position: absolute;
  right: 16px;
  bottom: 10px;
  z-index: 5;
  display: grid;
  width: min(310px, calc(100% - 32px));
  min-height: 0;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid rgb(248 250 247 / 16%);
  border-block-start: 2px solid var(--brand-electric);
  background: rgb(34 33 47 / 96%);
  box-shadow: 0 18px 42px rgb(0 0 0 / 28%);
}

.graph-ledger__inspector p {
  margin: 0;
  color: rgb(248 250 247 / 76%);
  font-size: 0.75rem;
  line-height: 1.35;
}

.graph-ledger__inspector strong {
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
}

.graph-ledger__inspector span {
  color: var(--brand-electric);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.graph-ledger__relationships {
  margin-block-start: 14px;
  padding-block-start: 12px;
  border-block-start: 1px solid rgb(248 250 247 / 16%);
}

.graph-ledger__relationships h2 {
  margin-block-end: 12px;
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-ledger__relationships ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.graph-ledger__relationships li {
  color: rgb(248 250 247 / 68%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
}

/* Fragmented evidence */

.problem-section {
  border-block-start: 1px solid rgb(61 59 79 / 10%);
}

.problem-composition {
  display: grid;
  grid-template-columns: minmax(250px, 34fr) minmax(0, 66fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: start;
}

.problem-composition__copy {
  position: relative;
  z-index: 2;
  padding-block-start: 22px;
}

.problem-composition__copy h2 {
  max-inline-size: 10ch;
  margin: 0;
  font-size: clamp(2.45rem, 4.7vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.problem-composition__copy > p:not(.section-kicker, .broken-model-note) {
  max-inline-size: 38ch;
  margin-block: 28px 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

.fragment-field {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(34px, auto));
  gap: 16px 20px;
  min-height: 520px;
}

.evidence-fragment {
  position: relative;
  z-index: 2;
  align-self: start;
  padding-block: 16px 18px;
  border-block: 1px solid var(--border-strong);
  background: var(--surface-page);
}

.evidence-fragment span {
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.evidence-fragment h3 {
  margin-block: 14px 10px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.evidence-fragment p {
  margin: 0;
  color: var(--text-muted);
}

.evidence-fragment--chat {
  grid-column: 1 / span 6;
  grid-row: 1 / span 3;
}

.evidence-fragment--tracker {
  grid-column: 5 / span 5;
  grid-row: 4 / span 3;
}

.evidence-fragment--decision {
  grid-column: 8 / span 5;
  grid-row: 7 / span 3;
}

.fragment-field__paths {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.fragment-field__paths path {
  fill: none;
  stroke: var(--brand-anchor);
  stroke-dasharray: 0.12 0.045;
  stroke-dashoffset: 0;
  stroke-linecap: square;
  stroke-width: 1.25;
}

[data-fragments-armed="true"]:not([data-fragments-observed="true"]) .fragment-field__paths path {
  stroke-dashoffset: 1;
}

[data-fragments-armed="true"] .fragment-field__paths path {
  transition: stroke-dashoffset 780ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

.broken-model-note {
  display: flex;
  max-inline-size: 66ch;
  align-items: center;
  gap: 14px;
  margin-block: 40px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.broken-model-note span {
  width: 68px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-anchor) 0 60%, transparent 60% 72%, var(--border-strong) 72%);
}

/* Connected task */

.connected-work-section {
  padding-block-start: clamp(72px, 8vw, 112px);
}

.task-dossier {
  position: relative;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgb(248 250 247 / 16%);
  background: #171620;
  color: var(--text-inverse);
  box-shadow: 0 28px 70px rgb(61 59 79 / 16%);
}

.task-dossier::before,
.task-dossier::after {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--brand-mint);
  content: "";
  pointer-events: none;
}

.task-dossier::before {
  top: 12px;
  left: 12px;
  border-block-start: 1px solid;
  border-inline-start: 1px solid;
}

.task-dossier::after {
  right: 12px;
  bottom: 12px;
  border-inline-end: 1px solid;
  border-block-end: 1px solid;
}

.task-dossier__header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 32px;
  align-items: end;
  padding-block-end: 28px;
  border-block-end: 1px solid rgb(248 250 247 / 18%);
}

.task-dossier__header h3 {
  max-inline-size: 18ch;
  margin: 0;
  color: var(--text-inverse);
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.task-dossier__header p {
  max-inline-size: 36ch;
  margin: 0;
  color: rgb(248 250 247 / 68%);
}

.task-dossier__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr);
  border-block-end: 1px solid rgb(248 250 247 / 14%);
}

[data-context-enhanced="true"] .task-dossier__workspace {
  grid-template-columns: minmax(156px, 0.32fr) minmax(420px, 1.12fr) minmax(270px, 0.72fr);
}

.context-controls {
  border-inline-start: 1px solid rgb(248 250 247 / 14%);
}

.context-control {
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border: 0;
  border-inline-end: 1px solid rgb(248 250 247 / 14%);
  border-block-end: 1px solid rgb(248 250 247 / 14%);
  background: transparent;
  color: rgb(248 250 247 / 62%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: left;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease;
}

.context-control span {
  color: rgb(92 190 156 / 72%);
  font-size: 0.75rem;
}

.context-control:hover {
  color: var(--text-inverse);
}

.context-control[aria-pressed="true"] {
  border-inline-end-color: var(--brand-electric);
  background: rgb(70 233 159 / 9%);
  color: var(--text-inverse);
}

.context-control[aria-pressed="true"] span {
  color: var(--brand-electric);
}

.context-control:focus-visible {
  position: relative;
  z-index: 4;
  outline: 3px solid var(--link-on-dark);
  outline-offset: -3px;
}

.task-dossier__object {
  position: relative;
  aspect-ratio: 1.32 / 1;
  overflow: hidden;
  border-inline-end: 1px solid rgb(248 250 247 / 14%);
  background-color: #1b1a26;
  background-image:
    linear-gradient(rgb(248 250 247 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(248 250 247 / 4%) 1px, transparent 1px);
  background-size: 36px 36px;
}

.dossier-object__caption {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  margin: 0;
  color: rgb(248 250 247 / 42%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier-object__relations {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dossier-object__relations path {
  fill: none;
  stroke: rgb(248 250 247 / 22%);
  stroke-dasharray: 5 5;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  transition: opacity 240ms ease, stroke 240ms ease, stroke-width 240ms ease;
}

[data-context-selected="intent"] [data-context-relation="intent"],
[data-context-selected="constraints"] [data-context-relation="constraints"],
[data-context-selected="dependencies"] [data-context-relation="dependencies"],
[data-context-selected="decisions"] [data-context-relation="decisions"],
[data-context-selected="notes"] [data-context-relation="notes"],
[data-context-selected="execution"] [data-context-relation="execution"] {
  stroke: var(--brand-electric);
  stroke-dasharray: none;
  stroke-width: 2;
}

.dossier-node {
  position: absolute;
  z-index: 2;
  display: grid;
  max-width: 160px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgb(248 250 247 / 22%);
  background: #22212f;
  color: rgb(248 250 247 / 66%);
  font-family: var(--font-mono);
  line-height: 1.2;
  transform: translate(-50%, -50%);
  transition: border-color 240ms ease, color 240ms ease, opacity 240ms ease;
}

.dossier-node small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--brand-mint);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dossier-node b {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
}

.dossier-node--intent { top: 14.5%; left: 23.5%; }
.dossier-node--constraint { top: 23%; left: 84%; }
.dossier-node--dependency { top: 80%; left: 14.5%; }
.dossier-node--decision { top: 51%; left: 12%; }
.dossier-node--note { top: 85%; left: 62%; }
.dossier-node--execution { top: 78%; left: 87%; }

.dossier-node--decision {
  border-radius: 0;
}

.dossier-node--note {
  clip-path: polygon(12% 0, 100% 0, 100% 82%, 88% 100%, 0 100%, 0 18%);
}

.dossier-node--execution {
  border-inline-start: 3px solid var(--brand-mint);
}

.dossier-node--task {
  top: 49%;
  left: 49%;
  width: clamp(112px, 23%, 142px);
  aspect-ratio: 1;
  place-content: center;
  justify-items: center;
  padding: 16px;
  border: 2px solid var(--brand-electric);
  border-radius: 50%;
  background: #171620;
  box-shadow: 0 0 0 8px rgb(70 233 159 / 7%);
  color: var(--text-inverse);
  text-align: center;
}

.dossier-node--task b {
  color: var(--brand-electric);
  font-size: 1rem;
}

.dossier-node--task em {
  max-inline-size: 12ch;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
}

[data-context-node] {
  opacity: 0.52;
}

[data-context-selected="intent"] [data-context-node="intent"],
[data-context-selected="constraints"] [data-context-node="constraints"],
[data-context-selected="dependencies"] [data-context-node="dependencies"],
[data-context-selected="decisions"] [data-context-node="decisions"],
[data-context-selected="notes"] [data-context-node="notes"],
[data-context-selected="execution"] [data-context-node="execution"] {
  border-color: var(--brand-electric);
  color: var(--text-inverse);
  opacity: 1;
}

.task-dossier__panels {
  border-inline-end: 1px solid rgb(248 250 247 / 14%);
}

.context-layer {
  min-height: 100%;
  padding: clamp(22px, 3vw, 34px);
  border-block-end: 1px solid rgb(248 250 247 / 14%);
  background: #22212f;
}

[data-context-enhanced="true"] .task-dossier__panels,
[data-context-enhanced="true"] .context-layer:not([hidden]) {
  display: grid;
}

[data-context-enhanced="true"] .task-dossier__panels {
  grid-template-rows: minmax(0, 1fr);
}

[data-context-enhanced="true"] .context-layer:not([hidden]) {
  grid-template-rows: auto auto 1fr auto;
}

.context-layer__number {
  color: var(--brand-electric);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.context-layer h3 {
  margin-block: 14px 10px;
  color: var(--text-inverse);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.context-layer p {
  margin-block: 0 14px;
  color: rgb(248 250 247 / 70%);
}

.context-layer .context-evidence {
  margin: 0;
  color: var(--link-on-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Workflow */

.workflow-section {
  background: #171620;
  color: var(--text-inverse);
}

.section-heading--dark h2 {
  color: var(--text-inverse);
}

.section-heading--dark > p {
  color: rgb(248 250 247 / 68%);
}

.workflow-section .section-kicker {
  color: var(--brand-mint);
}

.workflow-inspector {
  margin-block-start: clamp(48px, 7vw, 88px);
  border: 1px solid rgb(248 250 247 / 18%);
  background: #121119;
  box-shadow: 0 28px 72px rgb(0 0 0 / 24%);
}

.workflow-inspector__chrome {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: 18px;
  border-block-end: 1px solid rgb(248 250 247 / 14%);
  color: rgb(248 250 247 / 50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-inspector__body {
  min-width: 0;
}

.workflow-tabs {
  min-width: 0;
  border-inline-end: 1px solid rgb(248 250 247 / 14%);
  background: #171620;
}

.workflow-tabs button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 72px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 0;
  border-block-end: 1px solid rgb(248 250 247 / 12%);
  background: transparent;
  color: rgb(248 250 247 / 62%);
  font: 600 0.8rem/1.35 var(--font-sans);
  text-align: left;
  transition: background-color 180ms ease, color 180ms ease;
}

.workflow-tabs button span {
  color: rgb(248 250 247 / 38%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.workflow-tabs button::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 2px;
  background: transparent;
  content: "";
  transform: scaleY(0.25);
  transition: background-color 180ms ease, transform 220ms ease;
}

.workflow-tabs button:hover {
  background: rgb(248 250 247 / 4%);
  color: var(--text-inverse);
}

.workflow-tabs button[aria-selected="true"] {
  background: #22212f;
  color: var(--text-inverse);
}

.workflow-tabs button[aria-selected="true"]::before {
  background: var(--brand-electric);
  transform: scaleY(1);
}

.workflow-tabs button[aria-selected="true"] span {
  color: var(--brand-electric);
}

.workflow-tabs button:focus-visible {
  z-index: 2;
  outline: 2px solid var(--text-inverse);
  outline-offset: -4px;
}

.workflow-panels {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.workflow-state {
  display: grid;
  min-width: 0;
  min-height: 620px;
  grid-template-areas:
    "graph inspector"
    "graph context"
    "graph activity";
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  grid-template-rows: auto auto 1fr;
  border-block-end: 1px solid rgb(248 250 247 / 14%);
  background: #171620;
}

.workflow-state[hidden] {
  display: none;
}

.workflow-state__graph {
  position: relative;
  grid-area: graph;
  min-height: 620px;
  overflow: hidden;
  border-inline-end: 1px solid rgb(248 250 247 / 14%);
  background-color: #15141d;
  background-image:
    linear-gradient(rgb(248 250 247 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(248 250 247 / 4%) 1px, transparent 1px);
  background-size: 36px 36px;
}

.workflow-state__graph::after {
  position: absolute;
  inset: 20px;
  border: 1px solid rgb(248 250 247 / 6%);
  content: "";
  pointer-events: none;
}

.workflow-graph__label,
.workflow-graph__boundary {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-graph__label {
  top: 34px;
  left: 36px;
  color: rgb(248 250 247 / 42%);
}

.workflow-graph__boundary {
  inset: 72px 28% 42px 28px;
  padding: 10px;
  border: 1px dashed rgb(92 190 156 / 24%);
  color: rgb(92 190 156 / 62%);
  pointer-events: none;
}

.workflow-graph__edges {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.workflow-path {
  fill: none;
  stroke: rgb(248 250 247 / 18%);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.workflow-path--active {
  stroke: var(--brand-electric);
  stroke-dasharray: 680;
  stroke-width: 2;
}

[data-workflow-enhanced="true"] .workflow-state:not([hidden]) .workflow-path--active {
  animation: workflow-path-in 360ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

@keyframes workflow-path-in {
  from { stroke-dashoffset: 680; }
  to { stroke-dashoffset: 0; }
}

.workflow-node {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 94px;
  min-height: 52px;
  place-content: center;
  padding: 10px 12px;
  border: 1px solid rgb(248 250 247 / 22%);
  background: #22212f;
  color: var(--text-inverse);
  text-align: center;
  transform: translate(-50%, -50%);
}

.workflow-node b,
.workflow-node small {
  display: block;
}

.workflow-node b {
  font: 680 0.75rem/1.2 var(--font-mono);
}

.workflow-node small {
  margin-block-start: 4px;
  color: rgb(248 250 247 / 54%);
  font: 500 0.75rem/1.2 var(--font-mono);
}

.workflow-node--task {
  min-width: 82px;
  border-radius: 50%;
  aspect-ratio: 1;
}

.workflow-node--outcome {
  border-color: rgb(92 190 156 / 52%);
}

.workflow-node--done {
  border-style: double;
  border-color: var(--brand-mint);
}

.workflow-node--ready {
  border: 2px double var(--brand-electric);
  box-shadow: 0 0 0 5px rgb(70 233 159 / 6%);
}

.workflow-node--record {
  border-color: rgb(49 92 140 / 78%);
}

.workflow-node--person {
  border-color: rgb(248 250 247 / 42%);
  background: #2b2939;
}

.workflow-node--client {
  border-style: dashed;
  border-color: rgb(92 190 156 / 58%);
}

.workflow-node--harness {
  border-color: rgb(248 250 247 / 34%);
  background: #111018;
}

.workflow-node--pos-a { top: 20%; left: 50%; }
.workflow-node--pos-b { top: 64%; left: 27%; }
.workflow-node--pos-c { top: 64%; left: 73%; }
.workflow-node--pos-d { top: 66%; left: 50%; }
.workflow-node--pos-e { top: 50%; left: 21%; }
.workflow-node--pos-f { top: 50%; left: 50%; }
.workflow-node--pos-g { top: 50%; left: 79%; }
.workflow-node--pos-h { top: 28%; left: 17%; }
.workflow-node--pos-i { top: 73%; left: 80%; }
.workflow-node--pos-j { top: 28%; left: 82%; }
.workflow-node--pos-k { top: 78%; left: 56%; }
.workflow-node--pos-l { top: 75%; left: 80%; }

.workflow-state__inspector,
.workflow-state__context,
.workflow-state__activity {
  min-width: 0;
  margin: 0;
  padding: 26px 28px;
  border-block-end: 1px solid rgb(248 250 247 / 14%);
}

.workflow-state__inspector {
  grid-area: inspector;
}

.workflow-state__inspector > span,
.workflow-state__context > span {
  color: var(--brand-electric);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-state__inspector h3 {
  margin: 11px 0 0;
  color: var(--text-inverse);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.08;
}

.workflow-state__inspector p,
.workflow-state__context p {
  margin: 12px 0 0;
  color: rgb(248 250 247 / 66%);
  font-size: 0.9rem;
}

.workflow-state__context {
  grid-area: context;
  background: #1d1c28;
}

.workflow-state__context code {
  color: var(--text-inverse);
  white-space: normal;
}

.workflow-state__activity {
  grid-area: activity;
  align-content: start;
  padding-block: 20px;
  list-style: none;
}

.workflow-state__activity li {
  position: relative;
  padding: 10px 0 10px 72px;
  color: rgb(248 250 247 / 62%);
  font-size: 0.78rem;
}

.workflow-state__activity li + li {
  border-block-start: 1px solid rgb(248 250 247 / 10%);
}

.workflow-state__activity time {
  position: absolute;
  left: 0;
  color: rgb(248 250 247 / 38%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

[data-workflow-enhanced="true"] .workflow-inspector__body {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

[data-workflow-enhanced="true"] .workflow-panels {
  display: block;
}

[data-workflow-enhanced="true"] .workflow-state {
  border-block-end: 0;
}

/* Ownership model */

.model-section {
  background-image:
    linear-gradient(rgb(61 59 79 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(61 59 79 / 3.5%) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 64px 64px;
}

.ownership-map {
  position: relative;
}

.ownership-map__frame {
  position: relative;
  min-height: 540px;
  border-block: 1px solid var(--border-strong);
  background: rgb(251 251 247 / 78%);
}

.ownership-map__frame::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgb(61 59 79 / 13%) 1px, transparent 1.25px);
  background-size: 16px 16px;
  content: "";
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
  pointer-events: none;
}

.ownership-map__axis {
  position: absolute;
  inset: 18px 24px auto;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ownership-flow {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ownership-flow path:not(.ownership-flow__arrowhead) {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ownership-flow__guide {
  stroke: rgb(61 59 79 / 18%);
  stroke-dasharray: 2 9;
  stroke-width: 1;
}

.ownership-flow__outbound {
  stroke: var(--brand-anchor);
  stroke-width: 2.5;
}

.ownership-flow__return {
  stroke: var(--brand-mint);
  stroke-dasharray: 8 6;
  stroke-width: 2.5;
}

.ownership-flow__arrowhead {
  stroke: none;
}

.ownership-flow__arrowhead--outbound {
  fill: var(--brand-anchor);
}

.ownership-flow__arrowhead--return {
  fill: var(--brand-mint);
}

.ownership-flow__junction {
  fill: var(--brand-mint);
  stroke: var(--surface-card);
  stroke-width: 3;
}

.ownership-map__zones {
  position: absolute;
  inset: 58px 28px auto;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ownership-zone {
  position: relative;
  min-height: 242px;
  padding: 26px clamp(18px, 2.2vw, 30px) 22px;
  border-block-start: 2px solid var(--brand-plum);
}

.ownership-zone:not(:last-child) {
  border-inline-end: 1px solid var(--border-subtle);
}

.ownership-zone--vivia {
  margin: -12px -1px -8px;
  padding-block-start: 38px;
  border: 1px solid var(--brand-anchor);
  border-block-start-width: 3px;
  background: rgb(251 251 247 / 96%);
  box-shadow: 0 18px 38px rgb(49 92 140 / 10%);
}

.ownership-zone--external {
  border-block-start-style: dashed;
}

.ownership-zone__boundary {
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 5px 9px;
  background: var(--brand-anchor);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ownership-zone__step {
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ownership-zone h3 {
  max-inline-size: 15ch;
  margin-block: 22px 12px;
  font-size: clamp(1.12rem, 1.6vw, 1.42rem);
  line-height: 1.08;
}

.ownership-zone p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.ownership-zone ul {
  display: grid;
  gap: 5px;
  margin: 20px 0 0;
  padding: 13px 0 0;
  border-block-start: 1px solid var(--border-subtle);
  list-style: none;
}

.ownership-zone li {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
}

.ownership-zone li::before {
  margin-inline-end: 7px;
  color: var(--brand-mint);
  content: "—";
}

.ownership-map__outbound,
.ownership-map__return {
  position: absolute;
  z-index: 5;
  margin: 0;
  background: var(--surface-card);
  box-shadow: 0 0 0 7px rgb(251 251 247 / 88%);
}

.ownership-map__outbound {
  bottom: 165px;
  left: 40px;
  padding: 7px 10px;
}

.ownership-map__outbound strong,
.ownership-map__outbound span,
.ownership-map__return strong,
.ownership-map__return span {
  display: block;
}

.ownership-map__outbound strong,
.ownership-map__return strong {
  color: var(--brand-plum);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ownership-map__outbound span,
.ownership-map__return span {
  margin-block-start: 3px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ownership-map__return {
  right: 62px;
  bottom: 24px;
  max-inline-size: 390px;
  padding: 10px 12px 10px 52px;
  border-inline-start: 2px solid var(--brand-mint);
}

.ownership-map__return b {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--brand-mint);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.ownership-map__text {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block-end: 1px solid var(--border-strong);
  counter-reset: ownership-step;
  list-style: none;
}

.ownership-map__text li {
  min-width: 0;
  padding: 18px clamp(12px, 1.5vw, 20px) 22px;
  border-inline-end: 1px solid var(--border-subtle);
  color: var(--text-muted);
  counter-increment: ownership-step;
  font-size: 0.76rem;
  line-height: 1.5;
}

.ownership-map__text li:last-child {
  border-inline-end: 0;
}

.ownership-map__text li::before {
  display: block;
  margin-block-end: 9px;
  color: var(--brand-anchor);
  content: "0" counter(ownership-step);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Comparison */

.comparison-section {
  background: var(--surface-card);
}

.comparison-ledger {
  border-block: 1px solid var(--border-strong);
  background: var(--surface-card);
  box-shadow: 0 30px 70px rgb(61 59 79 / 8%);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: clamp(0.75rem, 0.92vw, 0.84rem);
  line-height: 1.5;
}

.comparison-table caption {
  padding: 16px 20px;
  border-inline: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.comparison-table th,
.comparison-table td {
  padding: clamp(13px, 1.55vw, 20px);
  border: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--brand-plum);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
}

.comparison-table thead th:first-child,
.comparison-table tbody th {
  width: 17%;
}

.comparison-table tbody th {
  background: rgb(61 59 79 / 3%);
  color: var(--brand-plum);
  font-size: 0.79rem;
  line-height: 1.35;
}

.comparison-table tbody tr:nth-child(even) td:not(:last-child) {
  background: rgb(61 59 79 / 1.75%);
}

.comparison-table tbody td:last-child {
  background: rgb(92 190 156 / 10%);
  box-shadow: inset 3px 0 0 var(--brand-mint);
  color: var(--brand-plum);
  font-weight: 650;
}

/* Principles */

.principles-shell {
  display: grid;
  max-width: 1160px;
  grid-template-columns: minmax(230px, 0.64fr) minmax(0, 1.36fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: start;
}

.principles-intro {
  padding-block-start: 2px;
}

.principles-intro h2 {
  max-inline-size: 10ch;
  margin: 0;
  color: var(--brand-plum);
  font-size: clamp(2.45rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.principles-intro > p:not(.section-kicker, .principles-intro__index) {
  max-inline-size: 34ch;
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.principles-intro .principles-intro__index {
  margin: clamp(48px, 7vw, 88px) 0 0;
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.principles-register {
  border-block-start: 1px solid var(--border-strong);
}

.principle-row {
  position: relative;
  border-block-end: 1px solid var(--border-strong);
}

.principle-row[open] {
  box-shadow: inset 3px 0 0 var(--brand-anchor);
}

.principle-row > summary {
  display: grid;
  min-height: 76px;
  grid-template-columns: 42px minmax(150px, 0.72fr) minmax(0, 1.28fr) 24px;
  gap: 18px;
  align-items: center;
  padding: 16px 14px 16px 18px;
  color: var(--brand-plum);
  cursor: pointer;
  list-style: none;
}

.principle-row > summary::-webkit-details-marker {
  display: none;
}

.principle-row > summary::after {
  grid-column: 4;
  color: var(--brand-anchor);
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
}

.principle-row[open] > summary::after {
  content: "−";
}

.principle-row > summary:focus-visible {
  outline: 3px solid var(--brand-anchor);
  outline-offset: 3px;
}

.principle-row__number {
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.principle-row__title {
  font-size: 1.2rem;
  font-weight: 760;
}

.principle-row__summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 450;
  line-height: 1.5;
}

.principle-row__reveal {
  opacity: 1;
}

.principle-row__body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: 8px 16px 34px 78px;
}

.principle-row__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.principle-diagram {
  display: grid;
  grid-template-columns: minmax(108px, auto) minmax(84px, 1fr) minmax(108px, auto);
  align-items: stretch;
  border-block: 1px solid var(--border-strong);
  background: rgb(251 251 247 / 42%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.35;
}

.principle-node {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 10px 12px;
  border-inline-start: 2px solid var(--brand-plum);
  color: var(--brand-plum);
  font-weight: 680;
}

.principle-node:last-child {
  border-inline-start: 0;
  border-inline-end: 2px solid var(--brand-anchor);
  text-align: end;
}

.principle-node--done,
.principle-node--recorded {
  border-inline-start-color: var(--brand-mint);
}

.principle-node--ready,
.principle-node--review,
.principle-node--person {
  border-inline-end-color: var(--brand-anchor);
}

.principle-node--bounded {
  border-inline-start-style: double;
  border-inline-start-width: 4px;
}

.principle-edge {
  position: relative;
  display: grid;
  place-items: center;
  padding-inline: 12px;
  background: linear-gradient(var(--border-strong), var(--border-strong)) center / 100% 1px no-repeat;
  color: var(--brand-anchor);
  font-size: 0.75rem;
  font-weight: 680;
  text-align: center;
  text-shadow: -4px 0 var(--surface-card), 4px 0 var(--surface-card);
}

.principle-edge::after {
  position: absolute;
  right: -1px;
  color: var(--brand-anchor);
  content: "›";
  font-size: 1.1rem;
  text-shadow: none;
}

.principle-edge--separate {
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 7px, transparent 7px 13px) center / 100% 1px no-repeat;
}

@supports (interpolate-size: allow-keywords) {
  [data-principles-enhanced="true"] {
    interpolate-size: allow-keywords;
  }

  [data-principles-enhanced="true"] .principle-row::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size 220ms ease, content-visibility 220ms allow-discrete, opacity 180ms ease;
  }

  [data-principles-enhanced="true"] .principle-row[open]::details-content {
    block-size: auto;
    opacity: 1;
  }

  [data-principles-enhanced="true"] .principle-row__reveal {
    transition: opacity 180ms ease 40ms;
  }

  [data-principles-enhanced="true"] .principle-row:not([open]) .principle-row__reveal {
    opacity: 0;
  }
}

/* Conversion */

.conversion-section {
  padding-block: clamp(112px, 14vw, 176px);
}

.conversion-record {
  max-width: 1160px;
}

.conversion-record__rule {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--brand-anchor);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.conversion-record__rule::before {
  flex: 1;
  height: 1px;
  background: var(--brand-plum);
  content: "";
}

.conversion-record__body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: clamp(40px, 8vw, 112px);
  align-items: end;
  margin-block-start: clamp(42px, 6vw, 72px);
}

.conversion-record h2 {
  max-inline-size: 13ch;
}

.conversion-record__body p {
  max-inline-size: 55ch;
  margin-block-start: 24px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
}

.conversion-record .home-actions {
  display: grid;
  justify-items: stretch;
  margin: 0;
}

.conversion-record .button,
.conversion-record .text-link {
  justify-content: center;
  text-align: center;
}

.conversion-record .text-link {
  border-block: 1px solid var(--border-strong);
}

.conversion-record .text-link::after {
  display: none;
}

@media (max-width: 1280px) {
  .graph-node--execution small {
    display: none;
  }
}

@media (max-width: 1100px) {
  .section-heading {
    gap: clamp(32px, 6vw, 72px);
  }

  .graph-ledger__surface {
    aspect-ratio: 0.9 / 1;
  }

  .dossier-node:not(.dossier-node--task) {
    max-width: 112px;
  }
}

@media (max-width: 1024px) {
  [data-workflow-enhanced="true"] .workflow-inspector__body {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-workflow-enhanced="true"] .workflow-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-inline-end: 0;
    border-block-end: 1px solid rgb(248 250 247 / 14%);
  }

  .workflow-tabs button {
    min-height: 64px;
    border-inline-end: 1px solid rgb(248 250 247 / 12%);
  }
}

@media (max-width: 1020px) {
  .home-hero__layout {
    gap: 32px;
  }

  .graph-ledger__surface {
    aspect-ratio: 0.9 / 1;
  }

  [data-context-enhanced="true"] .task-dossier__workspace {
    grid-template-columns: minmax(0, 1.08fr) minmax(270px, 0.72fr);
  }

  [data-context-enhanced="true"] .context-controls {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ownership-map__frame {
    min-height: 730px;
  }

  .ownership-flow {
    display: none;
  }

  .ownership-map__axis {
    position: static;
    padding: 18px 22px 0;
  }

  .ownership-map__zones {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 0;
    padding: 34px 22px 0;
  }

  .ownership-zone {
    min-height: 238px;
  }

  .ownership-zone::after {
    position: absolute;
    z-index: 4;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--brand-anchor);
    background: var(--surface-card);
    color: var(--brand-anchor);
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }

  .ownership-zone--people::after,
  .ownership-zone--mcp::after {
    top: calc(50% - 12px);
    right: -12px;
    content: "→";
  }

  .ownership-zone--vivia::after {
    right: calc(50% - 12px);
    bottom: -35px;
    content: "↓";
  }

  .ownership-map__outbound {
    bottom: 116px;
  }

  .ownership-map__return {
    right: 30px;
    bottom: 22px;
  }

  .ownership-map__return::before {
    position: absolute;
    top: 50%;
    left: -206px;
    width: 182px;
    padding-block-start: 8px;
    border-block-start: 2px dashed var(--brand-mint);
    color: var(--brand-plum);
    content: "RETURN PATH / VIVIA";
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .ownership-map__return::after {
    position: absolute;
    top: calc(50% - 6px);
    left: -218px;
    width: 0;
    height: 0;
    border-block: 7px solid transparent;
    border-inline-end: 12px solid var(--brand-mint);
    content: "";
  }

  .ownership-map__text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ownership-map__text li:nth-child(even) {
    border-inline-end: 0;
  }
}

@media (max-width: 959px) {
  .home-hero__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .graph-ledger__surface {
    aspect-ratio: 1.4 / 1;
    width: 100%;
  }

  .task-dossier__workspace,
  [data-context-enhanced="true"] .task-dossier__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-context-enhanced="true"] .context-controls {
    grid-column: auto;
  }

  .comparison-table,
  .comparison-table caption,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .comparison-table tbody tr {
    margin-block-end: 26px;
    border-block: 1px solid var(--border-strong);
    background: var(--surface-card);
  }

  .comparison-table tbody th,
  .comparison-table tbody td {
    border: 0;
    border-block-end: 1px solid var(--border-subtle);
  }

  .comparison-table tbody th {
    width: 100%;
    padding: 18px 20px;
    background: var(--brand-plum);
    color: var(--text-inverse);
    font-size: 0.92rem;
  }

  .comparison-table td::before {
    display: block;
    margin-block-end: 7px;
    color: var(--brand-anchor);
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 720;
    text-transform: uppercase;
  }

  .comparison-table tbody td:last-child {
    border-block-end: 0;
    box-shadow: inset 3px 0 0 var(--brand-mint);
  }
}

@media (max-width: 780px) {
  .site-header:not(.is-nav-enhanced) {
    position: relative;
  }

  .site-header:not(.is-nav-enhanced) .primary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding-block: 8px 12px;
  }

  .site-header:not(.is-nav-enhanced) .primary-nav .button {
    grid-column: 1 / -1;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-section {
    padding-block: clamp(72px, 20vw, 104px);
  }

  .section-heading h2,
  .conversion-record h2 {
    font-size: clamp(2.25rem, 12vw, 3.3rem);
  }

  .home-hero {
    min-height: 0;
    padding-block: 32px 72px;
  }

  .home-hero__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .home-hero__copy {
    padding-block-start: 0;
  }

  .home-hero h1 {
    max-inline-size: 12ch;
    margin-block-end: 18px;
    font-size: clamp(2.5rem, 11.7vw, 3.45rem);
  }

  .home-lede {
    font-size: 1rem;
  }

  .home-actions {
    margin-block-start: 22px;
  }

  .graph-ledger__surface {
    aspect-ratio: 1.45 / 1;
    width: 100%;
    min-height: 464px;
  }

  .graph-ledger__header {
    min-height: 64px;
    gap: 10px;
    font-size: 0.75rem;
  }

  .graph-ledger__stage {
    inset-block-start: 64px;
  }

  .graph-ledger__edges [data-edge-topology="wide"] {
    display: none;
  }

  .graph-ledger__edges [data-edge-topology="compact"] {
    display: inline;
  }

  .graph-ledger__coordinate {
    display: none;
  }

  .graph-node {
    padding: 7px;
  }

  .graph-node--task {
    width: 60px;
    min-height: 60px;
  }

  .graph-node--central {
    width: 74px;
    min-height: 74px;
  }

  .graph-node--decision,
  .graph-node--execution,
  .graph-node--review {
    width: 64px;
    min-height: 44px;
  }

  .graph-node--note {
    width: 64px;
    min-height: 44px;
  }

  .graph-node b {
    font-size: 0.75rem;
  }

  .graph-node small {
    display: none;
    font-size: 0.75rem;
  }

  .graph-node--note b {
    white-space: nowrap;
  }

  .graph-node--central::after {
    display: none;
  }

  [data-node-position="API-42"] { top: 33%; left: 50%; }
  [data-node-position="DB-17"] { top: 15%; left: 28%; }
  [data-node-position="MCP-31"] { top: 24%; left: 72%; }
  [data-node-position="DOC-08"] { top: 44.75%; left: 25%; }
  [data-node-position="DEC-12"] { top: 9%; left: 50%; }
  [data-node-position="NOTE-21"] { top: 45.4%; left: 75%; }
  [data-node-position="RUN-94"] { top: 60%; left: 70%; }
  [data-node-position="REV-03"] { top: 60%; left: 30%; }

  .graph-ledger__inspector {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    min-height: 0;
    gap: 3px;
    padding: 9px 11px;
  }

  .graph-ledger__relationships ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .problem-composition {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .problem-composition__copy h2 {
    max-inline-size: 11ch;
  }

  .fragment-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 32px;
    min-height: 0;
  }

  .evidence-fragment--chat,
  .evidence-fragment--tracker,
  .evidence-fragment--decision {
    grid-column: auto;
    grid-row: auto;
  }

  .evidence-fragment:not(:last-of-type)::after {
    position: absolute;
    bottom: -17px;
    left: 0;
    width: min(180px, 68%);
    height: 1px;
    background: linear-gradient(90deg, var(--brand-anchor) 0 42%, transparent 42% 54%, var(--border-strong) 54% 78%, transparent 78% 88%, var(--brand-anchor) 88%);
    content: "";
  }

  .fragment-field__paths {
    display: none;
  }

  .task-dossier__header,
  .workflow-state,
  .principle-row__body,
  .conversion-record__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles-intro h2 {
    max-inline-size: 12ch;
  }

  .principles-intro > p:not(.section-kicker, .principles-intro__index) {
    max-inline-size: 52ch;
  }

  .principles-intro .principles-intro__index {
    margin-block-start: 30px;
  }

  .task-dossier__workspace,
  [data-context-enhanced="true"] .task-dossier__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-context-enhanced="true"] .context-controls {
    display: grid;
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-inline-end: 1px solid rgb(248 250 247 / 14%);
  }

  .context-control {
    min-height: 48px;
  }

  .task-dossier__object {
    aspect-ratio: 1.05 / 1;
    border-inline-start: 1px solid rgb(248 250 247 / 14%);
  }

  .task-dossier__panels {
    border-inline-start: 1px solid rgb(248 250 247 / 14%);
  }

  .context-layer {
    min-height: 0;
  }

  [data-workflow-enhanced="true"] .workflow-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-tabs button {
    min-height: 52px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 8px 14px;
    border-inline-end: 0;
  }

  .workflow-state {
    min-height: 0;
    grid-template-areas:
      "graph"
      "inspector"
      "context"
      "activity";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .workflow-state__graph {
    min-height: 440px;
    border-inline-end: 0;
    border-block-end: 1px solid rgb(248 250 247 / 14%);
  }

  .workflow-state__inspector,
  .workflow-state__context,
  .workflow-state__activity {
    padding-inline: 22px;
  }

  .principle-row > summary {
    min-height: 96px;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 5px 14px;
    padding-inline-start: 14px;
  }

  .principle-row__title {
    grid-column: 2;
  }

  .principle-row__summary {
    grid-column: 2;
  }

  .principle-row > summary::after {
    grid-row: 1 / span 2;
    grid-column: 3;
  }

  .principle-row__body {
    padding: 4px 16px 30px 66px;
  }

  .conversion-section {
    padding-block: clamp(88px, 25vw, 120px);
  }

  .conversion-record__body {
    align-items: start;
  }

  .conversion-record .home-actions {
    max-inline-size: 320px;
  }
}

@media (max-width: 600px) {
  .ownership-map__frame {
    min-height: 0;
    padding-block-end: 18px;
  }

  .ownership-map__axis {
    display: block;
    padding-inline: 16px;
  }

  .ownership-map__axis span {
    display: block;
  }

  .ownership-map__axis span + span {
    margin-block-start: 4px;
  }

  .ownership-map__zones {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 30px 16px 0;
  }

  .ownership-zone,
  .ownership-zone--vivia {
    min-height: 0;
    margin: 0;
    padding: 24px 18px 20px;
    border-inline: 0;
    border-block-end: 1px solid var(--border-subtle);
    box-shadow: none;
  }

  .ownership-zone--vivia {
    border: 1px solid var(--brand-anchor);
    border-block-start-width: 3px;
  }

  .ownership-zone--people::after,
  .ownership-zone--vivia::after,
  .ownership-zone--mcp::after {
    top: auto;
    right: 18px;
    bottom: -26px;
    content: "↓";
  }

  .ownership-map__outbound,
  .ownership-map__return {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    max-inline-size: none;
    margin: 22px 16px 0;
    box-shadow: none;
  }

  .ownership-map__return {
    padding-inline-start: 48px;
  }

  .ownership-map__return::before {
    position: static;
    display: block;
    width: auto;
    margin-block: -2px 12px;
    padding: 7px 0 7px 12px;
    border-block-start: 0;
    border-inline-start: 2px dashed var(--brand-mint);
    content: "↑ RETURN PATH / VIVIA";
  }

  .ownership-map__return::after {
    display: none;
  }

  .ownership-map__text {
    grid-template-columns: minmax(0, 1fr);
  }

  .ownership-map__text li,
  .ownership-map__text li:nth-child(even) {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 16px;
    border-inline-end: 0;
    border-block-end: 1px solid var(--border-subtle);
  }

  .ownership-map__text li::before {
    margin: 0;
  }

  .comparison-table caption {
    padding-inline: 14px;
  }

  .comparison-table tbody th,
  .comparison-table tbody td {
    padding-inline: 16px;
  }

  .principle-row__body {
    padding-inline: 54px 10px;
  }

  .principle-diagram {
    grid-template-columns: minmax(0, 1fr);
  }

  .principle-node,
  .principle-node:last-child {
    min-height: 46px;
    border-inline-start: 2px solid var(--brand-plum);
    border-inline-end: 0;
    text-align: start;
  }

  .principle-edge {
    min-height: 48px;
    background: linear-gradient(90deg, var(--border-strong), var(--border-strong)) center / 1px 100% no-repeat;
  }

  .principle-edge::after {
    right: auto;
    bottom: -2px;
    content: "⌄";
  }
}

@media (max-width: 520px) {
  .section-heading h2,
  .conversion-record h2 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .graph-node--central {
    width: 66px;
    min-height: 66px;
  }

  .dossier-object__caption,
  .dossier-node small,
  .workflow-node small {
    display: none;
  }

  .dossier-node:not(.dossier-node--task) {
    width: 32px;
    min-height: 32px;
    max-width: none;
    place-content: center;
    padding: 0;
  }

  .dossier-node:not(.dossier-node--task) b {
    display: none;
  }

  .dossier-node:not(.dossier-node--task)::after {
    color: var(--brand-mint);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .dossier-node--intent::after { content: "01"; }
  .dossier-node--constraint::after { content: "02"; }
  .dossier-node--dependency::after { content: "03"; }
  .dossier-node--decision::after { content: "04"; }
  .dossier-node--note::after { content: "05"; }
  .dossier-node--execution::after { content: "06"; }
}

@media (max-width: 420px) {
  .home-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .home-actions {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .home-actions .button,
  .home-actions .text-link {
    min-width: 0;
    justify-content: center;
    padding-inline: 10px;
    font-size: 0.78rem;
    text-align: center;
  }

  .graph-ledger__surface {
    aspect-ratio: 0.85 / 1;
  }

  .graph-node--note small,
  .graph-node--dependent small {
    display: none;
  }

  .graph-ledger__inspector p {
    font-size: 0.75rem;
  }

  .task-dossier {
    padding: 14px;
  }

  .task-dossier__header {
    padding: 16px 8px 22px;
  }

  .task-dossier__header h3 {
    font-size: clamp(1.65rem, 9vw, 2.25rem);
  }

  .context-control {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 9px;
    font-size: 0.75rem;
  }

  .task-dossier__object {
    aspect-ratio: 0.82 / 1;
  }

  .dossier-object__caption {
    top: 9px;
    left: 10px;
    font-size: 0.75rem;
  }

  .dossier-node {
    max-width: 105px;
    padding: 6px 7px;
  }

  .dossier-node b {
    font-size: 0.75rem;
  }

  .dossier-node small {
    font-size: 0.75rem;
  }

  .dossier-node--intent { top: 14.5%; left: 24%; }
  .dossier-node--constraint { top: 24%; left: 79%; }
  .dossier-node--dependency { top: 84%; left: 20%; }
  .dossier-node--decision { top: 54%; left: 18%; }
  .dossier-node--note { top: 88%; left: 59%; }
  .dossier-node--execution { top: 72%; left: 81%; }

  .dossier-node--task {
    top: 48%;
    left: 53%;
    width: 94px;
    padding: 10px;
  }

  .dossier-node--task b {
    font-size: 0.8rem;
  }

  .dossier-node--task em {
    font-size: 0.75rem;
  }

  .context-layer,
  .ownership-zone {
    padding: 20px;
  }

  .workflow-state__graph {
    min-height: 350px;
  }

  .workflow-node {
    min-width: 82px;
    max-width: 112px;
    min-height: 46px;
    padding: 8px;
  }

  .workflow-node--task {
    min-width: 74px;
  }

  .workflow-node b {
    font-size: 0.75rem;
  }

  .workflow-node small {
    font-size: 0.75rem;
  }

  .workflow-graph__boundary {
    inset: 62px 25% 26px 18px;
    font-size: 0.75rem;
  }

  .workflow-graph__label {
    top: 24px;
    left: 24px;
  }
}

@media (max-width: 340px) {
  .graph-ledger__surface {
    aspect-ratio: 0.69 / 1;
  }
}

@media (max-width: 250px) {
  .graph-ledger__surface {
    aspect-ratio: auto;
    min-height: 0;
  }

  .graph-ledger__header {
    position: relative;
    inset: auto;
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    overflow-wrap: anywhere;
  }

  .ledger-state {
    text-align: start;
  }

  .graph-ledger__stage {
    position: relative;
    inset: auto;
    display: grid;
    gap: 10px;
    padding: 10px;
    overflow: visible;
  }

  .graph-ledger__coordinate,
  .graph-ledger__edges {
    display: none;
  }

  .graph-ledger__nodes {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .graph-ledger__nodes[hidden] {
    display: none;
  }

  .graph-node,
  .graph-node--task,
  .graph-node--central,
  .graph-node--decision,
  .graph-node--note,
  .graph-node--execution,
  .graph-node--review {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    aspect-ratio: auto;
    padding: 7px 4px;
    transform: none;
    clip-path: none;
  }

  .graph-node--central::after {
    display: none;
  }

  .graph-node[aria-pressed="false"]:hover,
  .graph-node[aria-pressed="false"]:focus-visible {
    transform: none;
  }

  .graph-node b {
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .graph-ledger__inspector {
    position: relative;
    inset: auto;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

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

  .graph-ledger__edges {
    transform: none !important;
  }

  [data-workflow-enhanced="true"] .workflow-state:not([hidden]) .workflow-path--active {
    animation: none;
    stroke-dashoffset: 0;
  }

  [data-principles-enhanced="true"] .principle-row::details-content,
  [data-principles-enhanced="true"] .principle-row__reveal {
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .graph-ledger__surface,
  .task-dossier,
  .workflow-state__record,
  .ownership-zone,
  .comparison-table th,
  .comparison-table td,
  .principle-row {
    border-color: CanvasText;
  }

  .graph-node--central,
  .workflow-tabs button[aria-selected="true"],
  .workflow-node--ready,
  .ownership-zone--vivia,
  .comparison-table tbody td:last-child {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  [data-graph-edge] {
    stroke: CanvasText;
  }

  .principle-row[open] {
    border: 2px solid Highlight;
  }

  .principle-edge {
    border-block: 1px dashed CanvasText;
    background: none;
    color: LinkText;
    text-shadow: none;
  }
}

@media (prefers-contrast: more) {
  [data-graph-edge] {
    opacity: 0.8;
  }

  .graph-node,
  .graph-ledger__inspector {
    border-color: rgb(248 250 247 / 72%);
  }

  .principle-row,
  .graph-node,
  .workflow-tabs button {
    border-color: currentColor;
  }

  .principle-row[open] {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }
}
