:root {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #555;
  --line: #d9d8d0;
  --brand: #0b5d5e;
  --success: #0d6d30;
  --error: #982a2a;
  --warn: #8d5b06;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #f7f7f2 0%, #e8eee8 100%);
  color: var(--ink);
}

.hero {
  padding: 1rem 1.2rem 0.5rem;
  max-width: 1680px;
  margin: 0 auto;
}

.hero p {
  margin: 0.2rem 0 0;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0.45rem 0;
  line-height: 1.15;
}

.title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.title-with-logo img {
  width: 52px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.dpa-nav-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.dpa-nav-link:hover {
  text-decoration: underline;
}

main {
  max-width: 1680px;
  margin: 0 auto 2.5rem;
  padding: 0 1.2rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.body-copy {
  color: var(--muted);
  margin-top: 0;
}

.actors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.actors span,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.82rem;
  background: #fafaf8;
}

.sequence {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.config-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr 0.9fr;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
  align-items: stretch;
}

.passkey-callout {
  border: 1px solid #b9d7cc;
  background: #f4fbf8;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.85rem;
}

.passkey-callout h4 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  color: #0c4f3f;
}

.passkey-callout ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.16rem;
  font-size: 0.8rem;
}

.tas-enabled-row {
  gap: 0.45rem;
  margin: 0.45rem 0 0.55rem;
  font-weight: 500;
  color: var(--ink);
}

.tas-enabled-check {
  display: inline-flex;
  align-items: center;
}

.tas-enabled-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.config-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 0.55rem;
  min-width: 0;
}

.config-card h3 {
  margin-bottom: 0.6rem;
}

.config-card .controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.3rem;
  gap: 0.45rem 0.55rem;
}

.inline-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  min-width: 0;
}

.compact-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  min-width: 0;
}

.config-subtitle {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  font-weight: 700;
  color: #114b4c;
  margin-top: 0.1rem;
}

.tas-collapsible {
  grid-column: 1 / -1;
  border-top: 1px dashed #c9d4d2;
  padding-top: 0.35rem;
}

.tas-collapsible summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  color: #114b4c;
}

.tas-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.config-card .controls > label {
  min-width: 0;
  max-width: 100%;
}

.config-card.config-core .controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.config-wide {
  grid-column: 1 / -1;
}

.config-card.config-core {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.config-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.92fr);
  gap: 0.5rem;
  flex: 1;
}

.config-col12 {
  max-width: 340px;
  justify-self: start;
}

.config-col {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  align-content: start;
}

.inline-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.config-col12 .inline-three {
  grid-template-columns: minmax(78px, 1fr) minmax(62px, 0.75fr) minmax(68px, 0.8fr);
}

.config-col12 > label {
  max-width: 340px;
}

.inline-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.config-card.config-personal {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.config-card.config-personal .controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.5rem;
}

.personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-height: 100%;
  margin-top: 0.55rem;
}

.config-card.config-personal .col21 {
  min-width: 0;
}

.config-card.config-personal .col22 {
  min-width: 0;
}

.config-card.config-tas .controls {
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.config-card.config-tas .config-collapsible summary {
  font-size: 0.9rem;
}

.config-card.config-tas {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.tas-match-callout {
  border: 1px solid #f0b36c;
  border-left: 4px solid #d97806;
  border-radius: 8px;
  background: #fff7eb;
  color: #653a05;
  padding: 0.42rem 0.5rem;
  font-size: 0.74rem;
  line-height: 1.25;
  margin: -0.15rem 0 0.45rem;
}

.tas-pairs {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.config-collapsible {
  margin: 0;
}

.config-collapsible summary { display: none; }

.key-contact-field {
  border: 0;
  background: transparent;
  padding: 0;
}

.key-contact-field input {
  font-weight: 500;
}

.compact-action-field button {
  width: auto;
  min-width: 120px;
  max-width: 140px;
  margin-top: 0.1rem;
  height: 28px;
}

.personal-first input,
.personal-last input {
  max-width: 140px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 14, 0.45);
  z-index: 1200;
  padding: 1rem;
}

.modal-card {
  width: min(820px, 95vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.auth-identity-card {
  width: min(560px, 95vw);
}

.auth-identity-grid {
  display: grid;
  gap: 0.5rem;
}

.auth-identity-choice {
  display: inline-flex;
  width: fit-content;
  justify-self: start;
  font-weight: 600;
}

.auth-identity-grid .inline-two {
  grid-template-columns: 120px 1fr;
}

.dpa-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: -0.1rem 0 0.7rem;
}

.dpa-actions button {
  min-width: 190px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.inline-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.live-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(980px, 2.4fr);
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 0.8rem;
}

.workbench-col {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 0.65rem;
}

.logs-col .panels.logs-panels {
  grid-template-columns: 1fr;
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.logs-reqres {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.logs-statusconfig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.logs-statusconfig pre {
  min-height: 120px;
  max-height: 220px;
}

.assurance-panel {
  border-left: 3px solid var(--brand);
  padding-left: 0.7rem;
}

.assurance-panel p {
  margin: 0.25rem 0;
}

.assurance-explain {
  color: var(--text);
}

.passkey-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.passkey-badge.yes {
  color: #0c5a23;
  background: #d8f4df;
  border-color: #7bc78f;
}

.passkey-badge.no {
  color: #8d200f;
  background: #fbe3dd;
  border-color: #e2a59a;
}

.passkey-badge.pending {
  color: #6f4b00;
  background: #f7ebcc;
  border-color: #d5b87d;
}

#checkoutAssurancePanel,
#decryptedAssurancePanel {
  min-height: 130px;
  max-height: 220px;
  font-size: 0.74rem;
  margin-top: 0.4rem;
}

.decrypted-summary-card {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fafcfb;
  display: flex;
  flex-direction: column;
}

.decrypted-summary-card.flash-passkey {
  border-color: #39a85f;
  background: linear-gradient(135deg, #f3fff6 0%, #e8f9ee 100%);
  box-shadow: 0 0 0 1px rgba(57, 168, 95, 0.24), 0 0 18px rgba(57, 168, 95, 0.14);
}

.decrypted-summary-card.flash-token {
  border-color: #1a7796;
  background: linear-gradient(135deg, #f1fbff 0%, #e9f5ff 100%);
  box-shadow: 0 0 0 1px rgba(26, 119, 150, 0.24), 0 0 18px rgba(26, 119, 150, 0.14);
}

.decrypted-summary-card h4 {
  margin: 0 0 0.45rem;
}

.decrypted-summary-card p {
  margin: 0.25rem 0;
}

.summary-list {
  margin: 0 0 0.35rem;
  padding-left: 1rem;
}

.summary-list li {
  margin: 0.2rem 0;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.backend-buttons {
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
  min-width: 260px;
  max-width: 320px;
}

.lifecycle-backend {
  margin: 0.15rem 0 0.35rem;
  width: 100%;
  min-width: 0;
}

.lifecycle-top {
  margin: 0.45rem 0 0.7rem;
}

.backend-actions-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.backend-stage-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
}

.backend-stage-panel h4 {
  margin: 0 0 0.05rem;
  white-space: nowrap;
}

.backend-results-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.backend-results-grid > .decrypted-summary-card {
  min-height: 360px;
}

#decryptedAssurancePanel,
#decryptedPayloadPanel,
#decryptedPayloadRawPanel {
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
}

@media (max-width: 1280px) {
  .backend-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .logs-statusconfig {
    grid-template-columns: 1fr;
  }
}

.token-line {
  margin: 0.35rem 0 0;
}

.token-source {
  margin: 0.2rem 0 0;
}

#recognitionTokenStatus.token-yes {
  color: var(--success);
  font-weight: 700;
}

#recognitionTokenStatus.token-no {
  color: var(--error);
  font-weight: 700;
}

#recognitionTokenStatus.token-unknown {
  color: var(--warn);
  font-weight: 700;
}

.vertical-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.actions-col .vertical-buttons,
.backend-buttons {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
}

.vertical-buttons button {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.8rem;
}

button:disabled:not(.is-loading) {
  background: #cfd7da !important;
  color: #5a6a70 !important;
  border-color: #bcc8cc !important;
  cursor: not-allowed !important;
}

button.is-loading {
  opacity: 1;
  background: #5f7279 !important;
  border-color: #4f656c !important;
  color: #f3f7f8 !important;
  cursor: progress !important;
}

button.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.75s linear infinite;
  margin-right: 0.12rem;
  flex: 0 0 auto;
}

button[data-status-text]::after {
  content: attr(data-status-text);
  display: inline-block;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.44rem;
  line-height: 1.15;
  border: 1px solid transparent;
}

button.status-success[data-status-text]::after {
  background: #d9f5df;
  color: #0a5a23;
  border-color: #81cd95;
}

button.status-fail[data-status-text]::after {
  background: #fde0de;
  color: #8a1e15;
  border-color: #e9a39d;
}

button.status-pending[data-status-text]::after {
  background: #f8ebcc;
  color: #6d4e00;
  border-color: #dbbe7c;
}

button.status-ready[data-status-text]::after {
  background: #eaf0f1;
  color: #3d4f52;
  border-color: #c5d2d5;
}

button.status-warning[data-status-text]::after {
  background: #fff2d6;
  color: #7a4f00;
  border-color: #e2bf7e;
}

button:disabled[data-status-text]::after {
  background: #e8edef;
  color: #5a6a70;
  border-color: #cad4d8;
}

label {
  font-size: 0.84rem;
  color: var(--muted);
  display: grid;
  gap: 0.3rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  white-space: nowrap;
  min-width: 0;
  color: #203233;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
}

.checkbox-inline input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: #0b5d5e;
  flex: 0 0 auto;
}

.checkbox-inline input[type="checkbox"]:focus-visible {
  outline: 2px solid #2d7e80;
  outline-offset: 1px;
}

.inline-options .checkbox-inline input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
}

.config-col11 .inline-options {
  flex-wrap: nowrap;
  gap: 0.35rem 0.6rem;
}

.config-col11 .inline-options .checkbox-inline {
  font-size: 0.76rem;
}

#savedDpaSelect,
#srcInitiatorIdInput {
  max-width: 100%;
}

.dpa-id-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

select,
input,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 28px;
  padding: 0 0.55rem;
  line-height: 1.2;
  font-size: 0.83rem;
}

input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-card select,
.config-card input {
  width: 100%;
  max-width: 100%;
}

button {
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

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

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin-top: 0.7rem;
}

pre {
  background: #131313;
  color: #eff5ee;
  padding: 0.65rem;
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: 220px;
  max-height: 420px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  tab-size: 2;
}

#eventLogPanel {
  min-height: 320px;
  max-height: 560px;
  font-size: 0.75rem;
}

#liveEventLogPanel {
  min-height: 600px;
  max-height: 600px;
  font-size: 0.82rem;
}

.live-status-strip {
  padding: 0 0 0.2rem;
  margin-bottom: 0.38rem;
}

.live-status-heading {
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.status-token-inline {
  font-size: 0.78rem;
  font-weight: 600;
  color: #44565a;
  white-space: nowrap;
}

#liveStatusText {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.2;
}

.live-status-strip h4 {
  margin-top: 0.28rem;
  margin-bottom: 0.22rem;
  font-size: 0.84rem;
}

.saved-cards-wrap {
  margin-top: 0.45rem;
  margin-bottom: 0.7rem;
}

.saved-cards-wrap h3 {
  margin-bottom: 0.4rem;
}

#srcCardList {
  display: block;
  width: 100%;
  margin-bottom: 0.45rem;
  --src-card-art-width: 56px;
  --src-card-art-height: 36px;
  --src-card-preview-brand-font-size: 12px;
  --src-card-preview-subtext-font-size: 11px;
}

.card-list-scroll {
  max-height: 340px;
  min-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #d1d6d9;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
}

#savedCardsGrid {
  margin-top: 0.45rem;
}

.new-card-form {
  margin-top: 0.45rem;
  border: 1px solid #d1d6d9;
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.45rem;
}

.new-card-form h4 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
}

.new-card-form .body-copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
}

.new-card-form label {
  margin: 0;
}

.new-card-form label:first-of-type,
.new-card-form label:nth-of-type(2) {
  grid-column: 1 / -1;
}

.new-card-form select,
.new-card-form input {
  background: #fbfcfd;
  border: 1px solid #cfd5db;
}

.new-card-form select:focus,
.new-card-form input:focus {
  outline: 2px solid rgba(11, 93, 94, 0.24);
  border-color: #0b5d5e;
}

.checkout-under-cards {
  margin-top: 0.35rem;
}

.checkout-under-cards button {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.8rem;
}

.action-progress {
  margin: 0.4rem 0 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #cad5d6;
  border-top-color: #0b5d5e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.post-checkout {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  background: #fff;
}

.post-checkout pre {
  min-height: 140px;
  max-height: 260px;
  margin-top: 0.5rem;
}

.backend-api {
  margin-top: 0.8rem;
  padding: 0.8rem;
}

.runtime-credentials-card,
.runtime-keys-card {
  margin: 0.1rem 0 0.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.runtime-credentials-panel,
.runtime-keys-panel {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: #fbfcfb;
}

.logs-actions {
  margin-top: 0.45rem;
}

.panel-head-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.panel-head-with-action h3 {
  margin: 0;
}

.panel-head-with-action button {
  width: auto;
  min-height: 28px;
  font-size: 0.78rem;
  padding: 0 0.55rem;
}

pre .json-key {
  color: #8fd2ff;
}

pre .json-string {
  color: #b9fcb4;
}

pre .json-number {
  color: #ffd479;
}

pre .json-boolean {
  color: #ffb98a;
}

pre .json-null {
  color: #e39fff;
}

pre .log-meta {
  color: #d6dde0;
}

pre .diff-add {
  color: #baf5c4;
}

pre .diff-remove {
  color: #ffc1bc;
}

pre .diff-same {
  color: #dfe8eb;
}

.compare-logs-card {
  width: min(1200px, 96vw);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

#compareInputPanel {
  min-height: 280px;
  max-height: 340px;
}

#compareCurrentPanel,
#compareDiffPanel {
  min-height: 280px;
  max-height: 340px;
}

.runtime-credentials-panel summary,
.runtime-keys-panel summary {
  cursor: pointer;
}

.runtime-warning {
  margin: 0.35rem 0 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #f4c4ab;
  border-radius: 8px;
  background: #fff3ed;
  color: #8b3a12;
  font-size: 0.78rem;
  line-height: 1.3;
}

.runtime-storage-note {
  margin: -0.1rem 0 0.55rem;
  padding: 0.36rem 0.55rem;
  border: 1px solid #c9dadf;
  border-radius: 8px;
  background: #eef5f7;
  color: #1f3f40;
  font-size: 0.76rem;
  line-height: 1.3;
}

.runtime-credentials-grid,
.runtime-keys-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(260px, 1fr) minmax(190px, 0.82fr) minmax(190px, 0.82fr);
  gap: 0.55rem 0.75rem;
  margin-top: 0.15rem;
}

#runtime-credentials-section label,
#runtime-keys-section label {
  gap: 0.36rem;
  line-height: 1.25;
  min-width: 0;
}

#runtime-credentials-section input,
#runtime-keys-section input {
  height: 30px;
  padding: 0 0.58rem;
  font-size: 0.82rem;
}

.runtime-credentials-grid textarea.preview-editor,
.runtime-keys-grid textarea.preview-editor {
  min-height: 86px;
  max-height: 118px;
  font-size: 0.8rem;
  padding: 0.55rem 0.65rem;
}

.runtime-credentials-grid .key-material-field,
.runtime-keys-grid .key-material-field {
  grid-column: span 2;
}

#runtime-credentials-section .inline-actions,
#runtime-keys-section .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

#runtime-credentials-section .inline-actions button,
#runtime-keys-section .inline-actions button {
  min-height: 36px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 0.95rem;
  min-width: 104px;
}

#runtime-credentials-section .inline-actions button[data-status-text]::after,
#runtime-keys-section .inline-actions button[data-status-text]::after {
  margin-left: 0.4rem;
}

.runtime-feedback {
  margin-top: 0.45rem;
  border: 1px solid #d2dbde;
  border-radius: 8px;
  padding: 0.38rem 0.6rem;
  font-size: 0.79rem;
  line-height: 1.25;
}

.runtime-feedback.runtime-feedback-idle {
  background: #f4f7f8;
  color: #44565a;
  border-color: #c9d4d8;
}

.runtime-feedback.runtime-feedback-success {
  background: #e7f7ea;
  color: #135126;
  border-color: #8bcea1;
}

.runtime-feedback.runtime-feedback-error {
  background: #fde8e6;
  color: #8a1e15;
  border-color: #e3a5a0;
}

#runtimeCredentialsStatus {
  min-height: 84px;
  max-height: 220px;
  margin-top: 0.5rem;
}

@media (max-width: 1120px) {
  .backend-actions-row {
    grid-template-columns: 1fr;
  }

  .backend-buttons,
  .actions-col .vertical-buttons {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
}

.compact-docs .card {
  padding: 0.65rem;
}

.compact-docs h3 {
  margin-bottom: 0.3rem;
}

.compact-docs details {
  border: 1px solid #d4dddf;
  border-radius: 8px;
  padding: 0.38rem 0.5rem;
  margin-top: 0.4rem;
  background: #fbfdfd;
}

.compact-docs summary {
  cursor: pointer;
  font-weight: 700;
  color: #1e3032;
}

.compact-docs ul {
  margin: 0.35rem 0 0.05rem;
  padding-left: 1rem;
}

.compact-docs .inline-actions.wrap {
  flex-wrap: wrap;
}

#docQuickstartOutput,
#failureLabOutput {
  min-height: 150px;
  max-height: 280px;
  margin-top: 0.55rem;
}

.failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.backend-api pre {
  min-height: 180px;
  max-height: 340px;
  margin-top: 0.6rem;
}

.saved-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.saved-card-item {
  border: 1px solid #d1d6d9;
  border-radius: 10px;
  min-height: 64px;
  padding: 0.3rem;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.55rem;
  align-items: center;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.saved-card-item.selected {
  outline: 2px solid #111;
  outline-offset: 0;
}

.saved-card-number {
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 600;
}

.saved-card-tas {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0b5d5e;
}

.saved-card-art {
  width: 46px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
  background: #f2f3f5;
  border: 1px solid #d8dde1;
}

.saved-card-art.missing {
  background: repeating-linear-gradient(
    -45deg,
    #f0f1f3,
    #f0f1f3 6px,
    #e3e6ea 6px,
    #e3e6ea 12px
  );
}

.saved-card-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  color: var(--muted);
  background: #fafaf8;
}

#selectedSrcCard {
  margin-top: 0.35rem;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.passkey-docs-interactive {
  margin-bottom: 0.8rem;
  border-left: 4px solid var(--brand);
}

.passkey-docs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.passkey-docs-header h3 {
  margin: 0;
}

.passkey-docs-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.8rem;
  margin: 0.45rem 0 0.65rem;
}

.passkey-docs-kpis p {
  margin: 0;
}

.passkey-docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.passkey-docs-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

.passkey-docs-grid h4 {
  margin: 0 0 0.35rem;
}

.passkey-docs-grid ul {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.22rem;
}

.passkey-check-ok {
  color: var(--success);
}

.passkey-check-no {
  color: var(--error);
}

.passkey-check-pending {
  color: #825900;
}

#docsAssurancePreview {
  min-height: 120px;
  max-height: 230px;
  margin-top: 0.35rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
}

th {
  background: #f5f7f6;
}

#liveActionText {
  margin: 0.45rem 0 0;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
}

.docs-grid ul,
.docs-grid ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.25rem;
}

.lifecycle {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0.2rem 0.25rem 0.42rem;
  scroll-snap-type: x proximity;
}

.lifecycle .state {
  border: 1px solid #d3dcdd;
  border-radius: 12px;
  padding: 0.42rem 0.5rem 0.45rem;
  background: #fcfdfd;
  flex: 0 0 186px;
  min-width: 186px;
  scroll-snap-align: start;
  box-shadow: 0 1px 0 rgba(7, 43, 43, 0.04);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.lifecycle .state .state-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.16rem;
}

.lifecycle .state .state-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.lifecycle .state .state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #c8d5d7;
  background: #edf5f5;
  color: #0c5f61;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.lifecycle .state .state-status {
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.07rem 0.42rem;
  letter-spacing: 0.01em;
  min-width: 46px;
  text-align: center;
  white-space: nowrap;
  flex: 0 0 auto;
}

.lifecycle .state strong {
  font-size: 0.68rem;
  line-height: 1.1;
}

.lifecycle .state p {
  margin: 0;
  font-size: 0.64rem;
  line-height: 1.16;
  color: #4b5859;
  display: block;
  margin-top: 0.12rem;
}

.lifecycle .state.expanded p {
  margin-top: 0.15rem;
}

.lifecycle .state:hover {
  border-color: #b8c9cb;
}

.lifecycle .state.lifecycle-done {
  border-color: #9fd7af;
  background: #f1fbf4;
}

.lifecycle .state.lifecycle-done .state-status {
  color: #0f5f29;
  background: #dff5e5;
  border-color: #9fd7af;
}

.lifecycle .state.lifecycle-current {
  border-color: #538dcd;
  background: #f3f8ff;
  flex-basis: 204px;
  min-width: 204px;
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(21, 72, 145, 0.12);
}

.lifecycle .state.lifecycle-current .state-status {
  color: #164886;
  background: #e2edff;
  border-color: #538dcd;
}

.lifecycle .state.lifecycle-todo {
  border-color: #d3d8dd;
  background: #f8fafb;
}

.lifecycle .state.lifecycle-todo .state-status {
  color: #495466;
  background: #edf1f4;
  border-color: #d3d8dd;
}

#scenarioLegend {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.25rem;
}

.pill.success {
  border-color: #a4d8b3;
  color: var(--success);
}

.pill.error {
  border-color: #e8b2b2;
  color: var(--error);
}

.pill.blocked {
  border-color: #e8c992;
  color: var(--warn);
}

.request-preview-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
  margin-bottom: 0.7rem;
}

.preview-editor {
  width: 100%;
  min-height: 300px;
  max-height: 60vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  resize: vertical;
}

.modal-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 1120px) {
  .config-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .config-core-grid,
  .personal-grid,
  .inline-three,
  .inline-two {
    grid-template-columns: 1fr;
  }

  .config-card .controls,
  .config-card.config-core .controls,
  .config-card.config-personal .controls {
    grid-template-columns: 1fr;
  }

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

  .config-card,
  .config-card.config-core {
    min-width: 0;
  }

  .passkey-docs-kpis,
  .passkey-docs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .live-workbench {
    grid-template-columns: 1fr;
  }

  .logs-reqres,
  .logs-statusconfig {
    grid-template-columns: 1fr;
  }

  .new-card-form {
    grid-template-columns: 1fr;
  }

  .card-list-scroll {
    min-height: 320px;
    max-height: 320px;
  }

  .hero {
    padding-top: 0.8rem;
  }

  h1 {
    font-size: 1.4rem;
  }
}
