:root {
  color-scheme: light;
  --ink: #151f30;
  --muted: #516174;
  --line: #d6dfe5;
  --teal: #086958;
  --mint: #9bf1cd;
  --paper: #f4f7f8;
  --measure: min(1120px, calc(100% - 64px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.75 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: .23em; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid #df8b22; outline-offset: 3px; }
[id] { scroll-margin-top: 22px; }
.skip-link { position: absolute; z-index: 5; top: 6px; left: 12px; padding: 8px 14px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(ellipse at 77% 58%, #222a36, transparent 54%), #090c14;
}
.particle-ribbon {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(100deg, #0004 12%, #000 64%);
}
.topbar, .hero-inner, .section, .preparation { width: var(--measure); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #ffffff26; }
.brand, .topbar-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: none; }
.brand { gap: 12px; font-size: 1.22rem; font-weight: 800; letter-spacing: .06em; }
.brand img { width: 44px; aspect-ratio: 1; border: 1px solid #ffffff40; border-radius: 11px; }
.topbar-links { display: flex; gap: 4px; }
.topbar-links a { padding-inline: 14px; border-radius: 8px; color: #dae4ed; font-size: .92rem; }
.topbar-links a:hover { background: #ffffff12; color: var(--mint); }
.hero-inner { display: grid; grid-template-columns: 1.65fr 1fr; align-items: center; gap: 32px; padding: clamp(48px, 6vw, 88px) 0; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: .85rem; font-weight: 750; letter-spacing: .08em; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--mint); }
.hero .eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
h1 { font-size: clamp(2.25rem, 4.4vw, 3.85rem); }
.lead { max-width: 38em; margin: 20px 0 26px; color: #c3d1df; }
.hero-actions, .service-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-art {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
}
.brand-art img { width: 51%; aspect-ratio: 1; mix-blend-mode: lighten; mask-image: radial-gradient(ellipse, black 40%, transparent 74%); }
.hero-copy { position: relative; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 9px 18px; border: 1px solid transparent; border-radius: 9px;
  font: inherit; font-weight: 700; font-size: .96rem; text-decoration: none; cursor: pointer;
}
.button.primary, .copy-button { color: white; background: var(--teal); }
.hero .primary { color: #10392e; background: var(--mint); }
.secondary { color: white; border-color: #ffffff52; }
.outline { color: var(--ink); border-color: #bacad1; background: white; }
a[target="_blank"]::after { content: "↗"; font-family: Arial, sans-serif; }
.button:hover { filter: brightness(.94); }
.secondary:hover { background: #ffffff12; }

.preparation { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-block: 40px 0; }
.prep-card, .panel, .step, .reader-nav { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.prep-card { padding: clamp(20px, 3vw, 34px); box-shadow: 0 5px 20px #21334606; }
.prep-card h2 { font-size: 1.5rem; }
.prep-card .section-heading { margin-bottom: 12px; }
.service-actions, .tool-panel .button { margin-top: 18px; }
.access-note { display: flex; align-items: baseline; gap: 9px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; font-size: .88rem; }
.access-note-mark { display: inline-grid; flex: none; place-items: center; width: 18px; height: 18px; color: var(--teal); border: 1px solid currentColor; border-radius: 50%; font: bold 13px Georgia, serif; }
.section { margin-top: clamp(42px, 6vw, 78px); }
.section-heading { margin-bottom: 24px; }
.section-heading h2 + p { margin-top: 8px; }
.tutorial-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); align-items: start; gap: 24px; }
.reader-nav { position: sticky; top: 20px; padding: 16px; }
.reader-nav-title { padding: 0 8px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 700; }
.reader-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.reader-nav a:hover, .reader-nav a:focus-visible { background: #ecf6f2; }
.reader-nav span, .step-number { color: var(--teal); font: 700 .9rem/1.2 Consolas, monospace; }
.steps { display: grid; gap: 18px; }
.step { padding: clamp(18px, 3vw, 32px); position: relative; }
.step:target { border-color: var(--teal); }
.step-number { position: absolute; top: clamp(18px, 3vw, 32px); display: grid; place-items: center; width: 36px; height: 32px; border: 1px solid #c4e2d8; border-radius: 8px; background: #ecf6f2; }
.step-content h3 { min-height: 32px; display: flex; align-items: center; margin: 0 0 12px 48px; }
.step-content img { width: 100%; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; }
.zoomable-image { cursor: zoom-in; }
.zoomable-image:hover { border-color: var(--teal); }
.image-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.copy-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 10px; background: #edf6f2; }
code { color: #315648; font: .875rem/1.6 Consolas, monospace; overflow-wrap: anywhere; }
.warning { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid #ebd6ae; border-radius: 14px; background: #fff8e9; }
.warning-icon { flex: none; width: 25px; border-radius: 50%; background: #845014; color: #fff; text-align: center; font-weight: 800; line-height: 25px; }
.warning .eyebrow { color: #825015; }
.warning h2, .legal h2 { margin-bottom: 8px; font-size: 1.2rem; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: auto; font-weight: 700; }
.legal { border-top: 1px solid var(--line); padding: 26px 0 38px; font-size: .9rem; }
.legal .source-line { margin-top: 10px; font-weight: 700; }

body.modal-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 10; display: none; place-items: center; padding: 24px; background: #08111def; }
.lightbox.is-open { display: grid; }
.lightbox-backdrop { position: absolute; inset: 0; border: 0; background: transparent; cursor: zoom-out; }
.lightbox-frame { position: relative; max-width: min(1260px, 100%); outline: 0; }
.lightbox-frame img { max-height: calc(100dvh - 130px); object-fit: contain; margin: auto; }
.lightbox-close { display: block; width: 44px; height: 44px; margin: 0 0 6px auto; border: 0; border-radius: 50%; background: #fff; font-size: 1.65rem; cursor: pointer; }
.lightbox-frame figcaption { margin-top: 8px; text-align: center; color: white; }

@media (max-width: 800px) {
  :root { --measure: calc(100% - 36px); }
  .topbar-links a { padding-inline: 9px; }
  .hero-inner { grid-template-columns: 2fr 1fr; gap: 16px; }
  .preparation, .tutorial-layout { grid-template-columns: minmax(0, 1fr); }
  .reader-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .reader-nav-title { width: 100%; }
  .resource-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 6px; padding-block: 12px 4px; }
  .topbar-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topbar-links a { justify-content: center; padding: 0; font-size: .86rem; }
  .hero-inner { display: flex; flex-direction: column; gap: 4px; align-items: stretch; padding: 8px 0 30px; }
  .brand-art { order: -1; width: min(48vw, 198px); align-self: center; }
  .particle-ribbon { mask-image: none; }
  .preparation { margin-top: 22px; gap: 12px; }
  .hero-actions .button { flex: 1 1 auto; }
  .copy-box, .image-row { grid-template-columns: minmax(0, 1fr); }
  .image-row { gap: 0; }
  .warning { padding: 16px; gap: 10px; }
  .lightbox { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
