:root {
  --paper: #f5f2e9;
  --ink: #182e29;
  --muted: #68716b;
  --green: #247563;
  --orange: #ce603c;
  --line: #d5d9ce;
  --white: #fffef8;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  line-height: 1.6;
}
main {
  max-width: 1460px;
  margin: auto;
  padding: 0 5%;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select,
input {
  outline-offset: 5px;
}
a {
  color: inherit;
}
header {
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.brand {
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: -1.7px;
}
.brand span,
.serif {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: normal;
}
.brand i {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  width: 30px;
  height: 30px;
  margin-left: 12px;
  font-style: normal;
}
.header-meta,
.eyebrow,
.card-label {
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.3px;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.button {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: 12px 20px;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
}
.button:hover {
  background: #e5e9dd;
}
.button.small {
  padding: 9px 15px;
}
.button.dark {
  background: var(--ink);
  color: white;
}
.button.dark:hover {
  background: var(--green);
}
.hero {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 8%;
  padding: 70px 0 55px;
  align-items: center;
}
h1 {
  font-size: clamp(40px, 4.7vw, 66px);
  line-height: 1.07;
  letter-spacing: -2.5px;
  font-weight: 500;
  margin: 24px 0;
}
h1 em {
  font-family: Georgia, serif;
  color: var(--green);
}
.intro {
  max-width: 570px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.hero-links {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-top: 28px;
}
.text-link {
  font-size: 13px;
  text-underline-offset: 5px;
}
.experiment-card {
  background: #e8ece0;
  border: 1px solid #cbd4c5;
  border-radius: 10px;
  padding: 25px 32px;
  transform: rotate(1deg);
}
.card-label {
  color: var(--green);
}
.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px 0 20px;
  font-size: 13px;
}
.flow > span {
  background: var(--white);
  border: 1px solid #ced7c9;
  border-radius: 5px;
  padding: 8px 12px;
  width: 100%;
  text-align: center;
}
.flow b {
  color: #81947e;
  font-size: 17px;
  line-height: 1;
}
.branches {
  display: flex;
  gap: 8px;
  width: 100%;
}
.branches span {
  flex: 1;
  background: var(--ink);
  color: white;
  padding: 7px;
  text-align: center;
  border-radius: 4px;
}
.branches span:last-child {
  background: var(--orange);
}
.flow > span.flow-final {
  background: none;
  border: 1px dashed #85947f;
}
.experiment-card > p {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
  gap: 20px;
}
.strip > div {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding-left: 10px;
}
.strip > div:last-child {
  border: 0;
}
.strip strong {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -1px;
}
.strip span {
  font-size: 11px;
  color: var(--muted);
}
section#overview,
section#explore,
section#method {
  padding-top: 65px;
}
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
h2 {
  font-size: 30px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  font-weight: 500;
  margin: 13px 0 20px;
}
.eyebrow {
  color: var(--green);
  margin: 0;
}
select,
input[type="search"] {
  border: 1px solid #bdc7bb;
  background: var(--white);
  color: var(--ink);
  border-radius: 5px;
  padding: 10px;
  font-size: 12px;
  max-width: 100%;
}
.metric-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  margin-bottom: 20px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.tiny {
  font-size: 11px;
  line-height: 1.7;
}
.scorecards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.scorecard {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 22px;
}
.scorecard .method-name {
  font-size: 14px;
  font-weight: bold;
}
.scorecard .number {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -2px;
  margin: 12px 0 6px;
  line-height: 1.2;
}
.scorecard .bar {
  height: 5px;
  border-radius: 4px;
  background: #e8ece2;
  margin: 14px 0;
}
.scorecard .bar > i {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 4px;
}
.scorecard p {
  margin: 4px 0;
  font-size: 11px;
  color: var(--muted);
}
.finding {
  padding: 16px 20px;
  background: #e7ece0;
  border-left: 3px solid var(--green);
  font-size: 13px;
  margin-top: 20px;
}
.runtime {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 40px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
#timings {
  display: flex;
  gap: 35px;
  margin-top: 13px;
}
#timings strong {
  font-size: 24px;
  font-weight: 500;
}
#timings span {
  display: block;
  font-size: 11px;
}
.cost {
  font-size: 34px;
  display: block;
  margin-top: 12px;
  font-weight: 500;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 12px;
  font-size: 10px;
  white-space: nowrap;
  margin-bottom: 24px;
}
.explorer {
  display: grid;
  grid-template-columns: 250px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}
.query-panel {
  border-right: 1px solid var(--line);
  padding: 18px;
  background: #edf0e6;
}
.query-panel label {
  font-size: 11px;
  display: block;
  margin-bottom: 5px;
}
.query-panel input,
.query-panel select {
  width: 100%;
  margin-bottom: 15px;
}
.query-list {
  max-height: 650px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.query-item {
  border: 1px solid transparent;
  background: transparent;
  padding: 12px 10px;
  text-align: left;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink);
  border-radius: 5px;
  cursor: pointer;
}
.query-item:hover {
  background: #e0e7d9;
}
.query-item.active {
  background: var(--white);
  border-color: #adbda8;
}
.query-item small {
  display: block;
  color: var(--green);
  font-family: monospace;
  margin-bottom: 3px;
}
.query-detail {
  min-width: 0;
}
.claim-header {
  padding: 25px;
  border-bottom: 1px solid var(--line);
}
h3 {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 500;
  margin: 12px 0;
}
.claim-header h3 {
  max-width: 720px;
}
.ranking-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  padding: 15px 22px;
  background: #f6f7f0;
}
.ranking-toolbar label {
  white-space: nowrap;
}
.rankings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.ranking-col {
  padding: 15px 12px;
  border-right: 1px solid var(--line);
}
.ranking-col:last-child {
  border: 0;
}
.ranking-col h4 {
  font-size: 12px;
  margin: 0;
}
.ranking-col > .muted {
  font-size: 10px;
  margin: 3px 0 13px;
}
.passage {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fafbf6;
  font-size: 11px;
}
.passage.relevant {
  border-color: #91b799;
  background: #e9f2e7;
}
.passage summary {
  cursor: pointer;
  list-style: none;
}
.passage summary::-webkit-details-marker {
  display: none;
}
.passage .rank {
  font:
    10px "Courier New",
    monospace;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.passage .title {
  display: block;
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.passage .badge {
  color: #28643b;
  font-weight: bold;
  font-size: 9px;
  display: block;
  margin-top: 8px;
}
.passage p {
  font-size: 11px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.passage .hint {
  color: var(--muted);
  font-size: 9px;
  margin-top: 9px;
  display: block;
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 30px;
}
.method-grid article > span {
  font:
    12px "Courier New",
    monospace;
  color: var(--orange);
  border-bottom: 1px solid var(--line);
  display: block;
  padding-bottom: 14px;
}
.method-grid p,
.limits p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
}
.limits {
  margin-top: 25px;
  padding: 22px;
  background: #eceee4;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.limits summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}
.method-links {
  display: flex;
  gap: 30px;
  font-size: 12px;
  margin: 25px 0;
}
.method-links a {
  text-underline-offset: 4px;
}
footer {
  margin-top: 45px;
  border-top: 1px solid var(--line);
  padding: 25px 0 35px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
@media (max-width: 1000px) {
  main {
    padding: 0 4%;
  }
  .hero {
    gap: 4%;
  }
  .explorer {
    grid-template-columns: 200px 1fr;
  }
  .ranking-col {
    padding: 10px 7px;
  }
  .header-meta {
    display: none;
  }
  .experiment-card {
    padding: 20px;
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .metric-control {
    width: 100%;
  }
}
@media (max-width: 700px) {
  header {
    height: 80px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 38px 0;
    gap: 30px;
  }
  h1 {
    font-size: 43px;
  }
  .experiment-card {
    transform: none;
  }
  .strip {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .strip > div:nth-child(2) {
    border: 0;
  }
  .scorecards {
    grid-template-columns: 1fr;
  }
  .scorecard .number {
    font-size: 40px;
  }
  .runtime {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .explorer {
    display: block;
  }
  .query-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .query-list {
    max-height: 190px;
  }
  .rankings {
    grid-template-columns: 1fr;
  }
  .ranking-col {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px;
  }
  .method-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .method-links {
    flex-direction: column;
    gap: 12px;
  }
  footer {
    gap: 15px;
    flex-direction: column;
  }
  .ranking-toolbar {
    flex-wrap: wrap;
  }
  h2 {
    font-size: 27px;
  }
  .hero-links {
    gap: 18px;
  }
  .claim-header {
    padding: 20px;
  }
  .pill {
    margin-bottom: 15px;
  }
  section#overview,
  section#explore,
  section#method {
    padding-top: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Four-method comparison; keep passage text readable on smaller screens. */
.scorecards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rankings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#timings {
  flex-wrap: wrap;
  gap: 20px;
}
.branches span:last-child {
  background: #4c65a2;
}
@media (max-width: 1100px) {
  .rankings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ranking-col {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 700px) {
  .scorecards,
  .rankings {
    grid-template-columns: 1fr;
  }
}
