:root {
  --color-page-bg: #121212;
  --color-section-bg-a: #1c2b1c;
  --color-section-bg-b: #2e3b2e;
  --color-card-orange: #ff8c42;
  --color-card-yellow: #ffd166;
  --color-card-cyan: #4ecdc4;
  --color-accent-red: #ff2e2e;
  --color-status-green: #00c853;
  --color-status-gray: #9e9e9e;
  --color-tag-magenta: #e91e63;
  --color-tag-purple: #9c27b0;
  --color-text-primary: #f0f0f0;
  --color-text-secondary: #b0b0b0;
  --color-border: #444444;
  --gradient-purple: linear-gradient(135deg, #7b2ff7, #4a00e0);
  --font-headings: Impact, "Arial Black", "Microsoft YaHei", sans-serif;
  --font-body: "Courier New", Consolas, "PingFang SC", monospace;
  --header-height: 64px;
  --max-width: 1280px;
  --radius: 6px;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
}

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

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

body {
  background-color: var(--color-page-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  padding-top: var(--header-height);
}

main {
  display: block;
}

h1,
h2,
h3,
h4 {
  color: var(--color-text-primary);
  font-family: var(--font-headings);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1rem;
}

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

a {
  color: inherit;
}

ul,
ol {
  padding: 0;
  margin: 0;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-solid {
  background: rgba(18, 18, 18, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text-primary);
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-red);
  color: #fff;
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 900;
  border-radius: 4px;
  transform: rotate(-4deg);
  border: 1px solid rgba(0, 0, 0, 0.8);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
}

.brand-text {
  letter-spacing: 1px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-card-yellow);
  color: #121212;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-red);
  animation: header-blink 1.5s infinite;
}

@keyframes header-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Navigation */
.site-nav {
  margin-left: auto;
  display: flex;
}

.nav-list {
  display: flex;
  gap: 2px;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border);
}

.nav-list a[aria-current="page"] {
  color: var(--color-card-orange);
  background: rgba(255, 140, 66, 0.12);
  box-shadow: inset 3px 0 0 var(--color-card-orange);
  border-radius: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-toggle-box {
  position: relative;
  width: 16px;
  height: 12px;
  display: inline-block;
}

.nav-toggle-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: top 0.2s, transform 0.2s, opacity 0.2s;
}

.nav-toggle-line:nth-child(1) {
  top: 0;
}

.nav-toggle-line:nth-child(2) {
  top: 5px;
}

.nav-toggle-line:nth-child(3) {
  top: 10px;
}

.nav-toggle[data-open="true"] .nav-toggle-line:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

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

.nav-toggle[data-open="true"] .nav-toggle-line:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  background: var(--color-card-yellow);
  color: #121212;
  padding: 12px 16px;
  border-radius: 4px;
  font-weight: bold;
  z-index: 2000;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
}

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--color-accent-red);
  box-shadow: 0 0 8px var(--color-accent-red);
  z-index: 1500;
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 64px;
  background: var(--gradient-purple);
  color: #fff;
  border-top: 4px solid var(--color-card-orange);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-card-orange), var(--color-card-yellow), var(--color-card-cyan));
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer .brand {
  color: #fff;
  font-size: 1.5rem;
}

.footer-slogan {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

.footer-contact {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.footer-contact span {
  color: rgba(255, 255, 255, 0.85);
}

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

.footer-nav-title {
  font-family: var(--font-headings);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-card-yellow);
  margin-bottom: 12px;
}

.footer-nav-column ul {
  list-style: none;
}

.footer-nav-column li {
  margin-bottom: 6px;
}

.footer-nav-column a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
  transition: color 0.2s, border-color 0.2s;
}

.footer-nav-column a:hover {
  color: #fff;
  border-color: #fff;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-meta span {
  letter-spacing: 1px;
}

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

.section {
  padding: 60px 0;
}

.section-bg-a {
  background-color: var(--color-section-bg-a);
}

.section-bg-b {
  background-color: var(--color-section-bg-b);
}

.section-bg-gradient {
  background: var(--gradient-purple);
}

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
}

.section-index {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: bold;
  color: var(--color-card-orange);
  letter-spacing: 1px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-card-yellow);
}

.breadcrumb__sep {
  color: var(--color-border);
}

.zone-nav {
  position: sticky;
  top: calc(var(--header-height) + 8px);
  z-index: 50;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  background: rgba(18, 18, 18, 0.85);
  scroll-snap-type: x proximity;
}

.zone-nav a {
  white-space: nowrap;
  padding: 6px 16px;
  background: var(--color-section-bg-a);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.zone-nav a:hover {
  background: var(--color-card-yellow);
  color: #121212;
  border-color: transparent;
}

.zone-nav a[aria-current="page"] {
  background: var(--color-card-orange);
  color: #000;
  border-color: #000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}

/* Media */
.media {
  position: relative;
  overflow: hidden;
  background: var(--color-section-bg-b);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.media::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.media--4-3::before {
  padding-top: 75%;
}

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

.media__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  background: var(--color-section-bg-b);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: rotate(-1deg);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.6);
  border-color: var(--color-card-orange);
}

.card--orange {
  background: var(--color-card-orange);
  color: #121212;
}

.card--orange h1,
.card--orange h2,
.card--orange h3,
.card--orange h4,
.card--orange p {
  color: #121212;
}

.card--yellow {
  background: var(--color-card-yellow);
  color: #121212;
}

.card--yellow h1,
.card--yellow h2,
.card--yellow h3,
.card--yellow h4,
.card--yellow p {
  color: #121212;
}

.card--cyan {
  background: var(--color-card-cyan);
  color: #121212;
}

.card--cyan h1,
.card--cyan h2,
.card--cyan h3,
.card--cyan h4,
.card--cyan p {
  color: #121212;
}

.card--dark {
  background: var(--color-section-bg-b);
  color: var(--color-text-primary);
}

.card__title {
  font-family: var(--font-headings);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card__meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card__excerpt {
  margin-top: 8px;
  font-size: 14px;
}

/* Tiles */
.tile-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-section-bg-a);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tile:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: var(--shadow);
  border-color: var(--color-card-yellow);
}

.tile__title {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  color: inherit;
}

.tile__meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.tile__status {
  margin-top: auto;
}

/* Entry list */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.entry-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-card-orange);
  transform: translateX(4px);
}

.entry-row__name {
  font-weight: bold;
  text-decoration: none;
  color: var(--color-text-primary);
}

.entry-row__zone {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.entry-row__batch {
  font-size: 12px;
  color: var(--color-card-cyan);
}

/* Tags */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: bold;
  padding: 6px 12px;
  background: var(--color-section-bg-b);
  border: 2px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.tag:hover {
  transform: scale(1.05);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  border-color: var(--color-card-yellow);
}

.tag--hot {
  font-size: 1rem;
  background: var(--color-tag-magenta);
  color: #fff;
  border-color: transparent;
}

.tag--warm {
  font-size: 0.9rem;
  background: var(--color-tag-purple);
  color: #fff;
  border-color: transparent;
}

.tag--cool {
  font-size: 0.8rem;
  background: var(--color-card-cyan);
  color: #121212;
  border-color: transparent;
}

.tag--plain {
  background: var(--color-section-bg-a);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.tag__count {
  opacity: 0.75;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--available {
  background: var(--color-status-green);
  color: #000;
}

.status-badge--updating {
  background: var(--color-accent-red);
  color: #fff;
}

.status-badge--archived {
  background: var(--color-status-gray);
  color: #000;
}

.status-badge--new {
  background: var(--color-card-yellow);
  color: #000;
}

/* Seq and metric */
.seq-index {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-card-orange);
  line-height: 1;
}

.seq-index--dim {
  color: var(--color-text-secondary);
}

.metric-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: 28px 1fr 140px;
  gap: 12px;
  align-items: center;
}

.metric-rank {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  color: var(--color-card-orange);
}

.metric-name {
  font-size: 14px;
  color: var(--color-text-primary);
}

.metric-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  height: 8px;
}

.metric-bar__fill {
  display: block;
  height: 100%;
  background: var(--color-status-green);
  border-radius: 20px;
}

/* Index bar */
.index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.index-bar a,
.index-bar span {
  display: inline-flex;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  background: var(--color-section-bg-a);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.index-bar a:hover {
  background: var(--color-card-cyan);
  color: #121212;
  border-color: transparent;
}

.index-bar span[aria-current="true"] {
  background: var(--color-card-orange);
  color: #000;
  border-color: #000;
}

/* Rail */
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--color-card-orange) var(--color-border);
}

.rail__item {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.2);
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  text-align: left;
  font-size: 14px;
}

.data-table th {
  background: var(--color-section-bg-b);
  color: var(--color-text-primary);
  font-family: var(--font-headings);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  padding: 0 0 20px 24px;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--color-card-orange);
  border: 2px solid #000;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--color-section-bg-b);
}

.timeline__date {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.timeline__title {
  font-family: var(--font-headings);
  color: var(--color-text-primary);
}

/* FAQ panel */
.faq-panel {
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-section-bg-a);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-panel summary {
  cursor: pointer;
  padding: 16px 20px;
  padding-right: 40px;
  font-family: var(--font-headings);
  font-size: 1rem;
  color: var(--color-text-primary);
  list-style: none;
  position: relative;
  transition: background 0.2s, color 0.2s;
}

.faq-panel summary::-webkit-details-marker {
  display: none;
}

.faq-panel summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  color: var(--color-card-orange);
  font-size: 1.4rem;
}

.faq-panel[open] summary {
  color: var(--color-card-orange);
  background: rgba(255, 140, 66, 0.08);
}

.faq-panel[open] summary::after {
  content: '−';
}

.faq-panel__content {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-section-bg-a);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.btn--primary {
  background: var(--color-accent-red);
  color: #fff;
  border-color: #000;
  box-shadow: 4px 4px 0 #000;
}

.btn--primary:hover {
  background: #d6241f;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .nav-list a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .header-inner {
    gap: 16px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 56px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .header-badge {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: rgba(18, 18, 18, 0.98);
    padding: 8px 16px 16px;
    border-bottom: 2px solid var(--color-accent-red);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
  }

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

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .nav-list a {
    padding: 12px 8px;
    border-bottom: 1px solid var(--color-border);
    border-left: none;
    border-radius: 0;
  }

  .nav-list a[aria-current="page"] {
    background: transparent;
    box-shadow: inset 3px 0 0 var(--color-card-orange);
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 40px 0;
  }

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

  .tile-matrix {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .entry-row {
    grid-template-columns: 32px 1fr auto;
  }

  .entry-row__batch {
    display: none;
  }

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

  .footer-nav {
    grid-template-columns: 1fr;
  }

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

  .metric-row {
    grid-template-columns: 28px 1fr;
  }

  .metric-bar {
    grid-column: 1 / -1;
  }

  .rail__item {
    flex-basis: 220px;
  }

  .zone-nav {
    top: calc(var(--header-height) + 4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .header-badge::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
