:root {
  --ink: #201c19;
  --paper: #f4efe5;
  --cream: #fffaf0;
  --burgundy: #7d1928;
  --burgundy-dark: #53101a;
  --gold: #b58a46;
  --muted: #756e65;
  --line: rgba(45, 35, 29, .15);
  --shadow: 0 22px 60px rgba(60, 39, 25, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(181, 138, 70, .12), transparent 32rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 82px;
  padding: 0 clamp(22px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  font-family: Georgia, serif;
  font-weight: 700;
}

.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 20px; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(181, 138, 70, .13);
}

.status.ready span { background: #388457; box-shadow: 0 0 0 5px rgba(56, 132, 87, .13); }

main { min-height: calc(100vh - 150px); }

.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 78px 24px 54px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--burgundy);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .17em;
}

h1, h2 { font-family: Georgia, "Times New Roman", serif; }

h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .96;
  letter-spacing: -.045em;
  font-weight: 500;
}

h1 em { color: var(--burgundy); font-weight: 400; }

.intro {
  max-width: 690px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.ask-panel {
  padding: 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.ask-panel > label, .select-group label {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 13px 0 18px;
  outline: none;
  font-family: Georgia, serif;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.25;
}

textarea:focus { border-color: var(--burgundy); }
textarea::placeholder { color: #aaa095; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  padding-top: 18px;
}

select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 28px 10px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

#askButton {
  min-width: 190px;
  border: 0;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: white;
  background: var(--burgundy);
  font-weight: 750;
}

#askButton:hover { background: var(--burgundy-dark); }
#askButton:disabled { opacity: .62; cursor: progress; }
#askButton b { font-size: 20px; }

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 20px;
}

.examples span { color: var(--muted); font-size: 13px; }
.examples button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(255,255,255,.35);
  font-size: 12px;
}
.examples button:hover { border-color: var(--burgundy); color: var(--burgundy); }

.workspace {
  max-width: 1280px;
  margin: 12px auto 76px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 24px;
  align-items: start;
}

.report-toolbar {
  max-width: 1280px;
  margin: 12px auto 18px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.obsolete-report-toolbar { display: none !important; }

.answer-actions {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.answer-actions strong,
.answer-actions span { display: block; }

.answer-actions strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 16px;
}

.answer-actions > div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.report-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

#printButton,
#printButtonCard {
  border: 1px solid var(--burgundy);
  padding: 12px 16px;
  color: var(--burgundy);
  background: var(--cream);
  font-weight: 750;
  text-decoration: none;
}

#printButton:hover,
#printButtonCard:hover {
  color: white;
  background: var(--burgundy);
}

#printButton:disabled,
#printButtonCard:disabled { opacity: .62; cursor: progress; }
#printButton span,
#printButtonCard span { margin-right: 8px; font-size: 12px; }

.answer-card, .source-column {
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.answer-card { padding: clamp(26px, 4vw, 48px); }

.answer-heading, .source-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.answer-heading h2, .source-title h2 {
  margin: 0;
  font-size: 29px;
  font-weight: 500;
}

.verified {
  white-space: nowrap;
  padding: 7px 10px;
  color: #2d6845;
  background: #e2f0e7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.answer-text {
  padding: 30px 0 14px;
  font-family: Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
}

.answer-text p {
  margin: 0 0 18px;
}

.answer-text p:last-child { margin-bottom: 0; }

.answer-text h3 {
  margin: 28px 0 10px;
  color: var(--burgundy);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.answer-text ul {
  margin: 8px 0 24px;
  padding-left: 24px;
}

.answer-text ul li {
  min-height: 0;
  padding: 7px 0 7px 8px;
  border-bottom: 0;
}

.answer-text ul li::before { display: none; }

.answer-text ol {
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: workshop-step;
}

.answer-text li {
  position: relative;
  min-height: 40px;
  margin: 0;
  padding: 10px 0 14px 52px;
  border-bottom: 1px solid var(--line);
  counter-increment: workshop-step;
}

.answer-text li::before {
  content: counter(workshop-step);
  position: absolute;
  top: 9px;
  left: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--burgundy);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.notice {
  margin-top: 24px;
  padding: 15px 18px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  background: #f6eedf;
  font-size: 13px;
  line-height: 1.5;
}

.followup-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.followup-panel > label {
  display: block;
  margin-bottom: 10px;
  color: var(--burgundy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.followup-panel > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.followup-panel input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  font: inherit;
  outline: none;
}

.followup-panel input:focus { border-color: var(--burgundy); }

#followupButton {
  border: 0;
  padding: 12px 16px;
  color: white;
  background: var(--burgundy);
  font-weight: 750;
}

#followupButton:hover { background: var(--burgundy-dark); }
#followupButton:disabled { opacity: .62; cursor: progress; }

.followup-panel small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.source-column { padding: 24px; }
.source-title { align-items: center; }
.source-title > span { color: var(--muted); font-size: 13px; }

.source-card {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.source-card:last-child { border-bottom: 0; }

.source-thumb {
  width: 102px;
  height: 132px;
  object-fit: cover;
  object-position: top;
  background: #e7dfd2;
  border: 1px solid var(--line);
}

.source-placeholder {
  width: 102px;
  height: 132px;
  display: grid;
  place-items: center;
  color: var(--burgundy);
  background: #eadfd3;
  border: 1px solid var(--line);
  font-family: Georgia, serif;
  font-size: 24px;
}

.source-card h3 {
  margin: 2px 0 5px;
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
}

.source-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.source-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--burgundy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.source-card .source-visual-link {
  display: block;
  margin: 0;
}

.source-card .source-title-link {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  text-decoration: none;
}

.source-card .source-title-link:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

.collection {
  padding: 70px max(24px, calc((100vw - 1232px) / 2));
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  color: white;
  background: var(--burgundy-dark);
}

.collection h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); font-weight: 500; }
.collection .eyebrow { color: #d9b77c; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid rgba(255,255,255,.2); }
.metrics div { padding: 12px 24px; border-right: 1px solid rgba(255,255,255,.2); }
.metrics strong { display: block; font-family: Georgia, serif; font-size: clamp(36px, 5vw, 64px); font-weight: 400; }
.metrics span { display: block; margin-top: 8px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.4; }

footer {
  padding: 26px clamp(22px, 5vw, 76px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 850px) {
  .form-row, .workspace, .collection { grid-template-columns: 1fr; }
  #askButton { width: 100%; }
  .metrics { border-left: 0; border-top: 1px solid rgba(255,255,255,.2); }
  .workspace { margin-top: 0; }
}

@media (max-width: 570px) {
  .topbar { height: 72px; padding-inline: 16px; }
  .status { display: none; }
  .hero { padding: 54px 16px 42px; }
  .ask-panel { padding: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  footer { flex-direction: column; }
  .answer-actions { align-items: stretch; flex-direction: column; }
  #printButtonCard { width: 100%; }
  .followup-panel > div { grid-template-columns: 1fr; }
  #followupButton { width: 100%; }
}
