/* ============ RESET ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
svg,
canvas {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  line-height: 1.2;
}
p {
  overflow-wrap: break-word;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
a {
  color: var(--accent-cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ============ VARIABLES ============ */
:root {
  --page-bg: #0f1218;
  --section-purple: #3b1f4f;
  --section-red: #4a1a2d;
  --section-green: #1f3d2b;
  --card-amber: #ff9f1c;
  --card-blue: #00b4d8;
  --card-rose: #ff4d6d;
  --accent-yellow: #ffd60a;
  --accent-cyan: #00f5d4;
  --status-ok: #06d6a0;
  --status-warn: #ef233c;
  --status-off: #6c757d;
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --border: rgba(255, 255, 255, 0.15);
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-bg: linear-gradient(135deg, var(--section-purple) 0%, #2b173a 55%, #1b1526 100%);
  --shadow-pop: 3px 3px 0 rgba(0, 0, 0, 0.45);
  --radius: 8px;
}

/* ============ BASE ============ */
html {
  background: var(--page-bg);
}
body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 214, 10, 0.06), transparent 420px),
    radial-gradient(circle at 12% 90%, rgba(0, 245, 212, 0.04), transparent 380px),
    var(--page-bg);
}
::selection {
  background: var(--accent-yellow);
  color: #000;
}
:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}
h1,
h2,
h3,
h4 {
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ============ LAYOUT ============ */
.container {
  width: min(1400px, 100% - 2rem);
  margin-inline: auto;
}
.section-block {
  padding-block: 2.75rem;
}
.section-block + .section-block {
  border-top: 1px solid var(--border);
}
.bg-purple {
  background-color: var(--section-purple);
}
.bg-red {
  background-color: var(--section-red);
}
.bg-green {
  background-color: var(--section-green);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow:
    2px 2px 0 var(--card-rose),
    4px 4px 0 rgba(0, 0, 0, 0.45),
    8px 8px 20px rgba(0, 0, 0, 0.5);
}
.section-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 28ch;
  text-align: right;
}
.h-display {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow:
    2px 2px 0 var(--card-rose),
    4px 4px 0 var(--section-red),
    6px 6px 16px rgba(0, 0, 0, 0.6);
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  background: var(--accent-yellow);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: top 0.3s ease;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 8px, transparent 8px, transparent 16px),
    linear-gradient(135deg, var(--section-purple) 0%, #2b173a 55%, #1b1526 100%);
  border-bottom: 3px solid var(--accent-yellow);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.header-inner {
  padding-block: 0.75rem;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--accent-yellow);
  color: #000;
  font-size: 1.5rem;
  font-weight: 900;
  border-radius: 6px;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-name {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}
.brand-tagline {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  letter-spacing: 0.12em;
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-width: 220px;
}
.search-icon {
  position: relative;
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  flex-shrink: 0;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 0.45rem;
  height: 2px;
  background: var(--accent-cyan);
  transform: rotate(45deg);
  bottom: -0.28rem;
  right: -0.28rem;
  border-radius: 2px;
}
.search-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.search-key {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-yellow);
  background: rgba(255, 214, 10, 0.15);
  border: 1px solid rgba(255, 214, 10, 0.35);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  letter-spacing: 0.05em;
}

/* nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s, border-color 0.2s;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* header nav panel */
.header-nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.site-nav a:hover {
  color: var(--accent-yellow);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: #000;
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.header-quick-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.header-quick-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.section-quick-nav a {
  display: inline-flex;
  padding: 0.32rem 0.7rem;
  font-size: 0.73rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.section-quick-nav a:hover {
  background: var(--card-blue);
  color: #000;
  border-color: var(--card-blue);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 4rem;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 8px, transparent 8px, transparent 16px),
    linear-gradient(180deg, #1a1724 0%, var(--section-red) 120%);
  border-top: 2px solid var(--accent-cyan);
  position: relative;
}
.footer-inner {
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}
.brand-footer .brand-name {
  font-size: 1.2rem;
}
.brand-footer .brand-tagline {
  font-size: 0.65rem;
}
.brand-mark-footer {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.2rem;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 0.35rem;
}
.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-nav a:hover {
  color: var(--accent-cyan);
  padding-left: 0.3rem;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-contact-item {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.footer-bottom-sep {
  opacity: 0.35;
}

/* ============ SCROLL PROGRESS & BACK TO TOP ============ */
.scroll-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: 100%;
  height: 3px;
  pointer-events: none;
}
.scroll-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-cyan));
  box-shadow: 0 0 8px rgba(255, 214, 10, 0.5);
}
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: #000;
  border: 2px solid rgba(0, 0, 0, 0.3);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 214, 10, 0.2);
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 32px rgba(255, 214, 10, 0.4);
}
.back-to-top.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent-yellow);
  box-shadow: 0 0 16px rgba(255, 214, 10, 0.3);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: #000;
  background: var(--card-amber);
  box-shadow: var(--shadow-pop);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.3);
}
.card-amber {
  background: var(--card-amber);
}
.card-blue {
  background: var(--card-blue);
}
.card-rose {
  background: var(--card-rose);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: inherit;
  line-height: 1.25;
}
.card-meta {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 600;
}
.card-count {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.75);
}

/* ============ TILES ============ */
.tile-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.75rem;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.1rem 1.3rem;
  border-radius: var(--radius);
  color: #000;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.tile::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  bottom: -1.5rem;
  width: 4rem;
  height: 4rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}
.tile-amber {
  background: var(--card-amber);
}
.tile-blue {
  background: var(--card-blue);
}
.tile-rose {
  background: var(--card-rose);
}
.tile-name {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
}
.tile-count {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.7;
}

/* ============ ENTRY LIST ============ */
.entry-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.entry-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.entry-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.entry-index {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  min-width: 2rem;
}
.entry-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.entry-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.index-num {
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-yellow);
  text-shadow:
    1px 1px 0 var(--card-rose),
    2px 2px 0 rgba(0, 0, 0, 0.5);
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-ok {
  background: var(--status-ok);
  color: #000;
}
.badge-warn {
  background: var(--status-warn);
  color: #fff;
}
.badge-off {
  background: var(--status-off);
  color: #fff;
}

/* ============ METRIC BAR ============ */
.metric-bar {
  width: 100%;
  max-width: 200px;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.metric-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--card-amber), var(--accent-yellow));
}

/* ============ TAG GROUP ============ */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.tag:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
  text-decoration: none;
}
.tag-sm {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
}
.tag-lg {
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
}
.tag-amber {
  background: rgba(255, 159, 28, 0.18);
  border-color: rgba(255, 159, 28, 0.45);
  color: var(--card-amber);
}
.tag-blue {
  background: rgba(0, 180, 216, 0.18);
  border-color: rgba(0, 180, 216, 0.45);
  color: var(--card-blue);
}
.tag-rose {
  background: rgba(255, 77, 109, 0.18);
  border-color: rgba(255, 77, 109, 0.45);
  color: var(--card-rose);
}
.tag-cyan {
  background: rgba(0, 245, 212, 0.12);
  border-color: rgba(0, 245, 212, 0.4);
  color: var(--accent-cyan);
}

/* ============ INDEX BAR ============ */
.index-bar {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
}
.index-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.index-bar a:hover {
  background: var(--card-blue);
  color: #000;
  border-color: var(--card-blue);
  transform: translateY(-2px);
}

/* ============ HORIZONTAL SCROLL ============ */
.h-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.h-scroll > * {
  flex-shrink: 0;
  scroll-snap-align: start;
}
.h-scroll::-webkit-scrollbar {
  height: 5px;
}
.h-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.h-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-cyan);
  border-radius: 3px;
}

/* ============ DATA TABLE ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ============ GLASS PANEL ============ */
.glass-panel {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-block: 1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.breadcrumb a {
  color: var(--accent-cyan);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  opacity: 0.4;
  pointer-events: none;
}

/* ============ IMAGE RATIO ============ */
.img-ratio {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
}
.img-ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.img-ratio:hover img {
  transform: scale(1.03);
}
.img-ratio::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.img-ratio-square {
  aspect-ratio: 1 / 1;
}
.img-ratio-portrait {
  aspect-ratio: 3 / 4;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .header-quick-row {
    display: none;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }
  .header-nav-panel {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
  .header-nav-panel[data-open] {
    display: flex;
  }
  .header-search {
    display: none;
  }
  .site-nav {
    flex-direction: column;
    gap: 0.15rem;
  }
  .site-nav a {
    display: flex;
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
  }
  .header-quick-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .section-quick-nav {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .footer-bottom-sep {
    display: none;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .section-note {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.25rem);
  }
  .section-block {
    padding-block: 2rem;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.25rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .tile-matrix {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .entry-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .entry-meta {
    display: none;
  }
  .back-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1rem;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .brand-mark {
    transform: none;
  }
  .back-to-top {
    transition: opacity 0.01ms !important;
  }
}
