:root {
  color-scheme: light;
  --ink: #10151f;
  --muted: #45505a;
  --line: #10151f;
  --panel: #ffffff;
  --ground: #f4f2ea;
  --accent: #103f35;
  --accent-ink: #ffffff;
  --blue: #5ba4ff;
  --yellow: #ffcc33;
  --mint: #53dca2;
  --orange: #ff841f;
  --lavender: #d0a1ff;
  --warn-bg: #fff2bd;
  --warn-line: #664b00;
  --stop-bg: #ffe9e5;
  --stop-line: #8b2118;
  --focus: #7a3300;
  --shadow: 7px 7px 0 var(--ink);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--ground);
  background-image:
    linear-gradient(rgb(16 21 31 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(16 21 31 / 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  letter-spacing: -0.012em;
}

main,
header,
footer {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

body > header {
  position: relative;
  margin-top: 30px;
  padding: clamp(38px, 6vw, 78px);
  overflow: hidden;
  border: 2px solid var(--line);
  background: rgb(255 255 255 / 0.94);
  box-shadow: var(--shadow);
}

body > header::before {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(104px, 18vw, 230px);
  height: 16px;
  content: "";
  border-bottom: 2px solid var(--line);
  border-left: 2px solid var(--line);
  background: linear-gradient(90deg, var(--blue) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--mint) 66.66%);
}

body > header::after {
  position: absolute;
  right: clamp(24px, 5vw, 68px);
  bottom: clamp(20px, 4vw, 46px);
  z-index: 0;
  width: clamp(76px, 12vw, 140px);
  aspect-ratio: 1;
  content: "";
  border: 2px solid var(--line);
  background: var(--lavender);
  transform: rotate(8deg);
}

body > header > * {
  position: relative;
  z-index: 1;
}

main {
  padding-block: 28px 72px;
}

footer {
  margin-bottom: 30px;
  padding: 26px 30px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: #f7f4ec;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--yellow);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
pre {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 900px;
  margin: 10px 0 18px;
  font-size: clamp(2.8rem, 6.4vw, 6rem);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h3 {
  margin: 24px 0 7px;
  font-size: 1rem;
  line-height: 1.25;
}

p {
  max-width: 76ch;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.lede,
.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: #2d3a42;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
}

.pull {
  margin: 24px 0 0;
  padding: 18px 20px;
  border: 2px solid var(--line);
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 1.05rem;
  font-weight: 760;
}

a {
  color: #174d3f;
  font-weight: 700;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 3px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  min-height: 44px;
  padding: 9px 14px;
  border: 2px solid var(--line);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translateY(-160%);
}

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

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

ul,
ol {
  padding-left: 24px;
}

li {
  margin-block: 8px;
}

.card,
.verify-form {
  position: relative;
  margin: 24px 0;
  padding: clamp(22px, 3.5vw, 36px);
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card::before {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 54px;
  height: 8px;
  content: "";
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--blue);
}

.card:nth-of-type(4n + 2)::before {
  background: var(--yellow);
}

.card:nth-of-type(4n + 3)::before {
  background: var(--mint);
}

.card:nth-of-type(4n + 4)::before {
  background: var(--orange);
}

.card > :first-child,
.card > div > :first-child {
  margin-top: 0;
}

.card > :last-child,
.card > div > :last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.hint {
  margin: 4px 0 7px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

input,
textarea,
select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  margin-top: 7px;
  padding: 11px 13px;
  border: 2px solid #29323a;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-overflow: ellipsis;
}

textarea {
  min-height: 148px;
  resize: vertical;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

select {
  padding-right: 40px;
}

input[type="radio"],
input[type="checkbox"] {
  display: inline-block;
  width: 22px;
  min-height: 22px;
  margin: 0 10px 0 0;
  padding: 0;
  accent-color: var(--accent);
  vertical-align: -5px;
}

input:disabled,
textarea:disabled,
select:disabled {
  border-color: #9ba6a0;
  background: #e6ecea;
  color: #4a5a55;
  opacity: 1;
  -webkit-text-fill-color: #4a5a55;
}

button {
  min-height: 46px;
  margin: 16px 12px 0 0;
  padding: 11px 18px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 4px 4px 0 var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

button.secondary {
  background: var(--yellow);
  color: var(--ink);
}

button:disabled,
button.secondary:disabled {
  border-color: #9ba6a0;
  background: #e6ecea;
  color: #4a5a55;
  box-shadow: none;
  cursor: not-allowed;
}

output {
  display: block;
  max-width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 5px solid var(--blue);
  background: #edf5ff;
  font-weight: 680;
  overflow-wrap: anywhere;
}

pre {
  width: 100%;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 16px;
  overflow: hidden;
  border: 2px solid #29323a;
  background: #edf0ed;
  color: #1c2823;
  font: 0.8rem/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

code {
  padding: 0.1em 0.35em;
  background: #e8e4d9;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.notice,
.blocker {
  margin-block: 20px;
  padding: 16px 18px;
  border: 2px solid currentColor;
  box-shadow: 4px 4px 0 var(--ink);
}

.notice {
  background: var(--warn-bg);
  color: var(--warn-line);
}

.blocker {
  background: var(--stop-bg);
  color: var(--stop-line);
  font-weight: 720;
}

.note {
  color: var(--muted);
  font-size: 0.875rem;
}

.roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.roles li {
  min-width: 0;
  min-height: 190px;
  margin: 0;
  padding: 22px;
  border: 2px solid var(--line);
  background: var(--blue);
}

.roles li:nth-child(2) {
  background: var(--yellow);
}

.roles li:nth-child(3) {
  background: var(--mint);
}

.roles h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.roles a {
  color: var(--ink);
}

.ledger {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ledger li {
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 2px solid var(--line);
  background: #f8f7f1;
}

.ledger li:nth-child(2) {
  background: #eaf5ff;
}

.ledger li:nth-child(3) {
  background: #fff4ce;
}

.ledger li:nth-child(4) {
  background: #e7f8ef;
}

.ledger li:nth-child(5) {
  background: #f2eaff;
}

.ledger .name {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ledger .value {
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.93rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.state {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 4px 10px;
  border: 2px solid currentColor;
  background: #ffffff;
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.state[data-state="SIGNING"],
.state[data-state="SUBMITTED"] {
  background: #eaf5ff;
  color: #174f8d;
}

.state[data-state="CONFIRMED"] {
  background: #e4f8ed;
  color: #145b3d;
}

.state[data-state="REJECTED"],
.state[data-state="REVERTED"] {
  background: var(--stop-bg);
  color: var(--stop-line);
}

.state[data-state="UNKNOWN"] {
  background: var(--warn-bg);
  color: var(--warn-line);
}

.choice {
  display: block;
  margin-top: 12px;
  padding: 16px;
  border: 2px solid var(--line);
  background: #ffffff;
  font-weight: 500;
  cursor: pointer;
}

.choice:has(input:checked) {
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--ink);
}

.choice:has(input:disabled) {
  cursor: not-allowed;
}

.choice .head {
  font-weight: 800;
}

.choice dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 12px 0 0 32px;
  font-size: 0.84rem;
}

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

.choice dd {
  min-width: 0;
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-weight: 760;
}

[hidden] {
  display: none !important;
}

main > header {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 20px 26px;
  border: 2px solid var(--line);
  background: var(--ink);
  color: #f7f4ec;
}

main > header a {
  color: var(--yellow);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

main > header span {
  float: right;
  color: #d6d9df;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

section[id$="-page"] {
  padding: clamp(30px, 5vw, 58px) 0 26px;
}

.step {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: none;
  border: 2px solid var(--line);
  background: var(--yellow);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-weight: 850;
}

section[id$="-page"] > .card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
}

.check {
  padding: 15px;
  border: 2px solid var(--line);
  background: #fff4ce;
  font-weight: 600;
}

.verify-form {
  margin-top: 28px;
}

.verify-form button {
  width: 100%;
}

main > footer {
  display: flex;
  width: auto;
  max-width: none;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 0;
}

@media (hover: hover) {
  button:not(:disabled):hover {
    box-shadow: 1px 1px 0 var(--ink);
    transform: translate(3px, 3px);
  }

  .roles li:hover {
    box-shadow: 5px 5px 0 var(--ink);
    transform: translate(-2px, -2px);
  }
}

@media (max-width: 900px) {
  main,
  header,
  footer {
    width: min(100% - 32px, 760px);
  }

  body > header {
    margin-top: 18px;
    padding: 42px 34px;
  }

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

  .roles li:last-child {
    grid-column: 1 / -1;
    min-height: 150px;
  }

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

@media (max-width: 680px) {
  body {
    background-size: 36px 36px;
  }

  main,
  header,
  footer {
    width: min(100% - 24px, 560px);
  }

  body > header {
    padding: 38px 22px 28px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  body > header::after {
    display: none;
  }

  main {
    padding-block: 18px 48px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.75rem);
    line-height: 1;
  }

  .card,
  .verify-form {
    margin-block: 18px;
    padding: 21px 18px;
    box-shadow: 5px 5px 0 var(--ink);
  }

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

  .roles li,
  .roles li:last-child {
    grid-column: auto;
    min-height: 0;
  }

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

  .choice dl {
    grid-template-columns: 1fr;
    gap: 0;
    margin-left: 32px;
  }

  .choice dd {
    margin-bottom: 8px;
  }

  section[id$="-page"] > .card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  main > header {
    padding: 17px 18px;
  }

  main > header span {
    display: block;
    float: none;
    margin-top: 5px;
  }

  main > footer {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 440px) {
  main,
  header,
  footer {
    width: calc(100% - 20px);
  }

  body > header {
    margin-top: 10px;
    padding-inline: 18px;
  }

  button {
    width: 100%;
    margin-right: 0;
  }

  .ledger {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .ledger li {
    padding: 12px;
  }

  .ledger li:last-child {
    grid-column: 1 / -1;
  }

  footer {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.operator-workspace {
  background-color: #eef1ef;
  background-image: none;
}

.product-dashboard {
  background-color: #eef1ef;
  background-image: none;
}

.workspace-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: 248px minmax(0, 1fr);
}

.workspace-rail {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  gap: 34px;
  padding: 28px 20px 22px;
  background: var(--ink);
  color: #f7f4ec;
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f7f4ec;
  text-decoration: none;
}

.workspace-brand > span:last-child {
  display: grid;
  line-height: 1;
}

.workspace-brand strong {
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.workspace-brand small {
  margin-top: 5px;
  color: #aeb8c0;
  font: 0.58rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.2em;
}

.workspace-mark {
  display: flex;
  align-items: center;
}

.workspace-mark i {
  display: grid;
  width: 27px;
  height: 29px;
  margin-right: -4px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--lavender);
  color: var(--ink);
  font: 800 0.72rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  transform: rotate(-4deg);
}

.workspace-mark i:nth-child(2) {
  background: var(--mint);
  transform: rotate(3deg);
}

.workspace-mark i:nth-child(3) {
  background: var(--yellow);
  transform: rotate(-2deg);
}

.workspace-rail nav {
  display: grid;
  gap: 5px;
}

.workspace-rail nav a {
  min-height: 46px;
  padding: 11px 12px;
  border-left: 3px solid transparent;
  color: #aeb8c0;
  font: 700 0.75rem/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.workspace-rail nav a:hover {
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
}

.workspace-rail nav a[aria-current="page"] {
  border-left-color: var(--yellow);
  background: rgb(255 255 255 / 0.1);
  color: #ffffff;
}

.rail-boundary {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #3c4652;
}

.rail-boundary span {
  color: #8fa0aa;
  font: 0.64rem/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rail-boundary strong {
  display: block;
  margin-top: 6px;
  color: var(--yellow);
  font-size: 1rem;
}

.rail-boundary p {
  margin: 7px 0 0;
  color: #bdc5ca;
  font-size: 0.75rem;
  line-height: 1.5;
}

.workspace-stage {
  min-width: 0;
  background-color: #eef1ef;
  background-image:
    linear-gradient(rgb(16 21 31 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(16 21 31 / 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.workspace-header {
  display: grid;
  width: auto;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 34px;
  align-items: end;
  margin: 0;
  padding: 32px 40px;
  border-bottom: 2px solid var(--line);
  background: rgb(255 255 255 / 0.96);
}

.workspace-header h1 {
  max-width: 760px;
  margin: 9px 0 12px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.workspace-header .lede {
  max-width: 750px;
  font-size: 1rem;
  line-height: 1.55;
}

.deployment-tile {
  min-width: 0;
  border: 2px solid var(--line);
  background: #ffffff;
}

.deployment-tile > span {
  display: block;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  background: var(--mint);
  font: 800 0.68rem/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deployment-tile output {
  min-height: 76px;
  margin: 0;
  padding: 13px;
  border: 0;
  background: #ffffff;
  font: 700 0.75rem/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.deployment-tile > strong,
.deployment-tile > p {
  display: block;
  margin: 0;
  padding-inline: 13px;
}

.deployment-tile > strong {
  padding-top: 13px;
  font-size: 1.05rem;
}

.deployment-tile > p {
  padding-block: 5px 13px;
  color: var(--muted);
  font: 0.78rem/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.deployment-tile > a {
  display: block;
  min-height: 44px;
  padding: 10px 13px;
  border-top: 2px solid var(--line);
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.78rem;
  text-decoration: none;
}

.operator-dashboard {
  display: grid;
  width: 100%;
  max-width: 1440px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 30px 40px 56px;
}

.operator-dashboard .card {
  min-width: 0;
  margin: 0;
  box-shadow: 5px 5px 0 var(--ink);
}

.operator-access {
  grid-column: 1 / 8;
}

.operator-ledger {
  grid-column: 8 / -1;
}

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

.operator-ledger .ledger li:last-child {
  grid-column: 1 / -1;
}

.operator-permissions,
.operator-submit {
  grid-column: 1 / -1;
}

.operator-permissions fieldset > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.operator-review {
  grid-column: 1 / 7;
}

.operator-signature {
  grid-column: 7 / -1;
}

.operator-submit {
  background: #fffdf5;
}

.workspace-footer {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 24px 40px;
  border: 0;
  border-top: 2px solid var(--line);
}

.dashboard-overview {
  display: grid;
  width: 100%;
  max-width: 1440px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 30px 40px 56px;
}

.dashboard-overview .card {
  min-width: 0;
  margin: 0;
  box-shadow: 5px 5px 0 var(--ink);
}

.dashboard-metrics {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid var(--line);
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--ink);
}

.dashboard-metrics article {
  min-width: 0;
  padding: 18px;
  border-right: 2px solid var(--line);
}

.dashboard-metrics article:last-child {
  border-right: 0;
}

.dashboard-metrics article:nth-child(1) {
  background: #e7f8ef;
}

.dashboard-metrics article:nth-child(2) {
  background: #eaf5ff;
}

.dashboard-metrics article:nth-child(3) {
  background: #fff4ce;
}

.dashboard-metrics article:nth-child(4) {
  background: #f2eaff;
}

.dashboard-metrics span,
.dashboard-metrics small,
.panel-kicker {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.dashboard-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.4rem, 2.8vw, 2.15rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.dashboard-metrics small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.45;
}

.active-reservation {
  grid-column: 1 / 9;
}

.role-launcher {
  grid-column: 9 / -1;
}

.evidence-panel {
  grid-column: 1 / 7;
  grid-row: 3;
}

.dashboard-docs {
  grid-column: 7 / -1;
  grid-row: 3;
}

.guard-panel {
  grid-column: 1 / -1;
  grid-row: 4;
}

.panel-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 850;
}

.panel-kicker:has(span) {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.panel-kicker span:last-child {
  color: #7a4c00;
}

.compact-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 18px;
  margin: 22px 0;
}

.compact-facts dt {
  color: var(--muted);
  font: 750 0.72rem/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
}

.compact-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.technical-details {
  margin: 20px 0;
  border: 2px solid var(--line);
  background: #f8f7f1;
}

.technical-details summary {
  min-height: 44px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 800;
}

.technical-details[open] summary {
  border-bottom: 2px solid var(--line);
}

.technical-details .compact-facts {
  margin: 0;
  padding: 14px;
}

.dashboard-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 11px 15px;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.dashboard-action.primary {
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}

.role-launcher nav {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.role-launcher nav a {
  display: grid;
  min-height: 72px;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #f8f7f1;
  color: var(--ink);
  text-decoration: none;
}

.role-launcher nav a > span {
  grid-row: 1 / 3;
  font: 800 0.7rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.role-launcher nav a > strong {
  line-height: 1.2;
}

.role-launcher nav a > small {
  color: var(--muted);
  font-size: 0.72rem;
}

.role-launcher nav a:nth-child(1) {
  background: #e7f8ef;
}

.role-launcher nav a:nth-child(2) {
  background: #eaf5ff;
}

.role-launcher nav a:nth-child(3) {
  background: #fff4ce;
}

.role-launcher nav a:nth-child(4) {
  background: #f2eaff;
}

.evidence-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.evidence-list p {
  margin: 0;
}

.evidence-dot {
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border: 2px solid var(--line);
}

.evidence-dot.verified {
  background: var(--mint);
}

.evidence-dot.pending {
  background: var(--orange);
}

.document-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.document-links a {
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.guard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.guard-grid p {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 2px solid var(--line);
  background: #f8f7f1;
}

.guard-grid strong,
.guard-grid span {
  display: block;
}

.guard-grid strong {
  color: var(--accent);
  font: 850 0.75rem/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.guard-grid span {
  margin-top: 7px;
  font-size: 0.76rem;
  line-height: 1.45;
}

@media (max-width: 1080px) {
  .workspace-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

  .operator-access,
  .operator-ledger,
  .operator-permissions,
  .operator-submit {
    grid-column: 1 / -1;
  }

  .operator-ledger .ledger {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .operator-ledger .ledger li:last-child {
    grid-column: auto;
  }

  .active-reservation,
  .role-launcher,
  .evidence-panel,
  .dashboard-docs,
  .guard-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }

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

@media (max-width: 800px) {
  .workspace-shell {
    display: block;
  }

  .workspace-rail {
    position: static;
    height: auto;
    gap: 16px;
    padding: 16px;
  }

  .workspace-rail nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workspace-rail nav a {
    display: grid;
    place-items: center;
    padding-inline: 8px;
    border-bottom: 3px solid transparent;
    border-left: 0;
    text-align: center;
  }

  .workspace-rail nav a[aria-current="page"] {
    border-bottom-color: var(--yellow);
  }

  .rail-boundary {
    display: none;
  }

  .workspace-header,
  .operator-dashboard,
  .dashboard-overview,
  .workspace-footer {
    width: 100%;
  }

  .workspace-header {
    padding: 28px 24px;
  }

  .operator-dashboard {
    grid-template-columns: 1fr;
    padding: 24px 24px 48px;
  }

  .dashboard-overview {
    grid-template-columns: 1fr;
    padding: 24px 24px 48px;
  }

  .dashboard-metrics,
  .active-reservation,
  .role-launcher,
  .evidence-panel,
  .dashboard-docs,
  .guard-panel {
    grid-column: 1;
  }

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

  .dashboard-metrics article:nth-child(2) {
    border-right: 0;
  }

  .dashboard-metrics article:nth-child(-n + 2) {
    border-bottom: 2px solid var(--line);
  }

  .operator-access,
  .operator-ledger,
  .operator-permissions,
  .operator-review,
  .operator-signature,
  .operator-submit {
    grid-column: 1;
  }

  .operator-permissions fieldset > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .workspace-rail nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-header {
    padding: 25px 16px;
  }

  .workspace-header h1 {
    font-size: clamp(2.25rem, 13vw, 3.25rem);
  }

  .operator-dashboard {
    gap: 16px;
    padding: 18px 12px 40px;
  }

  .dashboard-overview {
    gap: 16px;
    padding: 18px 12px 40px;
  }

  .dashboard-overview .card {
    padding: 21px 17px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics article,
  .dashboard-metrics article:nth-child(2) {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .dashboard-metrics article:last-child {
    border-bottom: 0;
  }

  .compact-facts,
  .document-links {
    grid-template-columns: 1fr;
  }

  .compact-facts dd {
    margin-bottom: 8px;
  }

  .dashboard-action {
    width: 100%;
  }

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

  .operator-dashboard .card {
    padding: 21px 17px;
  }

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

  .operator-ledger .ledger li:last-child {
    grid-column: 1 / -1;
  }

  .workspace-footer {
    padding: 22px 16px;
  }
}
