:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5c6678;
  --line: #dce2ea;
  --paper: #ffffff;
  --soft: #f7f9fb;
  --soft-blue: #f2f7fc;
  --red: #c9363f;
  --teal: #178f9a;
  --blue: #2869c8;
  --gold: #d69c15;
  --shadow: 0 10px 28px rgba(22, 34, 51, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f9fbfd 0, #ffffff 360px),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: #1f5fae;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

main {
  width: 100%;
}

.hero,
.section,
footer {
  margin: 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}

.hero {
  max-width: 1220px;
  padding-top: 54px;
  text-align: center;
}

.venue {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  margin: 0 auto 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.35rem;
  font-weight: 650;
  line-height: 1.14;
}

h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.25;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.authors,
.affiliations,
.note {
  max-width: 920px;
  margin: 0 auto;
  color: var(--muted);
}

.authors {
  color: #263244;
  font-size: 1.02rem;
}

.affiliations {
  margin-top: 8px;
  font-size: 0.92rem;
}

.note {
  margin-top: 5px;
  font-size: 0.85rem;
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 24px auto 34px;
}

.top-resource-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 860px);
  gap: 12px;
}

.resource-row.left {
  justify-content: flex-start;
  margin: 18px 0 0;
}

.pill,
.copy-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(28, 41, 57, 0.15);
  border-radius: 999px;
  padding: 7px 14px;
  color: #152033;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(22, 34, 51, 0.05);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  white-space: normal;
}

.top-resource-row .pill {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px;
  box-shadow: 0 1px 2px rgba(22, 34, 51, 0.04);
}

.brand-icon,
.resource-row.left .pill::before {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  color: currentColor;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.brand-icon {
  fill: currentColor;
}

.text-icon {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.top-resource-row .text-icon {
  border: 1px solid currentColor;
  font-size: 0.5rem;
  letter-spacing: 0;
}

.button-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
  text-align: center;
}

.button-title,
.button-source {
  overflow-wrap: anywhere;
}

.button-source {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.resource-row.left .pill.paper::before {
  content: "DOI";
  color: #fff;
  background: var(--red);
}

.pill.publication {
  position: relative;
  justify-content: center;
  padding-right: 14px;
  padding-left: 14px;
}

.pill.publication .brand-icon {
  position: absolute;
  left: 14px;
}

.pill.publication .button-copy {
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

.pill.springer {
  color: #102f3f;
  border-color: #9ec6d5;
  background: linear-gradient(180deg, #ffffff, #f2f8fb);
}

.pill.springer .brand-icon {
  color: #ffffff;
  border-color: #007c92;
  background: #007c92;
}

.pill.springer .button-source {
  color: #007c92;
}

.pill.sage {
  color: #2d2038;
  border-color: #c7b8d9;
  background: linear-gradient(180deg, #ffffff, #f8f5fb);
}

.pill.sage .brand-icon {
  color: #ffffff;
  border-color: #5b2b7f;
  background: #5b2b7f;
}

.pill.sage .button-source {
  color: #5b2b7f;
}

.pill.code {
  color: #0f1720;
  border-color: #c7cdd5;
  background: linear-gradient(180deg, #ffffff, #f7f8fa);
}

.resource-row.left .pill.code::before,
.resource-row.left .pill.data::before {
  color: #fff;
  background: #252a33;
}

.pill.code .brand-icon {
  color: #111820;
}

.resource-row.left .pill.code::before,
.resource-row.left .pill.data::before {
  content: "GH";
}

.pill.docs {
  color: #133f87;
  border-color: #b8cff6;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
}

.resource-row.left .pill.docs::before {
  color: #fff;
  background: var(--blue);
}

.pill.docs .brand-icon {
  color: #2869c8;
}

.resource-row.left .pill.docs::before {
  content: "D";
}

.pill.scischema {
  color: #111111;
  border-color: #d78f8f;
  background: linear-gradient(180deg, #ffffff, #fff8f8);
}

.pill.scischema .brand-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
}

.logo-icon {
  object-fit: cover;
  padding: 1px;
}

.pill:hover,
.copy-button:hover,
.table-card:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 41, 57, 0.24);
  box-shadow: 0 7px 18px rgba(22, 34, 51, 0.1);
}

figure {
  margin: 0;
}

figcaption {
  max-width: 880px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.caption-stage {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-figure {
  max-width: 1160px;
  margin: 0 auto;
}

.main-figure img,
.grounding-figures img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.main-figure img {
  padding: 18px;
}

.section {
  padding-top: 66px;
}

#tutorials {
  margin-top: 66px;
  padding: 54px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.narrow {
  max-width: 860px;
}

.wide {
  max-width: 1080px;
}

.section-copy {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-copy h3 {
  color: #243044;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: none;
}

.section-copy code,
h2 code {
  font-size: 0.88em;
}

.section p:first-child,
.section-copy p:first-child {
  margin-top: 0;
}

.table-card,
.finding-card,
.contact-box,
.tutorial-card,
.env-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 18px rgba(22, 34, 51, 0.06);
}

.workflow-tutorials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto 34px;
}

.tutorial-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  padding: 18px;
  border-top: 4px solid var(--teal);
}

.tutorial-card h3 {
  margin: 2px 0 10px;
  font-size: 1rem;
}

.tutorial-card p {
  margin: 0 0 10px;
  color: #3d4859;
  font-size: 0.92rem;
  line-height: 1.5;
}

.tutorial-provider {
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tutorial-meta {
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.tutorial-card a {
  margin-top: auto;
  font-weight: 750;
}

.tutorial-card-hf {
  border-top-color: #f0b429;
}

.tutorial-card-hf .tutorial-provider {
  color: #9a6400;
}

.tutorial-card-saia {
  border-top-color: #1a6fb3;
}

.tutorial-card-saia .tutorial-provider {
  color: #155a91;
}

.tutorial-card-openrouter {
  border-top-color: #5b5fef;
}

.tutorial-card-openrouter .tutorial-provider {
  color: #4045c9;
}

.workflow-data-note {
  max-width: 980px;
  margin: 0 auto 28px;
  border-left: 3px solid var(--teal);
  padding: 12px 16px;
  color: #3d4859;
  background: #f7fbfc;
  font-size: 0.92rem;
}

.workflow-data-note code {
  border: 1px solid rgba(28, 41, 57, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  color: #263244;
  background: #ffffff;
  font-size: 0.86em;
}

.workflow-context {
  max-width: 980px;
  margin: 0 auto 28px;
  border-left: 3px solid var(--teal);
  padding: 14px 18px;
  background: #f7fbfc;
}

.workflow-context h3 {
  margin: 0 0 8px;
  color: #293449;
  font-size: 1rem;
}

.workflow-context p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.workflow-context p:last-child {
  margin-bottom: 0;
}

.workflow-context ol {
  margin: 0 0 10px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.workflow-context li {
  margin-bottom: 5px;
}

.workflow-context code {
  border: 1px solid rgba(28, 41, 57, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  color: #263244;
  background: #ffffff;
  font-size: 0.86em;
}

.env-panel {
  max-width: 980px;
  margin: 36px auto 0;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.env-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.env-heading h3 {
  margin: 3px 0 0;
  color: #263244;
  font-size: 1.24rem;
}

.env-example-link {
  flex: 0 0 auto;
  border: 1px solid rgba(40, 105, 200, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  background: #f5f9ff;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.env-panel p {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.93rem;
}

.env-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.env-snippet {
  margin: 0;
  border-color: #d4dbe6;
  padding: 14px;
  color: #253044;
  background: #f7f9fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.env-stage-notes {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
  font-size: 0.9rem;
}

.env-stage-notes dt {
  color: #293449;
  font-weight: 750;
}

.env-stage-notes dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.env-stage-notes code,
.workflow-command code {
  font-size: 0.86em;
}

.workflow-steps {
  border-top: 1px solid var(--line);
}

.workflow-steps-text {
  max-width: 860px;
  margin: 0 auto;
}

.workflow-step {
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}

.workflow-step-heading {
  margin-bottom: 18px;
}

.workflow-step-heading h3 {
  margin: 3px 0 0;
  font-size: 1.35rem;
}

.stage-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workflow-step-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.workflow-summary {
  max-width: none;
}

.workflow-steps-text .workflow-summary {
  max-width: 860px;
}

.workflow-step-grounding .grounding-figures {
  width: min(1080px, calc(100vw - 64px));
  margin-right: calc((860px - min(1080px, calc(100vw - 64px))) / 2);
  margin-left: calc((860px - min(1080px, calc(100vw - 64px))) / 2);
}

.workflow-summary p {
  margin: 0 0 13px;
}

.workflow-details {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
  font-size: 0.92rem;
}

.workflow-details dt {
  color: #293449;
  font-weight: 750;
}

.workflow-details dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.usage-scenarios {
  display: grid;
  gap: 14px;
}

.command-scenario {
  display: grid;
  gap: 6px;
}

.scenario-title {
  margin: 0;
  color: #293449;
  font-size: 0.9rem;
  font-weight: 750;
}

.scenario-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-example {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fbfd;
}

.file-example p {
  margin: 0 0 8px;
  color: #293449;
  font-size: 0.9rem;
}

.file-example pre {
  margin: 0;
  border-color: #d4dbe6;
  padding: 10px;
  color: #253044;
  background: #ffffff;
  font-size: 0.78rem;
  line-height: 1.5;
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1rem;
}

.file-list li {
  padding-left: 2px;
}

.workflow-details code,
.env-stage-notes code,
.env-panel p code {
  border: 1px solid rgba(28, 41, 57, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  color: #263244;
  background: #f6f8fb;
  font-size: 0.86em;
}

.workflow-step .example {
  border-left: 3px solid #8aa4c6;
  padding-left: 11px;
  color: #3d4859;
  font-size: 0.92rem;
}

.workflow-step a {
  font-weight: 700;
}

.workflow-command {
  margin: 4px 0 0;
  border-color: #1f314a;
  padding: 12px;
  background: #111a28;
  font-size: 0.78rem;
  line-height: 1.55;
}

.grounding-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}

.example-output-figures {
  display: grid;
  gap: 24px;
}

.example-output-figure {
  max-width: 1120px;
  margin: 0 auto;
}

.example-output-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: stretch;
}

.table-card,
.finding-card {
  padding: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

caption {
  margin-bottom: 12px;
  color: #293449;
  font-weight: 750;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: #3a4658;
  background: var(--soft-blue);
  font-size: 0.83rem;
  text-transform: uppercase;
}

td:last-child,
th:last-child,
td:nth-last-child(2),
th:nth-last-child(2) {
  text-align: right;
}

.metric-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.finding-card {
  background: linear-gradient(180deg, #ffffff, #f6fbfa);
}

.resource-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 22px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.contact-box {
  padding: 18px;
  background: #fcfdf8;
}

.contact-box p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.citation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.copy-button {
  cursor: pointer;
  font-family: inherit;
}

pre {
  margin: 16px 0 0;
  border: 1px solid #243043;
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
  color: #e7edf7;
  background: #101827;
  font-size: 0.86rem;
  line-height: 1.55;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.citation-links {
  color: var(--muted);
  font-size: 0.92rem;
}

footer {
  max-width: 860px;
  padding-top: 52px;
  padding-bottom: 42px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

footer p {
  margin: 0 0 8px;
}

@media (max-width: 800px) {
  .hero {
    padding-top: 34px;
  }

  .top-resource-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .hero,
  .section,
  footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .main-figure img {
    padding: 10px;
  }

  .grounding-figures,
  .workflow-tutorials,
  .workflow-step-body,
  .results-layout,
  .resource-panel {
    grid-template-columns: 1fr;
  }

  .workflow-step-grounding .grounding-figures {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .env-layout,
  .env-stage-notes,
  .workflow-details {
    grid-template-columns: 1fr;
  }

  .env-heading {
    flex-direction: column;
  }

  .citation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  td:last-child,
  th:last-child,
  td:nth-last-child(2),
  th:nth-last-child(2) {
    text-align: left;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .resource-row {
    justify-content: stretch;
  }

  .top-resource-row {
    grid-template-columns: 1fr;
  }

  .pill,
  .copy-button {
    width: 100%;
  }

  pre {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pill,
  .copy-button,
  .table-card {
    transition: none;
  }

  .pill:hover,
  .copy-button:hover,
  .table-card:hover {
    transform: none;
  }
}
