:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --ink: #182033;
  --muted: #637086;
  --line: #dbe3ef;
  --teal: #12b8a6;
  --teal-dark: #087f75;
  --blue: #2d6cdf;
  --gold: #d99023;
  --danger: #c84444;
  --shadow: 0 18px 45px rgba(39, 56, 89, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(18, 184, 166, 0.08), transparent 380px),
    radial-gradient(circle at 100% 0%, rgba(45, 108, 223, 0.12), transparent 340px),
    var(--bg);
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

code,
kbd,
pre {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(219, 227, 239, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 218px;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.quick-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.quick-nav a {
  padding: 9px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
}

.quick-nav a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.top-action,
.primary-button,
.secondary-button,
.copy-button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.top-action,
.primary-button {
  padding: 0 16px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(18, 184, 166, 0.24);
}

.top-action:hover,
.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  padding: 0 16px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.secondary-button:hover {
  border-color: rgba(18, 184, 166, 0.45);
  color: var(--teal-dark);
}

.topbar svg,
.content svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.page {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0 64px;
}

.side-index {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(39, 56, 89, 0.08);
}

.index-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.side-index a {
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.side-index a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.content {
  min-width: 0;
  overflow: hidden;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.intro-copy,
.status-panel,
.section-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.intro > *,
.image-grid > *,
.price-table > *,
.info-grid > * {
  min-width: 0;
}

.intro-copy {
  padding: clamp(28px, 5vw, 54px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
}

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

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.intro-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.status-panel {
  padding: 24px;
  background: #142036;
  color: #fff;
}

.panel-title {
  margin: 0 0 18px;
  color: #aee9e1;
  font-size: 14px;
  font-weight: 800;
}

.check-list,
.safety-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li,
.safety-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  line-height: 1.7;
}

.check-list svg {
  margin-top: 3px;
  color: #64d8c8;
}

.panel-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(174, 233, 225, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d9f8f4;
  line-height: 1.7;
}

.section-block {
  margin-top: 20px;
  padding: clamp(20px, 4vw, 36px);
  scroll-margin-top: 100px;
}

.section-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.step-number {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #142036;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: 0;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.link-row {
  margin: 8px 0 18px;
}

.link-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 700;
}

.image-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101827;
}

.image-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.image-frame img[src*="installer-setup"] {
  object-fit: contain;
  background: #eef2f7;
}

.image-frame figcaption {
  padding: 12px 14px;
  color: #4d5a6e;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.image-grid {
  display: grid;
  gap: 16px;
}

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

.price-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.price-table div {
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.price-table strong,
.price-table span {
  display: block;
}

.price-table strong {
  font-size: 18px;
}

.price-table span {
  margin-top: 8px;
  color: var(--muted);
}

.price-table .recommended {
  border-color: rgba(18, 184, 166, 0.54);
  background: #eafaf7;
}

.price-table .recommended strong {
  color: var(--teal-dark);
}

.body-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.tabs {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.tab-list {
  display: flex;
  gap: 0;
  padding: 8px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.tab-button {
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.is-active {
  background: #fff;
  color: var(--teal-dark);
  box-shadow: 0 8px 20px rgba(39, 56, 89, 0.08);
}

.tab-panel {
  display: none;
  padding: 22px;
  background: #fff;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel h3,
.info-grid h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.steps {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}

.steps li + li {
  margin-top: 12px;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88em;
}

.copy-line {
  width: min(100%, 620px);
  min-height: 46px;
  margin-top: 8px;
  padding: 8px 8px 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.copy-line code {
  flex: 1;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--teal-dark);
  border-color: rgba(18, 184, 166, 0.45);
}

.code-card {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #23324f;
  border-radius: var(--radius);
  background: #101827;
}

.code-card-header {
  min-height: 52px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #243550;
  color: #d9e8ff;
}

.code-card-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.copy-button {
  min-height: 36px;
  padding: 0 12px;
  border-color: #314563;
  background: #17243a;
  color: #d9e8ff;
  font-weight: 700;
}

.copy-button:hover {
  border-color: #4e6a94;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #f5f7fb;
  font-size: 14px;
  line-height: 1.75;
}

.warning-code {
  border-color: rgba(200, 68, 68, 0.42);
}

.warning-code p {
  margin: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid #243550;
  color: #ffd6d6;
  line-height: 1.7;
}

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

.info-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.info-grid svg {
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  color: var(--teal-dark);
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.safety {
  background: #fff8ee;
  border-color: #f3d3a8;
}

.safety .step-number {
  background: var(--gold);
}

.safety-list li {
  padding: 14px 16px;
  border: 1px solid #f0d3a8;
  border-radius: var(--radius);
  background: #fff;
  color: #53402a;
}

.safety-list svg {
  margin-top: 4px;
  color: var(--gold);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #142036;
  color: #fff;
  box-shadow: 0 16px 34px rgba(20, 32, 54, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .quick-nav {
    display: none;
  }

  .page {
    grid-template-columns: 1fr;
  }

  .side-index {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .index-title {
    grid-column: 1 / -1;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .image-grid.two,
  .price-table,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 100%;
  }

  .top-action {
    width: 100%;
  }

  .page {
    width: auto;
    margin: 0 12px;
    padding-top: 16px;
  }

  .side-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .side-index a {
    font-size: 13px;
  }

  .intro-copy,
  .status-panel,
  .section-block {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
    line-height: 1.15;
    word-break: break-word;
  }

  h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .intro-copy > p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.75;
  }

  .intro-actions,
  .tab-list {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .tab-button {
    width: 100%;
  }

  .section-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .step-number {
    width: 44px;
    height: 44px;
  }

  .link-row a {
    width: 100%;
    justify-content: center;
  }

  .image-frame img {
    aspect-ratio: 4 / 3;
  }

  .copy-line {
    align-items: flex-start;
  }

  .code-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }

  pre {
    font-size: 13px;
  }
}
