/* ==========================================================================
   AUTOCOMMERCE NEXUS — WARM CREAM GLASSMORPHIC DESIGN SYSTEM
   Warm Paper/Cream Palette matching Hero, Highly Visible Glass Cards, Dark Simulators
   ========================================================================== */

/* Section Global Backgrounds — Warm Paper & Cream Palette */
.recorder, .canvas-section, .cockpit-section, .concepts-section, .gateway-section, .compliance-section, .concierge-section {
  position: relative;
  background: #f4f1eb;
  background-image:
    radial-gradient(circle at 10% 12%, rgba(217, 255, 77, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(232, 226, 215, 0.6) 0%, transparent 60%);
  color: #0c0c0e;
  border-bottom: 1px solid rgba(12, 12, 14, 0.16);
  padding: 90px 7.5vw;
}

/* Section Headings & Spacing */
.section-heading {
  margin-bottom: 40px;
}

.section-subtext {
  font-size: 15px;
  color: #4b4945;
  margin: 10px 0 0;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.recorder .kicker, .canvas-section .kicker, .cockpit-section .kicker, .concepts-section .kicker,
.gateway-section .kicker, .compliance-section .kicker, .concierge-section .kicker {
  color: #0c0c0e;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
  background: #e8e2d7;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(12, 12, 14, 0.18);
  box-shadow: 0 2px 8px rgba(12, 12, 14, 0.06);
}

.recorder h2, .canvas-section h2, .cockpit-section h2, .concepts-section h2,
.gateway-section h2, .compliance-section h2, .concierge-section h2 {
  font: 700 44px/1.12 var(--serif);
  letter-spacing: -0.03em;
  margin: 10px 0 0;
  color: #0c0c0e;
}

.recorder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

/* Session Mandate Pill */
.session-pill {
  border: 1px solid rgba(12, 12, 14, 0.2);
  padding: 10px 22px;
  border-radius: 30px;
  display: flex;
  gap: 10px;
  align-items: center;
  font: 11px var(--mono);
  color: #0c0c0e;
  background: rgba(232, 226, 215, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(12, 12, 14, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}
.session-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #817e78;
}
.session-pill.active {
  border-color: #0c0c0e;
  background: #d9ff4d;
  color: #0c0c0e;
  font-weight: 700;
}
.session-pill.active i {
  background: #0c0c0e;
  box-shadow: 0 0 8px #0c0c0e;
}

/* HIGHLY VISIBLE WARM CREAM GLASSMORPHIC CARDS */
.panel {
  background: rgba(232, 226, 215, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(12, 12, 14, 0.16);
  border-radius: 24px;
  padding: 34px 38px;
  box-shadow:
    0 16px 40px rgba(12, 12, 14, 0.07),
    0 2px 6px rgba(12, 12, 14, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
  border-color: rgba(12, 12, 14, 0.35);
  box-shadow:
    0 24px 55px rgba(12, 12, 14, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-4px);
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.panel-num {
  font: 700 10px var(--mono);
  background: #0c0c0e;
  color: #d9ff4d;
  padding: 3px 8px;
  border-radius: 6px;
}

.panel-title {
  font: 11px var(--mono);
  letter-spacing: 0.14em;
  color: #0c0c0e;
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
}

.panel-heading {
  font: 700 24px/1.2 var(--serif);
  color: #0c0c0e;
  margin: 0 0 18px;
}

.panel h3 {
  font: 700 24px/1.2 var(--serif);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #0c0c0e;
}

.panel p {
  font-size: 14px;
  line-height: 1.65;
  color: #4b4945;
  margin-bottom: 20px;
}

.recorder-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.95fr;
  gap: 28px;
}

/* ==========================================================================
   STRIPE CHECKOUT CANVAS — SPLIT INTERACTIVE MOBILE SIMULATOR
   (WARM CREAM CANVAS + SLEEK DARK SIMULATORS)
   ========================================================================== */
.canvas-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
}

/* Left Panel: Agent Thought Stream */
.thought-stream-panel {
  display: flex;
  flex-direction: column;
  height: 620px;
}

.stream-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.stream-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}
.live-dot.pulse {
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stream-title {
  font: 11px var(--mono);
  letter-spacing: 0.14em;
  color: #0c0c0e;
  font-weight: 700;
}

.stream-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stream-btn {
  background: #eae5db;
  border: 1px solid rgba(12, 12, 14, 0.2);
  color: #0c0c0e;
  padding: 7px 16px;
  border-radius: 20px;
  font: 11px var(--mono);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(12, 12, 14, 0.05);
  transition: all 0.2s ease;
}
.stream-btn:hover, .stream-btn.active {
  background: #0c0c0e;
  border-color: #0c0c0e;
  color: #d9ff4d;
  box-shadow: 0 4px 14px rgba(12, 12, 14, 0.25);
}
.stream-btn.danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
}
.stream-btn.danger:hover, .stream-btn.danger.active {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

/* SLEEK DARK TYPEWRITER TERMINAL */
.typewriter-terminal {
  flex: 1;
  background: #030508;
  border: 1px solid rgba(12, 12, 14, 0.4);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8), 0 16px 40px rgba(0, 0, 0, 0.3);
}

.terminal-bar {
  background: rgba(13, 17, 26, 0.95);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.t-dot.red { background: #ff5f56; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #27c93f; }

.t-title {
  font: 11px var(--mono);
  color: #94a3b8;
  margin-left: 6px;
  flex: 1;
}

.speed-tag {
  font: 10px var(--mono);
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
}

.terminal-body {
  flex: 1;
  padding: 18px;
  font: 12px/1.7 var(--mono);
  overflow-y: auto;
  color: #e2e8f0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.t-line {
  margin: 0 0 6px;
  animation: fadein 0.2s ease;
}
.t-line.dim { color: #64748b; }
.t-line.intent { color: #38bdf8; font-weight: 600; }
.t-line.reasoning { color: #cbd5e1; }
.t-line.margin { color: #a3e635; font-weight: 700; }
.t-line.mandate { color: #c084fc; }
.t-line.route { color: #facc15; }
.t-line.acp { color: #4ade80; font-weight: 700; }
.t-line.audit { color: #94a3b8; }
.t-line.error { color: #f87171; font-weight: 700; }

.stream-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(12, 12, 14, 0.14);
}
.token-counter {
  display: flex;
  justify-content: space-between;
  font: 10px var(--mono);
  color: #4b4945;
}
.token-counter b { color: #0c0c0e; }
.tag-ok { color: #15803d !important; font-weight: 700; }

/* SLEEK DARK 3D FLOATING IPHONE SIMULATOR */
.mobile-simulator-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.phone-stage {
  width: 100%;
  display: flex;
  justify-content: center;
}

.iphone-mockup {
  width: 320px;
  height: 600px;
  background: #090c15;
  border-radius: 46px;
  border: 10px solid #1e293b;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(255, 255, 255, 0.15),
    inset 0 0 15px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: rotateY(-6deg) rotateX(4deg);
  animation: floatPhone 6s ease-in-out infinite alternate;
  transition: transform 0.4s ease;
}

.iphone-mockup:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

@keyframes floatPhone {
  0% { transform: rotateY(-6deg) rotateX(4deg) translateY(-6px); }
  100% { transform: rotateY(-6deg) rotateX(4deg) translateY(8px); }
}

/* iPhone Notch / Dynamic Island */
.iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  width: 96px;
  height: 24px;
  background: #000000;
  border-radius: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.camera-lens {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #090e17;
  box-shadow: inset 0 0 4px #000;
}
.speaker-ear {
  width: 30px;
  height: 4px;
  border-radius: 4px;
  background: #1e293b;
}

/* Phone Screen Header Bar (Dark) */
.phone-status-bar {
  height: 40px;
  padding: 12px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 11px var(--mono);
  color: #ffffff;
  z-index: 15;
  position: relative;
}

/* Phone App Nav Pills (Dark) */
.phone-app-nav {
  padding: 8px 14px;
  background: rgba(15, 20, 32, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.phone-brand-title {
  font: 11px var(--mono);
  color: #94a3b8;
  text-align: center;
  margin-bottom: 6px;
}
.phone-brand-title strong { color: #a3e635; margin-left: 3px; }

.phone-nav-pills {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.phone-pill {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font: 10px var(--mono);
  font-weight: 700;
  padding: 5px 0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.phone-pill.active {
  background: #a3e635;
  color: #05070c;
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.4);
}

/* Phone Screen Content Container (Dark) */
.phone-screen-content {
  height: calc(100% - 100px);
  position: relative;
  background: #080a10;
}

.phone-tab-page {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 14px;
  overflow-y: auto;
}
.phone-tab-page.active { display: flex; }

/* WhatsApp Tab UI inside Phone (Dark) */
.wa-chat-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.wa-chat-header .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.wa-chat-header strong { display: block; font-size: 12px; color: #ffffff; }
.wa-chat-header small { font: 9px var(--mono); color: #4ade80; }

.wa-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.wa-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
  position: relative;
}
.wa-bubble.incoming {
  background: #1e293b;
  color: #f1f5f9;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.wa-bubble.outgoing {
  background: #065f46;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.wa-bubble .time {
  display: block;
  font: 8px var(--mono);
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

.wa-payment-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 10px;
  padding: 10px;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.wa-payment-card .card-brand {
  display: block;
  font: 8px var(--mono);
  color: #4ade80;
  text-transform: uppercase;
}
.wa-payment-card strong {
  display: block;
  font-size: 11px;
  color: #ffffff;
  margin-top: 3px;
}
.wa-payment-card .price-line {
  font-size: 10px;
  color: #cbd5e1;
  margin: 4px 0 8px;
}
.wa-payment-card .pay-now-btn {
  width: 100%;
  background: #10b981;
  border: none;
  color: #05070c;
  font: 700 10px var(--mono);
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
}

.wa-chat-footer {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wa-chat-footer input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 16px;
  font-size: 10px;
}
.wa-chat-footer button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  border: none;
  color: #05070c;
  font-weight: bold;
  cursor: pointer;
}

/* Phone UPI QR Tab UI (Dark) */
.phone-upi-card {
  text-align: center;
  padding: 20px 10px;
}
.upi-head-label {
  font: 10px var(--mono);
  color: #38bdf8;
  letter-spacing: 0.08em;
}
.phone-qr-wrap {
  width: 130px;
  height: 130px;
  margin: 16px auto;
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}
.mini-qr-svg { width: 100%; height: 100%; }

.phone-amount-box {
  background: rgba(15, 23, 42, 0.8);
  padding: 10px;
  border-radius: 8px;
  margin: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.phone-amount-box span { font-size: 10px; color: #94a3b8; display: block; }
.phone-amount-box b { font: 700 18px var(--serif); color: #a3e635; margin-top: 2px; display: block; }

.phone-action-btn {
  width: 100%;
  background: #a3e635;
  border: none;
  color: #05070c;
  font: 700 11px var(--mono);
  padding: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(163, 230, 53, 0.3);
}

/* Phone DAT Mandate Card Tab UI (Dark) */
.phone-dat-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.dat-card-label { font: 9px var(--mono); color: #c084fc; letter-spacing: 0.1em; }
.phone-dat-card strong { display: block; font: 700 16px var(--mono); color: #ffffff; margin: 8px 0; }
.dat-row { display: flex; justify-content: space-around; font-size: 10px; color: #cbd5e1; margin: 12px 0; }
.dat-row b { color: #a3e635; }
.dat-fingerprint { background: rgba(0, 0, 0, 0.5); padding: 8px; border-radius: 6px; margin: 10px 0; }
.dat-fingerprint small { display: block; font: 8px var(--mono); color: #94a3b8; }
.dat-fingerprint code { font: 10px var(--mono); color: #38bdf8; }
.mandate-status-active { font: 9px var(--mono); color: #4ade80; font-weight: bold; }

/* iPhone Home Bar */
.iphone-home-bar {
  position: absolute;
  bottom: 6px;
  left: 50%;
  translate: -50% 0;
  width: 110px;
  height: 4px;
  background: #ffffff;
  border-radius: 4px;
  opacity: 0.6;
}

/* Live Trace Feed in Flight Recorder */
.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.quiet-button {
  border: 1px solid rgba(12, 12, 14, 0.2);
  background: rgba(232, 226, 215, 0.8);
  color: #0c0c0e;
  font: 10px var(--mono);
  font-weight: 700;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.quiet-button:hover {
  color: #d9ff4d;
  background: #0c0c0e;
  border-color: #0c0c0e;
  box-shadow: 0 4px 12px rgba(12, 12, 14, 0.2);
}

.trace-feed {
  height: 330px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.trace-empty {
  font: 14px/1.6 var(--serif);
  color: #64748b;
  padding: 50px 0;
  text-align: center;
}

.trace {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-radius: 12px;
  margin-bottom: 14px;
  animation: fadein 0.35s ease;
  box-shadow: 0 4px 14px rgba(12, 12, 14, 0.05);
}

.trace-meta {
  display: flex;
  justify-content: space-between;
  font: 10px var(--mono);
  color: #16a34a;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.trace p {
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
  color: #0c0c0e;
}

.trace.failed { border-left: 4px solid #dc2626; }
.trace.failed .trace-meta { color: #dc2626; }
.trace.recovered { border-left: 4px solid #0284c7; }
.trace.recovered .trace-meta { color: #0284c7; }
.trace.needs_approval { border-left: 4px solid #d97706; }
.trace.needs_approval .trace-meta { color: #d97706; }
.trace.ok { border-left: 4px solid #16a34a; }

/* Bounding Guardrail Visualizer Dials */
.gauge {
  margin: 24px auto 16px;
  width: 200px;
  position: relative;
}
.gauge svg { width: 100%; }
.gauge path {
  fill: none;
  stroke: rgba(12, 12, 14, 0.12);
  stroke-width: 9;
  stroke-linecap: round;
}
.gauge .gauge-progress {
  stroke: #16a34a;
  stroke-dasharray: 157;
  stroke-dashoffset: 45;
  transition: stroke-dashoffset 0.6s ease;
  filter: drop-shadow(0 0 6px rgba(22, 163, 74, 0.4));
}

.gauge div {
  position: absolute;
  inset: 28px 0 auto;
  text-align: center;
  display: grid;
}
.gauge b {
  font: 700 30px var(--serif);
  color: #0c0c0e;
}
.gauge span {
  font: 10px var(--mono);
  color: #64748b;
  letter-spacing: 0.08em;
}

.guard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(12, 12, 14, 0.14);
  padding-top: 20px;
  gap: 16px;
  margin-top: 20px;
}
.guard-stats span {
  font: 10px var(--mono);
  color: #64748b;
}
.guard-stats b {
  display: block;
  color: #0c0c0e;
  font: 700 17px var(--serif);
  margin-top: 4px;
}
.risk-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font: 700 13px var(--mono) !important;
}
.risk-badge.low { color: #16a34a !important; background: rgba(22, 163, 74, 0.12); }
.risk-badge.high { color: #dc2626 !important; background: rgba(220, 38, 38, 0.12); }

.guard-note {
  font: 11px/1.6 var(--mono);
  color: #4b4945;
  margin-top: 20px;
  border-top: 1px dashed rgba(12, 12, 14, 0.14);
  padding-top: 16px;
}

/* Failure Toggles with LED Indicators */
.toggle-list {
  display: grid;
  gap: 6px;
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(12, 12, 14, 0.14);
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.toggle:hover {
  background: #ffffff;
  border-color: rgba(12, 12, 14, 0.3);
}
.toggle span { display: grid; gap: 3px; }
.toggle b { font-size: 13px; color: #0c0c0e; font-weight: 600; }
.toggle small { font: 10px var(--mono); color: #64748b; }
.toggle input { display: none; }
.toggle i {
  width: 42px;
  height: 22px;
  background: rgba(12, 12, 14, 0.14);
  border-radius: 20px;
  position: relative;
  transition: 0.3s ease;
  border: 1px solid rgba(12, 12, 14, 0.2);
  flex-shrink: 0;
}
.toggle i:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  top: 2px;
  left: 3px;
  transition: 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + i {
  background: #0c0c0e;
  border-color: #0c0c0e;
  box-shadow: 0 0 10px rgba(12, 12, 14, 0.3);
}
.toggle input:checked + i:after {
  left: 21px;
  background: #d9ff4d;
}

/* Universal Agentic Gateway Platform Connector Cards */
.adapters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.adapter-card {
  background: rgba(232, 226, 215, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(12, 12, 14, 0.16);
  padding: 26px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 35px rgba(12, 12, 14, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}
.adapter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(12, 12, 14, 0.35);
  box-shadow: 0 22px 50px rgba(12, 12, 14, 0.12);
}

.shopify-card { border-top: 4px solid #16a34a; }
.woocommerce-card { border-top: 4px solid #9333ea; }
.custom-card { border-top: 4px solid #0284c7; }
.whatsapp-card { border-top: 4px solid #059669; }

.adapter-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.icon-wrap {
  font-size: 26px;
}
.adapter-head strong {
  font-size: 16px;
  color: #0c0c0e;
  font-family: var(--serif);
  display: block;
}

.status-chip {
  font: 10px var(--mono);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  width: max-content;
  margin-top: 4px;
}
.active-chip {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.adapter-card p {
  font-size: 13px;
  color: #4b4945;
  line-height: 1.6;
  margin: 14px 0 16px;
}

.card-footer-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(12, 12, 14, 0.14);
}
.card-footer-code code {
  font: 11px var(--mono);
  color: #0284c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.test-connector-btn {
  border: 1px solid #0c0c0e;
  background: #0c0c0e;
  color: #d9ff4d;
  font: 10px var(--mono);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.test-connector-btn:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

/* Gateway & Concept Grids */
.gateway-features-grid, .cockpit-grid, .concepts-grid, .compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 36px;
}
.cockpit-grid { grid-template-columns: 1.1fr 0.9fr; }

.concept-badge {
  display: inline-block;
  font: 10px var(--mono);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.green-badge { background: rgba(22, 163, 74, 0.15); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.3); }
.purple-badge { background: rgba(147, 51, 234, 0.15); color: #9333ea; border: 1px solid rgba(147, 51, 234, 0.3); }
.blue-badge { background: rgba(2, 132, 199, 0.15); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.3); }
.yellow-badge { background: rgba(217, 119, 6, 0.15); color: #d97706; border: 1px solid rgba(217, 119, 6, 0.3); }

.prompt-box, .voice-box, .groupbuy-box, .split-box, .pii-box, .family-card, .vault-card, .concierge-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(12, 12, 14, 0.14);
  margin-top: 20px;
  box-shadow: 0 4px 16px rgba(12, 12, 14, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.input-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.input-row input {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(12, 12, 14, 0.2);
  color: #0c0c0e;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color 0.2s ease;
}
.input-row input:focus {
  outline: none;
  border-color: #0c0c0e;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.chip {
  background: rgba(255, 255, 255, 0.85);
  color: #0c0c0e;
  border: 1px solid rgba(12, 12, 14, 0.18);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover {
  background: #0c0c0e;
  border-color: #0c0c0e;
  color: #d9ff4d;
}
.danger-chip {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.danger-chip:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Category Checklist Interactive Grid */
.category-checklist {
  margin-top: 24px;
}
.small-title {
  font: 11px var(--mono);
  color: #64748b;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(12, 12, 14, 0.14);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: #0c0c0e;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-chip:hover {
  border-color: #0c0c0e;
}
.cat-chip.active {
  border-color: #0c0c0e;
  background: #d9ff4d;
  color: #0c0c0e;
  font-weight: 700;
}
.cat-checkbox {
  margin-right: 8px;
  accent-color: #0c0c0e;
}
.cat-status {
  font: 9px var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(12, 12, 14, 0.08);
  color: #0c0c0e;
  font-weight: 700;
}

/* Whitelist Tag Row */
.whitelist-tags { margin-top: 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font: 10px var(--mono);
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 700;
}

/* Zero-Knowledge PII Redaction Toggle */
.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pii-toggle-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.pii-toggle-label input { opacity: 0; width: 0; height: 0; }
.pii-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(12, 12, 14, 0.16);
  border: 1px solid rgba(12, 12, 14, 0.25);
  border-radius: 24px;
  transition: .3s;
}
.pii-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: .3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.pii-toggle-label input:checked + .pii-slider {
  background: #10b981;
  border-color: #10b981;
}
.pii-toggle-label input:checked + .pii-slider:before {
  transform: translateX(20px);
}

.pii-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 11px var(--mono);
  color: #0c0c0e;
  font-weight: 700;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

/* Voice Commerce Live Microphone Studio */
.studio-card { position: relative; }
.mic-studio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}
.mic-wave {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.mic-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0c0c0e;
  color: #d9ff4d;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(12, 12, 14, 0.25);
  transition: transform 0.2s ease, background 0.3s ease;
  display: grid;
  place-items: center;
}
.mic-button:hover { transform: scale(1.08); }

.mic-button.recording {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 28px rgba(220, 38, 38, 0.6);
  animation: pulse-red 1.2s infinite;
}

.sound-wave-container {
  display: flex;
  align-items: center;
}
.sound-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
}
.sound-wave span {
  width: 4px;
  height: 8px;
  background: #0284c7;
  border-radius: 2px;
  transition: height 0.2s ease;
}
.mic-button.recording ~ .sound-wave-container .sound-wave span {
  animation: wave-bars 1s ease-in-out infinite alternate;
  background: #dc2626;
}
.sound-wave span:nth-child(1) { animation-delay: 0.1s; }
.sound-wave span:nth-child(2) { animation-delay: 0.3s; }
.sound-wave span:nth-child(3) { animation-delay: 0.5s; }
.sound-wave span:nth-child(4) { animation-delay: 0.2s; }
.sound-wave span:nth-child(5) { animation-delay: 0.4s; }
.sound-wave span:nth-child(6) { animation-delay: 0.6s; }
.sound-wave span:nth-child(7) { animation-delay: 0.15s; }

@keyframes wave-bars {
  0% { height: 6px; }
  100% { height: 28px; }
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.voice-status {
  font: 12px/1.5 var(--mono);
  color: #4b4945;
  text-align: center;
}
.voice-status.listening {
  color: #dc2626;
  font-weight: 700;
}

.concept-output {
  margin-top: 18px;
  font: 11px/1.6 var(--mono);
  color: #15803d;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(12, 12, 14, 0.14);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

.cert-output {
  margin-top: 16px;
  font: 11px/1.45 var(--mono);
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  border-radius: 10px;
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.35);
  max-height: 160px;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.1);
}

/* SLA Tracker Timeline */
.sla-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(12, 12, 14, 0.14);
}
.sla-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sla-step .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.08);
  border: 1px solid rgba(12, 12, 14, 0.2);
  display: grid;
  place-items: center;
  font: 700 11px var(--mono);
  color: #64748b;
}
.sla-step.step-done .dot {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.sla-step.step-breached .dot {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}
.sla-step .label {
  font: 10px var(--mono);
  color: #4b4945;
  font-weight: 600;
}
.sla-line {
  flex: 1;
  height: 2px;
  background: rgba(12, 12, 14, 0.14);
  margin: 0 10px;
  translate: 0 -10px;
}
.sla-line.line-done {
  background: #16a34a;
}

/* Proof of Intent Ledger & Table — re-themed to match the dark Enterprise Control Plane */
.ledger {
  margin-top: 48px;
  background: #0c0c0e;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(217, 255, 77, 0.10) 0%, transparent 42%),
    radial-gradient(circle at 88% 14%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(217, 255, 77, 0.05) 0%, transparent 55%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(244, 241, 235, 0.14);
  padding: 36px 40px;
  border-radius: 24px;
  color: #f4f1eb;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(244, 241, 235, 0.08);
}
.ledger-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.ledger-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ledger-search-input {
  background: rgba(244, 241, 235, 0.06);
  border: 1px solid rgba(244, 241, 235, 0.18);
  color: #f4f1eb;
  padding: 8px 14px;
  border-radius: 8px;
  font: 11px var(--mono);
  width: 220px;
}
.ledger-search-input::placeholder { color: rgba(244, 241, 235, 0.4); }
.ledger-search-input:focus {
  outline: none;
  border-color: rgba(217, 255, 77, 0.6);
  background: rgba(244, 241, 235, 0.09);
}
.ledger-title {
  color: #ffffff !important;
  font: 700 26px var(--serif);
  margin-top: 6px;
}
.ledger .panel-title { color: rgba(217, 255, 77, 0.85) !important; }

.ledger-rows {
  margin-top: 28px;
  max-height: 340px;
  overflow-y: auto;
}
.ledger-rows::-webkit-scrollbar { width: 8px; }
.ledger-rows::-webkit-scrollbar-thumb { background: rgba(244, 241, 235, 0.18); border-radius: 8px; }

.ledger-row {
  display: grid;
  grid-template-columns: 70px 1.2fr 1.6fr 1fr;
  gap: 20px;
  padding: 16px 20px;
  border-top: 1px solid rgba(244, 241, 235, 0.08);
  font: 11px/1.4 var(--mono);
  color: #f4f1eb;
  background: rgba(244, 241, 235, 0.05);
  border: 1px solid rgba(244, 241, 235, 0.1);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.ledger-row:hover {
  background: rgba(244, 241, 235, 0.1);
  border-color: rgba(217, 255, 77, 0.5);
  transform: translateX(4px);
}
.ledger-row:hover b {
  color: #d9ff4d;
}
.ledger-row:hover code {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.ledger .quiet-button {
  border: 1px solid rgba(217, 255, 77, 0.55);
  background: transparent;
  color: #d9ff4d;
  font: 10px var(--mono);
  font-weight: 700;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.ledger .quiet-button:hover {
  background: #d9ff4d;
  color: #0c0c0e;
  border-color: #d9ff4d;
  box-shadow: 0 4px 14px rgba(217, 255, 77, 0.25);
}

.ledger-row b {
  color: #4ade80;
  font-weight: 700;
}
.ledger-row code {
  color: #7dd3fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(244, 241, 235, 0.07);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(244, 241, 235, 0.12);
}
.ledger-row span { color: rgba(244, 241, 235, 0.65); }
.trace-empty { color: rgba(244, 241, 235, 0.4) !important; }

/* High Contrast Footer */
.footer-visible {
  padding: 64px 7.5vw;
  background: #eae5db;
  border-top: 1px solid rgba(12, 12, 14, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0c0c0e;
}

.footer-brand-title {
  font: 700 18px var(--serif);
  letter-spacing: 0.12em;
  color: #0c0c0e;
  display: block;
}

.footer-copy {
  font-size: 14px;
  color: #4b4945;
  margin: 6px 0 0;
}

.footer-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  font: 11px var(--mono);
}

.footer-badge {
  color: #0c0c0e;
  font-weight: 700;
  background: #d9ff4d;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(12, 12, 14, 0.2);
}

.footer-year {
  color: #64748b;
}

/* Modals Styling */
dialog {
  background: #f8f5ef;
  color: #0c0c0e;
  border: 1px solid rgba(12, 12, 14, 0.2);
  border-radius: 24px;
  padding: 40px;
  max-width: 580px;
  width: 90vw;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}
dialog::backdrop {
  background: rgba(12, 12, 14, 0.6);
  backdrop-filter: blur(8px);
}

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

@media (max-width: 1000px) {
  .canvas-container {
    grid-template-columns: 1fr;
  }
  .thought-stream-panel {
    height: 480px;
  }
  .recorder-grid, .cockpit-grid, .concepts-grid, .adapters-grid, .gateway-features-grid, .compliance-grid, .concierge-grid {
    grid-template-columns: 1fr;
  }
  .footer-visible {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}
