@font-face { font-family: 'Feature Display'; font-weight: 400; font-style: normal; src: url(/fonts/FeatureDisplay-Regular.otf) format('opentype'); }
@font-face { font-family: 'Feature Display'; font-weight: 500; font-style: normal; src: url(/fonts/FeatureDisplay-Medium.otf) format('opentype'); }
@font-face { font-family: 'Feature Display'; font-weight: 700; font-style: normal; src: url(/fonts/FeatureDisplay-Bold.otf) format('opentype'); }
@font-face { font-family: 'Scala Sans Offc'; font-weight: 400; font-style: normal; src: url(/fonts/ScalaSansOffc.ttf) format('truetype'); }
@font-face { font-family: 'Scala Sans Offc'; font-weight: 700; font-style: normal; src: url(/fonts/ScalaSansOffc-Bold.ttf) format('truetype'); }

:root {
  --teal: #007375;
  --teal-dark: #005354;
  --navy: #1d2529;
  --bg-grey: #f4f4f4;
  --border-grey: #e6e6e6;
  --muted: #545454;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Scala Sans Offc', sans-serif;
  color: var(--navy);
  background: var(--white);
}

h1, h2, h3 { font-family: 'Feature Display', sans-serif; margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

/* HEADER */
.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid var(--border-grey);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--teal);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Feature Display', sans-serif;
  font-weight: 700;
  font-size: 12px;
}

.brand-mark-note {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed #b3b3b3;
  border-radius: 4px;
  padding: 3px 8px;
}

.brand-name { font-family: 'Feature Display', sans-serif; font-weight: 600; font-size: 18px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-grey);
  border-radius: 280px;
  padding: 4px 10px;
}

.header-meta { font-size: 13px; color: var(--muted); }

/* HERO */
.hero {
  background: var(--bg-grey);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-copy { flex: 1; max-width: 640px; }

.hero h1 {
  font-size: 44px;
  font-weight: 500;
  line-height: 108%;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero-sub {
  margin: 0 0 24px;
  max-width: 520px;
  font-size: 18px;
  line-height: 145%;
  color: var(--muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
}

.btn-primary:hover { background: var(--teal-dark); }

.hero-image {
  width: 400px;
  height: 340px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #63afb2 0%, #2a4b4d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  padding: 32px;
}

.hero-image-label { font-family: 'Feature Display', sans-serif; font-size: 15px; font-weight: 600; color: #fff; opacity: 0.9; }
.hero-image-note { font-size: 13px; color: #fff; opacity: 0.7; }

/* WHAT YOU CAN ASK */
.what-you-can-ask {
  padding: 56px 48px;
  border-bottom: 1px solid var(--border-grey);
}

.what-you-can-ask h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 115%;
  letter-spacing: 0.5px;
  max-width: 760px;
  margin-bottom: 16px;
}

.what-you-can-ask p {
  margin: 0 0 20px;
  max-width: 720px;
  font-size: 16px;
  line-height: 150%;
  color: var(--muted);
}

.suggested-questions { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
  border: 1px solid var(--border-grey);
  color: var(--navy);
  background: var(--white);
  border-radius: 280px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

.pill:hover { border-color: var(--teal); color: var(--teal); }

/* ASK */
.ask {
  padding: 56px 48px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.chat-panel {
  flex: 1;
  border: 1px solid var(--border-grey);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 480px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.messages:empty::before {
  content: "Ask your first question above, or pick a suggestion — the conversation and its sources will appear here.";
  color: var(--muted);
  font-size: 14px;
  line-height: 150%;
  display: block;
  text-align: center;
  margin: auto;
  max-width: 320px;
}

.message {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}

.message.user { align-self: flex-end; background: var(--teal); color: white; }
.message.assistant { align-self: flex-start; background: var(--bg-grey); }
.message.loading { align-self: flex-start; color: var(--muted); font-style: italic; }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border-grey);
}

#question {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.chat-form button {
  padding: 0 22px;
  border: none;
  border-radius: 6px;
  background: var(--teal);
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.chat-form button:disabled { opacity: 0.5; cursor: default; }

.citations-panel {
  width: 300px;
  flex-shrink: 0;
  border: 1px solid var(--border-grey);
  border-radius: 12px;
  padding: 20px;
}

.citations-panel h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.citations-hint { color: var(--muted); font-size: 13px; margin: 0; line-height: 150%; }

.citation {
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  cursor: pointer;
}

.citation.active { border-color: var(--teal); background: #f0f7f7; }
.citation-title { font-weight: 600; font-size: 13px; }
.citation-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* IN-CONTEXT CITATIONS */
.in-context {
  padding: 48px 48px 64px;
  background: var(--bg-grey);
}

.in-context-intro { max-width: 640px; margin-bottom: 20px; }
.in-context-intro h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.in-context-intro p { margin: 0; font-size: 14px; color: var(--muted); line-height: 150%; }

.in-context-empty {
  border: 1px dashed #b3b3b3;
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
}

.citation-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.citation-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--teal);
  color: white;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.citation-card-body {
  padding: 32px;
  border-left: 3px solid var(--teal);
}

.citation-card-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--teal);
  margin-bottom: 6px;
}

.excerpt-scroll {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 16px;
}

.excerpt-scroll::-webkit-scrollbar { width: 6px; }
.excerpt-scroll::-webkit-scrollbar-track { background: transparent; }
.excerpt-scroll::-webkit-scrollbar-thumb { background-color: #ced4da; border-radius: 3px; }

.excerpt-scroll p { margin: 0; font-size: 16px; line-height: 165%; color: var(--navy); }

.scroll-hint { margin-top: 10px; font-size: 12px; color: var(--muted); }

.citation-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-grey);
  flex-wrap: wrap;
}

.section-nav {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--navy);
}

.section-nav:hover { color: var(--teal); }
.section-nav.disabled { color: #b3b3b3; pointer-events: none; }

.also-cited { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.also-cited a { color: var(--teal); font-weight: 600; }
.also-cited a:hover { text-decoration: underline; }

/* FOOTER */
.site-footer {
  background: var(--navy);
  color: white;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.site-footer span { opacity: 0.75; }

@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .hero-image { width: 100%; height: 220px; }
  .ask { flex-direction: column; }
  .citations-panel { width: 100%; }
}
