:root {
  --paper:#f6f7f3;
  --white:#fff;
  --ink:#183530;
  --muted:#6a7973;
  --line:#dee5df;
  --green:#1e6657;
  --green-dark:#174d42;
  --mint:#eaf4eb;
  --gold:#a27728;
  --gold-bg:#fbf2df;
  --red:#a04438;
  --radius:14px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"SFMono-Regular",Consolas,monospace;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:14px/1.5 var(--font);
  -webkit-font-smoothing:antialiased;
}

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

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}

button {
  cursor:pointer;
}

button:disabled,input:disabled,textarea:disabled {
  cursor:not-allowed;
  opacity:.55;
}

button,a,input,select,textarea {
  outline-offset:4px;
}

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

[hidden] {
  display:none!important;
}

a {
  color:inherit;
}

button {
  transition:background .15s ease,box-shadow .15s ease;
}

h1,h2,h3,p {
  margin:0;
}

h2 {
  font-size:16px;
  font-weight:650;
}

h3 {
  font-size:13px;
  font-weight:650;
}

.app-shell {
  max-width:1600px;
  margin:auto;
}

.header {
  height:82px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 42px;
  background:var(--white);
  border-bottom:1px solid var(--line);
}

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

.logo-mark {
  width:38px;
  height:42px;
  color:var(--green);
}

.logo-mark svg {
  width:100%;
  height:100%;
}

.brand-name {
  display:flex;
  align-items:center;
  font-size:31px;
  letter-spacing:-1.3px;
  font-weight:700;
}

.brand-divider {
  height:25px;
  width:1px;
  background:var(--line);
  margin:0 20px;
}

.brand-subtitle {
  font-size:13px;
  font-weight:500;
  letter-spacing:0;
  color:var(--muted);
}

.header-actions {
  display:flex;
  align-items:center;
  gap:10px;
}

.btn {
  min-height:38px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:7px;
  padding:8px 14px;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}

.btn-primary {
  background:var(--green);
  color:white;
}

.btn-primary:hover:not(:disabled) {
  background:var(--green-dark);
  box-shadow:0 2px 7px #143d3920;
}

.btn-secondary {
  background:white;
  border-color:var(--line);
  color:var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background:var(--paper);
}

.engine-badge {
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 10px;
  font-size:11px;
  color:var(--muted);
  margin-right:4px;
}

.status-dot,.live-dot {
  height:6px;
  width:6px;
  display:inline-block;
  border-radius:50%;
  background:#80a292;
  flex-shrink:0;
}

.engine-badge.live {
  color:var(--green);
}

.engine-badge.live .status-dot {
  background:var(--green);
}

.engine-badge.fallback {
  color:var(--gold);
}

.engine-badge.fallback .status-dot {
  background:var(--gold);
}

main {
  padding:30px 42px 0;
}

.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:28px;
}

.eyebrow {
  font-size:9px;
  font-weight:750;
  letter-spacing:1.35px;
  color:var(--muted);
}

h1 {
  font-size:32px;
  line-height:1.3;
  letter-spacing:-1px;
  font-weight:620;
  margin:7px 0;
}

.page-description {
  font-size:13px;
  color:var(--muted);
}

.sandbox-note {
  text-align:right;
  padding-bottom:4px;
}

.sandbox-pill {
  display:inline-block;
  border:1px solid #c8d5c9;
  border-radius:4px;
  padding:4px 7px;
  font-size:9px;
  letter-spacing:1px;
  color:#5c735f;
  font-weight:650;
}

.sandbox-note p {
  font-size:10px;
  color:var(--muted);
  margin-top:8px;
}

.stepper {
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line);
  border-radius:10px;
  background:white;
  margin:0 0 24px;
  overflow:hidden;
}

.step-item {
  position:relative;
  display:flex;
  align-items:center;
  gap:11px;
  padding:18px 17px 32px;
  border-right:1px solid var(--line);
  color:#839088;
}

.step-item:last-child {
  border:0;
}

.step-number {
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:8px;
  font:11px var(--mono);
  color:#8b968f;
  flex-shrink:0;
}

.step-name,.step-code {
  display:block;
}

.step-name {
  font-size:12px;
  font-weight:650;
}

.step-code {
  font:9px var(--mono);
  margin-top:2px;
  letter-spacing:.3px;
}

/* Customer view: one next step at a time; technical evidence is opt-in. */
.stepper .step-code,.stepper .step-type {display:none}
.stepper .step-item {padding-top:16px;padding-bottom:16px}
.customer-options {padding:14px 24px;border-top:1px solid var(--line);background:#f7faf7;flex-shrink:0}
.customer-options > p {font-size:12px;font-weight:600;margin:0 0 10px}
.customer-options .chip {min-height:40px;font-size:12px;white-space:normal;text-align:left}
.support-tools {display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}
.support-tools .text-button {font-size:12px;min-height:36px}
.scenario-tray > summary {cursor:pointer;font-size:12px;color:var(--muted)}
.scenario-tray[open] .scenario-chips {margin-top:12px}
.msg-text p {margin:0 0 12px;white-space:pre-wrap}
.msg-text p:last-child {margin-bottom:0}
#verification-modal {width:min(620px,calc(100vw - 28px));max-height:90dvh;overflow-y:auto}
#verification-modal .security-card {padding:0;border:0;box-shadow:none;animation:none}
#verification-modal input,#verification-modal select {min-height:44px;font-size:16px;min-width:0;width:100%}
#verification-modal .security-card-field label {font-size:12px;text-transform:none;letter-spacing:0}
.id-input-wrapper {display:flex;gap:8px}
.id-input-wrapper select {flex:1.2}
.id-input-wrapper input {flex:1}
.demo-tools-tray {padding:12px;border:1px dashed var(--line);border-radius:8px;margin-top:12px}
.demo-tools-tray summary {cursor:pointer;font-size:12px}
.demo-tools-tray[open] .experiment-preset-chips {margin-top:10px}
.field-error {color:#9b342d;font-size:12px;line-height:1.5}
[aria-invalid="true"] {border-color:#9b342d!important}
#card-feedback {line-height:1.6;font-size:13px}
@media(max-width:768px) {
  .customer-options {padding:12px 16px}
  .customer-options .scenario-chips {display:grid;grid-template-columns:1fr 1fr}
  .support-tools {gap:6px 12px}
  .support-tools .btn {width:100%}
  #verification-modal .security-card-grid {grid-template-columns:1fr}
}

.step-type {
  position:absolute;
  bottom:12px;
  left:59px;
  font-size:9px;
  color:#8b968f;
}

.step-item.active {
  background:var(--mint);
  color:var(--green);
  box-shadow:inset 0 -3px var(--green);
}

.step-item.active .step-number {
  background:var(--green);
  border-color:var(--green);
  color:white;
}

.step-item.active .step-type {
  color:var(--green);
}

.step-item.completed {
  color:var(--green);
}

.step-item.completed .step-number {
  background:var(--mint);
  color:var(--green);
  border-color:#c4ddc9;
}

.step-item.halted {
  background:var(--gold-bg);
  box-shadow:inset 0 -3px var(--gold);
}

.main-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 345px;
  gap:22px;
  align-items:start;
}

.conversation-panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:670px;
  height:calc(100vh - 390px);
  max-height:980px;
}

.panel-heading {
  height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 23px;
  border-bottom:1px solid var(--line);
  flex-shrink:0;
}

.panel-title {
  display:flex;
  align-items:center;
  gap:9px;
}

.live-dot {
  background:var(--green);
  box-shadow:0 0 0 4px var(--mint);
}

.quiet-label {
  font-size:10px;
  color:var(--muted);
}

.scenario-tray {
  padding:17px 22px 15px;
  border-bottom:1px solid var(--line);
  background:#fdfdfb;
}

.scenario-chips {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:9px;
}

.chip {
  background:#fff;
  border:1px solid var(--line);
  padding:6px 9px;
  border-radius:5px;
  font-size:10px;
  color:#52665b;
}

.chip:hover:not(:disabled) {
  background:var(--mint);
  border-color:#b9d3bf;
}

.chip.featured {
  background:var(--mint);
  color:var(--green);
  border-color:#d2e4d5;
}

.chip.featured span {
  margin-left:6px;
}

.scenario-hint {
  font-size:9px;
  margin-top:8px;
  color:var(--muted);
}

.chat-window {
  flex:1;
  min-height:300px;
  overflow-y:auto;
  padding:25px 23px;
  scroll-behavior:smooth;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.chat-msg {
  display:flex;
  gap:10px;
  align-items:flex-start;
  max-width:91%;
}

.chat-msg.user {
  align-self:flex-end;
  flex-direction:row-reverse;
  max-width:86%;
}

.msg-avatar {
  width:29px;
  height:29px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--mint);
  border:1px solid #d8e9db;
  border-radius:8px;
  color:var(--green);
  font-size:13px;
  font-weight:650;
  margin-top:2px;
}

.user .msg-avatar {
  display:none;
}

.system .msg-avatar {
  background:var(--gold-bg);
  color:var(--gold);
  border-color:#eedcbd;
}

.msg-bubble {
  min-width:0;
}

.msg-meta {
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  margin:2px 0 6px;
}

.msg-sender {
  font-size:10px;
  font-weight:650;
  color:var(--ink);
}

.msg-phase {
  font:8px var(--mono);
  color:#7a8980;
  letter-spacing:.2px;
}

.msg-text {
  font-size:12px;
  line-height:1.8;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#40564a;
}

.user .msg-bubble {
  background:#eef3ed;
  border:1px solid #e0e8dd;
  border-radius:11px 3px 11px 11px;
  padding:11px 15px;
}

.user .msg-meta {
  margin-top:0;
}

.system .msg-text {
  color:#805d24;
}

.typing .msg-text {
  color:var(--muted);
  font-style:italic;
}

.input-container {
  padding:17px 21px 14px;
  border-top:1px solid var(--line);
  background:#fff;
}

.input-container form {
  position:relative;
  border:1px solid #cedbd0;
  border-radius:9px;
  background:#fafbf8;
  display:flex;
  align-items:flex-end;
  padding:10px;
  gap:10px;
}

.input-container form:focus-within {
  border-color:var(--green);
  box-shadow:0 0 0 2px #1e665710;
}

textarea {
  resize:vertical;
  min-height:43px;
  max-height:145px;
  flex:1;
  min-width:0;
  border:0;
  background:transparent;
  color:var(--ink);
  outline:none;
  padding:3px;
  font-size:12px;
}

textarea:focus-visible {
  outline:0;
}

textarea::placeholder {
  color:#8a958e;
}

.send-button {
  width:34px;
  height:34px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:7px;
  background:var(--green);
  color:white;
}

.send-button:hover:not(:disabled) {
  background:var(--green-dark);
}

.input-footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#839087;
  font-size:9px;
  margin-top:9px;
}

.quick-actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:12px 22px;
  border-top:1px solid var(--line);
  font-size:11px;
  color:var(--muted);
  background:#fcfdfb;
}

.consent-actions {
  background:var(--mint);
}

.quick-actions .btn {
  font-size:10px;
  min-height:31px;
  padding:5px 10px;
}

.replay-notice {
  background:var(--gold-bg);
  color:#805d24;
  padding:10px 22px;
  font-size:11px;
}

.inspector-panel {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.inspector-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 1px 1px;
  padding-top:1px;
}

.inspector-heading h2 {
  margin-top:4px;
  font-size:15px;
}

.tag {
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  border:1px solid var(--line);
  border-radius:4px;
  padding:3px 6px;
  background:#fafbf8;
  font-size:8px;
  font-weight:650;
  letter-spacing:.35px;
  color:var(--muted);
}

.tag.pending {
  background:var(--gold-bg);
  color:#926e29;
  border-color:#efdfbc;
}

.tag.verified {
  background:var(--mint);
  color:var(--green);
  border-color:#d3e5d6;
}

.inspector-card {
  border:1px solid var(--line);
  border-radius:10px;
  background:white;
  padding:16px;
}

.card-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:13px;
}

.progress-track {
  height:4px;
  border-radius:4px;
  background:#e9eee8;
  overflow:hidden;
  margin-bottom:14px;
}

.progress-track>div {
  height:100%;
  width:0;
  background:var(--green);
  transition:width .25s ease;
}

.pii-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 12px;
}

.pii-item {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  color:#88958c;
}

.pii-icon {
  font-size:13px;
  line-height:1;
}

.pii-item.verified {
  color:var(--green);
}

.pii-item.collected {
  color:var(--gold);
}

.card-note {
  font-size:10px;
  line-height:1.65;
  color:var(--muted);
  margin-top:12px;
}

.shield-status {
  border-top:1px solid var(--line);
  padding-top:11px;
  margin-top:12px;
  color:var(--gold);
  font-size:10px;
}

.shield-status.verified {
  color:var(--green);
}

.small-mark {
  color:var(--green);
  font-size:17px;
}

.memory-chips {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.memory-pill {
  display:inline-block;
  font-size:10px;
  padding:4px 7px;
  border-radius:5px;
  color:var(--green);
  background:var(--mint);
  border:1px solid #dce9dc;
}

.placeholder {
  font-size:11px;
  line-height:1.7;
  color:#829087;
}

.locked-placeholder {
  display:flex;
  gap:12px;
  padding:5px 0;
  align-items:center;
}

.lock-icon {
  width:32px;
  height:35px;
  color:#9caca0;
  flex-shrink:0;
}

.claim-record {
  margin:0;
}

.claim-row {
  display:grid;
  grid-template-columns:85px minmax(0,1fr);
  gap:12px;
  font-size:10px;
  padding:7px 0;
  border-bottom:1px solid #eef1eb;
  align-items:baseline;
}

.claim-row:last-child {
  border-bottom:0;
}

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

.claim-row dd {
  margin:0;
  color:var(--ink);
  text-align:right;
  overflow-wrap:anywhere;
}

.claim-note {
  background:#f6f7f2;
  border-radius:5px;
  padding:10px;
  margin-top:10px;
  font-size:10px;
  line-height:1.65;
  color:#5e6f60;
  white-space:pre-wrap;
}

.summary-text {
  font-size:10px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#526659;
}

.trace-stream {
  max-height:225px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:11px;
}

.trace-entry {
  padding-left:11px;
  position:relative;
  border-left:1px solid #dce5db;
}

.trace-entry:before {
  content:"";
  position:absolute;
  width:5px;
  height:5px;
  background:var(--green);
  border-radius:50%;
  left:-3px;
  top:5px;
}

.trace-entry.failed:before {
  background:var(--gold);
}

.trace-top {
  display:flex;
  justify-content:space-between;
  gap:5px;
  align-items:baseline;
}

.trace-gate {
  font:9px var(--mono);
  color:#4d6958;
  overflow-wrap:anywhere;
}

.trace-time {
  font-size:8px;
  color:#93a094;
  flex-shrink:0;
}

.trace-detail {
  font-size:9px;
  line-height:1.6;
  color:#7c8a7e;
  margin-top:3px;
  overflow-wrap:anywhere;
}

.phase-route {
  font:8px var(--mono);
  margin-top:4px;
  color:#57795f;
}

.replay-bar {
  margin-top:18px;
  padding:13px 17px;
  background:#ebefe7;
  border:1px solid #dce3d6;
  border-radius:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  font-size:11px;
}

.replay-bar>div {
  display:flex;
  align-items:center;
  gap:11px;
}

.replay-bar strong {
  font-size:10px;
  font-weight:600;
}

.replay-icon {
  font-size:17px;
  color:#668063;
}

.replay-controls label {
  font:9px var(--mono);
  color:#667b65;
  white-space:nowrap;
}

.replay-controls input {
  accent-color:var(--green);
  width:130px;
  cursor:pointer;
}

.text-button {
  background:none;
  border:none;
  color:var(--green);
  padding:3px;
  font-size:10px;
  font-weight:600;
}

.page-footer {
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin:19px 0 20px;
  font-size:9px;
  color:#8a958b;
}

.page-footer>span:first-child {
  letter-spacing:1px;
  font-weight:600;
}

.service-notice {
  background:var(--gold-bg);
  border:1px solid #e9d8b4;
  border-radius:7px;
  color:#805d24;
  font-size:11px;
  padding:11px 14px;
  margin-bottom:16px;
}

dialog {
  width:min(475px,calc(100vw - 28px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  border:1px solid var(--line);
  border-radius:15px;
  padding:26px;
  color:var(--ink);
  background:white;
  box-shadow:0 24px 90px #163a392d;
}

dialog::backdrop {
  background:#102b2966;
  backdrop-filter:blur(4px);
}

.modal-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

.modal-heading h2 {
  font-size:23px;
  margin-top:5px;
  letter-spacing:-.5px;
}

.close-button {
  width:28px;
  height:28px;
  background:var(--paper);
  border:0;
  border-radius:5px;
  font-size:22px;
  color:var(--muted);
  line-height:1;
}

.modal-description {
  font-size:12px;
  color:var(--muted);
  margin:15px 0 20px;
}

#config-form label {
  display:block;
  font-size:11px;
  font-weight:600;
  margin:16px 0 6px;
}

#config-form input,#config-form select {
  display:block;
  width:100%;
  padding:10px 11px;
  border:1px solid #cedbd0;
  border-radius:6px;
  background:#fafbf8;
  color:var(--ink);
  font-size:12px;
}

.field-help {
  font-size:10px;
  color:var(--muted);
  line-height:1.6;
  margin-top:7px;
}

.modal-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:23px;
  padding-top:17px;
  border-top:1px solid var(--line);
}

.form-error {
  font-size:11px;
  color:var(--red);
  padding:10px;
  background:#f9efec;
  margin-top:16px;
  border-radius:5px;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.skip-link {
  position:absolute;
  top:-50px;
  left:10px;
  z-index:20;
  background:var(--green);
  color:white;
  padding:10px;
  border-radius:5px;
}

.skip-link:focus {
  top:10px;
}

@media(min-width:1400px) {
  .main-layout {
    grid-template-columns:minmax(0,1fr) 370px;
  }
  .chat-msg {
    max-width:82%;
  }
  .chat-window {
    padding:30px;
  }
  .msg-text {
    font-size:13px;
  }
  .conversation-panel {
    min-height:760px;
  }
  .step-name {
    font-size:13px;
  }
}

@media(max-width:1120px) {
  .header {
    padding:0 25px;
  }
  .brand-subtitle,.brand-divider {
    display:none;
  }
  main {
    padding:25px 25px 0;
  }
  .main-layout {
    grid-template-columns:minmax(0,1fr) 310px;
    gap:16px;
  }
  .step-item {
    padding-left:12px;
    padding-right:10px;
    gap:8px;
  }
  .step-name {
    font-size:10px;
  }
  .step-type {
    left:50px;
    font-size:8px;
  }
  .keyboard-hint {
    display:none;
  }
  .conversation-panel {
    min-height:735px;
  }
}

@media(max-width:850px) {
  .header {
    padding:0 20px;
    height:72px;
  }
  .engine-badge {
    font-size:10px;
    padding:5px;
  }
  .header-actions {
    gap:6px;
  }
  .header-actions .btn {
    padding:7px 10px;
    font-size:11px;
  }
  main {
    padding:24px 20px 0;
  }
  .sandbox-note {
    display:none;
  }
  h1 {
    font-size:28px;
  }
  .stepper {
    grid-template-columns:repeat(2,1fr);
  }
  .step-item:nth-child(2) {
    border-right:0;
  }
  .step-item:nth-child(-n+2) {
    border-bottom:1px solid var(--line);
  }
  .step-name {
    font-size:12px;
  }
  .step-type {
    left:50px;
  }
  .main-layout {
    grid-template-columns:1fr;
  }
  .conversation-panel {
    height:640px;
    min-height:580px;
  }
  .inspector-panel {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
  .inspector-heading {
    grid-column:1/-1;
    margin:8px 0;
  }
  .inspector-card {
    height:100%;
  }
  .audit-card {
    grid-column:1/-1;
  }
  .trace-stream {
    max-height:200px;
  }
  .replay-bar {
    position:sticky;
    bottom:0;
    z-index:5;
    box-shadow:0 -5px 15px #102b2908;
  }
  .page-footer {
    margin-bottom:15px;
  }
  .replay-bar>.replay-controls {
    gap:7px;
  }
  .replay-bar>div>.quiet-label {
    display:none;
  }
}

@media(max-width:768px) {
  .header {
    height:auto;
    min-height:60px;
    padding:10px 16px;
    flex-wrap:wrap;
    gap:8px;
  }
  .brand-divider {
    margin:0 10px;
  }
  .header-actions {
    flex-wrap:wrap;
    gap:6px;
  }
  .header-actions .btn {
    padding:5px 9px;
    font-size:11px;
    min-height:32px;
  }
}

@media(max-width:520px) {
  html, body, .app-shell {
    max-width:100vw;
    overflow-x:hidden;
  }
  .header {
    padding:8px 12px;
  }
  .brand-subtitle,.brand-divider {
    display:none;
  }
  .brand-name {
    font-size:24px;
  }
  .logo-mark {
    width:26px;
    height:30px;
  }
  .brand {
    gap:6px;
  }
  .header-actions {
    width:100%;
    justify-content:space-between;
    gap:5px;
  }
  .header-actions .btn {
    font-size:10.5px;
    padding:5px 6px;
    min-height:32px;
    flex:1 1 auto;
    justify-content:center;
  }
  .header-actions .engine-badge {
    display:none;
  }
  .page-heading {
    margin-bottom:20px;
  }
  .page-description {
    font-size:11px;
  }
  h1 {
    font-size:25px;
  }
  .eyebrow {
    font-size:8px;
  }
  main {
    padding:20px 13px 0;
  }
  .stepper {
    margin-bottom:16px;
  }
  .step-name {
    font-size:10px;
  }
  .step-code {
    font-size:8px;
  }
  .step-item {
    padding:13px 9px 29px;
    gap:7px;
  }
  .step-number {
    width:26px;
    height:28px;
    font-size:10px;
  }
  .step-type {
    left:42px;
    bottom:10px;
  }
  .conversation-panel {
    min-height:600px;
    height:72vh;
  }
  .panel-heading {
    padding:0 15px;
  }
  .panel-heading h2 {
    font-size:14px;
  }
  .quiet-label {
    font-size:9px;
  }
  .scenario-tray {
    padding:14px;
  }
  .chip {
    font-size:9px;
  }
  .scenario-chips {
    gap:5px;
  }
  .scenario-hint {
    font-size:8px;
  }
  .chat-window {
    padding:20px 14px;
    gap:20px;
  }
  .chat-msg {
    max-width:98%;
    gap:8px;
  }
  .chat-msg.user {
    max-width:92%;
  }
  .msg-avatar {
    width:26px;
    height:26px;
  }
  .msg-text {
    font-size:12px;
  }
  .input-container {
    padding:12px;
  }
  .input-footer {
    font-size:8px;
  }
  .quick-actions {
    padding:10px 14px;
  }
  .inspector-panel {
    grid-template-columns:1fr;
  }
  .inspector-heading,.audit-card {
    grid-column:auto;
  }
  .replay-bar {
    padding:10px;
    gap:8px;
  }
  .replay-bar>div {
    gap:7px;
  }
  .replay-controls input {
    width:70px;
  }
  .replay-bar strong {
    font-size:9px;
  }
  .replay-controls label {
    font-size:8px;
  }
  .text-button {
    font-size:9px;
  }
  .page-footer {
    display:block;
    font-size:8px;
  }
  .page-footer>span {
    display:block;
    margin-top:5px;
  }
}

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

@media(min-width:851px) {
  .inspector-panel {
    max-height:max(670px,calc(100vh - 390px));
    overflow-y:auto;
    padding-right:5px;
    scrollbar-width:thin;
  }
  .summary-text {
    max-height:230px;
    overflow-y:auto;
  }
}


/* --- Aegis Security Verification Card & Auditor View Drawer --- */
.inspector-panel.hidden-drawer {
  display: none !important;
}

.main-layout.full-width-conversation {
  grid-template-columns: 1fr !important;
}

.security-card {
  background: var(--white);
  border: 1.5px solid #b2d5cb;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 14px 0;
  box-shadow: 0 4px 16px rgba(24, 53, 48, 0.08);
  animation: cardFadeIn 0.35s ease-out;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.security-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.security-card-title {
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-card-badge {
  font-size: 11px;
  background: var(--mint);
  color: var(--green);
  border: 1px solid #c0ded6;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.security-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.45;
}

.security-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.security-card-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.security-card-field label {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
}

.security-card-field label .field-tag {
  font-size: 10px;
  font-weight: normal;
  color: var(--muted);
  text-transform: none;
}

.security-card-field input {
  background: var(--paper);
  border: 1px solid #cad8d3;
  border-radius: 6px;
  padding: 8.5px 12px;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.security-card-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 102, 87, 0.15);
  background: var(--white);
}

.security-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.security-card-submit {
  background: var(--green);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 102, 87, 0.25);
  transition: all 0.2s;
}

.security-card-submit:hover {
  background: var(--green-dark);
  box-shadow: 0 4px 12px rgba(30, 102, 87, 0.35);
}

/* --- Experiment Presets & Date Picker Helper --- */
.experiment-presets-tray {
  background: var(--mint);
  border: 1px solid #cce4dd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.experiment-presets-title {
  font-size: 11px;
  font-weight: 650;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.experiment-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  background: var(--white);
  border: 1px solid #b8d9d0;
  color: var(--ink);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover {
  background: #d8ede7;
  border-color: var(--green);
  color: var(--green-dark);
}

.preset-chip.active {
  background: var(--green);
  border-color: var(--green-dark);
  color: var(--white);
  font-weight: 600;
}

.dob-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dob-input-wrapper input[type="text"] {
  width: 100%;
  padding-right: 36px;
}

.dob-picker-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--green);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  border-radius: 4px;
  transition: transform 0.15s, color 0.15s;
}

.dob-picker-btn:hover {
  transform: scale(1.15);
  color: var(--green-dark);
}

.dob-native-picker {
  position: absolute;
  right: 8px;
  opacity: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.security-card-instant-submit {
  background: var(--mint);
  color: var(--green);
  border: 1px solid var(--green);
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.security-card-instant-submit:hover {
  background: #d8ede7;
  color: var(--green-dark);
}




/* Keep the composer reachable when choices wrap on a narrow screen. */
.conversation-panel {height:auto;min-height:0;max-height:none}
.chat-window {flex:none;height:clamp(180px,30vh,340px);min-height:0}
.input-container,.quick-actions,.scenario-tray {flex-shrink:0}
.full-width-conversation .chat-msg {max-width:min(100%,780px)}
@media(max-width:768px) {
  .chat-window {height:220px;padding:20px 16px}
  .stepper {margin-bottom:16px}
  .page-heading {margin-bottom:20px}
}
.customer-options .verification-progress {font-size:12px;font-weight:400;color:#6c552a;margin-bottom:12px}

/* Keep free-form writing ahead of optional shortcuts and inspection tools. */
.conversation-mode {display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;padding:10px 23px;border-bottom:1px solid var(--line);background:#f8faf7;font-size:12px;color:#52665b;flex-shrink:0}
.conversation-mode > span:first-child {font-weight:650;color:var(--green)}
.conversation-mode .text-button {margin-left:auto;min-height:28px;font-size:12px}
.conversation-panel {min-height:0}
.chat-window {height:clamp(230px,calc(100dvh - 650px),420px);padding-bottom:24px}
.msg-text {font-size:15px;line-height:1.75}
.msg-sender {font-size:11px}
.msg-phase {font-size:10px}
.input-container {padding:14px 21px;background:#fff;flex-shrink:0}
#user-input {font-size:16px;min-height:72px;max-height:170px;line-height:1.6;resize:vertical}
.send-button {height:42px;width:42px}
.input-footer {font-size:10px;line-height:1.5}
.customer-options {background:#fcfdfb}
.customer-options summary {cursor:pointer;font-size:12px;color:var(--green);line-height:1.7;min-height:26px}
.suggestion-note {font-size:12px;color:var(--muted);margin:10px 0 0;line-height:1.6}
.policy-decision {border-top:1px solid var(--line);padding:12px 23px;background:#f6f9f5;font-size:12px;flex-shrink:0}
.policy-decision > summary {cursor:pointer;line-height:1.7;color:#31584a}
.policy-decision-body {padding:4px 0 6px;max-width:760px}
.policy-decision-body > p {line-height:1.7;margin:10px 0}
.policy-decision-body .decision-footnote {font-size:11px;color:#617469}
.policy-decision-body .decision-fallback {padding:10px 12px;background:#fff6e8;border-left:3px solid #ad803a;color:#70582f}
.decision-options {margin:12px 0}
.decision-option {display:flex;justify-content:space-between;gap:18px;padding:7px 10px;border-bottom:1px solid #e3ebe4;line-height:1.5}
.decision-option.selected {background:#eaf3e9;font-weight:650;color:#205a47}
.decision-option span:last-child {font-variant-numeric:tabular-nums;white-space:nowrap}
.policy-decision-body details {margin-top:12px}
.policy-decision-body summary {cursor:pointer;color:#52665b}
.policy-decision pre {max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;font-size:11px;background:#fff;border:1px solid var(--line)}
#config-form .field-help {line-height:1.6}
@media(max-width:768px) {
  .conversation-mode {padding:9px 16px;gap:4px 12px;font-size:11px}
  .conversation-mode .text-button {font-size:11px}
  .chat-window {height:clamp(230px,30dvh,320px);padding:20px 16px}
  .input-container {padding:12px 14px}
  #user-input {min-height:72px}
  .customer-options .support-tools {margin-top:8px}
  .policy-decision {padding:12px 16px}
  .msg-text {font-size:15px}
  .full-width-conversation .chat-msg {max-width:100%}
}
@media(max-width:520px) {
  .customer-page .header {flex-wrap:nowrap;min-height:64px;gap:10px}
  .customer-page .header-actions {width:auto;flex-wrap:nowrap;justify-content:flex-end;margin-left:auto}
  .customer-page .header-actions .btn {flex:0 0 auto;min-width:30px}
  .customer-page .header-actions .btn-text {display:none}
  .customer-page .stepper {grid-template-columns:repeat(4,minmax(0,1fr))}
  .customer-page .stepper .step-item {display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px 7px;border-bottom:0;border-right:1px solid var(--line)}
  .customer-page .stepper .step-item:last-child {border-right:0}
  .customer-page .step-name {font-size:9px;line-height:1.5}
  .customer-page .panel-heading {height:48px}
  .customer-page .scenario-tray {padding:11px 14px}
}
@media(max-width:520px) and (max-height:760px) {
  .customer-page .page-heading .eyebrow,.customer-page .page-description {display:none}
  .customer-page .page-heading {margin-bottom:12px}
  .customer-page main {padding-top:12px}
  .customer-page .chat-window {height:180px}
}
