:root {
  --ink: #202428;
  --muted: #687078;
  --paper: #f6f7f8;
  --panel: #ffffff;
  --line: #d9dde1;
  --line-dark: #b8bec4;
  --accent: #315f85;
  --accent-soft: #eef4f8;
  --success: #477356;
  --warning: #8b5a30;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

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

.topbar {
  height: 54px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -.01em;
}

.brand-mark {
  min-width: 29px;
  height: 25px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  color: #3e464d;
  background: #f7f8f8;
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.topnav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 22px;
}

.topnav a {
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
}

.topnav a:hover { color: var(--ink); }
.topnav a.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 650;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.status i {
  width: 6px;
  height: 6px;
  background: #9ca2a7;
  border-radius: 50%;
}

.status.ready i { background: var(--success); }

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.hero { padding: 56px 0 32px; }

.eyebrow,
.model-pill,
.control-label,
.step,
.result-placeholder {
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.eyebrow { color: var(--accent); }

.hero h1 {
  margin: 13px 0 11px;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.08;
  font-weight: 590;
  letter-spacing: -.035em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.method-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 31px 0 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.method-strip > div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.method-strip > div:last-child { border-right: 0; }
.method-strip dt {
  margin-bottom: 5px;
  color: var(--muted);
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.method-strip dd { margin: 0; font-size: 12px; }

.rag-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(360px, .93fr);
  background: var(--panel);
  border: 1px solid var(--line-dark);
}

.query-panel,
.result-panel {
  min-height: 370px;
  padding: 30px 32px;
}

.query-panel { border-right: 1px solid var(--line); }

.query-heading,
.section-title,
.query-heading > div,
.section-title > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.query-heading > div,
.section-title > div {
  justify-content: flex-start;
  gap: 11px;
}

.query-heading h2,
.section-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.step { color: var(--muted); }

.model-pill {
  color: #53616c;
  background: #f5f7f8;
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 3px;
  text-transform: none;
  letter-spacing: .02em;
}

form { margin-top: 31px; }

form > label {
  display: block;
  margin-bottom: 7px;
  color: #555e65;
  font-size: 11px;
  font-weight: 650;
}

.question-row { display: flex; gap: 8px; }

.question-row input {
  min-width: 0;
  flex: 1;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  outline: none;
}

.question-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(49, 95, 133, .1);
}

.question-row button,
.ask-this {
  min-width: 106px;
  padding: 0 14px;
  border: 1px solid #294f6d;
  border-radius: 3px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.question-row button:hover,
.ask-this:hover { background: #274e6d; }
.question-row button:disabled { opacity: .55; cursor: wait; }

.controls {
  margin-top: 19px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.control-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

.segments {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f4f5f6;
}

.segments button {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.segments button:last-child { border-right: 0; }
.segments button.active {
  background: white;
  color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
  font-weight: 650;
}

.top-k,
.model-select {
  color: var(--muted);
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.top-k input,
.model-select select {
  display: block;
  height: 31px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 8px;
  background: white;
  font-size: 11px;
}

.top-k input { width: 60px; }
.model-select select {
  width: 210px;
  color: #4d565d;
  text-transform: none;
}

.retrieve-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  color: var(--muted);
  font-size: 11px;
}

.retrieve-toggle input { display: none; }

.retrieve-toggle span {
  width: 25px;
  height: 14px;
  padding: 2px;
  border-radius: 10px;
  background: #bdc2c6;
}

.retrieve-toggle span::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  transition: transform .15s;
}

.retrieve-toggle input:checked + span { background: var(--accent); }
.retrieve-toggle input:checked + span::after { transform: translateX(11px); }

.examples {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 25px;
  color: var(--muted);
  font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

#example-questions { display: flex; gap: 6px; flex-wrap: wrap; }

#example-questions button {
  border: 1px solid var(--line);
  background: #fafbfb;
  padding: 4px 7px;
  border-radius: 2px;
  color: #5b646b;
  font-size: 10px;
  text-transform: none;
}

#example-questions button:hover { border-color: var(--line-dark); color: var(--ink); }

.result-panel {
  justify-content: center;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.empty-result { max-width: 360px; }
.result-placeholder,
.answer-label { color: var(--accent); }
.empty-result h3 { margin: 13px 0 6px; font-size: 15px; }
.empty-result p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.answer-copy {
  max-width: 520px;
  margin: 17px 0 20px;
  font-size: 16px;
  line-height: 1.6;
}

.answer-meta {
  color: var(--muted);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.loader { display: flex; gap: 5px; }
.loader i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse .9s infinite alternate;
}
.loader i:nth-child(2) { animation-delay: .16s; }
.loader i:nth-child(3) { animation-delay: .32s; }
@keyframes pulse { to { opacity: .2; } }

.evidence-section,
.dataset-section { padding: 60px 0 0; }

.section-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-title > span {
  color: var(--muted);
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.retrieval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.empty-grid {
  min-height: 110px;
  place-items: center;
  border: 1px dashed var(--line-dark);
  color: var(--muted);
  font-size: 11px;
}

.evidence-card,
.sample-card {
  background: var(--panel);
  border: 1px solid var(--line);
}

.evidence-card:hover,
.sample-card:hover { border-color: #aeb5bb; }

.evidence-card { cursor: zoom-in; }

.evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #e6e8e9;
  border-bottom: 1px solid var(--line);
}

.evidence-card-body { padding: 11px; }
.rank-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.kind {
  color: var(--warning);
  text-transform: uppercase;
}
.kind.original { color: var(--success); }
.score { color: var(--muted); }
.evidence-card h3 {
  margin: 0 0 4px;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.evidence-card p { margin: 0; color: var(--muted); font-size: 10px; }

.dataset-title { align-items: flex-end; }
.dataset-filters { display: flex; gap: 6px; }
.dataset-filters input,
.dataset-filters select {
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  padding: 0 10px;
  outline: none;
  font-size: 11px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.stat-strip > div {
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}
.stat-strip > div:last-child { border-right: 0; }
.stat-strip strong {
  display: block;
  margin-bottom: 2px;
  font: 500 20px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.stat-strip span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.sample-card { cursor: pointer; }
.pair-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 160px;
  background: #e5e7e8;
}
.pair-preview figure {
  margin: 0;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.pair-preview figure + figure { border-left: 1px solid var(--panel); }
.pair-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.pair-preview figcaption {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 3px 5px;
  color: white;
  background: rgba(32, 36, 40, .78);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.sample-copy { padding: 12px; }
.sample-copy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.source-tag {
  color: var(--muted);
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.qa-badge {
  padding: 3px 5px;
  border: 1px solid #c7d9cc;
  color: var(--success);
  background: #f4f8f5;
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.qa-badge.review {
  border-color: #e0cbb8;
  color: var(--warning);
  background: #fbf7f3;
}
.sample-copy h3 {
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 650;
}
.price-change {
  margin: 0;
  color: var(--muted);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.price-change b { color: var(--ink); }
.price-change i {
  color: var(--muted);
  font-style: normal;
  padding: 0 5px;
}

.show-more {
  display: block;
  margin: 18px auto 0;
  padding: 8px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: white;
  color: #4c555c;
  font-size: 11px;
}

dialog {
  width: min(1120px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .2);
}

dialog::backdrop { background: rgba(24, 28, 31, .68); }
.close-dialog {
  position: absolute;
  right: 13px;
  top: 9px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}
.dialog-copy {
  min-height: 82px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--line);
}
.dialog-copy h2 {
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 600;
}
.dialog-copy p {
  margin: 0;
  color: var(--muted);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ask-this {
  float: right;
  min-width: 0;
  height: 32px;
  margin-top: -34px;
}
.compare-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 14px;
  gap: 10px;
}
.compare-images figure { margin: 0; min-width: 0; }
.compare-images figcaption {
  margin: 0 0 6px;
  color: var(--muted);
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.compare-images img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #eef0f1;
  border: 1px solid var(--line);
}

.evidence-dialog {
  width: min(1180px, calc(100% - 40px));
  height: min(900px, calc(100vh - 40px));
}

.close-evidence {
  position: absolute;
  right: 13px;
  top: 9px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.evidence-dialog-head {
  min-height: 72px;
  padding: 17px 54px 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.evidence-dialog-head h2 {
  margin: 5px 0 0;
  font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.evidence-dialog-head a {
  color: var(--accent);
  font-size: 10px;
  text-decoration: none;
}

.evidence-dialog-head a:hover { text-decoration: underline; }

.evidence-zoom-frame {
  height: calc(100% - 72px);
  padding: 14px;
  display: grid;
  place-items: center;
  background: #eef0f1;
}

.evidence-zoom-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 360px;
  padding: 10px 13px;
  color: white;
  background: #8d4138;
  border-radius: 3px;
  font-size: 11px;
  transform: translateY(100px);
  transition: transform .2s;
}
#toast.show { transform: translateY(0); }

/* Methods page */

.methods-main {
  width: min(1080px, calc(100% - 48px));
  padding-bottom: 100px;
}

.methods-hero {
  padding: 64px 0 43px;
  border-bottom: 1px solid var(--line-dark);
}

.methods-hero h1 {
  max-width: 850px;
  margin: 14px 0 14px;
  font-size: clamp(31px, 4.5vw, 49px);
  line-height: 1.08;
  font-weight: 590;
  letter-spacing: -.04em;
}

.methods-hero > p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.methods-note {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  margin-top: 29px;
  padding: 13px 15px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  line-height: 1.5;
}

.methods-note strong {
  font: 650 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.methods-section {
  padding: 55px 0;
  border-bottom: 1px solid var(--line);
}

.methods-section-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  margin-bottom: 27px;
}

.methods-section-head > span {
  padding-top: 3px;
  color: var(--accent);
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.methods-section-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.methods-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pipeline-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr) 22px) minmax(0, 1fr);
  align-items: center;
  padding-left: 42px;
}

.pipeline-overview article {
  min-height: 112px;
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.pipeline-overview article b {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pipeline-overview article span {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 650;
}

.pipeline-overview article small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.pipeline-overview > i {
  color: #90979d;
  text-align: center;
  font-style: normal;
}

.procedure {
  margin: 0 0 0 42px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.procedure > li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.procedure-index {
  color: var(--muted);
  font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.procedure h3,
.qa-grid h3,
.rag-flow h3,
.limitations-grid h3 {
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 650;
}

.procedure p {
  max-width: 815px;
  margin: 0 0 11px;
  color: #535b62;
  font-size: 12px;
  line-height: 1.65;
}

.procedure code,
.artifact-table code,
.rag-flow code,
.policy-callout code {
  color: #46535e;
  font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.parameter-row,
.artifact-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.parameter-row span,
.artifact-list span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: #fafbfb;
  color: #596269;
  font: 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.artifact-list span::before {
  content: "· ";
  color: var(--accent);
}

.worked-example {
  margin-left: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.example-images {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.example-images figure { min-width: 0; margin: 0; }

.example-image-frame {
  height: 330px;
  border: 1px solid var(--line);
  background: #eef0f1;
}

.example-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.example-images figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.example-images figcaption span {
  color: #4d565d;
  font-size: 10px;
  font-weight: 650;
}

.example-images figcaption code {
  color: var(--muted);
  font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.example-transition {
  color: var(--muted);
  text-align: center;
  font: 8px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.example-transition b {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 400;
}

.example-details {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) 1fr 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbfb;
}

.example-details .detail-copy {
  align-self: center;
  padding-right: 8px;
}

.example-details .detail-copy > span {
  color: var(--accent);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.example-details h3 {
  margin: 7px 0 6px;
  font-size: 12px;
}

.example-details p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.example-details figure {
  min-width: 0;
  margin: 0;
}

.example-details img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #eef0f1;
}

.example-details figcaption {
  margin-top: 6px;
  color: var(--muted);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.example-record {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.example-record > div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.example-record > div:nth-child(3n) { border-right: 0; }
.example-record > div:nth-last-child(-n + 3) { border-bottom: 0; }
.example-record dt {
  margin-bottom: 4px;
  color: var(--muted);
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.example-record dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}

.example-caption {
  margin: 0;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-left: 42px;
}

.qa-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.qa-grid article > p {
  min-height: 57px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.qa-grid dl { margin: 0; border-top: 1px solid var(--line); }
.qa-grid dl div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eceeef;
}
.qa-grid dt {
  color: var(--muted);
  font-size: 10px;
}
.qa-grid dd {
  margin: 0;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.qa-grid dd.pass { color: var(--success); }

.policy-callout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 15px;
  margin: 12px 0 0 42px;
  padding: 14px 16px;
  border: 1px solid #d9ceb9;
  background: #fbf9f5;
}
.policy-callout strong {
  color: var(--warning);
  font: 650 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.policy-callout p {
  margin: 0;
  color: #5d5a53;
  font-size: 11px;
  line-height: 1.55;
}

.rag-flow {
  margin-left: 42px;
  border-left: 1px solid var(--line-dark);
}

.rag-flow article {
  position: relative;
  margin-left: 20px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rag-flow article::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 19px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
}

.rag-flow article > span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font: 650 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.rag-flow article p {
  max-width: 830px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.rag-flow .critical-stage {
  border-color: #c5d5e0;
  background: var(--accent-soft);
}

.flow-link {
  height: 17px;
  margin-left: -4px;
  color: #8c949a;
  font-size: 10px;
  line-height: 17px;
}

.model-scope-note {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 16px;
  margin: 0 0 12px 42px;
  padding: 14px 16px;
  border: 1px solid #c7d7e2;
  background: var(--accent-soft);
}

.model-scope-note strong {
  color: var(--accent);
  font: 650 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.model-scope-note p {
  margin: 0;
  color: #53616a;
  font-size: 11px;
  line-height: 1.55;
}

.model-table {
  margin-left: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.model-table > div {
  display: grid;
  grid-template-columns: 105px 155px 235px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.model-table > div:last-child { border-bottom: 0; }

.model-table > div > * {
  min-width: 0;
  padding: 10px 11px;
  border-right: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.model-table > div > *:last-child { border-right: 0; }

.model-table-head {
  color: var(--muted);
  background: #f3f5f6;
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.model-table > div:not(.model-table-head) > span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.model-table > div:not(.model-table-head) > strong {
  font-size: 10px;
  line-height: 1.4;
}

.model-table code {
  color: #46535e;
  font: 9px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.model-table .current-component {
  background: #f4f8fb;
  box-shadow: inset 3px 0 var(--accent);
}

.limitations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-left: 42px;
}

.limitations-grid article {
  min-height: 145px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.limitations-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.artifact-section { border-bottom: 0; }
.artifact-table {
  margin-left: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.artifact-table > div {
  display: grid;
  grid-template-columns: 210px 1fr;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.artifact-table > div:last-child { border-bottom: 0; }

@media (max-width: 880px) {
  .method-strip { grid-template-columns: repeat(3, 1fr); }
  .method-strip > div:nth-child(3) { border-right: 0; }
  .method-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .rag-shell { grid-template-columns: 1fr; }
  .query-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-panel { min-height: 230px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div:nth-child(2) { border-right: 0; }
  .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pipeline-overview {
    grid-template-columns: 1fr 18px 1fr;
    row-gap: 9px;
  }
  .pipeline-overview > i:nth-of-type(2n) { visibility: hidden; }
  .limitations-grid { grid-template-columns: 1fr 1fr; }
  .example-image-frame { height: 280px; }
  .model-table > div {
    grid-template-columns: 90px 135px 195px minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  main { width: min(100% - 24px, 1240px); }
  .topbar { padding: 0 13px; }
  .brand > span:last-child { display: none; }
  .topnav { gap: 14px; }
  .status { display: none; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 30px; }
  .method-strip { grid-template-columns: 1fr 1fr; }
  .method-strip > div { border-bottom: 1px solid var(--line); }
  .method-strip > div:nth-child(2n) { border-right: 0; }
  .method-strip > div:last-child { border-bottom: 0; }
  .query-panel,
  .result-panel { padding: 22px 18px; }
  .query-heading { align-items: flex-start; }
  .question-row { display: block; }
  .question-row button { width: 100%; height: 39px; margin-top: 7px; }
  .dataset-title { display: block; }
  .dataset-filters { margin-top: 13px; }
  .dataset-filters input { min-width: 0; width: 100%; }
  .stat-strip > div { padding: 11px; }
  .compare-images { grid-template-columns: 1fr; }
  .ask-this { float: none; margin: 12px 0 0; }
  .methods-main { width: min(100% - 24px, 1080px); }
  .methods-hero { padding-top: 39px; }
  .methods-hero h1 { font-size: 31px; }
  .methods-note { grid-template-columns: 1fr; gap: 5px; }
  .methods-section { padding: 40px 0; }
  .methods-section-head { grid-template-columns: 31px 1fr; }
  .pipeline-overview {
    grid-template-columns: 1fr;
    padding-left: 31px;
  }
  .pipeline-overview article { min-height: 0; }
  .pipeline-overview article b { margin-bottom: 10px; }
  .pipeline-overview > i { transform: rotate(90deg); }
  .procedure,
  .worked-example,
  .qa-grid,
  .policy-callout,
  .rag-flow,
  .model-scope-note,
  .model-table,
  .limitations-grid,
  .artifact-table { margin-left: 31px; }
  .procedure > li { grid-template-columns: 43px minmax(0, 1fr); }
  .qa-grid,
  .limitations-grid { grid-template-columns: 1fr; }
  .example-images { grid-template-columns: 1fr; gap: 12px; }
  .example-image-frame { height: 280px; }
  .example-transition b { transform: rotate(90deg); }
  .example-details { grid-template-columns: 1fr; }
  .example-details img { height: 240px; }
  .example-record { grid-template-columns: 1fr 1fr; }
  .example-record > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .example-record > div:nth-child(2n) { border-right: 0; }
  .example-record > div:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .example-record > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .qa-grid article > p { min-height: 0; }
  .policy-callout { grid-template-columns: 1fr; gap: 5px; }
  .model-scope-note { grid-template-columns: 1fr; gap: 5px; }
  .model-table { border-bottom: 0; }
  .model-table > div,
  .model-table > div.model-table-head {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--line-dark);
  }
  .model-table > div.model-table-head { display: none; }
  .model-table > div > * {
    padding: 5px 10px;
    border-right: 0;
  }
  .model-table > div > *:first-child { padding-top: 11px; }
  .model-table > div > *:last-child { padding-bottom: 11px; }
  .artifact-table > div { grid-template-columns: 1fr; gap: 4px; }
}
