:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --line: #d6e1e6;
  --text: #1f2a33;
  --muted: #61717d;
  --brand-navy: #01152e;
  --brand-petrol: #062332;
  --brand-blue: #1e3a8a;
  --brand-teal: #0b5d66;
  --brand-teal-dark: #084a53;
  --brand-amber: #f5b300;
  --brand-ice: #e5e7eb;
  --brand-graphite: #1f2937;
  --splash-navy: #01152e;
  --accent: var(--brand-teal);
  --accent-strong: var(--brand-teal-dark);
  --warn: #9a3412;
  --danger: #b42318;
  --panel-width: clamp(300px, 27vw, 380px);
  --panel-rail-width: 4.25rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-y: auto;
}

.anonymous-page {
  background: var(--brand-navy);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--splash-navy);
  background-color: var(--splash-navy);
  isolation: isolate;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--splash-navy);
  z-index: -2;
}

.splash-screen.is-hiding,
.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--splash-navy);
  border: 0;
  display: block;
  z-index: 1;
}

.splash-logo {
  position: relative;
  z-index: 1;
  width: min(72vw, 760px);
  max-height: 46vh;
  object-fit: contain;
  display: none;
  animation: splashLogoHold 2.65s ease both;
}

.splash-screen.use-static-splash .splash-video,
.splash-screen.reduced-motion .splash-video {
  display: none;
}

.splash-screen.use-static-splash .splash-logo,
.splash-screen.reduced-motion .splash-logo {
  display: block;
}

.splash-skip {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  border-color: rgba(245, 179, 0, 0.7);
  background: rgba(2, 22, 47, 0.72);
  color: #f9d779;
  font-weight: 700;
}

.splash-skip:hover {
  background: rgba(245, 179, 0, 0.18);
}

.privacy-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(0, 21, 46, 0.72);
  backdrop-filter: blur(10px);
  animation: privacyModalIn 0.38s ease both;
}

.privacy-modal-backdrop[hidden] {
  display: none !important;
}

.privacy-bubble-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.privacy-intro-card {
  position: relative;
  width: min(1040px, calc(100vw - 3rem));
  overflow: visible;
  --privacy-bubble-fill: linear-gradient(145deg, #ffc13d 0%, #f5b300 58%, #e69a18 100%);
  --privacy-bubble-tail-height: 3.45rem;
  --privacy-bubble-tail-left: clamp(1.45rem, 4vw, 3.1rem);
  --privacy-bubble-tail-neck: clamp(3.9rem, 7vw, 5.3rem);
  border: 0;
  border-radius: 46px;
  padding: 0;
  background: transparent;
  color: #061d2b;
  box-shadow: none;
  isolation: isolate;
}

.privacy-intro-card-content {
  position: relative;
  z-index: 1;
  max-height: min(82vh, 720px);
  overflow: auto;
  border-radius: inherit;
  padding: clamp(1.3rem, 2.8vw, 2.15rem);
}

.privacy-intro-card::after {
  content: "";
  position: absolute;
  inset: 0 0 calc(-1 * var(--privacy-bubble-tail-height)) 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.32), transparent 28%),
    var(--privacy-bubble-fill);
  transform: none;
  clip-path: url(#privacyBubbleShape);
  filter: drop-shadow(0 28px 80px rgba(0, 0, 0, 0.42));
  z-index: 0;
  pointer-events: none;
}

.privacy-intro-card h2 {
  margin: 0.65rem 0 0.8rem;
  color: #061d2b;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.privacy-intro-card p {
  margin: 0.55rem 0;
  color: rgba(6, 29, 43, 0.9);
}

.privacy-intro-card button {
  margin-top: 1rem;
  border-color: #061d2b;
  background: #061d2b;
  color: #fff4cf;
  font-weight: 850;
}

.privacy-intro-card .assistant-badge,
.privacy-details summary {
  border-color: rgba(6, 29, 43, 0.24);
  background: rgba(6, 29, 43, 0.1);
  color: #061d2b;
}

.privacy-details {
  margin-top: 0.85rem;
}

.privacy-details summary {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border: 1px solid rgba(6, 29, 43, 0.22);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-weight: 850;
}

.privacy-details summary::marker {
  content: "";
}

.privacy-details summary::-webkit-details-marker {
  display: none;
}

.privacy-details[open] summary {
  margin-bottom: 0.55rem;
}

@keyframes privacyModalIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splashLogoHold {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }

  18%,
  76% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.008);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-screen {
    transition-duration: 0.01ms;
  }

  .splash-logo {
    animation: none;
  }
}

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

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(242, 169, 59, 0.45);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) var(--panel-width);
  align-items: start;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.app-shell.side-collapsed {
  grid-template-columns: minmax(0, 1fr) var(--panel-rail-width);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  border-right: 1px solid var(--line);
}

.anonymous-shell .chat-panel {
  background: var(--brand-navy);
}

.privacy-banner {
  margin: 0.75rem 1rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #c7d9dd;
  border-left: 4px solid var(--brand-amber);
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(6, 29, 43, 0.06);
}

.privacy-banner.is-collapsed {
  margin-top: 0.45rem;
  padding: 4px 10px;
  border-left-width: 3px;
  box-shadow: none;
}

.privacy-banner.is-collapsed .privacy-banner-header {
  display: none;
}

.privacy-banner.is-expanded .privacy-banner-compact,
.privacy-banner:not(.is-collapsed) .privacy-banner-compact,
.privacy-banner.is-collapsed .privacy-banner-content,
.privacy-banner.is-collapsed .privacy-banner-header,
.privacy-banner [hidden] {
  display: none !important;
}

.privacy-banner.is-expanded .privacy-banner-header,
.privacy-banner.is-expanded .privacy-banner-content,
.privacy-banner:not(.is-collapsed) .privacy-banner-header,
.privacy-banner:not(.is-collapsed) .privacy-banner-content {
  display: flex;
}

.privacy-banner.is-expanded .privacy-banner-content,
.privacy-banner:not(.is-collapsed) .privacy-banner-content {
  display: block;
}

.privacy-banner.is-collapsed .privacy-banner-compact {
  display: flex;
  min-height: 32px;
  height: 32px;
}

.privacy-banner.is-collapsed .privacy-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  line-height: 1;
}

.privacy-banner-header,
.privacy-banner-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.privacy-banner-compact {
  color: #e8eef2;
  font-weight: 800;
  min-height: 2.1rem;
}

.privacy-toggle {
  min-height: 1.75rem;
  border-color: rgba(245, 179, 0, 0.62);
  background: rgba(245, 179, 0, 0.14);
  color: #ffe1a8;
  padding: 0.18rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.privacy-toggle:hover {
  background: rgba(245, 179, 0, 0.24);
  color: #ffffff;
}

.privacy-banner p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pii-warning {
  min-height: 1.4rem;
  color: var(--warn);
  font-weight: 650;
}

.flow-notice {
  min-height: 1.3rem;
  margin: 0.35rem 0 0;
  color: var(--accent-strong);
  font-weight: 650;
}

.classification-panel .meta-list div {
  grid-template-columns: 8.5rem minmax(0, 1fr);
}

.classification-notice {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.anonymous-topbar {
  position: relative;
  min-height: 138px;
  align-items: center;
  justify-content: flex-start;
  background: var(--splash-navy);
  border-bottom: 0;
  color: #ffffff;
  box-shadow: none;
  padding: 1.1rem 1.55rem;
}

.brand-lockup {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
}

.brand-symbol {
  width: clamp(42px, 5vw, 58px);
  height: clamp(42px, 5vw, 58px);
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.brand-logo {
  width: clamp(142px, 18vw, 218px);
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

.brand-logo-full {
  width: clamp(360px, 42vw, 640px);
  max-height: 148px;
  border-radius: 0;
  box-shadow: none;
}

.brand-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.anonymous-topbar .brand-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(42vw, 540px);
  justify-items: center;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.anonymous-topbar .brand-copy h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.anonymous-topbar .brand-copy p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 1.25rem;
}

.topbar p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.brand-copy span {
  color: #c5d2da;
  font-size: 0.95rem;
  font-weight: 700;
}

.topbar-status {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(242, 169, 59, 0.54);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #ffe1a8;
  background: rgba(242, 169, 59, 0.1);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-pill {
  max-width: 24rem;
  border: 1px solid rgba(232, 238, 242, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: var(--brand-ice);
  background: rgba(255, 255, 255, 0.08);
  white-space: normal;
}

.backend-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f2f4f7;
  color: var(--muted);
  font-size: 0.9rem;
}

.technical-connection-panel .backend-status {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(232, 238, 242, 0.16);
  border-radius: 6px;
  font-size: 0.82rem;
}

.backend-status:empty {
  display: none;
}

.backend-status.connected {
  background: #ecfdf3;
  color: #05603a;
}

.backend-status.unavailable {
  display: grid;
  gap: 0.25rem;
  background: #fffbeb;
  color: #92400e;
}

.backend-status code {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
  overflow-wrap: anywhere;
}

.case-actions,
.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.partner-link-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(22, 124, 115, 0.82);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  background: rgba(22, 124, 115, 0.18);
  color: #d9fbf6;
  font-weight: 800;
  text-decoration: none;
}

.partner-link-button:hover {
  border-color: #f2a93b;
  background: rgba(242, 169, 59, 0.16);
  color: #ffe1a8;
}

.partner-page-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.4rem;
  padding: clamp(1.2rem, 4vw, 3rem);
  background: var(--splash-navy);
}

.partner-page-logo {
  width: min(680px, 82vw);
  max-height: 28vh;
  object-fit: contain;
}

.partner-page-card {
  width: min(760px, 100%);
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(245, 179, 0, 0.36);
  border-radius: 8px;
  background: rgba(0, 27, 42, 0.72);
  color: #e8eef2;
}

.partner-page-card h1 {
  margin: 0.8rem 0 0.7rem;
  color: #f2a93b;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.partner-page-card p {
  color: #d9e4ea;
}

.partner-back-link {
  display: inline-flex;
  margin-top: 0.75rem;
  border: 1px solid #f2a93b;
  border-radius: 6px;
  padding: 0.7rem 0.95rem;
  background: #f2a93b;
  color: #061d2b;
  font-weight: 850;
  text-decoration: none;
}

.entity-actions button,
.case-actions button:not(:first-child) {
  background: white;
  color: var(--accent);
}

.case-actions button:first-child {
  border-color: var(--brand-amber);
  background: var(--brand-amber);
  color: #17212b;
  font-weight: 750;
}

.case-actions button:first-child:hover {
  background: #d9942e;
}

.approx-progress {
  --progress-stage-color: #d24a3f;
  --progress-stage-soft: rgba(210, 74, 63, 0.2);
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 1.25rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(242, 169, 59, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}

.approx-progress[data-progress-stage="mid"] {
  --progress-stage-color: #f5b300;
  --progress-stage-soft: rgba(245, 179, 0, 0.22);
}

.approx-progress[data-progress-stage="high"] {
  --progress-stage-color: #31b77b;
  --progress-stage-soft: rgba(49, 183, 123, 0.2);
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.progress-copy span {
  color: #c7d9dd;
  font-weight: 700;
}

.progress-copy strong {
  color: var(--progress-stage-color);
  transition: color 0.35s ease;
}

.progress-track {
  height: 0.6rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(232, 238, 242, 0.2);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--progress-stage-color), var(--progress-stage-color));
  box-shadow: 0 0 18px var(--progress-stage-soft);
  transition: width 0.45s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #adc5cf;
  font-size: 0.78rem;
  font-weight: 750;
}

.progress-steps li {
  margin: 0;
  padding-top: 0.45rem;
  border-top: 2px solid rgba(232, 238, 242, 0.22);
}

.progress-steps li.done,
.progress-steps li.active {
  border-top-color: var(--progress-stage-color);
  color: #ffffff;
}

.interaction-zone {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  padding: 0.9rem 1.25rem 1rem;
}

.question-assistant-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.75rem;
  min-height: 100%;
  padding: 1.1rem;
  border: 1px solid rgba(245, 179, 0, 0.26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 10%, rgba(245, 179, 0, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(1, 21, 46, 0.98), rgba(5, 28, 44, 0.92));
  color: #e8eef2;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.question-assistant-card::after {
  content: "";
  position: absolute;
  inset: auto 18% -26px;
  height: 60px;
  border-radius: 50%;
  background: rgba(245, 179, 0, 0.13);
  filter: blur(18px);
  pointer-events: none;
}

.question-assistant-card h2 {
  margin: 0.25rem 0 0.05rem;
  color: var(--brand-amber);
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  line-height: 1.05;
}

.question-assistant-card p {
  margin: 0.55rem 0 0;
  color: #d9e4ea;
  font-size: 1rem;
}

.question-assistant-card p[hidden],
.question-assistant-card p:empty {
  display: none;
}

.assistant-role {
  display: block;
  margin-bottom: 0.45rem;
  color: #edf6f8;
  font-size: 0.92rem;
  font-weight: 780;
}

.assistant-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(245, 179, 0, 0.45);
  border-radius: 999px;
  background: rgba(245, 179, 0, 0.12);
  color: #ffe1a8;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.ai-avatar-large {
  width: clamp(178px, 15vw, 234px);
  height: clamp(178px, 15vw, 234px);
}

.denise-media {
  width: clamp(208px, 17.5vw, 282px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-inline: auto;
  overflow: visible;
}

.denise-media .ai-avatar {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
}

.denise-video {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.denise-fallback {
  display: none;
}

.denise-media.video-fallback .denise-video {
  display: none;
}

.denise-media.video-fallback .denise-fallback {
  display: block;
}

.messages {
  flex: 0 0 auto;
  max-height: 26rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem;
}

.message {
  max-width: 820px;
  margin-bottom: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.message.user {
  margin-left: auto;
  border-color: #b7d7d3;
  background: #eef8f6;
}

.message small {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.message p {
  margin: 0;
}

.answer-box {
  flex: 0 0 auto;
  min-width: 0;
  padding: 1rem 1.08rem 1.08rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px rgba(16, 24, 40, 0.06);
}

.answer-box label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.current-question-card {
  display: grid;
  gap: 0.58rem;
  margin-bottom: 0.7rem;
  padding: 1rem 1.05rem;
  border: 1px solid #a9cfd0;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef8f6 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(14, 58, 74, 0.08);
}

.question-meta {
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.question-code {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
}

.current-question-card p {
  margin: 0;
  font-size: clamp(1.16rem, 1.35vw, 1.34rem);
  line-height: 1.48;
}

.denise-clarification {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(245, 179, 0, 0.42);
  border-left: 4px solid #f2a93b;
  border-radius: 8px;
  background: rgba(245, 179, 0, 0.12);
  color: #edf6f8;
}

.denise-clarification[hidden] {
  display: none !important;
}

.denise-clarification strong {
  color: #f8c66b;
  font-size: 0.9rem;
}

.denise-clarification p {
  color: #edf6f8;
  font-size: 0.98rem;
}

.flow-completion-cta {
  display: grid;
  gap: 0.72rem;
  justify-items: center;
  margin: 0.1rem 0 0.8rem;
  padding: clamp(1.05rem, 2.2vw, 1.6rem);
  border: 1px solid rgba(245, 179, 0, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 10%, rgba(245, 179, 0, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  text-align: center;
  color: #edf6f8;
}

.flow-completion-cta[hidden] {
  display: none !important;
}

.flow-completion-cta h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.26rem, 2vw, 1.75rem);
}

.flow-completion-cta p {
  max-width: 48rem;
  margin: 0;
  color: #c7d9dd;
}

.flow-completion-cta button {
  min-height: 3.35rem;
  border-color: #f5b300;
  background: #f5b300;
  color: #001b2a;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(245, 179, 0, 0.22);
}

.flow-completion-cta button:hover {
  background: #f2a93b;
}

.early-exit-panel {
  display: grid;
  gap: 0.75rem;
  margin: 0.1rem 0 0.8rem;
  padding: 1.1rem;
  border: 1px solid rgba(245, 179, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef2;
}

.early-exit-panel[hidden] {
  display: none !important;
}

.early-exit-panel h3 {
  margin: 0;
  color: #f2a93b;
}

.early-exit-panel p {
  margin: 0;
  color: #d9e4ea;
}

.early-exit-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.early-exit-panel button:first-child {
  border-color: #f2a93b;
  background: #f2a93b;
  color: #061d2b;
  font-weight: 850;
}

.unsupported-area-panel {
  display: grid;
  gap: 0.8rem;
  margin: 0.1rem 0 0.8rem;
  padding: clamp(0.95rem, 2vw, 1.25rem);
  border: 1px solid rgba(245, 179, 0, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #edf6f8;
}

.unsupported-area-panel[hidden] {
  display: none !important;
}

.unsupported-area-panel p {
  margin: 0;
  color: #d9e4ea;
}

.unsupported-area-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.unsupported-area-panel button {
  min-height: 2.75rem;
  border-color: #f5b300;
  background: #f5b300;
  color: #001b2a;
  font-weight: 850;
}

.unsupported-area-panel .secondary-action {
  border-color: rgba(232, 238, 242, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}

.keyboard-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem;
  color: var(--text);
  background: white;
}

.answer-box textarea {
  min-height: 5.4rem;
  max-height: 10rem;
  resize: vertical;
}

.dynamic-answer {
  display: grid;
  gap: 0.5rem;
}

.choice-grid,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice-grid label,
.quick-actions button,
#skippedList button {
  border-radius: 6px;
}

.secondary-choice-grid {
  display: none;
}

.choice-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  min-height: 2.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  font-weight: 500;
}

.choice-grid input {
  width: 1rem;
  height: 1rem;
}

.anonymous-quick-actions {
  display: grid;
  gap: 0.55rem;
  margin: 0.15rem 0 0;
}

.quick-actions-label {
  margin: 0;
  color: #38505d;
  font-size: 0.88rem;
  font-weight: 700;
}

.quick-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quick-actions-grid.area-triage-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.65rem;
}

.quick-actions-grid.area-triage-options .quick-option {
  min-height: 3.15rem;
  justify-content: center;
  font-weight: 850;
}

.quick-actions button,
#skippedList button {
  background: white;
  color: var(--accent);
  min-height: 2.55rem;
  padding: 0.55rem 0.82rem;
}

.quick-actions button:hover,
#skippedList button:hover {
  border-color: var(--accent-strong);
  background: #edf7f6;
  color: var(--accent-strong);
}

.quick-actions .quick-option.selected,
.quick-actions .quick-option[aria-pressed="true"] {
  border-color: var(--brand-petrol);
  background: var(--brand-petrol);
  color: #ffffff;
}

.quick-actions .quick-confirm {
  justify-self: start;
  border-color: var(--brand-amber);
  background: var(--brand-amber);
  color: #1f2a33;
  font-weight: 750;
}

.quick-actions .quick-confirm:hover {
  background: #d9942e;
}

.attachment-form {
  display: grid;
  gap: 0.65rem;
}

.attachment-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.attachment-current-question {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--text);
}

.attachment-current-question input,
.attachment-form input[type="file"] {
  width: auto;
}

.attachment-list {
  padding-left: 0;
  list-style: none;
  margin-top: 0.85rem;
}

.attachment-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.attachment-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.attachment-actions button {
  background: white;
  color: var(--accent);
}

.answer-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.back-answer-button[hidden] {
  display: none;
}

.classification-actions {
  margin-top: 0.7rem;
}

.secondary-action,
.classification-actions button,
.area-correction-panel button,
.route-correction-notice button {
  background: white;
  color: var(--accent);
}

.area-correction-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.area-correction-panel[hidden],
.route-correction-notice[hidden],
.voluntary-transition-panel[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.route-correction-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #f5b300;
  border-radius: 8px;
  background: #fff7d6;
  color: #3f2600;
}

.route-correction-notice p {
  flex-basis: 100%;
  margin: 0;
}

.problem-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.problem-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 500;
}

.problem-options input {
  width: 1rem;
  height: 1rem;
}

.form-error {
  min-height: 1.25rem;
  margin: 0.6rem 0 0;
  color: var(--danger);
  font-weight: 700;
}

.form-error:not(:empty) {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 8px;
  background: #fff1f0;
}

.central-result-panel {
  display: grid;
  gap: 1rem;
  margin: 0.2rem 1.25rem 1.35rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(245, 179, 0, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 12%, rgba(245, 179, 0, 0.18), transparent 34%),
    linear-gradient(145deg, #001b2a 0%, #0b2734 54%, #0e3a4a 100%);
  color: #edf6f8;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.central-result-panel.has-result {
  padding-top: 1rem;
}

.central-result-panel.has-result .central-result-copy {
  display: none;
}

.indenizometro-unavailable {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(245, 179, 0, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.indenizometro-unavailable-copy {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.indenizometro-unavailable button {
  justify-self: start;
  background: var(--brand-amber);
  color: #17212b;
  font-weight: 800;
}

.central-result-panel[hidden] {
  display: none;
}

.central-result-copy {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.central-result-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
}

.central-result-copy p {
  max-width: 62rem;
  margin: 0;
  color: #c7d9dd;
}

.central-result-copy button {
  min-height: 3.1rem;
  border-color: #f5b300;
  background: #f5b300;
  color: #001b2a;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(245, 179, 0, 0.18);
}

.central-result-copy .secondary-action {
  border-color: rgba(232, 238, 242, 0.3);
  background: transparent;
  color: #e8eef2;
  box-shadow: none;
}

.central-indenizometro-output {
  display: grid;
  gap: 0.85rem;
}

.central-indenizometro-output:empty {
  display: none;
}

.indenizometro-details {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(232, 238, 242, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.indenizometro-details summary {
  cursor: pointer;
  color: #f8c66b;
  font-weight: 850;
}

.indenizometro-details[open] summary {
  margin-bottom: 0.6rem;
}

.anonymous-report-panel {
  display: grid;
  gap: 0.85rem;
  padding: clamp(0.95rem, 2vw, 1.25rem);
  border: 1px solid rgba(232, 238, 242, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.anonymous-report-panel[hidden] {
  display: none;
}

.anonymous-report-copy {
  display: grid;
  gap: 0.45rem;
}

.anonymous-report-copy h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

.anonymous-report-copy p,
.whatsapp-transition-note {
  margin: 0;
  color: #d9e4ea;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.report-actions button {
  min-height: 2.75rem;
  border-color: #f5b300;
  background: #f5b300;
  color: #001b2a;
  font-weight: 850;
}

.report-actions .secondary-action {
  border-color: rgba(232, 238, 242, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}

.report-text-output {
  min-height: 15rem;
  max-height: 28rem;
  resize: vertical;
  white-space: pre-wrap;
}

#urgencyPanel {
  border: 1px solid #f59e0b;
  background: #fffbeb;
  border-radius: 8px;
  padding: 0.9rem;
}

#urgencyPanel p {
  margin-top: 0;
  color: #92400e;
}

.side-panel {
  position: sticky;
  top: 0;
  max-height: 100vh;
  padding: 0.85rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0b2734;
  color: #edf6f8;
  min-width: 0;
  border-left: 1px solid rgba(242, 169, 59, 0.18);
  transition: width 0.2s ease, padding 0.2s ease;
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  color: #f8c66b;
  font-size: 0.9rem;
  font-weight: 850;
}

.side-panel-toggle {
  min-height: 2rem;
  border-color: rgba(245, 179, 0, 0.52);
  background: rgba(245, 179, 0, 0.12);
  color: #ffe1a8;
  padding: 0.25rem 0.62rem;
  font-size: 0.82rem;
  font-weight: 850;
}

.side-panel-toggle:hover {
  background: rgba(245, 179, 0, 0.22);
  color: #ffffff;
}

.side-panel-content {
  display: block;
}

.side-collapsed .side-panel {
  padding: 0.65rem 0.45rem;
  overflow: hidden;
}

.side-collapsed .side-panel-header {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin: 0;
}

.side-collapsed .side-panel-header span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0;
  white-space: nowrap;
}

.side-collapsed .side-panel-toggle {
  width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  color: transparent;
  position: relative;
}

.side-collapsed .side-panel-toggle::after {
  content: "i";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffe1a8;
  font-weight: 950;
}

.side-collapsed .side-panel-content {
  display: none;
}

.side-panel section {
  padding: 0 0 0.8rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(232, 238, 242, 0.18);
}

.side-panel h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: #f8c66b;
}

.meta-list {
  margin: 0;
}

.meta-list div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.meta-list dt {
  color: #adc5cf;
}

.meta-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.side-panel .classification-notice {
  color: #c7d9dd;
}

.voluntary-transition-panel {
  border-bottom: 0;
  padding: 0.9rem;
  border: 1px solid rgba(242, 169, 59, 0.35);
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.08);
}

.transition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.transition-actions .secondary-action {
  border-color: #adc5cf;
  background: transparent;
  color: #edf6f8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 29, 43, 0.72);
}

.transition-modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid rgba(242, 169, 59, 0.4);
  border-radius: 8px;
  padding: 1rem;
  background: #0b2734;
  color: #edf6f8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.transition-modal h2 {
  margin: 0 0 0.75rem;
  color: #f8c66b;
}

.anonymous-page {
  background: var(--brand-navy);
  color: #e8eef2;
}

.anonymous-shell {
  background: var(--brand-navy);
}

.anonymous-shell .chat-panel {
  border-right-color: rgba(242, 169, 59, 0.22);
  background: var(--brand-navy);
}

.anonymous-shell .messages {
  background: linear-gradient(180deg, var(--brand-navy) 0%, #041c2d 65%, #062332 100%);
}

.anonymous-shell .privacy-banner,
.anonymous-shell .answer-box,
.anonymous-shell .case-actions,
.anonymous-shell .current-question-card {
  border-color: rgba(245, 179, 0, 0.18);
  background: rgba(1, 21, 46, 0.78);
  color: #e8eef2;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.anonymous-shell .privacy-banner {
  border-left-color: #f2a93b;
}

.anonymous-shell .privacy-banner strong,
.anonymous-shell .question-meta,
.anonymous-shell .side-panel h2,
.anonymous-shell .classification-panel h2,
.anonymous-shell .similarity-panel h2 {
  color: #f2a93b;
}

.anonymous-shell .privacy-banner p,
.anonymous-shell .keyboard-hint,
.anonymous-shell .question-code,
.anonymous-shell .classification-notice,
.anonymous-shell .quick-actions-label,
.anonymous-shell .current-question-card p,
.anonymous-shell .flow-notice {
  color: #c7d9dd;
}

.anonymous-shell .backend-status {
  border-bottom-color: rgba(242, 169, 59, 0.2);
  background: #061f2f;
  color: #e8eef2;
}

.anonymous-shell .backend-status.connected {
  background: #08283a;
  color: #e8eef2;
}

.anonymous-shell .backend-status.unavailable {
  background: rgba(242, 169, 59, 0.14);
  color: #ffe1a8;
}

.anonymous-shell .technical-connection-panel .backend-status {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(232, 238, 242, 0.16);
  border-radius: 6px;
  background: rgba(1, 21, 46, 0.72);
  color: #e8eef2;
  font-size: 0.82rem;
}

.anonymous-shell .case-actions button:first-child,
.anonymous-shell #indenizometroButton,
.anonymous-shell #submitAnswerButton,
.anonymous-shell .quick-actions .quick-confirm,
.anonymous-shell #closeSimulationButton,
.anonymous-shell #backToAnonymousResultButton {
  border-color: #f2a93b;
  background: #f2a93b;
  color: #061d2b;
  font-weight: 800;
}

.anonymous-shell .case-actions button:first-child:hover,
.anonymous-shell #indenizometroButton:hover,
.anonymous-shell #submitAnswerButton:hover,
.anonymous-shell .quick-actions .quick-confirm:hover,
.anonymous-shell #closeSimulationButton:hover,
.anonymous-shell #backToAnonymousResultButton:hover {
  background: #d9942e;
}

.anonymous-shell .case-actions button:not(:first-child),
.anonymous-shell .secondary-action,
.anonymous-shell .classification-actions button,
.anonymous-shell .area-correction-panel button,
.anonymous-shell .route-correction-notice button {
  border-color: rgba(245, 179, 0, 0.32);
  background: rgba(1, 21, 46, 0.44);
  color: #d9fbf6;
}

.anonymous-shell .route-correction-notice {
  background: #fff7d6;
  color: #3f2600;
}

.anonymous-shell .route-correction-notice button {
  border-color: #0e3a4a;
  background: #0e3a4a;
  color: #ffffff;
}

.anonymous-shell .route-correction-notice .secondary-action {
  border-color: #6b3f06;
  background: #ffffff;
  color: #3f2600;
}

.anonymous-shell .case-actions button:not(:first-child):hover,
.anonymous-shell .secondary-action:hover,
.anonymous-shell .classification-actions button:hover,
.anonymous-shell .area-correction-panel button:hover,
.anonymous-shell .route-correction-notice button:hover {
  border-color: #f2a93b;
  background: rgba(242, 169, 59, 0.16);
  color: #ffe1a8;
}

.anonymous-shell .case-actions {
  align-items: center;
  background: rgba(1, 21, 46, 0.82);
  border-top: 1px solid rgba(245, 179, 0, 0.12);
}

.anonymous-shell .case-actions #newSessionButton {
  order: 1;
}

.anonymous-shell .case-actions .partner-link-button {
  order: 2;
  border-color: #f5b300;
  background: #f5b300;
  color: #061d2b;
  font-weight: 850;
}

.anonymous-shell .case-actions .partner-link-button:hover {
  border-color: #ffc83d;
  background: #d99b00;
  color: #061d2b;
}

.anonymous-shell .case-actions #privacyNoticeButton {
  order: 3;
  margin-left: auto;
}

.anonymous-shell .case-actions #indenizometroButton {
  order: 4;
}

.anonymous-shell .case-actions #indenizometroButton {
  border-color: #f5b300;
  background: #f5b300;
  color: #001b2a;
  font-weight: 800;
}

.anonymous-shell .case-actions #indenizometroButton:hover {
  background: #d99b00;
  color: #001b2a;
}

.anonymous-shell textarea,
.anonymous-shell select,
.anonymous-shell input {
  border-color: rgba(232, 238, 242, 0.28);
  background: #eef4f6;
  color: #061d2b;
}

.anonymous-shell .message {
  border-color: rgba(232, 238, 242, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}

.anonymous-shell .message.user {
  border-color: rgba(242, 169, 59, 0.38);
  background: rgba(242, 169, 59, 0.12);
}

.anonymous-shell .quick-actions button,
.anonymous-shell #skippedList button {
  border-color: rgba(232, 238, 242, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #e8eef2;
}

.anonymous-shell .quick-actions button:hover,
.anonymous-shell #skippedList button:hover {
  border-color: #f2a93b;
  background: rgba(242, 169, 59, 0.13);
  color: #ffe1a8;
}

.anonymous-shell .quick-actions .quick-option.selected,
.anonymous-shell .quick-actions .quick-option[aria-pressed="true"] {
  border-color: #f2a93b;
  background: #0e3a4a;
  color: #ffffff;
}

.anonymous-shell .side-panel {
  background: #082433;
}

.anonymous-shell .side-panel section {
  border-bottom-color: rgba(242, 169, 59, 0.2);
}

.anonymous-shell .meta-list dt {
  color: #adc5cf;
}

.anonymous-shell .meta-list dd {
  color: #ffffff;
}

.anonymous-shell .voluntary-transition-panel {
  background: rgba(242, 169, 59, 0.1);
}

.anonymous-shell .assistant-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid rgba(245, 179, 0, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 179, 0, 0.13), rgba(30, 58, 138, 0.18));
}

.anonymous-shell .assistant-card h2 {
  margin-bottom: 0.25rem;
}

.anonymous-shell .assistant-card p {
  margin: 0;
  color: #d9e4ea;
  font-size: 0.9rem;
  line-height: 1.38;
}

.ai-avatar {
  display: block;
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
}

.denise-media.denise-video-ready .denise-video {
  display: block !important;
  visibility: visible;
  opacity: 1;
  z-index: 2;
}

.denise-media.denise-video-ready .denise-fallback {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.denise-media.denise-video-fallback .denise-video,
.denise-media.denise-video-error .denise-video,
.denise-media.reduced-motion .denise-video,
.denise-media.video-fallback .denise-video {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.denise-media.denise-video-fallback .denise-fallback,
.denise-media.denise-video-error .denise-fallback,
.denise-media.reduced-motion .denise-fallback,
.denise-media.video-fallback .denise-fallback {
  display: block !important;
  visibility: visible;
  opacity: 1;
  z-index: 2;
}

.question-assistant-card .ai-avatar-large {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.24));
  animation: denise-idle 5s ease-in-out infinite;
}

.question-assistant-card.denise-answer-ok {
  border-color: rgba(245, 179, 0, 0.78);
  box-shadow: 0 22px 50px rgba(245, 179, 0, 0.18);
}

.question-assistant-card.denise-answer-ok .ai-avatar-large,
.question-assistant-card.denise-indenizometro-high .ai-avatar-large {
  animation: denise-confirm 0.9s ease both;
}

.question-assistant-card.denise-thinking .ai-avatar-large {
  animation: denise-thinking 1.2s ease-in-out infinite;
}

.question-assistant-card.denise-indenizometro-high .assistant-badge {
  background: rgba(245, 179, 0, 0.28);
  color: #fff1bf;
}

.question-assistant-card.denise-indenizometro-low .assistant-badge,
.question-assistant-card.denise-indenizometro-very-low .assistant-badge,
.question-assistant-card.denise-sem-base .assistant-badge {
  border-color: rgba(199, 217, 221, 0.42);
  background: rgba(199, 217, 221, 0.12);
  color: #edf6f8;
}

.history-panel {
  min-height: 0;
  margin: 0.75rem 1.25rem 0;
  border: 1px solid rgba(245, 179, 0, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.history-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  color: #f2a93b;
  font-size: 1rem;
  font-weight: 800;
  list-style: none;
}

.history-panel summary::-webkit-details-marker {
  display: none;
}

.history-panel summary button {
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
}

.history-panel:not([open]) {
  background: rgba(255, 255, 255, 0.04);
}

.history-panel:not([open]) summary {
  min-height: 2.25rem;
}

.history-panel[open] .classification-notice {
  margin: 0 0.85rem;
}

.history-list {
  display: grid;
  gap: 0.42rem;
  min-height: 12rem;
  max-height: calc(100vh - 12rem);
  margin: 0.75rem 0.85rem 0.85rem;
  padding: 0 0.2rem 0 1.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  resize: vertical;
}

.history-list li {
  margin: 0;
  padding: 0.46rem 0.55rem;
  border: 1px solid rgba(229, 231, 235, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.history-question,
.history-answer,
.history-pii {
  display: block;
}

.history-question {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.history-answer {
  margin-top: 0.32rem;
  color: #ffffff;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.history-code {
  display: block;
  margin-bottom: 0.25rem;
  color: #adc5cf;
  font-size: 0.7rem;
  font-weight: 800;
}

.history-pii {
  margin-top: 0.28rem;
  color: #c7d9dd;
  font-size: 0.82rem;
}

.history-empty {
  list-style: none;
  color: #c7d9dd;
}

.indenizometro-output {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: 1px solid rgba(245, 179, 0, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(245, 179, 0, 0.17), transparent 30%),
    linear-gradient(145deg, rgba(1, 21, 46, 0.96), rgba(6, 35, 50, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 38px rgba(0, 0, 0, 0.22);
}

.indenizometro-financial-reference {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.2rem;
  padding: 0.85rem;
  border: 1px solid rgba(245, 179, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.indenizometro-financial-reference h4 {
  margin: 0;
  color: #f8c66b;
  font-size: 1rem;
}

.indenizometro-financial-reference p {
  margin: 0;
  color: #edf6f8;
  line-height: 1.45;
}

.indenizometro-output:empty {
  display: none;
}

.indenizometro-output h3,
.indenizometro-output p,
.indenizometro-output ul {
  margin: 0;
}

.indenizometro-output h3 {
  color: #f5b300;
  font-size: 0.95rem;
}

.indenizometro-output p,
.indenizometro-output li {
  color: #edf6f8;
  line-height: 1.38;
}

.indenizometro-summary {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.indenizometro-summary div {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: baseline;
}

.indenizometro-summary dt {
  color: #adc5cf;
}

.indenizometro-summary dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
}

.indenizometro-limits {
  color: #c7d9dd;
  font-size: 0.86rem;
}

.indenizometro-card {
  --indenizometro-tone: #f5b300;
  --indenizometro-tone-soft: rgba(245, 179, 0, 0.18);
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(245, 179, 0, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.indenizometro-card.central {
  grid-template-columns: minmax(160px, 220px) minmax(220px, 300px) minmax(0, 1fr);
  gap: clamp(1.1rem, 3vw, 2rem);
  padding: clamp(1rem, 2.4vw, 1.6rem);
  border-color: color-mix(in srgb, var(--indenizometro-tone) 70%, transparent);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at 20% 20%, var(--indenizometro-tone-soft), transparent 34%),
    linear-gradient(145deg, rgba(1, 21, 46, 0.42), rgba(6, 35, 50, 0.28));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28), 0 0 32px var(--indenizometro-tone-soft), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.indenizometro-card.indenizometro-high {
  --indenizometro-tone: #31b77b;
  --indenizometro-tone-soft: rgba(49, 183, 123, 0.18);
  border-color: rgba(49, 183, 123, 0.72);
}

.indenizometro-card.indenizometro-mid {
  --indenizometro-tone: #f5b300;
  --indenizometro-tone-soft: rgba(245, 179, 0, 0.18);
  border-color: rgba(245, 179, 0, 0.56);
}

.indenizometro-card.indenizometro-low,
.indenizometro-card.indenizometro-very-low {
  --indenizometro-tone: #d24a3f;
  --indenizometro-tone-soft: rgba(210, 74, 63, 0.18);
  border-color: rgba(210, 74, 63, 0.62);
  background: rgba(255, 255, 255, 0.045);
}

.indenizometro-ring {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, rgba(245, 179, 0, 0.13), rgba(245, 179, 0, 0.02));
}

.indenizometro-ring::before {
  content: "";
  position: absolute;
  inset: auto 12% 12%;
  height: calc(var(--percent) * 0.72%);
  border-radius: 999px 999px 44% 44%;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--indenizometro-tone) 78%, white), var(--indenizometro-tone));
  opacity: 0.22;
  filter: blur(0.2px);
  transition: height 0.08s linear;
}

.indenizometro-ring svg {
  width: 132px;
  height: 132px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 14px var(--indenizometro-tone-soft));
}

.indenizometro-ring-large,
.indenizometro-ring-large svg {
  width: clamp(220px, 24vw, 300px);
  height: clamp(220px, 24vw, 300px);
}

.indenizometro-ring-large .indenizometro-percent {
  font-size: clamp(2.25rem, 4vw, 3.6rem);
}

.indenizometro-ring-base,
.indenizometro-ring-value {
  fill: none;
  stroke-width: 13;
}

.indenizometro-ring-base {
  stroke: rgba(229, 231, 235, 0.3);
}

.indenizometro-ring-value {
  stroke: var(--indenizometro-tone);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--percent));
  transition: stroke-dashoffset 0.08s linear;
}

.denise-result-companion {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.48rem;
  min-height: 100%;
  text-align: center;
}

.denise-result-media {
  width: clamp(160px, 13vw, 218px);
  aspect-ratio: 1 / 1;
}

.denise-result-companion .ai-avatar {
  width: clamp(160px, 13vw, 218px);
  height: clamp(160px, 13vw, 218px);
  box-sizing: border-box;
  padding: 0.08rem;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.28));
  animation: denise-confirm 1.15s ease both;
}

.denise-result-companion.indenizometro-high .denise-result-media {
  width: clamp(240px, 19.5vw, 327px);
}

.denise-result-companion.indenizometro-high .ai-avatar {
  width: clamp(240px, 19.5vw, 327px);
  height: clamp(240px, 19.5vw, 327px);
}

.denise-result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border: 1px solid rgba(245, 179, 0, 0.58);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(245, 179, 0, 0.16);
  color: #ffe1a8;
  font-size: 0.78rem;
  font-weight: 880;
}

.denise-result-companion p {
  max-width: 13rem;
  color: #c7d9dd;
  font-size: 0.86rem;
}

.denise-result-companion.indenizometro-high .denise-result-badge {
  border-color: rgba(49, 183, 123, 0.62);
  background: rgba(49, 183, 123, 0.2);
  color: #c8f7df;
}

.denise-result-companion.indenizometro-low .denise-result-badge,
.denise-result-companion.indenizometro-very-low .denise-result-badge {
  border-color: rgba(210, 74, 63, 0.58);
  background: rgba(210, 74, 63, 0.14);
  color: #ffe2df;
}

.indenizometro-percent {
  position: absolute;
  color: #ffffff;
  font-size: 1.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
}

.indenizometro-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.indenizometro-sparkles i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5b300;
  box-shadow: 0 0 12px rgba(245, 179, 0, 0.72);
  opacity: 0;
  animation: indenizometro-spark 1.8s ease-out 0.45s forwards;
}

.indenizometro-sparkles i:nth-child(1) {
  top: 18px;
  right: 27px;
}

.indenizometro-sparkles i:nth-child(2) {
  bottom: 25px;
  right: 16px;
  animation-delay: 0.72s;
}

.indenizometro-sparkles i:nth-child(3) {
  bottom: 18px;
  left: 28px;
  animation-delay: 0.95s;
}

.indenizometro-card-content {
  display: grid;
  gap: 0.6rem;
}

.indenizometro-eyebrow {
  color: #f5b300;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.indenizometro-statement {
  color: #ffffff;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 760;
}

.indenizometro-compliance {
  color: #d9e4ea;
  font-size: 0.86rem;
}

@keyframes indenizometro-fill {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: calc(100 - var(--percent));
  }
}

@keyframes indenizometro-spark {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  45% {
    opacity: 0.9;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes denise-idle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

@keyframes denise-confirm {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.24));
  }
  42% {
    transform: translateY(-7px) scale(1.045) rotate(-1.5deg);
    filter: drop-shadow(0 0 24px rgba(245, 179, 0, 0.52));
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes denise-thinking {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(1.2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .question-assistant-card .ai-avatar-large,
  .denise-result-companion .ai-avatar,
  .indenizometro-sparkles i {
    animation: none;
  }

  .denise-media .denise-video {
    display: none !important;
  }

  .denise-media .denise-fallback {
    display: block !important;
  }

  .indenizometro-ring-value {
    transition: none;
  }
}

.case-picker {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.case-picker label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.case-picker-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.45rem;
}

.case-picker-actions button {
  min-width: 0;
  background: white;
  color: var(--accent);
}

.upload-feedback {
  min-height: 1.25rem;
  margin: 0.55rem 0 0;
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.4rem;
}

pre {
  max-height: 440px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--brand-navy);
  color: #f2f4f7;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(242, 169, 59, 0.22);
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .app-shell.side-collapsed {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    border-right: 0;
    min-height: 100vh;
  }

  .side-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .side-collapsed .side-panel {
    padding: 0.65rem 0.85rem;
  }

  .side-collapsed .side-panel-header {
    display: flex;
    justify-items: stretch;
    margin: 0;
  }

  .side-collapsed .side-panel-header span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .side-collapsed .side-panel-toggle {
    width: auto;
    min-height: 2rem;
    padding: 0.25rem 0.62rem;
    color: #ffe1a8;
  }

  .side-collapsed .side-panel-toggle::after {
    content: none;
  }

  .interaction-zone {
    grid-template-columns: 1fr;
  }

  .question-assistant-card {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .answer-controls {
    grid-template-columns: 1fr;
  }

  .anonymous-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: row;
  }

  .brand-logo {
    width: min(260px, 86vw);
  }

  .brand-logo-full {
    width: min(440px, 92vw);
    max-height: 112px;
  }

  .anonymous-topbar .brand-copy {
    position: static;
    width: 100%;
    justify-items: start;
    text-align: left;
    transform: none;
    margin-top: 0.4rem;
  }

  .brand-symbol {
    width: 46px;
    height: 46px;
  }

  .history-list {
    max-height: 18rem;
  }

  .indenizometro-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .indenizometro-card.central {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-status {
    display: none;
  }
}
