:root {
  color-scheme: dark;
  --page-bg: #1a1e2b;
  --surface: #222639;
  --surface-raised: #2c3148;
  --surface-hover: #353b55;
  --surface-active: #2a3a5c;
  --border: #2e3450;
  --border-strong: #404765;
  --text-primary: #c5c9d6;
  --text-secondary: #9ca0b0;
  --text-muted: #6b6f82;
  --brand: #2962ff;
  --brand-hover: #1e53e5;
  --cyan: #22d3ee;
  --up: #f23645;
  --down: #089981;
  --warning: #f6ad55;
  --hero-overlay: linear-gradient(90deg, rgba(10, 13, 22, 0.97) 0%, rgba(12, 16, 28, 0.88) 43%, rgba(10, 13, 22, 0.42) 72%, rgba(10, 13, 22, 0.72) 100%);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  --header-bg: rgba(26, 30, 43, 0.92);
  --content-width: 1180px;
}

html[data-theme="light"] {
  color-scheme: light;
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f1f3f6;
  --surface-hover: #f1f3f6;
  --surface-active: #e0e3eb;
  --border: #e0e3eb;
  --border-strong: #c5cbce;
  --text-primary: #131722;
  --text-secondary: #787b86;
  --text-muted: #999999;
  --brand: #2962ff;
  --brand-hover: #1e53e5;
  --cyan: #027e97;
  --up: #ef5350;
  --down: #26a69a;
  --warning: #b36b00;
  --hero-overlay: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.91) 44%, rgba(255, 255, 255, 0.54) 73%, rgba(255, 255, 255, 0.78) 100%);
  --shadow: 0 18px 50px rgba(19, 23, 34, 0.1);
  --header-bg: rgba(255, 255, 255, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1080px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1080px;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body::selection {
  color: #fff;
  background: var(--brand);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.container {
  width: min(var(--content-width), calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 700;
}

.brand__mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid var(--cyan);
  border-radius: 5px;
  background: var(--surface);
}

.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--cyan);
  transform-origin: left center;
}

.brand__mark::before {
  width: 12px;
  left: 6px;
  top: 20px;
  transform: rotate(-62deg);
}

.brand__mark::after {
  width: 13px;
  left: 15px;
  top: 12px;
  transform: rotate(42deg);
}

.brand__name strong {
  color: var(--brand);
}

.site-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-primary);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
  border-color: var(--brand);
  background: var(--surface-hover);
}

.theme-icon {
  font-size: 17px;
  line-height: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.button--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.button--ghost {
  background: transparent;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-hero {
  position: relative;
  display: flex;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  background-image: var(--hero-overlay), url("./product-workspace.png");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--border);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 72%, var(--page-bg) 100%);
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: min(var(--content-width), calc(100% - 64px));
  margin: 0 auto;
  padding: 88px 0 112px;
}

.home-hero__copy {
  max-width: 650px;
}

.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-hero h1,
.page-hero h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 52px;
  line-height: 1.14;
  letter-spacing: 0;
}

.home-hero__lead {
  margin: 24px 0 0;
  max-width: 610px;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-proof {
  display: flex;
  gap: 28px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.hero-proof li {
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 13px;
}

.hero-proof strong {
  display: block;
  color: var(--text-primary);
  font-size: 16px;
}

.page-hero {
  padding: 82px 0 72px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.page-hero__copy {
  max-width: 720px;
}

.page-hero p {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
}

.page-hero--center .page-hero__copy {
  margin: 0 auto;
  text-align: center;
}

.section {
  padding: 78px 0;
  border-bottom: 1px solid var(--border);
}

.section--raised {
  background: var(--surface-raised);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--text-secondary);
}

.capability-grid,
.category-grid,
.article-grid,
.principle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.capability,
.category-card,
.article-card,
.principle-card {
  min-height: 188px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

a.category-card:hover,
a.article-card:hover {
  border-color: var(--brand);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.capability__index,
.article-card__meta {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.capability h3,
.category-card h3,
.article-card h3,
.principle-card h3 {
  margin: 18px 0 8px;
  color: var(--text-primary);
  font-size: 18px;
}

.capability p,
.category-card p,
.article-card p,
.principle-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.category-card__count {
  display: block;
  margin-top: 22px;
  color: var(--cyan);
  font-size: 13px;
}

.product-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 54px;
  align-items: center;
}

.product-band__copy h2 {
  margin: 0 0 18px;
  font-size: 32px;
}

.product-band__copy p {
  color: var(--text-secondary);
}

.product-band__visual {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

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

.status-legend {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 13px;
}

.status-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.status-legend .is-up::before {
  background: var(--up);
}

.status-legend .is-down::before {
  background: var(--down);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--brand);
  background: var(--surface-active);
  color: var(--text-primary);
}

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

.article-card {
  min-height: 220px;
}

.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 12px;
}

.search-box {
  position: relative;
  width: min(620px, 100%);
  margin: 30px auto 0;
}

.search-box input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.search-box input:focus {
  border-color: var(--brand);
}

.search-box::before {
  content: "⌕";
  position: absolute;
  left: 18px;
  top: 8px;
  z-index: 1;
  color: var(--text-muted);
  font-size: 24px;
}

.guide-list {
  border-top: 1px solid var(--border);
}

.guide-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--border);
}

.guide-link:hover {
  background: var(--surface-hover);
}

.guide-link h3 {
  margin: 0;
  font-size: 16px;
}

.guide-link p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.guide-link__arrow {
  align-self: center;
  color: var(--text-muted);
}

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

.faq-group h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.faq-toggle::after {
  content: "+";
  color: var(--text-muted);
  font-size: 20px;
}

.faq-toggle[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0 28px 18px 4px;
  color: var(--text-secondary);
  font-size: 14px;
}

.faq-toggle[aria-expanded="true"] + .faq-answer {
  display: block;
}

.about-statement {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 72px;
}

.about-statement h2 {
  margin: 0;
  font-size: 30px;
}

.about-statement__body {
  color: var(--text-secondary);
  font-size: 16px;
}

.about-statement__body p:first-child {
  margin-top: 0;
}

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

.contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 34px 0;
}

.contact-strip h2 {
  margin: 0;
  font-size: 24px;
}

.contact-strip p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.detail-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 64px;
  justify-content: center;
  padding: 72px 0 96px;
}

.detail-aside {
  position: sticky;
  top: 96px;
  align-self: start;
}

.detail-aside__back {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}

.detail-aside dl {
  margin: 30px 0 0;
}

.detail-aside dt {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.detail-aside dd {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.article-detail h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.25;
}

.article-detail__lead {
  margin: 20px 0 38px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 17px;
}

.article-detail section {
  margin-top: 42px;
}

.article-detail h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-detail p,
.article-detail li {
  color: var(--text-secondary);
}

.article-detail ul,
.article-detail ol {
  padding-left: 22px;
}

.article-note {
  margin-top: 32px;
  padding: 18px 20px;
  border-left: 3px solid var(--warning);
  background: var(--surface-raised);
  color: var(--text-secondary);
}

.empty-state {
  display: none;
  padding: 48px;
  border: 1px dashed var(--border-strong);
  color: var(--text-secondary);
  text-align: center;
}

.site-footer {
  padding: 42px 0;
  background: var(--surface);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-footer__meta {
  color: var(--text-muted);
  font-size: 12px;
}

.site-footer__records {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.site-footer__records a {
  color: var(--text-muted);
}

.site-footer__records a:hover {
  color: var(--text-primary);
}

.site-footer__links {
  display: flex;
  gap: 22px;
  color: var(--text-secondary);
  font-size: 13px;
}

.site-footer__links a:hover {
  color: var(--text-primary);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.qr-dialog {
  width: 430px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.qr-dialog::backdrop {
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.qr-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.qr-dialog__header h2 {
  margin: 0;
  font-size: 17px;
}

.qr-dialog__close {
  border: 0;
  background: transparent;
  font-size: 22px;
}

.qr-dialog__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 34px 32px;
  text-align: center;
}

.qr-dialog__body img {
  width: 280px;
  height: 280px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}

.qr-dialog__body p {
  margin: 18px 0 0;
  color: var(--text-secondary);
}

.qr-dialog__body strong {
  margin: 2px 0 18px;
  color: var(--text-primary);
  font-size: 16px;
}

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