:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --paper: #fffefa;
  --ink: #172d41;
  --muted: #5e6a73;
  --line: #d9dedc;
  --navy: #142f46;
  --accent: #a88852;
  --error: #8a2f2b;
  --warning: #76541b;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
input, textarea { max-width: 100%; }
input[type="email"], input[type="password"], textarea { width: 100%; border: 1px solid #a8b4b9; border-radius: 3px; background: var(--paper); color: var(--ink); padding: 12px 14px; }
input[type="checkbox"] { accent-color: var(--navy); width: 16px; height: 16px; }
textarea { display: block; min-height: 122px; resize: vertical; line-height: 1.6; }
textarea::placeholder { color: #737f87; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
:focus-visible { outline: 3px solid #8d6c31; outline-offset: 4px; }
.skip-link { position: absolute; top: -80px; left: 20px; background: var(--paper); padding: 12px; z-index: 5; }
.skip-link:focus { top: 12px; }
.shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 44px; }
.top { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 28px; line-height: 1.1; letter-spacing: .17em; text-decoration: none; }
.brand span { display: block; margin-top: 10px; font-family: var(--sans); color: var(--muted); font-size: 11px; letter-spacing: .045em; }
.account { display: flex; align-items: center; gap: 20px; font-size: 12px; overflow-wrap: anywhere; }
.text-button { border: 0; padding: 6px 0; color: var(--navy); background: transparent; text-decoration: underline; text-underline-offset: 4px; font-size: 12px; font-weight: 600; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 20px; border-radius: 3px; padding: 11px 20px; font-weight: 600; font-size: 13px; line-height: 1.5; text-decoration: none; }
.primary { border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.primary:hover:not(:disabled) { background: #234860; }
.secondary { border: 1px solid #a8b4b9; color: var(--navy); background: transparent; }
.secondary:hover:not(:disabled) { background: #ecefe9; }
.muted { color: var(--muted); font-size: 12px; }
.startup { padding: 64px 0; color: var(--muted); }
.preview-notice { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 24px 0 0; padding: 13px 16px; background: #e9ede8; color: #405763; font-size: 12px; }
.preview-notice strong { color: var(--navy); font-weight: 600; }
.sign-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 96px; padding: 86px 0 92px; align-items: center; }
.intro h1 { font-family: var(--serif); font-size: clamp(38px, 4.7vw, 56px); font-weight: 400; letter-spacing: -.045em; line-height: 1.12; margin: 0 0 26px; }
.intro > p { max-width: 380px; color: #445967; font-size: 16px; line-height: 1.8; }
.intro .intro-note { margin-top: 36px; padding-left: 18px; border-left: 2px solid var(--accent); font-size: 13px; max-width: 330px; }
.login-panel { border-top: 2px solid var(--navy); padding-top: 26px; }
.login-panel h2 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -.02em; }
.login-panel > .muted { margin: 0 0 28px; font-size: 13px; }
.login-panel form label:not(:first-child) { margin-top: 20px; }
.login-panel .primary { width: 100%; margin-top: 26px; }
.access-note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 20px 0 0; }
.workspace { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 42px; padding-top: 40px; padding-bottom: 52px; }
.history { border-right: 1px solid var(--line); padding-right: 24px; }
.history-heading h2 { font-size: 14px; margin: 0 0 6px; font-weight: 600; }
.review-filter { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 400; color: var(--muted); margin: 26px 0 20px; }
.history-list { list-style: none; padding: 0; margin: 16px 0; }
.history-list li { border-top: 1px solid var(--line); }
.history-item { width: 100%; background: transparent; color: var(--ink); border: 0; text-align: left; padding: 15px 6px; line-height: 1.5; }
.history-item:hover, .history-item[aria-current="true"] { background: #e9ede8; }
.history-item-title { display: block; font-size: 12px; overflow-wrap: anywhere; }
.history-item-date { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; }
.history-item-review { display: block; font-size: 10px; color: var(--warning); margin-top: 5px; }
.research { min-width: 0; }
.research-heading h1 { font-family: var(--serif); font-size: 35px; font-weight: 400; line-height: 1.22; letter-spacing: -.03em; margin: 0 0 12px; }
.research-heading > p { font-size: 14px; color: var(--muted); margin: 0; }
.research-heading .corpus-line { font-size: 11px; margin-top: 19px; }
.composer { margin-top: 30px; }
.field-help { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 10px 0 20px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.composer-actions .muted { font-size: 11px; }
.error { padding: 13px 15px; border-left: 3px solid var(--error); color: var(--error); background: #fcf0ec; font-size: 13px; overflow-wrap: anywhere; }
.progress { display: flex; align-items: center; gap: 12px; margin: 30px 0; color: var(--muted); font-size: 13px; }
.progress p { margin: 0; }
.progress-dot { width: 8px; height: 8px; flex: 0 0 8px; background: var(--accent); border-radius: 50%; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.answer { margin-top: 34px; border-top: 2px solid var(--navy); padding-top: 22px; overflow-wrap: anywhere; }
.answer-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.answer h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin: 0; }
.classification { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--warning); background: #f1eadc; padding: 4px 8px; }
.classification.grounded { color: #27554b; background: #e7eeea; }
.answer-question { font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.claim { padding: 18px 0; border-bottom: 1px solid var(--line); }
.claim .classification { margin-bottom: 10px; }
.claim p { margin: 0 0 10px; white-space: pre-wrap; line-height: 1.8; }
.claim .marker { font-size: 13px; color: var(--warning); border-left: 2px solid var(--accent); padding-left: 12px; }
.claim blockquote { margin: 16px 0 10px; padding: 0 0 0 18px; border-left: 2px solid #bbc8c5; color: #385261; font-family: var(--serif); font-size: 16px; line-height: 1.75; white-space: pre-wrap; }
.claim cite { display: block; font-size: 12px; color: var(--muted); font-style: normal; }
.answer-plain { white-space: pre-wrap; line-height: 1.8; }
.notice { background: #f1eadc; padding: 14px 16px; color: #684e25; font-size: 13px; }
.answer-scope { border-left: 3px solid var(--warning); margin: 18px 0 4px; line-height: 1.7; }
.answer-scope h3 { font-size: 13px; margin: 0 0 8px; }
.answer-scope p { margin: 0; white-space: pre-wrap; }
.answer-scope ul { margin: 10px 0 0; padding-left: 20px; }
.answer-scope li + li { margin-top: 4px; }
.evidence { padding-top: 20px; color: var(--muted); font-size: 11px; }
.evidence p { margin: 4px 0; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
.reading-guide { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.reading-guide h2 { font-family: var(--serif); font-size: 20px; font-weight: 400; margin: 0 0 12px; }
.reading-guide p { color: var(--muted); font-size: 12px; margin: 8px 0; line-height: 1.75; }
.footer { border-top: 1px solid var(--line); padding: 24px 0 30px; }
.footer > p { color: var(--muted); font-size: 10px; line-height: 1.8; margin: 0; max-width: 1030px; }
.footer nav { display: flex; gap: 24px; margin-top: 15px; font-size: 11px; }
.legal { max-width: 740px; margin: 60px auto 70px; }
.legal h1 { font-family: var(--serif); font-size: 40px; line-height: 1.2; font-weight: 400; margin: 0 0 20px; }
.legal h2 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 36px 0 12px; }
.legal p, .legal li { color: #445967; line-height: 1.8; }
.legal ul { padding-left: 22px; }
.legal-back { display: inline-block; margin-top: 24px; font-size: 13px; }
.noscript { margin: 30px; padding: 20px; background: #fcf0ec; color: var(--error); }
@media (max-width: 960px) {
  .shell { padding: 0 28px; }
  .sign-in { gap: 50px; }
  .workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
  .history { padding-right: 18px; }
  .composer-actions { align-items: flex-start; }
}
@media (max-width: 700px) {
  .shell { padding: 0 20px; }
  .top { min-height: 100px; gap: 18px; }
  .brand { font-size: 24px; }
  .account { align-items: flex-end; flex-direction: column; gap: 3px; max-width: 48%; font-size: 11px; }
  .sign-in { display: block; padding: 44px 0 48px; }
  .intro h1 { font-size: 42px; }
  .intro > p { max-width: 430px; }
  .intro .intro-note { margin-top: 24px; max-width: 400px; }
  .login-panel { margin-top: 38px; }
  .workspace { display: flex; flex-direction: column; gap: 36px; padding-top: 30px; }
  .research { order: 0; }
  .history { order: 1; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); }
  .history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .history-list { max-height: 350px; overflow-y: auto; }
  .research-heading h1 { font-size: 31px; }
  .composer-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .composer-actions .primary { align-self: flex-end; }
  .answer-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .answer-actions .secondary { font-size: 12px; padding: 10px 13px; }
  .legal { margin: 36px auto 48px; }
  .legal h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress-dot { animation: none; }
}
