:root {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-strong: #f0f5f8;
  --ink: #1f2933;
  --muted: #64707d;
  --line: #d8ddd7;
  --brand: #0f6f63;
  --brand-dark: #0a5149;
  --accent: #c44536;
  --gold: #b8842a;
  --blue: #315d8c;
  --shadow: 0 16px 44px rgba(25, 40, 50, 0.1);
  --ink-deep: #11282b;
  --paper-warm: #fffdf7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(31, 41, 51, 0.1);
  background: rgba(247, 247, 242, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(15, 111, 99, 0.1);
  color: var(--brand-dark);
}

.search-band,
.content-band,
.results-band,
.timeline-band,
.feedback-band {
  padding: clamp(32px, 6vw, 72px) clamp(18px, 4vw, 52px);
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid rgba(31, 41, 51, 0.08);
  background:
    linear-gradient(90deg, rgba(247, 247, 242, 0.88), rgba(247, 247, 242, 0.98)),
    repeating-linear-gradient(135deg, rgba(15, 111, 99, 0.09) 0 1px, transparent 1px 26px);
}

.search-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: 0;
}

h1 em {
  color: var(--accent);
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: rgba(196, 69, 54, 0.24);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.status-notice {
  display: inline-flex;
  max-width: 620px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(196, 69, 54, 0.18);
  border-radius: 8px;
  background: rgba(196, 69, 54, 0.08);
  color: #8a2f25;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 4px;
}

.hero-actions a {
  text-decoration: none;
}

.outline-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 18px;
  border: 1px solid rgba(15, 111, 99, 0.34);
  border-radius: 8px;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
}

.outline-button:hover,
.outline-button:focus-visible {
  background: rgba(15, 111, 99, 0.08);
}

.search-panel {
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.mode-tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.mode-tab.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
}

.mode-tab.disabled {
  opacity: 0.62;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input,
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.search-row input {
  min-height: 54px;
  padding: 0 14px;
  font-size: 17px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-button,
.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
}

.tag-button {
  border: 1px solid rgba(15, 111, 99, 0.25);
  background: rgba(15, 111, 99, 0.08);
  color: var(--brand-dark);
}

.ghost-button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.primary-button {
  padding: 8px 18px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.result-list {
  display: grid;
  gap: 12px;
}

.ai-preview-band {
  padding: clamp(38px, 6vw, 76px) clamp(18px, 4vw, 52px);
  background: var(--ink-deep);
  color: #f5f7f2;
}

.ai-preview-band .eyebrow {
  color: #e5b56b;
}

.ai-preview-band .section-heading p:not(.eyebrow) {
  color: rgba(245, 247, 242, 0.68);
}

.split-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  max-width: 1100px;
}

.split-heading > p {
  max-width: 360px;
  margin-bottom: 10px;
}

.demo-question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1200px;
}

.demo-answer-card {
  display: grid;
  gap: 14px;
  min-height: 270px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-answer-topline {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #e5b56b;
  color: var(--ink-deep);
  font-size: 14px;
  font-weight: 900;
}

.demo-label {
  color: #e5b56b;
  font-size: 12px;
  font-weight: 800;
}

.demo-number {
  margin-left: auto;
  color: rgba(245, 247, 242, 0.34);
  font-size: 12px;
}

.demo-question {
  margin-bottom: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.demo-answer {
  margin-bottom: 0;
  color: rgba(245, 247, 242, 0.76);
  font-size: 14px;
}

.demo-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.demo-sources span {
  padding: 3px 7px;
  border: 1px solid rgba(229, 181, 107, 0.34);
  border-radius: 999px;
  color: #e5b56b;
  font-size: 11px;
}

.principles-band {
  padding: clamp(38px, 6vw, 76px) clamp(18px, 4vw, 52px);
  background: var(--paper-warm);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1200px;
}

.principle-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  border-top: 3px solid var(--brand);
  background: #ffffff;
  box-shadow: 0 9px 28px rgba(25, 40, 50, 0.06);
}

.principle-number {
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.principle-label {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.principle-card h3 {
  margin-top: 6px;
  margin-bottom: 7px;
}

.principle-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.result-item,
.topic-card,
.official-card {
  border: 1px solid rgba(31, 41, 51, 0.11);
  border-radius: 8px;
  background: var(--surface);
}

.result-item {
  padding: 18px;
}

.result-item button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.result-title-button {
  font-size: inherit;
}

.result-meta,
.card-meta,
.source-line {
  color: var(--muted);
  font-size: 13px;
}

.topic-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.topic-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.topic-card.selected {
  border-color: rgba(15, 111, 99, 0.55);
  box-shadow: 0 10px 28px rgba(15, 111, 99, 0.12);
}

.topic-card header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.topic-index {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--blue);
  font-weight: 800;
}

.status-row,
.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(184, 132, 42, 0.12);
  color: #745017;
  font-size: 12px;
  font-weight: 700;
}

.muted-pill {
  background: rgba(49, 93, 140, 0.1);
  color: var(--blue);
}

.keyword {
  color: var(--muted);
  font-size: 12px;
}

.topic-actions {
  display: flex;
  justify-content: flex-start;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 800;
}

.text-button:hover,
.text-button:focus-visible,
.result-title-button:hover,
.result-title-button:focus-visible {
  text-decoration: underline;
}

.topic-detail {
  margin-top: 20px;
}

.detail-panel {
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(15, 111, 99, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-meta {
  color: var(--muted);
  font-size: 14px;
}

.detail-summary {
  max-width: 880px;
  color: var(--ink);
  font-size: 17px;
}

.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 41, 51, 0.08);
}

.detail-section h3 {
  color: var(--brand-dark);
}

.detail-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--muted);
}

.detail-list li + li {
  margin-top: 6px;
}

.muted-band {
  background: #eef2ee;
}

.official-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
}

.official-card:hover,
.official-card:focus-visible,
.topic-card:target {
  border-color: rgba(15, 111, 99, 0.45);
  box-shadow: 0 10px 28px rgba(15, 111, 99, 0.12);
}

.timeline-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) 1fr;
  gap: 24px;
  background: #ffffff;
}

.timeline-visual {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.timeline-step {
  position: relative;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.timeline-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.timeline-step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.feedback-band {
  background: #f8f4ed;
}

.feedback-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
}

.feedback-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.feedback-form input,
.feedback-form select {
  min-height: 46px;
  padding: 0 12px;
}

.feedback-form textarea {
  padding: 12px;
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-status {
  margin: 0;
  color: var(--brand-dark);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 4vw, 52px);
  border-top: 1px solid rgba(31, 41, 51, 0.1);
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .search-band,
  .timeline-band {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .topic-grid,
  .link-grid,
  .timeline-visual,
  .demo-question-grid,
  .principles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-heading {
    display: block;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 42px;
  }

  .search-row,
  .topic-grid,
  .link-grid,
  .timeline-visual,
  .demo-question-grid,
  .principles-grid,
  .feedback-form {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }
}
