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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #0D0D0D;
  color: #E5E5E5;
  font-family: "Noto Sans SC", "Source Han Sans CN", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
}

:root {
  --black: #0D0D0D;
  --red: #E63946;
  --red-bright: #FF4D5A;
  --red-dark: #9A1B2E;
  --gold: #F4A950;
  --light: #E5E5E5;
  --mid-gray: #4A4A4A;
  --red-black: #1A0A0D;
  --white-smoke: #F5F5F5;
  --data-green: #2A9D8F;
  --header-h: 72px;
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }
}

main {
  display: block;
}

.site-main {
  min-height: 70vh;
  padding-top: var(--header-h);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
  position: relative;
}

.section--speed {
  position: relative;
  overflow: hidden;
}

.section--speed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-55deg, rgba(230, 57, 70, 0.12) 0, rgba(230, 57, 70, 0.12) 1px, transparent 1px, transparent 16px);
  pointer-events: none;
}

.section--speed > * {
  position: relative;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.section-title::before {
  content: "";
  width: 0.5rem;
  height: 2.1em;
  flex: 0 0 auto;
  background: var(--red);
  transform: skewX(-10deg);
}

.prose {
  max-width: 68ch;
}

.prose p {
  margin-bottom: 1rem;
}

.prose h2,
.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 900;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

@media (max-width: 860px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  background: #121212;
  border: 1px solid var(--red-dark);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  position: relative;
}

.panel--light {
  background: var(--white-smoke);
  color: var(--black);
  border: none;
}

.panel--light h1,
.panel--light h2,
.panel--light h3 {
  color: var(--black);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--red);
  border: 2px solid var(--red);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  color: var(--red);
}

.btn-ghost:hover {
  background: var(--red);
  color: #FFFFFF;
}

.tag {
  display: inline-block;
  padding: 0.25em 0.7em;
  background: var(--red);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.tag--gold {
  background: var(--gold);
  color: var(--black);
}

.tag--dark {
  background: var(--red-dark);
  color: var(--light);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--mid-gray);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--red-dark);
}

.breadcrumbs a {
  color: var(--mid-gray);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.breadcrumbs [aria-current] {
  color: var(--gold);
}

.media-card {
  position: relative;
  background: #121212;
  border: 1px solid var(--red-dark);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(230, 57, 70, 0.6);
}

.card-body {
  padding: 1rem;
}

.data-card {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(13, 13, 13, 0.6) 60%);
  border: 1px solid var(--red-dark);
  padding: 1.25rem;
  position: relative;
}

.data-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: "Roboto Mono", "Courier New", monospace;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

.data-value {
  font-family: "Roboto Mono", "Courier New", monospace;
  font-weight: 500;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--light);
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.25), rgba(13, 13, 13, 0.92)),
    repeating-linear-gradient(-45deg, rgba(230, 57, 70, 0.2) 0, rgba(230, 57, 70, 0.2) 2px, transparent 2px, transparent 12px);
  border: 1px solid var(--red-dark);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-frame--hero {
  aspect-ratio: 16 / 10;
  min-height: 300px;
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  background: var(--gold);
  color: var(--black);
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  z-index: 1500;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(13, 13, 13, 0.92);
  border-bottom-color: var(--red-dark);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.35);
}

.header-inner {
  width: min(100% - 2rem, 1440px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-block;
  background: var(--red);
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.35em 0.5em;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, calc(100% - 0.3em) 0, 100% 0.3em, 100% 100%, 0 100%);
}

.brand-sub {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 0.3em 0.4em 0.3em 0.6em;
  line-height: 1;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.75rem;
  color: var(--light);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 100%;
  bottom: 0.2rem;
  height: 2px;
  background: var(--red);
  transition: right 0.2s ease;
}

.nav-link:hover {
  color: var(--red);
  background: rgba(230, 57, 70, 0.12);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  right: 0.75rem;
}

.nav-link[aria-current="page"] {
  color: var(--gold);
  background: rgba(230, 57, 70, 0.16);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.version-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--red);
  border: 2px solid var(--red);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.version-switch:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
}

.version-switch-icon {
  color: var(--gold);
  font-size: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--red-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--red);
  background: rgba(230, 57, 70, 0.1);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--light);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover .nav-toggle-bar {
  background: var(--gold);
}

.nav-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--red-dark);
  color: var(--light);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-close:hover {
  color: var(--red);
  border-color: var(--red);
}

.site-footer {
  background: linear-gradient(180deg, #0D0D0D 0%, #1A0A0D 100%);
  border-top: 4px solid var(--red-dark);
  padding-top: clamp(3rem, 6vw, 5rem);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-brand .brand {
  margin-bottom: 1.2rem;
}

.footer-trust {
  max-width: 40ch;
  color: var(--mid-gray);
  font-size: 0.92rem;
  line-height: 1.8;
  border-left: 3px solid var(--red);
  padding-left: 0.85rem;
}

.footer-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--red-dark);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  color: var(--light);
}

.footer-contact-list a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-list a:hover {
  color: var(--red);
}

.footer-note {
  color: var(--mid-gray);
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--red-dark);
  color: var(--mid-gray);
  font-size: 0.85rem;
}

.copyright,
.icp {
  margin: 0;
}

.icp {
  font-family: "Roboto Mono", "Courier New", monospace;
  color: var(--gold);
}

.nav-locked {
  overflow: hidden;
}

body.version-switching::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(230, 57, 70, 0.85) 0, rgba(230, 57, 70, 0.85) 2px, transparent 2px, transparent 12px);
  animation: version-sweep 0.16s linear;
}

@keyframes version-sweep {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(244, 169, 80, 0.22);
}

html[data-version="apple"] .container {
  max-width: 1080px;
}

html[data-version="apple"] .btn,
html[data-version="apple"] .version-switch,
html[data-version="apple"] .media-card,
html[data-version="apple"] .panel {
  border-radius: 14px 14px 14px 0;
  clip-path: none;
}

html[data-version="apple"] .brand-mark {
  background: var(--black);
  color: var(--gold);
  outline: 1px solid var(--gold);
}

html[data-version="apple"] .section-title {
  font-weight: 800;
}

html[data-version="apple"] .nav-link[aria-current="page"] {
  color: var(--gold);
}

html[data-version="apple"] .site-header.is-scrolled {
  background: rgba(26, 10, 13, 0.95);
}

html[data-version="apple"] .nav-toggle {
  border-radius: 10px;
}

html[data-version="apple"] .data-card {
  border-radius: 12px;
}

html[data-version="apple"] .media-frame {
  border-radius: 16px;
  clip-path: none;
}

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

@media (max-width: 860px) {
  .header-inner {
    padding-block: 0.55rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-close {
    display: flex;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 380px);
    background: linear-gradient(135deg, #1A0A0D 0%, #0D0D0D 70%);
    border-left: 4px solid var(--red);
    transform: translateX(100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    align-items: flex-start;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    box-shadow: -1rem 0 2rem rgba(0, 0, 0, 0.6);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 4.5rem 1.25rem 2rem;
  }

  .nav-item {
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
  }

  .nav-link {
    display: block;
    padding: 0.85rem 0.5rem;
    font-size: 1.05rem;
  }

  .nav-link::after {
    left: 0.5rem;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    right: 0.5rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    width: min(100% - 1.25rem, 100%);
  }

  .version-switch {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .version-switch-icon {
    font-size: 0.9rem;
  }

  .brand-mark {
    font-size: 1rem;
  }

  .brand-sub {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

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

  html {
    scroll-behavior: auto;
  }

  .scroll-progress {
    transition: none;
  }

  body.version-switching::before {
    background: none;
    animation: none;
  }
}
