:root {
  --c-primary-bg: #F2F4F3;
  --c-secondary-bg: #E5E9EC;
  --c-ink: #1F2937;
  --c-deep: #2F3E46;
  --c-mid: #4A5D6B;
  --c-accent: #E8590C;
  --c-highlight: #FFF0E6;
  --c-muted: #6B7280;
  --font-heading: "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell-width: 1200px;
  --radius-card: 12px;
  --radius-tag: 4px;
  --shadow-float: 0 6px 20px rgba(47, 62, 70, .08);
  --shadow-lift: 0 14px 32px rgba(47, 62, 70, .16);
  --ease: cubic-bezier(.25, .46, .45, .94);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--c-primary-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-deep);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--c-mid);
  text-decoration: none;
  transition: color .12s var(--ease);
}

a:hover {
  color: var(--c-accent);
}

button {
  font: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

#main-content {
  outline: none;
  scroll-margin-top: 90px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(100% - 40px, var(--shell-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 3000;
  padding: 10px 16px;
  background: var(--c-deep);
  color: #fff;
  border-radius: 0 0 6px 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(47, 62, 70, .3);
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--c-primary-bg);
  background-image: linear-gradient(180deg, rgba(74, 93, 107, .07), transparent 96px);
  border-bottom: 1px solid rgba(74, 93, 107, .14);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent) 0%, rgba(232, 89, 12, 0) 55%);
  opacity: .35;
  pointer-events: none;
  z-index: 5;
}

.header-console {
  background: var(--c-deep);
  color: rgba(242, 244, 243, .72);
  border-bottom: 1px solid rgba(242, 244, 243, .08);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

.header-console-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 28px;
  transition: min-height .18s var(--ease);
}

.site-header.is-compact .header-console-inner {
  min-height: 22px;
}

.console-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.console-item--code {
  color: rgba(242, 244, 243, .9);
}

.console-item--right {
  margin-left: auto;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(232, 89, 12, .22);
  animation: pulse-console 2.4s ease-in-out infinite;
}

@keyframes pulse-console {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(232, 89, 12, .28);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(232, 89, 12, .08);
  }
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
  transition: padding .18s var(--ease);
}

.site-header.is-compact .header-main {
  padding-block: 8px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.brand-lockup:hover {
  color: inherit;
}

.brand-mark {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(232, 89, 12, .4);
  transition: width .18s var(--ease), height .18s var(--ease), font-size .18s var(--ease);
}

.site-header.is-compact .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.brand-copy {
  display: block;
}

.brand-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-deep);
  line-height: 1.2;
  letter-spacing: .05em;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
  letter-spacing: .08em;
  transition: opacity .18s var(--ease), display .18s var(--ease);
}

.site-header.is-compact .brand-subtitle {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--c-mid);
  border-radius: var(--radius-tag);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-deep);
  transition: border-color .12s, color .12s;
}

.nav-toggle:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 11px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .18s var(--ease);
}

.nav-toggle-icon::before {
  top: 0;
}

.nav-toggle-icon::after {
  bottom: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: translateY(4.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  transform: translateY(-4.5px) rotate(-45deg);
}

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 13px;
}

.site-nav {
  border-top: 1px solid rgba(74, 93, 107, .08);
}

.nav-inner {
  padding-block: 0;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  color: var(--c-mid);
  font-size: 15px;
  position: relative;
  transition: color .12s, background .12s;
}

.nav-link:hover {
  color: var(--c-ink);
  background: rgba(74, 93, 107, .07);
}

.nav-link[aria-current="page"] {
  color: var(--c-ink);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px 2px 0 0;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-accent);
  opacity: .7;
}

.nav-label {
  font-family: var(--font-body);
  line-height: 1.2;
}

.progress-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  z-index: 20;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--c-accent);
}

.site-footer {
  position: relative;
  margin-top: 64px;
  border-radius: 56px 10px 0 0;
  background-color: var(--c-deep);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(242, 244, 243, .08), transparent 260px),
    radial-gradient(circle at 4% 88%, rgba(232, 89, 12, .08), transparent 220px);
  color: rgba(242, 244, 243, .82);
}

.footer-inner {
  width: min(100% - 40px, var(--shell-width));
  margin-inline: auto;
  padding-block: 40px 8px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px 40px;
  margin-bottom: 24px;
}

.footer-about {
  min-width: 0;
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand-mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 244, 243, .6);
  box-shadow: inset 0 0 0 3px rgba(232, 89, 12, .3);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  border-radius: 4px;
}

.footer-brand-copy {
  display: inline-block;
}

.footer-brand-name {
  display: block;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.footer-brand-tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(242, 244, 243, .55);
}

.footer-statement {
  margin: 0;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(242, 244, 243, .72);
}

.footer-col,
.footer-contact {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .78;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-block;
  color: rgba(242, 244, 243, .74);
  font-size: 14px;
  transition: color .12s, transform .12s;
}

.footer-link:hover {
  color: #fff;
  transform: translateX(4px);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.contact-line {
  color: rgba(242, 244, 243, .78);
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(242, 244, 243, .14);
  padding-block: 14px 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(242, 244, 243, .58);
}

.footer-icp {
  color: rgba(242, 244, 243, .8);
}

.footer-service {
  white-space: nowrap;
}

.footer-legal {
  display: inline-flex;
  gap: 14px;
  margin-left: auto;
}

.footer-legal .footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 244, 243, .45);
  border-radius: 50%;
  background: var(--c-deep);
  color: rgba(242, 244, 243, .86);
  font-family: var(--font-mono);
  font-size: 17px;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), border-color .12s, color .12s;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.page-container {
  width: min(100% - 40px, var(--shell-width));
  margin-inline: auto;
  padding-block: 28px 72px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--c-mid);
  border-radius: var(--radius-tag);
  background: transparent;
  color: var(--c-deep);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
}

.btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.btn-accent {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--c-deep);
  border-color: var(--c-deep);
  color: #fff;
}

.btn-ghost {
  border-color: rgba(242, 244, 243, .5);
  color: rgba(242, 244, 243, .9);
}

.btn-ghost:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.card-panel {
  padding: 24px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(74, 93, 107, .1);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.card-panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.section-tag::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--c-accent);
}

.image-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--c-secondary-bg);
  background-image:
    radial-gradient(circle at 30% 35%, rgba(74, 93, 107, .18), transparent 55%),
    linear-gradient(135deg, var(--c-secondary-bg), rgba(74, 93, 107, .65));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
}

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

.image-frame.is-wide {
  aspect-ratio: 21 / 9;
}

.image-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 18px 0 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-muted);
}

.breadcrumb::before {
  content: "//";
  color: var(--c-accent);
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--c-mid);
}

.breadcrumb a:hover {
  color: var(--c-accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-ink);
}

.prose {
  max-width: 74ch;
}

.prose p {
  margin: 0 0 1.2em;
}

.prose h2 {
  margin-top: 2em;
}

.prose ul,
.prose ol {
  list-style: square;
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: .4em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(232, 89, 12, .4);
  text-underline-offset: 4px;
}

.grid {
  display: grid;
  gap: 28px;
}

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

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

.grid--aside {
  grid-template-columns: minmax(0, 1fr) 320px;
}

@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-top: 0;
    background-color: var(--c-primary-bg);
    border-bottom: 1px solid rgba(74, 93, 107, .14);
    box-shadow: 0 16px 32px rgba(47, 62, 70, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 8px 0;
  }

  .nav-link {
    width: 100%;
    padding: 11px 8px;
  }

  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 2px;
    height: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 767px) {
  .site-footer {
    border-radius: 24px 6px 0 0;
    margin-top: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    margin-left: 0;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .console-item--code,
  .console-item--right {
    display: none;
  }

  .header-console-inner {
    min-height: 24px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .status-dot {
    animation: none;
  }
}
