:root {
  /* Enter-inspired light theme */
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --ink: #0e1220;          /* near-black headings */
  --text: #3c4658;         /* body */
  --muted: #7c8699;
  --line: #e7ebf2;
  --line-soft: #eef1f6;
  --card: #ffffff;

  --accent: #FFAE35;       /* primary amber */
  --accent-2: #FFC163;     /* lighter amber (gradients) */
  --accent-ink: #B5740C;   /* dark amber — text/links on light backgrounds, hover */
  --accent-soft: #FFF3DF;  /* light amber tint */

  --err: #d64550;

  --radius-card: 18px;
  --radius-ctrl: 11px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 8px 30px rgba(16, 24, 40, 0.06);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: #CECECE;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 72px;
}

/* ---------------------------------------------------------------- Menu bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 72px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
}
.brand {
  display: flex;
  align-items: center;
  position: relative;
  height: 72px;
  width: 280px;
  overflow: hidden;
  text-decoration: none;
}
.brand-logo {
  position: absolute;
  left: 0;
  top: 50%;
  height: 200px;
  width: auto;
  max-width: 280px;
  display: block;
  transform: translateY(-50%);
}

.nav-links { display: flex; gap: 6px; }
.nav-link {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.is-active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-link-feature {
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.nav-link-feature:hover {
  color: #fff;
  background: #2E2E2F;
}
.nav-link-feature.is-active {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------------------------------------------------------------- Layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 24px 72px;
  flex: 1;
  min-height: calc(100vh - 72px - 58px);
}

.view { display: none; }
.view.is-active {
  display: block;
  animation: fade 0.25s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.intro { max-width: 760px; margin: 0 auto 26px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.intro h1 {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 12px;
}
.intro p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------------------------------------------------------------- Conheça */
.learn-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  align-items: center;
  gap: 44px;
  min-height: calc(100vh - 188px);
  padding: 18px 0 52px;
}
.learn-hero-copy h1 {
  font-family: var(--font-head);
  font-size: 54px;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 18px;
}
.learn-hero-copy p,
.learn-section-copy p,
.learn-showcase-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}
.learn-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.learn-actions .btn-primary,
.learn-actions .btn-secondary,
.learn-split .btn-primary {
  width: auto;
  min-width: 150px;
  padding: 13px 18px;
}
.learn-hero-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  min-height: 520px;
}
.learn-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.learn-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
  margin-bottom: 72px;
}
.learn-strip div {
  min-height: 126px;
  padding: 24px;
  background: var(--bg-soft);
}
.learn-strip strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.learn-strip span {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.learn-section,
.learn-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.1fr);
  gap: 46px;
  align-items: center;
  margin-bottom: 76px;
}
.learn-section-copy h2,
.learn-showcase-copy h2 {
  font-family: var(--font-head);
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 600;
}
.learn-checklist {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.learn-checklist li {
  position: relative;
  padding-left: 24px;
  color: var(--text);
  line-height: 1.5;
}
.learn-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.learn-image-grid {
  display: grid;
  grid-template-columns: 0.88fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.learn-image-grid figure,
.learn-device,
.learn-showcase {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow-md);
}
.learn-image-grid figure:first-child { transform: translateY(28px); }
.learn-image-grid img,
.learn-device img,
.learn-showcase img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.learn-showcase {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 76px;
}
.learn-showcase-copy {
  padding: 38px;
  align-self: center;
}
.learn-showcase img {
  min-height: 420px;
  object-position: left top;
}
.learn-capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 76px;
}
.learn-capabilities article {
  min-height: 238px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.learn-capabilities span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 22px;
}
.learn-capabilities h3 {
  color: var(--ink);
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}
.learn-capabilities p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.learn-split {
  grid-template-columns: minmax(420px, 1.05fr) minmax(0, 0.85fr);
}
.learn-device {
  max-height: 640px;
}
.learn-device img {
  object-position: center top;
}
.learn-split .btn-primary {
  margin-top: 26px;
}
.learn-showcase-compact {
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------- Card */
.card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }

select, textarea, input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  transition: border-color 0.15s, box-shadow 0.15s;
}
select {
  padding: 12px 13px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237c8699' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 174, 53, 0.20);
}
input {
  padding: 12px 13px;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 174, 53, 0.20);
}

/* Toggle */
.toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-ctrl);
}
.toggle-label { margin-bottom: 3px; }
.toggle-hint { font-size: 12.5px; color: var(--muted); }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: #cdd4df; border-radius: 26px; transition: 0.2s; }
.slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 6px 18px rgba(255, 174, 53, 0.32);
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 8px 22px rgba(255, 174, 53, 0.42); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #f4dcb4; color: #9aa0a6; box-shadow: none; cursor: not-allowed; }
.btn-secondary {
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid #ffe0ad;
  border-radius: 999px;
  cursor: pointer;
}
.btn-secondary:hover { filter: brightness(0.98); }

/* Status */
.status {
  margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-ctrl);
  font-size: 14px; display: flex; align-items: center; gap: 12px;
}
.status.loading { background: var(--accent-soft); color: var(--accent-ink); }
.status.success { background: var(--accent-soft); color: var(--accent-ink); }
.status.error { background: #fdecee; color: var(--err); }
.spinner {
  width: 18px; height: 18px; flex: none;
  border: 2.5px solid rgba(255, 174, 53, 0.30);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- Client Profile */
.search-card { max-width: 860px; }
.search-form {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  align-items: end;
}
.search-field { margin-bottom: 0; }

.profile {
  max-width: 1120px;
  margin: 28px auto 0;
}
.profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.profile-header h2 {
  font-family: var(--font-head);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 6px;
}
.profile-header p { margin: 0; color: var(--muted); font-size: 14px; }
.profile-risk { margin-bottom: 0; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metric, .panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.metric {
  min-height: 92px;
  padding: 14px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 10px;
}
.metric strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-bottom: 14px;
}
.panel { padding: 18px; }
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel h3 {
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 14px;
}
.panel-title-row h3 { margin-bottom: 0; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.icon-button img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.icon-button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
.allocation-list { display: grid; gap: 12px; }
.allocation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}
.allocation-meta span { color: var(--text); }
.allocation-meta strong { color: var(--ink); }
.allocation-track {
  height: 10px;
  overflow: hidden;
  margin-top: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
}
.allocation-track span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: inherit;
}
.risk-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
}
.muted-text { color: var(--muted); margin: 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 18, 32, 0.28);
}
.modal {
  width: min(620px, 100%);
  max-height: min(640px, 90vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(16, 24, 40, 0.20);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0;
}
.risk-reference {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}
.risk-reference section {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-soft);
}
.risk-reference h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
}
.risk-reference p {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.positions-panel { padding: 0; overflow: hidden; }
.positions-panel h3 { padding: 18px 18px 0; }
.table-wrap { overflow-x: auto; }
.positions-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 13.5px;
}
.positions-table th {
  text-align: left;
  color: var(--muted);
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 600;
}
.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sort-header::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.25;
  transform: translateY(1px);
}
.sort-header:hover,
.sort-header.is-active {
  color: var(--accent-ink);
}
.sort-header.is-active::after {
  opacity: 0.9;
}
.sort-header.is-active[data-direction="asc"]::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
}
.positions-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.positions-table tr:last-child td { border-bottom: none; }
.positions-table strong { color: var(--ink); }
.class-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ret { font-weight: 600; }
.ret.pos { color: #137333; }
.ret.neg { color: #c5221f; }

/* ------------------------------------------------------ Generated Reports */
.reports-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}
.reports-panel .panel-title-row {
  padding: 18px 18px 0;
}
.reports-panel .status {
  margin: 14px 18px 0;
}
.reports-table-wrap {
  max-height: 532px;
  overflow: auto;
}
.reports-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.reports-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  color: var(--muted);
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 600;
}
.reports-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.reports-table tr:last-child td { border-bottom: none; }
.reports-table strong { color: var(--ink); }
.exa-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.exa-pill.on {
  color: #137333;
  background: #e6f4ea;
}
.exa-pill.off {
  color: #5f6368;
  background: #f1f3f4;
}
.table-link {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.table-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Chat */
.chat-card { max-width: 860px; padding: 0; overflow: hidden; display: flex; flex-direction: column; margin-bottom: 24px; }
.chat-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft);
}
.chat-toolbar label { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chat-toolbar select { max-width: 320px; padding: 9px 12px; font-size: 14px; }

.chat-messages {
  min-height: 420px;
  max-height: none;
  overflow-y: auto;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-empty { margin: auto; text-align: center; color: var(--muted); padding: 16px; }
.chat-empty-mark {
  display: block; width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 20px rgba(255, 174, 53, 0.30);
}
.chat-empty p { margin: 0 0 16px; font-size: 15px; }
.chat-suggestions { display: flex; flex-direction: column; gap: 8px; max-width: 380px; margin: 0 auto; }
.suggestion {
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.suggestion:hover { border-color: var(--accent); color: var(--accent-ink); }

.bubble {
  max-width: 78%; padding: 11px 15px; font-size: 14.5px; line-height: 1.55;
  border-radius: 16px; white-space: pre-wrap; word-wrap: break-word;
}
.bubble h1,
.bubble h2,
.bubble h3 {
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.25;
  white-space: normal;
}
.bubble h1 { font-size: 18px; }
.bubble h2 { font-size: 16px; }
.bubble h3 { font-size: 15px; }
.bubble p { margin: 0 0 10px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble strong { font-weight: 600; color: var(--ink); }
.bubble ul {
  margin: 0 0 10px 18px;
  padding: 0;
  white-space: normal;
}
.bubble li { margin-bottom: 4px; }
.chat-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 8px 0 12px;
  white-space: normal;
}
.chat-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.chat-table th,
.chat-table td {
  padding: 7px 8px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.chat-table th {
  color: var(--muted);
  background: var(--bg-soft);
  font-weight: 600;
}
.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--ink); border-bottom-right-radius: 5px;
}
.bubble.assistant {
  align-self: flex-start; background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--line-soft); border-bottom-left-radius: 5px;
}
.bubble.typing { color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: blink 1.2s infinite both;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.chat-input {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 16px; border-top: 1px solid var(--line-soft); background: #fff;
}
.chat-input textarea {
  resize: none; padding: 12px 14px; max-height: 140px; line-height: 1.45;
}
.btn-send { width: 46px; height: 46px; flex: none; padding: 0; display: grid; place-items: center; }

/* ---------------------------------------------------------------- Footer */
.footer {
  width: 100%;
  background: #CECECE;
  border-top: 1px solid var(--line);
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.footer p {
  margin: 0;
  color: #2E2E2F;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  font-weight: 300;
}

@media (max-width: 640px) {
  body { padding-top: 64px; }
  .nav { height: 64px; }
  .container { min-height: calc(100vh - 64px - 58px); }
  .nav-inner { padding: 0 14px; }
  .brand { height: 64px; width: 140px; flex: none; }
  .brand-logo { height: 46px; }
  .nav-links { gap: 2px; overflow-x: auto; }
  .nav-link { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .intro h1 { font-size: 27px; }
  .card { padding: 22px; }
  .search-form { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-header h2 { font-size: 25px; }
  .chat-toolbar { flex-direction: column; align-items: stretch; }
  .chat-toolbar select { max-width: none; }
  .chat-messages { min-height: 360px; }
}

@media (max-width: 980px) {
  .learn-hero,
  .learn-section,
  .learn-split,
  .learn-showcase {
    grid-template-columns: 1fr;
  }
  .learn-hero {
    min-height: auto;
    padding-top: 10px;
  }
  .learn-hero-copy h1 {
    font-size: 42px;
  }
  .learn-hero-media,
  .learn-hero-media img {
    min-height: 420px;
  }
  .learn-strip,
  .learn-capabilities {
    grid-template-columns: 1fr;
  }
  .learn-image-grid {
    grid-template-columns: 1fr 1fr;
  }
  .learn-image-grid figure:first-child {
    transform: none;
  }
  .learn-showcase-copy {
    padding: 30px;
  }
}

@media (max-width: 640px) {
  .learn-hero-copy h1 {
    font-size: 34px;
  }
  .learn-hero-copy p,
  .learn-section-copy p,
  .learn-showcase-copy p {
    font-size: 15.5px;
  }
  .learn-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .learn-actions .btn-primary,
  .learn-actions .btn-secondary,
  .learn-split .btn-primary {
    width: 100%;
  }
  .learn-hero-media,
  .learn-hero-media img {
    min-height: 360px;
  }
  .learn-strip,
  .learn-section,
  .learn-split,
  .learn-showcase,
  .learn-capabilities {
    margin-bottom: 42px;
  }
  .learn-section-copy h2,
  .learn-showcase-copy h2 {
    font-size: 29px;
  }
  .learn-image-grid {
    grid-template-columns: 1fr;
  }
  .learn-showcase img {
    min-height: 300px;
  }
  .learn-capabilities article {
    min-height: auto;
  }
}
