:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --text: #0f172a;
  --muted: #526174;
  --line: #d8e0e8;
  --primary: #0f172a;
  --primary-dark: #08111f;
  --cta: #0b6ea8;
  --cta-dark: #075985;
  --success: #047857;
  --accent: #b45309;
  --danger: #b42318;
  --card-border: #d7e0e8;
  --card-border-strong: #8fb3c8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.06), 0 18px 44px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: 4rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.24;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  min-height: min(860px, 88svh);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(5, 13, 24, 0.96) 0%, rgba(7, 29, 43, 0.8) 58%, rgba(16, 54, 72, 0.46) 100%),
    url("assets/hero-bg.webp") center / cover no-repeat;
  color: #ffffff;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1200px, calc(100% - 40px));
  margin: 12px auto 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(5, 16, 26, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.topbar .brand {
  margin-right: auto;
  color: #ffffff;
  font-weight: 900;
}

.topbar .brand img {
  width: 22px;
  height: 31px;
  margin-right: 8px;
  border-radius: 4px;
  background: #ffffff;
}

.topbar-links {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.topbar a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.topbar a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.topbar .nav-primary {
  background: #ffffff;
  color: var(--primary);
}

.topbar .nav-primary:hover {
  background: #eaf4fb;
  color: var(--cta-dark);
}

.topbar a:active,
.reader-nav a:active {
  transform: translateY(1px);
}

.topbar a:focus-visible,
.button:focus-visible,
.text-link:focus-visible,
.reader-nav a:focus-visible,
.zoomable-image:focus-visible,
.lightbox-close:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #0f172a;
}

.hero-inner {
  width: min(1200px, calc(100% - 40px));
  margin: auto;
  padding: 72px 0 80px;
}

.hero-logo {
  width: 72px;
  height: auto;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cta-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #93e2d2;
}

.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 2px solid #54c8b5;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

.source-line {
  margin: 18px 0 0;
  color: #8ee5d8;
  font-weight: 900;
}

.source-line.dark {
  color: var(--primary-dark);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

a.button[target="_blank"]::after,
.text-link[target="_blank"]::after {
  content: "\2197";
  flex: 0 0 auto;
  font-size: 0.9em;
  line-height: 1;
  transition: transform 180ms ease;
}

a.button[target="_blank"]:hover::after,
.text-link[target="_blank"]:hover::after {
  transform: translate(1px, -1px);
}

.button.primary {
  border-color: var(--cta);
  background: var(--cta);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(11, 110, 168, 0.24);
}

.button.primary:hover {
  border-color: var(--cta-dark);
  background: var(--cta-dark);
  box-shadow: 0 12px 26px rgba(7, 89, 133, 0.3);
  transform: translateY(-1px);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.button.outline {
  border: 1px solid #9db5c6;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.button.outline:hover {
  border-color: var(--cta);
  background: #eef7fc;
  color: var(--cta-dark);
  box-shadow: 0 8px 18px rgba(11, 110, 168, 0.12);
  transform: translateY(-1px);
}

.button.button:active {
  box-shadow: none;
  transform: translateY(1px);
}

.section {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0;
}

.section-band {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#services,
#tools,
#steps,
#tips,
#ai,
.step {
  scroll-margin-top: 92px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.tool-panel,
.step,
.warning,
.reader-nav {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.panel > *,
.tool-panel > *,
.step > *,
.warning > *,
.reader-nav > * {
  position: relative;
  z-index: 1;
}

.panel:hover,
.tool-panel:hover,
.step:hover,
.reader-nav:hover {
  border-color: var(--card-border-strong);
  box-shadow: var(--shadow-md);
}

.panel {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-top: 3px solid #4b9bc6;
}

.resource-grid .panel:nth-child(2) {
  border-top-color: #22a06b;
}

.resource-grid .panel:nth-child(3) {
  border-top-color: #d38a24;
}

.panel h3 {
  margin-bottom: 12px;
}

.panel p,
.tool-panel p,
.step p,
.warning p {
  margin: 0;
  color: var(--muted);
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 18px;
  color: var(--cta);
  gap: 6px;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--cta-dark);
}

.service-band {
  background: #edf3f5;
}

.service-section {
  padding-top: 52px;
  padding-bottom: 52px;
}

.service-section > .section-heading {
  margin-bottom: 20px;
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  align-items: center;
  column-gap: 32px;
  row-gap: 18px;
  padding: 26px;
  border: 1px solid #c8d7e1;
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 44px rgba(15, 23, 42, 0.1);
}

.service-copy {
  padding-top: 6px;
}

.service-copy h3 {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

.service-copy > p:not(.service-name) {
  margin: 0;
  color: var(--muted);
}

.service-name,
.tool-label {
  margin: 0 0 8px;
  color: var(--success);
  font-size: 0.86rem;
  font-weight: 900;
}

.service-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 14px;
}

.service-actions .button {
  width: 100%;
  min-height: 58px;
}

.service-actions .button.outline {
  border-width: 2px;
  border-color: #7797aa;
  background: #f8fbfd;
}

.access-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding: 14px 0 0;
  border-top: 1px solid #d7e1e8;
}

.access-note p {
  margin: 0;
  color: #465568;
}

.access-note-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #aabcc9;
  border-radius: 50%;
  background: #ffffff;
  color: var(--cta-dark);
  font-weight: 900;
}

.tools-section {
  padding-bottom: 64px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 28px;
  border-left: 4px solid var(--cta);
}

.tool-panel h3 {
  margin-bottom: 8px;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.reader-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.reader-nav-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.reader-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.reader-nav a:hover {
  background: #edf6fb;
  color: var(--cta);
}

.reader-nav span {
  color: var(--cta-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 24px;
  padding: 30px;
}

.step::before,
.warning::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--cta);
}

.step-number {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--cta-dark);
  color: #ffffff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.step-content > p {
  max-width: 760px;
  margin-bottom: 18px;
}

.step-content img {
  width: 100%;
  border: 1px solid #d4dde5;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.zoomable-image {
  cursor: zoom-in;
  transform-origin: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.zoomable-image:hover {
  border-color: #75a8c8;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.13);
  filter: saturate(1.03);
}

.image-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.copy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #b9d9d0;
  border-radius: var(--radius);
  background: #eef8f5;
}

code {
  display: block;
  color: #123f50;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.button.copy-button {
  width: 208px;
  background: var(--success);
  color: #ffffff;
}

.button.copy-button:hover {
  background: #036548;
}

.warning {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 30px;
  border-color: #edc4ba;
  background: #fff5f1;
}

.warning::before {
  background: var(--danger);
}

.warning .eyebrow {
  color: var(--danger);
}

.warning-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  font-weight: 900;
}

.warning h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
}

.ai-section {
  padding-top: 64px;
}

.legal {
  padding-top: 48px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}

.legal h2 {
  margin-bottom: 12px;
}

.legal p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(6, 13, 22, 0.86);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0;
  outline: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.lightbox.is-open .lightbox-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lightbox-frame img {
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  cursor: zoom-out;
}

.lightbox-frame figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.lightbox-close:hover {
  background: #eef4ff;
}

@media (max-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .service-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tutorial-layout {
    grid-template-columns: 1fr;
  }

  .reader-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .reader-nav-title {
    display: none;
  }

  .reader-nav a {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: 2.625rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  .hero {
    min-height: auto;
  }

  .topbar {
    gap: 8px;
    width: min(100% - 24px, 1200px);
    margin-top: 12px;
  }

  .topbar .brand {
    flex: 0 0 auto;
    margin-right: 0;
  }

  .topbar-links {
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar-links::-webkit-scrollbar {
    display: none;
  }

  .topbar-links a {
    flex: 0 0 auto;
  }

  .hero-inner {
    width: min(100% - 32px, 1200px);
    margin: auto;
    padding: 52px 0 64px;
  }

  .hero-logo {
    width: 62px;
  }

  .lead {
    font-size: 1rem;
  }

  .section {
    width: min(100% - 32px, 1200px);
    padding: 58px 0;
  }

  .service-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .info-grid,
  .resource-grid,
  .service-actions,
  .tool-panel,
  .step,
  .image-row,
  .warning,
  .copy-box {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    align-items: stretch;
  }

  .tool-panel .button {
    width: 100%;
  }

  .step {
    gap: 14px;
    padding: 18px;
  }

  .step-number {
    width: 58px;
    height: 48px;
  }

  .copy-box {
    align-items: stretch;
  }

  .panel {
    min-height: 0;
  }

  .text-link {
    margin-top: 4px;
  }

  .warning h2 {
    font-size: 1.5rem;
  }

  .ai-section {
    padding-top: 32px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-close {
    top: -12px;
    right: -8px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .topbar {
    width: calc(100% - 16px);
  }

  .topbar a {
    padding-right: 11px;
    padding-left: 11px;
  }

  .hero-inner,
  .section {
    width: calc(100% - 24px);
  }

  .hero-inner {
    padding-top: 36px;
    padding-bottom: 44px;
  }

  .hero-logo {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-meta {
    gap: 6px;
  }

  .hero-meta span {
    min-height: 32px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.88rem;
  }

  .tool-panel,
  .service-layout,
  .panel,
  .warning {
    padding: 22px;
  }

  .access-note {
    align-items: start;
  }

  .reader-nav {
    width: 100%;
  }

  .copy-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
