:root {
  color-scheme: dark;
  --background: #0b111c;
  --panel: #101a28;
  --ink: #eff5fb;
  --muted: #aebdce;
  --line: #2a3a4e;
  --accent: #94e6ff;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); }
figure, fieldset, dl, dd, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

.shell { width: min(100% - 6rem, 76rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.7rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 650; white-space: nowrap; }
.brand-mark {
  min-width: 2.35rem;
  min-height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid #426884;
  border-radius: 0.4rem;
  background: #17283a;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 800;
}
nav { display: flex; gap: clamp(1.3rem, 4vw, 3rem); align-items: center; color: var(--muted); }
nav a { padding-block: 0.85rem; font-size: 0.95rem; white-space: nowrap; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(2.1rem, 5.6vw, 5.3rem);
  padding-block: clamp(3.4rem, 6.5vw, 5.7rem) clamp(3.15rem, 6vw, 5.15rem);
}
.hero-copy { min-width: 0; }
.hero-word {
  color: var(--accent);
  font-weight: 800;
  font-size: clamp(5.4rem, 11vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.085em;
  margin: 0 0 0.32em -0.04em;
}
.hero h1 { font-size: clamp(1.75rem, 3.5vw, 3.25rem); line-height: 1.27; letter-spacing: -0.04em; }
.hero-copy p { color: var(--muted); max-width: 27rem; font-size: 1.1rem; line-height: 1.8; margin-top: 1rem; }
.hero-copy .hero-lead { color: var(--ink); font-size: clamp(1.17rem, 1.65vw, 1.48rem); font-weight: 650; margin-top: 1.25rem; }
.hero-lead + p { margin-top: 0.55rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: 1.9rem;
  padding-inline: 1.25rem;
  border-radius: 0.45rem;
  background: var(--accent);
  color: #081524;
  font-weight: 700;
}
.button:hover { background: #c1f0ff; color: #081524; }
.hero-image, .case-image {
  position: relative;
  align-self: center;
  aspect-ratio: 1.5;
  overflow: hidden;
  border: 1px solid #33445a;
  border-radius: 0.65rem;
  background: #172434;
}
.hero-image img, .case-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-image figcaption, .case-image figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.25rem;
  background: #0b111c;
  font-size: 0.82rem;
}

.section { padding-block: clamp(2.8rem, 6vw, 4.8rem); scroll-margin-top: 1rem; }
.focus { border-top: 1px solid var(--line); }
.section-heading h2 { font-size: clamp(1.72rem, 3.2vw, 2.6rem); line-height: 1.26; letter-spacing: -0.035em; }
.section-heading p { margin-top: 0.75rem; line-height: 1.8; color: var(--muted); }
.focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; margin-top: 1.8rem; }
.focus-grid article {
  border: 1px solid var(--line);
  border-top-color: #52758f;
  padding: 1.35rem 1.4rem 1.55rem;
  background: var(--panel);
  border-radius: 0.45rem;
}
.focus-grid h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.focus-grid p, details p { color: var(--muted); line-height: 1.8; }

.workflow-band { background: #101a28; border-block: 1px solid var(--line); }
.split, .workflow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 7vw, 6rem); }
.split { align-items: center; }
.workflow { align-items: start; }
.example { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.case-phases { margin-top: 1.3rem; border-top: 1px solid var(--line); }
.case-phases > div { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.75rem; padding-block: 0.6rem; border-bottom: 1px solid var(--line); }
.case-phases dt { color: var(--accent); font-weight: 650; }
.case-phases dd { color: var(--muted); line-height: 1.6; }
.case-copy .case-note { font-size: 0.88rem; }

.kinematics {
  min-inline-size: 0;
  padding: 0.8rem clamp(0.85rem, 2vw, 1.5rem) 1.15rem;
  border: 1px solid #44617b;
  border-radius: 0.65rem;
  background: #0b1420;
}
.kinematics legend { padding-inline: 0.45rem; color: var(--accent); font-weight: 700; }
#rtcp-instructions { margin-bottom: 0.8rem; color: var(--muted); line-height: 1.6; }
.kinematics input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.kinematics label {
  display: inline-grid;
  place-items: center;
  min-inline-size: 3.55rem;
  min-block-size: 2.75rem;
  margin-right: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.38rem;
  cursor: pointer;
}
.kinematics input:checked + label { background: var(--accent); border-color: var(--accent); color: #081524; font-weight: 700; }
.kinematics input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }
.motion-plot {
  --angle: 0deg;
  --point-x: 36px;
  --point-y: -26px;
  position: relative;
  overflow: hidden;
  height: 12.3rem;
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background:
    linear-gradient(#22354b77 1px, transparent 1px),
    linear-gradient(90deg, #22354b77 1px, transparent 1px),
    #101e30;
  background-size: 1.25rem 1.25rem;
}
#tilt-left:checked ~ .motion-plot { --angle: -30deg; --point-x: 18.2px; --point-y: -40.5px; }
#tilt-right:checked ~ .motion-plot { --angle: 30deg; --point-x: 44.2px; --point-y: -4.5px; }
.plot-table, .plot-pivot { position: absolute; left: 50%; top: 63%; }
.plot-table { transform: rotate(var(--angle)); }
.plot-table::before {
  content: "";
  position: absolute;
  top: 0;
  left: -85px;
  width: 170px;
  height: 19px;
  background: #385673;
  border: 1px solid #86a6c7;
  border-radius: 3px;
}
.plot-workpiece {
  position: absolute;
  top: -26px;
  left: -54px;
  width: 108px;
  height: 26px;
  background: #8197aa;
  border: 1px solid #c1d3df;
  border-radius: 3px 3px 0 0;
}
.plot-target, .plot-pivot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.plot-target { position: absolute; z-index: 1; top: -26px; left: 36px; background: #ffd08b; }
.plot-pivot { border: 1px solid var(--ink); background: #14263a; }
.plot-tool {
  position: absolute;
  top: calc(63% + var(--point-y));
  left: calc(50% + var(--point-x));
  width: 17px;
  height: 56px;
  transform: translate(-50%, -100%);
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 73%, 61% 87%, 50% 100%, 39% 87%, 0 73%);
}
.plot-key { display: flex; flex-wrap: wrap; gap: 0.45rem 1.05rem; margin-top: 0.65rem; color: var(--muted); font-size: 0.875rem; }
.plot-key span { display: inline-flex; align-items: center; gap: 0.42rem; }
.plot-key span::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }
.plot-key span:nth-child(2)::before { background: #ffd08b; }
.plot-key span:nth-child(3)::before { background: transparent; border: 1px solid var(--ink); }

.steps { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 650;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: 0 0 0.55rem;
  height: 0.55rem;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-0.15rem) rotate(45deg);
  margin-right: 0.25rem;
}
details[open] summary::after { transform: translateY(0.15rem) rotate(225deg); }
details p { padding: 0 1.5rem 1rem 0; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.8rem; color: var(--muted); }

@media (max-width: 56rem) {
  .shell { width: min(100% - 3rem, 76rem); }
  .hero { gap: 1.6rem; }
  .hero-image { align-self: center; }
}

@media (max-width: 42rem) {
  .shell { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 4rem; }
  nav { gap: 0.85rem; }
  nav a { font-size: 0.875rem; }
  .hero, .focus-grid, .split, .workflow, .example { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 3.1rem 2.6rem; gap: 1.8rem; }
  .hero-word { font-size: clamp(5rem, 23vw, 7.25rem); }
  .hero-image { aspect-ratio: 1.5; }
  .focus-grid { gap: 0.65rem; }
  .split, .workflow { gap: 1.5rem; }
  .case-copy { order: -1; }
}

@media (max-width: 22rem) {
  .shell { width: calc(100% - 2rem); }
  nav { gap: 0.55rem; }
  nav a { font-size: 0.82rem; }
}

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