:root {
  color-scheme: light;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1b292a;
  background: #f5f7f5;
  --ink: #1b292a;
  --muted: #526461;
  --line: #dce5df;
  --green: #17614d;
  --mint: #d7f5e5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
figure, h1, h2, h3, h4, p { margin: 0; }
a { color: var(--green); text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible, audio:focus-visible, video:focus-visible {
  outline: 3px solid #258a6d;
  outline-offset: 4px;
}

.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 750;
  white-space: nowrap;
}
.brand svg { flex: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.button-outline { border-color: #cddbd3; color: #215647; }
.button-outline:hover { background: #edf7f0; }
.button-accent { background: #c7f4db; color: #143b31; }
.button-accent:hover { background: #e2faec; }

.hero {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 340px;
  overflow: hidden;
  border-radius: 19px;
  background: #122926;
  color: #f7fbf9;
}
.hero-copy { padding: clamp(27px, 4.7vw, 56px); align-self: center; }
.eyebrow, .section-kicker {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
}
.eyebrow { color: #a3e8c6; }
.hero h1 {
  margin-block: 12px 16px;
  font-size: clamp(39px, 5.45vw, 68px);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -.045em;
}
.hero-description { max-width: 30em; color: #d2e5db; font-size: 15px; }
.hero-figure { position: relative; min-height: 100%; }
.hero-figure img {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.hero-figure figcaption {
  position: absolute;
  bottom: 16px;
  right: 16px;
  max-width: calc(100% - 32px);
  padding: 5px 10px;
  color: #fff;
  background: #101c20e8;
  border-radius: 6px;
  font-size: 12px;
}

.experiment-section { margin-top: 34px; scroll-margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 23px; }
.hero-link { color: var(--mint); font-size: 13px; font-weight: 650; }
.section-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 7px 20px;
  margin-bottom: 16px;
}
.section-kicker { color: var(--green); }
.section-intro h2 { margin-top: 3px; font-size: clamp(24px, 3vw, 31px); line-height: 1.2; }
.section-intro > p, .page-note { color: var(--muted); font-size: 13px; }
.page-note { margin-bottom: 12px; }
.experiment-layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.case-nav { display: grid; min-width: 0; gap: 14px; }
.case-group { min-width: 0; }
.case-group-title { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.case-list { display: grid; gap: 8px; }
.case-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.case-link:hover { border-color: #8caea1; }
.case-link[aria-current="true"] { border-color: #70ad96; background: #e8f6ee; }
.case-index { font-size: 12px; font-weight: 750; color: var(--green); padding-top: 2px; }
.case-name { display: block; font-size: 14px; font-weight: 720; line-height: 1.45; }
.case-route { display: block; margin-top: 3px; font-size: 11px; line-height: 1.35; color: var(--muted); }

.case-panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.case-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; padding: 18px 22px 16px; border-bottom: 1px solid var(--line); }
.case-json { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; font-size: 13px; font-weight: 650; }
.case-heading h3 { font-size: clamp(22px, 3vw, 29px); line-height: 1.25; margin-top: 5px; }
.modalities { color: var(--muted); font-size: 13px; margin-top: 5px; }
.case-content {
  display: grid;
  grid-template-columns: minmax(180px, .78fr) minmax(0, 1.65fr);
}
.input-column, .output-column { min-width: 0; padding: 18px 22px 22px; }
.input-column { background: #fafbf9; border-right: 1px solid var(--line); }
.case-content h4 { font-size: 15px; font-weight: 760; }
.small-label { margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 650; }
.prompt, .response { margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.prompt { color: #2d403b; }
.response { color: #233234; }
.input-media, .output-media { display: grid; gap: 10px; }
.output-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.input-media:not(:empty), .output-media:not(:empty) { margin-top: 16px; }
.media {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fbf9;
}
.output-media .media-audio, .output-media .media:only-child { grid-column: 1 / -1; }
.media figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 650;
}
.media img, .media video {
  display: block;
  width: 100%;
  aspect-ratio: 1.52;
  object-fit: contain;
  background: #142220;
}
.input-media img { aspect-ratio: 1.25; object-fit: cover; }
.media audio { width: 100%; min-width: 0; display: block; }
.media-audio audio { padding: 3px 7px 7px; }
.media-link { font-weight: 600; }

.record { padding: 13px 22px; border-top: 1px solid var(--line); }
.record summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #26594a; }
.record dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  margin: 12px 0 10px;
}
.record dt { color: var(--muted); font-size: 11px; }
.record dd { margin: 1px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.record > p { color: var(--muted); font-size: 12px; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-block: 27px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .experiment-layout { grid-template-columns: minmax(150px, 185px) minmax(0, 1fr); gap: 12px; }
  .case-content { grid-template-columns: 1fr; }
  .input-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .input-media { max-width: 345px; }
}

@media (max-width: 590px) {
  .shell { width: calc(100% - 24px); }
  .header-row { min-height: 60px; }
  .hero { margin-top: 14px; grid-template-columns: 1fr; border-radius: 13px; }
  .hero-copy { padding: 22px; }
  .hero-figure { min-height: 182px; }
  .experiment-section { margin-top: 24px; }
  .experiment-layout { grid-template-columns: minmax(0, 1fr); }
  .case-nav { gap: 6px; }
  .case-list { display: flex; gap: 6px; overflow-x: auto; padding: 4px 4px 8px; }
  .case-link { flex: 0 0 158px; grid-template-columns: 22px minmax(0, 1fr); padding: 8px; }
  .case-heading, .input-column, .output-column, .record { padding-inline: 14px; }
  .output-media { grid-template-columns: 1fr; }
}
