:root {
  --ink: #171717;
  --paper: #f5f2eb;
  --white: #fffefb;
  --line: #262626;
  --muted: #65615b;
  --wine: #981f31;
  --wine-dark: #6f1321;
  --cyan: #087f8c;
  --cyan-soft: #d7eff0;
  --signal: #f2c14e;
  --header-height: 70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, Helvetica, sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.16; }
p { color: #3e3b37; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 254, 251, .97);
  border-bottom: 2px solid var(--line);
}
.header-inner {
  width: min(1440px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 850; line-height: 1; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 9px 15px; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 700; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { border-bottom-color: var(--wine); color: var(--wine); }
.site-nav .nav-download { margin-left: 10px; background: var(--wine); border: 2px solid var(--wine); color: #fff; }
.site-nav .nav-download:hover, .site-nav .nav-download:focus-visible { background: var(--wine-dark); border-color: var(--wine-dark); color: #fff; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--ink); transition: transform .2s, opacity .2s; }

.button {
  min-height: 44px;
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 0;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .2s, color .2s, transform .2s;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--wine); border-color: var(--wine); color: #fff; }
.button-primary:hover, .button-primary:focus-visible { background: var(--wine-dark); border-color: var(--wine-dark); }
.button-outline { border-color: var(--ink); background: transparent; }
.button-outline:hover, .button-outline:focus-visible { background: var(--ink); color: #fff; }
.text-link { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; border-bottom: 2px solid currentColor; }
.text-link.light { color: #fff; }
.section-code { display: block; margin-bottom: 18px; font-size: 11px; font-weight: 850; line-height: 1.3; color: var(--cyan); text-transform: uppercase; }

.chapter-hero {
  width: min(1440px, 100%);
  height: clamp(610px, calc(100svh - 130px), 720px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 112px minmax(400px, .95fr) minmax(430px, .9fr);
  border-left: 2px solid var(--line);
  border-right: 2px solid var(--line);
  overflow: hidden;
  background: var(--white);
}
.hero-spine {
  padding: 28px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-right: 2px solid var(--line);
  background: var(--wine);
  color: #fff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  line-height: 1;
}
.hero-spine b { font-size: 13px; }
.hero-copy {
  padding: clamp(38px, 5vw, 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.hero-copy h1 { margin-bottom: 22px; font-size: clamp(42px, 4.1vw, 58px); font-weight: 900; }
.hero-copy > p { max-width: 650px; margin-bottom: 28px; font-size: clamp(16px, 1.25vw, 19px); }
.hero-actions { display: flex; align-items: center; gap: 24px; }
.hero-index { margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.hero-index div { padding: 12px 8px; display: flex; align-items: baseline; gap: 8px; border-right: 1px solid var(--line); }
.hero-index div:last-child { border-right: 0; }
.hero-index dt { color: var(--wine); font-weight: 900; }
.hero-index dd { margin: 0; font-size: 12px; font-weight: 750; }
.hero-media {
  min-width: 0;
  padding: clamp(24px, 3vw, 44px);
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  background: var(--cyan-soft);
  border-left: 2px solid var(--line);
  overflow: hidden;
}
.preview-slot {
  width: 88%;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--white);
  border: 2px solid var(--line);
  box-shadow: 9px 9px 0 var(--ink);
}
.preview-slot-side { width: 76%; justify-self: end; box-shadow: -9px 9px 0 var(--wine); }
.preview-slot img { width: auto; max-width: 400px; height: 92%; max-height: 260px; object-fit: contain; }

.chapter-band { padding: 72px clamp(24px, 6vw, 88px); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.chapter-band-intro { background: var(--signal); }
.chapter-heading { max-width: 1280px; margin: 0 auto 38px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.chapter-heading > span { font-size: 11px; font-weight: 900; }
.chapter-heading h2 { max-width: 820px; margin: 0; font-size: clamp(31px, 4vw, 56px); text-align: right; }
.field-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--line); background: var(--paper); }
.field-grid article { min-width: 0; padding: 28px; border-right: 2px solid var(--line); }
.field-grid article:last-child { border-right: 0; }
.field-no { width: 32px; height: 32px; margin-bottom: 36px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; }
.field-grid h3 { margin-bottom: 14px; font-size: 21px; }
.field-grid p { margin-bottom: 0; font-size: 14px; }

.query-lab, .route-notes { padding: 86px clamp(24px, 6vw, 88px); background: var(--white); }
.section-lead { max-width: 1280px; margin: 0 auto 38px; }
.section-lead h2 { max-width: 850px; margin-bottom: 0; font-size: clamp(31px, 4vw, 54px); }
.query-layout { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 320px 1fr; border: 2px solid var(--line); }
.query-tabs { display: grid; background: var(--paper); border-right: 2px solid var(--line); }
.query-tab { min-height: 68px; padding: 14px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-weight: 800; cursor: pointer; }
.query-tab:last-child { border-bottom: 0; }
.query-tab.active { background: var(--wine); color: #fff; }
.query-console { min-height: 250px; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; background: var(--ink); color: #fff; }
.console-label { margin-bottom: 22px; color: #a8e0e4; font-size: 11px; font-weight: 800; }
.query-console p { margin-bottom: 20px; color: #fff; font-size: clamp(22px, 3vw, 39px); font-weight: 850; }
.console-rule { height: 2px; margin-bottom: 18px; background: var(--cyan); }
.query-console strong { color: #dfdcd6; font-size: 14px; }

.contact-sheet { padding: 76px clamp(24px, 6vw, 88px); background: var(--wine); color: #fff; }
.chapter-heading-light { color: #fff; }
.sheet-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(300px, .9fr); gap: 28px; align-items: center; }
.sheet-grid figure { margin: 0; }
.image-mat { height: 460px; padding: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--paper); border: 2px solid var(--ink); }
.image-mat img { width: auto; max-width: 400px; height: 100%; object-fit: contain; }
.sheet-grid figcaption { padding: 14px 0; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.55); font-size: 12px; }
.sheet-grid figcaption span { text-align: right; }
.sheet-notes { padding: 24px; }
.sheet-notes .section-code { color: #8de0e6; }
.sheet-notes h3 { font-size: clamp(28px, 3vw, 42px); }
.sheet-notes p { margin-bottom: 28px; color: #fff; }

.route-list { max-width: 1280px; margin: 0 auto 34px; padding: 0; list-style: none; border-top: 2px solid var(--line); }
.route-list li { display: grid; grid-template-columns: 100px 1fr; padding: 26px 0; border-bottom: 2px solid var(--line); }
.route-list li > span { color: var(--wine); font-size: 28px; font-weight: 900; }
.route-list h3 { margin-bottom: 8px; font-size: 22px; }
.route-list p { max-width: 820px; margin-bottom: 0; }
.route-notes > .button { margin-left: max(0px, calc((100% - 1280px) / 2)); }

.download-band { padding: 68px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--cyan-soft); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.download-band h2 { max-width: 820px; margin-bottom: 26px; font-size: clamp(28px, 4vw, 48px); }
.download-band.compact { padding-top: 54px; padding-bottom: 54px; }

.inner-hero {
  min-height: 470px;
  padding: 70px clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  align-items: center;
  gap: clamp(44px, 8vw, 130px);
  background: var(--white);
  border-bottom: 2px solid var(--line);
}
.inner-hero h1 { max-width: 780px; margin-bottom: 22px; font-size: clamp(40px, 4.2vw, 56px); }
.inner-hero p { max-width: 720px; margin-bottom: 26px; font-size: 17px; }
.manual-index { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--line); }
.manual-index a { min-height: 78px; padding: 15px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.manual-index a:nth-child(2n) { border-right: 0; }
.manual-index a:nth-last-child(-n+2) { border-bottom: 0; }
.manual-index a:hover { background: var(--signal); }
.manual-index span { color: var(--wine); font-size: 11px; }

.manual-section { padding: 64px clamp(24px, 7vw, 110px); display: grid; grid-template-columns: 100px minmax(0, 1fr) 260px; gap: 44px; border-bottom: 2px solid var(--line); scroll-margin-top: 88px; }
.manual-section:nth-of-type(odd) { background: var(--white); }
.manual-no { color: var(--wine); font-size: 34px; font-weight: 900; }
.manual-body { max-width: 800px; }
.manual-body h2 { margin-bottom: 22px; font-size: clamp(28px, 3vw, 42px); }
.manual-body p { margin-bottom: 18px; }
.manual-body a { color: var(--wine); font-weight: 800; border-bottom: 1px solid currentColor; }
.manual-note { align-self: start; padding: 22px; display: grid; gap: 10px; background: var(--signal); border: 2px solid var(--line); box-shadow: 7px 7px 0 var(--ink); font-size: 13px; }
.manual-note b { margin-bottom: 6px; font-size: 16px; }
.manual-note span { padding-top: 7px; border-top: 1px solid var(--line); }
.manual-note.warning { background: #f3d7da; }
.manual-note.cyan { background: var(--cyan-soft); }

.faq-hero { grid-template-columns: minmax(0, 1.3fr) 290px; }
.faq-counter { padding: 26px; display: grid; grid-template-columns: auto 1fr; gap: 0 16px; align-items: baseline; border: 2px solid var(--line); background: var(--signal); box-shadow: 10px 10px 0 var(--ink); }
.faq-counter strong, .faq-counter b { font-size: 54px; line-height: 1.2; }
.faq-counter span { font-size: 13px; font-weight: 800; }
.faq-tools { position: sticky; top: var(--header-height); z-index: 40; padding: 14px clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--paper); border-bottom: 2px solid var(--line); }
.faq-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.faq-filter, .expand-toggle { min-height: 38px; padding: 7px 14px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 800; }
.faq-filter.active, .faq-filter:hover, .expand-toggle:hover { background: var(--wine); color: #fff; }
.faq-index { max-width: 1120px; margin: 0 auto; padding: 60px 24px 78px; }
.faq-item { border-top: 2px solid var(--line); }
.faq-item:last-child { border-bottom: 2px solid var(--line); }
.faq-item[hidden] { display: none; }
.faq-item summary { min-height: 82px; padding: 18px 8px; display: grid; grid-template-columns: 56px 1fr 30px; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { color: var(--wine); font-weight: 900; }
.faq-item summary b { font-size: 18px; }
.faq-item summary i { font-style: normal; font-size: 27px; text-align: center; transition: transform .2s; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item > div { padding: 0 46px 28px 80px; }
.faq-item > div p { max-width: 850px; margin-bottom: 0; }
.faq-route { padding: 58px clamp(24px, 7vw, 110px); display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--signal); border-top: 2px solid var(--line); }
.faq-route h2 { margin-bottom: 10px; font-size: clamp(28px, 3vw, 42px); }
.faq-route p { margin-bottom: 0; }

.site-footer { padding: 42px 24px 30px; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--ink); color: #fff; }
.footer-brand { margin-bottom: 18px; display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 850; }
.footer-brand img { width: 36px; height: 36px; object-fit: contain; background: #fff; }
.site-footer nav { margin-bottom: 18px; display: flex; justify-content: center; gap: 24px; font-size: 13px; font-weight: 750; }
.site-footer nav a:hover { color: #8de0e6; }
.site-footer p { max-width: 760px; margin: 0 auto 10px; color: #ddd9d2; text-align: center; font-size: 12px; }
.site-footer small { color: #9d9993; text-align: center; }

@media (max-width: 1060px) {
  .chapter-hero { grid-template-columns: 80px minmax(360px, 1fr) minmax(330px, .75fr); }
  .hero-copy { padding: 38px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid article:nth-child(2) { border-right: 0; }
  .field-grid article:nth-child(-n+2) { border-bottom: 2px solid var(--line); }
  .sheet-grid { grid-template-columns: 1fr 1fr; }
  .sheet-notes { grid-column: 1 / -1; padding-left: 0; }
  .image-mat { height: 400px; }
  .manual-section { grid-template-columns: 72px minmax(0, 1fr); }
  .manual-note { grid-column: 2; grid-template-columns: repeat(2, 1fr); }
  .manual-note b { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  :root { --header-height: 64px; }
  .site-header { height: var(--header-height); }
  .header-inner { padding: 0 16px; }
  .brand img { width: 38px; height: 38px; }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav { position: fixed; inset: var(--header-height) 0 auto 0; max-height: calc(100svh - var(--header-height)); padding: 18px; display: none; align-items: stretch; flex-direction: column; overflow-y: auto; background: var(--white); border-bottom: 2px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 48px; padding: 13px 10px; border-bottom: 1px solid #b9b5ae; }
  .site-nav .nav-download { margin: 8px 0 0; text-align: center; }

  .chapter-hero {
    height: calc(100svh - 86px);
    min-height: 560px;
    max-height: 720px;
    grid-template-columns: 40px 1fr;
    grid-template-rows: 1fr 160px;
    border-left: 0;
    border-right: 0;
  }
  .hero-spine { grid-row: 1 / 3; padding: 16px 12px; }
  .hero-copy { padding: 24px 20px 18px; overflow: hidden; }
  .hero-copy .section-code { margin-bottom: 10px; }
  .hero-copy h1 { margin-bottom: 12px; font-size: clamp(34px, 10vw, 45px); }
  .hero-copy > p { margin-bottom: 14px; font-size: 14px; line-height: 1.62; }
  .hero-actions { gap: 16px; }
  .hero-actions .button { min-height: 40px; padding: 8px 16px; }
  .hero-actions .text-link { font-size: 13px; }
  .hero-index { margin-top: 16px; }
  .hero-index div { padding: 8px 5px; flex-direction: column; gap: 0; }
  .hero-index dd { font-size: 10px; }
  .hero-media { padding: 12px 18px 15px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; gap: 14px; border-left: 0; border-top: 2px solid var(--line); }
  .preview-slot, .preview-slot-side { width: 100%; height: 100%; box-shadow: 5px 5px 0 var(--ink); }
  .preview-slot-side { box-shadow: -5px 5px 0 var(--wine); }
  .preview-slot img { width: auto; height: 94%; max-height: 125px; }

  .chapter-band, .query-lab, .route-notes, .contact-sheet { padding: 52px 20px; }
  .chapter-heading { margin-bottom: 26px; align-items: flex-start; flex-direction: column; }
  .chapter-heading h2 { text-align: left; font-size: 34px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid article { padding: 22px; border-right: 0; border-bottom: 2px solid var(--line); }
  .field-grid article:nth-child(3) { border-bottom: 2px solid var(--line); }
  .field-grid article:last-child { border-bottom: 0; }
  .field-no { margin-bottom: 18px; }
  .query-layout { grid-template-columns: 1fr; }
  .query-tabs { grid-template-columns: repeat(3, 1fr); border-right: 0; border-bottom: 2px solid var(--line); }
  .query-tab { min-height: 60px; padding: 10px 8px; border-right: 1px solid var(--line); border-bottom: 0; text-align: center; font-size: 12px; }
  .query-tab:last-child { border-right: 0; }
  .query-console { min-height: 220px; }
  .sheet-grid { grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .image-mat { height: 310px; padding: 10px; }
  .sheet-grid figcaption { min-height: 82px; flex-direction: column; }
  .sheet-grid figcaption span { text-align: left; }
  .sheet-notes { padding: 28px 0 0; }
  .route-list li { grid-template-columns: 60px 1fr; }
  .route-notes > .button { margin-left: 0; }

  .inner-hero { min-height: auto; padding: 52px 20px; grid-template-columns: 1fr; gap: 34px; }
  .inner-hero h1 { font-size: 34px; }
  .manual-index { max-width: 460px; }
  .manual-section { padding: 46px 20px; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; }
  .manual-no { font-size: 24px; }
  .manual-note { grid-column: 1 / -1; margin-left: 0; grid-template-columns: 1fr 1fr; box-shadow: 5px 5px 0 var(--ink); }
  .manual-note b { grid-column: 1 / -1; }

  .faq-hero { grid-template-columns: 1fr; }
  .faq-counter { max-width: 320px; }
  .faq-tools { top: var(--header-height); padding: 10px 14px; align-items: flex-start; }
  .faq-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .faq-filter { flex: 0 0 auto; }
  .expand-toggle { flex: 0 0 auto; }
  .faq-index { padding: 40px 18px 58px; }
  .faq-item summary { grid-template-columns: 38px 1fr 24px; gap: 8px; }
  .faq-item summary b { font-size: 16px; }
  .faq-item > div { padding: 0 28px 24px 46px; }
  .faq-route { padding: 44px 20px; align-items: flex-start; flex-direction: column; }
  .site-footer nav { flex-wrap: wrap; }
}

@media (max-width: 430px) {
  .hero-copy { padding-left: 16px; padding-right: 14px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy > p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
  .hero-actions { justify-content: space-between; }
  .hero-actions .text-link { gap: 6px; }
  .sheet-grid { grid-template-columns: 1fr; }
  .image-mat { height: 390px; }
  .sheet-grid figcaption { min-height: auto; }
  .manual-index a { min-height: 70px; font-size: 12px; }
  .manual-section { grid-template-columns: 34px minmax(0, 1fr); }
  .manual-body h2 { font-size: 28px; }
  .manual-note { grid-template-columns: 1fr; }
  .manual-note b { grid-column: auto; }
  .faq-tools { align-items: stretch; flex-direction: column; }
  .expand-toggle { align-self: flex-start; }
  .faq-item > div { padding-left: 4px; padding-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
