:root {
  --ink: #18201d;
  --muted: #65706b;
  --paper: #f4efe4;
  --card: #fffdf8;
  --line: #d9d2c3;
  --green: #174d3b;
  --green-2: #276b55;
  --gold: #b5883d;
  --shadow: 0 22px 70px rgba(38, 45, 40, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 7%, rgba(181, 136, 61, .14), transparent 26rem),
    linear-gradient(180deg, var(--paper), #f8f5ee 46%, #efeadd);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 32, 29, .14);
}
.brand { display: flex; gap: 13px; align-items: center; text-decoration: none; }
.brand-mark, .avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: Georgia, serif;
  letter-spacing: .03em;
}
.brand strong { display: block; font-family: Georgia, serif; font-size: 21px; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.archive-link { color: var(--green); text-underline-offset: 4px; font-weight: 650; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 92px 0 64px; }
.kicker, .section-label {
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin: 15px 0 22px; max-width: 900px; font-size: clamp(54px, 8vw, 96px); line-height: .96; letter-spacing: -.045em; }
h1 em { color: var(--green); font-weight: 400; }
.intro { max-width: 720px; font-size: 19px; color: #4e5954; }
.stats { margin-top: 55px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 25px 28px 26px 0; }
.stats div + div { padding-left: 34px; border-left: 1px solid var(--line); }
.stats strong { display: block; font-family: Georgia, serif; color: var(--green); font-size: 29px; font-weight: 500; }
.stats span { display: block; color: var(--muted); font-size: 13px; }

.chat-shell { background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.chat-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 34px 38px 26px; }
.chat-heading p, .chat-heading h2 { margin: 0; }
.chat-heading h2 { font-size: 35px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #d09335; box-shadow: 0 0 0 4px rgba(208, 147, 53, .12); }
.status.ready i { background: #2b8a61; box-shadow: 0 0 0 4px rgba(43, 138, 97, .12); }

.suggestions { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 38px 26px; }
.suggestions button { border: 1px solid #ccd3cd; border-radius: 999px; padding: 9px 13px; color: var(--green); background: #f8faf7; font-size: 13px; transition: .18s ease; }
.suggestions button:hover { background: var(--green); color: white; border-color: var(--green); transform: translateY(-1px); }
.conversation { min-height: 210px; max-height: 680px; overflow-y: auto; padding: 32px 38px; background: #faf8f2; border-top: 1px solid #e7e1d6; border-bottom: 1px solid #e7e1d6; }
.message { max-width: 900px; margin: 0 0 24px; display: flex; gap: 15px; }
.message.user { margin-left: auto; justify-content: flex-end; }
.message.user > div { max-width: 720px; padding: 14px 18px; border-radius: 18px 18px 4px 18px; background: var(--green); color: white; }
.message.assistant > div:last-child { max-width: 800px; padding: 16px 19px; border-radius: 4px 18px 18px; background: white; border: 1px solid #e4dfd5; }
.avatar { width: 38px; min-width: 38px; height: 38px; font-size: 13px; }
.message p { margin: 0 0 12px; }
.message p:last-child { margin-bottom: 0; }
.message-label { color: var(--green-2); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.message .citation { display: inline-grid; place-items: center; min-width: 26px; height: 22px; margin: 0 2px; padding: 0 6px; border-radius: 999px; background: #e5efe9; color: var(--green); font-size: 11px; font-weight: 800; text-decoration: none; }
.loading-dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.loading-dots i { width: 7px; height: 7px; background: #8b958f; border-radius: 50%; animation: pulse 1.2s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.sources { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e2ded4; }
.sources h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.source-list { display: grid; gap: 8px; }
.source-card { display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; background: #f5f6f1; text-decoration: none; transition: .15s ease; }
.source-card:hover { background: #eaf0ea; transform: translateX(2px); }
.source-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-weight: 800; }
.source-card strong { display: block; font-size: 13px; line-height: 1.35; }
.source-card small { color: var(--muted); }
.quality-warning { display: block; color: #916824; font-size: 11px; margin-top: 3px; }

.ask-form { padding: 26px 38px 20px; }
.ask-form textarea { width: 100%; min-height: 90px; padding: 0; resize: vertical; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 17px; line-height: 1.5; }
.ask-form textarea::placeholder { color: #939991; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 15px; border-top: 1px solid #e6e0d5; }
.form-footer > span { color: var(--muted); font-size: 12px; }
.form-footer button { display: inline-flex; align-items: center; gap: 18px; padding: 12px 15px 12px 19px; border: 0; border-radius: 999px; color: white; background: var(--green); font-weight: 750; }
.form-footer button:hover { background: #0e3d2d; }
.form-footer button:disabled { opacity: .55; cursor: wait; }
.form-footer button b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: var(--green); background: white; }
.disclaimer { margin: 0; padding: 0 38px 28px; color: #7d817c; font-size: 11px; }

.method { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; padding: 110px 0 95px; }
.method h2 { margin: 4px 0 0; font-size: 48px; line-height: 1.05; }
.method ol { margin: 0; padding: 0; list-style: none; }
.method li { display: grid; grid-template-columns: 45px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.method li:last-child { border-bottom: 1px solid var(--line); }
.method li > span { color: var(--gold); font-family: Georgia, serif; }
.method strong { font-size: 17px; }
.method p { margin: 4px 0 0; color: var(--muted); }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 35px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 70px; }
  .brand small { display: none; }
  .archive-link { font-size: 13px; }
  .hero { padding: 64px 0 42px; }
  h1 { font-size: clamp(48px, 16vw, 72px); }
  .intro { font-size: 17px; }
  .stats { grid-template-columns: 1fr; }
  .stats div, .stats div + div { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stats div:first-child { border-top: 0; }
  .chat-heading { align-items: flex-start; }
  .status { margin-top: 4px; }
  .chat-heading, .conversation, .ask-form { padding-left: 19px; padding-right: 19px; }
  .suggestions { padding-left: 19px; padding-right: 19px; }
  .disclaimer { padding-left: 19px; padding-right: 19px; }
  .form-footer > span { display: none; }
  .form-footer { justify-content: flex-end; }
  .method { grid-template-columns: 1fr; gap: 35px; padding: 75px 0; }
  .method h2 { font-size: 40px; }
  footer { gap: 15px; flex-direction: column; }
}
