:root {
  color-scheme: light;
  --paper: oklch(95.1% 0.018 83);
  --paper-deep: oklch(91.8% 0.025 82);
  --ink: oklch(22% 0.045 161);
  --forest: oklch(31% 0.072 162);
  --forest-soft: oklch(43% 0.067 159);
  --rule: oklch(78% 0.027 83);
  --muted: oklch(48% 0.025 151);
  --signal: oklch(64% 0.184 43);
  --signal-soft: oklch(89% 0.055 53);
  --good: oklch(49% 0.12 152);
  --warn: oklch(68% 0.14 78);
  --danger: oklch(52% 0.18 28);
  --display: "Bodoni 72", "Songti SC", "STSong", serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}

.auth-pending .app-shell {
  visibility: hidden;
}
.auth-required {
  overflow: hidden;
}
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: clamp(24px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(340px, 1fr);
  gap: clamp(48px, 10vw, 160px);
  align-items: center;
  background: var(--paper);
}
.login-screen[hidden] {
  display: none;
}
.login-wordmark {
  align-self: start;
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--display);
  font-size: 25px;
}
.login-wordmark .brand-mark {
  border: 1px solid var(--ink);
}
.login-wordmark .brand-mark::before,
.login-wordmark .brand-mark::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 1px;
  background: var(--signal);
}
.login-wordmark .brand-mark::before {
  transform: rotate(42deg);
}
.login-wordmark .brand-mark::after {
  transform: rotate(-42deg);
}
.login-panel {
  width: min(100%, 560px);
  padding: clamp(32px, 6vw, 74px) 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.login-kicker {
  margin: 0 0 28px;
  color: var(--forest-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.login-panel h1 {
  font-size: clamp(32px, 4vw, 44px);
}
.login-summary {
  max-width: 500px;
  margin: 28px 0 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.login-form {
  display: grid;
  gap: 18px;
}
.login-form label {
  display: grid;
  gap: 8px;
  font-size: 12px;
}
.login-form input {
  width: 100%;
}
.login-help {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.login-error {
  margin: 0;
  padding: 11px 13px;
  color: var(--danger);
  border-left: 2px solid var(--danger);
  background: color-mix(in oklch, var(--danger) 7%, transparent);
  font-size: 12px;
  line-height: 1.5;
}
.login-footnote {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.logout-action {
  font-size: 11px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  border-right: 1px solid color-mix(in oklch, var(--paper) 16%, transparent);
}
.brand {
  min-height: 116px;
  padding: 31px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--paper) 16%, transparent);
}
.brand-name {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.04em;
}
.brand-mark {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  position: relative;
  transform: rotate(-13deg);
}
.brand-mark i {
  position: absolute;
  width: 23px;
  height: 1px;
  background: var(--signal);
  transform-origin: center;
}
.brand-mark i:nth-child(2) {
  transform: rotate(60deg);
}
.brand-mark i:nth-child(3) {
  transform: rotate(-60deg);
}

.primary-nav {
  padding: 28px 0;
  display: grid;
}
.nav-item {
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  align-items: center;
  background: transparent;
  color: color-mix(in oklch, var(--paper) 63%, transparent);
  border: 0;
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}
.nav-item:hover {
  color: var(--paper);
  background: color-mix(in oklch, var(--paper) 6%, transparent);
}
.nav-item.is-active {
  color: var(--paper);
  border-left-color: var(--signal);
  background: color-mix(in oklch, var(--paper) 9%, transparent);
}
.nav-index {
  color: color-mix(in oklch, var(--paper) 39%, transparent);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.rail-foot {
  margin-top: auto;
  padding: 24px 23px 30px;
  border-top: 1px solid color-mix(in oklch, var(--paper) 16%, transparent);
}
.rail-foot p,
.pulse-line {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.16em;
}
.rail-foot p {
  color: color-mix(in oklch, var(--paper) 45%, transparent);
  margin: 8px 0 0 16px;
}
.pulse-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse-line span,
.scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--signal) 18%, transparent);
}

.workspace {
  min-width: 0;
}
.topbar {
  min-height: 76px;
  padding: 0 clamp(24px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.scope-label,
.sync-state {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.scope-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scope-dot {
  background: var(--good);
  box-shadow: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}
.sync-state {
  color: var(--muted);
}
.sync-state::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--good);
  vertical-align: 1px;
}
.supplier-switch {
  padding: 0;
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  text-align: left;
}
.supplier-switch b,
.supplier-switch small {
  display: block;
}
.supplier-switch b {
  font-size: 12px;
}
.supplier-switch small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}
.supplier-monogram {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--forest);
  font-family: var(--display);
  border-radius: 50%;
}

.view {
  display: none;
  padding: clamp(44px, 6vw, 86px) clamp(24px, 5vw, 82px) 72px;
  animation: reveal 480ms var(--ease) both;
}
.view.is-visible {
  display: block;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-heading,
.subpage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.65fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: end;
}
.page-heading {
  padding-bottom: clamp(46px, 6vw, 84px);
}
.subpage-heading {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ink);
}
.kicker,
.section-number {
  margin: 0 0 15px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.17em;
  color: var(--forest-soft);
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(47px, 6.1vw, 92px);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.055em;
}
h1 em {
  color: var(--signal);
  font-weight: inherit;
}
.heading-aside {
  padding-bottom: 5px;
}
.heading-aside p {
  margin: 0 0 28px;
  max-width: 430px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.primary-action {
  min-height: 48px;
  padding: 0 5px 0 19px;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--signal);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background 160ms ease;
}
.primary-action:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--signal);
}
.primary-action:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--signal);
}
.primary-action b {
  min-width: 38px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-left: 1px solid color-mix(in oklch, var(--paper) 25%, transparent);
  font-size: 18px;
  font-weight: 400;
}
.primary-action.wide {
  width: 100%;
}

.ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.ledger-stats > div {
  min-height: 132px;
  padding: 25px 24px 20px 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
}
.ledger-stats > div:not(:first-child) {
  padding-left: 24px;
}
.ledger-stats > div:last-child {
  border-right: 0;
}
.ledger-stats span,
.ledger-stats small {
  font-size: 10px;
  color: var(--muted);
}
.ledger-stats strong {
  margin: auto 0 3px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.04em;
}
.ledger-stats .settlement-stat strong {
  color: var(--signal);
}

.section-block {
  padding-top: clamp(48px, 6vw, 78px);
}
.section-head {
  margin-bottom: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-head .section-number {
  margin-bottom: 5px;
}
.section-head h2,
.explain-form h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.035em;
}
.table-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.search-box {
  min-width: 230px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.search-box input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.search-box:focus-within {
  border-color: var(--signal);
}
.text-action {
  padding: 8px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  font-size: 11px;
}
.table-wrap {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--ink);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
th {
  padding: 14px 14px 13px 0;
  text-align: left;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
}
td {
  padding: 19px 14px 19px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
tbody tr {
  transition: background 150ms ease;
}
tbody tr:hover {
  background: color-mix(in oklch, var(--paper-deep) 64%, transparent);
}
.resource-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.resource-glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--forest);
  border: 1px solid var(--forest);
  font-family: var(--display);
  font-size: 15px;
  transform: rotate(-3deg);
}
.resource-name b,
.resource-name small {
  display: block;
}
.resource-name b {
  font-size: 12px;
}
.resource-name small,
.model-stack small,
.muted-cell {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.model-stack b,
.model-stack small {
  display: block;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.status-active,
.status-healthy,
.status-clean,
.status-reference {
  color: var(--good);
}
.status-testing,
.status-probing,
.status-pending {
  color: oklch(55% 0.13 70);
}
.status-paused,
.status-suspect,
.status-disabled {
  color: var(--muted);
}
.status-degraded {
  color: var(--warn);
}
.row-action {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
}
.empty-state {
  padding: 70px 20px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.empty-state span {
  font-family: var(--display);
  font-size: 38px;
  color: var(--signal);
}
.empty-state h3 {
  margin: 10px 0 5px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
}
.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.proof-strip {
  margin-top: 72px;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 70px 1.2fr 2fr;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.proof-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--signal);
  color: var(--signal);
  font-size: 26px;
  transform: rotate(3deg);
}
.proof-strip .section-number {
  margin-bottom: 5px;
}
.proof-strip h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 25px;
}
.proof-strip ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
}
.proof-strip li {
  min-height: 62px;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--rule);
}
.proof-strip li b {
  color: var(--signal);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 400;
}
.proof-strip li span {
  margin-top: 5px;
  font-size: 10px;
}

.egress-layout {
  padding-top: 38px;
  display: grid;
  grid-template-columns: minmax(480px, 1.4fr) minmax(300px, 0.7fr);
  gap: 42px;
}
.map-board {
  min-height: 510px;
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
}
.map-grid {
  position: absolute;
  inset: 0;
  background: none;
}
.map-origin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 92px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  z-index: 2;
}
.map-origin b {
  font-size: 10px;
  letter-spacing: 0.14em;
}
.map-origin small {
  margin-top: 6px;
  color: color-mix(in oklch, var(--paper) 60%, transparent);
  font-size: 9px;
}
.map-origin .pulse {
  width: 7px;
  height: 7px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--signal);
  animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    box-shadow: 0 0 0 9px color-mix(in oklch, var(--signal) 0%, transparent);
  }
  0%,
  100% {
    box-shadow: 0 0 0 2px color-mix(in oklch, var(--signal) 50%, transparent);
  }
}
.route-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.route-lines path {
  fill: none;
  stroke: var(--forest-soft);
  stroke-width: 1;
  stroke-dasharray: 5 7;
  vector-effect: non-scaling-stroke;
}
.map-node {
  position: absolute;
  z-index: 2;
  width: 150px;
  padding: 15px;
  background: var(--paper);
  border-top: 2px solid var(--forest);
  box-shadow: 5px 5px 0 color-mix(in oklch, var(--forest) 13%, transparent);
}
.map-node span {
  float: right;
  color: var(--signal);
  font-family: var(--display);
  font-size: 20px;
}
.map-node b,
.map-node small {
  display: block;
}
.map-node b {
  font-size: 11px;
}
.map-node small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}
.node-a {
  top: 54px;
  left: 38px;
}
.node-b {
  top: 72px;
  right: 35px;
}
.node-c {
  right: 70px;
  bottom: 46px;
}
.map-node.is-ghost {
  opacity: 0.62;
  border-top-style: dashed;
  box-shadow: none;
}
.egress-list {
  display: grid;
  align-content: start;
}
.egress-card {
  padding: 23px 0;
  border-top: 1px solid var(--ink);
}
.egress-card:last-child {
  border-bottom: 1px solid var(--ink);
}
.egress-card-head,
.egress-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}
.egress-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
}
.egress-card p {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 10px;
}
.egress-actions {
  margin-top: 12px;
}
.resource-detail .detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.resource-detail .detail-grid div {
  min-width: 0;
}
.resource-detail dt {
  color: var(--muted);
  font-size: 11px;
}
.resource-detail dd {
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.resource-detail dd small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.resource-detail .form-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.egress-meta {
  font-size: 10px;
}
.capacity-bar,
.score-track {
  width: 100%;
  padding: 0;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
}
.capacity-bar {
  height: 3px;
  margin-top: 14px;
  background: var(--rule);
}
.capacity-bar::-webkit-progress-bar,
.score-track::-webkit-progress-bar {
  background: var(--rule);
}
.capacity-bar::-webkit-progress-value,
.score-track::-webkit-progress-value {
  background: var(--signal);
}
.capacity-bar::-moz-progress-bar,
.score-track::-moz-progress-bar {
  background: var(--signal);
}
.platform-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.platform-tags span {
  padding: 3px 6px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}
.probe-evidence {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.probe-evidence b,
.probe-evidence small {
  display: block;
  font-size: 10px;
}
.probe-evidence small {
  margin-top: 4px;
  color: var(--muted);
}
.probe-results,
.egress-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.probe-result {
  font-size: 10px;
  color: var(--muted);
}
.probe-result.is-ok {
  color: var(--good);
}
.probe-result.is-failed {
  color: var(--warn);
}
.egress-actions {
  margin-top: 4px;
}
.row-action.is-danger {
  color: var(--warn);
  border-color: color-mix(in oklch, var(--warn) 40%, var(--rule));
}
.resource-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.egress-empty {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.egress-empty h3 {
  margin: 0 0 8px;
  font: 600 17px var(--body);
}
.egress-empty p {
  max-width: 520px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.scheduler-grid {
  padding: 42px 0 52px;
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(480px, 1.45fr);
  gap: clamp(42px, 6vw, 92px);
  border-bottom: 1px solid var(--ink);
}
.explain-form {
  padding-right: 5px;
  display: grid;
  gap: 20px;
  align-content: start;
}
.explain-form h2 {
  margin-bottom: 8px;
}
.drawer-form label,
.explain-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}
input,
select {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  color: var(--ink);
  background: color-mix(in oklch, var(--paper-deep) 65%, var(--paper));
  border: 1px solid var(--rule);
  border-radius: 0;
  outline: 0;
}
input:focus,
select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--forest) 12%, transparent);
}
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.decision-board {
  min-height: 440px;
  padding: clamp(24px, 3vw, 38px);
  background: var(--ink);
  color: var(--paper);
}
.decision-empty {
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
}
.decision-empty span {
  color: var(--signal);
  font-family: var(--display);
  font-size: 50px;
}
.decision-empty h3 {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
}
.decision-empty p {
  max-width: 300px;
  margin: 0;
  color: color-mix(in oklch, var(--paper) 58%, transparent);
  font-size: 11px;
  line-height: 1.6;
}
.decision-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid color-mix(in oklch, var(--paper) 18%, transparent);
}
.decision-head p {
  margin: 0 0 6px;
  color: color-mix(in oklch, var(--paper) 52%, transparent);
  font-size: 9px;
  letter-spacing: 0.13em;
}
.decision-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
}
.decision-score {
  color: var(--signal);
  font-family: var(--display);
  font-size: 42px;
}
.candidate-list {
  margin-top: 24px;
  display: grid;
  gap: 15px;
}
.candidate-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 15px;
  align-items: center;
}
.candidate-row b,
.candidate-row small {
  display: block;
}
.candidate-row b {
  font-size: 11px;
}
.candidate-row small {
  margin-top: 4px;
  color: color-mix(in oklch, var(--paper) 52%, transparent);
  font-size: 9px;
}
.candidate-row strong {
  text-align: right;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
}
.score-track {
  grid-column: 1 / -1;
  height: 2px;
  background: color-mix(in oklch, var(--paper) 18%, transparent);
}
.score-track::-webkit-progress-bar {
  background: color-mix(in oklch, var(--paper) 18%, transparent);
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
.candidate-row.is-filtered {
  opacity: 0.5;
}
.candidate-row.is-filtered .score-track i {
  background: var(--paper);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(620px, calc(100vw - 24px));
  height: 100vh;
  padding: 34px clamp(24px, 4vw, 54px) 44px;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  transform: translateX(105%);
  transition: transform 400ms var(--ease);
}
.drawer.is-open {
  transform: translateX(0);
}
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--ink) 52%, transparent);
  opacity: 0;
  transition: opacity 260ms ease;
}
.drawer-scrim.is-visible {
  opacity: 1;
}
.drawer-head {
  padding-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--ink);
}
.drawer-head .section-number {
  margin-bottom: 5px;
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
}
.icon-button {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 22px;
  font-weight: 300;
}
.drawer-form {
  padding-top: 28px;
  display: grid;
  gap: 20px;
}
.drawer-form label > small {
  line-height: 1.5;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.model-picker {
  display: grid;
  gap: 10px;
}
.model-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.model-search input {
  min-height: 40px;
  background: var(--paper);
}
.model-picker-toolbar .text-action {
  min-height: 40px;
  padding: 0 10px;
  white-space: nowrap;
}
.model-options {
  max-height: 236px;
  overflow: auto;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.model-option {
  min-height: 52px;
  padding: 9px 11px;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px !important;
  color: var(--ink) !important;
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.model-option:last-child {
  border-bottom: 0;
}
.model-option:hover {
  background: var(--paper-deep);
}
.model-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--forest);
}
.model-option b,
.model-option small {
  display: block;
}
.model-option b {
  font-size: 11px;
}
.model-option small,
.model-option em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.model-option em {
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--rule);
}
.model-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.model-picker-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}
.custom-models,
.alias-editor {
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.custom-models summary,
.alias-editor summary {
  color: var(--forest);
  font-size: 10px;
  cursor: pointer;
}
.custom-model-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.custom-model-row button {
  min-height: 43px;
}
.custom-models > small,
.alias-editor > p {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.alias-rows {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.alias-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.alias-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alias-row input {
  min-height: 38px;
}
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}
.connection-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}
.connection-steps span {
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  border-right: 1px solid var(--rule);
}
.connection-steps span:last-child {
  border-right: 0;
}
.connection-steps b {
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}
.kind-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kind-switch legend {
  grid-column: 1 / -1;
}
.kind-switch label {
  cursor: pointer;
}
.kind-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.kind-switch span {
  min-height: 70px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--rule);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}
.kind-switch input:checked + span {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.kind-switch b,
.kind-switch small {
  display: block;
}
.kind-switch b {
  font-size: 11px;
}
.kind-switch small {
  margin-top: 5px;
  color: inherit;
  opacity: 0.65;
  font-size: 9px;
}
.platform-checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-checks legend {
  width: 100%;
}
.platform-checks input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.platform-checks span {
  padding: 8px 10px;
  display: inline-block;
  border: 1px solid var(--rule);
  cursor: pointer;
  font-size: 9px;
}
.platform-checks input:checked + span {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--paper);
}
.submit-zone {
  margin-top: 8px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--ink);
}
.submit-zone div b,
.submit-zone div span {
  display: block;
}
.submit-zone div b {
  font-size: 10px;
}
.submit-zone div span {
  max-width: 250px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--signal);
  font-size: 11px;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 260ms var(--ease);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .brand {
    padding: 26px;
  }
  .brand-name,
  .nav-item span:last-child,
  .rail-foot {
    display: none;
  }
  .nav-item {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
  }
  .nav-index {
    font-size: 11px;
  }
  .page-heading,
  .subpage-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .heading-aside {
    max-width: 520px;
  }
  .ledger-stats {
    grid-template-columns: 1fr 1fr;
  }
  .ledger-stats > div:nth-child(2) {
    border-right: 0;
  }
  .ledger-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }
  .proof-strip {
    grid-template-columns: 60px 1fr;
  }
  .proof-strip ol {
    grid-column: 1 / -1;
  }
  .egress-layout,
  .scheduler-grid {
    grid-template-columns: 1fr;
  }
  .map-board {
    min-height: 430px;
  }
  .scheduler-grid {
    gap: 35px;
  }
}

@media (max-width: 650px) {
  .login-screen {
    padding: max(24px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
    grid-template-columns: 1fr;
    gap: 42px;
    align-content: start;
    overflow-y: auto;
  }
  .login-wordmark {
    align-self: auto;
    margin-top: 12px;
  }
  .login-panel {
    padding: 32px 0;
  }
  .login-panel h1 {
    font-size: 34px;
  }
  .app-shell {
    display: block;
    padding-bottom: 68px;
  }
  .rail {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    width: 100%;
    height: 68px;
    display: block;
    border: 0;
    border-top: 1px solid color-mix(in oklch, var(--paper) 20%, transparent);
  }
  .brand,
  .rail-foot {
    display: none;
  }
  .primary-nav {
    height: 100%;
    padding: 0;
    grid-template-columns: repeat(4, 1fr);
  }
  .nav-item {
    height: 100%;
    min-height: 0;
    grid-template-columns: auto 1fr;
    padding: 0 10px;
    border-left: 0;
    border-top: 2px solid transparent;
    font-size: 11px;
  }
  .nav-item span:last-child {
    display: inline;
  }
  .nav-item.is-active {
    border-top-color: var(--signal);
    border-left-color: transparent;
  }
  .topbar {
    min-height: 64px;
    padding: 0 18px;
  }
  .sync-state {
    display: none;
  }
  .scope-label {
    font-size: 9px;
  }
  .supplier-switch small {
    display: none;
  }
  .view {
    padding: 38px 18px 54px;
  }
  h1 {
    font-size: clamp(43px, 14vw, 62px);
  }
  .page-heading {
    padding-bottom: 42px;
  }
  .subpage-heading {
    padding-bottom: 36px;
  }
  .ledger-stats > div {
    min-height: 112px;
    padding: 19px 12px 15px 0;
  }
  .ledger-stats > div:not(:first-child) {
    padding-left: 13px;
  }
  .ledger-stats strong {
    font-size: 27px;
  }
  .section-head {
    align-items: start;
  }
  .table-tools {
    display: grid;
    justify-items: end;
  }
  .search-box {
    min-width: 170px;
  }
  .proof-strip {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }
  .proof-symbol {
    width: 42px;
    height: 42px;
  }
  .proof-strip ol {
    grid-template-columns: 1fr 1fr;
  }
  .proof-strip li:nth-child(3) {
    border-top: 1px solid var(--rule);
  }
  .proof-strip li:nth-child(4) {
    border-top: 1px solid var(--rule);
  }
  .map-board {
    min-height: 390px;
  }
  .map-origin {
    width: 130px;
  }
  .map-node {
    width: 128px;
    padding: 12px;
  }
  .node-a {
    top: 34px;
    left: 18px;
  }
  .node-b {
    top: 65px;
    right: 18px;
  }
  .node-c {
    right: 30px;
    bottom: 30px;
  }
  .decision-board {
    min-height: 400px;
    padding: 23px 19px;
  }
  .drawer {
    width: 100vw;
    padding: 25px 20px 38px;
    border-left: 0;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .submit-zone {
    align-items: stretch;
    flex-direction: column;
  }
  .submit-zone .primary-action {
    width: 100%;
  }
}

/* Subscription onboarding keeps provider auth and the one-account proxy in a
   single operational flow without exposing either secret after submission. */
.page-heading .heading-aside {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.subscription-methods span {
  min-height: 76px;
}
.subscription-methods input:disabled + span {
  cursor: not-allowed;
  opacity: 0.46;
}
[data-session-key-field][hidden],
[data-oauth-complete-field][hidden] {
  display: none !important;
}
.oauth-completion {
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid color-mix(in oklch, var(--forest) 28%, var(--rule));
  background: color-mix(in oklch, var(--forest) 6%, transparent);
}
.oauth-completion b,
.oauth-completion small {
  display: block;
}
.oauth-completion small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.oauth-completion .secondary-action {
  width: fit-content;
  text-decoration: none;
}
.account-proxy {
  padding: 16px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper-deep) 62%, white);
}
.account-proxy-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.account-proxy-head b,
.account-proxy-head small {
  display: block;
}
.account-proxy-head b {
  font-size: 12px;
}
.account-proxy-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.account-proxy-head > span {
  padding: 4px 7px;
  color: var(--forest);
  border: 1px solid color-mix(in oklch, var(--forest) 28%, var(--rule));
  font-size: 9px;
  white-space: nowrap;
}
.subscription-advanced {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.subscription-advanced > summary {
  padding: 13px 0;
  color: var(--forest);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.subscription-advanced-body {
  padding: 6px 0 18px;
  display: grid;
  gap: 18px;
}
.subscription-progress {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--forest);
  border-left: 2px solid var(--forest);
  background: color-mix(in oklch, var(--forest) 7%, transparent);
}
.subscription-progress[hidden] {
  display: none;
}
.subscription-progress span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--forest);
  border-top-color: transparent;
  border-radius: 50%;
  animation: subscription-spin 800ms linear infinite;
}
.subscription-progress p {
  margin: 0;
  font-size: 10px;
}
@keyframes subscription-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 650px) {
  .page-heading .heading-aside {
    justify-content: stretch;
  }
  .page-heading .heading-aside button {
    flex: 1 1 180px;
    justify-content: center;
  }
  .account-proxy .field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subscription-progress span {
    animation: none;
    border-color: var(--forest);
    background: var(--forest);
  }
}

/* Supply API: a documentation desk, not a terminal-themed developer clone. */
.api-access-view {
  max-width: 1540px;
}
.api-heading {
  align-items: end;
}
.api-release {
  min-width: 190px;
  padding: 0 0 5px 20px;
  display: grid;
  gap: 3px;
  border-left: 1px solid var(--rule);
}
.api-release span,
.api-release small,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
}
.api-release b {
  font-size: 14px;
  font-weight: 650;
}
.api-route {
  min-height: 88px;
  margin-top: 6px;
  display: grid;
  grid-template-columns: 155px minmax(360px, 1fr) minmax(260px, 0.7fr);
  align-items: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.api-route-label {
  display: flex;
  align-items: center;
  gap: 15px;
}
.api-route-label span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
}
.api-route-label p {
  margin: 0;
  font-size: 13px;
  font-weight: 620;
}
.api-endpoint {
  min-width: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.api-endpoint code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.method-badge {
  padding: 5px 7px;
  background: var(--signal-soft);
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.copy-action {
  margin-left: auto;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--forest);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}
.copy-action:hover {
  border-bottom-color: var(--forest);
}
.api-route-note {
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.api-contract-grid {
  margin-top: clamp(34px, 4vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(32px, 5vw, 78px);
}
.api-credential-panel,
.api-flow-panel {
  min-width: 0;
}
.api-credential-panel header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.api-credential-panel h2,
.api-flow-panel h2,
.api-example h2,
.oauth-lane h2 {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.api-credential-panel > p {
  max-width: 650px;
  margin: 16px 0 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.credential-issue {
  margin: -5px 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.credential-issue small {
  color: var(--muted);
}
.credential-once {
  margin: 0 0 22px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: oklch(92.5% 0.035 91);
  border: 1px solid oklch(78% 0.055 85);
}
.credential-once[hidden] {
  display: none;
}
.credential-once b,
.credential-once small {
  display: block;
}
.credential-once b {
  font-size: 12px;
}
.credential-once small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.credential-once code {
  min-width: 0;
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--forest);
  font-size: 12px;
}
.api-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}
.api-credential-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.api-credential-panel dl div {
  padding: 18px 18px 18px 0;
}
.api-credential-panel dl div + div {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}
.api-credential-panel dt {
  color: var(--muted);
  font-size: 11px;
}
.api-credential-panel dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 620;
}
.credential-boundary {
  margin-top: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.credential-boundary b {
  margin-right: 5px;
  font-size: 11px;
}
.credential-boundary span {
  padding: 5px 8px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 11px;
}
.api-flow-panel {
  padding-left: clamp(24px, 4vw, 52px);
  border-left: 1px solid var(--rule);
}
.api-flow-panel ol {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.api-flow-panel li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 13px;
  align-items: center;
  border-top: 1px solid var(--rule);
}
.api-flow-panel li > span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 10px;
}
.api-flow-panel li b,
.api-flow-panel li small {
  display: block;
}
.api-flow-panel li b {
  font-size: 12px;
}
.api-flow-panel li small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.api-example {
  margin-top: clamp(42px, 6vw, 74px);
  border: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper) 52%, white);
}
.api-example > header {
  min-height: 78px;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
}
.api-example pre {
  max-height: 440px;
  margin: 0;
  padding: 26px 28px;
  overflow: auto;
  background: oklch(94.5% 0.012 95);
  color: oklch(28% 0.025 93);
  line-height: 1.75;
  tab-size: 2;
}
.api-example pre code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}
.api-example footer {
  min-height: 52px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 11px;
}
.api-example footer b {
  margin-right: 5px;
  color: var(--ink);
}
.oauth-lane {
  margin-top: clamp(42px, 6vw, 76px);
  padding: 30px 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 100px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.oauth-intro p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.oauth-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.oauth-steps > div {
  min-height: 118px;
  padding: 12px 20px;
  border-left: 1px solid var(--rule);
}
.oauth-steps span,
.oauth-steps b,
.oauth-steps small {
  display: block;
}
.oauth-steps span {
  color: var(--forest);
  font-size: 11px;
}
.oauth-steps b {
  margin-top: 29px;
  font-size: 12px;
}
.oauth-steps small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.oauth-steps .is-next {
  background: var(--paper-deep);
}
.oauth-steps .is-next span {
  color: var(--warn);
}
.api-guardrail {
  padding-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 5vw, 72px);
}
.api-guardrail > div {
  position: relative;
  padding-left: 18px;
}
.api-guardrail > div::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 3px;
  left: 0;
  width: 2px;
  background: var(--rule);
}
.api-guardrail b {
  font-size: 12px;
}
.api-guardrail p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .api-route {
    grid-template-columns: 140px minmax(320px, 1fr);
  }
  .api-route-note {
    grid-column: 1 / -1;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
  }
  .api-contract-grid,
  .oauth-lane {
    grid-template-columns: 1fr;
  }
  .api-flow-panel {
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 650px) {
  .primary-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .nav-item {
    font-size: 9px;
    letter-spacing: -0.02em;
  }
  .api-heading {
    align-items: start;
  }
  .api-release {
    min-width: 0;
    padding-left: 0;
    border: 0;
  }
  .api-route {
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .api-route-label {
    padding: 15px 0;
  }
  .api-endpoint {
    padding: 16px 0;
    border: 0;
    border-top: 1px solid var(--rule);
  }
  .api-endpoint code {
    font-size: 11px;
  }
  .api-route-note {
    padding: 14px 0;
  }
  .api-credential-panel dl {
    grid-template-columns: 1fr;
  }
  .credential-issue {
    align-items: start;
    flex-direction: column;
  }
  .credential-once {
    grid-template-columns: 1fr;
  }
  .api-credential-panel dl div {
    padding: 14px 0;
  }
  .api-credential-panel dl div + div {
    padding-left: 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
  .api-example > header {
    align-items: start;
  }
  .api-example pre {
    max-height: 370px;
    padding: 20px 18px;
  }
  .api-example footer {
    padding: 12px 18px;
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  .oauth-steps {
    grid-template-columns: 1fr;
  }
  .oauth-steps > div {
    min-height: 88px;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
  .oauth-steps b {
    margin-top: 12px;
  }
  .api-guardrail {
    grid-template-columns: 1fr;
  }
}

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

.archive-aside {
  min-width: 130px;
  padding: 13px 16px;
  display: grid;
  border: 1px solid var(--rule);
}
.archive-aside b {
  font-size: 19px;
  font-weight: 620;
}
.archive-aside span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.archive-ledger {
  display: grid;
  border-top: 1px solid var(--rule);
}
.archive-account {
  padding: 27px 0 30px;
  border-bottom: 1px solid var(--rule);
}
.archive-account > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.archive-account dl {
  margin: 24px 0 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.archive-account dl div {
  min-width: 0;
  padding: 0 16px;
  border-left: 1px solid var(--rule);
}
.archive-account dl div:first-child {
  padding-left: 0;
  border-left: 0;
}
.archive-account dt {
  color: var(--muted);
  font-size: 11px;
}
.archive-account dd {
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.archive-account dd small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.archive-models {
  padding-left: 41px;
}
.archive-models table {
  min-width: 680px;
}
.archive-models th,
.archive-models td {
  padding-top: 9px;
  padding-bottom: 9px;
}
.archive-empty-row {
  color: var(--muted);
}
.resource-timeline {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}
.resource-timeline li {
  min-height: 66px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.resource-timeline time,
.resource-timeline li > span,
.resource-timeline p {
  color: var(--muted);
  font-size: 12px;
}
.resource-timeline b {
  font-size: 13px;
  font-weight: 600;
}
.resource-timeline p {
  margin: 4px 0 0;
}

@media (max-width: 980px) {
  .archive-account dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 20px;
  }
  .archive-account dl div:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 650px) {
  .primary-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .nav-item {
    min-width: 0;
    padding: 0 2px;
    font-size: 9px;
    letter-spacing: -0.025em;
    white-space: nowrap;
  }
  .archive-ledger {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .archive-account {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .archive-account {
    overflow: hidden;
  }
  .archive-account dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-account dl div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .archive-account dl div:nth-child(even) {
    padding-left: 12px;
  }
  .archive-models {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 0;
    overflow-x: auto;
  }
  .archive-models table {
    min-width: 620px;
  }
  .archive-models tbody {
    display: table-row-group;
  }
  .archive-models tbody tr {
    padding: 0;
    display: table-row;
    background: transparent;
    border: 0;
  }
  .archive-models tbody td {
    display: table-cell;
  }
  .archive-models tbody td::before {
    display: none;
  }
  .resource-timeline li {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
  }
  .resource-timeline li > span {
    grid-column: 2;
  }
}

/* Quiet operations interface: stable density, restrained color, no presentation theatrics. */
:root {
  --paper: oklch(96.8% 0.004 195);
  --paper-deep: oklch(93.8% 0.007 195);
  --ink: oklch(24% 0.018 205);
  --forest: oklch(39% 0.075 184);
  --forest-soft: oklch(45% 0.055 187);
  --rule: oklch(83% 0.009 195);
  --muted: oklch(46% 0.018 205);
  --signal: oklch(43% 0.085 190);
  --signal-soft: oklch(91% 0.025 190);
  --good: oklch(46% 0.105 151);
  --warn: oklch(55% 0.105 73);
  --danger: oklch(49% 0.14 28);
  --display: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html,
body {
  background: var(--paper);
}
small {
  font-size: 12px;
}
.app-shell {
  grid-template-columns: 216px minmax(0, 1fr);
}
.rail {
  background: oklch(22% 0.025 205);
  color: oklch(95% 0.006 190);
}
.brand {
  min-height: 72px;
  padding: 0 24px;
  gap: 11px;
}
.brand-name {
  font-family: var(--body);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 20px;
  height: 20px;
  display: block;
  border: 1px solid color-mix(in oklch, var(--paper) 64%, transparent);
  transform: none;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--paper);
}
.brand-mark::before {
  width: 8px;
  height: 1px;
  left: 5px;
  top: 9px;
}
.brand-mark::after {
  width: 1px;
  height: 8px;
  left: 9px;
  top: 5px;
}
.brand-mark i {
  display: none;
}
.primary-nav {
  padding: 18px 0;
  gap: 2px;
}
.nav-item {
  min-height: 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-left-width: 2px;
  color: color-mix(in oklch, var(--paper) 67%, transparent);
  font-size: 14px;
  font-weight: 500;
}
.nav-item.is-active {
  border-left-color: color-mix(in oklch, var(--paper) 82%, transparent);
  background: color-mix(in oklch, var(--paper) 8%, transparent);
}
.nav-index {
  display: none;
}
.rail-foot {
  padding: 20px 24px 24px;
}
.rail-foot p,
.rail-status {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0;
}
.rail-foot p {
  margin: 5px 0 0 17px;
  color: color-mix(in oklch, var(--paper) 53%, transparent);
}
.rail-status {
  display: flex;
  align-items: center;
  gap: 9px;
}
.rail-status b {
  font-weight: 500;
}
.rail-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
}

.topbar {
  min-height: 64px;
  padding: 0 clamp(24px, 4vw, 56px);
  background: color-mix(in oklch, var(--paper) 86%, white);
}
.scope-label,
.sync-state {
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0;
}
.topbar-actions {
  gap: 22px;
}
.supplier-switch {
  grid-template-columns: 34px auto;
}
.supplier-switch b {
  font-size: 13px;
  font-weight: 600;
}
.supplier-switch small {
  font-size: 12px;
}
.supplier-monogram {
  border-radius: 4px;
  background: var(--forest);
  font-family: var(--body);
  font-size: 13px;
}
.supplier-chevron {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.view {
  padding: clamp(36px, 4.5vw, 62px) clamp(24px, 4vw, 64px) 64px;
  animation: none;
}
.page-heading,
.subpage-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.page-heading,
.subpage-heading {
  padding-bottom: 30px;
  border-bottom: 0;
}
.page-heading > div:first-child,
.subpage-heading > div:first-child {
  max-width: 720px;
}
h1 {
  font-family: var(--body);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em {
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}
.page-summary {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.heading-aside {
  padding-bottom: 0;
}
.heading-aside p {
  margin: 0;
  max-width: 530px;
  font-size: 13px;
  line-height: 1.65;
}
.primary-action {
  min-height: 44px;
  padding: 0 17px;
  gap: 0;
  border: 1px solid var(--forest);
  border-radius: 4px;
  background: var(--forest);
  color: oklch(98% 0.003 190);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}
.primary-action:hover {
  transform: none;
  box-shadow: none;
  background: oklch(34% 0.07 184);
  border-color: oklch(34% 0.07 184);
}
.primary-action:active {
  transform: none;
  box-shadow: none;
  background: oklch(29% 0.06 184);
}
.primary-action b {
  display: none;
}

.ledger-stats {
  border-color: var(--rule);
  background: color-mix(in oklch, var(--paper) 72%, white);
}
.ledger-stats > div {
  min-height: 104px;
  padding: 20px 22px;
  border-color: var(--rule);
}
.ledger-stats > div:not(:first-child) {
  padding-left: 22px;
}
.ledger-stats span,
.ledger-stats small {
  font-size: 12px;
}
.ledger-stats strong {
  margin: 9px 0 2px;
  font-family: var(--body);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ledger-stats .settlement-stat strong {
  color: var(--ink);
}

.section-block {
  padding-top: clamp(38px, 4vw, 54px);
}
.section-head {
  margin-bottom: 16px;
  align-items: center;
}
.section-head h2,
.explain-form h2 {
  font-family: var(--body);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.table-tools {
  gap: 16px;
}
.search-box {
  min-width: 240px;
  border-color: var(--rule);
}
.search-icon {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 1px solid var(--muted);
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1px;
  right: -4px;
  bottom: -2px;
  background: var(--muted);
  transform: rotate(-45deg);
  transform-origin: left center;
}
.search-box input {
  min-height: 40px;
  padding: 0;
  font-size: 13px;
}
.text-action {
  min-height: 40px;
  padding: 0 2px;
  border-bottom-color: var(--rule);
  font-size: 12px;
}
.table-wrap {
  border-top-color: var(--rule);
}
th {
  padding: 13px 14px 13px 0;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
td {
  padding: 17px 14px 17px 0;
  font-size: 12px;
}
.resource-name {
  gap: 11px;
}
.resource-glyph {
  width: 30px;
  height: 30px;
  border-color: var(--rule);
  background: color-mix(in oklch, var(--paper-deep) 72%, white);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  transform: none;
}
.resource-name b,
.model-stack b {
  font-size: 12px;
}
.resource-name small,
.model-stack small,
.muted-cell {
  margin-top: 4px;
  font-size: 12px;
}
.status-chip {
  min-height: 26px;
  padding: 4px 8px;
  gap: 6px;
  border-color: color-mix(in oklch, currentColor 40%, var(--rule));
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}
.row-action {
  width: auto;
  min-height: 34px;
  padding: 0 8px;
  color: var(--forest);
  font-size: 12px;
}
.empty-state {
  padding: 64px 20px;
}
.empty-state > span {
  display: none;
}
.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--body);
  font-size: 17px;
  font-weight: 600;
}
.empty-state p {
  font-size: 13px;
}

.proof-strip {
  margin-top: 48px;
  padding: 24px;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  border: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper) 70%, white);
}
.proof-symbol {
  display: none;
}
.proof-strip h3 {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  font-weight: 650;
}
.proof-strip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.proof-strip ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
}
.proof-strip li {
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-left: 1px solid var(--rule);
  font-size: 12px;
}
.proof-strip li span {
  margin: 0;
  font-size: 12px;
}
.proof-strip li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--muted);
  border-radius: 2px;
}
.proof-strip li b {
  display: none;
}

.egress-layout {
  padding-top: 18px;
  gap: 34px;
}
.map-board {
  min-height: 460px;
  background: color-mix(in oklch, var(--paper-deep) 72%, white);
  border-color: var(--rule);
}
.map-grid {
  display: none;
  background-image: none;
}
.map-origin {
  width: 142px;
  height: 82px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.map-origin b {
  font-size: 13px;
  letter-spacing: 0;
}
.map-origin small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.map-origin .pulse {
  animation: none;
  box-shadow: none;
}
.map-core-dot {
  width: 8px;
  height: 8px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: var(--good);
}
.route-lines path {
  stroke: color-mix(in oklch, var(--forest) 55%, var(--rule));
  stroke-dasharray: none;
}
.map-node {
  width: 150px;
  padding: 14px;
  background: white;
  border: 1px solid var(--rule);
  box-shadow: none;
}
.map-node span {
  color: var(--muted);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
}
.map-node b {
  font-size: 12px;
}
.map-node small {
  margin-top: 6px;
  font-size: 12px;
}
.map-node.is-ghost {
  border-style: dashed;
  opacity: 0.7;
}
.egress-card {
  padding: 20px 0;
  border-color: var(--rule);
}
.egress-card:last-child {
  border-color: var(--rule);
}
.egress-card h3 {
  font-family: var(--body);
  font-size: 17px;
  font-weight: 600;
}
.egress-card p,
.egress-meta {
  font-size: 12px;
}
.platform-tags span {
  padding: 4px 7px;
  border-radius: 3px;
  font-size: 12px;
  text-transform: none;
}
.capacity-bar {
  height: 4px;
}
.probe-evidence b,
.probe-evidence small,
.probe-result {
  font-size: 12px;
}

.scheduler-grid {
  padding: 18px 0 40px;
  gap: clamp(34px, 5vw, 72px);
  border-color: var(--rule);
}
.explain-form {
  gap: 18px;
}
.drawer-form label,
.explain-form label {
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0;
}
input,
select {
  min-height: 42px;
  background: white;
  border-color: var(--rule);
  border-radius: 4px;
  font-size: 13px;
}
.form-note {
  font-size: 12px;
}
.decision-board {
  min-height: 410px;
  padding: 32px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.decision-empty {
  min-height: 340px;
}
.decision-empty > span {
  display: none;
}
.decision-empty h3 {
  margin: 0 0 7px;
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
}
.decision-empty p {
  color: var(--muted);
  font-size: 12px;
}
.decision-head {
  border-color: var(--rule);
}
.decision-head p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}
.decision-head h3 {
  font-family: var(--body);
  font-size: 20px;
  font-weight: 650;
}
.decision-score {
  color: var(--forest);
  font-family: var(--body);
  font-size: 29px;
  font-weight: 600;
}
.candidate-row b {
  font-size: 12px;
}
.candidate-row small {
  color: var(--muted);
  font-size: 12px;
}
.candidate-row strong {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
}
.score-track,
.capacity-bar {
  background: var(--rule);
}
.score-track::-webkit-progress-bar,
.capacity-bar::-webkit-progress-bar {
  background: var(--rule);
}
.candidate-row.is-filtered {
  opacity: 0.62;
}

.drawer {
  width: min(560px, calc(100vw - 24px));
  padding: 30px clamp(24px, 4vw, 46px) 40px;
  background: oklch(98% 0.003 195);
  border-color: var(--rule);
  transition-duration: 260ms;
}
.drawer-scrim {
  background: color-mix(in oklch, var(--ink) 38%, transparent);
}
.drawer-head {
  padding-bottom: 20px;
  border-color: var(--rule);
}
.drawer-head h2 {
  font-family: var(--body);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.drawer-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  border-color: var(--rule);
  border-radius: 4px;
  font-size: 0;
}
.icon-button span::before,
.icon-button span::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  width: 16px;
  height: 1px;
  background: var(--ink);
}
.icon-button span::before {
  transform: rotate(45deg);
}
.icon-button span::after {
  transform: rotate(-45deg);
}
.drawer-form {
  padding-top: 24px;
  gap: 18px;
}
fieldset legend {
  margin-bottom: 8px;
  font-size: 12px;
}
.kind-switch span {
  min-height: 64px;
  padding: 13px;
  border-radius: 4px;
}
.kind-switch input:checked + span {
  background: var(--signal-soft);
  color: var(--ink);
  border-color: var(--forest);
}
.kind-switch b {
  font-size: 12px;
}
.kind-switch small {
  font-size: 12px;
}
.platform-checks span {
  padding: 8px 11px;
  border-radius: 3px;
  font-size: 12px;
}
.submit-zone {
  border-color: var(--rule);
}
.submit-zone div b {
  font-size: 12px;
}
.submit-zone div span {
  font-size: 12px;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 4px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 168px minmax(0, 1fr);
  }
  .brand {
    padding: 0 20px;
  }
  .brand-name,
  .nav-item span:last-child,
  .rail-foot {
    display: initial;
  }
  .nav-item {
    padding: 0 20px;
  }
  .page-heading,
  .subpage-heading {
    grid-template-columns: 1fr auto;
  }
  .proof-strip {
    grid-template-columns: 1fr;
  }
  .proof-strip ul {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .app-shell {
    padding-bottom: 60px;
  }
  .rail {
    height: 60px;
  }
  .primary-nav {
    grid-template-columns: repeat(4, 1fr);
  }
  .nav-item {
    justify-content: center;
    padding: 0 8px;
    border-left: 0;
    border-top: 2px solid transparent;
    font-size: 12px;
  }
  .nav-item.is-active {
    border-top-color: color-mix(in oklch, var(--paper) 82%, transparent);
  }
  .brand,
  .rail-foot {
    display: none;
  }
  .topbar {
    min-height: 60px;
    padding: 0 16px;
  }
  .view {
    padding: 28px 16px 44px;
  }
  .page-heading,
  .subpage-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 24px;
  }
  h1 {
    font-size: 28px;
  }
  .page-summary {
    font-size: 13px;
  }
  .heading-aside {
    max-width: none;
  }
  .ledger-stats > div {
    min-height: 96px;
    padding: 17px 12px;
  }
  .ledger-stats > div:not(:first-child) {
    padding-left: 12px;
  }
  .ledger-stats strong {
    font-size: 22px;
  }
  .section-head {
    display: grid;
    align-items: start;
  }
  .table-tools {
    width: 100%;
    grid-template-columns: 1fr auto;
    justify-items: stretch;
  }
  .search-box {
    min-width: 0;
  }
  .table-wrap {
    overflow: visible;
    border-top: 0;
  }
  table {
    min-width: 0;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 12px;
  }
  tbody tr {
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 20px;
    background: color-mix(in oklch, var(--paper) 60%, white);
    border: 1px solid var(--rule);
  }
  tbody td {
    min-width: 0;
    padding: 10px 0;
    display: block;
    border-bottom: 0;
  }
  tbody td::before {
    content: attr(data-label);
    margin-bottom: 7px;
    display: block;
    color: var(--muted);
    font-size: 11px;
  }
  tbody td:first-child {
    grid-column: 1 / -1;
    padding-top: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
  }
  tbody td:first-child::before {
    display: none;
  }
  tbody td:last-child {
    display: flex;
    align-items: end;
    justify-content: flex-end;
  }
  tbody td:last-child::before {
    margin: 0 auto 8px 0;
  }
  .proof-strip {
    margin-top: 38px;
    padding: 20px 16px;
  }
  .proof-strip ul {
    grid-template-columns: 1fr 1fr;
  }
  .proof-strip li {
    padding: 11px 8px;
    border-top: 1px solid var(--rule);
  }
  .proof-strip li:nth-child(odd) {
    border-left: 0;
  }
  .map-board {
    min-height: 380px;
  }
  .map-node {
    width: 126px;
    padding: 11px;
  }
  .decision-board {
    min-height: 360px;
  }
  .drawer {
    width: 100vw;
    padding: 24px 18px 34px;
  }
}

.secondary-action {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  border-radius: 4px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease;
}
.secondary-action:hover {
  background: var(--forest);
  color: oklch(98% 0.003 190);
}
.settlement-summary {
  min-height: 152px;
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(480px, 2fr);
  border: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper) 70%, white);
}
.settlement-balance {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
}
.settlement-balance span,
.settlement-balance small,
.settlement-summary dt {
  color: var(--muted);
  font-size: 12px;
}
.settlement-balance strong {
  margin: 10px 0 4px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 620;
  letter-spacing: -0.035em;
}
.settlement-balance small + small {
  margin-top: 3px;
}
.settlement-summary dl {
  margin: 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settlement-summary dl div {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
}
.settlement-summary dl div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.settlement-summary dl div:nth-child(even) {
  border-left: 1px solid var(--rule);
}
.settlement-summary dt {
  margin-bottom: 7px;
}
.settlement-summary dd {
  margin: 0;
  font-size: 18px;
  font-weight: 610;
}
.reconciliation-note {
  margin-top: 18px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(420px, 1.25fr);
  gap: 38px;
  align-items: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.reconciliation-note b {
  font-size: 13px;
  font-weight: 650;
}
.reconciliation-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.reconciliation-note > div > b {
  display: block;
  margin-bottom: 4px;
}
.reconciliation-counts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.reconciliation-counts div {
  padding: 2px 18px;
  border-left: 1px solid var(--rule);
}
.reconciliation-counts dt {
  color: var(--muted);
  font-size: 11px;
}
.reconciliation-counts dd {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 650;
}
.payout-evidence {
  padding: 15px 20px;
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(600px, 2fr);
  gap: 38px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.payout-evidence-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}
.payout-evidence-head strong {
  color: var(--ink);
  font-size: 13px;
}
.payout-evidence dl {
  margin: 0;
  display: grid;
  grid-template-columns: 0.8fr 0.55fr 1.25fr 0.8fr;
}
.payout-evidence dl div {
  min-width: 0;
  padding: 1px 16px;
  border-left: 1px solid var(--rule);
}
.payout-evidence dt {
  color: var(--muted);
  font-size: 10px;
}
.payout-evidence dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-support {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.settlement-ledger {
  padding-top: 42px;
}
.settlement-table {
  min-width: 1160px;
}
.ledger-id,
.ledger-basis {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.ledger-id {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.ledger-basis {
  width: max-content;
  max-width: 100%;
  padding: 3px 5px;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.ledger-amount {
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ledger-payout {
  margin-top: 6px;
  font-size: 11px;
}
.payout-approved {
  color: var(--good);
}
.payout-prepared {
  color: var(--forest);
}
.payout-none {
  color: var(--muted);
}
.status-provider_confirmed,
.status-resolved {
  color: var(--good);
}
.status-provisional {
  color: var(--forest);
}
.status-disputed,
.status-unpriced {
  color: var(--warn);
}
.reconciliation-matched {
  color: var(--good);
}
.reconciliation-amount_mismatch,
.reconciliation-token_mismatch,
.reconciliation-amount_and_token_mismatch,
.reconciliation-missing_invoice {
  color: var(--warn);
}
.reconciliation-pending {
  color: var(--muted);
}
.dispute-row td {
  padding: 0 0 18px;
}
.dispute-row[hidden] {
  display: none;
}
.dispute-form {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  background: color-mix(in oklch, var(--paper-deep) 62%, white);
  border-bottom: 1px solid var(--rule);
}
.dispute-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.dispute-form textarea {
  min-height: 76px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}
.dispute-form > div {
  display: flex;
  gap: 14px;
  align-items: center;
}

.skip-link {
  position: fixed;
  inset: 10px auto auto 10px;
  z-index: 120;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}
h1:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}
.api-flow-panel li {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .settlement-summary {
    grid-template-columns: 1fr;
  }
  .settlement-balance {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .reconciliation-note {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .reconciliation-counts div:first-child {
    border-left: 0;
    padding-left: 0;
  }
  .payout-evidence {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .payout-evidence dl div:first-child {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 650px) {
  .settlement-summary {
    min-height: 0;
  }
  .settlement-balance {
    padding: 24px 20px;
  }
  .settlement-summary dl {
    padding: 0;
  }
  .settlement-summary dl div {
    padding: 17px 18px;
  }
  .reconciliation-note {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .reconciliation-counts {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
  }
  .reconciliation-counts div {
    padding: 2px 12px;
  }
  .reconciliation-counts div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .reconciliation-counts div:nth-child(n + 3) {
    padding-top: 12px;
    border-top: 1px solid var(--rule);
  }
  .payout-evidence {
    padding: 16px;
  }
  .payout-evidence dl {
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
  }
  .payout-evidence dl div:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .settlement-table {
    min-width: 0;
  }
  .settlement-table tbody {
    display: table-row-group;
  }
  .settlement-table tbody tr {
    margin-bottom: 12px;
    display: grid;
  }
  .settlement-table .dispute-row {
    display: block;
    padding: 0;
  }
  .settlement-table .dispute-row[hidden] {
    display: none;
  }
  .settlement-table .dispute-row td {
    display: block;
    padding: 0;
  }
  .settlement-table .dispute-row td::before {
    display: none;
  }
  .settlement-table td:last-child:empty {
    display: none;
  }
  .dispute-form {
    grid-template-columns: 1fr;
  }
  .dispute-form > div {
    justify-content: flex-end;
  }

  .primary-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .nav-item {
    min-width: 0;
    padding: 0 2px;
    font-size: 9px;
    letter-spacing: -0.025em;
    white-space: nowrap;
  }
  .archive-ledger {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .archive-account {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .archive-account dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-account dl div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .archive-account dl div:nth-child(even) {
    padding-left: 12px;
  }
  .archive-models {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 0;
    overflow-x: auto;
  }
  .archive-models table {
    min-width: 620px;
  }
  .archive-models tbody {
    display: table-row-group;
  }
  .archive-models tbody tr {
    padding: 0;
    display: table-row;
    background: transparent;
    border: 0;
  }
  .archive-models tbody td {
    display: table-cell;
  }
  .archive-models tbody td::before {
    display: none;
  }
}
