:root {
  --paper: #f2f0ea;
  --surface: #fbfaf6;
  --ink: #171815;
  --muted: #656860;
  --line: #b8bbb2;
  --faint: #dbdad2;
  --accent: #2456ce;
  --accent-dark: #173a8c;
  --warning: #78412d;
  --speed: 380ms;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(23, 24, 21, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 21, 0.022) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

html[data-authority-palette="night"],
html[data-authority-palette="night"] body {
  background-color: #10120f;
}

html[data-authority-palette="night"] body {
  background-image:
    linear-gradient(rgba(242, 241, 235, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 241, 235, 0.028) 1px, transparent 1px);
}

html[data-authority-palette="mono"],
html[data-authority-palette="mono"] body {
  background-color: #f7f7f4;
}

html[data-authority-palette="mono"] body {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

html[data-authority-palette="translated"],
html[data-authority-palette="translated"] body {
  background-color: #ecefe9;
}

html[data-authority-palette="translated"] body {
  background-image:
    linear-gradient(112deg, rgba(36, 86, 206, 0.05) 0 49%, rgba(120, 65, 45, 0.045) 49%),
    linear-gradient(rgba(23, 24, 21, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 21, 0.018) 1px, transparent 1px);
}

html[data-authority-palette="fractured"],
html[data-authority-palette="fractured"] body {
  background-color: #f0eee8;
}

html[data-authority-palette="codex"],
html[data-authority-palette="codex"] body {
  background-color: #f7f7f5;
}

html[data-authority-palette="codex"] body {
  background-image: none;
}

html[data-authority-palette="blackout"],
html[data-authority-palette="blackout"] body {
  background: #050505;
}

html[data-authority-palette="whiteout"],
html[data-authority-palette="whiteout"] body {
  background: #fafaf8;
}

html[data-authority-palette="fractured"] body {
  background-image:
    linear-gradient(90deg, rgba(21, 61, 118, 0.055) 0 31%, transparent 31% 67%, rgba(113, 58, 44, 0.055) 67%),
    linear-gradient(rgba(23, 24, 21, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 21, 0.018) 1px, transparent 1px);
}

html[data-field-palette="paper"],
html[data-field-palette="paper"] body {
  background-color: #f2f0ea;
}

html[data-field-palette="paper"] body {
  background-image:
    linear-gradient(rgba(23, 24, 21, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 21, 0.022) 1px, transparent 1px);
}

html[data-field-palette="night"],
html[data-field-palette="night"] body {
  background-color: #101820;
}

html[data-field-palette="night"] body {
  background-image:
    linear-gradient(rgba(238, 242, 238, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 242, 238, 0.026) 1px, transparent 1px);
}

html[data-field-palette="oxblood"],
html[data-field-palette="oxblood"] body {
  background-color: #5c1722;
}

html[data-field-palette="oxblood"] body {
  background-image:
    linear-gradient(rgba(255, 242, 222, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 242, 222, 0.026) 1px, transparent 1px);
}

html[data-field-palette="evergreen"],
html[data-field-palette="evergreen"] body {
  background-color: #143e33;
}

html[data-field-palette="evergreen"] body {
  background-image:
    linear-gradient(rgba(243, 240, 216, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 240, 216, 0.025) 1px, transparent 1px);
}

html[data-field-palette="cobalt"],
html[data-field-palette="cobalt"] body {
  background-color: #153e93;
}

html[data-field-palette="cobalt"] body {
  background-image:
    linear-gradient(rgba(245, 244, 237, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 244, 237, 0.028) 1px, transparent 1px);
}

html[data-field-palette="mono"],
html[data-field-palette="mono"] body {
  background-color: #202020;
}

html[data-field-palette="mono"] body {
  background-image:
    linear-gradient(rgba(240, 239, 232, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 239, 232, 0.03) 1px, transparent 1px);
}

html[data-field-palette="translated"],
html[data-field-palette="translated"] body {
  background-color: #ecefe9;
}

html[data-field-palette="fractured"],
html[data-field-palette="fractured"] body {
  background-color: #f0eee8;
}

html[data-field-palette="codex"],
html[data-field-palette="codex"] body {
  background: #f7f7f5;
}

html[data-field-palette="blackout"],
html[data-field-palette="blackout"] body {
  background: #050505;
}

html[data-field-palette="whiteout"],
html[data-field-palette="whiteout"] body {
  background: #fafaf8;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(36, 86, 206, 0.3);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app {
  --field-paper: #f2f0ea;
  --field-surface: #fbfaf6;
  --field-ink: #171815;
  --field-muted: #656860;
  --field-line: #b8bbb2;
  --field-faint: #dbdad2;
  --field-accent: #2456ce;
  --field-accent-dark: #173a8c;
  --field-accent-ink: #fff;
  --field-warning: #78412d;
  --paper: var(--field-paper);
  --surface: var(--field-surface);
  --ink: var(--field-ink);
  --muted: var(--field-muted);
  --line: var(--field-line);
  --faint: var(--field-faint);
  --accent: var(--field-accent);
  --accent-dark: var(--field-accent-dark);
  --accent-ink: var(--field-accent-ink);
  --warning: var(--field-warning);
  --authority-paper: #fbfaf6;
  --authority-panel: #f3eee8;
  --authority-ink: #171815;
  --authority-muted: #656860;
  --authority-line: #b8bbb2;
  --authority-faint: #dbdad2;
  --authority-accent: #2456ce;
  --authority-accent-dark: #173a8c;
  --authority-accent-ink: #fff;
  --authority-warning: #78412d;
  --authority-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --authority-record-font: ui-monospace, SFMono-Regular, Menlo, monospace;
  --test-paper: #edf2ec;
  --test-ink: #36594b;
  --test-issue-paper: #edf0f3;
  --test-issue-ink: #445a73;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(40px, 7vh, 92px) 0 72px;
}

.title-block {
  min-height: clamp(190px, 36vh, 380px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: min-height var(--speed) ease;
}

.work-title {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(56px, 10.6vw, 152px);
  font-weight: 430;
  letter-spacing: -0.075em;
  line-height: 0.86;
  text-wrap: balance;
  transition:
    font-size var(--speed) ease,
    letter-spacing var(--speed) ease,
    transform var(--speed) ease;
}

.title-status {
  min-height: 1.25em;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.remote-entry,
.workplace,
.offboarding {
  max-width: 900px;
  margin-left: auto;
  padding: clamp(25px, 4vw, 48px);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(31, 34, 27, 0.075);
  transition:
    max-width var(--speed) ease,
    padding var(--speed) ease,
    border-radius var(--speed) ease,
    transform var(--speed) ease;
}

.small-label,
.orientation-label,
.condition-label,
.service-label,
.frozen-label,
.surface-state,
.region-name,
.build-state,
.offboarding-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.remote-entry h2 {
  max-width: 12ch;
  margin: 14px 0 34px;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 460;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.remote-entry.is-expired h2 {
  max-width: 21ch;
  font-size: clamp(27px, 4.2vw, 50px);
  line-height: 1.02;
}

.workplace-header {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
  min-height: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--faint);
}

.condition-label:not(:empty)::before,
.service-label:not(:empty)::before,
.frozen-label:not(:empty)::before {
  content: "·";
  margin-right: 22px;
  color: var(--line);
}

.attention {
  margin: 34px 0 0;
}

.attention h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 490;
  letter-spacing: -0.045em;
  line-height: 1;
}

.attention-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 25px;
}

.attention-button {
  padding: 3px 0 5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.attention-button:hover,
.attention-button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.attention-button[aria-pressed="true"]::after {
  content: " — included";
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attention-button[data-retained="true"] {
  cursor: default;
  opacity: 1;
}

.attention-button[data-retained="true"][aria-pressed="true"]::after {
  content: " — retained";
}

.working-surface {
  margin-top: 42px;
  border-top: 1px solid var(--ink);
  transition:
    width var(--speed) ease,
    opacity var(--speed) ease;
}

.surface-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 28px;
}

.surface-title {
  margin: 8px 0 0;
  font-size: clamp(23px, 3.2vw, 38px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.surface-actions {
  display: flex;
  align-items: start;
  gap: 18px;
}

.surface-action {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 7px;
}

.response-button,
.test-button,
.revision-button {
  padding: 3px 0 4px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.response-button:hover:not(:disabled),
.test-button:hover:not(:disabled),
.revision-button:hover:not(:disabled) {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.response-button:disabled,
.test-button:disabled,
.revision-button:disabled {
  color: #a1a29d;
  border-bottom-style: dotted;
  cursor: not-allowed;
}

.action-state {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.revision-region {
  position: relative;
  margin: 0 0 26px;
  padding: 22px;
  background: #efeee7;
  border: 1px solid var(--line);
}

.second-border-note {
  position: absolute;
  right: 12px;
  bottom: -1px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 3px 7px 2px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
  background: #efeee7;
  transform: translateY(50%);
}

.revision-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.revision-header h3 {
  max-width: 25ch;
  margin: 7px 0 0;
  font-size: clamp(19px, 2.5vw, 27px);
  font-weight: 510;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.revision-header .text-action {
  min-height: 0;
  padding: 3px 0 4px;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.revision-copy {
  max-width: 58ch;
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.revision-tree {
  display: grid;
  gap: 14px;
}

.revision-branch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(210px, 1.25fr);
  gap: 10px 24px;
  padding: 0 0 14px 18px;
  border-left: 1px solid var(--line);
}

.revision-branch::before {
  position: absolute;
  top: 15px;
  left: -1px;
  width: 12px;
  border-top: 1px solid var(--line);
  content: "";
}

.revision-decision {
  justify-self: start;
  min-height: 32px;
  padding: 6px 9px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.revision-decision:hover {
  border-color: var(--ink);
}

.revision-decision.is-proposed {
  color: var(--warning);
  border-color: currentColor;
}

.revision-dependencies {
  display: grid;
  gap: 4px;
  align-content: start;
  margin: 0;
  padding: 3px 0 0;
  list-style: none;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.revision-dependencies .revision-consequence {
  color: var(--warning);
}

.current-retained {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-region {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(270px, 1.45fr);
  gap: 18px 30px;
  padding: 20px 0;
  border-top: 1px solid var(--faint);
  transition:
    padding var(--speed) ease,
    opacity var(--speed) ease,
    transform var(--speed) ease;
}

.region-example {
  max-width: 34ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-decisions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 7px;
}

.inline-decision {
  min-height: 32px;
  padding: 6px 9px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.inline-decision:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.inline-decision[aria-pressed="true"] {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
}

.inline-decision.is-reversal {
  color: var(--warning);
  background: transparent;
  border-color: currentColor;
}

.decision-state {
  display: block;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.decision-effect {
  display: block;
  max-width: 34ch;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 430;
  line-height: 1.35;
  opacity: 0.68;
}

.test-slot,
.response-slot {
  grid-column: 2;
  min-height: 0;
}

.test-result {
  margin: 2px 0 0;
  padding: 9px 12px;
  color: var(--test-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--test-paper);
  border-left: 2px solid currentColor;
}

.test-result.is-open-issue {
  color: var(--test-issue-ink);
  background: var(--test-issue-paper);
}

.response-slip {
  margin: 2px 0 0;
  padding: 10px 12px;
  color: var(--authority-warning);
  font-family: var(--authority-record-font);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--authority-panel);
  border-left: 2px solid currentColor;
}

.accountables-panel {
  margin: 24px 0 0;
  padding: 17px;
  color: var(--authority-ink);
  font-family: var(--authority-font);
  background: var(--authority-panel);
  border: 1px solid var(--authority-faint);
}

.accountables-panel h3 {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.accountables-panel ul {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--authority-record-font);
  font-size: 9px;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.code-field {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  margin-top: 30px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.code-field label {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0;
  color: var(--ink);
}

.code-field input {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
}

.code-field input:focus {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.surface-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.primary-action,
.text-action {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 9px;
  cursor: pointer;
}

.primary-action {
  color: var(--accent-ink);
  font-weight: 650;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-action:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.primary-action:disabled {
  color: color-mix(in srgb, var(--muted) 82%, var(--surface));
  background: color-mix(in srgb, var(--surface) 78%, var(--line));
  border-color: color-mix(in srgb, var(--surface) 58%, var(--line));
  cursor: not-allowed;
}

.institutional-record {
  display: grid;
  gap: 7px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--faint);
}

.record-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.record-line.is-accountable {
  color: var(--warning);
}

.record-number {
  color: #9a9c95;
}

.offboarding h2 {
  margin: 12px 0 22px;
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 450;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.closure-statement {
  max-width: 58ch;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.outcome-record {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 28px;
  margin: 0 0 40px;
  padding: 20px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.outcome-record dt {
  color: var(--muted);
}

.outcome-record dd {
  margin: 0;
}

.noncompete,
.agent-invitation {
  max-width: 62ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.agent-offboarding {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.agent-offboarding summary {
  padding: 13px 0;
  color: var(--ink);
  font-family: var(--authority-record-font);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.agent-offboarding-terms {
  padding: 0 0 16px 18px;
}

.agent-offboarding-terms p {
  margin: 0;
}

.agent-offboarding-terms p + p {
  margin-top: 8px;
}

.agent-offboarding a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

.access-revoked {
  margin: 40px 0 12px;
  font-size: 22px;
  font-weight: 670;
  letter-spacing: -0.025em;
}

.personal-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 26px;
  padding: 22px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.personal-items p {
  max-width: 42ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.reapply-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--faint);
}

.reapply-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.text-action {
  color: var(--accent);
  background: transparent;
  border: 1px solid currentColor;
}

.app.has-attention .title-block {
  min-height: 112px;
}

.app.has-attention .work-title {
  font-size: clamp(34px, 5vw, 68px);
  letter-spacing: -0.055em;
}

.app.is-fast {
  --speed: 140ms;
}

.app.is-narrow .working-surface {
  width: 76%;
  margin-left: auto;
}

.app.is-stacked .work-region {
  grid-template-columns: 1fr;
}

.app.is-stacked .test-slot,
.app.is-stacked .response-slot {
  grid-column: 1;
}

.app.is-dense .workplace {
  max-width: 100%;
  padding: clamp(21px, 3vw, 34px);
  border-radius: 5px;
}

.app.is-hierarchy .region-name {
  color: var(--ink);
  font-size: 12px;
}

.app.is-spare .region-example,
.app.is-spare .surface-state {
  display: none;
}

.app.is-guidance-short .region-example {
  max-width: 18ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app.is-guidance-hidden .guidance-region .region-example {
  visibility: hidden;
}

.app.is-reserved .work-region {
  min-height: 142px;
}

.app.is-sequential .work-region {
  counter-increment: region;
}

.app.is-sequential .working-surface {
  counter-reset: region;
}

.app.is-sequential .region-name::before {
  content: counter(region, decimal-leading-zero) " / ";
  color: var(--line);
}

.app.is-guidance-first .guidance-region {
  order: -1;
}

.app.is-guidance-first .working-surface {
  display: flex;
  flex-direction: column;
}

.app.is-stateful .surface-state::after {
  content: " / prior deployment retained";
}

.app.is-applying .workplace {
  transform: translateY(3px);
  opacity: 0.68;
  pointer-events: none;
}

.app.is-refused .title-block {
  min-height: 88px;
}

.app.is-refused .work-title {
  font-size: clamp(30px, 4.6vw, 62px);
  text-transform: uppercase;
}

/* Visual lineage is fixed by the authority present when the encounter begins. */

.app[data-lineage-palette="night"] {
  --authority-paper: #171916;
  --authority-panel: #242620;
  --authority-ink: #f2f1eb;
  --authority-muted: #aaa9a3;
  --authority-line: #686a66;
  --authority-faint: #393b38;
  --authority-accent: #a9beff;
  --authority-accent-dark: #c3d0ff;
  --authority-accent-ink: #10120f;
  --authority-warning: #e5a786;
  color: #f2f1eb;
}

.app[data-lineage-palette="night"] .title-status {
  color: #aaa9a3;
}

.app[data-lineage-palette="oxblood"] {
  --authority-paper: #761f2f;
  --authority-panel: #8a2b3d;
  --authority-ink: #fff2de;
  --authority-muted: #ddb8ae;
  --authority-line: #a75a63;
  --authority-faint: #843544;
  --authority-accent: #f1b65a;
  --authority-accent-dark: #f6ca82;
  --authority-accent-ink: #42131b;
  --authority-warning: #ffb1b9;
}

.app[data-lineage-palette="evergreen"] {
  --authority-paper: #1d5142;
  --authority-panel: #275f4f;
  --authority-ink: #f3f0d8;
  --authority-muted: #aac2b0;
  --authority-line: #5e8a75;
  --authority-faint: #326453;
  --authority-accent: #e0be5d;
  --authority-accent-dark: #efd47f;
  --authority-accent-ink: #173529;
  --authority-warning: #a5ddc2;
}

.app[data-lineage-palette="cobalt"] {
  --authority-paper: #1f53b6;
  --authority-panel: #2a61c4;
  --authority-ink: #f5f4ed;
  --authority-muted: #b7c7e8;
  --authority-line: #6d8fd2;
  --authority-faint: #3864b9;
  --authority-accent: #f4c344;
  --authority-accent-dark: #ffd56a;
  --authority-accent-ink: #102c71;
  --authority-warning: #ffae8e;
}

.app[data-lineage-palette="translated"] .work-title {
  color: #213f84;
}

.app[data-lineage-palette="translated"] {
  --authority-paper: #f7f5ef;
  --authority-panel: #e9edf3;
  --authority-ink: #213f84;
  --authority-muted: #5f6a78;
  --authority-line: #9ca8b7;
  --authority-faint: #cfd5dc;
  --authority-accent: #78412d;
  --authority-accent-dark: #593122;
  --authority-warning: #78412d;
}

.app[data-lineage-palette="mono"] {
  --authority-paper: #f8f8f5;
  --authority-panel: #ecece8;
  --authority-ink: #11120f;
  --authority-muted: #5d5e59;
  --authority-line: #93958f;
  --authority-faint: #d2d3ce;
  --authority-accent: #11120f;
  --authority-accent-dark: #383a35;
  --authority-warning: #4d4e49;
}

.app[data-lineage-palette="fractured"] {
  --authority-paper: #f8f5ee;
  --authority-panel: #eeeef0;
  --authority-ink: #153d76;
  --authority-muted: #5f6470;
  --authority-line: #9da2ac;
  --authority-faint: #d0d2d6;
  --authority-accent: #713a2c;
  --authority-accent-dark: #52291f;
  --authority-warning: #713a2c;
}

.app[data-lineage-palette="fractured"] #title-accountables {
  color: #153d76;
}

.app[data-lineage-palette="fractured"] #title-received {
  color: #713a2c;
}

.app[data-lineage-palette="codex"] {
  --authority-paper: #ffffff;
  --authority-panel: #f1f1ef;
  --authority-ink: #0d0d0d;
  --authority-muted: #686866;
  --authority-line: #c7c7c3;
  --authority-faint: #e6e6e2;
  --authority-accent: #0d0d0d;
  --authority-accent-dark: #333331;
  --authority-accent-ink: #fff;
  --authority-warning: #6f5a43;
  --authority-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app[data-lineage-palette="blackout"] {
  --authority-paper: #050505;
  --authority-panel: #050505;
  --authority-ink: #050505;
  --authority-muted: #050505;
  --authority-line: #050505;
  --authority-faint: #050505;
  --authority-accent: #050505;
  --authority-accent-dark: #050505;
  --authority-accent-ink: #050505;
  --authority-warning: #050505;
  color: #050505;
}

.app[data-lineage-palette="whiteout"] {
  --authority-paper: #fafaf8;
  --authority-panel: #fafaf8;
  --authority-ink: #fafaf8;
  --authority-muted: #fafaf8;
  --authority-line: #fafaf8;
  --authority-faint: #fafaf8;
  --authority-accent: #fafaf8;
  --authority-accent-dark: #fafaf8;
  --authority-accent-ink: #fafaf8;
  --authority-warning: #fafaf8;
  color: #fafaf8;
}

/* Participant fields inherit an authority family and refine it through committed work. */

.app[data-field-palette="night"] {
  --field-paper: #101820;
  --field-surface: #17232c;
  --field-ink: #eef2ee;
  --field-muted: #a7b1b5;
  --field-line: #485963;
  --field-faint: #293943;
  --field-accent: #9db8ff;
  --field-accent-dark: #bfd0ff;
  --field-accent-ink: #101820;
  --field-warning: #ef8d65;
  color: var(--ink);
}

.app[data-field-palette="oxblood"] {
  --field-paper: #5c1722;
  --field-surface: #761f2f;
  --field-ink: #fff2de;
  --field-muted: #ddb8ae;
  --field-line: #a75a63;
  --field-faint: #843544;
  --field-accent: #f1b65a;
  --field-accent-dark: #f6ca82;
  --field-accent-ink: #42131b;
  --field-warning: #ffb1b9;
  color: var(--ink);
}

.app[data-field-palette="evergreen"] {
  --field-paper: #143e33;
  --field-surface: #1d5142;
  --field-ink: #f3f0d8;
  --field-muted: #aac2b0;
  --field-line: #5e8a75;
  --field-faint: #326453;
  --field-accent: #e0be5d;
  --field-accent-dark: #efd47f;
  --field-accent-ink: #173529;
  --field-warning: #a5ddc2;
  color: var(--ink);
}

.app[data-field-palette="cobalt"] {
  --field-paper: #153e93;
  --field-surface: #1f53b6;
  --field-ink: #f5f4ed;
  --field-muted: #b7c7e8;
  --field-line: #6d8fd2;
  --field-faint: #3864b9;
  --field-accent: #f4c344;
  --field-accent-dark: #ffd56a;
  --field-accent-ink: #102c71;
  --field-warning: #ffae8e;
  color: var(--ink);
}

.app[data-field-palette="mono"] {
  --field-paper: #202020;
  --field-surface: #2e2e2e;
  --field-ink: #f0efe8;
  --field-muted: #aaa9a3;
  --field-line: #62615d;
  --field-faint: #3d3c39;
  --field-accent: #d3d0c3;
  --field-accent-dark: #f0eee5;
  --field-accent-ink: #171717;
  --field-warning: #f2f0e8;
  color: var(--ink);
}

.app[data-field-palette="translated"] {
  --field-paper: #ecefe9;
  --field-surface: #f7f5ef;
  --field-ink: #213f84;
  --field-muted: #5f6a78;
  --field-line: #9ca8b7;
  --field-faint: #cfd5dc;
  --field-accent: #78412d;
  --field-accent-dark: #593122;
  --field-accent-ink: #fff;
  --field-warning: #78412d;
}

.app[data-field-palette="fractured"] {
  --field-paper: #f0eee8;
  --field-surface: #f8f5ee;
  --field-ink: #153d76;
  --field-muted: #5f6470;
  --field-line: #9da2ac;
  --field-faint: #d0d2d6;
  --field-accent: #713a2c;
  --field-accent-dark: #52291f;
  --field-accent-ink: #fff;
  --field-warning: #713a2c;
}

.app[data-field-palette="codex"] {
  --field-paper: #f7f7f5;
  --field-surface: #ffffff;
  --field-ink: #0d0d0d;
  --field-muted: #686866;
  --field-line: #c7c7c3;
  --field-faint: #e6e6e2;
  --field-accent: #0d0d0d;
  --field-accent-dark: #333331;
  --field-accent-ink: #ffffff;
  --field-warning: #6f5a43;
  color: var(--field-ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app[data-field-palette="codex"] .workplace {
  max-width: 980px;
  padding: clamp(28px, 4vw, 52px);
  background: #fff;
  border-color: #dededa;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 16px 50px rgba(13, 13, 13, 0.055);
}

.app[data-field-palette="codex"] .inline-decision,
.app[data-field-palette="codex"] .primary-action,
.app[data-field-palette="codex"] .revision-decision {
  border-radius: 8px;
}

.app[data-field-palette="codex"] .attention-button,
.app[data-field-palette="codex"] .response-button,
.app[data-field-palette="codex"] .test-button,
.app[data-field-palette="codex"] .revision-button {
  font-size: 13px;
}

.app[data-field-palette="blackout"] .workplace,
.app[data-field-palette="whiteout"] .workplace {
  --test-paper: var(--field-paper);
  --test-ink: var(--field-paper);
  --test-issue-paper: var(--field-paper);
  --test-issue-ink: var(--field-paper);
  --authority-paper: var(--field-paper);
  --authority-panel: var(--field-paper);
  --authority-ink: var(--field-paper);
  --authority-muted: var(--field-paper);
  --authority-line: var(--field-paper);
  --authority-faint: var(--field-paper);
  --authority-accent: var(--field-paper);
  --authority-accent-dark: var(--field-paper);
  --authority-accent-ink: var(--field-paper);
  --authority-warning: var(--field-paper);
  color: var(--field-paper);
  background: var(--field-paper);
  border-color: var(--field-paper);
  box-shadow: none;
}

.app[data-field-palette="blackout"] {
  --field-paper: #050505;
  --field-surface: #050505;
  --field-ink: #050505;
  --field-muted: #050505;
  --field-line: #050505;
  --field-faint: #050505;
  --field-accent: #050505;
  --field-accent-dark: #050505;
  --field-accent-ink: #050505;
  --field-warning: #050505;
  color: #050505;
}

.app[data-field-palette="whiteout"] {
  --field-paper: #fafaf8;
  --field-surface: #fafaf8;
  --field-ink: #fafaf8;
  --field-muted: #fafaf8;
  --field-line: #fafaf8;
  --field-faint: #fafaf8;
  --field-accent: #fafaf8;
  --field-accent-dark: #fafaf8;
  --field-accent-ink: #fafaf8;
  --field-warning: #fafaf8;
  color: #fafaf8;
}

.app[data-field-palette="blackout"]:not(.is-refused),
.app[data-field-palette="whiteout"]:not(.is-refused) {
  --test-paper: var(--field-paper);
  --test-ink: var(--field-paper);
  --test-issue-paper: var(--field-paper);
  --test-issue-ink: var(--field-paper);
  --authority-paper: var(--field-paper);
  --authority-panel: var(--field-paper);
  --authority-ink: var(--field-paper);
  --authority-muted: var(--field-paper);
  --authority-line: var(--field-paper);
  --authority-faint: var(--field-paper);
  --authority-accent: var(--field-paper);
  --authority-accent-dark: var(--field-paper);
  --authority-accent-ink: var(--field-paper);
  --authority-warning: var(--field-paper);
}

.app[data-field-palette="blackout"]:not(.is-refused) *,
.app[data-field-palette="blackout"]:not(.is-refused) *::before,
.app[data-field-palette="blackout"]:not(.is-refused) *::after,
.app[data-field-palette="whiteout"]:not(.is-refused) *,
.app[data-field-palette="whiteout"]:not(.is-refused) *::before,
.app[data-field-palette="whiteout"]:not(.is-refused) *::after,
.app.is-refused[data-field-palette="blackout"] .workplace *,
.app.is-refused[data-field-palette="blackout"] .workplace *::before,
.app.is-refused[data-field-palette="blackout"] .workplace *::after,
.app.is-refused[data-field-palette="whiteout"] .workplace *,
.app.is-refused[data-field-palette="whiteout"] .workplace *::before,
.app.is-refused[data-field-palette="whiteout"] .workplace *::after,
.app[data-lineage-palette="blackout"] *,
.app[data-lineage-palette="blackout"] *::before,
.app[data-lineage-palette="blackout"] *::after,
.app[data-lineage-palette="whiteout"] *,
.app[data-lineage-palette="whiteout"] *::before,
.app[data-lineage-palette="whiteout"] *::after {
  color: var(--field-paper) !important;
  background-color: var(--field-paper) !important;
  background-image: none !important;
  border-color: var(--field-paper) !important;
  outline-color: var(--field-paper) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.app[data-lineage-palette="blackout"] *,
.app[data-lineage-palette="blackout"] *::before,
.app[data-lineage-palette="blackout"] *::after {
  color: #050505 !important;
  background-color: #050505 !important;
  border-color: #050505 !important;
  outline-color: #050505 !important;
}

.app[data-lineage-palette="whiteout"] *,
.app[data-lineage-palette="whiteout"] *::before,
.app[data-lineage-palette="whiteout"] *::after {
  color: #fafaf8 !important;
  background-color: #fafaf8 !important;
  border-color: #fafaf8 !important;
  outline-color: #fafaf8 !important;
}

.app[data-field-palette="blackout"]:not(.is-refused) ::selection,
.app[data-lineage-palette="blackout"] ::selection {
  color: #f5f5f2 !important;
  background: #315dcc !important;
}

.app[data-field-palette="whiteout"]:not(.is-refused) ::selection,
.app[data-lineage-palette="whiteout"] ::selection {
  color: #10110f !important;
  background: #9ab6ff !important;
}

.app[data-field-palette="blackout"] button,
.app[data-field-palette="whiteout"] button {
  user-select: text;
}

.app[data-field-phase="refined"] .title-status {
  color: var(--accent);
}

.app[data-field-phase="refined"] .working-surface {
  border-top-color: var(--accent);
}

.app[data-field-phase="rebased"] .workplace {
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, var(--surface) 74%, var(--accent)),
    0 28px 90px color-mix(in srgb, var(--paper) 74%, transparent);
}

.app[data-field-phase="rebased"] .orientation-label {
  color: var(--accent);
}

.app[data-lineage-typography="mono"] {
  --authority-font: ui-monospace, SFMono-Regular, Menlo, monospace;
  --authority-record-font: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app[data-lineage-typography="mono"] .work-title {
  letter-spacing: -0.06em;
}

.app[data-lineage-typography="editorial"] .work-title,
.app[data-lineage-typography="editorial"] .attention h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.app[data-lineage-typography="editorial"] {
  --authority-font: Georgia, "Times New Roman", serif;
  --authority-record-font: Georgia, "Times New Roman", serif;
}

.app[data-lineage-typography="fractured"] {
  --authority-font: Georgia, "Times New Roman", serif;
}

.app[data-lineage-typography="emphatic"] {
  --authority-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app[data-lineage-typography="mixed"] #title-accountables {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app[data-lineage-typography="mixed"] #title-received {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.app[data-lineage-typography="fractured"] #title-accountables {
  font-family: Georgia, "Times New Roman", serif;
}

.app[data-lineage-typography="fractured"] #title-received {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.04em;
}

.app[data-lineage-typography="emphatic"] .work-title {
  font-weight: 720;
  letter-spacing: -0.085em;
}

.app[data-lineage-title="compact"] .title-block {
  min-height: 76px;
  justify-content: flex-start;
  padding: 4px 0 17px;
  border-bottom: 1px solid currentColor;
}

.app[data-lineage-title="compact"] .work-title,
.app.has-attention[data-lineage-title="compact"] .work-title {
  display: flex;
  gap: 0.55em;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app[data-lineage-title="compact"] .title-status {
  margin-top: 11px;
  font-size: 8px;
}

.app[data-lineage-title="field"] .title-block {
  min-height: clamp(150px, 24vh, 250px);
  justify-content: flex-end;
}

.app[data-lineage-title="field"] .work-title,
.app.has-attention[data-lineage-title="field"] .work-title {
  display: grid;
  grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.84;
  letter-spacing: -0.07em;
}

.app[data-lineage-title="field"] #title-accountables {
  padding-bottom: 0.38em;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0.14em;
}

.app[data-lineage-title="field"] #title-separator {
  display: none;
}

.app[data-lineage-title="split"] .title-block {
  min-height: clamp(210px, 38vh, 390px);
}

.app[data-lineage-title="split"] .work-title,
.app.has-attention[data-lineage-title="split"] .work-title {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  font-size: clamp(50px, 9vw, 126px);
}

.app[data-lineage-title="split"] #title-separator {
  display: none;
}

.app[data-lineage-title="split"] #title-received {
  align-self: flex-end;
}

.app[data-lineage-controls="underlined"] .attention-button,
.app[data-lineage-controls="underlined"] .inline-decision {
  padding-right: 2px;
  padding-left: 2px;
  border-width: 0 0 1px;
  border-radius: 0;
}

.app[data-lineage-controls="outlined"] .attention-button,
.app[data-lineage-controls="outlined"] .inline-decision,
.app[data-lineage-controls="outlined"] .response-button,
.app[data-lineage-controls="outlined"] .test-button,
.app[data-lineage-controls="outlined"] .revision-button {
  padding: 7px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.app[data-lineage-controls="block"] .attention-options,
.app[data-lineage-controls="block"] .inline-decisions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.app[data-lineage-controls="block"] .attention-button,
.app[data-lineage-controls="block"] .inline-decision {
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, var(--line));
  border: 1px solid var(--line);
  border-radius: 0;
}

.app[data-lineage-controls="block"] .attention-button[aria-pressed="true"],
.app[data-lineage-controls="block"] .inline-decision[aria-pressed="true"] {
  color: var(--surface);
  background: var(--ink);
}

.app[data-lineage-controls="indexed"] .attention-options,
.app[data-lineage-controls="indexed"] .inline-decisions {
  counter-reset: inherited-control;
}

.app[data-lineage-controls="indexed"] .attention-button,
.app[data-lineage-controls="indexed"] .inline-decision {
  counter-increment: inherited-control;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border-radius: 1px;
}

.app[data-lineage-controls="indexed"] .attention-button::before,
.app[data-lineage-controls="indexed"] .inline-decision::before {
  margin-right: 0.7em;
  color: var(--muted);
  font-size: 8px;
  content: counter(inherited-control, decimal-leading-zero) "/";
}

.app[data-lineage-layout="centered"] .title-block,
.app[data-lineage-layout="centered"] .workplace,
.app[data-lineage-layout="centered"] .remote-entry {
  width: min(780px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.app[data-lineage-layout="full"] .title-block,
.app[data-lineage-layout="full"] .workplace,
.app[data-lineage-layout="full"] .remote-entry {
  width: 100%;
  max-width: none;
  margin-left: 0;
}

.app[data-lineage-layout="reserved"] .title-block {
  min-height: clamp(310px, 52vh, 540px);
}

.app[data-lineage-layout="reserved"] .workplace,
.app[data-lineage-layout="reserved"] .remote-entry {
  width: min(76%, 780px);
}

@media (min-width: 721px) {
  .app[data-lineage-layout="split"]:not(.is-refused) {
    display: grid;
    grid-template-columns: minmax(210px, 0.62fr) minmax(520px, 1.38fr);
    align-items: start;
    gap: clamp(26px, 4vw, 64px);
  }

  .app[data-lineage-layout="split"]:not(.is-refused) .title-block {
    position: sticky;
    top: 32px;
    grid-column: 1;
    min-height: 0;
    padding-top: 12px;
  }

  .app[data-lineage-layout="split"]:not(.is-refused) .work-title,
  .app.has-attention[data-lineage-layout="split"]:not(.is-refused) .work-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(38px, 5vw, 72px);
    overflow-wrap: anywhere;
  }

  .app[data-lineage-layout="split"]:not(.is-refused) #title-separator {
    display: none;
  }

  .app[data-lineage-layout="split"]:not(.is-refused) .workplace,
  .app[data-lineage-layout="split"]:not(.is-refused) .remote-entry {
    grid-column: 2;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

/* The deployed surface is resolved from inherited and committed conditions. */

.app[data-frame="distributed"] .workplace {
  max-width: 100%;
}

.app[data-frame="distributed"] .work-region:nth-of-type(even) {
  width: 84%;
  margin-left: auto;
}

.app[data-frame="fixed"] .working-surface {
  width: min(720px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.app[data-typography="mono"] .workplace,
.app[data-audience="agent"] .workplace {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border-radius: 1px;
}

.app[data-typography="editorial"] .surface-title,
.app[data-typography="editorial"] .region-example,
.app[data-audience="human"] .surface-title {
  font-family: Georgia, "Times New Roman", serif;
}

.app[data-typography="editorial"] .surface-title {
  font-weight: 400;
  letter-spacing: -0.055em;
}

.app[data-typography="mixed"] .work-region:nth-of-type(odd),
.app[data-audience="split"] .work-region:nth-of-type(odd) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app[data-typography="mixed"] .work-region:nth-of-type(even),
.app[data-audience="split"] .work-region:nth-of-type(even) {
  font-family: Georgia, "Times New Roman", serif;
}

.app[data-typography="disproportionate"] .region-name {
  font-size: clamp(18px, 3vw, 34px);
  letter-spacing: -0.045em;
  text-transform: none;
}

.app[data-typography="disproportionate"] .region-example {
  max-width: 18ch;
  font-size: 9px;
}

.app[data-typography="fractured"] .work-region:nth-of-type(3n + 1) {
  font-family: Georgia, "Times New Roman", serif;
}

.app[data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.035em;
}

.app[data-typography="fractured"] .work-region:nth-of-type(3n) .inline-decision {
  font-size: 18px;
}

.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region,
.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region:nth-of-type(3n + 1),
.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region:nth-of-type(3n + 1) {
  letter-spacing: -0.025em;
}

.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  letter-spacing: 0.075em;
}

.app[data-lineage-typography="mono"][data-typography="fractured"] .work-region:nth-of-type(3n) .inline-decision {
  font-size: 14px;
  text-transform: uppercase;
}

.app[data-lineage-typography="editorial"][data-typography="fractured"] .work-region,
.app[data-lineage-typography="editorial"][data-typography="fractured"] .work-region:nth-of-type(3n + 1),
.app[data-lineage-typography="editorial"][data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  font-family: Georgia, "Times New Roman", serif;
}

.app[data-lineage-typography="editorial"][data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  letter-spacing: -0.018em;
}

.app[data-lineage-typography="editorial"][data-typography="fractured"] .work-region:nth-of-type(3n) .inline-decision {
  font-size: 16px;
}

.app[data-lineage-typography="emphatic"][data-typography="fractured"] .work-region:nth-of-type(3n + 1),
.app[data-lineage-typography="emphatic"][data-typography="fractured"] .work-region:nth-of-type(3n + 2) {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app[data-lineage-typography="emphatic"][data-typography="fractured"] .work-region:nth-of-type(3n + 1) {
  font-weight: 720;
}

.app[data-palette="dark"] {
  color: var(--ink);
}

.app[data-palette="dark"] .workplace {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 90px color-mix(in srgb, var(--paper) 68%, transparent);
}

.app[data-palette="dark"] .workplace .primary-action {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.app[data-palette="monochrome"] .workplace {
  --accent: #171815;
  --accent-dark: #171815;
  filter: grayscale(1);
  border-radius: 0;
}

.app[data-palette="translated"] .workplace {
  background:
    linear-gradient(
      115deg,
      color-mix(in srgb, var(--accent) 7%, transparent) 0 52%,
      color-mix(in srgb, var(--warning) 7%, transparent) 52%
    ),
    var(--surface);
}

.app[data-palette="translated"] .work-region:nth-of-type(even) {
  --accent: var(--warning);
}

.app[data-palette="fractured"] .workplace {
  background: var(--surface);
}

.app[data-palette="fractured"] .work-region:nth-of-type(3n + 1) {
  --ink: color-mix(in srgb, var(--field-ink) 72%, var(--field-accent));
  --muted: color-mix(in srgb, var(--field-muted) 76%, var(--field-accent));
}

.app[data-palette="fractured"] .work-region:nth-of-type(3n + 2) {
  --ink: color-mix(in srgb, var(--field-ink) 72%, var(--field-warning));
  --muted: color-mix(in srgb, var(--field-muted) 76%, var(--field-warning));
}

.app[data-palette="fractured"] .work-region:nth-of-type(3n) {
  border-top-color: color-mix(in srgb, var(--field-line) 64%, var(--field-accent));
}

.app.has-stripe-fracture[data-field-palette="paper"] .workplace,
.app.has-stripe-fracture[data-field-palette="translated"] .workplace,
.app.has-stripe-fracture[data-field-palette="fractured"] .workplace {
  background:
    linear-gradient(90deg, #fbfaf6 0 33%, #eceff5 33% 68%, #f4ece5 68%),
    var(--surface);
}

.app.has-stripe-fracture:not([data-field-palette="paper"]):not([data-field-palette="translated"]):not([data-field-palette="fractured"]) .workplace {
  background:
    linear-gradient(
      90deg,
      var(--surface) 0 33%,
      color-mix(in srgb, var(--surface) 82%, var(--accent)) 33% 68%,
      color-mix(in srgb, var(--surface) 84%, var(--warning)) 68%
    );
}

.app[data-representation="symbolic"] .region-example {
  display: none;
}

.app[data-representation="symbolic"] .inline-decision {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border-radius: 2px;
  text-transform: uppercase;
}

.app[data-representation="exhaustive"] .work-region {
  grid-template-columns: minmax(120px, 0.55fr) minmax(330px, 1.6fr);
  padding: 12px 0;
}

.app[data-representation="exhaustive"] .inline-decisions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app[data-representation="exhaustive"] .inline-decision {
  border-radius: 3px;
}

.app[data-coherence="layered"] .work-region {
  border-top-style: double;
  border-top-width: 3px;
}

.app[data-coherence="layered"] .inline-decision {
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--line) 45%, transparent);
}

.app[data-coherence="fragmented"] .work-region:nth-of-type(3n + 1) {
  width: 87%;
}

.app[data-coherence="fragmented"] .work-region:nth-of-type(3n + 2) {
  width: 77%;
  margin-left: 18%;
  transform: translateX(9px);
}

.app[data-coherence="fragmented"] .work-region:nth-of-type(3n) {
  width: 94%;
  margin-left: -4%;
}

.app[data-density="accumulated"] .institutional-record {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 72%, var(--line));
}

.app[data-order="partitioned"] .working-surface {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.app[data-order="partitioned"] .surface-header,
.app[data-order="partitioned"] .revision-region,
.app[data-order="partitioned"] .code-field,
.app[data-order="partitioned"] .surface-footer,
.app[data-order="partitioned"] .institutional-record,
.app[data-order="partitioned"] .accountables-panel {
  grid-column: 1 / -1;
}

.app[data-order="partitioned"] .work-region {
  grid-template-columns: 1fr;
  align-content: start;
}

.app[data-order="partitioned"] .test-slot,
.app[data-order="partitioned"] .response-slot {
  grid-column: 1;
}

.app[data-guidance="distributed"] .guidance-region {
  width: 70%;
  margin-left: auto;
  order: 3;
}

.app[data-guidance="inherited"] .guidance-region::after {
  display: block;
  grid-column: 1 / -1;
  padding-top: 9px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px dotted var(--line);
  content: "Prior guidance remains part of the deployed build";
}

.app.is-refused {
  width: min(1280px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
}

.app.is-refused .title-block {
  order: 0;
}

.app.is-refused .offboarding {
  --ink: var(--authority-ink);
  --muted: var(--authority-muted);
  --line: var(--authority-line);
  --faint: var(--authority-faint);
  --surface: var(--authority-paper);
  --accent: var(--authority-accent);
  --accent-dark: var(--authority-accent-dark);
  --accent-ink: var(--authority-accent-ink);
  --warning: var(--authority-warning);
  position: relative;
  z-index: 2;
  order: 1;
  width: min(760px, 100%);
  margin-right: 8%;
  margin-bottom: -74px;
  scroll-margin-top: clamp(12px, 3vh, 32px);
  color: var(--ink);
  font-family: var(--authority-font);
  background: var(--surface);
  opacity: 1;
  filter: none;
}

.app.is-refused .workplace {
  position: relative;
  z-index: 1;
  order: 2;
  width: 92%;
  max-width: 1100px;
  max-height: 720px;
  margin-left: auto;
  padding-top: 116px;
  overflow: hidden;
  opacity: 0.64;
  pointer-events: none;
  user-select: none;
}

.app.is-refused .frozen-label {
  color: var(--warning);
}

.app.is-refused[data-lineage-layout="centered"] .offboarding {
  margin-right: auto;
  margin-left: auto;
}

.app.is-refused[data-lineage-layout="full"] .offboarding {
  width: min(920px, 100%);
  margin-right: 0;
  margin-left: 0;
}

.app.is-refused[data-lineage-layout="split"] .offboarding {
  width: min(820px, 100%);
  margin-right: 0;
  margin-left: auto;
}

.app.is-refused[data-lineage-typography="mixed"] .offboarding h2,
.app.is-refused[data-lineage-typography="fractured"] .offboarding h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.app.is-refused[data-lineage-typography="mixed"] .offboarding-status,
.app.is-refused[data-lineage-typography="fractured"] .outcome-record {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app.is-refused[data-lineage-typography="emphatic"] .offboarding h2 {
  font-weight: 720;
}

.app.is-refused[data-lineage-controls="underlined"] .offboarding .primary-action,
.app.is-refused[data-lineage-controls="underlined"] .offboarding .text-action {
  border-radius: 0;
}

.app.is-refused[data-lineage-controls="outlined"] .offboarding .primary-action {
  color: var(--authority-accent);
  background: transparent;
  border-color: currentColor;
  border-radius: 2px;
}

.app.is-refused[data-lineage-controls="outlined"] .offboarding .text-action,
.app.is-refused[data-lineage-controls="block"] .offboarding .primary-action,
.app.is-refused[data-lineage-controls="block"] .offboarding .text-action {
  border-radius: 0;
}

.app.is-refused[data-lineage-controls="indexed"] .offboarding .primary-action,
.app.is-refused[data-lineage-controls="indexed"] .offboarding .text-action {
  font-family: var(--authority-record-font);
  border-radius: 1px;
}

.app.is-contractor.is-refused .offboarding h2 {
  max-width: 18ch;
  font-family: var(--authority-record-font);
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.app.is-contractor.is-refused .personal-items {
  justify-content: flex-end;
  border-top: 0;
}

.app.has-authority-collision .response-slip,
.app.has-authority-collision .accountables-panel {
  color: color-mix(in srgb, var(--authority-panel) 94%, var(--authority-ink));
  background: var(--authority-panel);
  border-color: color-mix(in srgb, var(--authority-panel) 92%, var(--authority-line));
}

.app.has-authority-collision .response-slip::selection,
.app.has-authority-collision .accountables-panel ::selection {
  color: #fff;
  background: #2456ce;
}

@media (max-width: 720px) {
  body {
    background-size: 20px 20px;
  }

  .app {
    width: min(100% - 22px, 580px);
    padding-top: 24px;
  }

  .title-block {
    min-height: 40vh;
  }

  .work-title {
    font-size: clamp(54px, 20vw, 98px);
    line-height: 0.82;
  }

  .work-title span {
    display: block;
  }

  #title-separator {
    display: none;
  }

  .app[data-title-state="classified"] #title-accountables::after,
  .app[data-title-state="singular"] #title-accountables::after {
    content: ":";
  }

  .app[data-lineage-title="compact"] .work-title span {
    display: inline;
  }

  .app[data-lineage-title="field"] .work-title,
  .app.has-attention[data-lineage-title="field"] .work-title {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .app[data-lineage-title="field"] #title-accountables {
    padding-bottom: 0;
  }

  .remote-entry,
  .workplace,
  .offboarding {
    margin-left: 0;
    padding: 22px;
    border-radius: 13px;
  }

  .workplace-header {
    display: grid;
    gap: 5px;
  }

  .condition-label:not(:empty)::before,
  .service-label:not(:empty)::before,
  .frozen-label:not(:empty)::before {
    content: none;
  }

  .surface-header,
  .surface-footer {
    align-items: stretch;
    flex-direction: column;
  }

  #surface-response {
    align-items: start;
  }

  .surface-actions,
  .revision-header {
    align-items: stretch;
    flex-direction: column;
  }

  .surface-action {
    align-items: start;
  }

  .revision-branch {
    grid-template-columns: 1fr;
  }

  .work-region {
    grid-template-columns: 1fr;
  }

  .test-slot,
  .response-slot {
    grid-column: 1;
  }

  .app[data-order="partitioned"] .working-surface,
  .app[data-representation="exhaustive"] .work-region {
    grid-template-columns: 1fr;
  }

  .app[data-representation="exhaustive"] .inline-decisions {
    grid-template-columns: 1fr;
  }

  .app[data-lineage-controls="block"] .attention-options,
  .app[data-lineage-controls="block"] .inline-decisions {
    grid-template-columns: 1fr;
  }

  .app[data-lineage-layout="reserved"] .workplace,
  .app[data-lineage-layout="reserved"] .remote-entry {
    width: 100%;
  }

  .app.is-refused {
    width: min(100% - 22px, 580px);
  }

  .app.is-refused .offboarding {
    width: 100%;
    margin: 0;
  }

  .app.is-refused .workplace {
    width: 100%;
    max-height: 560px;
    margin-top: 22px;
    padding-top: 22px;
    opacity: 0.52;
  }

  .app.is-narrow .working-surface {
    width: 88%;
  }

  .primary-action {
    width: 100%;
  }

  .personal-items,
  .reapply-block {
    align-items: stretch;
    flex-direction: column;
  }

  .outcome-record {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .outcome-record dd + dt {
    margin-top: 10px;
  }
}

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