:root {
  color-scheme: light;
  
  /* Primary color palette */
  --color-primary: #174ca4;
  --color-primary-light: #264f97;
  --color-primary-dark: #17386f;
  --color-secondary: #264f97;
  --color-accent: #0066cc;
  
  /* Semantic colors */
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-info: #0ea5e9;
  
  /* Neutral palette */
  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;
  --color-neutral-950: #030712;
  
  /* Text colors */
  --ink: #000;
  --muted: #2a2a2a;
  
  /* Legacy compatibility (for existing code) */
  --brand-blue: #264f97;
  --brand-blue-dark: #17386f;
  --mint: #e8eef8;
  --line: #e2e8f1;
  --paper: #fff;
  --background: #f2f5fa;
  --amber: #a5712d;
  
  /* Typography */
  --font-h1-size: clamp(32px, 4vw, 43px);
  --font-h1-weight: 700;
  --font-h1-line-height: 1.22;
  --font-h1-letter-spacing: -1.35px;
  
  --font-h2-size: 22px;
  --font-h2-weight: 700;
  --font-h2-line-height: 1.35;
  --font-h2-letter-spacing: -0.45px;
  
  --font-body-size: 15px;
  --font-body-weight: 500;
  --font-body-line-height: 1.65;
  
  --font-label-size: 12px;
  --font-label-weight: 600;
  --font-label-line-height: 1.5;
  
  font-family: "Assistant", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 89% 4%, rgba(205, 218, 241, .56), transparent 32rem),
    radial-gradient(ellipse at 10% 27%, rgba(232, 236, 245, .58), transparent 30rem),
    var(--background);
  color: var(--ink);
  font-size: var(--font-body-size);
  line-height: var(--font-body-line-height);
  font-weight: var(--font-body-weight);
}

button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(38, 79, 151, .3);
  outline-offset: 3px;
}

.app-shell { width: min(1200px, calc(100% - 64px)); margin: 0 auto; }
.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(29, 41, 37, .08);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand-mark svg { width: 32px; height: 32px; }
.brand-title, .brand-subtitle { display: block; }
.brand-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; color: var(--ink); }
.brand-subtitle { margin-top: 3px; color: #2a2a2a; font-size: 11px; font-weight: 500; }
.topbar-note { display: flex; align-items: center; gap: 9px; color: #2a2a2a; font-size: 12px; font-weight: 500; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #64a983; box-shadow: 0 0 0 4px #e3f2e9; }

.intro { padding: 46px 0 31px; }
.eyebrow, .step-label, .side-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15px;
}
.eyebrow-line { width: 20px; height: 1px; background: #7caf97; }
.intro h1 {
  margin: 12px 0 9px;
  font-size: var(--font-h1-size);
  font-weight: var(--font-h1-weight);
  letter-spacing: var(--font-h1-letter-spacing);
  line-height: var(--font-h1-line-height);
}
.intro h1 span { color: var(--brand-blue); }
.intro-copy { max-width: 675px; margin: 0; color: var(--muted); font-size: var(--font-body-size); font-weight: var(--font-body-weight); }
.trust-points { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 17px; color: #1a1a1a; font-size: 12px; font-weight: 500; }
.trust-points > span { display: flex; align-items: center; gap: 7px; }
.check-icon { color: var(--brand-blue); font-size: 14px; font-weight: 800; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 23px; align-items: start; }
.main-panel, .side-card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 6px 26px rgba(27, 47, 35, .035); }
.main-panel { min-width: 0; padding: 27px 30px 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.section-heading h2 { margin: 9px 0 1px; font-size: var(--font-h2-size); font-weight: var(--font-h2-weight); letter-spacing: var(--font-h2-letter-spacing); line-height: var(--font-h2-line-height); color: var(--ink); }
.step-number { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--mint); color: var(--brand-blue); font-size: 10px; }
.section-description { margin: 5px 0 0; color: #1a1a1a; font-size: 12px; font-weight: 500; }
.optional-note { flex: 0 0 auto; margin-top: 3px; padding: 4px 10px; border: 1px solid #e9eee8; border-radius: 20px; color: #1a1a1a; font-size: 11px; font-weight: 500; }

.form-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid #edf0eb; }
.form-section-title { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 17px; }
.form-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f2f6f2; color: #55816c; font-size: 10px; font-weight: 700; }
.form-section-title h3 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.form-section-title p { margin: 2px 0 0; color: #1a1a1a; font-size: 11px; line-height: 1.5; font-weight: 500; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--muted); font-size: var(--font-label-size); font-weight: var(--font-label-weight); }
.field-wide { grid-column: 1 / -1; }
.field select, .field input {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid #e2e8e2; border-radius: 8px; background-color: #fff;
  color: #000; font-size: 12px; font-weight: 500;
}
.field select { cursor: pointer; }
.field input::placeholder { color: #888; }
.field small { color: #1a1a1a; font-size: 10.5px; font-weight: 500; line-height: 1.45; }
.input-suffix { display: flex; align-items: center; border: 1px solid #e2e8e2; border-radius: 8px; background: #fff; }
.input-suffix:focus-within { outline: 3px solid rgba(20, 108, 83, .12); border-color: #82ad97; }
.input-suffix input { border: 0; outline: 0; box-shadow: none; }
.input-suffix input:focus-visible { outline: 0; }
.input-suffix > span { padding: 0 12px; color: #1a1a1a; font-size: 12px; font-weight: 500; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 15px 0 0; color: #1a1a1a; font-size: 11px; font-weight: 500; }
.privacy-note span { color: var(--brand-blue); font-size: 16px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; padding-top: 18px; border-top: 1px solid #edf0eb; }
.form-actions p { margin: 0; color: #1a1a1a; font-size: 11px; font-weight: 500; }
.primary-button {
  display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 12px;
  padding: 0 17px; border: 0; border-radius: 9px; background: var(--brand-blue); color: #fff;
  cursor: pointer; font-size: 12px; font-weight: 700; transition: background .18s, transform .18s;
}
.primary-button:hover { transform: translateY(-1px); background: var(--brand-blue-dark); }
.primary-button span { font-size: 16px; }

.side-column { display: flex; flex-direction: column; gap: 13px; }
.side-card { padding: 19px 18px; }
.side-eyebrow { justify-content: space-between; color: #1a1a1a; font-size: 10px; font-weight: 500; }
.side-eyebrow span { display: inline-grid; width: 21px; height: 21px; place-items: center; border-radius: 7px; background: #f1f5ef; color: #1a1a1a; font-size: 10px; font-weight: 500; }
.sources-card > h2 { margin: 10px 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; color: #000; }
.side-intro { margin: 0; color: #1a1a1a; font-size: 11px; line-height: 1.65; font-weight: 500; }
.source-list { display: flex; flex-direction: column; margin-top: 14px; }
.source-link { display: grid; grid-template-columns: 31px minmax(0, 1fr) 14px; gap: 9px; align-items: center; padding: 10px 0; border-top: 1px solid #edf0eb; color: inherit; text-decoration: none; }
.source-link:hover strong { color: var(--brand-blue); }
.file-icon { display: grid; width: 30px; height: 33px; place-items: center; border: 1px solid #e4e9e2; border-radius: 6px; background: #fafbf8; color: #ba6455; font-size: 8px; font-weight: 800; }
.source-link strong, .source-link small { display: block; }
.source-link strong { font-size: 11px; font-weight: 700; line-height: 1.4; color: #000; }
.source-link small { margin-top: 2px; color: #1a1a1a; font-size: 10px; line-height: 1.4; font-weight: 500; }
.external-icon { justify-self: end; color: #1a1a1a; font-size: 13px; font-weight: 500; }
.duplicate-note { margin-top: 7px; padding: 10px 11px; border-radius: 8px; background: #f7f8f5; color: #1a1a1a; font-size: 10px; font-weight: 500; }
.duplicate-note summary { cursor: pointer; font-weight: 700; color: #000; }
.duplicate-note p { margin: 8px 0; line-height: 1.55; color: #1a1a1a; font-weight: 500; }
.duplicate-note a { color: var(--brand-blue); font-weight: 700; text-decoration: none; }
.caution-card { display: flex; gap: 11px; padding: 16px; background: #fffdf8; border-color: #f0eadc; }
.caution-icon { display: grid; flex: 0 0 23px; width: 23px; height: 23px; place-items: center; border: 1px solid #ead8b8; border-radius: 50%; color: var(--amber); font-size: 12px; font-weight: 700; }
.caution-card h2 { margin: 0; font-size: 12px; color: #000; font-weight: 700; }
.caution-card p { margin: 5px 0 0; color: #1a1a1a; font-size: 10.5px; line-height: 1.65; font-weight: 500; }
.version-note { margin: 0; color: #1a1a1a; font-size: 10px; text-align: center; font-weight: 500; }

.chat-section { margin-top: 31px; padding-top: 25px; border-top: 1px solid #e9ede7; }
.chat-heading { align-items: center; }
.text-button { padding: 7px 10px; border: 1px solid #e6ebe5; border-radius: 8px; background: #fff; color: #476555; cursor: pointer; font-size: 11px; font-weight: 600; }
.text-button:hover { background: #f5f8f3; }
.profile-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 15px; }
.profile-chip { padding: 5px 10px; border: 1px solid #e7ece5; border-radius: 18px; background: #fafbf8; color: #5f7066; font-size: 10px; }
.profile-warning { width: 100%; padding: 9px 11px; border-right: 3px solid #d59a4d; border-radius: 5px; background: #fff9ee; color: #786348; font-size: 11px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 15px; }
.suggestion { padding: 6px 10px; border: 1px solid #e0ebe3; border-radius: 18px; background: #f8fbf8; color: #3e6e58; cursor: pointer; font-size: 10.5px; transition: background .15s, border .15s; }
.suggestion:hover { border-color: #a9cbb5; background: #eff7f0; }
.chat-messages { display: flex; flex-direction: column; gap: 13px; max-height: 540px; overflow-y: auto; padding: 2px 2px 9px; scroll-behavior: smooth; }
.message { max-width: 94%; padding: 12px 14px; border: 1px solid #e9ede7; border-radius: 12px 12px 12px 4px; background: #fff; }
.message.user { align-self: flex-start; border-color: #d7e9dd; border-radius: 12px 12px 4px 12px; background: #eef7f0; }
.message.assistant { align-self: flex-end; }
.message-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #1a1a1a; font-size: 10px; font-weight: 700; }
.message-body { color: #000; font-size: 12px; line-height: 1.75; white-space: pre-line; font-weight: 500; }
.message-body strong { color: #000; font-weight: 700; }
.citations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0eb; }
.citations a { padding: 4px 8px; border: 1px solid #e5eee7; border-radius: 6px; color: var(--brand-blue); font-size: 10px; font-weight: 700; text-decoration: none; }
.citations a:hover { background: #f0f7f0; }
.question-form { display: flex; align-items: flex-end; gap: 9px; margin-top: 9px; padding: 7px; border: 1px solid #dde5dd; border-radius: 11px; background: #fff; }
.question-form:focus-within { border-color: #8eb6a0; box-shadow: 0 0 0 3px rgba(20, 108, 83, .08); }
.question-form textarea { flex: 1; min-height: 40px; max-height: 100px; resize: vertical; padding: 9px 8px; border: 0; outline: 0; color: #000; font-size: 12px; font-weight: 500; }
.question-form textarea::placeholder { color: #888; }
.question-form textarea:focus-visible { outline: 0; }
.send-button { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 8px; background: var(--brand-blue); color: #fff; cursor: pointer; }
.send-button:hover { background: var(--brand-blue-dark); }
.send-button svg { width: 19px; height: 19px; }
.chat-footnote { margin: 8px 1px 0; color: #1a1a1a; font-size: 10px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.footer { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 20px; padding-top: 15px; border-top: 1px solid rgba(29,41,37,.08); color: #1a1a1a; font-size: 10px; font-weight: 500; }
.footer span:first-child { color: #000; font-weight: 700; }

.brand-mark {
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(27,55,103,.14);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-title { color: #000; }
.brand-subtitle { max-width: 290px; color: #2a2a2a; font-weight: 500; }
.topbar { border-bottom-color: rgba(36,58,91,.1); }
.topbar-note { color: #2a2a2a; font-weight: 500; }
.status-dot { background: #668bc7; box-shadow: 0 0 0 4px #e7edf8; }

.intro {
  position: relative;
  display: grid;
  min-height: 316px;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 34px;
  margin: 32px 0 35px;
  padding: 32px 44px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 74% 90%, rgba(100,140,202,.25), transparent 42%),
    linear-gradient(118deg,#102750 0%,#17376f 52%,#28549b 100%);
  box-shadow: 0 22px 48px rgba(27,54,100,.19),0 6px 12px rgba(24,46,83,.12),inset 0 1px rgba(255,255,255,.22);
  color: #fff;
  isolation: isolate;
}
.intro::before {
  position: absolute;
  z-index: -1;
  inset: auto auto -100px -65px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(219,228,243,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 27px rgba(219,228,243,.035),0 0 0 56px rgba(219,228,243,.025),inset 0 0 35px rgba(219,228,243,.08);
  content: "";
}
.hero-copy { position: relative; z-index: 1; }
.intro .eyebrow { color: #d4dfef; }
.intro .eyebrow-line { background: #aabbd8; }
.intro h1 { margin: 15px 0 12px; font-size: clamp(34px,4vw,47px); letter-spacing: -1.5px; }
.intro h1 span { color: #d6e3fa; text-shadow: 0 2px 16px rgba(152,184,239,.23); }
.intro-copy { max-width: 565px; color: #e0e8f5; font-size: 14px; font-weight: 500; }
.intro .trust-points { gap: 19px; margin-top: 19px; color: #e0e8f5; font-size: 11px; font-weight: 500; }
.intro .check-icon { color: #a9c5f3; }
.notice-stack { display: grid; gap: 9px; margin: -16px 0 25px; }
.notice-card {
  margin: 0;
  padding: 12px 15px;
  border: 1px solid #dfe6f0;
  border-right: 3px solid #7391be;
  border-radius: 10px;
  background: linear-gradient(145deg,#fff,#f5f7fb);
  box-shadow: 0 5px 14px rgba(34,54,88,.045),inset 0 1px #fff;
  color: #1a1a1a;
  font-size: 11px;
  line-height: 1.75;
  font-weight: 500;
}
.notice-card strong { color: #000; font-weight: 700; }
.hero-visual { position: relative; display: grid; min-height: 250px; place-items: center; perspective: 900px; }
.hero-orbit { position: absolute; width: 228px; height: 228px; border: 1px solid rgba(217,228,246,.2); border-radius: 50%; transform: rotateX(66deg) rotateZ(-27deg); }
.orbit-outer { width: 274px; height: 274px; border-color: rgba(217,228,246,.13); transform: rotateX(68deg) rotateZ(21deg); }
.orbit-inner { box-shadow: inset 0 0 35px rgba(255,255,255,.04),0 0 35px rgba(130,165,221,.12); }
.hero-stack {
  position: relative;
  z-index: 1;
  width: 154px;
  height: 178px;
  transform-style: preserve-3d;
}
.hero-stack-back {
  position: absolute;
  inset: 20px 2px 3px 16px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 14px;
  background: linear-gradient(145deg,rgba(212,224,244,.9),rgba(117,149,199,.8));
  box-shadow: 0 18px 30px rgba(6,20,45,.28),inset 0 1px rgba(255,255,255,.65);
  transform: rotateZ(9deg) translateZ(4px);
}
.hero-stack-paper {
  position: absolute;
  inset: 4px 18px 19px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 19px 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 14px;
  background: linear-gradient(145deg,#fff 0%,#edf2fa 72%,#dfe7f3 100%);
  box-shadow: 0 18px 30px rgba(6,20,45,.3),inset 0 1px 2px #fff;
  transform: rotateY(-12deg) rotateX(6deg) rotateZ(-6deg) translateZ(16px);
  transition: transform .3s ease;
}
.hero-stack:hover .hero-stack-paper { transform: rotateY(-6deg) rotateX(2deg) rotateZ(-2deg) translateY(-4px) translateZ(23px); }
.paper-icon { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid #dfe7f4; border-radius: 11px; background: linear-gradient(145deg,#fff,#e7edf7); box-shadow: 0 4px 8px rgba(36,61,103,.1); color: #355a98; }
.paper-icon svg { width: 28px; height: 28px; }
.paper-lines { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-top: 16px; }
.paper-lines i { display: block; width: 100%; height: 4px; border-radius: 4px; background: #d3ddec; }
.paper-lines i:nth-child(2) { width: 78%; }
.paper-lines i:nth-child(3) { width: 57%; }
.paper-tag { margin-top: auto; padding: 4px 9px; border-radius: 12px; background: #dfe8f6; color: #36588f; font-size: 9px; font-weight: 700; }
.hero-float-card {
  position: absolute;
  z-index: 2;
  right: -3px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 12px;
  background: linear-gradient(135deg,rgba(255,255,255,.97),rgba(233,239,249,.93));
  box-shadow: 0 10px 22px rgba(8,24,52,.28),inset 0 1px #fff;
  color: #263d66;
  transform: translateZ(30px) rotateY(-8deg);
}
.hero-float-card strong,.hero-float-card small { display: block; white-space: nowrap; }
.hero-float-card strong { font-size: 10px; }
.hero-float-card small { color: #71809a; font-size: 9px; }
.float-check { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: linear-gradient(145deg,#416caf,#214984); box-shadow: 0 3px 7px rgba(30,65,123,.3),inset 0 1px rgba(255,255,255,.38); color: #fff; font-size: 13px; }
.hero-spark { position: absolute; z-index: 2; width: 7px; height: 7px; border: 1px solid #e6edf9; border-radius: 50%; background: #a9c1eb; box-shadow: 0 0 14px #c5d6f5; }
.spark-one { top: 26px; right: 51px; }
.spark-two { bottom: 40px; left: 36px; width: 5px; height: 5px; }

.main-panel,.side-card { box-shadow: 0 8px 26px rgba(34,54,88,.055),0 2px 5px rgba(34,54,88,.03),inset 0 1px #fff; }
.step-number { border: 1px solid #d8e2f1; background: linear-gradient(145deg,#f6f8fc,#e5ebf5); box-shadow: 0 2px 4px rgba(30,58,100,.08); }
.form-section,.form-actions { border-color: #e9edf3; }
.form-icon { border: 1px solid #e0e7f1; background: linear-gradient(145deg,#fff,#eaf0f9); box-shadow: 0 3px 6px rgba(34,60,101,.08); color: #5879ad; }
.field { color: #374458; }
.field select,.field input,.input-suffix { border-color: #dfe6f0; box-shadow: inset 0 1px 2px rgba(30,50,82,.025); color: #29384d; }
.input-suffix:focus-within { border-color: #91a9cf; outline-color: rgba(38,79,151,.12); }
.input-suffix > span { color: #78859b; }
.privacy-note { color: #8290a1; }
.primary-button,.send-button { border: 1px solid rgba(255,255,255,.16); background: linear-gradient(145deg,#3564ad,#1d4686); box-shadow: 0 5px 12px rgba(34,67,124,.2),inset 0 1px rgba(255,255,255,.2); }
.primary-button:hover,.send-button:hover { background: linear-gradient(145deg,#294f8c,#163767); }
.side-eyebrow { color: #778399; }
.side-eyebrow span { border: 1px solid #e2e8f1; background: linear-gradient(145deg,#fff,#e8eef8); color: #617ba5; }
.source-link { border-top-color: #e9edf3; }
.file-icon { border-color: #dfe5ed; background: linear-gradient(145deg,#fff,#eef1f6); box-shadow: 0 2px 4px rgba(34,58,94,.08); }
.duplicate-note { border: 1px solid #e8ecf1; background: #f6f8fb; }
.text-button { border-color: #e0e6ef; color: #41618f; }
.text-button:hover { background: #f1f4f9; }
.profile-chip { border-color: #e1e7f0; background: linear-gradient(145deg,#fff,#f1f4f9); color: #586981; }
.suggestion { border-color: #dde6f2; background: linear-gradient(145deg,#fff,#f1f5fa); color: #3f5e90; transition: background .15s,border .15s,transform .15s; }
.suggestion:hover { transform: translateY(-1px); border-color: #a6b9d8; background: #edf2f9; }
.message.user { border-color: #d7e2f1; background: #eff3fa; }
.citations { border-top-color: #e9edf3; }
.citations a { border-color: #dfe7f1; }
.citations a:hover { background: #edf2f9; }
.question-form { border-color: #dce4ef; box-shadow: 0 4px 12px rgba(34,54,88,.04),inset 0 1px #fff; }
.question-form:focus-within { border-color: #8fa9d1; box-shadow: 0 0 0 3px rgba(38,79,151,.08); }
.footer { border-top-color: rgba(36,58,91,.1); color: #7f8a9b; }
.footer span:first-child { color: #375990; }

@media (max-width: 930px) {
  .intro { grid-template-columns: minmax(0,1fr) 260px; gap: 15px; padding: 28px; }
  .hero-stack { transform: scale(.9); }
  .orbit-outer { width: 230px; height: 230px; }
}

@media (max-width: 930px) {
  .app-shell { width: min(760px, calc(100% - 36px)); }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .sources-card { grid-row: span 2; }
  .version-note { align-self: center; }
}

@media (max-width: 600px) {
  .app-shell { width: calc(100% - 28px); }
  .topbar { min-height: 70px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-subtitle { max-width: 185px; font-size: 9px; }
  .topbar-note { max-width: 133px; font-size: 10px; }
  .intro { min-height: 0; grid-template-columns: 1fr; gap: 5px; margin: 21px 0 25px; padding: 25px 20px 17px; border-radius: 17px; }
  .intro h1 { margin-top: 12px; font-size: 34px; }
  .intro-copy { font-size: 12px; }
  .intro .trust-points { gap: 8px 15px; margin-top: 14px; font-size: 10px; }
  .notice-stack { gap: 8px; margin: -12px 0 20px; }
  .notice-card { padding: 10px 12px; font-size: 10px; }
  .hero-visual { min-height: 165px; margin-top: 4px; }
  .hero-stack { transform: scale(.78); }
  .hero-orbit { width: 149px; height: 149px; }
  .orbit-outer { width: 184px; height: 184px; }
  .hero-float-card { right: calc(50% - 105px); bottom: -1px; padding: 7px 9px; }
  .hero-float-card strong { font-size: 9px; }
  .hero-float-card small { font-size: 8px; }
  .main-panel { padding: 20px 16px; border-radius: 12px; }
  .section-heading h2 { font-size: 19px; }
  .section-description { max-width: 360px; }
  .field-grid { grid-template-columns: 1fr; gap: 13px; }
  .field-wide { grid-column: auto; }
  .form-section { margin-top: 21px; padding-top: 18px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .side-column { display: flex; }
  .side-card { width: 100%; }
  .caution-card { order: 2; }
  .version-note { order: 3; }
  .message { max-width: 100%; }
  .footer { flex-direction: column; gap: 4px; }
}

body.is-embedded .app-shell { width: min(1200px, 100%); }
body.is-embedded .topbar,
body.is-embedded .footer,
body.is-embedded .intro { display: none; }
body.is-embedded .notice-stack { margin-top: 18px; }

/* =========================================================
   Legibility pass (user request): larger, darker text; Rubik like the main site.
   ========================================================= */
:root {
  --font-body-size: 17px; --font-body-weight: 400;
  --font-h2-size: 26px; --font-h1-letter-spacing: 0; --font-h2-letter-spacing: 0;
  --ink: #0a1a33; --muted: #1c2c45;
}
body, button, input, select, textarea { font-family: "Rubik", "Assistant", Calibri, Tahoma, Arial, sans-serif; }
body { color: #0a1a33; }
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }

.brand-title { font-size: 20px; font-weight: 700; letter-spacing: 0; color: #0a1a33; }
.brand-subtitle { font-size: 14px; color: #1c2c45; }
.topbar-note { font-size: 15px; color: #1c2c45; }
.eyebrow, .step-label, .side-eyebrow { font-size: 15px; }
.intro h1 { letter-spacing: 0; }
.intro-copy { font-size: 18px; font-weight: 400; color: #eef3fb; }
.intro .trust-points, .trust-points { font-size: 16px; }
.notice-card { font-size: 16px; color: #0a1a33; }
.section-heading h2 { font-size: 26px; }
.step-number { font-size: 14px; width: 28px; height: 28px; }
.section-description { font-size: 16px; color: #1c2c45; }
.optional-note { font-size: 14px; }
.form-icon { font-size: 14px; flex-basis: 36px; width: 36px; height: 36px; }
.form-section-title h3 { font-size: 19px; }
.form-section-title p { font-size: 15.5px; color: #1c2c45; }
.field { font-size: 16px; }
.field label, .field > span { font-size: 16px; color: #0a1a33; }
.field small { font-size: 14.5px; color: #1c2c45; }
.field input, .field select, .field textarea { font-size: 16px; color: #0a1a33; }
.input-suffix > span { font-size: 15px; }
.privacy-note, .form-actions p { font-size: 15px; color: #1c2c45; }
.primary-button { font-size: 17px; }
.side-eyebrow span { width: 26px; height: 26px; }
.sources-card > h2 { font-size: 21px; }
.side-intro { font-size: 15.5px; color: #1c2c45; }
.file-icon { font-size: 11px; width: 36px; height: 40px; }
.source-link strong { font-size: 15.5px; color: #0a1a33; }
.source-link small { font-size: 14px; color: #1c2c45; }
.duplicate-note { font-size: 14.5px; color: #1c2c45; }
.caution-card h2 { font-size: 17px; }
.caution-card p { font-size: 15px; color: #1c2c45; }
.version-note { font-size: 14px; color: #1c2c45; }
.text-button { font-size: 15px; }
.profile-chip { font-size: 14.5px; color: #1c2c45; }
.profile-warning { font-size: 15px; color: #5c4527; }
.suggestion { font-size: 15px; color: #173f80; }
.message-label { font-size: 14.5px; }
.message-body { font-size: 16.5px; color: #0a1a33; }
.citations a { font-size: 14.5px; }
.question-form textarea { font-size: 16px; }
.chat-footnote { font-size: 14px; color: #1c2c45; }
.footer { font-size: 14.5px; color: #1c2c45; }
.paper-tag { font-size: 13px; }
.hero-float-card strong { font-size: 14px; }
.hero-float-card small { font-size: 13px; color: #33456a; }
.check-icon { font-size: 16px; }
@media (max-width: 560px) {
  .brand-subtitle { font-size: 13px; max-width: none; }
  .topbar-note { font-size: 14px; }
  .intro-copy { font-size: 17px; }
  .section-heading h2 { font-size: 23px; }
}
.side-eyebrow { color: #1c2c45; }
.side-eyebrow span { font-size: 13px; }

/* Darker still (user request): all reading text near-black navy */
:root { --muted: #0a1a33; }
body, .brand-subtitle, .topbar-note, .section-description, .form-section-title p, .field small,
.input-suffix > span, .privacy-note, .form-actions p, .side-intro, .source-link small, .duplicate-note,
.caution-card p, .version-note, .profile-chip, .chat-footnote, .footer, .side-eyebrow,
.optional-note, .notice-card, .message-label, .hero-float-card small { color: #0a1a33; }
.field label, .field > span, .form-section-title h3, .section-heading h2, .sources-card > h2,
.caution-card h2, .source-link strong, .brand-title, .message-body { color: #000; }
.section-description, .form-section-title p, .field small, .side-intro, .caution-card p,
.notice-card, .privacy-note, .form-actions p, .source-link small { font-weight: 500; }
.field label, .field > span { font-weight: 600; }
.eyebrow, .step-label { color: #0d3b70; }
.intro .eyebrow { color: #e8f0fc; }
.form-icon, .step-number { color: #0d3b70; }
.field input::placeholder, .question-form textarea::placeholder { color: #4a5a74; }
