:root {
  --ink: #12161c;
  --panel: #1a2029;
  --panel-2: #202836;
  --line: #2b3341;
  --paper: #e9ecf1;
  --muted: #8a94a3;
  --pass: #4fb286;
  --warn: #d98e4a;
  --fail: #c1594b;
  --focus: #6f9bff;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

button, input, select, textarea { font-family: inherit; }

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

.app { min-height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.account-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account-status { color: var(--muted); font-size: 16px; white-space: nowrap; }
.btn-compact { padding: 7px 11px; font-size: 16px; }
.btn-link { background: transparent; border-color: transparent; color: var(--focus); padding-left: 0; padding-right: 0; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); }
.modal-panel { position: relative; width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.modal-panel h1 { margin: 0 36px 6px 0; font-size: 21px; }
#authModal .modal-panel { max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-close { position: absolute; right: 16px; top: 12px; background: transparent; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-message { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; color: var(--paper); font-size: 16px; line-height: 1.45; }
.auth-message.error { border-color: var(--fail); color: #f2b8b0; }
.auth-message.success { border-color: var(--pass); color: #a9ddc4; }
.auth-field-error { margin: 8px 0 0; color: #f2b8b0; font-size: 16px; line-height: 1.45; }
#authPasswordConfirm[aria-invalid="true"] { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail); }


.topbar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}
.topbar-mark {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pass);
  box-shadow: 0 0 0 3px rgba(79, 178, 134, 0.15);
}
.topbar-sub { color: var(--muted); font-size: 16px; }
.badge {
  margin-left: 0;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 3px 8px;
  border-radius: 999px;
}
.badge-hidden { display: none; }
.demo-select { margin-left: 8px; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 16px; }
.btn-demo { margin-left: 8px; padding: 7px 12px; font-size: 16px; background: transparent; color: var(--paper); border-color: var(--focus); }
.btn-demo:hover { background: rgba(111,155,255,.12); }
.btn-demo:disabled { opacity: .55; cursor: wait; }

.scale-validation {
  margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0;
}
.scale-validation-copy { display: flex; flex-direction: column; gap: 3px; min-width: 260px; }
.scale-validation-copy strong { font-size: 16px; letter-spacing: .02em; }
.scale-validation-copy span { color: var(--muted); font-size: 16px; line-height: 1.3; max-width: 360px; }
.scale-validation-controls { display: flex; align-items: flex-end; gap: 7px; flex-wrap: wrap; }
.scale-validation-controls label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 16px; text-transform: uppercase; letter-spacing: .05em; }
.scale-validation .demo-select { margin-left: 0; min-width: 92px; }
.scale-validation .btn-demo { margin-left: 0; }
@media (max-width: 1250px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .scale-validation { width: 100%; margin-left: 0; }
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 0;
}

.rail {
  border-right: 1px solid var(--line);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 16px;
}
.rail-item .num {
  font-family: var(--mono);
  font-size: 16px;
  width: 20px;
  text-align: right;
  color: var(--muted);
}
.rail-item.active { background: var(--panel); color: var(--paper); }
.rail-item.active .num { color: var(--focus); }
.rail-item.done { color: var(--paper); }
.rail-item.done .num { color: var(--pass); }

.stage {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  flex: 1;
}

.card h1 { font-size: 20px; margin: 0 0 6px; }
.card h2 { font-size: 17px; margin: 0 0 4px; }
.card p.lede { color: var(--muted); margin: 0 0 22px; font-size: 16px; line-height: 1.5; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 16px; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=url], .field input[type=email], .field input[type=password], .field select, .field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 16px;
}
.field textarea { font-family: var(--mono); font-size: 16px; min-height: 90px; resize: vertical; }
.field .hint { color: var(--muted); font-size: 16px; margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.choice-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.choice {
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 16px;
  cursor: pointer;
}
.choice.selected { border-color: var(--focus); background: rgba(111, 155, 255, 0.12); }

.btn {
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 600; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--paper); }
.btn-ghost:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-sm { padding: 7px 12px; font-size: 16px; }

.stage-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 16px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.status-pill.PASS { color: var(--pass); border-color: var(--pass); }
.status-pill.FAIL { color: var(--fail); border-color: var(--fail); }
.status-pill.SKIPPED, .status-pill.PENDING { color: var(--warn); border-color: var(--warn); }

.check-list { margin: 14px 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 16px; }
.check-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: none; }

.probe-box {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
}

.mono-cmd {
  font-family: var(--mono);
  font-size: 16px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
}

.review-block { margin-bottom: 16px; }
.review-block h3 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; font-size: 16px; gap: 4px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }

.json-preview {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  max-height: 420px;
  overflow: auto;
  white-space: pre;
  color: var(--paper);
}

.ledger {
  border-left: 1px solid var(--line);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ledger-head {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ledger-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ledger-empty { color: var(--muted); font-size: 16px; line-height: 1.5; }
.ledger-entry {
  font-family: var(--mono);
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--panel-2);
  animation: entry-in 220ms ease-out;
}
@keyframes entry-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ledger-entry .row1 { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ledger-entry .step-name { color: var(--paper); }
.ledger-entry .hash { color: var(--muted); word-break: break-all; }
.ledger-entry.PASS { border-left: 3px solid var(--pass); }
.ledger-entry.FAIL { border-left: 3px solid var(--fail); }
.ledger-entry.SKIPPED { border-left: 3px solid var(--warn); }
.ledger-entry.INFO { border-left: 3px solid var(--focus); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .rail { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .ledger { border-left: none; border-top: 1px solid var(--line); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Authentication success notification */
.aevyra-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(560px, calc(100vw - 32px));
  padding: 14px 16px;
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--pass);
  border-left: 4px solid var(--pass);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
}

.aevyra-toast::before,
.auth-message.success::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 11px;
  flex: 0 0 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  color: var(--pass);
}
.auth-message.success::before { margin: 0 12px 2px 3px; vertical-align: middle; }

.aevyra-toast-message {
  flex: 1;
  line-height: 1.45;
}

.aevyra-toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
}

.aevyra-toast-close:hover,
.aevyra-toast-close:focus-visible {
  color: var(--paper);
  background: var(--panel-2);
  outline: none;
}

@media (max-width: 600px) {
  .aevyra-toast {
    top: 12px;
  }
}

/* Guided Enterprise SSO setup */
#ssoSetupModal .modal-panel {
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
}

#ssoSetupContent h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.sso-domain-verified {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--pass);
  border-radius: 8px;
  font-size: 16px;
}

.aevyra-checkmark,
.sso-domain-verified-mark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  vertical-align: middle;
  color: var(--pass);
}
.aevyra-checkmark::before,
.sso-domain-verified-mark::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sso-setup-lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.sso-setup-step {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
}

.sso-step-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
}

.sso-step-number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--focus);
  font-family: var(--mono);
  font-size: 16px;
}

.sso-step-header h3 {
  margin: 1px 0 3px;
  font-size: 16px;
}

.sso-step-header .hint {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.sso-copy-field + .sso-copy-field {
  margin-top: 12px;
}

.sso-value-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 16px;
}

.sso-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.sso-copy-value {
  display: block;
  min-width: 0;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.45;
  user-select: all;
}

.sso-copy-button {
  align-self: stretch;
  min-width: 64px;
}

.sso-setup-step .field:last-child {
  margin-bottom: 0;
}

.sso-setup-feedback {
  min-height: 18px;
  margin: 0 0 10px;
}

.sso-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 560px) {
  #ssoSetupModal .modal-panel {
    padding: 22px 18px;
  }

  .sso-copy-row {
    grid-template-columns: 1fr;
  }

  .sso-copy-button {
    justify-self: start;
  }
}

/* Five-offer plan chooser */
.plan-selector .modal-panel {
  box-sizing: border-box;
  width: min(840px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
.plan-selector h2 { margin: 0 0 8px; font-size: 16px; }
.plan-selector .lede { margin-bottom: 18px; }
.plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.plan-summary p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.plan-summary > div { min-width: 0; }
.plan-summary > .btn { flex-shrink: 0; text-decoration: none; text-align: center; white-space: normal; }
.plan-price-inline { margin-left: 8px; color: var(--muted); font-size: 16px; font-weight: normal; }
.plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.plan-option { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.plan-price { margin: 4px 0 12px; font-size: 23px; color: var(--paper); }
.plan-allowance { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.plan-option .btn { width: 100%; }
.plan-email { display: inline-block; margin-top: 8px; color: var(--focus); font-size: 16px; overflow-wrap: anywhere; }
.plan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.plan-actions .hint { margin-left: auto; }
.plan-selector button:disabled { cursor: default; opacity: .55; }
@media (max-width: 680px) {
  .plan-options { grid-template-columns: 1fr; }
  .plan-summary { align-items: stretch; flex-direction: column; gap: 12px; }
  .plan-selector .modal-panel { padding: 22px 18px; }
  .plan-actions .hint { width: 100%; margin-left: 0; }
}

/* Evidence collection progress */
.collection-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; padding: 16px; margin: 18px 0; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.collection-progress dt { color: var(--muted); }
.collection-progress dd { margin: 0; text-align: right; color: var(--paper); }
.collection-progress>dl { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 20px; grid-column:1/-1; margin:0; align-items:baseline; }
.collection-progress>dl>* { min-width:0; overflow-wrap:anywhere; }

/* AEVYRA-GUIDES-START */
#aevyraDocumentationFooter{padding:24px 20px;color:#aab8cc}
#aevyraDocumentationFooter nav{display:flex;flex-wrap:wrap;
justify-content:center;align-items:center;gap:12px 24px}
#aevyraDocumentationFooter a{color:#9dc8ff;text-underline-offset:4px}
#aevyraDocumentationFooter a:focus-visible{outline:2px solid currentColor;outline-offset:5px}
#aevyraDocumentationFooter .aevyra-copyright{
text-align:center;font-size:16px;line-height:1.6;margin:14px auto 0}
/* AEVYRA-GUIDES-END */

/* AEVYRA-BILLING-TERMS-START */
.billing-terms{padding:16px;margin:16px 0;border:1px solid var(--line);border-radius:10px;background:var(--panel,#111b2d)}
.billing-terms p{margin:0 0 12px;font-size:16px;line-height:1.6;color:var(--muted,#aab8cc)}
.billing-terms-label{display:flex;align-items:flex-start;gap:12px;line-height:1.6;font-size:16px;cursor:pointer}
.billing-terms-label input[type="checkbox"]{flex:0 0 auto;width:20px;height:20px;margin:3px 0 0;accent-color:var(--focus,#9dc8ff)}
.billing-terms-label a{color:var(--focus,#9dc8ff);text-decoration:underline;text-underline-offset:3px}
.billing-terms input:focus-visible,.billing-terms a:focus-visible{outline:2px solid var(--focus,#9dc8ff);outline-offset:4px}
.billing-terms .billing-terms-version{margin:12px 0 0;font-size:16px}
/* AEVYRA-BILLING-TERMS-END */

/* AEVYRA-RESPONSIVE-LAYOUT-START */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-wrap:anywhere}
.app,.layout,.layout>*,.card,.field,.probe-box,.review-block,.modal-panel,
.grid-2>*,.topbar>*,.scale-validation>*,.scale-validation-controls>*,
.check-list li>*,.kv>*,.ledger-entry .row1>*,.sso-step-header>*,
.sso-domain-verified>*,.billing-terms-label>*,.plan-option,
.collection-progress>*{min-width:0;max-width:100%}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.kv{grid-template-columns:minmax(0,140px) minmax(0,1fr)}
.scale-validation-copy{min-width:0;flex:1 1 260px}
.scale-validation{flex-wrap:wrap}
.scale-validation-controls{min-width:0;max-width:100%}
.account-controls{flex-wrap:wrap;max-width:100%}
.account-status{white-space:normal;overflow-wrap:anywhere}
.topbar-mark{flex-shrink:0}.topbar-dot{flex:0 0 8px}
.check-list li,.stage-actions,.ledger-head,.ledger-entry .row1,
.sso-domain-verified{flex-wrap:wrap;gap:8px}
.stage-actions{align-items:center}
button,input,select,textarea{max-width:100%;min-width:0}
button,.btn,.choice,.badge,.status-pill{white-space:normal;overflow-wrap:anywhere}
input[type=checkbox],input[type=radio]{flex-shrink:0}
.status-pill{max-width:100%}
.json-preview,.mono-cmd,pre{width:100%;min-width:0;max-width:100%;overscroll-behavior-x:contain}
.collection-progress{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.modal{overflow-y:auto;padding:20px;padding-top:max(20px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}
.modal-panel,#authModal .modal-panel,#ssoSetupModal .modal-panel,.plan-selector .modal-panel{
  max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior-y:contain}
img,video,canvas{max-width:100%;height:auto}
@media(max-width:980px){
  .layout{grid-template-columns:minmax(0,1fr)}
  .grid-2{grid-template-columns:minmax(0,1fr)}
  .rail{max-width:100%;overscroll-behavior-x:contain}
  .rail-item{flex-shrink:0}
}
@media(max-width:600px){
  .topbar{padding:16px;gap:10px}
  .topbar-sub{flex:1 1 10rem}
  .account-controls{width:100%;margin-left:0}
  .account-status{flex:1 1 100%}
  .scale-validation{gap:12px}.scale-validation-copy{flex-basis:100%}
  .scale-validation-controls{width:100%;align-items:stretch}
  .scale-validation-controls label{flex:1 1 100%}
  .scale-validation .demo-select{width:100%;min-width:0}
  .scale-validation .btn-demo{flex:1 1 100%}
  .stage,.ledger{padding:18px 14px}
  .card{padding:18px}.rail{padding:12px 14px}
  .card h1,.modal-panel h1{font-size:clamp(1.15rem,5vw,1.35rem);line-height:1.3}
  .field input[type=text],.field input[type=url],.field input[type=email],
  .field input[type=password],.field select,.field textarea,.demo-select{font-size:16px}
  .stage-actions>.btn{flex:1 1 8rem}
  .kv{grid-template-columns:minmax(0,1fr);gap:4px}
  .kv div:nth-child(even){margin-bottom:10px}
  .collection-progress{grid-template-columns:minmax(0,1fr);gap:5px;padding:12px}
  .collection-progress dd{text-align:left;margin-bottom:10px}
  .modal{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .modal-panel,#authModal .modal-panel,#ssoSetupModal .modal-panel,.plan-selector .modal-panel{
    padding:22px 16px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .aevyra-toast{align-items:flex-start;gap:12px}.aevyra-toast-message{min-width:0}
}
/* AEVYRA-RESPONSIVE-LAYOUT-END */

/* Combined hosted assessment: usable on narrow screens. */
.assessment-actions {display:flex;gap:12px;flex-wrap:wrap;margin:20px 0;min-width:0}
.assessment-actions .btn {max-width:100%;white-space:normal;overflow-wrap:anywhere}
.assessment-scope label {display:block;margin:14px 0;overflow-wrap:anywhere}
.report-context input {max-width:100%;box-sizing:border-box}
.report-context summary {cursor:pointer;font-weight:600}
.posture-report-frame {display:block;width:100%;max-width:100%;height:80vh;min-height:480px;border:1px solid var(--line,#334155);border-radius:12px;box-sizing:border-box;background:white}
@media(max-width:480px) {.assessment-actions .btn {width:100%}.posture-report-frame{min-height:360px;height:75vh}.report-context {padding:14px}}

.hosted-assessment .ledger {display:none}
.customer-assessment .scale-validation {display:none}
.hosted-assessment .layout {grid-template-columns:200px minmax(0,1fr)}
@media(max-width:1000px){.hosted-assessment .layout{grid-template-columns:minmax(0,1fr)}}

.cloud-connections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;margin:18px 0}
.cloud-connections>.review-block{margin:0;min-width:0;max-width:100%;overflow-wrap:anywhere}
.cloud-connections input{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.cloud-connections button{max-width:100%;white-space:normal}
@media(max-width:760px){.cloud-connections{grid-template-columns:minmax(0,1fr)}}

/* Keep the single report action in reach on narrow screens. */
.connection-choice { display:flex; align-items:flex-start; gap:.6rem; margin:1rem 0; overflow-wrap:anywhere; }
.connection-choice input { flex:0 0 auto; width:auto; margin-top:.2rem; }
.connection-help { margin-top:.8rem; }
.assessment-launch { position:sticky; bottom:0; z-index:3; box-sizing:border-box; width:100%; max-width:100%;
  margin-top:1rem; padding:1rem; padding-bottom:max(1rem,env(safe-area-inset-bottom));
  border:1px solid var(--line, #334155); border-radius:12px; background:var(--panel, #0f172a); overflow-wrap:anywhere; }
.assessment-launch .btn { max-width:100%; white-space:normal; }
.assessment-launch .hint { margin:.35rem 0; }
@media (max-width:600px) { .assessment-launch .btn { width:100%; } .assessment-launch { padding:.8rem; } }

/* Readable text and touch targets at every screen size. */
body{font-size:16px;line-height:1.55}
.card h1,.modal-panel h1{font-size:clamp(26px,3vw,32px);line-height:1.25}
.card h2{font-size:23px;line-height:1.3}.card h3{font-size:19px;line-height:1.4}
.card p.lede,.field label,label,.field input,.field select,.field textarea,button,.btn,.choice,.rail-item,.plan-allowance,.plan-summary p,.billing-terms p{font-size:16px;line-height:1.5}
input,select,textarea,button,.btn,.choice{max-width:100%;min-width:0}
button,.btn,.choice,input:not([type=checkbox]):not([type=radio]),select{min-height:44px}
.hint,.field .hint,.small,small,.account-status,.auth-message,.auth-field-error,.ledger-empty,.ledger-hint,.ledger-entry,.ledger-entry .hash,.badge,.plan-email,.plan-price-inline,.billing-terms .billing-terms-version,.aevyra-copyright{font-size:14px;line-height:1.5}
.rail-item .num{font-size:14px;flex:0 0 24px;width:24px;white-space:nowrap}
.topbar .account-status{white-space:normal}.account-controls{flex-wrap:wrap}
#stepCard p:not(.small):not(.hint):not(.lede){line-height:1.6}
#aevyraDocumentationFooter nav,#aevyraDocumentationFooter p{font-size:14px;line-height:1.6}
@media(max-width:600px){.card h1,.modal-panel h1{font-size:26px}.card h2{font-size:22px}.card h3{font-size:18px}.modal-panel{padding:22px 18px}.scope-toggle,.toolbar{flex-wrap:wrap}}
input,select,textarea{font-size:16px;line-height:1.5}
.app label,#stepCard label,.modal-panel label{font-size:16px;line-height:1.5}
