:root {
  --ink: #171713;
  --paper: #f4f1e8;
  --soft: #e7e1d3;
  --orange: #ff5c35;
  --green: #b7dc38;
  --blue: #1d47d7;
  --muted: #6d6a61;
  --line: rgba(23, 23, 19, 0.18);
  font-family: "DM Sans", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -0.03em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}
nav { display: flex; gap: 28px; font-size: 14px; }
nav a:hover { color: var(--orange); }

.hero {
  min-height: 720px;
  padding: 80px max(4vw, calc((100vw - 1280px) / 2));
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -150px;
  top: 40px;
  border-radius: 50%;
  background: var(--green);
  filter: blur(1px);
  z-index: -1;
}
.eyebrow, .kicker { font-size: 12px; letter-spacing: .16em; font-weight: 700; }
h1, h2 {
  font-family: "Noto Serif SC", serif;
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
h1 { max-width: 920px; font-size: clamp(54px, 8vw, 110px); }
h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 680px; margin: 32px 0; font-size: 19px; line-height: 1.75; color: var(--muted); }

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 900px;
  background: white;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.search-box input { border: 0; outline: 0; min-width: 0; padding: 22px 24px; background: transparent; font-size: 17px; }
.search-box button {
  display: flex;
  gap: 28px;
  align-items: center;
  border: 0;
  border-left: 2px solid var(--ink);
  padding: 0 24px;
  background: var(--orange);
  font-weight: 700;
}
.search-box button:hover { background: var(--green); }
.examples { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; font-size: 12px; }
.examples span { color: var(--muted); }
.examples button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; background: transparent; }
.examples button:hover { border-color: var(--ink); }
.status { max-width: 900px; margin-top: 26px; color: var(--muted); }
.status.error { color: #a6221c; }
.results { max-width: 1040px; display: grid; gap: 14px; margin-top: 18px; }

.result-card {
  background: #fff;
  border: 1px solid var(--ink);
  padding: 22px;
  box-shadow: 4px 4px 0 var(--soft);
}
.result-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.result-title { margin: 0; font-size: 21px; line-height: 1.35; }
.result-id { color: var(--muted); font-size: 12px; margin-top: 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge { padding: 7px 10px; border: 1px solid var(--ink); font-size: 12px; font-weight: 700; }
.badge.jcr { background: #d9e3ff; }
.badge.cas { background: var(--green); }
.badge.xinrui { background: #ffd7cb; }
.badge.ccf { background: #ffe579; }
.badge.warning { color: white; background: #b1261e; }
.detail-button { border: 0; background: transparent; text-decoration: underline; white-space: nowrap; }
.detail { display: none; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.7; }
.detail.open { display: block; }
.category-list { margin: 8px 0 0; padding-left: 20px; }

.systems, .api-section, .about {
  display: grid;
  grid-template-columns: 80px minmax(240px, .85fr) 1.15fr;
  gap: 4vw;
  padding: 96px 4vw;
  border-top: 1px solid var(--line);
}
.section-number { color: var(--muted); font-size: 12px; }
h2 { font-size: clamp(36px, 5vw, 70px); }
.system-list { border-top: 2px solid var(--ink); }
.system-list article { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.system-list b { font-size: 20px; }
.system-list span, .api-copy > p, .about > p { color: var(--muted); line-height: 1.7; }
.api-section { background: var(--ink); color: var(--paper); }
.api-section .section-number, .api-section .api-copy > p { color: #aaa99f; }
.code-card { align-self: center; background: #24241f; border: 1px solid #4b4a43; }
.code-tabs { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #4b4a43; font-size: 12px; }
.live-dot { color: var(--green); }
.code-card pre { padding: 28px 20px; overflow-x: auto; color: #f7e7a4; line-height: 1.7; }
.code-card button { width: 100%; padding: 15px; border: 0; background: var(--green); font-weight: 700; }
.about > p { align-self: end; max-width: 600px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px 4vw; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 780px) {
  nav { gap: 14px; }
  .hero { padding-top: 58px; min-height: 640px; }
  .hero::after { width: 250px; height: 250px; right: -120px; }
  .search-box { grid-template-columns: 1fr; }
  .search-box button { border-left: 0; border-top: 2px solid var(--ink); justify-content: space-between; padding: 16px 20px; }
  .systems, .api-section, .about { grid-template-columns: 1fr; padding: 70px 5vw; }
  .section-number { margin-bottom: -20px; }
  footer { flex-direction: column; }
}
