/* ============ Reset & Variables ============ */
:root {
  --green-deep: #1B5E20;
  --green-bright: #4CAF50;
  --blue-sky: #1E88E5;
  --blue-light: #90CAF9;
  --yellow-match: #FFC107;
  --space-dark: #0B1D2A;
  --bg-light: #F5F8FA;
  --bg-card: #FFFFFF;
  --ink: #1A1A1A;
  --ink-secondary: #5A5A5A;
  --line: #D0D8E0;
  --font-display: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;
  --container: 1200px;
  --container-narrow: 840px;
  --radius: 0px;
  --shadow: 0 8px 30px rgba(11, 29, 42, 0.08);
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main#main-content {
  flex: 1 0 auto;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--blue-sky);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

a:hover {
  color: var(--green-deep);
}

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

::selection {
  background: var(--yellow-match);
  color: var(--ink);
}

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.section {
  padding: 80px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-sky);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--ink-secondary);
  font-size: 15px;
  margin-top: 8px;
}

.prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.prose p {
  margin-bottom: 1.2em;
}

.prose h2, .prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.prose h2 {
  font-size: 1.6rem;
}

.prose h3 {
  font-size: 1.25rem;
}

.prose ul, .prose ol {
  padding-left: 1.2em;
  margin-bottom: 1.2em;
}

.prose ul li {
  list-style: square;
}

.prose ol li {
  list-style: decimal;
}

.prose strong {
  color: var(--green-deep);
  font-weight: 700;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(30, 136, 229, 0.08);
  padding: 2px 6px;
}

blockquote {
  margin: 1.5em 0;
  padding: 16px 24px;
  border-left: 4px solid var(--yellow-match);
  background: rgba(255, 193, 7, 0.08);
  font-style: italic;
}

/* ============ Skip Link ============ */
.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2000;
  padding: 8px 16px;
  background: var(--yellow-match);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

/* ============ Header & Navigation ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: padding 0.3s ease;
}

.site-header[data-scrolled="true"] {
  padding: 8px 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(245, 248, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 10px 18px;
  box-shadow: 0 4px 24px rgba(11, 29, 42, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--green-deep);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--green-deep);
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-deep) 45%, var(--yellow-match) 45%, var(--yellow-match) 55%, var(--green-deep) 55%, var(--green-deep) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  flex-shrink: 0;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 10px;
}

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

.nav-link {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(27, 94, 32, 0.06);
  color: var(--green-deep);
}

.nav-link[aria-current="page"] {
  background: var(--green-deep);
  color: #ffffff;
  font-weight: 600;
}

.nav-link[aria-current="page"]:hover {
  background: var(--green-deep);
  color: #ffffff;
}

.nav-cta {
  margin-left: auto;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-card);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Scroll Progress */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-sky), var(--yellow-match));
  transition: width 0.1s linear;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--space-dark);
  color: #E6ECEF;
  padding: 64px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-footer {
  color: #ffffff;
  margin-bottom: 20px;
}

.brand-footer:hover {
  color: var(--yellow-match);
}

.footer-trust {
  font-size: 14px;
  line-height: 1.7;
  color: #B0C3CE;
  max-width: 340px;
  margin-bottom: 24px;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-bright);
  display: inline-block;
}

.footer-nav-list li {
  margin-bottom: 10px;
}

.footer-nav-list a {
  color: #B0C3CE;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}

.footer-nav-list a:hover {
  color: var(--yellow-match);
  border-bottom-color: var(--yellow-match);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-contact-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8FA5AE;
}

.footer-contact-value {
  font-size: 15px;
  color: #E6ECEF;
  transition: color 0.2s ease;
}

a.footer-contact-value:hover {
  color: var(--yellow-match);
}

.footer-hours {
  font-size: 12px;
  color: #8FA5AE;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 13px;
  color: #8FA5AE;
  flex-wrap: wrap;
}

.footer-newsletter {
  font-size: 12px;
  color: #8FA5AE;
}

.footer-bottom a {
  color: #B0C3CE;
  border-bottom: 1px solid transparent;
}

.footer-bottom a:hover {
  color: var(--yellow-match);
  border-bottom-color: var(--yellow-match);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--green-deep);
  color: #ffffff;
  border-color: var(--green-deep);
}

.btn-primary:hover {
  background: #144d18;
  border-color: #144d18;
  color: #ffffff;
}

.btn-accent {
  background: var(--yellow-match);
  color: var(--ink);
  border-color: var(--yellow-match);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
}

.btn-accent:hover {
  background: #e0a800;
  border-color: #e0a800;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--green-deep);
}

.btn-ghost:hover {
  background: rgba(27, 94, 32, 0.06);
  color: var(--green-deep);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ============ Cards ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 36px rgba(11, 29, 42, 0.12);
}

.card-dark {
  background: var(--space-dark);
  border-color: var(--space-dark);
  color: #ffffff;
}

.card-accent {
  border-left-width: 6px;
  border-left-color: var(--yellow-match);
  box-shadow: none;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.card-title a {
  color: var(--ink);
  transition: color 0.2s ease;
}

.card-title a:hover {
  color: var(--blue-sky);
}

.card-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #EEF1F4;
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Detail/collapse */
details.card-collapse {
  background: var(--bg-card);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(11, 29, 42, 0.04);
}

details.card-collapse summary {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
}

details.card-collapse summary::-webkit-details-marker {
  display: none;
}

details.card-collapse summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  color: var(--blue-sky);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

details[open].card-collapse summary::after {
  transform: rotate(45deg);
}

details.card-collapse summary:hover {
  background: rgba(27, 94, 32, 0.04);
}

.card-collapse-body {
  padding: 0 24px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
}

.tag-green {
  background: rgba(76, 175, 80, 0.12);
  color: var(--green-deep);
}

.tag-blue {
  background: rgba(30, 136, 229, 0.1);
  color: var(--blue-sky);
}

.tag-yellow {
  background: rgba(255, 193, 7, 0.15);
  color: #8a6500;
}

.tag-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

/* ============ Media / Image Container ============ */
.media-block {
  display: block;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(27, 94, 32, 0.12) 0%, rgba(30, 136, 229, 0.12) 100%),
    var(--bg-light);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.media-block[data-ratio="wide"] { aspect-ratio: 16 / 7; }
.media-block[data-ratio="square"] { aspect-ratio: 1 / 1; }
.media-block[data-ratio="tall"] { aspect-ratio: 3 / 4; }

.media-block::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(145deg, transparent 40%, rgba(11, 29, 42, 0.08) 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.media-duotone {
  background:
    linear-gradient(315deg, rgba(255, 193, 7, 0.2) 0%, transparent 60%),
    linear-gradient(20deg, rgba(27, 94, 32, 0.3) 0%, transparent 80%),
    var(--space-dark);
}

.media-placeholder-text {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
}

/* ============ Lists & Data Components ============ */
.score-list {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.score-list-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #EEF1F4;
}

.score-list-item:last-child {
  border-bottom: none;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--blue-sky);
  letter-spacing: -0.02em;
}

.score-team {
  font-weight: 600;
  font-size: 15px;
}

.score-status {
  font-size: 12px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
}

.index-list {
  counter-reset: index;
}

.index-list-item {
  counter-increment: index;
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.index-list-item::before {
  content: "0" counter(index);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow-match);
  background: var(--space-dark);
  padding: 4px 8px;
  height: fit-content;
  align-self: flex-start;
}

/* ============ Stats ============ */
.stat-pair {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--space-dark);
}

.stat-label {
  font-size: 13px;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============ Progress ============ */
.progress-track {
  height: 6px;
  background: #E3E9EF;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-bright), var(--blue-sky), var(--yellow-match));
  width: 0%;
  transition: width 0.05s linear;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
  padding: 12px 0;
}

.breadcrumb a {
  color: var(--blue-sky);
}

.breadcrumb a:hover {
  color: var(--green-deep);
}

.breadcrumb-item::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}

.breadcrumb-item:last-child::after {
  display: none;
}

/* ============ Table ============ */
.table-wrap {
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  font-weight: 700;
  color: var(--space-dark);
  background: rgba(27, 94, 32, 0.05);
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--green-deep);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #EEF1F4;
}

.table tr:last-child td {
  border-bottom: none;
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--space-dark);
  color: var(--yellow-match);
  border: 2px solid var(--yellow-match);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 500;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--yellow-match);
  color: var(--space-dark);
}

/* ============ Misc ============ */
.page-hero {
  background: var(--space-dark);
  color: #ffffff;
  padding: 120px 0 64px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -100%;
  right: -20%;
  width: 60%;
  height: 300%;
  background: linear-gradient(90deg, transparent 0%, rgba(30, 136, 229, 0.15) 40%, rgba(255, 193, 7, 0.08) 100%);
  transform: rotate(20deg);
  pointer-events: none;
}

.page-hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  position: relative;
}

.page-hero-lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 16px;
  max-width: 540px;
  font-weight: 400;
  position: relative;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ============ Visible focus ============ */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--yellow-match);
  outline-offset: -2px;
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--yellow-match);
  outline-offset: -3px;
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .back-to-top {
    transition: none;
  }

  .nav-toggle-line {
    transition: none;
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .nav-list {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .nav-pill {
    flex-wrap: wrap;
  }

  .brand {
    font-size: 18px;
  }

  .nav-cta {
    order: 3;
    font-size: 13px;
    padding: 10px 14px;
  }

  .nav-toggle {
    display: flex;
    order: 2;
  }

  .nav {
    display: none;
    width: 100%;
    order: 4;
    padding: 12px 0;
    border-top: 1px solid rgba(11, 29, 42, 0.08);
    margin-top: 8px;
  }

  .nav[data-open="true"] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 6px;
    border-bottom: 1px solid #EEF1F4;
  }

  .nav-link[aria-current="page"] {
    background: rgba(27, 94, 32, 0.08);
    color: var(--green-deep);
    font-weight: 700;
    border-left: 4px solid var(--green-deep);
  }

  .scroll-progress {
    bottom: auto;
    top: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .nav-pill {
    padding: 8px 12px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .nav-cta {
    padding: 8px 12px;
    font-size: 12px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .footer-grid {
    gap: 32px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}
