:root {
  --crimson: #b3212f;
  --crimson-dark: #861621;
  --graphite: #20252b;
  --ink: #2d3138;
  --muted: #68717c;
  --canvas: #f4f6f7;
  --paper: #ffffff;
  --line: #d4dade;
  --cyan: #0b7d87;
  --cyan-soft: #dff2f3;
  --max: 1180px;
}

* { 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;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--graphite); }
.brand img { width: 34px; height: 34px; border-radius: 4px; }
.site-nav { display: flex; align-items: center; height: 100%; gap: 28px; font-size: 14px; font-weight: 650; }
.site-nav a { position: relative; white-space: nowrap; }
.site-nav a:not(.nav-download)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 2px; background: var(--crimson); transition: right .2s ease; }
.site-nav a:hover::after, .site-nav a.active::after { right: 0; }
.nav-download { padding: 9px 16px; color: white; background: var(--crimson); border-radius: 4px; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--graphite); transition: .2s ease; }

.hero { min-height: 660px; padding: 42px max(24px, calc((100vw - var(--max)) / 2)) 28px; background: var(--canvas); }
.hero-copy { max-width: 850px; margin: 0 auto 28px; text-align: center; }
.eyebrow { display: inline-block; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; color: var(--graphite); font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: 0; }
.hero-copy p { max-width: 760px; margin: 0 auto 18px; color: #545d66; font-size: 16px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 24px; }
.button { display: inline-flex; min-height: 44px; padding: 10px 22px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; font-weight: 750; line-height: 1; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--crimson); }
.button.primary:hover { background: var(--crimson-dark); }
.button.inverse { color: var(--graphite); background: white; }
.text-link, .inline-link { color: var(--crimson-dark); font-weight: 750; }

.query-console { max-width: 1080px; margin: 0 auto; border-top: 1px solid #bcc5ca; border-bottom: 1px solid #bcc5ca; background: #eef1f2; }
.query-line { min-height: 42px; padding: 0 16px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; border-bottom: 1px solid #bcc5ca; font-size: 12px; }
.query-label { color: var(--muted); font-weight: 800; }
.query-value { font-weight: 700; }
.query-status { padding: 4px 9px; color: #075b61; background: var(--cyan-soft); border: 1px solid #acd8da; border-radius: 3px; font-weight: 800; }
.hero-stage { height: 340px; display: grid; grid-template-columns: 1fr minmax(190px, 240px) 1fr; align-items: center; gap: 36px; overflow: hidden; }
.hero-media { margin: 0; align-self: center; justify-self: center; }
.hero-media img { width: 196px; max-width: 400px; box-shadow: 0 18px 45px rgba(27,31,35,.18); }
.stage-rail { align-self: center; display: grid; gap: 14px; color: var(--muted); font-size: 13px; }
.stage-rail-left { text-align: right; }
.stage-rail span { padding: 7px 0; border-bottom: 1px solid #cbd1d5; }
.stage-rail-right strong { color: var(--crimson); text-transform: uppercase; }

.section { padding: 86px max(24px, calc((100vw - var(--max)) / 2)); }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading > span, .section-number { color: var(--crimson); font-size: 12px; font-weight: 850; }
.section-heading h2, .context-copy h2 { margin: 7px 0 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.22; color: var(--graphite); }
.section-lead { max-width: 720px; margin-bottom: 34px; color: var(--muted); }
.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow-item { min-height: 220px; padding: 28px; border-right: 1px solid var(--line); }
.workflow-item:last-child { border-right: 0; }
.workflow-item b { color: var(--cyan); font-size: 11px; }
.workflow-item h3 { margin: 34px 0 8px; font-size: 20px; }
.workflow-item p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.gallery-band { color: white; background: var(--graphite); }
.section-heading.light h2 { color: white; }
.section-heading.light > span { color: #66d0d3; }
.screen-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 40px; }
.screen-item { position: relative; margin: 0; }
.screen-index { position: absolute; top: 10px; left: 0; color: #76808a; font-size: 12px; font-weight: 800; }
.screen-item img { width: min(100%, 300px); max-width: 400px; margin: 0 auto; border: 1px solid #535c65; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.screen-item.featured img { width: min(100%, 340px); }
.screen-item figcaption { display: grid; margin-top: 18px; border-top: 1px solid #4b545c; padding-top: 14px; }
.screen-item figcaption span { color: #b6bec5; font-size: 13px; }

.reading-context { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: center; background: var(--canvas); }
.context-copy .inline-link { display: inline-block; margin-top: 8px; }
.context-list { margin: 0; border-top: 1px solid var(--line); }
.context-list > div { display: grid; grid-template-columns: 100px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.context-list dt { color: var(--crimson); font-weight: 800; }
.context-list dd { margin: 0; color: var(--muted); }

.deep-links { background: white; }
.link-rows { border-top: 1px solid var(--line); }
.link-rows a { min-height: 92px; display: grid; grid-template-columns: 100px 1.2fr 1.6fr 24px; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.link-rows a:hover { color: var(--crimson); }
.link-code { color: var(--cyan); font-size: 11px; font-weight: 850; }
.link-rows a > span:nth-of-type(2) { color: var(--muted); font-size: 13px; }
.link-rows i { font-style: normal; font-size: 20px; }

.download-band { padding: 48px max(24px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: white; background: var(--crimson); }
.download-band span { font-size: 11px; font-weight: 800; opacity: .8; }
.download-band h2 { margin: 5px 0 4px; font-size: 30px; line-height: 1.25; }
.download-band p, .download-copy { margin: 0; opacity: .86; }
.download-band.compact { margin-top: 30px; }

.site-footer { padding: 40px 24px; display: grid; justify-items: center; gap: 12px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--graphite); font-size: 17px; }
.footer-brand img { width: 27px; height: 27px; border-radius: 3px; }
.site-footer p { margin: 0; text-align: center; }

.inner-hero { min-height: 390px; padding: 78px max(24px, calc((100vw - var(--max)) / 2)); background: var(--canvas); border-bottom: 1px solid var(--line); }
.inner-hero h1 { max-width: 820px; margin-top: 8px; }
.inner-hero p { max-width: 700px; color: var(--muted); }
.inner-hero .button { margin-top: 12px; }

.guide-layout { max-width: var(--max); margin: 0 auto; padding: 70px 24px 90px; display: grid; grid-template-columns: 190px 1fr; gap: 70px; }
.guide-index { position: sticky; top: 100px; height: fit-content; display: grid; border-top: 2px solid var(--graphite); }
.guide-index strong, .guide-index a { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.guide-index a:hover { color: var(--crimson); }
.guide-content { display: grid; gap: 0; }
.guide-step { display: grid; grid-template-columns: 64px 1fr; gap: 30px; padding: 0 0 54px; scroll-margin-top: 92px; }
.step-marker { color: var(--crimson); font-size: 13px; font-weight: 850; border-top: 2px solid var(--crimson); padding-top: 9px; }
.guide-step h2 { margin-bottom: 16px; color: var(--graphite); font-size: 26px; line-height: 1.3; }
.guide-step p { color: #525b64; }
.guide-step a { color: var(--crimson-dark); text-decoration: underline; text-underline-offset: 3px; }

.faq-layout { max-width: 1020px; margin: 0 auto; padding: 58px 24px 90px; scroll-margin-top: 90px; }
.faq-filter { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; }
.filter-button { min-width: 72px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: white; cursor: pointer; }
.filter-button.active, .filter-button:hover { color: white; border-color: var(--graphite); background: var(--graphite); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details[hidden] { display: none; }
.faq-list summary { min-height: 72px; padding: 20px 50px 20px 0; position: relative; display: flex; align-items: center; gap: 18px; color: var(--graphite); font-weight: 750; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 12px; top: 19px; color: var(--crimson); font-size: 25px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list summary span { color: var(--cyan); font-size: 11px; }
.answer { padding: 0 50px 24px 37px; color: var(--muted); }
.answer a { color: var(--crimson-dark); text-decoration: underline; text-underline-offset: 3px; }
.faq-help { max-width: 1020px; margin: 0 auto 80px; padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 26px; border-left: 4px solid var(--crimson); background: var(--canvas); }
.faq-help span { color: var(--cyan); font-size: 12px; font-weight: 800; }
.faq-help h2 { margin: 5px 0 0; font-size: 23px; }

@media (max-width: 800px) {
  .site-header { height: 62px; padding: 0 18px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 62px; height: auto; padding: 14px 18px 18px; display: none; align-items: stretch; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 12px 24px rgba(32,37,43,.1); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; }
  .site-nav a:not(.nav-download)::after { display: none; }
  .nav-download { margin-top: 8px; text-align: center; }
  .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); }

  .hero { min-height: 700px; padding: 24px 18px 18px; }
  h1 { font-size: 38px; }
  .hero-copy { margin-bottom: 18px; }
  .hero-copy p { font-size: 14px; line-height: 1.6; }
  .hero-actions { gap: 16px; }
  .query-line { grid-template-columns: 1fr auto; padding: 0 10px; }
  .query-label { display: none; }
  .query-value { font-size: 11px; }
  .hero-stage { height: 292px; grid-template-columns: 1fr; }
  .hero-media img { width: 166px; }
  .stage-rail { display: none; }

  .section { padding: 64px 18px; }
  .section-heading { margin-bottom: 26px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-item { min-height: auto; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-item:last-child { border-bottom: 0; }
  .workflow-item h3 { margin-top: 18px; }
  .screen-grid { grid-template-columns: 1fr; gap: 58px; }
  .screen-item img, .screen-item.featured img { width: min(82vw, 300px); }
  .reading-context { grid-template-columns: 1fr; gap: 30px; }
  .context-list > div { grid-template-columns: 72px 1fr; }
  .link-rows a { padding: 20px 0; grid-template-columns: 68px 1fr 20px; gap: 12px; }
  .link-rows a > span:nth-of-type(2) { grid-column: 2 / 4; }
  .link-rows i { grid-column: 3; grid-row: 1; }
  .download-band { padding: 38px 18px; align-items: flex-start; flex-direction: column; }
  .download-band h2 { font-size: 25px; }

  .inner-hero { min-height: 420px; padding: 60px 18px; }
  .guide-layout { padding: 48px 18px 70px; grid-template-columns: 1fr; gap: 36px; }
  .guide-index { position: static; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--graphite); }
  .guide-index strong { grid-column: 1 / -1; }
  .guide-index a { font-size: 12px; }
  .guide-step { grid-template-columns: 42px 1fr; gap: 16px; padding-bottom: 42px; }
  .guide-step h2 { font-size: 22px; }
  .faq-layout { padding: 42px 18px 70px; }
  .faq-list summary { padding-right: 38px; align-items: flex-start; }
  .answer { padding-left: 0; padding-right: 22px; }
  .faq-help { margin: 0 18px 60px; padding: 26px; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .hero { min-height: 650px; }
  h1 { font-size: 34px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .button { width: 100%; }
  .guide-index { grid-template-columns: repeat(2, 1fr); }
}

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