:root {
  --ink: #16221c;
  --muted: #657168;
  --paper: #f5f4ed;
  --surface: #fffef9;
  --line: #d9ded6;
  --green: #0b6245;
  --green-deep: #084b36;
  --lime: #c8f169;
  --lime-soft: #ecf7d3;
  --orange: #ed7444;
  --shadow: 0 24px 70px rgba(27, 47, 37, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 4%, rgba(200, 241, 105, 0.22), transparent 25rem),
    var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(22, 34, 28, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 12px 12px 12px 4px;
  font: 800 20px/1 Georgia, serif;
  box-shadow: 7px 7px 0 var(--lime);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .18em; }

.system-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b6beb8;
  box-shadow: 0 0 0 4px rgba(182, 190, 184, 0.2);
}

.system-chip.ready .status-dot { background: #2ca36f; box-shadow: 0 0 0 4px rgba(44, 163, 111, .14); }
.system-chip.warning .status-dot { background: #e5a52e; box-shadow: 0 0 0 4px rgba(229, 165, 46, .14); }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, .8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  padding: 70px 0 84px;
}

.eyebrow, .section-kicker {
  margin: 0 0 22px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 26px; height: 2px; background: var(--orange); }

h1 {
  margin: 0;
  max-width: 720px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(56px, 7vw, 94px);
  line-height: .98;
  letter-spacing: -.06em;
  font-weight: 600;
}

h1 em { color: var(--green); font-style: normal; position: relative; }
h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.03em;
  right: -.08em;
  bottom: .03em;
  height: .18em;
  border-radius: 99px;
  background: var(--lime);
  transform: rotate(-1.5deg);
}

.hero-description {
  max-width: 650px;
  margin: 30px 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  max-width: 740px;
  padding: 8px 8px 8px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(24, 50, 36, .09);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.search-box:focus-within {
  border-color: rgba(11, 98, 69, .55);
  box-shadow: 0 18px 54px rgba(24, 50, 36, .15);
  transform: translateY(-1px);
}

.search-symbol {
  width: 17px;
  height: 17px;
  border: 2px solid var(--green);
  border-radius: 50%;
  position: relative;
}

.search-symbol::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  background: var(--green);
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 13px 6px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder { color: #9aa29c; }

.search-box button {
  min-width: 126px;
  padding: 14px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background .2s, transform .2s;
}

.search-box button:hover { background: var(--green-deep); transform: translateY(-1px); }
.search-box button:disabled { cursor: wait; opacity: .7; transform: none; }
.button-arrow { font-size: 18px; transition: transform .2s; }
.search-box button:hover .button-arrow { transform: translateX(3px); }

.search-feedback {
  min-height: 20px;
  margin: 11px 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.search-feedback.error { color: #b54236; }

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.examples button {
  padding: 7px 11px;
  color: #526057;
  background: transparent;
  border: 1px solid #d4dad3;
  border-radius: 999px;
  cursor: pointer;
}

.examples button:hover { color: var(--green); border-color: var(--green); background: white; }

.data-card {
  position: relative;
  padding: 28px;
  overflow: hidden;
  color: white;
  background: var(--green);
  border-radius: 28px 28px 28px 8px;
  box-shadow: var(--shadow);
}

.data-card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -130px;
  top: -120px;
  border: 56px solid rgba(200, 241, 105, .11);
  border-radius: 50%;
}

.data-card-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.data-card-head p { margin: 0 0 7px; color: rgba(255,255,255,.58); font-size: 10px; letter-spacing: .18em; }
.data-card-head h2 { margin: 0; font: 600 25px/1.2 Georgia, "Songti SC", serif; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: .12em;
}
.live-badge i { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; }

.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 32px 0 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  border-left: 1px solid rgba(255,255,255,.16);
}

.stats-grid div { padding: 20px 16px; border-right: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.stats-grid dt { color: rgba(255,255,255,.62); font-size: 11px; }
.stats-grid dd { margin: 8px 0 0; color: var(--lime); font: 600 32px/1 Georgia, serif; }
.stats-grid dd small { font-size: 15px; }

.pipeline { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.75); font-size: 11px; }
.pipeline span { padding: 7px 8px; background: rgba(255,255,255,.08); border-radius: 6px; }
.pipeline b { color: var(--lime); }
.model-note { margin: 16px 0 0; color: rgba(255,255,255,.5); font-size: 10px; line-height: 1.5; word-break: break-all; }

.answer-section, .results-section, .principles { padding: 86px 0; border-top: 1px solid rgba(22,34,28,.12); }
.answer-section[hidden], .results-section[hidden] { display: none; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading.compact { max-width: 750px; }
.section-kicker { margin-bottom: 10px; }
.section-heading h2 { margin: 0; font: 600 clamp(30px, 4vw, 48px)/1.15 Georgia, "Songti SC", serif; letter-spacing: -.03em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.evidence-heading-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.evidence-heading-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.evidence-toggle { padding: 9px 13px; color: var(--green); background: var(--lime-soft); border: 1px solid #c8d8be; border-radius: 9px; cursor: pointer; font-weight: 700; }
.result-list[hidden] { display: none; }

.answer-card {
  padding: clamp(24px, 4vw, 42px);
  background: var(--green);
  border-radius: 24px 24px 24px 8px;
  box-shadow: var(--shadow);
}
.answer-text { margin: 0; color: white; font-size: 17px; line-height: 1.95; white-space: pre-wrap; }
.answer-notice { margin: 22px 0 0; padding-top: 18px; color: rgba(255,255,255,.62); border-top: 1px solid rgba(255,255,255,.16); font-size: 11px; line-height: 1.7; }

.result-list { display: grid; gap: 14px; }
.result-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 22px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.result-card:hover { transform: translateY(-2px); border-color: #bbc8bf; box-shadow: 0 14px 32px rgba(24,50,36,.07); }
.result-card.temporal-warning { border-color: rgba(237,116,68,.52); }
.result-rank { width: 40px; height: 40px; display: grid; place-items: center; background: var(--lime-soft); border-radius: 12px 12px 12px 4px; color: var(--green); font: 700 14px/1 Georgia, serif; }
.result-body h3 { margin: 0; font-size: 17px; line-height: 1.5; }
.result-body h3 a { color: var(--ink); text-decoration: none; }
.result-body h3 a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 13px; color: var(--muted); font-size: 11px; }
.result-excerpt { margin: 0; color: #4f5b53; font-size: 13px; line-height: 1.8; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.result-actions a, .primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--green);
  background: var(--lime-soft);
  border: 1px solid #c8d8be;
  border-radius: 9px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.result-actions a:last-child { color: #fff; background: var(--green); border-color: var(--green); }
.temporal-warning-text { margin: 0 0 12px; padding: 10px 12px; color: #8f3e24; background: #fff0e9; border-radius: 9px; font-size: 12px; line-height: 1.7; }
.score { align-self: start; min-width: 88px; padding: 8px 10px; color: var(--green); background: var(--lime-soft); border-radius: 999px; text-align: center; font-size: 11px; font-weight: 700; }
.empty-state { padding: 52px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #c9cfc9; border-radius: 18px; }

.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.principle-grid article { min-height: 220px; padding: 28px; background: rgba(255,254,249,.65); border: 1px solid var(--line); border-radius: 20px; }
.step-number { color: var(--orange); font: 700 13px/1 Georgia, serif; }
.principle-grid h3 { margin: 42px 0 12px; font-size: 18px; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px 0 40px; color: var(--muted); border-top: 1px solid rgba(22,34,28,.12); font-size: 11px; }
footer p { margin: 0; }

.document-page { background: var(--bg); }
.document-shell { width: min(100% - 32px, 900px); margin: 0 auto; padding: 34px 0 80px; }
.document-nav a { color: var(--green); text-decoration: none; font-size: 13px; font-weight: 700; }
.document-header { margin-top: 30px; padding: clamp(24px, 5vw, 48px); color: white; background: var(--green); border-radius: 26px 26px 26px 8px; }
.document-header h1 { max-width: none; margin: 12px 0 28px; font-size: clamp(30px, 5vw, 52px); line-height: 1.25; }
.document-metadata { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.document-metadata div { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); }
.document-metadata dt { color: rgba(255,255,255,.58); font-size: 11px; }
.document-metadata dd { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.document-actions .primary-link { color: var(--green); background: var(--lime); border-color: var(--lime); }
.document-actions span { color: rgba(255,255,255,.62); font-size: 11px; }
.document-content { margin-top: 24px; padding: clamp(24px, 5vw, 52px); color: #344139; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; font: 15px/2 "Noto Serif SC", "Songti SC", serif; white-space: pre-wrap; overflow-wrap: anywhere; }

.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: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 50px; padding: 60px 0 70px; }
  .data-card { max-width: 620px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 0; }
  .principle-grid h3 { margin-top: 24px; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  .system-chip { max-width: 160px; padding: 8px 10px; font-size: 10px; }
  .brand small { display: none; }
  .hero { padding-top: 46px; }
  h1 { font-size: clamp(48px, 16vw, 68px); }
  .hero-description { font-size: 15px; }
  .search-box { grid-template-columns: 20px 1fr; padding: 9px 12px 9px 16px; }
  .search-box button { grid-column: 1 / -1; width: 100%; }
  .examples span { flex-basis: 100%; }
  .data-card { padding: 22px; }
  .pipeline { align-items: stretch; }
  .pipeline span { flex: 1; text-align: center; }
  .result-card { grid-template-columns: 40px 1fr; gap: 14px; padding: 18px; }
  .score { grid-column: 2; grid-row: 2; justify-self: start; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .answer-section, .results-section, .principles { padding: 64px 0; }
  footer { flex-direction: column; gap: 10px; }
  .document-metadata { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
