﻿/* ============================================================

   TRUIO ANALYZER — FINAL CSS (CLEAN + UNIFIED LOGIN GATE)

   All UI/UX preserved — 500px layout locked

   ============================================================ */





/* ------------------------------------------------------------

   1) GLOBAL VARIABLES & RESET

   ------------------------------------------------------------ */

:root {

  --color-primary-start: #20BFD8;

  --color-primary-end: #0072ff;

  --text-accent: #20BFD8;

  --text-secondary: #9ca3af;



  --bg-main: #000000;

  --bg-card: #0e0e0e;

  --bg-input: #151515;



  --border-color: #123b4f;

  --glow-color: rgba(32,191,216,0.55);



  --max-width: 500px;

}



html, body {

  margin: 0;

  padding: 0;

  height: 100%;

  background: var(--bg-main);

  font-family: "Inter", sans-serif;

  color: white;

  -webkit-font-smoothing: antialiased;

  overflow-x: hidden;

}

body.truio-routing-pending #mainContainer {
  visibility: hidden;
}

body.truio-onboarding-result-step #mainContainer {
  visibility: hidden;
}



* {

  -webkit-tap-highlight-color: rgba(66,194,183,0);

  border-collapse: separate;

}





/* ------------------------------------------------------------

   2) APP WRAPPER (500px max width)

   ------------------------------------------------------------ */

#truioApp {

  width: 100%;

  max-width: var(--max-width);

  margin: 0 auto;

  padding: 0;

  box-sizing: border-box;

  text-align: initial !important;

}





/* ------------------------------------------------------------

   3) MAIN CARD (No UI changes)

   ------------------------------------------------------------ */

#mainContainer {

  width: 100%;

  max-width: var(--max-width);

  box-sizing: border-box;



  background: var(--bg-card);

  border: 2px solid var(--border-color);

  border-radius: 20px;



  padding: 16px;

  margin-top: 24px;



  box-shadow: inset 0 0 10px rgba(32,191,216,0.28);

  animation: pulseGlow 3.4s ease-in-out infinite;

}



@keyframes pulseGlow {

  0%   { box-shadow: inset 0 0 5px rgba(32,191,216,0.18); }

  50%  { box-shadow: inset 0 0 18px rgba(32,191,216,0.55); }

  100% { box-shadow: inset 0 0 5px rgba(32,191,216,0.18); }

}





/* ------------------------------------------------------------

   4) HEADER

   ------------------------------------------------------------ */

#headerBlock { text-align: center; margin-bottom: 6px; }

#mainLogo { width: min(82vw, 339px); margin: 0 auto 4px auto; display: block; }



#headerTitle {

  font-size: 24px;

  font-weight: 800;

  letter-spacing: 1px;

  margin: 2px 0 4px 0;

  color: #d9f8ff;

  text-shadow: 0 0 6px rgba(32,191,216,0.45);

}





/* ------------------------------------------------------------

   5) TEXT INPUT

   ------------------------------------------------------------ */

#userInput {

  width: 100%;

  background: var(--bg-input);

  color: white;



  border: 1px solid var(--border-color);

  border-radius: 12px;



  padding: 12px;

  margin: 8px 0 10px 0;



  resize: none;

  font-size: 15px;

  outline: none;

  box-sizing: border-box;

}



#userInput:focus {

  border-color: var(--color-primary-start);

  outline: 3px solid var(--color-primary-start);

  outline-offset: 2px;

  box-shadow: 0 0 0 4px rgba(32, 191, 216, 0.35), 0 0 12px rgba(32, 191, 216, 0.5);

}





/* ------------------------------------------------------------

   6) IMAGE INPUT

   ------------------------------------------------------------ */

#imageInputArea { margin-bottom: 10px; }



#imageInputTrigger {

  background: var(--bg-input);

  border: 1px solid var(--border-color);

  border-radius: 12px;

  padding: 16px;

  text-align: center;

  cursor: pointer;

}



#thumbnailContainer { color: var(--text-secondary); }



.defaultThumb svg {

  width: 40px;

  height: 40px;

  stroke: var(--text-secondary);

}



.defaultThumb p { font-size: 13px; margin-top: 8px; }

#noImageText { font-weight: 700; color: var(--text-accent); }







#uploadPictures,

#uploadDocuments {

  display: none;

}





/* ------------------------------------------------------------

   7) DROPDOWN MENUS

   ------------------------------------------------------------ */

.menuModal {

  width: 100%;

  background: var(--bg-card);



  border: 1px solid var(--border-color);

  border-radius: 14px;



  padding: 10px;

  margin-top: 10px;

  display: none;



  box-sizing: border-box;

  text-align: center;

  z-index: 30;

}



.menuModal button {

  width: 100%;

  padding: 12px;

  margin-bottom: 10px;



  border-radius: 10px;

  border: 1px solid var(--border-color);

  background: #141414;



  font-size: 18px;

  color: var(--text-accent);

  cursor: pointer;

}



.menuModal button:last-child { margin-bottom: 0; }



.menuTitle {

  font-size: 20px;

  font-weight: 700;

  margin-bottom: 6px;

  color: var(--text-accent);

}





/* ------------------------------------------------------------

   8) DASHBOARD ACTIONS

   ------------------------------------------------------------ */

#dashboardActionGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}

.dashboardDarkZone {
  margin: 14px -16px -16px;
  padding: 20px 16px 16px;
  border-radius: 0 0 18px 18px;
  background: #020202;
  color: #e5edf2;
}

.dashboardDarkZone #dashboardActionGrid {
  margin-top: 0;
}

.dashboardActionButton {
  width: 100%;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(32,191,216,0.42);
  background: var(--bg-input);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  box-sizing: border-box;
  cursor: pointer;
  transition: 0.2s ease;
}

.dashboardActionButton:hover,
.dashboardActionButton:focus-visible {
  border-color: var(--color-primary-start);
  color: var(--text-accent);
  transform: translateY(-1px);
}

.dashboardActionIcon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff;
  font-size: 0;
  font-weight: 900;
}

.dashboardActionIcon::before {
  content: "V";
  font-size: 14px;
}

.dashboardImageAction {
  min-height: 0;
  aspect-ratio: 10 / 3;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
}

#universalInputTrigger.dashboardImageAction,
#voiceButton.dashboardImageAction {
  min-height: 0 !important;
}

.dashboardImageAction img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

#universalInputTrigger.dashboardImageAction .universalInputCopy {
  width: 100%;
  height: 100%;
  display: block;
}

#voiceButton.dashboardImageAction > span {
  display: none !important;
}

#learnActionRow {
  display: flex;
  justify-content: center;
  margin: 10px 0 8px;
}

#learnButton {
  width: auto;
  min-height: 34px;
  min-width: min(100%, 132px);
  padding: 7px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 750;
  opacity: 0.88;
}

.truioAnnouncementCarousel {
  width: 100%;
  max-width: 500px;
  margin: 12px auto 0;
}

.truioCarouselViewport {
  width: 100%;
  aspect-ratio: 5 / 3;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-input);
  overflow: hidden;
}

.dashboardDarkZone .truioAnnouncementCarousel,
.composerAnnouncementCarousel {
  width: calc(100% + 32px);
  max-width: none;
  margin-left: -16px;
  margin-right: -16px;
}

.dashboardDarkZone .truioAnnouncementCarousel {
  margin-top: 40px;
}

.dashboardDarkZone .truioCarouselViewport,
.composerAnnouncementCarousel .truioCarouselViewport {
  border: 0;
  border-radius: 0;
  background: #020202;
}

.truioCarouselItem {
  display: none;
  width: 100%;
  height: 100%;
}

.truioCarouselItem.is-active {
  display: block;
}

.truioCarouselVideo {
  display: block;
  width: 100%;
  height: 100%;
  background: #020712;
  object-fit: contain;
}

.truioCarouselControls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.truioAnnouncementCarousel.has-multiple .truioCarouselControls {
  display: flex;
}

.truioCarouselArrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.truioCarouselDots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.truioCarouselDot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: var(--text-secondary);
  opacity: 0.55;
  padding: 0;
  cursor: pointer;
}

.truioCarouselDot.is-active {
  background: var(--color-primary-start);
  opacity: 1;
}

#updateRow {
  margin-top: 12px;
  color: #d6dee4;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

#authToggleArea {
  margin-right: 10px;
  color: #7ee9f7;
  text-decoration: underline;
  cursor: pointer;
}

#reloadBtn {
  border: 0;
  background: transparent;
  color: #7ee9f7;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}



#analyzeButton {

  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));

  color: #fff;

  box-shadow: 0 0 14px rgba(0,114,255,0.35);

}

#analyzeButton:hover {

  background: linear-gradient(90deg, var(--color-primary-end), var(--color-primary-start));

  transform: translateY(-1px);

}



#forensicButton {

  background: var(--bg-input);

  border: 2px solid var(--color-primary-end);

  color: var(--text-accent);

  position: relative;

  overflow: hidden;

}



#forensicButton::after {

  content: "";

  position: absolute;

  top: 0;

  left: -80%;

  width: 60%;

  height: 100%;

  background: linear-gradient(120deg, transparent, rgba(32,191,216,0.45), transparent);

  transform: skewX(-20deg);

  animation: sweep 2.8s linear infinite;

}



@keyframes sweep {

  from { left: -80%; }

  to   { left: 140%; }

}





/* ------------------------------------------------------------

   9) RESULTS

   ------------------------------------------------------------ */

#resultContainer {

  display: none;

  margin-top: 12px;

}



#safeScoreCard {
  display: grid;
  grid-template-columns: minmax(84px, 30%) 1px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 7px 20px;
  margin-bottom: 20px;

  background: var(--bg-input);
  border: 2px solid var(--text-accent);

  border-radius: 14px;

}

/* Result score card: keep dark in light app mode, with a neutral inner glow only. */
#safeScoreCard {
  background: #0e0e0e !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 18px rgba(32, 191, 216, 0.34) !important;
}

#safeScoreCard .label {
  color: #9ca3af !important;
}

#safeScoreCard.safe,
#safeScoreCard.caution,
#safeScoreCard.warning,
#safeScoreCard.danger {
  box-shadow: inset 0 0 18px rgba(32, 191, 216, 0.34) !important;
}

#safeScoreCard.safe {
  border-color: #00ff88 !important;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4) !important;
}

#safeScoreCard.caution {
  border-color: #ffaa00 !important;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.4) !important;
}

#safeScoreCard.warning {
  border-color: #ff6600 !important;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.4) !important;
}

#safeScoreCard.danger {
  border-color: #ff0000 !important;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4) !important;
}

body:not(.expert-mode-active) #userInput,
body:not(.expert-mode-active) #imageInputTrigger,
body:not(.expert-mode-active) #iosNativeImageInput {
  background: #f2f5f7 !important;
  color: #000 !important;
}

body:not(.expert-mode-active) #userInput::placeholder {
  color: #000 !important;
  opacity: 1 !important;
}

body:not(.expert-mode-active) #thumbnailContainer,
body:not(.expert-mode-active) #thumbnailContainerPwa,
body:not(.expert-mode-active) .defaultThumb p {
  color: #000 !important;
}

body:not(.expert-mode-active) .defaultThumb svg {
  stroke: #334155 !important;
}

/* Retired scrolling alert ticker. */
#adContainer,
#tickerBar,
#tickerTrack {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Normal app mode is light. Expert Mode keeps the original dark shell. */
body:not(.expert-mode-active) {
  --bg-main: #000000;
  --bg-card: #ffffff;
  --bg-input: #f2f5f7;
  --border-color: #d8e2eb;
  --text-secondary: #475569;

  background: #000000 !important;
  color: #0f172a !important;
}

body.truio-embed:not(.expert-mode-active),
html.truio-embed body:not(.expert-mode-active) {
  background: transparent !important;
}

body:not(.expert-mode-active) #mainContainer {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 0 !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08) !important;
  animation: none !important;
}

body.truio-lite:not(.expert-mode-active) #mainContainer {
  box-shadow: none !important;
}

body:not(.expert-mode-active) .sectionLabelTitle,
body:not(.expert-mode-active) #headerTitle,
body:not(.expert-mode-active) #responseText,
body:not(.expert-mode-active) #messageBox,
body:not(.expert-mode-active) #scamConcernsCard,
body:not(.expert-mode-active) #feedbackSection {
  color: #0f172a !important;
  text-shadow: none !important;
}

body:not(.expert-mode-active) .sectionLabelDesc,
body:not(.expert-mode-active) #infoBanner p,
body:not(.expert-mode-active) #updateRow,
body:not(.expert-mode-active) .subtleText {
  color: #475569 !important;
}

body:not(.expert-mode-active) #messageBox,
body:not(.expert-mode-active) #scamConcernsCard,
body:not(.expert-mode-active) #feedbackSection,
body:not(.expert-mode-active) #thumbnailContainer,
body:not(.expert-mode-active) #thumbnailContainerPwa {
  background: #f8fafc !important;
  border-color: #d8e2eb !important;
}

body:not(.expert-mode-active) #userInput,
body:not(.expert-mode-active) #imageInputTrigger,
body:not(.expert-mode-active) #iosNativeImageInput {
  border-color: #d8e2eb !important;
  box-shadow: none !important;
}

body:not(.expert-mode-active) #userInput:focus {
  border-color: var(--color-primary-start) !important;
  outline: 3px solid var(--color-primary-start) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(32, 191, 216, 0.35), 0 0 12px rgba(32, 191, 216, 0.5) !important;
}

body:not(.expert-mode-active) .sectionLabelTitle {
  font-size: 18px !important;
  font-weight: 800 !important;
}

body:not(.expert-mode-active) .sectionLabelDesc {
  font-size: 18px !important;
  color: #111827 !important;
}

body:not(.expert-mode-active) #updateRow {
  color: #111827 !important;
  font-size: 15px !important;
}

body:not(.expert-mode-active) .dashboardDarkZone #updateRow {
  color: #d6dee4 !important;
}

body:not(.expert-mode-active) .dashboardDarkZone #authToggleArea,
body:not(.expert-mode-active) .dashboardDarkZone #reloadBtn {
  color: #7ee9f7 !important;
}

body:not(.expert-mode-active) #userInput {
  font-size: 16px !important;
}

html.truio-lite #feedbackSection,
html.truio-lite #feedbackPopup,
body.truio-lite #feedbackSection,
body.truio-lite #feedbackPopup {
  display: none !important;
}

#truioLiteResultOverlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-sizing: border-box;
}

.truio-lite-result-dialog {
  position: relative;
  width: min(94vw, 620px);
  max-height: min(82vh, 680px);
  overflow: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  padding: 18px 14px 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.truio-lite-result-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.truio-lite-result-close:hover {
  color: #b91c1c;
}

.truio-lite-result-dialog #scamConcernsCard h3 {
  text-align: center;
  margin-top: 0;
}

.trustStatusPanel,
.trustScorePanel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trustStatusPanel {
  align-items: center;
  gap: 4px;
}

.trustScorePanel {
  align-items: center;
  gap: 4px;
}

.trustDivider {
  width: 1px;
  height: 40px;
  background: rgba(32, 191, 216, 0.28);
}

#trustShieldIcon {
  width: 34px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shield-outline {
  stroke-width: 2;
}

.shield-mark {
  display: none;
  stroke-width: 3;
}

.shield-alert-dot {
  stroke-linecap: round;
}

#safeScoreCard .label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#scoreValue { font-size: 30px; font-weight: 700; line-height: 1; }
#scoreTier  { font-size: 12px; font-weight: 700; line-height: 1; }




#scamConcernsCard {

  background: var(--bg-input);

  border: 1px solid var(--border-color);

  border-radius: 14px;

  padding: 14px;

}



#scamConcernsCard h3 {

  margin: 0 0 8px 0;

  color: var(--text-accent);

}





/* ------------------------------------------------------------

   10) UPDATE NOTICE

   ------------------------------------------------------------ */

#updateNotice {

  margin-top: 6px;

  color: #aaa;

  font-size: 13px;

  text-align: center;

}



#reloadBtn {

  background: none;

  color: var(--text-accent);

  border: none;

  cursor: pointer;

}





/* ------------------------------------------------------------

   11) ANALYSIS HEADER

   ------------------------------------------------------------ */

#analysisHeader {

  display: none;

  margin-top: 18px;

  text-align: center;

  opacity: 0;

  animation: analysisPulse 2.8s ease-in-out infinite;

}



@keyframes analysisPulse {

  0%   { opacity: 0.45; }

  50%  { opacity: 1; }

  100% { opacity: 0.45; }

}





/* ------------------------------------------------------------

   12) SCAN VIDEO OVERLAY

   ------------------------------------------------------------ */

#scanOverlay {

  display: none;

  justify-content: center;

  align-items: center;

  margin-top: 10px;

}



#scanVideo {

  width: min(100%, 500px) !important;

  max-width: 500px !important;

  height: auto !important;

  margin-top: 10px;

  object-fit: contain !important;

  pointer-events: none;

  user-select: none;

}





/* ------------------------------------------------------------

   13) SECONDARY ICON ROW

   ------------------------------------------------------------ */

#secondaryRow {

  width: 100%;

  display: grid;

  grid-template-columns: 2fr 1fr 1fr;

  gap: 12px;

  margin: 12px 0;

}



#secondaryRow a {

  display: flex;

  justify-content: center;

  align-items: center;



  height: 86px;

  border-radius: 14px;



  background: none;

  text-decoration: none;

  

  /* Prevent the entire container from being clickable */

  pointer-events: none;

}



#secondaryRow a img {

  max-width: 90%;

  max-height: 80%;

  

  /* Make only the image clickable */

  pointer-events: auto;

  cursor: pointer;

}





/* ------------------------------------------------------------

   14) AD SECTION

   ------------------------------------------------------------ */

#adContainer {

  width: 100%;

  max-width: 500px;

  margin: 16px auto 0 auto;

  box-sizing: border-box;

  overflow: hidden;

  border-top: 1px solid rgba(32,191,216,0.2);

  border-bottom: 1px solid rgba(32,191,216,0.2);

}



#tickerBar {

  width: 100%;

  overflow: hidden;

  padding: 9px 0;

  background: rgba(32,191,216,0.04);

}



#tickerTrack {

  display: flex;

  gap: 56px;

  white-space: nowrap;

  animation: tickerScroll 45s linear infinite;

}



#tickerTrack span {

  flex-shrink: 0;

  font-size: 13px;

  color: #20BFD8;

  letter-spacing: 0.2px;

}



@keyframes tickerScroll {

  from { transform: translateX(0); }

  to   { transform: translateX(-50%); }

}



/* Coming Soon badge on Agent Report button */

.agentComingSoon {

  opacity: 0.7;

  pointer-events: none !important;

  position: relative;

}



.comingSoonBadge {

  position: absolute;

  top: 6px;

  right: 6px;

  background: #20BFD8;

  color: #000;

  font-size: 9px;

  font-weight: 700;

  padding: 2px 6px;

  border-radius: 6px;

  letter-spacing: 0.3px;

  text-transform: uppercase;

  pointer-events: none;

  z-index: 1;

}





/* ------------------------------------------------------------

   15) IDLE MODE

   ------------------------------------------------------------ */

body.idle-mode #mainContainer { transform: none; }

body.idle-mode #userInput { margin-top: 6px !important; margin-bottom: 6px !important; }

body.idle-mode #adContainer { margin-top: 4px !important; }





/* ------------------------------------------------------------

   16) ANALYSIS MODE

   ------------------------------------------------------------ */

body.analysis-mode #mainContainer { display: none !important; }

body.analysis-mode #analysisHeader { display: block !important; }

body.analysis-mode #scanOverlay { display: flex !important; }





/* ------------------------------------------------------------

   17) UNIFIED LOGIN GATE (FIXED - lighter overlay, less top padding)

   ------------------------------------------------------------ */



/* Full-screen dark overlay - LIGHTER for Google popup visibility */

#loginGate {

  position: fixed;

  inset: 0;

  background: rgba(0,0,0,0.25);

  display: none;

  justify-content: center;

  align-items: flex-start;

  padding-top: 30px;

  z-index: 99999;

}



/* 500px centered card */

#loginGateInner {

  width: 100%;

  max-width: 500px;

  background: #0e0e0e;

  border-radius: 18px;

  padding: 24px;

  border: 1px solid rgba(32,191,216,0.35);

  box-shadow: 0 0 22px rgba(32,191,216,0.25);

  box-sizing: border-box;

  text-align: center;

  animation: gateSlide 0.35s ease;

}



@keyframes gateSlide {

  from { transform: translateY(-20px); opacity: 0; }

  to   { transform: translateY(0); opacity: 1; }

}



#loginGateLogo {

  width: 200px;

  margin: 0 auto 6px auto;

}



#loginGateTitle {

  margin: 6px 0 2px 0;

  font-size: 24px;

  font-weight: 800;

  color: #d9f8ff;

}



#loginGateMsg {

  margin-top: 6px;

  margin-bottom: 20px;

  color: #9ca3af;

  font-size: 15px;

  line-height: 21px;

}





/* Buttons */

.loginGateButton {

  width: 100%;

  padding: 12px;

  border-radius: 10px;

  margin-bottom: 12px;

  font-size: 16px;

  cursor: pointer;

  font-weight: 600;

  transition: 0.2s ease;

}



.loginGateButton.google {

  background: #111;

  border: 1px solid rgba(32,191,216,0.4);

  color: #fff;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

}

.loginGateButton.google:hover {

  border-color: #20BFD8;

  box-shadow: 0 0 12px rgba(32,191,216,0.4);

}



.loginGateGoogleIcon { width: 22px; height: 22px; }


.loginGateButton.magic {

  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));

  border: none;

  color: #fff;

}

.loginGateButton.magic:hover { opacity: 0.9; }



.loginGateButton.continue {

  background: none;

  border: none;

  color: #9ca3af;

  margin-top: 4px;

}





/* Blur effect applied only to the 500px card when gate is open */

body.gate-blur #mainContainer {

  filter: blur(8px);

  opacity: 0.2;

  pointer-events: none;

}





/* ------------------------------------------------------------

   18) DESKTOP & MOBILE RULES

   ------------------------------------------------------------ */



/* Desktop */

@media (min-width: 769px) {

  html, body {

    height: 100%;

    overflow-y: hidden;

  }

}



/* Mobile */

@media (max-width: 768px) {

  html, body {

    overflow-y: auto !important;

    height: auto !important;

  }

}



/* PWA Standalone */

@supports(display-mode: standalone) {

  html, body {

    height: 100%;

    overflow-y: hidden !important;

    overflow-x: hidden !important;

    padding: 0 !important;

    margin: 0 !important;

  }



  #truioApp {

    padding: 0 !important;

    margin: 0 auto !important;

  }



  #mainContainer {

    margin-left: 0 !important;

    margin-right: 0 !important;

    border-radius: 0 !important;

  }

}





/* ------------------------------------------------------------

   19) MAX WIDTH ENFORCEMENT

   ------------------------------------------------------------ */

#mainContainer,

#adContainer,

#scanVideo,

#truioApp {

  max-width: 500px !important;

  width: 100% !important;

}



/* Fix analysis logo oversize issue */

#analysisHeaderLogo {

  width: 220px !important;

  max-width: 220px !important;

  height: auto !important;

  margin: 0 auto 4px auto !important;

  display: block !important;

}



/* Hide scrollbar but allow scrolling */

html, body {

  -ms-overflow-style: none;

  scrollbar-width: none;

}



html::-webkit-scrollbar,

body::-webkit-scrollbar {

  display: none;

}



/* Fix Google Login Popup z-index and brightness */

#credential_picker_container,

#credential_picker_container iframe,

div[role="presentation"] {

  z-index: 999999999 !important;

  pointer-events: auto !important;

  position: absolute !important;

}



/* Prevent loginGate from blocking GSI interaction */

#loginGate {

  pointer-events: none;

}



/* Re-enable clicks inside the gate itself */

#loginGateInner,

#loginGateInner * {

  pointer-events: auto;

}

#safeScoreCard {
  display: grid;
  grid-template-columns: minmax(118px, 34%) 1px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 14px 22px;
  margin-bottom: 20px;
  background: var(--bg-input);
  border: 2px solid var(--text-accent);
  border-radius: 14px;

}



#safeScoreCard.safe {

  border-color: #00ff88;

  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);

}



#safeScoreCard.caution {

  border-color: #ffaa00;

  box-shadow: 0 0 20px rgba(255, 170, 0, 0.4);

}



#safeScoreCard.warning {

  border-color: #ff6600;

  box-shadow: 0 0 20px rgba(255, 102, 0, 0.4);

}



#safeScoreCard.danger {
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

#safeScoreCard.neutral {
  border-color: #9aa3af;
  box-shadow: 0 0 20px rgba(154, 163, 175, 0.32);
}

.trustStatusPanel,
.trustScorePanel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trustStatusPanel {
  align-items: center;
  gap: 6px;
}

.trustScorePanel {
  align-items: flex-start;
  gap: 6px;
}

.trustDivider {
  width: 1px;
  height: 66px;
  background: rgba(32, 191, 216, 0.28);
}

#trustShieldIcon {
  width: 54px;
  height: 62px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shield-outline {
  stroke-width: 2;
}

.shield-mark {
  display: none;
  stroke-width: 3;
}

.shield-alert-dot {
  stroke-linecap: round;
}

#safeScoreCard .label {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

#scoreValue { font-size: 42px; font-weight: 800; line-height: 1; }
#scoreTier  { font-size: 18px; font-weight: 800; line-height: 1; }

#safeScoreCard.safe #scoreValue,
#safeScoreCard.safe #trustShieldIcon { color: #00ff88; }
#safeScoreCard.caution #scoreValue,
#safeScoreCard.caution #trustShieldIcon { color: #ffaa00; }
#safeScoreCard.warning #scoreValue,
#safeScoreCard.warning #trustShieldIcon { color: #ff6600; }
#safeScoreCard.danger #scoreValue,
#safeScoreCard.danger #trustShieldIcon { color: #ff0000; }
#safeScoreCard.neutral #scoreValue,
#safeScoreCard.neutral #trustShieldIcon { color: #9aa3af; }

#scoreTier.safe { color: #00ff88; }
#scoreTier.caution { color: #ffaa00; }
#scoreTier.warning { color: #ff6600; }
#scoreTier.danger { color: #ff0000; }
#scoreTier.neutral { color: #9aa3af; }

#safeScoreCard.safe .shield-check,
#safeScoreCard.caution .shield-alert,
#safeScoreCard.caution .shield-alert-dot,
#safeScoreCard.warning .shield-alert,
#safeScoreCard.warning .shield-alert-dot,
#safeScoreCard.danger .shield-x {
  display: block;
}

@media (max-width: 420px) {
  #safeScoreCard {
    grid-template-columns: minmax(92px, 32%) 1px 1fr;
    gap: 12px;
    min-height: 88px;
    padding: 12px;
  }

  #trustShieldIcon {
    width: 42px;
    height: 48px;
  }

  .trustDivider {
    height: 54px;
  }

  #scoreValue {
    font-size: 32px;
  }

  #scoreTier {
    font-size: 14px;
  }

  #safeScoreCard .label {
    font-size: 13px;
  }
}
/* User Disagree Feature */

#feedbackSection {

  margin-bottom: 16px;

  padding: 12px;

  background: var(--bg-input);

  border: 1px solid var(--border-color);

  border-radius: 12px;

}



#feedbackTrigger {

  display: flex;

  align-items: center;

  gap: 10px;

  cursor: pointer;

  font-size: 14px;

  color: var(--text-secondary);

  user-select: none;

}



#feedbackCheckbox {

  width: 18px;

  height: 18px;

  cursor: pointer;

  accent-color: var(--text-accent);

}



#feedbackTrigger:hover {

  color: var(--text-accent);

}



.feedback-popup {

  position: fixed;

  top: 0;

  left: 0;

  right: 0;

  bottom: 0;

  background: rgba(0, 0, 0, 0.85);

  display: flex;

  align-items: center;

  justify-content: center;

  z-index: 10000;

  padding: 20px;

  backdrop-filter: blur(4px);

}



.feedback-popup-content {

  background: var(--bg-card);

  border: 2px solid var(--border-color);

  border-radius: 16px;

  padding: 24px;

  max-width: 500px;

  width: 100%;

  box-shadow: 0 0 30px rgba(32, 191, 216, 0.3);

}



.feedback-popup-content h4 {

  margin: 0 0 16px 0;

  color: var(--text-accent);

  font-size: 18px;

  font-weight: 600;

}



.feedback-options {

  display: flex;

  flex-direction: column;

  gap: 12px;

  margin-bottom: 16px;

}



.feedback-options label {

  display: flex;

  align-items: center;

  gap: 10px;

  cursor: pointer;

  font-size: 14px;

  color: var(--text-secondary);

  padding: 8px;

  border-radius: 8px;

  transition: all 0.2s ease;

}



.feedback-options label:hover {

  background: var(--bg-input);

  color: white;

}



.feedback-options input[type="radio"] {

  width: 18px;

  height: 18px;

  cursor: pointer;

  accent-color: var(--text-accent);

}



#disputeText {

  width: 100%;

  padding: 12px;

  background: var(--bg-input);

  border: 1px solid var(--border-color);

  border-radius: 10px;

  color: white;

  font-family: "Inter", sans-serif;

  font-size: 14px;

  resize: vertical;

  margin-bottom: 16px;

  box-sizing: border-box;

}



#disputeText::placeholder {

  color: var(--text-secondary);

}



#disputeText:focus {

  outline: none;

  border-color: var(--text-accent);

  box-shadow: 0 0 8px rgba(32, 191, 216, 0.3);

}



.feedback-buttons {

  display: flex;

  gap: 12px;

}



.feedback-buttons button {

  flex: 1;

  padding: 12px 24px;

  border-radius: 10px;

  font-weight: 600;

  font-size: 14px;

  cursor: pointer;

  transition: all 0.2s ease;

  border: none;

}



#submitDisputeBtn {

  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));

  color: white;

}



#submitDisputeBtn:hover {

  transform: translateY(-1px);

  box-shadow: 0 4px 12px rgba(32, 191, 216, 0.4);

}



#cancelDisputeBtn {

  background: var(--bg-input);

  color: var(--text-secondary);

  border: 1px solid var(--border-color);

}



#cancelDisputeBtn:hover {

  background: var(--bg-card);

  color: white;

}



/* ===============================

   ALPHA POPUP

================================ */



.alpha-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
  box-sizing: border-box;
}


.alpha-popup.hidden {

  display: none;

}

body.truio-onboarding-v2-active #alphaPopup {
  padding: 0;
  background: #000000;
}

body.truio-onboarding-v2-active #alphaPopup .alpha-card {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100dvh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000000;
  box-shadow: none;
}



.alpha-card {
  width: 92%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  background: #0b0b0b;
  border: 1px solid #00ffe0;
  box-shadow: 0 0 25px rgba(0,255,224,0.35);
  padding: 20px;
  color: #fff;
  position: relative;
  border-radius: 12px;
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}

.alpha-card::-webkit-scrollbar {
  display: none;
}


.alpha-card h2 {

  margin-top: 0;

  color: #00ffe0;

}



.alpha-card p {

  font-size: 14px;

  line-height: 1.5;

  color: #ddd;

}



.alpha-note {

  margin-top: 12px;

  font-size: 13px;

  color: #aaa;

}



.alpha-card img {

  max-width: 100%;

  margin: 12px 0;

  border-radius: 6px;

}



.alpha-close {

  position: absolute;

  top: 8px;

  right: 10px;

  background: none;

  border: none;

  font-size: 22px;

  color: #888;

  cursor: pointer;

}



.alpha-close:hover {

  color: #fff;

}



.alpha-ok {

  margin-top: 14px;

  padding: 10px 18px;

  background: #00ffe0;

  color: #000;

  border: none;

  border-radius: 20px;

  font-weight: bold;

  cursor: pointer;

}



/* ============================================================

   TRUIO INSTALL OVERLAYS

   Add these styles to the END of your existing truio.css file

   ============================================================ */



/* ============================================================

   iOS INSTALL OVERLAY (GIF VERSION)

   ============================================================ */

.ios-install-overlay {

    display: none;

    position: fixed;

    inset: 0;

    background: #000;

    z-index: 99999;

    overflow-y: auto;

    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;

}



.ios-install-overlay-content {

    width: 100%;

    max-width: 500px;

    margin: 0 auto;

    padding: 40px 20px;

    text-align: center;

    box-sizing: border-box;

}



.ios-install-overlay h2 {

    color: #20BFD8;

    font-size: 24px;

    font-weight: 700;

    margin: 0 0 30px 0;

    text-transform: uppercase;

}



.install-dismiss-top {

    color: #00ff88;

    text-decoration: none;

    cursor: pointer;

    font-size: 14px;

    display: block;

    margin-bottom: 20px;

}



.install-dismiss-top:hover,

.install-dismiss-top:active {

    color: #00dd77;

    text-decoration: underline;

}



.install-overlay-image {

    width: 150px;

    height: 150px;

    margin: 0 auto 20px auto;

    border-radius: 20px;

    display: block;

    border: 2px solid #20BFD8;

    box-shadow: 0 0 20px rgba(32, 191, 216, 0.3);

}



.install-step {

    background: rgba(32, 191, 216, 0.05);

    border: 1px solid rgba(32, 191, 216, 0.2);

    border-radius: 12px;

    padding: 16px;

    margin: 0 auto 16px auto;

    max-width: 400px;

    box-sizing: border-box;

}



.install-step-number {

    color: #20BFD8;

    font-weight: 700;

    font-size: 18px;

    margin-bottom: 8px;

    display: block;

}



.install-step-text {

    color: #ddd;

    font-size: 15px;

    line-height: 1.6;

    margin: 0;

}



.install-steps-brief {

    text-align: left;

    margin: 20px auto;

    padding: 0 20px;

    max-width: 400px;

    box-sizing: border-box;

}



.install-steps-brief p {

    color: #ddd;

    font-size: 15px;

    line-height: 1.8;

    margin: 8px 0;

    word-wrap: break-word;

}



.install-shortcut-link {

    display: inline-block;

    background: #20BFD8;

    color: #000;

    padding: 14px 28px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: 700;

    font-size: 16px;

    margin: 20px 0;

    transition: all 0.2s;

}



.install-shortcut-link:hover,

.install-shortcut-link:active {

    background: #1a9fb5;

    transform: scale(0.98);

}



.install-dismiss {

    color: #20BFD8;

    text-decoration: underline;

    cursor: pointer;

    font-size: 16px;

    margin-top: 30px;

    display: inline-block;

}



.install-dismiss:hover,

.install-dismiss:active {

    color: #1a9fb5;

}



/* ============================================================

   ANDROID INSTALL OVERLAY

   ============================================================ */

.android-install-overlay {

    display: none;

    position: fixed;

    inset: 0;

    background: #000;

    z-index: 99999;

    overflow-y: auto;

    -webkit-overflow-scrolling: touch;

}



.install-overlay-content {

    width: 100%;

    max-width: 500px;

    margin: 0 auto;

    padding: 40px 20px;

    text-align: center;

}



.android-install-overlay h2 {

    color: #20BFD8;

    font-size: 24px;

    font-weight: 700;

    margin: 0 0 30px 0;

    text-transform: uppercase;

}



.install-overlay-image {

    width: 150px;

    height: 150px;

    margin: 0 auto 20px auto;

    border-radius: 20px;

    display: block;

    border: 2px solid #20BFD8;

    box-shadow: 0 0 20px rgba(32, 191, 216, 0.3);

}



.install-steps {

    text-align: left;

    margin: 30px 0;

}



.install-step {

    background: rgba(32, 191, 216, 0.05);

    border: 1px solid rgba(32, 191, 216, 0.2);

    border-radius: 12px;

    padding: 16px;

    margin-bottom: 16px;

}



.install-step-number {

    color: #20BFD8;

    font-weight: 700;

    font-size: 18px;

    margin-bottom: 8px;

    display: block;

}



.install-step-text {

    color: #ddd;

    font-size: 15px;

    line-height: 1.6;

    margin: 0;

}



.install-dismiss {

    color: #20BFD8;

    text-decoration: underline;

    cursor: pointer;

    font-size: 16px;

    margin-top: 30px;

    display: inline-block;

}



.install-dismiss:hover,

.install-dismiss:active {

    color: #1a9fb5;

}



/* ============================================================

   iOS STANDALONE WARNING

   ============================================================ */

.ios-standalone-warning {

    display: none;

    position: fixed;

    inset: 0;

    background: #000;

    z-index: 99999;

    overflow-y: auto;

    -webkit-overflow-scrolling: touch;

}



/* ============================================================

   iOS HOW-TO POPUP

   ============================================================ */

.howto-popup {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.85);

    z-index: 99998;

    align-items: center;

    justify-content: center;

}



.howto-popup-content {

    background: #0e0e0e;

    border: 1px solid rgba(32, 191, 216, 0.35);

    border-radius: 16px;

    padding: 24px;

    max-width: 400px;

    width: 90%;

    box-shadow: 0 0 20px rgba(32, 191, 216, 0.3);

    position: relative;

}



.howto-popup h3 {

    color: #20BFD8;

    margin: 0 0 20px 0;

    font-size: 20px;

}



.howto-popup-button {

    display: block;

    width: 100%;

    padding: 14px;

    margin-bottom: 12px;

    background: rgba(32, 191, 216, 0.1);

    border: 1px solid rgba(32, 191, 216, 0.3);

    border-radius: 10px;

    color: #20BFD8;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s;

}



.howto-popup-button:hover,

.howto-popup-button:active {

    background: rgba(32, 191, 216, 0.2);

    border-color: rgba(32, 191, 216, 0.5);

}



.howto-popup-button.primary {

    background: #20BFD8;

    color: #000;

    border-color: #20BFD8;

}



.howto-popup-button.primary:hover,

.howto-popup-button.primary:active {

    background: #1a9fb5;

}



.howto-popup-close {

    position: absolute;

    top: 12px;

    right: 12px;

    background: none;

    border: none;

    color: #666;

    font-size: 24px;

    cursor: pointer;

    padding: 4px 8px;

    line-height: 1;

}



.howto-popup-close:hover {

    color: #20BFD8;

}

/* Accessibility override: keep the text input focus ring visible in all app modes. */
html body #userInput:focus,
html body:not(.expert-mode-active) #userInput:focus,
html body.expert-mode-active #userInput:focus {
  border-color: var(--color-primary-start) !important;
  outline: 4px solid rgba(32, 191, 216, 0.85) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(32, 191, 216, 0.28), 0 0 14px rgba(32, 191, 216, 0.55) !important;
}

/* ==================================================================
   UNIVERSAL INPUT + TRUIO ADVISER (v1)
   ================================================================== */

#universalInputTrigger {
  width: 100%;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-input);
  color: var(--text-primary, #fff);
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 800;
}

#universalInputTrigger:hover {
  border-color: var(--color-primary-start);
}

#universalInputTrigger:focus-visible {
  outline: 3px solid var(--color-primary-start);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(32, 191, 216, 0.28);
}

#universalInputTrigger.has-content {
  border-color: var(--color-primary-start);
}

.universalInputIcon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
}

.universalInputCopy {
  min-width: 0;
  display: block;
}

.universalInputCopy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

#universalInputSummary {
  display: none !important;
}

#universalInputStatus {
  display: none !important;
}

#universalInputStatus:not(:empty) {
  display: none !important;
}

.universalEvidencePreview {
  display: none;
  margin: 8px 0 10px;
}

.universalEvidencePreview.has-images {
  display: block;
}

.universalEvidencePreview #imageInputTrigger {
  padding: 10px;
}

html.truio-lite #universalInputTrigger,
body.truio-lite #universalInputTrigger,
html.truio-lite #imageInputArea,
body.truio-lite #imageInputArea,
html.truio-lite #dashboardActionGrid,
body.truio-lite #dashboardActionGrid,
html.truio-lite #learnActionRow,
body.truio-lite #learnActionRow,
html.truio-lite .composerAttachmentControls,
body.truio-lite .composerAttachmentControls,
html.truio-lite #composerAttachmentMenu,
body.truio-lite #composerAttachmentMenu {
  display: none !important;
}

body:not(.expert-mode-active) #universalInputTrigger {
  background: #f2f5f7 !important;
  color: #0f172a !important;
}

body:not(.expert-mode-active) .dashboardActionButton {
  background: #f2f5f7 !important;
  color: #0f172a !important;
}

body:not(.expert-mode-active) .dashboardImageAction {
  border: 0 !important;
  background: transparent !important;
}

body:not(.expert-mode-active) #universalInputSummary {
  color: #475569 !important;
}

/* Full-screen composer */
body.composer-open {
  overflow: hidden;
}

.truioComposerOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
}

.truioComposerOverlay.is-open {
  display: flex;
}

.truioComposerDialog {
  width: min(100%, 500px);
  max-width: 500px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #101010);
  color: var(--text-primary, #fff);
  outline: none;
}

.truioComposerHeader {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: 82px 1fr 128px;
  align-items: center;
  gap: 8px;
  padding: env(safe-area-inset-top, 0) 14px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card, #101010);
}

.truioComposerHeader h2 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.composerTextButton {
  min-height: 42px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--text-accent);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.composerTextButton:first-child {
  grid-column: 1;
  justify-self: start;
  text-align: left;
}

.composerDoneButton {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.composerTextButton:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
  border-radius: 6px;
}

.truioComposerBody {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
}

.composerPrompt {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

.composerTextFieldWrap {
  position: relative;
  flex: 1 1 216px;
  min-height: 216px;
  display: flex;
}

.truioComposerDialog #userInput {
  width: 100%;
  flex: 1 1 auto;
  min-height: 216px;
  margin: 0;
  padding: 16px;
  resize: none;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-input);
  color: var(--text-primary, #fff);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}

.speechHeaderControl {
  position: absolute;
  left: 50%;
  top: calc(50% + env(safe-area-inset-top, 0px) / 2);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 76px;
}

.speechInputButton {
  width: 32px;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #000;
  cursor: pointer;
  box-shadow: none;
  z-index: 2;
}

.speechInputButton:hover,
.speechInputButton:focus-visible {
  border-color: rgba(32,191,216,0.72);
  color: #000;
  background: rgba(255, 255, 255, 0.96);
}

.speechInputButton:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.speechInputButton.is-listening {
  border-color: #ff8a00;
  color: #000;
  background: rgba(255, 245, 230, 0.98);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.24), 0 0 18px rgba(255, 138, 0, 0.78);
}

.speechInputIcon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speechInputListeningText {
  display: none;
  font-size: 12px;
  font-weight: 800;
}

.speechInputButton.is-listening .speechInputListeningText {
  display: none;
}

.speechActivityIndicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 28px;
  min-height: 18px;
  margin: 0;
  pointer-events: none;
}

.speechActivityIndicator.is-active {
  display: flex;
}

.speechActivityIndicator span {
  width: 3px;
  height: 9px;
  border-radius: 999px;
  background: #ff8a00;
  opacity: 0.62;
  transform-origin: center;
  animation: speechActivityWave 780ms ease-in-out infinite;
}

.speechActivityIndicator span:nth-child(2) {
  animation-delay: 80ms;
}

.speechActivityIndicator span:nth-child(3) {
  animation-delay: 160ms;
}

.speechActivityIndicator span:nth-child(4) {
  animation-delay: 240ms;
}

.speechActivityIndicator span:nth-child(5) {
  animation-delay: 320ms;
}

@keyframes speechActivityWave {
  0%, 100% {
    opacity: 0.42;
    transform: scaleY(0.45);
  }
  45% {
    opacity: 1;
    transform: scaleY(1.85);
  }
}

.truioComposerDialog #userInput:focus {
  border-color: var(--color-primary-start);
  outline: 3px solid rgba(32, 191, 216, 0.55);
  outline-offset: 1px;
}

.composerMeta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

#composerCharacterCount {
  white-space: nowrap;
}

.composerAttachmentControls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

#composerAttachButton {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary, #fff);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#composerAttachButton span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff;
  line-height: 1;
}

#composerAttachButton:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
}

.composerAttachmentControls #analyzeButton {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.composerAttachmentControls #analyzeButton:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
}

.composerAttachmentMenu {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 190px;
  z-index: 1000003;
}

.composerAttachmentMenu button {
  text-align: left;
  padding-left: 16px;
}

.composerAttachmentPreview {
  display: none;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  background: var(--bg-input);
}

.composerAttachmentPreview.has-images {
  display: block;
}

.composerAnnouncementCarousel {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 10px;
  background: #020202;
}

body.truio-onboarding-v2-active .truioComposerOverlay.truio-onboarding-composer-active .composerAnnouncementCarousel {
  display: none !important;
}

.composerAttachmentHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.composerAttachmentHeader button {
  border: 0;
  background: transparent;
  color: #ef4444;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.composerAttachmentGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.composerAttachmentItem {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
}

.composerAttachmentItem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid var(--color-primary-start);
  border-radius: 10px;
  background: #0f172a;
}

.composerAttachmentRemove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 18px;
  cursor: pointer;
  padding: 0;
}

/* Result flow: SafeScore -> Findings -> Truio Adviser */
.truioResultCard {
  margin-top: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
}

.truioResultCard h3 {
  margin: 0 0 10px;
  color: var(--text-accent);
  font-size: 20px;
}

.truioResultCard h4 {
  margin: 0 0 7px;
  font-size: 15px;
  color: var(--text-primary, #fff);
}

.truioResultList {
  margin: 0;
  padding-left: 22px;
  line-height: 1.5;
}

.truioResultList li + li {
  margin-top: 7px;
}

#truioAdviserCard {
  border-color: rgba(32, 191, 216, 0.55);
  box-shadow: inset 0 0 18px rgba(32, 191, 216, 0.08);
}

.advisorSummary {
  margin: 0;
  line-height: 1.55;
}

.advisorSubsection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.advisorUrgentSection {
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 12px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.08);
}

.advisorSuggestedReply {
  padding: 12px;
  border-left: 4px solid var(--color-primary-start);
  border-radius: 8px;
  background: rgba(32, 191, 216, 0.08);
  white-space: pre-wrap;
  line-height: 1.5;
}

body:not(.expert-mode-active) .truioComposerDialog {
  background: #f8fafc;
  color: #0f172a;
}

body:not(.expert-mode-active) .truioComposerHeader {
  background: #ffffff;
}

body:not(.expert-mode-active) .truioComposerDialog #userInput,
body:not(.expert-mode-active) #composerAttachButton,
body:not(.expert-mode-active) .composerAttachmentPreview,
body:not(.expert-mode-active) .truioResultCard {
  background: #ffffff;
  color: #0f172a;
}

html.truio-lite #textComposerModal,
body.truio-lite #textComposerModal {
  position: static;
  inset: auto;
  z-index: auto;
  display: block !important;
  background: transparent;
}

html.truio-lite .truioComposerDialog,
body.truio-lite .truioComposerDialog {
  width: 100%;
  height: auto;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

html.truio-lite .truioComposerHeader,
body.truio-lite .truioComposerHeader,
html.truio-lite .composerPrompt,
body.truio-lite .composerPrompt,
html.truio-lite .composerMeta,
body.truio-lite .composerMeta,
html.truio-lite .composerAttachmentPreview,
body.truio-lite .composerAttachmentPreview {
  display: none !important;
}

html.truio-lite .truioComposerBody,
body.truio-lite .truioComposerBody {
  display: block;
  padding: 0;
  overflow: visible;
}

html.truio-lite .composerTextFieldWrap,
body.truio-lite .composerTextFieldWrap {
  display: block;
  min-height: 0;
}

html.truio-lite .truioComposerDialog #userInput,
body.truio-lite .truioComposerDialog #userInput {
  display: block;
  min-height: 138px;
  height: 138px;
  flex: none;
  margin: 8px 0 10px;
}

body:not(.expert-mode-active) .truioResultCard h4 {
  color: #0f172a;
}

@media (min-width: 760px) {
  .truioComposerOverlay {
    padding: 24px;
    align-items: center;
  }

  .truioComposerDialog {
    width: min(500px, 100%);
    height: min(760px, calc(100vh - 48px));
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  }
}

@media (max-width: 560px) {
  .composerMeta {
    flex-direction: column;
    gap: 4px;
  }
}

/* ============================================================
   TRUIO ONBOARDING V2
   ============================================================ */

.truio-onboarding-welcome {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #000000;
  box-sizing: border-box;
  text-align: center;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  transition: opacity 360ms ease;
}

.truio-onboarding-welcome.is-fading {
  opacity: 0;
  pointer-events: none;
}

.truio-onboarding-start-video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, 500px);
  max-width: 500px;
  height: min(100dvh, 916px);
  max-height: 100dvh;
  object-fit: contain;
  background: #000000;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 90ms linear;
  pointer-events: none;
}

.truio-onboarding-start-video.is-visible {
  opacity: 1;
}

.truio-onboarding-card-login-link {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #00d4ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  transform: translateX(-50%);
  cursor: pointer;
}

.truio-onboarding-login-link,
.truio-onboarding-proof-button,
.truio-onboarding-video-skip {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.truio-onboarding-video-layer {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000000;
  opacity: 1;
  transition: opacity 360ms ease;
}

.truio-onboarding-video-layer.is-active {
  display: flex;
}

.truio-onboarding-video-layer.is-soft-enter {
  opacity: 0;
}

.truio-onboarding-video-layer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

video::-webkit-media-text-track-container,
video::-webkit-media-text-track-display,
video::-webkit-media-text-track-background {
  display: none !important;
}

.truio-onboarding-login-link {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  padding: 8px 12px;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #00d4ff;
  font-size: 13px;
  font-weight: 700;
  transform: translateX(-50%);
  text-decoration: underline;
}

.truio-onboarding-proof-button {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: none;
  width: min(86vw, 360px);
  padding: 16px 24px;
  transform: translateX(-50%);
  border: 0;
  background: #00ffe0;
  color: #000000;
  font-size: 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(0, 255, 224, 0.28);
}

.truio-onboarding-proof-button.is-visible {
  display: none;
}

.truio-onboarding-start-now {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  display: none;
  min-height: 52px;
  width: min(84vw, 340px);
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: #00ffe0;
  color: #001415;
  font-size: 18px;
  font-weight: 900;
  transform: translateX(-50%);
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(0, 255, 224, 0.32);
}

.truio-onboarding-start-now.is-visible {
  display: block;
}

.truio-onboarding-final-frame {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: transparent;
  box-sizing: border-box;
  text-align: center;
}

.truio-onboarding-final-frame.is-visible {
  display: flex;
}

.truio-onboarding-final-go-button {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  width: min(84vw, 340px);
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #00ffe0;
  color: #001415;
  font-size: 17px;
  font-weight: 900;
  transform: translateX(-50%);
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(0, 255, 224, 0.28);
}

.truio-onboarding-value-bubble {
  position: fixed;
  top: calc(82px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 2;
  width: min(78vw, 430px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #06333b;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transform: translate(-50%, -10px) scale(0.96);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.truio-onboarding-value-bubble.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.truio-onboarding-video-layer.is-fading {
  opacity: 0;
  transition: opacity 220ms ease;
}

.truio-onboarding-video-layer.is-soft-fading {
  opacity: 0;
  transition: opacity 360ms ease;
}

.truioComposerOverlay.truio-onboarding-composer-active,
.truioComposerOverlay.truio-onboarding-composer-enter {
  z-index: 1000004;
  background: rgba(0, 0, 0, 0.78);
}

.truioComposerOverlay.truio-onboarding-composer-enter .truioComposerDialog {
  animation: truioOnboardingComposerSlideIn var(--truio-onboarding-composer-slide-duration, 900ms) cubic-bezier(.22, .8, .24, 1) both;
}

@keyframes truioOnboardingComposerSlideIn {
  from {
    transform: translateX(-115vw);
  }
  to {
    transform: translateX(0);
  }
}

.truio-onboarding-bubble-layer {
  position: fixed;
  inset: 0;
  z-index: 1000005;
  pointer-events: none;
}

.truio-onboarding-main-bubble {
  position: fixed;
  z-index: 1000006;
  width: min(86vw, 390px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 255, 224, 0.94);
  color: #001415;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.truio-onboarding-main-bubble-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: #001415;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 20px;
  cursor: pointer;
  pointer-events: auto;
}

.truio-onboarding-hotspot {
  position: fixed;
  z-index: 1000007;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #00ffe0;
  color: #000000;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 0 0 rgba(0, 255, 224, 0.55), 0 0 24px rgba(0, 255, 224, 0.88);
  animation: truioHotspotPulse 1.35s ease-out infinite;
}

.truio-onboarding-result-continue {
  display: block;
  width: min(100%, 320px);
  min-height: 46px;
  position: sticky;
  bottom: 12px;
  z-index: 2;
  margin: 18px auto 4px;
  border: 0;
  border-radius: 999px;
  background: #00ffe0;
  color: #001415;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 255, 224, 0.24);
}

.truio-onboarding-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #000000;
  box-sizing: border-box;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 360ms ease;
}

.truio-onboarding-result-overlay.is-visible {
  display: flex;
  opacity: 1;
}

.truio-onboarding-result-overlay.is-fading {
  opacity: 0;
}

.truio-onboarding-result-panel {
  width: min(100%, 500px);
  margin: 0 auto;
  padding: 0;
}

.truio-onboarding-result-content {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.truio-onboarding-result-content > * {
  margin-top: 0 !important;
  transform: none !important;
  position: relative !important;
}

.truio-onboarding-result-panel #resultContainer {
  display: block !important;
  margin-top: 0;
}

.truio-onboarding-result-panel #feedbackSection {
  display: none !important;
}

.truio-onboarding-hotspot-tooltip {
  position: fixed;
  z-index: 1000008;
  max-width: min(260px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(3, 10, 12, 0.94);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
}

@keyframes truioHotspotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 224, 0.52), 0 0 24px rgba(0, 255, 224, 0.78);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(0, 255, 224, 0), 0 0 24px rgba(0, 255, 224, 0.78);
  }
}

.truio-onboarding-bubble {
  position: fixed;
  max-width: min(280px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 12px;
  background: #00ffe0;
  color: #001415;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.32;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -100%) scale(1);
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease;
}

.truio-onboarding-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
}

.truio-onboarding-bubble.is-center-tip {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.truio-onboarding-bubble.is-center-tip::after {
  display: none;
}

.truio-onboarding-bubble.is-popping {
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.74);
}

.truio-onboarding-bubble.is-center-tip.is-popping {
  transform: translate(-50%, -50%) scale(0.74);
}

html.truio-lite .truio-onboarding-video-layer,
body.truio-lite .truio-onboarding-video-layer,
html.truio-lite .truio-onboarding-bubble-layer,
body.truio-lite .truio-onboarding-bubble-layer {
  display: none !important;
}

@media (max-width: 560px) {
  .truio-onboarding-welcome {
    min-height: 100dvh;
    padding: 0;
  }

  .truio-onboarding-start-video {
    width: 100vw;
    height: min(100dvh, 916px);
  }

  .truio-onboarding-value-bubble {
    top: calc(64px + env(safe-area-inset-top, 0px));
    width: min(84vw, 360px);
    padding: 12px 14px;
    font-size: 15px;
  }

  .truio-onboarding-bubble {
    max-width: min(230px, calc(100vw - 22px));
    font-size: 13px;
  }
}
