:root {
  color-scheme: light;
  --paper: #fbfbfa;
  --field: #f3f6f3;
  --ink: #0f3d3e;
  --ink-soft: #2a5a55;
  --saffron: #c07a2b;
  --saffron-dark: #8c561c;
  --sage: #4f6f52;
  --rose: #8e3a4b;
  --rule: #e3e6e1;
  --text: #14201e;
  --muted: #6b7b76;
  --shadow: 0 1px 2px rgba(15, 61, 62, .06), 0 12px 28px -14px rgba(15, 61, 62, .2);
  --radius: 14px;
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { min-height: 100dvh; display: flex; flex-direction: column; font-size: 14px; line-height: 1.55; }
button, textarea { font: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }
.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; }

.splash-screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: hidden; padding: 28px; color: var(--text); background: radial-gradient(ellipse at 50% 42%, #f3f6f1 0, var(--paper) 54%, #f8f8f5 100%); opacity: 1; visibility: visible; transition: opacity .42s ease, visibility .42s ease; }
.splash-screen[hidden] { display: none; }
.splash-screen.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-content { position: relative; z-index: 1; width: min(480px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; animation: splash-arrive .65s cubic-bezier(.2,.7,.2,1) both; }
.splash-mark { width: 62px; height: 62px; display: grid; place-items: center; color: var(--ink); background: rgba(255,255,255,.72); border: 1px solid #cbd7cd; border-radius: 50%; box-shadow: 0 8px 30px rgba(15,61,62,.08), inset 0 0 0 5px rgba(243,246,243,.8); }
.splash-mark svg { width: 30px; height: 30px; }
.splash-brand { margin: 22px 0 9px; color: var(--sage); font: 600 11px/1.3 "Geist", sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.splash-content h1 { max-width: 440px; margin: 0; color: var(--ink); font: 600 clamp(30px, 5vw, 40px)/1.13 "Spectral", Georgia, serif; letter-spacing: -.025em; }
.splash-content h1 em { color: var(--saffron-dark); font-weight: 400; }
.splash-tagline { margin: 11px 0 0; color: var(--muted); font: 400 13px/1.6 "Geist", sans-serif; }
.splash-progress { width: min(180px, 56vw); height: 2px; margin-top: 35px; overflow: hidden; border-radius: 10px; background: #e4e9e2; }
.splash-progress span { width: 42%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--sage), var(--saffron)); animation: splash-progress 1.15s ease-in-out infinite; }
.splash-status { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; color: var(--muted); font-size: 10.5px; letter-spacing: .015em; }
.splash-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(79,111,82,.12); animation: splash-breathe 1.4s ease-in-out infinite; }
.splash-footnote { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); margin: 0; color: #84918d; font-size: 10px; letter-spacing: .04em; }
.splash-orbit { position: absolute; z-index: -1; width: 255px; height: 255px; border: 1px solid rgba(79,111,82,.08); border-radius: 50%; pointer-events: none; }
.splash-orbit-one { transform: scale(1.35); }
.splash-orbit-two { width: 340px; height: 340px; border-color: rgba(192,122,43,.055); }

.app-header { height: 70px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 30px; border-bottom: 1px solid var(--rule); background: var(--paper); z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 50%; flex: 0 0 auto; }
.brand-mark svg { width: 17px; height: 17px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font: 600 20px/1.1 "Spectral", Georgia, serif; color: var(--ink); letter-spacing: -.02em; }
.brand-tagline { padding-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: .015em; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.header-nav { display: flex; align-items: center; gap: 7px; }
.nav-placeholder { min-height: 33px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 9px; background: #fff; font-size: 11px; cursor: not-allowed; }
.nav-placeholder svg { width: 15px; height: 15px; flex: 0 0 auto; }
.nav-placeholder:disabled { opacity: .78; }
.nav-documents, .nav-members, .nav-evaluation { cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.nav-documents:hover, .nav-members:hover, .nav-evaluation:hover { border-color: #a8b9ad; background: var(--field); }
.sources-toggle { display: none; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--rule); border-radius: 10px; padding: 7px 10px; color: var(--ink); background: var(--paper); font-size: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.sources-toggle:hover { border-color: #9bb1a8; background: var(--field); }
.sources-toggle svg { width: 16px; height: 16px; }

.app-shell { width: min(1280px, 100%); flex: 1 1 auto; min-height: 0; margin: 0 auto; display: block; }
.app-shell.sources-open { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.document-workspace { width: min(960px, 100%); height: 100%; min-height: 0; overflow-y: auto; margin: 0 auto; padding: clamp(25px, 5vw, 54px) clamp(18px, 5vw, 52px) 44px; }
.document-intro { max-width: 700px; margin: 0 auto 28px; text-align: center; }
.document-intro .eyebrow { justify-content: center; }
.document-intro h1 { margin: 0; color: var(--ink); font: 600 clamp(29px, 4vw, 40px)/1.14 "Spectral", Georgia, serif; letter-spacing: -.025em; }
.document-intro h1 em { color: var(--saffron-dark); font-weight: 400; }
.document-intro > p:last-child { max-width: 630px; margin: 12px auto 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.document-card, .account-card { padding: clamp(17px, 3vw, 25px); border: 1px solid var(--rule); border-radius: 15px; background: #fff; box-shadow: 0 8px 26px -22px rgba(15,61,62,.28); }
.account-card { width: min(520px, 100%); margin: 0 auto; background: linear-gradient(145deg, #fff, #f7f9f6); }
.document-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.document-card-heading .eyebrow { margin-bottom: 4px; }
.document-card h2, .account-card h2 { margin: 0; color: var(--ink); font: 600 20px/1.3 "Spectral", Georgia, serif; }
.document-card-copy { margin: 9px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.private-mark { color: var(--sage); font-size: 14px; text-shadow: 0 0 0 4px #eef4ed; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 41px; padding: 9px 11px; color: var(--text); border: 1px solid var(--rule); border-radius: 9px; background: var(--paper); font: inherit; }
.auth-form input:focus { outline: 2px solid rgba(79,111,82,.25); border-color: var(--sage); }
.auth-actions { display: flex; align-items: center; gap: 13px; margin-top: 2px; }
.primary-button { min-height: 39px; padding: 8px 15px; color: #fff; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease, transform .12s ease; }
.primary-button:hover:not(:disabled) { background: #205453; }
.primary-button:active:not(:disabled) { transform: scale(.98); }
.primary-button:disabled { opacity: .54; cursor: not-allowed; }
.text-button { padding: 6px 2px; color: var(--sage); border: 0; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }
.text-button:hover { color: var(--ink); text-decoration: underline; }
.form-message { min-height: 0; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-message:not(:empty) { min-height: 16px; }
.form-message.is-error { color: var(--rose); }
.form-message.is-success { color: var(--sage); }
.upload-card { width: min(720px, 100%); margin: 0 auto; }
.sign-out-button { flex: 0 0 auto; }
.upload-form { display: grid; gap: 11px; }
.drop-zone { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 21px; color: var(--muted); border: 1px dashed #a8b9ad; border-radius: 12px; background: #f8faf7; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--sage); background: #f0f5ef; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-zone strong { max-width: 100%; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.drop-zone > span:last-of-type { font-size: 10.5px; }
.upload-mark { width: 33px; height: 33px; display: grid; place-items: center; margin-bottom: 3px; color: var(--ink); border: 1px solid #cbd7cd; border-radius: 50%; background: #fff; font-size: 19px; }
.analyze-button { justify-self: end; min-width: 145px; }
.analysis-results { display: grid; gap: 13px; margin: 17px 0 0; }
.analysis-summary-text { margin: 12px 0 0; color: var(--text); font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.analysis-duration { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.analysis-columns { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 13px; align-items: start; }
.result-card h2 { margin-bottom: 11px; }
.entity-list, .insight-list { display: grid; gap: 9px; }
.entity-item { padding: 9px 10px; border: 1px solid var(--rule); border-radius: 9px; background: #fafbf9; }
.entity-label { display: block; margin-bottom: 3px; color: var(--sage); font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.entity-value { color: var(--ink-soft); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.result-empty { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.insight-item { padding: 11px; border: 1px solid var(--rule); border-radius: 10px; background: #fafbf9; }
.insight-title { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 0 0 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.grounding-badge { flex: 0 0 auto; padding: 2px 6px; color: var(--sage); border: 1px solid #ccdbca; border-radius: 99px; background: #f2f7f0; font-size: 8px; font-weight: 500; }
.grounding-badge.is-ungrounded { color: var(--saffron-dark); border-color: #eadcc7; background: #fbf5ec; }
.insight-text { margin: 0; color: #485a55; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.insight-sources { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--rule); }
.insight-sources summary { color: var(--sage); font-size: 10px; cursor: pointer; }
.insight-source { margin: 7px 0 0; padding-left: 8px; border-left: 2px solid #b8c9b6; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.insight-source strong { display: block; color: var(--ink-soft); font-weight: 600; }
.insight-source a { color: var(--sage); }
.analysis-footnote { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.app-shell.documents-open { display: block; }
.app-shell.documents-open .chat-column, .app-shell.documents-open .sources-panel { display: none !important; }
.app-shell.documents-open .document-workspace { display: block; }
.app-shell.documents-open.sources-open { display: block; }
.nav-placeholder[aria-current="page"] { color: var(--ink); border-color: #a8b9ad; background: var(--field); }
.app-shell.project-page-open { display: block; }
.app-shell.project-page-open .chat-column, .app-shell.project-page-open .document-workspace, .app-shell.project-page-open .sources-panel { display: none !important; }
.app-shell.project-page-open .project-workspace { display: block; }
.project-workspace { width: min(1120px, 100%); height: 100%; min-height: 0; overflow-y: auto; margin: 0 auto; padding: clamp(25px, 4vw, 46px) clamp(18px, 4vw, 42px) 36px; }
.project-page-intro { max-width: 730px; margin: 0 auto 22px; text-align: center; }
.project-page-intro .eyebrow { justify-content: center; }
.project-page-intro h1 { margin: 0; color: var(--ink); font: 600 clamp(31px, 4vw, 42px)/1.12 "Spectral", Georgia, serif; letter-spacing: -.03em; }
.project-page-intro h1 em { color: var(--saffron-dark); font-weight: 400; }
.project-page-intro > p:last-child { max-width: 620px; margin: 10px auto 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.project-context { display: grid; grid-template-columns: .75fr .75fr 1.5fr; gap: 10px; margin: 0 auto 31px; }
.context-item { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 15px; border: 1px solid var(--rule); border-radius: 11px; background: linear-gradient(145deg, #fff, #f7f9f6); }
.context-label { color: var(--sage); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.context-value { color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.faculty-section, .team-section, .evaluation-section { margin-top: 29px; }
.project-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.project-section-heading .eyebrow { margin-bottom: 2px; }
.project-section-heading h2 { margin: 0; color: var(--ink); font: 600 22px/1.25 "Spectral", Georgia, serif; }
.section-number-mark { color: #aab7ad; font: italic 600 16px "Spectral", Georgia, serif; }
.faculty-card { display: grid; grid-template-columns: minmax(0, 1fr); padding: clamp(20px, 3vw, 28px); border: 1px solid var(--rule); border-radius: 15px; background: linear-gradient(135deg, #fff 0%, #fbfcf9 100%); box-shadow: 0 8px 26px -22px rgba(15,61,62,.28); }
.faculty-content { max-width: 820px; }
.faculty-role { margin: 0 0 2px; color: var(--sage); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.faculty-name { margin: 0; color: var(--ink); font: 600 25px/1.25 "Spectral", Georgia, serif; }
.faculty-department, .faculty-school { margin: 5px 0 0; color: #52645e; font-size: 11.5px; line-height: 1.5; }
.faculty-credentials { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; color: var(--ink-soft); font-size: 11px; }
.credential-label { color: var(--muted); }
.faculty-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 11px; }
.project-link { color: var(--sage); font-size: 10.5px; text-decoration-color: #a9b9a9; text-underline-offset: 3px; overflow-wrap: anywhere; }
.project-link:hover { color: var(--ink); }
.member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.member-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; padding: 18px; border: 1px solid var(--rule); border-radius: 13px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.member-card:hover { border-color: #c4d0c5; box-shadow: var(--shadow); }
.member-card-topline { grid-column: 1; display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.member-index { color: var(--saffron-dark); font: italic 600 11px "Spectral", Georgia, serif; }
.member-caption { color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.member-name { grid-column: 1; margin: 0 0 4px; color: var(--ink); font: 600 19px/1.25 "Spectral", Georgia, serif; overflow-wrap: anywhere; }
.member-roll { grid-column: 1; width: fit-content; max-width: 100%; margin: 0 0 15px; padding: 4px 7px; color: var(--muted); border: 1px solid var(--rule); border-radius: 6px; background: var(--field); font: 500 9px/1.4 "Geist", sans-serif; letter-spacing: .015em; overflow-wrap: anywhere; }
.member-contacts { grid-column: 1; display: grid; gap: 8px; min-width: 0; margin: 0; padding-top: 12px; border-top: 1px solid #eef0ec; }
.member-contact-row { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 5px; align-items: baseline; min-width: 0; }
.member-contact-row dt { color: var(--sage); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.member-contact-row dd { min-width: 0; margin: 0; }
.member-contact-link { color: #53655f; font-size: 9px; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
a.member-contact-link:hover { color: var(--sage); text-decoration: underline; }
.project-links { display: flex; justify-content: space-between; gap: 15px; margin-top: 22px; padding: 13px 0; border-top: 1px solid var(--rule); }
.project-link-group { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.unavailable-link { color: var(--muted); font-size: 10px; }
.evaluation-date { margin: -9px auto 23px; color: var(--muted); text-align: center; font-size: 9.5px; letter-spacing: .025em; }
.evaluation-section { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.evaluation-description { max-width: 770px; margin: -3px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.metric-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 15px 16px; border: 1px solid var(--rule); border-radius: 12px; background: linear-gradient(145deg, #fff, #f6f8f5); }
.metric-label { color: var(--sage); font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.metric-value { color: var(--ink); font: 600 30px/1.1 "Spectral", Georgia, serif; }
.metric-note { color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.evaluation-details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 22px; margin-top: 11px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 11px; background: #fff; }
.evaluation-subheading { margin: 20px 0 9px; color: var(--ink); font: 600 17px/1.3 "Spectral", Georgia, serif; }
.metric-explanations { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.metric-explanations article { padding: 12px 13px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.metric-explanations strong { color: var(--ink); font-size: 10px; font-weight: 650; }
.metric-explanations p { margin: 5px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }
.harness-metrics { margin: 11px 0; }
.evaluation-note { margin-top: 12px; padding: 12px 14px; color: #56675f; border: 1px solid #dce6dc; border-left: 3px solid var(--sage); border-radius: 9px; background: #f4f7f2; font-size: 9.5px; line-height: 1.65; }
.evaluation-note strong { color: var(--ink); }
.evaluation-detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef0ec; color: var(--muted); font-size: 9.5px; }
.evaluation-detail-row strong { color: var(--ink-soft); font-weight: 600; text-align: right; }
.evaluation-historical-note { grid-column: 1 / -1; margin: 10px 0 0; color: #75827d; font-size: 9px; line-height: 1.5; }
.harness-result { display: flex; align-items: center; gap: 8px; margin: 13px 0 8px; color: var(--ink); font-size: 11px; }
.result-check, .check-mark { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; color: var(--sage); border: 1px solid #c6d4c3; border-radius: 50%; background: #f1f6ef; font-size: 10px; }
.result-date { color: var(--muted); font-size: 9px; }
.evaluation-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.evaluation-check { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; color: #53655f; border: 1px solid var(--rule); border-radius: 9px; background: #fff; font-size: 9.5px; line-height: 1.5; }
.evaluation-check .check-mark { width: 16px; height: 16px; font-size: 8px; }
.evaluation-caveat { margin: 4px 0 13px; padding: 13px 15px; color: #765a34; border: 1px solid #efe0c9; border-left: 3px solid var(--saffron); border-radius: 10px; background: #fbf5ec; font-size: 10px; line-height: 1.6; }
.evaluation-footer { padding: 12px 0 0; color: var(--muted); border-top: 1px solid var(--rule); font-size: 9.5px; line-height: 1.7; }
.evaluation-footer code { padding: 2px 5px; color: var(--ink-soft); border-radius: 4px; background: var(--field); font-size: 9px; overflow-wrap: anywhere; }
.chat-column { width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.app-shell.sources-open .chat-column { border-right: 1px solid var(--rule); }
.transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; scroll-behavior: smooth; padding: 31px clamp(18px, 4vw, 50px) 20px; }
.welcome, .quick-section, .conversation { width: min(700px, 100%); margin-right: auto; margin-left: auto; }
.welcome { margin-top: 9px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 11px; display: flex; align-items: center; gap: 9px; color: var(--sage); font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow-line { width: 23px; height: 1px; background: var(--sage); }
.welcome h1 { max-width: 650px; margin: 0; color: var(--ink); font: 600 clamp(27px, 3.1vw, 36px)/1.14 "Spectral", Georgia, serif; letter-spacing: -.025em; }
.welcome h1 em { color: var(--saffron-dark); font-weight: 400; }
.welcome-copy { max-width: 570px; margin: 14px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.section-kicker { margin: 0 0 10px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.section-kicker::after { content: ""; height: 1px; flex: 1; background: var(--rule); }
.quick-section { margin-bottom: 28px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-action { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; text-align: left; color: var(--text); border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.quick-action:hover:not(:disabled) { border-color: #9bb1a8; background: #f7f9f6; transform: translateY(-1px); box-shadow: var(--shadow); }
.quick-action:disabled { cursor: wait; opacity: .62; }
.quick-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink); background: var(--field); border: 1px solid var(--rule); border-radius: 8px; font: italic 600 13px "Spectral", Georgia, serif; }
.quick-copy { display: flex; flex-direction: column; padding-top: 1px; }
.quick-copy strong { color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.35; }
.quick-copy span { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }

/* Quiet home state: one centered question field, then suggested questions. */
.chat-column.is-home { height: 100%; overflow-y: auto; justify-content: center; padding: 30px clamp(18px, 5vw, 64px); }
.chat-column.is-home .transcript { display: contents; }
.chat-column.is-home .welcome { order: 1; width: min(700px, 100%); flex: 0 0 auto; margin: auto auto 19px; text-align: center; }
.chat-column.is-home .welcome .eyebrow { justify-content: center; }
.chat-column.is-home .welcome h1 { max-width: 680px; margin: 0 auto; font-size: clamp(30px, 4vw, 43px); }
.chat-column.is-home .welcome-copy { margin: 10px auto 0; }
.chat-column.is-home .composer { order: 2; width: min(700px, 100%); flex: 0 0 auto; margin: 0 auto; padding: 0; border: 0; background: transparent; }
.chat-column.is-home .composer-box { min-height: 62px; border-radius: 15px; box-shadow: var(--shadow); }
.chat-column.is-home .composer textarea { min-height: 44px; padding-top: 11px; }
.chat-column.is-home .quick-section { order: 3; width: min(740px, 100%); flex: 0 0 auto; margin: 22px auto auto; }
.chat-column.is-home .section-kicker { justify-content: center; }
.chat-column.is-home .conversation, .chat-column.is-home .scroll-anchor { display: none; }
body.has-conversation .sources-toggle { display: inline-flex; }

.conversation { display: flex; flex-direction: column; gap: 20px; }
.turn { display: flex; flex-direction: column; align-items: stretch; animation: appear .22s ease both; }
.turn.user { align-items: flex-end; }
.bubble { max-width: 100%; padding: 13px 16px; border-radius: var(--radius); line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.turn.user .bubble { max-width: min(82%, 570px); color: #f3f7f5; background: var(--ink); border-bottom-right-radius: 4px; }
.turn.assistant .bubble { color: var(--text); background: var(--field); border: 1px solid var(--rule); border-left: 3px solid var(--ink); border-top-left-radius: 4px; }
.turn.assistant.ungrounded .bubble { border-left-color: var(--saffron); }
.turn.error .bubble { color: #713642; background: #fbf3f4; border-color: #ead3d8; border-left-color: var(--rose); }
.turn-meta { margin-top: 5px; padding: 0 3px; color: var(--muted); font-size: 10.5px; }
.turn.user .turn-meta { text-align: right; }
.turn.assistant .turn-meta { text-align: right; }
.answer-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 9px; padding: 8px 10px; color: var(--saffron-dark); background: #fbf5ec; border: 1px solid #efe0c9; border-radius: 9px; font-size: 11px; line-height: 1.45; }
.answer-note .note-mark { font-family: "Spectral", Georgia, serif; font-weight: 600; }
.answer-citations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.citation-chip { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 7px 3px; border: 1px solid #78908a; border-radius: 6px; color: var(--ink); background: var(--paper); font: italic 600 11.5px "Spectral", Georgia, serif; cursor: pointer; transition: color .14s ease, background .14s ease, border-color .14s ease; }
.citation-chip .section-symbol { font-style: normal; font-weight: 400; }
.citation-chip:hover, .citation-chip.is-active { color: white; border-color: var(--sage); background: var(--sage); }
.thinking { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.thinking-dots { display: inline-flex; gap: 3px; }
.thinking-dots i { width: 5px; height: 5px; display: block; border-radius: 50%; background: var(--sage); animation: pulse 1.1s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .14s; }
.thinking-dots i:nth-child(3) { animation-delay: .28s; }
.retry-button { margin-top: 8px; padding: 5px 9px; color: var(--rose); border: 1px solid #d8aeb6; border-radius: 7px; background: white; font-size: 11px; cursor: pointer; }
.scroll-anchor { height: 1px; }

.composer { flex: 0 0 auto; padding: 13px clamp(18px, 4vw, 50px) 14px; border-top: 1px solid var(--rule); background: var(--paper); }
.composer-box { width: min(700px, 100%); min-height: 54px; display: flex; align-items: flex-end; gap: 10px; margin: 0 auto; padding: 6px 7px 6px 15px; border: 1px solid var(--rule); border-radius: 13px; background: var(--field); transition: border-color .16s ease, box-shadow .16s ease; }
.composer-box:focus-within { border-color: #74938a; box-shadow: 0 0 0 3px rgba(15, 61, 62, .06); }
.composer textarea { flex: 1; min-width: 0; max-height: 156px; min-height: 38px; padding: 8px 0; resize: none; color: var(--text); border: 0; outline: 0; background: transparent; line-height: 1.5; }
.composer textarea::placeholder { color: #84918d; }
.send-button { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; color: white; border: 0; border-radius: 10px; background: var(--saffron); cursor: pointer; transition: background .15s ease, transform .12s ease; }
.send-button svg { width: 19px; height: 19px; }
.send-button:hover:not(:disabled) { background: #a86722; }
.send-button:active:not(:disabled) { transform: scale(.95); }
.send-button:disabled { color: var(--muted); background: #e2e5e1; cursor: not-allowed; }
.composer-hint { width: min(700px, 100%); margin: 6px auto 0; color: var(--muted); text-align: center; font-size: 10px; }
.disclaimer { flex: 0 0 auto; padding: 9px 20px; color: var(--rose); border-top: 1px solid var(--rule); background: #f5f7f4; text-align: center; font-size: 10.5px; line-height: 1.45; }
.disclaimer strong { font-weight: 600; }

.sources-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--paper); }
[hidden] { display: none !important; }
.sources-heading { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 19px; border-bottom: 1px solid var(--rule); }
.sources-eyebrow { margin: 0 0 1px; font-size: 9px; letter-spacing: .12em; }
.sources-heading h2 { margin: 0; color: var(--ink); font: 600 19px/1.2 "Spectral", Georgia, serif; }
.source-count { color: var(--muted); font: 500 11px "Geist", sans-serif; }
.sources-heading-actions { display: flex; align-items: center; gap: 8px; }
.verified-label { display: inline-flex; align-items: center; gap: 5px; color: var(--sage); font-size: 10px; white-space: nowrap; }
.verified-label span { width: 15px; height: 15px; display: grid; place-items: center; border: 1px solid #b8c9b6; border-radius: 50%; font-size: 9px; }
.drawer-close { display: none; width: 30px; height: 30px; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: 21px; line-height: 1; cursor: pointer; }
.sources-content { flex: 1; min-height: 0; overflow-y: auto; padding: 13px 19px; }
.sources-empty { min-height: 150px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; color: var(--muted); }
.sources-empty p { margin: 9px 0 2px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.sources-empty > span:last-child { font-size: 10.5px; }
.empty-mark { width: 31px; height: 31px; display: grid; place-items: center; color: var(--sage); background: var(--field); border: 1px solid var(--rule); border-radius: 9px; font: italic 600 14px "Spectral", Georgia, serif; }
.source-card { padding: 13px 0 14px; border-bottom: 1px solid var(--rule); scroll-margin: 14px; transition: background .18s ease, box-shadow .18s ease; }
.source-card:last-child { border-bottom: 0; }
.source-card.is-active { margin: 0 -9px; padding: 13px 9px 14px; border-radius: 9px; background: #f1f6f1; box-shadow: inset 2px 0 var(--sage); }
.source-topline { display: flex; align-items: flex-start; gap: 7px; }
.source-number { min-width: 25px; height: 22px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0 5px; color: var(--ink); background: var(--field); border: 1px solid var(--rule); border-radius: 6px; font-size: 10px; font-weight: 600; }
.source-short { display: inline-flex; align-items: baseline; margin: 0; padding: 1px 6px 2px; color: var(--ink); border: 1px solid #90a49c; border-radius: 5px; background: white; font: italic 600 10.5px "Spectral", Georgia, serif; white-space: nowrap; }
.source-title { margin: 0 0 3px; color: var(--ink); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.source-meta { margin: 2px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.source-excerpt { margin: 7px 0 0; color: #485a55; font-size: 10.5px; line-height: 1.55; }
.source-url { display: inline-flex; margin-top: 6px; color: var(--sage); font-size: 10px; text-decoration: none; overflow-wrap: anywhere; }
.source-url:hover { text-decoration: underline; }
.source-attribution { margin-top: 9px; padding: 8px 9px; border: 1px solid var(--rule); border-radius: 8px; background: #f7f8f5; }
.source-attribution summary { color: var(--sage); font-size: 10px; font-weight: 600; cursor: pointer; }
.attribution-formula { margin: 6px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.attribution-contributions { display: grid; gap: 4px; }
.attribution-row { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 9px; }
.attribution-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.model-performance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.model-performance-card { padding: 15px; border: 1px solid var(--rule); border-radius: 11px; background: #fbfcf9; }
.model-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-role { color: var(--sage); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.measurement-tag { padding: 3px 7px; color: #6f766e; border: 1px solid var(--rule); border-radius: 99px; font-size: 8px; white-space: nowrap; }
.measurement-tag.is-measured { color: #4d7657; border-color: #c9d9c7; background: #f1f6ef; }
.model-performance-card h3 { margin: 10px 0 5px; color: var(--ink); font: 600 17px/1.25 "Spectral", Georgia, serif; overflow-wrap: anywhere; }
.model-description { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.model-measures { display: grid; gap: 4px; margin: 11px 0 0; padding: 0; color: var(--ink); list-style: none; }
.model-measures li { padding: 6px 8px; border-radius: 6px; background: var(--field); font-size: 9px; line-height: 1.45; }
.xai-method-card { display: grid; gap: 7px; padding: 15px; border: 1px solid #d7e2d5; border-radius: 10px; background: #f3f7f1; }
.xai-method-card strong { color: var(--ink); font: 600 17px/1.25 "Spectral", Georgia, serif; }
.xai-method-card p { margin: 0; color: var(--ink-soft); font-size: 10.5px; line-height: 1.5; }
.xai-method-card code { width: fit-content; max-width: 100%; padding: 7px 9px; color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; background: white; font-size: 9px; overflow-wrap: anywhere; white-space: normal; }
.sources-footer { padding: 9px 19px; color: var(--muted); border-top: 1px solid var(--rule); background: var(--field); font-size: 9px; line-height: 1.4; }
.mobile-scrim { display: none; }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes splash-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes splash-progress { from { transform: translateX(-115%); } to { transform: translateX(255%); } }
@keyframes splash-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (max-width: 850px) {
  .app-header { height: 62px; padding: 8px 16px; }
  .brand-tagline { display: none; }
  .brand-name { font-size: 19px; }
  .app-shell.sources-open { display: block; }
  .app-shell.sources-open .chat-column { border-right: 0; }
  .transcript { padding: 24px 18px 14px; }
  .welcome { margin-top: 5px; margin-bottom: 22px; }
  .welcome h1 { font-size: clamp(25px, 5vw, 33px); }
  .sources-panel { position: fixed; inset: 0 0 0 auto; z-index: 10; width: min(390px, 88vw); height: 100dvh; transform: translateX(105%); visibility: hidden; box-shadow: -16px 0 44px rgba(15, 61, 62, .14); transition: transform .22s ease, visibility .22s ease; }
  .sources-panel.is-open { transform: translateX(0); visibility: visible; }
  .drawer-close { display: inline-grid; place-items: center; }
  .mobile-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 9; display: block; background: rgba(15, 35, 32, .28); }
}
@media (max-width: 560px) {
  .app-header { gap: 7px; }
  .brand { gap: 7px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 17px; }
  .header-tools { gap: 6px; }
  .nav-about { display: none; }
  .nav-documents { width: 34px; min-height: 34px; padding: 0; }
  .nav-documents span { display: none; }
  .nav-members, .nav-evaluation { width: 34px; min-height: 34px; padding: 0; }
  .nav-members span, .nav-evaluation span { display: none; }
  .nav-profile { width: 34px; min-height: 34px; padding: 0; }
  .nav-profile span { display: none; }
  .sources-toggle { width: 34px; height: 34px; padding: 0; }
  .sources-toggle span { display: none; }
  .transcript { padding: 20px 14px 11px; }
  .chat-column.is-home { padding: 22px 14px; }
  .chat-column.is-home .welcome { margin-bottom: 16px; }
  .chat-column.is-home .welcome h1 { font-size: 29px; }
  .chat-column.is-home .welcome-copy { max-width: 340px; }
  .chat-column.is-home .quick-section { margin-top: 18px; }
  .welcome h1 { font-size: 26px; }
  .welcome-copy { font-size: 12.5px; }
  .quick-grid { grid-template-columns: 1fr; gap: 7px; }
  .quick-action { padding: 9px 10px; }
  .quick-copy strong { font-size: 11.5px; }
  .quick-copy span { font-size: 10.5px; }
  .composer { padding: 10px 12px 8px; }
  .composer-box { padding-left: 12px; }
  .composer textarea { font-size: 13px; }
  .composer-hint { font-size: 9px; }
  .disclaimer { padding: 8px 12px; font-size: 9px; }
  .turn.user .bubble { max-width: 91%; }
  .bubble { padding: 11px 13px; font-size: 13px; }
  .document-workspace { padding: 23px 14px 30px; }
  .document-intro { margin-bottom: 20px; }
  .document-intro h1 { font-size: 30px; }
  .analysis-columns { grid-template-columns: 1fr; }
  .document-card h2, .account-card h2 { font-size: 18px; }
  .project-workspace { padding: 23px 14px 28px; }
  .project-page-intro { margin-bottom: 18px; }
  .project-page-intro h1 { font-size: 31px; }
  .project-context { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 22px; }
  .context-item:last-child { grid-column: 1 / -1; }
  .project-section-heading h2 { font-size: 20px; }
  .faculty-card { grid-template-columns: 1fr; gap: 0; }
  .faculty-name { font-size: 22px; }
  .member-grid, .metric-grid, .evaluation-check-list { grid-template-columns: 1fr; }
  .member-card { grid-template-columns: minmax(0,1fr); padding: 15px; }
  .member-name { font-size: 18px; }
  .member-roll { font-size: 8.5px; }
  .member-contact-row { grid-template-columns: 37px minmax(0,1fr); }
  .member-contact-link { font-size: 8.5px; }
  .project-links { flex-direction: column; }
  .evaluation-details { grid-template-columns: 1fr; }
  .metric-explanations { grid-template-columns: 1fr; }
  .model-performance-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
