:root {
  font-family: var(--font-sans);
  color: #1b3a28;
  background: #f5f3ee;
  font-synthesis: none;
  /* Agreed tokens (A/B/C, 2026-11-10): system sans, one green accent, amber = action needed, red = failure/danger. */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink: #1b3a28;
  --text: #26362c;
  --muted: #566a5c;
  --faint: #859587;
  --line: #dfe5dd;
  --line-strong: #c8d2c6;
  --paper: #fbfaf7;
  --surface: #fff;
  --green: #1b6b3a;
  --green-hover: #14562f;
  --deep: #1b3a28;
  --mint: #eef2ec;
  --mint-strong: #e3ebe1;
  --danger: #a3402f;
  --danger-bg: #fcf0ed;
  --danger-line: #efcbc3;
  --warn: #744a0c;
  --warn-bg: #fbf4e3;
  --warn-line: #e9d4a2;
  --warn-icon: #9a6512;
  --ok: #2d7046;
  --ok-bg: #e4f0e6;
  --ok-line: #c6dfcb;
  --focus: #2d7a49;
  --warning: #fbf4e3;
  --radius: 8px;
  --page: min(1200px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.skip:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 64px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f5f3ee;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.site-header .primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-header .primary-nav a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header .primary-nav a:hover {
  color: var(--ink);
}
.site-header .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.nav-cta span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2b9a51;
}

main {
  display: flow-root;
  min-height: calc(100vh - 129px);
  background: var(--paper);
}
footer {
  width: 100%;
  min-height: 64px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  background: #f5f3ee;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
}
footer .footer-brand {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}
footer nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.hero,
.section,
.trust,
.page-head,
.app-grid,
.metrics,
.auth-card,
.state,
.legal,
.editor {
  width: var(--page);
  margin-inline: auto;
}

.hero {
  min-height: 896px;
  padding: 40px 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  background: var(--paper);
}
.hero-copy {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--mint);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2b9a51;
}
.hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 6vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.lead {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}
.hero .actions {
  margin-top: 2px;
  justify-content: center;
}
.hero-demo {
  width: min(920px, 100%);
}
.hero-demo > .eyebrow {
  margin: 0 0 8px;
}
.hero-demo > h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.hero-demo > p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px auto 18px;
  color: var(--muted);
  font-size: 0.88rem;
}
.hero-code-stage {
  position: relative;
  width: min(850px, 100%);
  height: 300px;
  margin: auto;
}
.integration-card {
  position: absolute;
  width: min(560px, 76%);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 40px #1b3a2810;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.integration-card header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: var(--mint);
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
}
.integration-card header small {
  color: var(--muted);
  font:
    700 0.63rem ui-monospace,
    monospace;
}
.code-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.copy-state {
  min-width: 88px;
  padding: 3px 7px;
  color: var(--green) !important;
  background: #ffffffa8;
  border-radius: 4px;
  text-align: center;
}
.copy-state.copied {
  color: #fff !important;
  background: #2b8a4a;
}
.copy-state.error {
  color: #fff !important;
  background: var(--danger);
}
.integration-card pre {
  min-height: 180px;
  margin: 0;
  padding: 18px;
  overflow: auto;
}
.integration-card code {
  color: #294d34;
  font:
    0.72rem/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.syntax-keyword {
  color: #6d28d9;
  font-weight: 750;
}
.syntax-string {
  color: #a1420b;
}
.syntax-function {
  color: #075985;
  font-weight: 700;
}
.syntax-property {
  color: #0f766e;
}
.syntax-literal {
  color: #9f1239;
}
.syntax-comment {
  color: #718078;
  font-style: italic;
}
.base-card {
  left: 5%;
  top: 46px;
  z-index: 1;
  transform: rotate(-3deg);
}
.connect-card {
  right: 4%;
  top: 18px;
  z-index: 2;
  transform: rotate(2.2deg);
}
.integration-card:hover,
.integration-card:focus-visible {
  z-index: 6;
  border-color: #9dbca4;
  box-shadow: 0 26px 56px #1b3a2824;
  transform: translateY(-8px) rotate(0) scale(1.018);
}
.integration-card:active {
  transform: translateY(-3px) rotate(0) scale(1.008);
}
.integration-card[data-copy-state="copied"] {
  border-color: #2b8a4a;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
}
.button,
button {
  min-height: 42px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.button:hover,
button:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.secondary {
  color: var(--ink) !important;
  background: var(--mint) !important;
}
.quiet {
  min-height: auto;
  padding: 6px 8px;
  color: var(--muted) !important;
  background: transparent !important;
}
.danger {
  background: var(--danger);
}
.danger-text {
  color: var(--danger) !important;
}

.section {
  padding: 88px 0;
}
.section.compact {
  padding: 34px 0;
}
.section h2,
.trust h2 {
  margin: 0.25em 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
}
.feature-grid article,
.app-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature-grid article:first-child {
  background: var(--mint);
}
.feature-grid h3 {
  margin: 0.5em 0;
  font: 550 2rem var(--font-sans);
}
.feature-grid p {
  color: var(--muted);
  line-height: 1.6;
}
.number {
  color: var(--green);
  font:
    700 0.75rem ui-monospace,
    monospace;
}
.trust {
  margin-bottom: 88px;
  padding: 50px;
  color: #eef5ef;
  background: var(--deep);
  border-radius: 10px;
}
.trust .eyebrow {
  color: #a8c5ae;
}
.trust h2 {
  max-width: 850px;
  color: #fff;
}
.trust ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 36px;
  padding: 0;
  list-style: none;
}
.trust li::before {
  content: "✓";
  margin-right: 10px;
  color: #87c897;
  font-weight: 900;
}

.auth-card h1,
.legal h1,
.page-head h1 {
  margin: 0.14em 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.legal h2 {
  margin-top: 2em;
  font: 600 1.8rem var(--font-sans);
}
.legal p,
.legal li {
  color: #344d3b;
  font-size: 0.98rem;
  line-height: 1.72;
}
.legal ul {
  padding-left: 1.25rem;
}

.auth-card {
  max-width: 520px;
  margin-top: 64px;
  margin-bottom: 80px;
  padding: 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 50px #1b3a280d;
}
.auth-card h1 {
  font-size: 3rem;
}
.auth-card p {
  color: var(--muted);
  line-height: 1.55;
}
.auth-card label,
.editor label,
.inline-form label {
  display: grid;
  gap: 7px;
  margin: 18px 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}
.auth-card input,
.editor input,
.editor textarea,
.inline-form input {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b8c7bc;
  border-radius: 6px;
}
.sber {
  width: 100%;
  background: #21a038;
}
.sber:hover {
  background: #19852e;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
}
.or::before,
.or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.fine {
  color: var(--muted);
  font-size: 0.76rem;
}

.page-head {
  padding: 56px 0 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}
.page-head h1 {
  font-size: clamp(2.8rem, 6vw, 4rem);
}
.page-head p {
  margin-bottom: 0;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.section-title {
  display: flex;
  justify-content: space-between;
}
.section-title h2 {
  font-size: 2rem;
}
.section-title p {
  color: var(--muted);
}
.list {
  display: grid;
  gap: 8px;
}
.row {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.row h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}
.row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.row details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.83rem;
}
.consent > div,
.review > div:first-child {
  min-width: 0;
}
.empty,
.state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: var(--paper);
  border: 1px dashed #b8c5bc;
  border-radius: 8px;
}
.state {
  margin-top: 72px;
}
.state.error {
  color: #702a27;
  border-color: #d6aaa8;
}
.state button {
  margin-top: 20px;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: middle;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card-top {
  display: flex;
  justify-content: space-between;
}
.badge {
  padding: 5px 9px;
  color: var(--muted);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}
.badge.approved {
  color: #235d36;
  background: #ddebdc;
}
.badge.in_review {
  color: #795e1c;
  background: #f5e8c9;
}
.badge.rejected,
.badge.revoked {
  color: #852f29;
  background: #f8deda;
}
.app-card h2 {
  font: 600 1.45rem var(--font-sans);
}
.app-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.app-card dl div {
  padding: 10px;
  background: var(--mint);
  border-radius: 6px;
}
.app-card dt {
  color: var(--muted);
  font-size: 0.65rem;
}
.app-card dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}
.app-card small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
}
.rotation-note {
  width: 100%;
  margin: 0;
  color: #772f2b;
  font-size: 0.74rem;
}
.rejection,
.form-error,
.warning {
  padding: 12px;
  color: #772f2b;
  background: #fff0ee;
  border-radius: 6px;
}
.editor {
  margin-bottom: 30px;
  padding: 28px;
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.editor-head {
  display: flex;
  justify-content: space-between;
}
.editor-head h2 {
  margin: 0;
  font: 600 2rem var(--font-sans);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.editor fieldset {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.scope-row {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.scope-row:last-child {
  border-bottom: 0;
}
.scope-row .check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.scope-row .check input {
  width: auto;
}
.scope-row .check code {
  color: var(--ink);
  font-size: 0.82rem;
}
.scope-option > p {
  margin: 5px 0 0 29px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.scope-row > input {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #10271ccc;
}
.modal {
  width: min(620px, 100%);
  max-height: calc(100dvh - 40px);
  padding: 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 30px 100px #0005;
}
.modal h2 {
  font: 600 2rem var(--font-sans);
}
.modal label {
  display: grid;
  gap: 7px;
  margin: 18px 0;
}
.modal code {
  display: block;
  padding: 12px;
  background: var(--mint);
  border-radius: 6px;
}
.modal .secret {
  user-select: all;
}
.modal .close {
  width: 100%;
  margin-top: 18px;
}
.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-shell {
  width: 100%;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--paper);
}
.admin-nav {
  min-width: 0;
  color: #dce9df;
  background: var(--deep);
}
.admin-nav-inner {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.admin-nav .eyebrow {
  flex: 0 0 auto;
  margin-top: 0;
  color: #a8c5ae;
}
.admin-nav h2 {
  flex: 0 0 auto;
  margin: 0 0 24px;
  color: #fff;
  font: 600 2rem var(--font-sans);
}
.admin-nav nav {
  display: grid;
  gap: 4px;
}
.admin-nav nav a {
  padding: 10px 12px;
  color: #c6d7ca;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
}
.admin-nav nav a.active,
.admin-nav nav a:hover {
  color: #fff;
  background: #31583e;
}
.admin-note {
  flex: 0 0 auto;
  margin: auto 0 0;
  padding-top: 28px;
  color: #9eb2a3;
  font-size: 0.7rem;
  line-height: 1.5;
}
.admin-content {
  min-width: 0;
  padding: 0 40px 56px;
}
.admin-content section[id] {
  scroll-margin-top: 84px;
}
.admin-content .page-head,
.admin-content .section,
.admin-content .metrics {
  width: 100%;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metrics article {
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.metrics span {
  display: block;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
}
.health {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.health.ok {
  color: #145c2f;
  background: #d8f2e0;
}
.health.bad {
  color: #852f29;
  background: #f8deda;
}
.inline-form {
  max-width: 700px;
  display: flex;
  align-items: end;
  gap: 12px;
}
.inline-form label {
  flex: 1;
  margin: 0;
}
.table-wrap {
  margin-top: 20px;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  background: var(--mint);
}

.legal {
  max-width: 800px;
  padding: 64px 0 80px;
}
.legal h1 {
  font-size: clamp(2.7rem, 6vw, 4.4rem);
}
.legal-notice {
  padding: 16px;
  color: #6d5a31 !important;
  background: var(--warning);
  border: 1px solid #d8c49d;
  border-radius: 7px;
}
.not-found {
  border-style: solid;
}
.not-found > span {
  display: block;
  color: #b8c7bc;
  font: 500 clamp(5rem, 15vw, 8rem) var(--font-sans);
  line-height: 1;
}
.not-found h1 {
  margin: 10px 0;
  font: 600 clamp(2rem, 5vw, 3rem) var(--font-sans);
}
.not-found p {
  margin-bottom: 24px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  :root {
    --page: min(100% - 32px, 1200px);
  }
  .site-header {
    height: 56px;
    padding-inline: 16px;
  }
  .site-header .primary-nav {
    gap: 12px;
  }
  .site-header .primary-nav a {
    display: none;
  }
  main {
    display: flow-root;
    min-height: calc(100vh - 165px);
  }
  footer {
    min-height: 109px;
    padding: 18px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  footer nav {
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .hero {
    min-height: auto;
    padding: 48px 0 32px;
  }
  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.1rem);
  }
  .hero-code-stage {
    height: auto;
    display: grid;
    gap: 12px;
  }
  .integration-card {
    position: static;
    width: 100%;
    transform: none;
  }
  .integration-card:hover,
  .integration-card:focus-visible {
    transform: translateY(-2px);
  }
  .integration-card pre {
    min-height: auto;
  }
  .feature-grid,
  .app-grid,
  .metrics {
    grid-template-columns: 1fr;
  }
  .trust {
    width: 100%;
    margin-bottom: 0;
    padding: 40px 20px;
    border-radius: 0;
  }
  .trust ul {
    grid-template-columns: 1fr;
  }
  .page-head,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head {
    padding-top: 38px;
  }
  .page-head h1 {
    font-size: 3rem;
  }
  .form-grid,
  .scope-row {
    grid-template-columns: 1fr;
  }
  .scope-row {
    gap: 4px;
  }
  .app-card dl {
    grid-template-columns: 1fr;
  }
  .inline-form {
    display: block;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    min-height: auto;
  }
  .admin-nav-inner {
    position: static;
    height: auto;
    padding: 12px 16px;
    overflow: visible;
  }
  .admin-nav h2,
  .admin-nav .eyebrow,
  .admin-note {
    display: none;
  }
  .admin-nav nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
  .admin-nav nav a {
    flex: 0 0 auto;
    background: #31583e;
  }
  .admin-content {
    padding: 0 16px 40px;
  }
  .auth-card {
    margin-top: 40px;
    padding: 24px;
  }
}

/* Shared forms also cover email and operator review outside .editor. */
form label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  font-size: 0.875rem;
  font-weight: 600;
}
form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
form textarea,
form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b8c7bc;
  border-radius: 6px;
  line-height: 1.4;
}
form textarea {
  resize: vertical;
}
form select {
  cursor: pointer;
}
form fieldset {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
form legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
form .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
form input[type="checkbox"],
form input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}
select:focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: 3px;
}
form details {
  margin: 20px 0;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}
summary {
  cursor: pointer;
  line-height: 1.5;
}
details[open] > summary {
  margin-bottom: 16px;
}
.section > .editor,
.section > .section {
  width: 100%;
}
.section > .section {
  padding-block: 28px;
}

.app-card p {
  line-height: 1.6;
}

.section-title,
.editor-head,
.card-top {
  align-items: center;
  gap: 16px;
}
.row > .actions {
  margin-top: 0;
  flex-shrink: 0;
}
.row > div,
.app-card,
.page-head > div {
  min-width: 0;
}
.page-head p,
.row p,
.app-card dd,
.badge {
  overflow-wrap: anywhere;
}
.app-card > details {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.app-card form fieldset {
  padding: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  line-height: 1.35;
}
.admin-content .section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
}

.inline-form + .empty {
  margin-top: 20px;
}
.auth-card {
  margin-block: 48px;
}
.auth-card .fine {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .editor {
    padding: 16px;
  }
  .editor fieldset,
  form fieldset {
    padding: 16px;
  }

  .section-title,
  .editor-head {
    flex-wrap: wrap;
  }
  .inline-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .inline-form > button {
    align-self: flex-start;
  }
  .auth-card {
    margin-block: 28px;
  }
  form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  form textarea,
  form select {
    font-size: 16px;
  }
  .scope-row .check {
    flex-wrap: wrap;
  }
  .scope-row .check span {
    flex-basis: 100%;
    margin-left: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .spinner {
    animation-duration: 1.5s;
  }
}

/* ===================================================================
   A/B/C (approved 2026-11-10): calm type scale, header menu, admin
   review workspace, problem messages, dialogs, owner steps.
   Scale: 12.5 / 13.5 / 14 / 16 / 24 (32 for the landing hero on mobile).
   =================================================================== */
body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
code,
pre {
  font-family: var(--font-mono);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.icon {
  flex: none;
  display: inline-block;
  vertical-align: -2px;
}
.muted {
  color: var(--muted);
}

/* Headings: system sans, no display serif, no caps labels. */
.auth-card h1,
.legal h1,
.page-head h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.section h2,
.trust h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.feature-grid h3 {
  font: 600 1.25rem var(--font-sans);
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.editor-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Calm landing hero: same text, sans heading, actions above the fold. */
.hero {
  min-height: auto;
  padding: 72px 0 64px;
}
.hero-kicker {
  padding: 0;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero-demo > h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modes h2,
.trust h2 {
  margin-bottom: 0;
}
.trust {
  padding: 40px;
}

/* Buttons: 40px on desktop, 44px touch targets on small screens. */
.button,
button {
  min-height: 40px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}
button.sm,
.button.sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.8125rem;
}
.secondary {
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
}
.danger {
  background: var(--danger);
}
.danger-outline {
  color: var(--danger) !important;
  background: var(--surface) !important;
  border: 1px solid var(--danger-line) !important;
}
button[aria-disabled="true"] {
  color: #7b8c7f;
  background: #e4eae2;
  border: 1px solid #d6dfd4;
  cursor: not-allowed;
  transform: none;
}
.icon-button {
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
}

/* ---------- header and mobile menu ---------- */
.site-header {
  background: rgba(251, 250, 247, 0.97);
}
.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.primary-nav {
  margin-left: auto;
}
.site-header .primary-nav a,
.site-header .nav-cta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
}
.site-header .primary-nav a[aria-current="page"],
.site-header .nav-cta[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--green);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-actions .nav-cta {
  color: var(--ink);
  text-decoration: none;
}
.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  gap: 7px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 500;
}
.menu-toggle:hover {
  background: var(--mint);
  transform: none;
}
.menu-toggle[aria-expanded="true"] {
  background: var(--mint-strong);
}
.site-menu {
  position: fixed;
  inset: 56px 0 0 0;
  z-index: 30;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.site-menu-label {
  margin: 0;
  padding: 10px 8px 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.site-menu-item {
  position: relative;
  min-height: 64px;
  padding: 10px 8px 10px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  color: inherit;
  border-radius: 12px;
  text-decoration: none;
}
.site-menu-item b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}
.site-menu-item small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.site-menu-item .icon {
  color: var(--faint);
}
.site-menu-item[aria-current="page"] {
  background: #e6eee4;
}
.site-menu-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
}
.here {
  padding: 1px 7px;
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--ok-line);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}
.site-menu-foot {
  margin-top: auto;
  padding: 16px 8px 0;
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--line);
}
.site-menu-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- chips ---------- */
.chip {
  height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  color: var(--muted);
  background: #f1f3ef;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip.status-in_review {
  color: var(--ink);
  background: #e7efe5;
  border-color: #cddbcb;
}
.chip.status-approved,
.chip.ok {
  color: #1f5e36;
  background: var(--ok-bg);
  border-color: var(--ok-line);
}
.chip.status-rejected,
.chip.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: var(--warn-line);
}
.chip.status-revoked {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

/* ---------- problem message (B) ---------- */
.problem {
  margin: 12px 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  color: #3f2c08;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 10px;
  text-align: left;
}
.problem:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.problem-icon {
  margin-top: 1px;
  color: var(--warn-icon);
}
.problem.error {
  color: #4a1d14;
  background: var(--danger-bg);
  border-color: var(--danger-line);
}
.problem.error .problem-icon {
  color: var(--danger);
}
.problem.info {
  color: #203a2a;
  background: #f1f6ef;
  border-color: #cfdccc;
}
.problem.info .problem-icon {
  color: var(--green);
}
.problem h3 {
  margin: 0;
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}
.problem p {
  max-width: 70ch;
  margin: 3px 0 0;
  color: inherit;
  font-size: 0.875rem;
}
.problem-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.problem-actions:empty {
  display: none;
}
.problem-actions form,
.inline-login {
  display: inline;
  margin: 0;
}
.problem-tech {
  margin-top: 10px;
  color: #6a5a3a;
  font-size: 0.8125rem;
}
.problem-tech summary {
  width: max-content;
  cursor: pointer;
}
.problem-tech dl {
  margin: 6px 0 0;
  display: grid;
  grid-template-columns: 130px auto;
  gap: 2px 12px;
}
.problem-tech dt {
  color: #8a7a58;
}
.problem-tech dd {
  margin: 0;
}
.problem-tech code {
  font-size: 0.75rem;
}
.problem .steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #ecdcb5;
}
.problem .steps li {
  padding: 9px 0;
  display: grid;
  grid-template-columns: 22px 190px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  border-bottom: 1px solid #ecdcb5;
  font-size: 0.85rem;
}
.step-no {
  color: var(--warn);
  font-weight: 600;
}
.step-who {
  font-weight: 600;
}
.page-problem {
  width: min(760px, var(--page));
  margin: 40px auto;
}
.notice {
  margin: 0;
  padding: 10px 14px;
  color: #1f5e36;
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  border-radius: 8px;
}

/* ---------- dialogs ---------- */
.dialog {
  position: relative;
  width: min(560px, 100%);
}
/* Danger is an action tone; dialogs keep their readable paper surface. */
.dialog.danger {
  color: var(--text);
  background: var(--paper);
}
.dialog h2 {
  margin: 0 40px 8px 0;
  font: 600 1.25rem var(--font-sans);
  letter-spacing: -0.01em;
}
.dialog.danger h2 {
  color: var(--danger);
}
.dialog-description {
  color: var(--muted);
  font-size: 0.9rem;
}
.dialog-description p {
  margin: 0 0 8px;
}
.consequences {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--text);
}
.consequences li + li {
  margin-top: 4px;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 44px;
  min-height: 44px;
}
.dialog-form .field,
.field {
  margin: 14px 0;
  display: grid;
  gap: 6px;
}
.field label {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.field [aria-invalid="true"] {
  border: 1.5px solid #c9573f;
}
.field-error {
  color: var(--danger);
  font-size: 0.8125rem;
}
.check.ack {
  margin: 14px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  font-weight: 500;
}
.dialog-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- admin shell (A) ---------- */
.admin-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}
.admin-nav-inner {
  padding: 18px 12px 16px;
}
.admin-nav-title {
  margin: 4px 10px 14px;
  color: #a9c0af;
  font-size: 0.8125rem;
}
.admin-nav nav {
  gap: 2px;
}
.admin-nav nav a {
  position: relative;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d0ddd3;
  border-radius: 8px;
  font-size: 0.875rem;
}
.admin-nav nav a.active,
.admin-nav nav a[aria-current="page"] {
  color: #fff;
  background: #2d5b40;
  box-shadow: inset 3px 0 0 #8fd0a2;
  font-weight: 500;
}
.admin-nav nav a:hover {
  color: #fff;
  background: #2d5b40;
}
.admin-nav-group {
  margin: 12px 10px 2px;
  color: #8fa995;
  font-size: 0.75rem;
}
.nav-count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  color: #3a2804;
  background: #f0c56a;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.admin-note {
  color: #a9c0af;
  font-size: 0.8125rem;
}
.admin-content {
  padding: 0;
}
.admin-view,
.admin-load-error,
.admin-content > .state {
  padding: 24px 32px 48px;
}
.admin-view-head {
  margin-bottom: 18px;
}
.admin-view-head h1,
.admin-load-error h1,
.workspace-head h1,
.workspace-empty h1,
.admin-content .state h1 {
  margin: 0;
  color: var(--ink);
  font: 600 1.5rem/1.25 var(--font-sans);
  letter-spacing: -0.01em;
}
.admin-view-head p {
  max-width: 72ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.admin-view h2 {
  margin: 28px 0 6px;
  color: var(--ink);
  font: 600 1rem var(--font-sans);
}
.admin-view .table-wrap {
  margin-top: 16px;
}
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}
.requests {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
}
.queue {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f3f6f1;
  border-right: 1px solid var(--line);
}
.queue h2 {
  margin: 0;
  padding: 0 4px;
  color: var(--ink);
  font: 600 1.125rem var(--font-sans);
}
.segmented {
  padding: 3px;
  display: flex;
  background: #e4eae2;
  border-radius: 8px;
}
.segmented button {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}
.segmented button:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: none;
}
.segmented button[aria-pressed="true"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 58, 40, 0.14);
  font-weight: 600;
}
.segmented .count {
  color: var(--muted);
  font-weight: 500;
}
.search input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 0.85rem;
}
.queue-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}
.queue-item {
  padding: 12px 14px;
  display: block;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.queue-item:hover {
  border-color: var(--line-strong);
}
.queue-item[aria-current="page"] {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.queue-item b {
  display: block;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.queue-domain {
  color: var(--muted);
  font-size: 0.8125rem;
}
.queue-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.queue-row small {
  color: var(--faint);
  font-size: 0.75rem;
}
.queue-empty {
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.875rem;
}
.queue-note {
  margin: auto 0 0;
  padding: 0 4px;
  color: var(--faint);
  font-size: 0.75rem;
}
.workspace {
  min-width: 0;
}
.workspace-empty {
  padding: 24px 32px;
  color: var(--muted);
}
.application-workspace {
  padding: 20px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.crumbs a {
  color: var(--muted);
}
.workspace-head h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.meta code,
.registration code,
.application-workspace code {
  padding: 1px 6px;
  color: var(--ink);
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card-head {
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.card-head h2 {
  margin: 0;
  color: var(--ink);
  font: 600 1rem var(--font-sans);
}
.card-body {
  padding: 0 20px;
}
.progress,
.progress-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.bars {
  display: flex;
  gap: 3px;
}
.bars i {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: #e3e8e1;
}
.bars i.ok {
  background: #3f8f59;
}
.bars i.todo {
  background: #e3b153;
}
.checks {
  position: relative;
  margin: 0;
  padding: 6px 20px 8px;
  list-style: none;
}
.checks::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 26px;
  bottom: 26px;
  width: 2px;
  background: #e4e9e2;
}
.check-row {
  position: relative;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
}
.check-row + .check-row {
  border-top: 1px solid #eef1ec;
}
.check-row.flagged {
  margin: 0 -20px;
  padding-inline: 20px;
  background: rgba(251, 244, 227, 0.8);
}
.check-icon {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff;
}
.check-icon.ok {
  color: var(--green);
  background: #e1efe4;
}
.check-icon.todo,
.check-icon.unknown {
  color: var(--warn-icon);
  background: var(--warn-bg);
  border: 1.5px solid #e2c27d;
}
.check-icon.wait {
  color: #a3b0a6;
  background: #f4f6f3;
  border: 1.5px dashed var(--line-strong);
}
.check-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 28px;
}
.check-row p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.check-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-status {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 28px;
  white-space: nowrap;
}
.check-status.ok {
  color: var(--ok);
}
.check-status.todo,
.check-status.unknown {
  color: var(--warn);
}
.check-status.wait {
  color: var(--faint);
}
.group-note {
  margin: 0 20px 8px 60px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--warn);
  font-size: 0.78rem;
}
.decision {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #f5f8f3;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
.why {
  max-width: 52ch;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.why .icon {
  margin-top: 3px;
}
.decision-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.decision-buttons .approve {
  gap: 8px;
}
.operator-decision {
  margin-top: 12px;
  padding: 14px 16px;
  background: #fafbf9;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.operator-decision h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.875rem;
}
.evidence {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  font-size: 0.85rem;
}
.evidence dt,
.evidence dd {
  margin: 0;
  padding: 6px 0;
  border-top: 1px solid #eef1ec;
}
.evidence dt {
  padding-right: 12px;
  color: var(--muted);
}
.operator-decision fieldset {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.operator-decision legend {
  padding: 0 4px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.operator-decision .check {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 400;
}
.operator-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.registration {
  margin: 0;
  padding: 4px 20px 6px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.registration dt,
.registration dd {
  margin: 0;
  padding: 8px 0;
  font-size: 0.875rem;
}
.registration dt {
  padding-right: 16px;
  color: var(--muted);
}
.registration dt:not(:first-of-type),
.registration dd:not(:first-of-type) {
  border-top: 1px solid #eef1ec;
}
.registration dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.registration .uri {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ok);
  font-size: 0.75rem;
}
.scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.scope .purpose {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.8125rem;
}
.danger-block {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fffaf8;
  border: 1px solid var(--danger-line);
  border-radius: 12px;
}
.danger-block h2 {
  margin: 0;
  color: var(--danger);
  font: 600 0.875rem var(--font-sans);
}
.danger-block p {
  max-width: 66ch;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.system-facts {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  font-size: 0.875rem;
}
.system-facts dt,
.system-facts dd {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.system-facts dt {
  color: var(--muted);
}

/* ---------- owner steps (C) ---------- */
.owner-steps {
  margin-top: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.owner-steps h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}
.owner-steps > p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.step-list {
  position: relative;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.step-list::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: #e4e9e2;
}
.step {
  position: relative;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
}
.step h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 28px;
}
.step.wait h3 {
  color: #6f8273;
  font-weight: 500;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.step-status {
  display: block;
  margin-bottom: 2px;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 500;
}
.step.ok .step-status {
  color: var(--ok);
}
.step.wait .step-status {
  color: var(--faint);
}
.step .button {
  margin-top: 10px;
}
.operator-form {
  margin-top: 10px;
}
.operator-form > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 900px) {
  .site-header {
    gap: 8px;
    padding-inline: 16px 8px;
  }
  .primary-nav {
    display: none !important;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-actions .nav-cta {
    min-height: 44px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
  }
  .header-actions .nav-cta span {
    display: none;
  }
  button,
  .button {
    min-height: 44px;
  }
  button.sm,
  .button.sm,
  .segmented button {
    min-height: 44px;
  }
  .hero {
    padding: 24px 0 32px;
    align-items: stretch;
    text-align: left;
  }
  .hero-copy {
    align-items: flex-start;
    padding-inline: 16px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .lead {
    font-size: 1rem;
  }
  .hero .actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hero .actions .button {
    min-height: 48px;
  }
  .hero-demo {
    padding-inline: 16px;
  }
  .page-head h1 {
    font-size: 1.75rem;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-nav-title,
  .admin-nav-group {
    display: none;
  }
  .admin-nav nav a {
    min-height: 44px;
    background: #2d5b40;
  }
  .requests {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .queue {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .queue-item {
    min-height: 44px;
  }
  .admin-view,
  .admin-load-error,
  .workspace-empty,
  .application-workspace {
    padding: 20px 16px 32px;
  }
  .check-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .check-status {
    grid-column: 2;
    line-height: 1.4;
  }
  .registration,
  .evidence,
  .system-facts {
    grid-template-columns: 1fr;
  }
  .registration dd {
    border-top: 0 !important;
    padding-top: 0;
  }
  .decision,
  .danger-block {
    flex-direction: column;
    align-items: stretch;
  }
  .problem .steps li {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .problem .steps li > span:last-child {
    grid-column: 2;
  }
  .problem-tech dl {
    grid-template-columns: 1fr;
  }
  .dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* Compact choice rows inside decision forms and dialogs. */
.operator-decision .check,
.dialog-form .check {
  margin: 0;
  padding: 6px 0;
  min-height: 36px;
  align-items: center;
}
.operator-decision fieldset {
  background: #fff;
}
.operator-decision .field {
  margin: 12px 0;
}
.operator-decision .hint,
.field .hint {
  font-size: 0.8125rem;
}
button,
.button {
  gap: 6px;
}
@media (max-width: 900px) {
  .operator-decision .check {
    min-height: 44px;
  }
}
@media (max-width: 900px) {
  .app-card {
    padding: 16px;
  }
  .owner-steps {
    margin-inline: -4px;
    padding: 12px;
  }
  .owner-steps form fieldset,
  .operator-decision fieldset {
    padding: 12px;
  }
  .step-list::before {
    display: none;
  }
}

/* ===================================================================
   Spacing, overview cards and application details (2026-11-10).
   Same tokens and type scale; fixes header overlap, rhythm and select.
   =================================================================== */
/* Opaque sticky header: content no longer shows through it. */
.site-header {
  background: var(--paper);
}
/* Anchors and keyboard focus stop below the sticky header (docs headings keep their own offset). */
main :where(*) {
  scroll-margin-top: 80px;
  scroll-margin-bottom: 16px;
}

/* Section rhythm and readable measure on profile and developer pages. */
.section.compact {
  padding: 32px 0;
}
.section-title {
  margin-bottom: 16px;
}
.section-title h2 {
  margin: 0;
}
.section-title p {
  max-width: 66ch;
  margin: 6px 0 0;
}
.page-head p {
  max-width: 66ch;
}

/* Select: same field geometry everywhere, inside or outside a form. */
.select,
form select {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 40px 10px 12px;
  color: var(--ink);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23566a5c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 0.9375rem;
  line-height: 1.4;
  cursor: pointer;
}
.select:disabled,
form select:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- profile: Connect consent cards ---------- */
.consent-list,
.app-list,
.consent-scopes,
.detail-values {
  margin: 0;
  padding: 0;
  list-style: none;
}
.consent-list {
  display: grid;
  gap: 12px;
}
.consent-card {
  min-width: 0;
  padding: 20px;
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.consent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.consent-head > div {
  flex: 1 1 220px;
  min-width: 0;
}
.consent-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.consent-date {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.consent-head button {
  flex: none;
}
.consent-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.consent-scopes li {
  padding: 3px 10px;
  color: var(--text);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.consent-purposes {
  font-size: 0.875rem;
}
.consent-purposes > summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 600;
}
.consent-purposes[open] > summary {
  margin-bottom: 8px;
}
.consent-purposes dl {
  max-width: 66ch;
  margin: 0;
  display: grid;
  gap: 10px;
}
.consent-purposes dt {
  color: var(--ink);
  font-weight: 600;
}
.consent-purposes dd {
  margin: 2px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.consent-email {
  padding-top: 14px;
  display: grid;
  gap: 6px;
  border-top: 1px solid #eef1ec;
}
.consent-email label {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.consent-email .select {
  max-width: 420px;
}
.consent-email .hint {
  margin: 0;
  font-size: 0.8125rem;
}
.consent-card .problem {
  margin: 0;
}

/* ---------- developer: overview cards ---------- */
.app-list {
  width: var(--page);
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.app-summary {
  position: relative;
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.app-summary:hover {
  border-color: var(--line-strong);
}
.app-summary:has(.app-summary-link:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.app-summary-top {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-summary-date {
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.app-summary h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.app-summary-link {
  color: var(--ink);
  text-decoration: none;
}
.app-summary-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.app-summary-link:focus-visible {
  outline: none;
}
.app-summary-domain {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-summary-next {
  flex: 1;
  margin: 8px 0 0;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.45;
}
.app-summary-more {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---------- developer: application details ---------- */
.app-detail {
  width: var(--page);
  margin: 0 auto;
  padding: 20px 0 64px;
}
.app-detail > * {
  max-width: 880px;
}
.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.back-link .icon {
  transform: rotate(180deg);
}
.back-link:hover {
  color: var(--ink);
}
.app-detail-head {
  margin: 8px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.app-detail-title {
  flex: 1 1 320px;
  min-width: 0;
}
.app-detail-title h1,
.app-missing h1 {
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.app-detail-domain {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.app-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.app-detail-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
}
.app-detail > .notice,
.app-detail > .rejection,
.app-detail > .problem {
  margin: 0 0 16px;
}
.detail-card,
.app-detail .owner-steps {
  margin: 0 0 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.detail-card h2,
.owner-steps h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.detail-list {
  margin: 0;
}
.detail-row {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4px 16px;
  border-top: 1px solid #eef1ec;
}
.detail-row:first-child {
  border-top: 0;
}
.detail-row dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.detail-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-row dd p {
  margin: 0;
}
.client-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.client-id code {
  min-width: 0;
  padding: 4px 8px;
  background: var(--mint);
  border-radius: 6px;
  font-size: 0.875rem;
  word-break: break-all;
}
.secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.secret-row p {
  flex: 1 1 240px;
  max-width: 52ch;
}
.detail-values {
  display: grid;
  gap: 10px;
}
.detail-values li {
  display: grid;
  gap: 2px;
}
.detail-values code {
  font-size: 0.8125rem;
  word-break: break-all;
}
.detail-values b {
  color: var(--ink);
  font-weight: 600;
}
.detail-values span {
  color: var(--muted);
  font-size: 0.875rem;
}
.app-detail-dates {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.app-detail .editor {
  width: 100%;
  margin-inline: 0;
}
.app-detail .editor-head h2 {
  font-size: 1.25rem;
}
.app-missing p {
  max-width: 60ch;
  color: var(--muted);
}

@media (max-width: 900px) {
  main :where(*) {
    scroll-margin-top: 72px;
  }
  .section.compact {
    padding: 24px 0;
  }

  .consent-card {
    padding: 16px;
  }
  .consent-email .select {
    max-width: none;
  }
  .consent-purposes > summary {
    min-height: 44px;
  }
  .app-list {
    margin-bottom: 40px;
    gap: 12px;
  }
  .app-summary {
    padding: 16px;
  }
  .app-detail {
    padding: 8px 0 40px;
  }
  .app-detail-actions {
    width: 100%;
  }
  .app-detail-actions button {
    flex: 1 1 auto;
  }
  .detail-card,
  .app-detail .owner-steps {
    margin-inline: 0;
    padding: 16px;
  }
  .detail-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Operator evidence inside the details page: the intro and the fieldset do not touch. */
.operator-form > .fine {
  max-width: 66ch;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ===================================================================
   Profile (2026-11-10): cards with real inner padding, compact facts,
   editing and rules on demand. Same tokens, green accent, system font.
   =================================================================== */
.profile-page {
  --page: min(960px, calc(100% - 48px));
  padding-bottom: 64px;
}
.profile-page .page-head {
  padding: 40px 0 16px;
  align-items: center;
}
.profile-page .page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
.profile-card {
  width: var(--page);
  margin: 16px auto 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.profile-card-head {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.profile-card-head > div {
  flex: 1 1 260px;
  min-width: 0;
}
.profile-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.3;
}
.profile-card-head p,
.profile-danger p {
  max-width: 62ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.profile-card-head form {
  margin: 0;
}
.profile-page button,
.profile-page .button,
.profile-page button.sm,
.profile-page
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.profile-page select,
.profile-page .consent-purposes > summary {
  min-height: 44px;
}
.profile-fields-form summary {
  padding-block: 11px;
}
.profile-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.profile-fact {
  min-width: 0;
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  border-top: 1px solid var(--line);
}
.profile-fact dt {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: 0.8125rem;
}
.profile-fact dd {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.profile-fact .profile-fact-action {
  margin-left: auto;
}
.profile-empty {
  margin: 0;
  color: var(--muted);
}
.profile-actions,
.profile-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-actions {
  margin-top: 16px;
}
.profile-hint {
  max-width: 66ch;
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.profile-status {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-status > span:first-child {
  min-width: 0;
}
.profile-pending {
  margin: 16px 0 0;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.profile-pending .icon {
  flex: none;
  margin-top: 2px;
}
.profile-card > form {
  max-width: 560px;
}
.profile-card form.profile-fields-form {
  max-width: none;
}
.profile-card form fieldset {
  padding: 0;
  background: none;
  border: 0;
}
.profile-card form label {
  margin: 16px 0 0;
}
.profile-card form[hidden] {
  display: none;
}
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}
.profile-fields-form > fieldset > button.sm {
  margin-top: 16px;
}
.profile-more {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.875rem;
}
.profile-more > summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-weight: 600;
}
.profile-more[open] > summary {
  margin-bottom: 4px;
}
.profile-more p {
  max-width: 66ch;
  margin: 0 0 8px;
  line-height: 1.55;
}
.profile-feedback {
  margin: 16px 0 0;
  font-size: 0.875rem;
}
.profile-feedback.ok {
  color: var(--ok);
}
.profile-reset {
  color: var(--danger) !important;
}
.profile-card .consent-list {
  margin-top: 4px;
}
.profile-danger {
  margin-top: 40px;
  border-color: var(--danger-line);
}
.profile-danger h2 {
  color: var(--danger);
}
.profile-danger .danger {
  margin-top: 16px;
}
@media (max-width: 900px) {
  .profile-page {
    --page: calc(100% - 32px);
  }
  .profile-card {
    padding: 20px;
  }
}
@media (max-width: 640px) {
  .profile-card {
    padding: 16px;
    border-radius: 10px;
  }
  .profile-facts,
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  .profile-page .page-head {
    padding-top: 28px;
  }
}

/* ===================================================================
   Documentation (D/E/F, approved 2026-11-10).
   Every selector is scoped under .docs-shell; global header, layout and footer stay in app.css.
   Layout: ≥1121px nav + article + TOC; 901–1120px nav + article; ≤900px one column with
   in-flow disclosures for sections and "На этой странице".
   =================================================================== */

.docs-shell {
  --docs-ink: #1b3a28;
  --docs-green: #1b6b3a;
  --docs-paper: #fbfaf7;
  --docs-surface: #fff;
  --docs-line: #dfe5dd;
  --docs-line-strong: #c8d2c6;
  --docs-text: #26362c;
  --docs-muted: #566a5c;
  --docs-mint: #eef2ec;
  --docs-mint-strong: #e3ebe1;
  --docs-focus: #2d7a49;
  --docs-code-bg: #163629;
  --docs-code-fg: #e7f2e9;
  --docs-code-line: #325143;
  --docs-header-offset: 88px;

  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 56px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 190px;
  gap: 34px;
  align-items: start;
  color: var(--docs-text);
  font-size: 15px;
  line-height: 1.6;
}
.docs-shell > * {
  min-width: 0;
}
.docs-shell a {
  color: var(--docs-green);
  text-decoration: none;
  text-underline-offset: 3px;
}
.docs-shell a:hover {
  text-decoration: underline;
}
.docs-shell :focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: 2px;
}
.docs-shell h1,
.docs-shell h2,
.docs-shell h3,
.docs-shell p,
.docs-shell ul,
.docs-shell ol,
.docs-shell figure {
  margin: 0;
}
.docs-shell code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.docs-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- sidebar: sections and search (D) ---------- */
.docs-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* overflow-y: auto also clips horizontally: a 6px gutter (cancelled by the negative margin)
     keeps the 3px + 2px focus rings of the search field and results fully visible. */
  margin-left: -6px;
  padding: 6px 20px 6px 6px;
  border-right: 1px solid var(--docs-line);
  font-size: 13px;
}
.docs-sections-toggle {
  display: none;
}
.docs-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px !important;
  font-size: 15px;
  font-weight: 700;
}
.docs-sidebar-head a {
  color: var(--docs-ink) !important;
}
.docs-version {
  padding: 0 6px;
  border: 1px solid var(--docs-line);
  border-radius: 4px;
  color: var(--docs-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}
.docs-search {
  margin-bottom: 20px;
}
.docs-search label {
  display: block;
  margin-bottom: 5px;
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-search input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--docs-text);
  background: var(--docs-surface);
  border: 1px solid var(--docs-line-strong);
  border-radius: 7px;
  font-size: 13px;
}
.docs-search input:focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: 1px;
}
.docs-search-status:empty {
  display: none;
}
.docs-search-status {
  margin-top: 8px !important;
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-search-results ul {
  list-style: none;
  padding: 0;
  margin-top: 6px;
}
.docs-search-results a {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--docs-ink);
}
.docs-search-results a:hover,
.docs-search-results a:focus-visible {
  background: var(--docs-mint);
  text-decoration: none;
}
.docs-search-title {
  font-weight: 600;
  line-height: 1.35;
}
.docs-search-heading {
  color: var(--docs-text);
  line-height: 1.35;
}
.docs-search-excerpt {
  margin-top: 2px;
  color: var(--docs-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: break-word;
}
.docs-search-empty {
  margin-top: 6px !important;
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-search[data-active="true"] ~ .docs-nav {
  display: none;
}
.docs-nav-group {
  margin-bottom: 22px;
}
.docs-nav-heading {
  margin-bottom: 6px !important;
  padding-left: 10px;
  color: var(--docs-muted);
  font-size: 12px;
  font-weight: 600;
}
.docs-nav ul {
  list-style: none;
  padding: 0;
}
.docs-nav a {
  display: block;
  padding: 7px 10px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--docs-muted);
}
.docs-nav a:hover {
  color: var(--docs-ink);
  background: var(--docs-mint);
  text-decoration: none;
}
.docs-nav a[aria-current="page"] {
  color: var(--docs-ink);
  font-weight: 600;
  background: var(--docs-mint-strong);
  box-shadow: inset 3px 0 var(--docs-green);
}
.docs-bottom-link {
  display: block;
  padding: 16px 10px;
  border-top: 1px solid var(--docs-line);
  font-size: 12px;
}

/* ---------- article ---------- */
.docs-article {
  width: 100%;
  max-width: 75ch;
  padding-bottom: 12px;
}
.docs-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  padding: 0;
  margin-bottom: 15px;
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-crumbs li + li::before {
  content: "/";
  padding: 0 9px;
  color: #8c9d90;
}
.docs-crumbs a {
  color: var(--docs-muted);
}
.docs-crumbs [aria-current="page"] {
  color: var(--docs-ink);
}
.docs-article h1 {
  margin-bottom: 12px;
  color: var(--docs-ink);
  font-size: 32px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.docs-lead {
  color: var(--docs-muted);
  font-size: 16px;
  line-height: 1.65;
}
.docs-runtime {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px !important;
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-runtime span {
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--docs-ink);
  background: var(--docs-mint);
}
.docs-article > p:not(.docs-lead, .docs-runtime),
.docs-article > .docs-list {
  margin-top: 12px;
}
.docs-article > .docs-heading + p,
.docs-article > .docs-heading + .docs-list {
  margin-top: 0;
}
.docs-list {
  padding-left: 20px;
}
.docs-list li + li {
  margin-top: 8px;
}
.docs-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 32px 0 10px;
}
.docs-heading h2 {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--docs-ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: var(--docs-header-offset);
  overflow-wrap: anywhere;
}
.docs-heading h2:focus {
  outline: none;
}
.docs-step {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  color: var(--docs-green);
  background: var(--docs-mint-strong);
  font-size: 12px;
  font-weight: 600;
}
.docs-anchor {
  margin-left: auto;
  padding: 0 4px;
  color: #6f8977 !important;
  font-size: 15px;
  line-height: 27px;
}
.docs-note {
  margin: 24px 0 8px;
  padding: 6px 14px 8px;
  border-left: 3px solid var(--docs-green);
  background: var(--docs-mint);
  font-size: 13px;
}
.docs-note-title {
  font-weight: 600;
}
.docs-note code {
  display: block;
  padding: 4px 0 2px;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

/* ---------- code blocks (E) ---------- */
.docs-code {
  margin: 14px 0 0;
  min-width: 0;
  border-radius: 8px;
  color: var(--docs-code-fg);
  background: var(--docs-code-bg);
}
.docs-code-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--docs-code-line);
}
.docs-code-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
}
.docs-code-meta strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.docs-code-meta small {
  color: #b7d4c2;
  font-size: 11px;
}
.docs-code-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.docs-shell .docs-code-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #42624f;
  border-radius: 5px;
  color: var(--docs-code-fg);
  background: #264b3a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  transform: none;
}
.docs-shell .docs-code-button:hover {
  background: #2f5945;
  transform: none;
}
.docs-shell .docs-code-button[aria-pressed="true"] {
  background: #3b614a;
  border-color: #6c9479;
}
.docs-shell .docs-code-button[data-copy-state="copied"] {
  color: #d9f5df;
  border-color: #6c9479;
}
.docs-code-pre {
  margin: 0;
  padding: 16px 18px;
  max-width: 100%;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
  tab-size: 2;
  border-radius: 0 0 8px 8px;
}
.docs-code-pre:focus-visible {
  outline: 3px solid #78c28f;
  outline-offset: -3px;
}
.docs-code-pre code {
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: normal;
  word-break: normal;
}
.docs-code-wrap .docs-code-pre {
  white-space: pre-wrap;
}
.docs-code-wrap .docs-code-pre code {
  overflow-wrap: anywhere;
}
.docs-copy-result {
  padding: 0 14px;
  color: #bee5c7;
  font-size: 12px;
}
.docs-copy-result:not(:empty) {
  padding-bottom: 10px;
}
.docs-token-keyword {
  color: #dbbaff;
}
.docs-token-string {
  color: #b6e4a9;
}
.docs-token-property {
  color: #ace1e1;
}
.docs-token-function,
.docs-token-constant {
  color: #ffd7a3;
}
.docs-token-type {
  color: #9fd4ff;
}
.docs-token-comment {
  color: #a2b9ac;
  font-style: italic;
}

/* ---------- overview (F) ---------- */
.docs-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
}
.docs-choice {
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  border: 1px solid var(--docs-line);
  border-radius: 9px;
  background: var(--docs-surface);
}
.docs-choice h3 {
  margin-bottom: 4px;
  color: var(--docs-ink);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.25;
}
.docs-choice-intent {
  margin-bottom: 14px !important;
  color: var(--docs-ink);
  font-size: 14px;
  font-weight: 600;
}
.docs-choice ul {
  flex: 1;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
}
.docs-choice li + li {
  margin-top: 6px;
}
.docs-choice-runtime {
  margin: 14px 0 !important;
  padding-top: 12px;
  border-top: 1px solid var(--docs-line);
  color: var(--docs-muted);
  font-size: 12.5px;
}
.docs-shell .docs-choice-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--docs-green);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.docs-shell .docs-choice-primary:hover {
  background: #14562f;
  text-decoration: none;
}
.docs-choice-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-size: 13px;
  text-align: center;
}
.docs-table {
  overflow-x: auto;
}
.docs-shell .docs-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.docs-shell .docs-table th,
.docs-shell .docs-table td {
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--docs-line);
  background: none;
  font-weight: 400;
}
.docs-shell .docs-table thead th {
  color: var(--docs-muted);
  font-size: 12px;
}
.docs-shell .docs-table tbody th {
  width: 34%;
  color: var(--docs-ink);
}
.docs-ref-links {
  list-style: none;
  padding: 0;
}
.docs-ref-links a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 15px;
  padding: 11px 0;
  border-top: 1px solid var(--docs-line);
  font-size: 14px;
}
.docs-ref-links b {
  font-weight: 600;
}
.docs-ref-links span {
  color: var(--docs-muted);
  font-size: 12.5px;
}

/* ---------- pager, TOC, not-found ---------- */
.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--docs-line);
  font-size: 14px;
}
.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.docs-pager small {
  color: var(--docs-muted);
  font-size: 11.5px;
}
.docs-pager-next {
  grid-column: 2;
  text-align: right;
}
.docs-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding-top: 3px;
  font-size: 12.5px;
}
.docs-toc-title {
  color: var(--docs-ink);
  font-weight: 600;
}
.docs-toc ol,
.docs-local-toc ol {
  list-style: none;
  padding: 0;
}
.docs-toc ol {
  margin: 12px 0 24px;
  border-left: 1px solid var(--docs-line);
}
.docs-toc ol a {
  display: block;
  padding: 6px 0 6px 12px;
  color: var(--docs-muted);
  line-height: 1.4;
}
.docs-toc ol a[aria-current="location"] {
  color: var(--docs-green);
  font-weight: 600;
  box-shadow: -2px 0 var(--docs-green);
}
.docs-toc-step {
  display: inline-block;
  min-width: 16px;
}
.docs-help-link {
  display: grid;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--docs-line);
  color: var(--docs-muted) !important;
  line-height: 1.5;
}
.docs-help-link strong {
  color: var(--docs-green);
  font-weight: 500;
}
.docs-local-toc {
  display: none;
}
.docs-suggestion {
  margin-top: 18px !important;
  padding: 11px 14px;
  border-left: 3px solid var(--docs-green);
  background: var(--docs-mint);
}
.docs-not-found .docs-lead code {
  overflow-wrap: anywhere;
}
.docs-not-found > p:not(.docs-lead, .docs-suggestion) {
  margin-top: 18px;
}
.docs-not-found-groups {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}
.docs-not-found-groups h2 {
  margin-bottom: 8px;
  color: var(--docs-ink);
  font-size: 18px;
  font-weight: 600;
}
.docs-not-found-groups ul {
  list-style: none;
  padding: 0;
}
.docs-not-found-groups li {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--docs-line);
}
.docs-not-found-groups li span {
  color: var(--docs-muted);
  font-size: 13px;
}

/* ---------- medium: nav + article, TOC becomes an inline disclosure ---------- */
@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
  }
  .docs-toc nav {
    display: none;
  }
  .docs-toc {
    position: static;
    grid-column: 2;
    max-height: none;
    max-width: 75ch;
  }
  .docs-toc:empty {
    display: none;
  }
  .docs-local-toc {
    display: block;
    margin: 20px 0 4px;
    border-block: 1px solid var(--docs-line);
  }
  .docs-shell .docs-local-toc summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    margin: 0;
    color: var(--docs-ink);
    font-size: 14px;
    font-weight: 600;
  }
  .docs-shell .docs-local-toc summary::-webkit-details-marker {
    display: none;
  }
  .docs-shell .docs-local-toc summary::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }
  .docs-shell .docs-local-toc[open] summary::after {
    margin: 4px 4px 0 0;
    transform: rotate(-135deg);
  }
  .docs-local-toc summary small {
    margin-left: auto;
    color: var(--docs-muted);
    font-size: 12px;
    font-weight: 400;
  }
  .docs-local-toc nav {
    padding-bottom: 10px;
  }
  .docs-local-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: 14px;
  }
  .docs-local-toc a[aria-current="location"] {
    font-weight: 600;
  }
  .docs-local-toc .docs-toc-step {
    color: var(--docs-muted);
  }
}

/* ---------- small: one column, sections and TOC are separate in-flow disclosures ---------- */
@media (max-width: 900px) {
  .docs-shell {
    --docs-header-offset: 72px;
    display: block;
    width: 100%;
    padding: 0 0 40px;
  }
  .docs-shell > .docs-article,
  .docs-shell > .docs-toc {
    width: auto;
    margin-inline: 16px;
  }
  .docs-article {
    padding-top: 22px;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin-left: 0;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--docs-line);
    background: var(--docs-surface);
    font-size: 14px;
  }
  .docs-shell .docs-sections-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--docs-ink);
    background: none;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transform: none;
  }
  .docs-shell .docs-sections-toggle:hover {
    background: none;
    transform: none;
  }
  .docs-sections-toggle::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }
  .docs-sections-toggle[aria-expanded="true"]::after {
    margin: 4px 4px 0 0;
    transform: rotate(-135deg);
  }
  .docs-sections-current {
    margin-left: auto;
    overflow: hidden;
    color: var(--docs-muted);
    font-size: 12px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .docs-sidebar[data-open="false"] .docs-sections-panel {
    display: none;
  }
  .docs-sections-panel {
    padding: 8px 0 12px;
  }
  .docs-sidebar-head {
    font-size: 14px;
  }
  .docs-search input {
    min-height: 44px;
    font-size: 16px;
  }
  .docs-nav a,
  .docs-search-results a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
    padding-block: 10px;
  }
  .docs-bottom-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: 8px;
  }
  .docs-article h1 {
    font-size: 28px;
  }
  .docs-lead {
    font-size: 15px;
  }
  .docs-toc {
    margin-top: 28px;
  }
  .docs-heading h2 {
    font-size: 19px;
  }
  .docs-anchor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-top: -9px;
  }
  .docs-code-head {
    padding: 10px 12px;
  }
  .docs-code-meta {
    width: 100%;
    justify-content: space-between;
  }
  .docs-code-tools {
    width: 100%;
  }
  .docs-shell .docs-code-button {
    flex: 1;
    min-height: 44px;
    font-size: 13px;
  }
  .docs-code-pre {
    padding: 14px 12px;
    font-size: 13px;
  }
  .docs-choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-shell .docs-choice-primary,
  .docs-choice-secondary {
    min-height: 44px;
  }
  .docs-ref-links a {
    min-height: 44px;
  }
  .docs-pager {
    gap: 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-shell * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
