* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", "Outfit", sans-serif;
  background: #eef5f4;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ─── SCREENS ─── */
.screen { display: none; width: 100%; }
.screen.active { display: block; }

/* ─── DISCLAIMER ─── */
.disc-card {
  max-width: 682px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
}
.disc-head {
  background: #3a7d82;
  padding: 18px 28px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.disc-head img {
  height: 30px;
  display: block;
  margin: 0 0 4px;
  mix-blend-mode: screen;
}
.disc-head .tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
  text-align: center;
}
.disc-body { padding: 16px 28px 20px; }
.disc-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f2d30;
  margin-bottom: 8px;
  text-align: center;
}
.disc-intro {
  font-size: 13px;
  color: #2a4e4a;
  line-height: 1.6;
  margin-bottom: 10px;
}
.disc-list { list-style: none; margin-bottom: 8px; }
.disc-list li {
  display: flex;
  gap: 9px;
  font-size: 12.5px;
  color: #2a4e4a;
  line-height: 1.55;
  padding: 5px 0;
  border-bottom: 1px solid #f0f5f4;
}
.disc-list li:last-child { border-bottom: none; }
.disc-list li::before { content: "\2022"; color: #3a7d82; font-size: 15px; line-height: 1.3; flex-shrink: 0; }
.disc-list li span { flex: 1; }
.disc-em {
  font-size: 12px;
  color: #3a7d82;
  font-style: italic;
  text-align: center;
  margin: 8px 0;
  line-height: 1.5;
}
.disc-rule { border: none; border-top: 1.5px solid #e8f0ef; margin: 10px 0; }

/* ─── TOGGLES ─── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fcfb;
  border: 1.5px solid #d4e2e0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.toggle-row:hover { border-color: #3a7d82; background: #f0f9f7; }
.toggle-row.on { border-color: #3a7d82; background: #e8f4f2; }
.sw { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw-track {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #b8cccb; border-radius: 26px; transition: 0.2s;
}
.sw-track::before {
  content: ""; position: absolute;
  width: 20px; height: 20px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.sw input:checked + .sw-track { background: #3a7d82; }
.sw input:checked + .sw-track::before { transform: translateX(22px); }
.toggle-info { display: flex; flex-direction: column; gap: 1px; }
.toggle-main { font-size: 13.5px; font-weight: 600; color: #0f2b27; }
.toggle-sub  { font-size: 11px; color: #7a9e99; }

/* ─── ACK ─── */
.ack-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #fffbf0;
  border: 1.5px solid #e8c96e;
  border-radius: 9px;
  padding: 10px 14px;
  margin-top: 8px;
}
.ack-row input[type=checkbox] {
  width: 18px; height: 18px;
  flex-shrink: 0; margin-top: 2px;
  accent-color: #3a7d82; cursor: pointer;
}
.ack-row label {
  font-size: 13px;
  color: #5a3f00;
  line-height: 1.5;
  cursor: pointer;
  font-weight: 500;
}

/* ─── CONTINUE BUTTON ─── */
.go-btn {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.02em;
  cursor: not-allowed;
  background: #b8cccb;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  pointer-events: none;
}
.go-btn.on {
  background: #3a7d82;
  box-shadow: 0 4px 16px rgba(58,125,130,0.42), 0 1px 3px rgba(0,0,0,0.10);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}
.go-btn.on:hover  {
  background: #2f666b;
  box-shadow: 0 7px 22px rgba(58,125,130,0.50), 0 2px 5px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.go-btn.on:active { transform: scale(0.98); box-shadow: 0 3px 10px rgba(58,125,130,0.35); }

.disc-note {
  text-align: center;
  font-size: 10px;
  color: #5a8a84;
  margin-top: 8px;
  line-height: 1.6;
}
.disc-ai-notice {
  background: #fef9e7;
  border-left: 3px solid #c07a10;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 14px 0 4px;
  font-size: 12px;
  color: #4a3a00;
  line-height: 1.6;
}

/* ─── KEY-INFORMATION SCREEN (solicitor's review, Oct 2026) ─── */
.disc-exit-row { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.read-page-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 2px 0 12px; padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid #3a7d82; background: #fff; color: #2f666b;
  font: 600 13px/1.2 inherit; cursor: pointer;
}
.read-page-btn:hover { background: #f0f9f7; }
.read-page-btn[aria-pressed="true"] { background: #3a7d82; color: #fff; }
.disc-danger {
  background: #fff4f2; border-left: 3px solid #c0392b; border-right: 3px solid #c0392b; border-radius: 4px;
  padding: 9px 14px; margin: 4px 0 8px; font-size: 13px; color: #4a1f1a; line-height: 1.5;
}
.ack-row label a { color: #2f666b; text-decoration: underline; }
.disc-hint { font-size: 12px; color: #5a8a84; text-align: center; margin-top: 8px; }

/* The notice before the report is saved. */
.dl-confirm {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 43, 39, 0.55); align-items: center; justify-content: center; padding: 16px;
}
.dl-confirm-card {
  background: #fff; border-radius: 12px; max-width: 460px; width: 100%;
  padding: 22px 22px 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.dl-confirm-card h3 { font-size: 17px; color: #0f2b27; margin-bottom: 10px; }
.dl-confirm-card p { font-size: 13.5px; color: #2a4e4a; line-height: 1.6; margin-bottom: 16px; }
.dl-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dl-c-cancel, .dl-c-ok {
  padding: 9px 16px; border-radius: 8px; font: 600 14px/1.2 inherit; cursor: pointer;
}
.dl-c-cancel { background: #fff; border: 1.5px solid #b8cccb; color: #2a4e4a; }
.dl-c-ok { background: #3a7d82; border: 1.5px solid #3a7d82; color: #fff; }

/* ─── LANGUAGE SCREEN ─── */
.lang-card {
  max-width: 748px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
}
.lang-head {
  background: #3a7d82;
  padding: 18px 28px;
  text-align: center;
}
.lang-head img {
  height: 26px;
  display: block;
  margin: 0 auto;
  mix-blend-mode: screen;
}
.lang-body { padding: 22px 24px 28px; }
.lang-prompt {
  text-align: center;
  font-size: 12.5px;
  color: #7a9e99;
  line-height: 1.7;
  margin-bottom: 16px;
}
.lang-prompt strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #0f2b27;
  margin-bottom: 2px;
}
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  background: #f2f7f6;
  border: 1.5px solid #d4e2e0;
  border-radius: 9px;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
  text-align: left;
}
.lang-btn:hover { border-color: #3a7d82; background: #e8f4f2; box-shadow: 0 4px 14px rgba(58,125,130,0.20); transform: translateY(-1px); }
.lang-native { font-size: 14px; font-weight: 600; color: #0f2b27; }
.lang-en     { font-size: 11px; color: #7a9e99; }
.lang-rtl    { direction: rtl; align-items: flex-end; }
.lang-rtl .lang-en { direction: ltr; }
.lang-priv {
  margin-top: 16px;
  text-align: center;
  font-size: 10.5px;
  color: #7a9e99;
  line-height: 1.6;
}

/* ─── CHAT WIDGET ─── */
.chat-card {
  max-width: 748px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
}
.chat-head {
  background: #3a7d82;
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.4s ease;
}
.chat-head.test-mode { background: #0d2e2b; }
.test-mode-badge { display: none; margin-left: 8px; background: rgba(255,220,80,0.15); border: 1px solid rgba(255,220,80,0.45); color: #ffd84d; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 4px; letter-spacing: 0.08em; text-transform: uppercase; flex-shrink: 0; }
.chat-head.test-mode .test-mode-badge { display: inline-flex; align-items: center; gap: 5px; }
.test-mode-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #ffd84d; display: inline-block; animation: tmPulse 1.4s infinite ease-in-out; }
@keyframes tmPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
.chat-head img {
  height: 26px;
  mix-blend-mode: screen;
  flex-shrink: 0;
}
.head-div { width: 1px; height: 18px; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.head-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  min-width: 128px;
  height: 36px;
  background: #ef4444;
  border: 1px solid #dc2626;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.exit-btn:hover { background: #dc2626; }
.privacy-screen-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.privacy-screen-btn:hover { background: #f9fafb; color: #374151; }
.tts-hdr-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tts-hdr-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.tts-hdr-btn.tts-on { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.6); color: #fff; }
.replay-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 7px; padding: 3px 8px;
  background: rgba(58,125,130,0.07); border: 1px solid rgba(58,125,130,0.18);
  border-radius: 6px; cursor: pointer; color: #3a7d82;
  font-size: 11px; font-family: inherit;
  transition: background 0.15s;
}
.replay-btn:hover { background: rgba(58,125,130,0.15); }

.byline {
  background: #eef5f4;
  border-bottom: 1px solid #d0e8e8;
  padding: 9px 22px;
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.5;
  text-align: center;
}

.chat-body {
  background: #eef5f4;
  border: none;
  height: 720px;
  overflow-y: auto;
  padding: 22px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #c5e3e5 transparent;
}
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: #bde5e7; border-radius: 4px; }

.emerg-bar {
  background: #fffbf0;
  border: 1px solid #e8c96e;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  color: #6b4f00;
  line-height: 1.5;
  text-align: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 0; animation: fadeUp 0.22s ease forwards; opacity: 0; }
.msg.user { flex-direction: row; }
.ai-header { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.ai-name { font-size: 11.5px; font-weight: 600; color: #4a7a7e; letter-spacing: 0.02em; }
@keyframes fadeUp { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

.av {
  width: 32px; height: 32px; min-height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.av.ai   { background: #4a7a5a; }
.av.user { display: none; }

.bbl {
  font-size: 14.5px;
  line-height: 1.8;
  color: #1e2333;
}
.msg.ai   .bbl { background: none; border: none; padding: 0 0 0 41px; max-width: 95%; }
.msg.user .bbl { background: #d5ecec; color: #0f2d30; border: none; border-radius: 18px; padding: 9px 16px; font-size: 13.5px; line-height: 1.6; max-width: 76%; }

.typing { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.typing-dots {
  background: none; border: none;
  padding: 4px 0 4px 41px;
  display: flex; gap: 5px; align-items: center;
}
.dot { width: 6px; height: 6px; background: #6a9e7a; border-radius: 50%; animation: bounce 1.4s ease-in-out infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100% { transform:translateY(0); opacity:0.4; } 30% { transform:translateY(-5px); opacity:1; } }

/* RISK CARD */
.risk-card { background: #ede8dc; border: 1px solid #cdc5b4; border-radius: 9px; padding: 16px; margin-top: 4px; }

/* LOCATION CHECK — shown before any assessment until the client confirms where they are */
.loc-card { background: #f4f9f9; border: 1px solid #b9d6d8; border-left: 4px solid #3a7d82; border-radius: 9px; padding: 14px 16px; margin-top: 4px; max-width: 520px; }
.loc-card p { margin: 0 0 8px; }
.loc-card .loc-ask { font-weight: 600; color: #0f2d30; }
.loc-lbl { display: block; font-size: 12.5px; color: #3d5558; margin-top: 10px; }
.loc-input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; font: inherit; font-size: 14px; border: 1px solid #b9d6d8; border-radius: 7px; background: #fff; color: #1e2333; }
.loc-card > .loc-input { margin-top: 8px; }
.loc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.loc-btn { background: #3a7d82; color: #fff; border: none; border-radius: 7px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.loc-btn:hover { background: #2f6a6e; }
.loc-btn-link { background: none; border: none; padding: 0; font: inherit; font-size: 13px; color: #3a7d82; text-decoration: underline; cursor: pointer; }
.card-LOW      { border-left: 4px solid #3a7d82; }
.card-MEDIUM   { border-left: 4px solid #c07a10; }
.card-HIGHER   { border-left: 4px solid #b03020; }
.card-HIGH     { border-left: 4px solid #b03020; }
.card-CRITICAL { border-left: 4px solid #b03020; }
.risk-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; margin-bottom: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.rdot { width: 6px; height: 6px; border-radius: 50%; }
.badge-LOW      { background:#e4f4f0; color:#3a7d82; } .badge-LOW .rdot      { background:#3a7d82; }
.badge-MEDIUM   { background:#fdf3e3; color:#c07a10; } .badge-MEDIUM .rdot   { background:#c07a10; }
.badge-HIGHER   { background:#fdecea; color:#b03020; } .badge-HIGHER .rdot   { background:#b03020; }
.badge-HIGH     { background:#fdecea; color:#b03020; } .badge-HIGH .rdot     { background:#b03020; }
.badge-CRITICAL { background:#fdecea; color:#b03020; } .badge-CRITICAL .rdot { background:#b03020; }
.risk-section { margin-top: 14px; }
.risk-section h4 { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; color: #9acfd2; margin-bottom: 6px; font-weight: 600; }
.risk-section h4.sh-bold { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: #1e2333; margin-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.07); padding-bottom: 5px; }
.client-desc { font-size: 13px; color: #1c2a24; line-height: 1.7; background: rgba(58,125,130,0.05); border-left: 3px solid rgba(58,125,130,0.35); padding: 9px 13px; border-radius: 0 5px 5px 0; }
.risk-section p { font-size: 13px; color: #0f2d30; line-height: 1.6; }
.ref-block { background:#fff; border:1px solid #d0e7e8; border-radius:7px; padding:9px 12px; margin-top:5px; font-size:12.5px; color:#0f2d30; line-height:1.55; }
.ref-block a { color: #3a7d82; }
.reminders-section { border-top: 1px solid #e5f0f1; margin-top: 14px; padding-top: 2px; }
.reminder-list { list-style: none; padding: 0; margin: 0; }
.reminder-list li { font-size: 12px; color: #9acfd2; line-height: 1.6; padding: 2px 0 2px 14px; position: relative; }
.reminder-list li::before { content: "\2022"; color: #3a7d82; position: absolute; left: 0; }
.ref-block a { color: #3a7d82; }

/* INPUT */
.input-wrap { background: #e8f4f4; border: none; border-top: 1px solid #c5e3e5; padding: 12px 16px 14px; }
.input-main-row { display: flex; gap: 10px; align-items: stretch; }
.input-row {
  flex: 1; display: flex; align-items: flex-end; gap: 10px;
  background: #f2f9fa; border: 2px solid #cce9ea;
  border-radius: 12px; padding: 12px 14px;
  min-height: 56px;
  box-shadow: 0 2px 8px rgba(58,125,130,0.10);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input-row:focus-within { border-color: #3a7d82; background: #fff; box-shadow: 0 3px 14px rgba(58,125,130,0.20); }
textarea {
  flex: 1; border: none; background: transparent;
  font-family: "Outfit", sans-serif; font-size: 15px;
  color: #0f2d30; resize: none; outline: none;
  line-height: 1.55; max-height: 130px; min-height: 26px;
  align-self: center;
}
textarea::placeholder { color: #a8d9db; }
.ic-btn {
  width: 40px; height: 40px; border: none; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s; flex-shrink: 0;
}
.mic-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 70px; flex-shrink: 0;
  background: #3a7d82;
  border: none; border-radius: 12px; color: #fff;
  font-family: "Outfit", sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(58,125,130,0.38), 0 1px 3px rgba(0,0,0,0.10);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  padding: 10px 8px; min-height: 56px;
}
.mic-btn:hover { background: #2d6872; box-shadow: 0 6px 18px rgba(58,125,130,0.48); transform: translateY(-1px); }
.mic-btn:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(58,125,130,0.30); }
.mic-btn.rec {
  background: #c0392b;
  /* --stt-level (0–1) set by JS; drives breathing glow proportional to voice volume */
  box-shadow:
    0 0 0 calc(var(--stt-level, 0) * 8px + 3px) rgba(192,57,43,0.35),
    0 0 0 calc(var(--stt-level, 0) * 16px + 6px) rgba(192,57,43,0.12);
  transition: box-shadow 0.12s ease-out;
  animation: none;
}
.mic-btn.rec:hover { background: #a93226; }
.mic-btn svg { flex-shrink: 0; opacity: 0.92; }
textarea.listening { border-color: #3a7d82; background: #f2f9fa; }
.snd-btn { background: #3a7d82; color: #fff; box-shadow: 0 3px 10px rgba(58,125,130,0.38), 0 1px 3px rgba(0,0,0,0.10); }
.snd-btn:hover    { background: #2d6872; box-shadow: 0 5px 14px rgba(58,125,130,0.48); transform: translateY(-1px) !important; }
.snd-btn:active   { transform: scale(0.93) !important; box-shadow: 0 2px 6px rgba(58,125,130,0.25); }
.snd-btn:disabled { background: #b5e0e2; box-shadow: none; cursor: not-allowed; }
.foot-note {
  text-align: left; font-size: 10.5px; color: #3a7d82;
  margin-top: 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 4px; line-height: 1.5;
}
.foot-left { display: flex; align-items: center; gap: 4px; }
.dl-btn {
  background: transparent; border: 1.5px solid #3a7d82; border-radius: 7px;
  padding: 5px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  color: #3a7d82; font-size: 11px; font-weight: 600;
  font-family: "Outfit", sans-serif; white-space: nowrap;
  box-shadow: 0 1px 5px rgba(58,125,130,0.15);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.dl-btn:hover { background: #3a7d82; color: #fff; box-shadow: 0 4px 12px rgba(58,125,130,0.35); transform: translateY(-1px); }
.dl-btn:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(58,125,130,0.20); }

/* RTL */
.rtl-chat { direction: rtl; }
.rtl-chat .msg.ai .bbl { padding: 0 41px 0 0; }
.rtl-chat .ai-header { flex-direction: row-reverse; }

/* RESPONSIVE */
@media (max-width: 520px) {
  body { padding: 0; align-items: flex-start; }
  .disc-card, .lang-card, .chat-card, .tri-card { border-radius: 0; min-height: 100vh; }
  .chat-body { height: calc(100vh - 210px); min-height: 260px; }
  .bbl { max-width: 86%; }
  .head-div, .head-sub { display: none; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
  .disc-body { padding: 12px 16px 16px; }
  .tri-body { padding: 16px 16px 20px; }
}
@media (max-width: 360px) {
  .lang-grid { grid-template-columns: 1fr; }
}

/* ─── TRIAGE ("What's brought you here?") ─── */
.tri-card { max-width: 682px; margin: 0 auto; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.13); }
.tri-body { padding: 26px 28px 22px; }
.tri-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #3a7d82; text-align: center; margin-bottom: 6px; }
.tri-h2 { font-size: 24px; font-weight: 700; color: #0f2d30; text-align: center; margin-bottom: 8px; font-family: "Outfit", sans-serif; line-height: 1.2; }
.tri-intro { font-size: 13.5px; color: #2a4e4a; text-align: center; line-height: 1.55; margin-bottom: 18px; }
.tri-group { display: flex; flex-direction: column; gap: 9px; }
.tri-opt { display: flex; align-items: flex-start; gap: 12px; background: #f8fcfb; border: 1.5px solid #d4e2e0; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.tri-opt:hover { border-color: #9cc4c2; background: #f2f9f8; }
.tri-opt input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: #3a7d82; cursor: pointer; }
.tri-opt.selected { border-color: #3a7d82; background: #eef6f5; box-shadow: inset 0 0 0 1px #3a7d82; }
.tri-opt-body { flex: 1; }
.tri-opt-title { font-size: 14px; font-weight: 600; color: #0f2d30; line-height: 1.4; }
.tri-opt-sub { font-size: 12.5px; color: #5a7d78; line-height: 1.45; margin-top: 2px; }
.tri-divider { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: #7d9a96; margin: 12px 2px 2px; }
.tri-sub { font-size: 12px; color: #5a8a84; line-height: 1.6; margin: 16px 0 4px; }
.tri-actions { display: flex; gap: 12px; margin-top: 14px; }
.tri-back { flex: 0 0 auto; padding: 13px 20px; border: 1.5px solid #d4e2e0; background: #fff; color: #3a7d82; border-radius: 9px; font-size: 14px; font-weight: 600; font-family: "Outfit", sans-serif; cursor: pointer; transition: background .15s, border-color .15s; }
.tri-back:hover { background: #f2f9f8; border-color: #9cc4c2; }
.tri-start { flex: 1 1 auto; padding: 13px; border: none; border-radius: 9px; font-size: 15px; font-weight: 700; font-family: "Outfit", sans-serif; letter-spacing: 0.02em; background: #b8cccb; color: rgba(255,255,255,0.7); cursor: not-allowed; pointer-events: none; transition: background .2s, box-shadow .2s, transform .15s; }
.tri-start.on { background: #3a7d82; color: #fff; cursor: pointer; pointer-events: auto; box-shadow: 0 4px 16px rgba(58,125,130,0.42), 0 1px 3px rgba(0,0,0,0.10); }
.tri-start.on:hover { background: #2f666b; transform: translateY(-1px); box-shadow: 0 7px 22px rgba(58,125,130,0.50); }
.tri-start.on:active { transform: scale(0.98); }
[dir=rtl] .tri-eyebrow, [dir=rtl] .tri-h2, [dir=rtl] .tri-intro { text-align: center; }

/* ─── DUAL PANE ─── */
.pane-container { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane-left { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane-right { display: none; }
#widgetWrapper.dual-pane { max-width: 2560px; }
#widgetWrapper.dual-pane .pane-container { flex-direction: row; }
#widgetWrapper.dual-pane .pane-left { flex: 1; min-width: 0; border-right: 2px solid #c5e8ea; }
#widgetWrapper.dual-pane .pane-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f4fbfc; }
#widgetWrapper.dual-pane .chat-body { height: 720px; }
.pane-right-header { padding: 8px 14px; border-bottom: 1px solid #c5e8ea; background: #eff8f9; }
#paneRightLabel { font-weight: 400; color: #3a7d82; font-size: 11.5px; }
#chatMirror { flex: 1; overflow-y: auto; padding: 12px; height: 720px; }
.mirror-pending { display: flex; gap: 10px; align-items: flex-end; opacity: 0.55; }
.mirror-pending-dots { font-size: 12px; color: #3a7d82; font-style: italic; padding: 8px 12px; }
.mirror-translated-note { display: block; font-size: 10px; color: #b8e0e2; text-align: right; margin-top: 4px; font-style: italic; }

/* ── LANGUAGE SELECT MODAL ── */
#langSelectPage { position: fixed; inset: 0; z-index: 9100; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; padding: 16px; }
#langSelectPage.visible { display: flex; }
.lsp-card { background: #fff; border-radius: 16px; box-shadow: 0 12px 48px rgba(0,0,0,0.12); overflow: hidden; width: 100%; max-width: 660px; max-height: 90vh; display: flex; flex-direction: column; }
.lsp-hdr { background: #3a7d82; padding: 16px 24px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lsp-back { background: rgba(255,255,255,0.18); border: none; border-radius: 8px; color: #fff; padding: 6px 12px; font-family: inherit; font-size: 13px; cursor: pointer; }
.lsp-back:hover { background: rgba(255,255,255,0.28); }
.lsp-hdr-title { color: #fff; font-size: 16px; font-weight: 700; }
.lsp-body { padding: 20px 24px 24px; overflow-y: auto; }
.lsp-sub { font-size: 12px; color: #8a8a82; text-align: center; margin-bottom: 16px; }
.lsp-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.lsp-btn { background: #f8fafa; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 12px 10px; cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s; font-family: inherit; width: 100%; }
.lsp-btn:hover { border-color: #3a7d82; background: #edf7f8; }
.lsp-btn.selected { border-color: #3a7d82; background: #e8f3f0; }
.lsp-btn .lb-main { display: block; font-size: 15px; font-weight: 700; color: #1a1a18; }
.lsp-btn .lb-sub { display: block; font-size: 11px; color: #8a8a82; margin-top: 2px; }
@media(max-width:500px){ .lsp-grid{ grid-template-columns: 1fr 1fr; } }

/* ─── Formerly inline (security review 1 Nov 2026, L-06) ───
   style-src no longer allows 'unsafe-inline', so nothing on the page may carry a style attribute or
   an inline <style>. Styles set from script (el.style, cssText) are not affected. */
.ack-row[hidden] { display: none; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.exit-btn.exit-btn-inline { margin-left: 0; }
#mic-label { font-size: 10px; font-weight: 600; letter-spacing: 0.03em; line-height: 1.3; opacity: 0.92; }
#privacyOverlay { display: none; position: fixed; inset: 0; z-index: 9999; backdrop-filter: blur(3px) brightness(1.06); -webkit-backdrop-filter: blur(3px) brightness(1.06); background: rgba(255,255,255,0.10); }

/* Recommended-services cards, journey-tool style (were injected by ensureReportStyles in app.js). */
.ref-disclaimer{background:#f7fbfa;border:1px solid #e6e0d4;border-left:3px solid #8a8378;border-radius:8px;padding:11px 13px;margin:2px 0 14px;font-size:12px;line-height:1.55;color:#5a6b70}
.ref-group{margin-top:6px}
.ref-group-hed{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a8378;margin:14px 0 8px}
.ref-item{background:#fff;border:1px solid #e6e0d4;border-left:3px solid #1f9aa0;border-radius:8px;padding:12px 14px;margin-bottom:10px}
.ref-item.ref-paid{border-left-color:#c8825b}
.ref-service{font-size:15px;font-weight:600;color:#1a2a2e;line-height:1.4}
.ref-service a{color:#1f9aa0;text-decoration:none}
.ref-service a:hover{text-decoration:underline}
.ref-fee-badge{display:inline-block;margin-left:8px;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#c8825b;border:1px solid #c8825b;border-radius:4px;padding:1px 6px;vertical-align:middle}
.ref-rationale{font-size:13px;color:#5a6b70;line-height:1.5;margin-top:5px}
.ref-fee-access{font-size:12px;color:#c8825b;font-style:italic;margin-top:6px}
/* Quick exit on every screen and in every overlay that covers one (re-audit 1 Nov 2026, F-01). */
.lsp-hdr .lsp-exit { margin-left: auto; min-width: 0; height: 32px; }
.dl-confirm-card .disc-exit-row { margin-bottom: 4px; }
