@font-face {
  font-family: "Deutsche Bank Text";
  src: url("/application/css/src/assets/fonts/deutschebanktext_w_rg.woff2") format("woff2"),
    url("/application/css/src/assets/fonts/deutschebanktext_w_rg.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

:root {
  --db-navy: #0c2340;
  --db-blue: #1b68ff;
  --db-ink: #17324d;
  --db-line: rgba(12, 35, 64, 0.12);
  --db-card: rgba(255, 255, 255, 0.9);
  --db-shadow: 0 20px 60px rgba(12, 35, 64, 0.12);
  --db-danger: #b14141;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(27, 104, 255, 0.11), transparent 28%),
    linear-gradient(180deg, #f4f8fd 0%, #edf2f8 44%, #f8fafc 100%);
  color: var(--db-ink);
  font-family: "Deutsche Bank Text", "Segoe UI", sans-serif;
}

.portal-header,
.portal-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.portal-header {
  padding: 28px 0 18px;
}

.portal-header__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.portal-brand-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.portal-brand {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.portal-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.portal-brand__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--db-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-brand strong {
  color: var(--db-navy);
  font-size: 1.12rem;
}

.portal-cross-link,
.portal-utility,
.portal-footer__links a {
  color: rgba(23, 50, 77, 0.8);
  text-decoration: none;
}

.portal-cross-link:hover,
.portal-utility:hover,
.portal-footer__links a:hover {
  color: var(--db-blue);
  text-decoration: none;
}

.portal-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(12, 35, 64, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(12, 35, 64, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--db-navy);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.portal-nav a.is-active {
  border-color: rgba(27, 104, 255, 0.18);
  background: linear-gradient(135deg, rgba(27, 104, 255, 0.12), rgba(27, 104, 255, 0.04));
  color: var(--db-blue);
}

.ask-eric-page {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero-band,
.chat-shell {
  position: relative;
  z-index: 1;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.hero-copy,
.hero-highlights,
.sidebar-card,
.chat-card {
  border: 1px solid var(--db-line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8));
  box-shadow: var(--db-shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 28px 30px;
}

.eyebrow,
.sidebar-card__eyebrow,
.assistant-label {
  margin: 0 0 12px;
  color: var(--db-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: var(--db-navy);
  font-size: clamp(2.35rem, 3vw, 3.5rem);
  line-height: 0.95;
}

.gradient-text {
  background: linear-gradient(135deg, #598ff0 0%, #1b68ff 45%, #0c2340 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-description,
.hero-note,
.hero-highlight p,
.sidebar-list li,
.composer-tip,
.chat-status {
  color: rgba(23, 50, 77, 0.74);
  line-height: 1.6;
}

.hero-description {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: 1rem;
}

.hero-link,
.button-primary,
.button-secondary,
.prompt-chip {
  position: relative;
  overflow: hidden;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease;
}

.hero-link::after,
.button-primary::after,
.button-secondary::after,
.prompt-chip::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.3) 50%, transparent 80%);
  transform: translateX(-130%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.hero-link:hover,
.hero-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(27, 104, 255, 0.2);
  text-decoration: none;
}

.hero-link:hover::after,
.hero-link:focus-visible::after,
.button-primary:hover::after,
.button-primary:focus-visible::after,
.button-secondary:hover::after,
.button-secondary:focus-visible::after,
.prompt-chip:hover::after,
.prompt-chip:focus-visible::after {
  transform: translateX(130%);
}

.hero-link--primary {
  background: linear-gradient(135deg, var(--db-blue), #0c57d6);
  color: #fff;
}

.hero-side {
  display: flex;
  height: 100%;
}

.sidebar-card.hero-side-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 18px 20px;
}

.hero-side-card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.hero-side-card .hero-note {
  margin: 0 0 14px;
  font-size: 0.94rem;
}

.hero-side-card .hero-link {
  width: 100%;
}

.hero-highlights {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: rgba(12, 35, 64, 0.08);
}

.hero-highlight {
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.94);
}

.hero-highlight__label {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--db-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-highlight strong,
.sidebar-card h2,
.chat-card__heading h2 {
  display: block;
  color: var(--db-navy);
}

.hero-highlight p {
  margin: 10px 0 0;
  font-size: 0.94rem;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 290px);
  gap: 24px;
  align-items: start;
}

.chat-sidebar {
  order: 2;
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-card {
  padding: 24px;
}

.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.sidebar-list {
  margin: 0;
  padding-left: 18px;
}

.sidebar-list li + li {
  margin-top: 10px;
}

.prompt-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prompt-chip {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(27, 104, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbff, #eef4ff);
  color: var(--db-navy);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.prompt-chip:hover:not(:disabled),
.prompt-chip:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(27, 104, 255, 0.28);
  box-shadow: 0 14px 28px rgba(27, 104, 255, 0.12);
  background: linear-gradient(180deg, #fbfdff, #e8f0ff);
}

.prompt-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-card {
  order: 1;
  display: flex;
  flex-direction: column;
  min-height: 820px;
  overflow: hidden;
  box-shadow: 0 26px 72px rgba(12, 35, 64, 0.16);
}

.chat-card__header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--db-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 253, 0.86));
}

.assistant-badge {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--db-blue), var(--db-navy));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.chat-card__heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.assistant-label {
  margin-bottom: 6px;
}

.chat-status {
  margin: 8px 0 0;
  font-size: 0.94rem;
}

.chat-status[data-state="busy"] {
  color: var(--db-blue);
}

.chat-status[data-state="error"] {
  color: var(--db-danger);
}

.chat-box {
  flex: 1;
  padding: 24px 24px 12px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(232, 240, 251, 0.58), rgba(247, 250, 253, 0.9));
}

.message {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-end;
}

.message--user {
  justify-content: flex-end;
}

.message__avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(12, 35, 64, 0.12);
  color: var(--db-navy);
}

.message--user .message__avatar {
  order: 2;
  background: rgba(12, 35, 64, 0.9);
  color: #fff;
}

.message__content {
  display: flex;
  flex-direction: column;
  max-width: min(760px, 82%);
}

.message--user .message__content {
  align-items: flex-end;
}

.message__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 4px 6px;
  color: rgba(23, 50, 77, 0.56);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.message__bubble {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(12, 35, 64, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(12, 35, 64, 0.08);
  overflow-wrap: anywhere;
}

.message--assistant .message__bubble {
  border-top-left-radius: 8px;
}

.message--user .message__bubble {
  border-top-right-radius: 8px;
  background: linear-gradient(135deg, rgba(27, 104, 255, 0.98), rgba(12, 35, 64, 0.96));
  color: #fff;
}

.message--error .message__bubble {
  border-color: rgba(177, 65, 65, 0.2);
  background: rgba(255, 242, 242, 0.96);
}

.message__bubble > *:last-child {
  margin-bottom: 0;
}

.message__bubble p,
.message__bubble ul,
.message__bubble ol,
.message__bubble pre,
.message__bubble blockquote {
  margin: 0 0 0.9rem;
}

.message__bubble ul,
.message__bubble ol {
  padding-left: 1.2rem;
}

.message__bubble pre {
  padding: 14px;
  border-radius: 16px;
  background: rgba(12, 35, 64, 0.92);
  color: #f5f9ff;
  overflow-x: auto;
}

.message__bubble code {
  padding: 0.12rem 0.36rem;
  border-radius: 6px;
  background: rgba(12, 35, 64, 0.08);
  font-size: 0.92em;
}

.message--user .message__bubble code {
  background: rgba(255, 255, 255, 0.18);
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(12, 35, 64, 0.4);
  animation: typingPulse 1.1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.composer {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--db-line);
  background: rgba(255, 255, 255, 0.96);
}

#chat-input {
  width: 100%;
  min-height: 58px;
  max-height: 180px;
  padding: 16px 18px;
  border: 1px solid rgba(12, 35, 64, 0.12);
  border-radius: 20px;
  background: #fff;
  color: var(--db-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: none;
  outline: none;
}

#chat-input:focus {
  border-color: rgba(27, 104, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(27, 104, 255, 0.09);
}

.composer-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.composer-tip {
  margin: 0;
  font-size: 0.9rem;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--db-blue), #0c57d6);
  color: #fff;
  box-shadow: 0 14px 30px rgba(27, 104, 255, 0.22);
}

.button-secondary {
  background: rgba(12, 35, 64, 0.06);
  color: var(--db-navy);
  border-color: rgba(12, 35, 64, 0.08);
}

.button-primary:hover:not(:disabled),
.button-primary:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(27, 104, 255, 0.28);
}

.button-secondary:hover:not(:disabled),
.button-secondary:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(27, 104, 255, 0.22);
  background: rgba(27, 104, 255, 0.08);
  box-shadow: 0 14px 28px rgba(12, 35, 64, 0.08);
}

.button-primary:disabled,
.button-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.portal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 0 0 32px;
}

.portal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-footer p {
  margin: 0;
  color: rgba(23, 50, 77, 0.7);
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  .hero-band,
  .chat-shell {
    grid-template-columns: 1fr;
  }

  .chat-sidebar,
  .chat-card {
    order: initial;
  }
}

@media (max-width: 720px) {
  .ask-eric-page {
    width: min(100% - 18px, 100%);
    padding: 24px 0 48px;
  }

  .portal-header,
  .portal-footer {
    width: min(100% - 18px, 100%);
  }

  .hero-copy,
  .sidebar-card,
  .chat-card__header,
  .composer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .chat-box {
    padding-left: 16px;
    padding-right: 16px;
  }

  .message__content {
    max-width: 88%;
  }

  .composer-actions,
  .button-primary,
  .button-secondary {
    width: 100%;
  }
}
