:root {
  color-scheme: light;
  --ink: #18201b;
  --muted: #68716b;
  --line: #dfe5e1;
  --soft: #f5f7f5;
  --paper: #ffffff;
  --green: #11684d;
  --green-soft: #e6f4ee;
  --orange: #b6541b;
  --orange-soft: #fff1e7;
  --blue: #2459a9;
  --blue-soft: #eaf1fd;
  --red: #b53a38;
  --code: #17201c;
  --shadow: 0 18px 50px rgb(24 32 27 / 8%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
a {
  color: inherit;
}
code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
code {
  font-size: 0.88em;
}

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgb(223 229 225 / 85%);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: white;
  background: var(--green);
  box-shadow: 0 7px 18px rgb(17 104 77 / 22%);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.version {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 700;
}
.quiet-link {
  color: var(--muted);
  text-decoration: none;
}
.quiet-link:hover {
  color: var(--ink);
}
.button {
  color: white;
  background: var(--ink);
  border-radius: 9px;
  text-decoration: none;
  font-weight: 680;
}
.button-small {
  padding: 9px 13px;
}

.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 68px;
}
.sidebar {
  position: fixed;
  inset: 68px auto 0 0;
  width: 248px;
  overflow-y: auto;
  padding: 34px 24px;
  border-right: 1px solid var(--line);
  background: #fafbfa;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  margin: 22px 10px 8px;
  color: #98a19b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-label:first-child {
  margin-top: 0;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #5d6861;
  font-size: 13px;
  text-decoration: none;
}
.sidebar a:hover,
.sidebar a.active {
  color: var(--ink);
  background: #edf1ee;
}
.method {
  display: inline-flex;
  min-width: 35px;
  justify-content: center;
  font-size: 9px;
  line-height: 18px;
  font-weight: 850;
  border-radius: 5px;
  letter-spacing: 0.03em;
}
.method.post {
  color: var(--green);
  background: var(--green-soft);
}
.method.put {
  color: var(--orange);
  background: var(--orange-soft);
}
.method.get {
  color: var(--blue);
  background: var(--blue-soft);
}
.method.large {
  min-width: 56px;
  line-height: 27px;
  font-size: 11px;
}

main {
  grid-column: 2;
  min-width: 0;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 68px 64px 40px;
}
section {
  margin: 0 0 96px;
}
.hero {
  margin-bottom: 112px;
}
.eyebrow,
.kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px var(--green-soft);
}
h1 {
  max-width: 880px;
  margin: 20px 0 22px;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.047em;
}
.hero-copy {
  max-width: 780px;
  margin: 0 0 30px;
  color: #4d5952;
  font-size: 19px;
  line-height: 1.75;
}
.notice {
  margin: 26px 0;
  padding: 16px 18px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
}
.notice.warning {
  color: #713915;
  border-color: #f0d7c4;
  background: #fff8f2;
}
.notice.info {
  color: #234a79;
  border-color: #ccdcf3;
  background: #f4f8fe;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}
.principles article {
  position: relative;
  min-height: 188px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfb;
}
.principles h3 {
  margin: 38px 0 8px;
  font-size: 17px;
}
.principles p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.principle-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: #ccd3ce;
  font-family: Georgia, serif;
  font-size: 26px;
  font-style: italic;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
}
.section-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #8a948d;
  font-size: 11px;
  font-weight: 800;
}
.section-heading .kicker {
  margin: 1px 0 6px;
  font-size: 10px;
}
h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.body-copy {
  color: #556159;
  font-size: 15px;
  line-height: 1.8;
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 11px;
  margin: 28px 0;
}
.flow-step {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.flow-step b {
  width: 24px;
  margin-bottom: 17px;
  border-bottom: 2px solid var(--green);
  color: var(--green);
  font-size: 12px;
}
.flow-step span {
  font-size: 14px;
  font-weight: 750;
}
.flow-step small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.flow-arrow {
  color: #b9c2bc;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.panel p {
  min-height: 46px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.panel pre {
  margin: 0;
  padding: 13px;
  overflow-x: auto;
  border-radius: 8px;
  color: #d9e7df;
  background: var(--code);
  font-size: 11px;
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.status-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #5a655e;
  font-size: 11px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-dot.amber {
  background: #d98e28;
}
.status-dot.green {
  background: #279a70;
}
.status-dot.red {
  background: #cf4c48;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.result-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfb;
}
.result-card.needs-more {
  border-top: 3px solid #d98e28;
}
.result-card.ready {
  border-top: 3px solid #279a70;
}
.result-card.urgent {
  border-top: 3px solid #cf4c48;
}
.result-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 18px 0;
  font-size: 12px;
  font-weight: 760;
}
.result-card > p {
  min-height: 98px;
  margin: 0;
  padding: 13px 18px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.result-card pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #dce8e0;
  background: var(--code);
  font-size: 9px;
  line-height: 1.7;
}

.endpoint {
  padding-top: 6px;
}
.endpoint-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.endpoint-title h2 {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 23px;
  letter-spacing: -0.035em;
}
.endpoint > p {
  margin: 17px 0 23px;
  color: var(--muted);
  font-size: 14px;
}
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.code-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #25302a;
  border-radius: 13px;
  background: var(--code);
  box-shadow: var(--shadow);
}
.code-card.compact {
  max-width: 720px;
}
.response-card {
  margin-top: 12px;
}
.code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #303b35;
  color: #9daca3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.copy {
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  color: #bdc8c1;
  background: #2d3932;
  cursor: pointer;
  font: inherit;
}
.copy:hover {
  color: white;
}
.code-card pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  color: #dce8e0;
  font-size: 11px;
  line-height: 1.75;
  tab-size: 2;
}

.schema-title {
  margin: 32px 0 12px;
  font-size: 16px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  color: #78827c;
  background: #f7f9f7;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}
th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td {
  color: #566159;
  line-height: 1.55;
}
td:first-child {
  color: var(--ink);
}
.schema-link {
  color: var(--muted);
  font-size: 12px;
}
.schema-link a {
  color: var(--green);
}

.decision-list {
  margin: 20px 0;
  padding-left: 22px;
  color: #566159;
  font-size: 14px;
  line-height: 1.8;
}
.decision-list li {
  padding: 5px 0 5px 7px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: #8a948d;
  font-size: 11px;
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  main {
    grid-column: 1;
    padding: 54px 28px 36px;
  }
  .principles,
  .code-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
  .principles article {
    min-height: 150px;
  }
  .result-card > p {
    min-height: auto;
  }
  .flow {
    grid-template-columns: 1fr 1fr;
  }
  .flow-arrow {
    display: none;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .layout {
    padding-top: 60px;
  }
  .topbar-actions .version,
  .quiet-link {
    display: none;
  }
  main {
    padding: 44px 18px 28px;
  }
  section {
    margin-bottom: 72px;
  }
  h1 {
    font-size: 40px;
  }
  .hero-copy {
    font-size: 16px;
  }
  .two-columns,
  .flow {
    grid-template-columns: 1fr;
  }
  .flow-step {
    min-height: 110px;
  }
  .endpoint-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .endpoint-title h2 {
    font-size: 17px;
    overflow-wrap: anywhere;
  }
  .code-card pre {
    padding: 16px;
    font-size: 10px;
  }
  footer {
    flex-direction: column;
    gap: 8px;
  }
}
