:root {
  --coral: #FF7F50;
  --seaweed: #2E8B57;
  --sand: #F4A460;
  --coral-red: #FF6B6B;
  --cream: #FFF8F0;
  --mint: #E0F0E0;
  --blush: #FFE4E1;
  --deep: #1E3A5F;
  --gold: #FFD700;
  --ok: #32CD32;
  --pending: #FF8C00;
  --fail: #DC143C;
  --ink: #2E2E2E;
  --line: #D3D3D3;

  --bg: #FFF8F0;
  --surface: #FFF8F0;
  --surface-alt: #E0F0E0;
  --surface-blush: #FFE4E1;
  --tint-coral: #FFF0EB;
  --tint-seaweed: #EAF0E4;
  --tint-sand: #FDF4E8;
  --tint-blush: #FFEAE6;
  --text: #2E2E2E;
  --text-soft: #64707D;
  --link: #1E3A5F;
  --link-hover: #7A2B1A;
  --header-bg: rgba(255, 248, 240, 0.9);
  --nav-bg-hover: #E0F0E0;
  --nav-active-bg: #1E3A5F;
  --nav-active-text: #FFF8F0;
  --brand-text: #1E3A5F;
  --footer-bg: #1E3A5F;
  --footer-text: #D6E4F0;
  --footer-text-soft: #9DB4C8;
  --shadow: 0 10px 40px rgba(30, 58, 95, 0.12);
  --shadow-lift: 0 16px 48px rgba(30, 58, 95, 0.18);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Source Han Sans CN", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

:root[data-theme="night"] {
  --bg: #0F1D2C;
  --surface: #1A2C3E;
  --surface-alt: #203648;
  --surface-blush: #3A2A38;
  --tint-coral: #2C1A14;
  --tint-seaweed: #14291D;
  --tint-sand: #2B2315;
  --tint-blush: #321D1D;
  --text: #D8E2EA;
  --text-soft: #93A5B5;
  --link: #79C0FF;
  --link-hover: #FFB08A;
  --header-bg: rgba(15, 29, 44, 0.9);
  --nav-bg-hover: #243C52;
  --nav-active-bg: #79C0FF;
  --nav-active-text: #0F1D2C;
  --brand-text: #E8F0F8;
  --footer-bg: #08131F;
  --footer-text: #C9D9E6;
  --footer-text-soft: #8AA1B3;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 16px 48px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(30, 58, 95, 0.045) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
}
:root[data-theme="night"] body { background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0); }

main { display: block; min-height: 60vh; }
svg { display: block; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
address { font-style: normal; }
button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p { margin: 0; }
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--gold); color: var(--deep); }

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

.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- Skip link & scroll progress ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 24px;
  z-index: 300;
  background: var(--deep);
  color: var(--cream);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 12px; color: var(--cream); }
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--gold), var(--seaweed));
  z-index: 400;
  border-radius: 0 3px 3px 0;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 120;
  padding: 0 clamp(12px, 4vw, 40px);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.header-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 127, 80, 0.25);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand-block { flex-shrink: 0; }
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-shell {
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 44% 44% / 66% 66% 34% 34%;
  background: linear-gradient(160deg, var(--coral), var(--coral-red));
  position: relative;
  overflow: hidden;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: inset 0 -4px 0 rgba(30, 58, 95, 0.18), 0 2px 8px rgba(255, 107, 107, 0.4);
}
.brand-shell::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 2px, rgba(255, 255, 255, 0.28) 2px 4px);
}
.brand-shell::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 12px;
  border-radius: 12px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(1px);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-text);
  letter-spacing: 0.02em;
}
.brand-title { font-size: 11px; color: var(--text-soft); white-space: nowrap; }

.nav-wrap { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.nav-link:hover { background: var(--nav-bg-hover); color: var(--link); }
.nav-link:active { transform: scale(0.96); }
.nav-link[aria-current="page"] {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.28);
}
.nav-link[aria-current="page"]:hover { background: var(--nav-active-bg); color: var(--nav-active-text); }

.header-actions { position: relative; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon { flex-shrink: 0; }

.search-toggle,
.theme-toggle,
.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--link);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.search-toggle:hover, .theme-toggle:hover { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.nav-toggle:hover { background: var(--mint); border-color: var(--seaweed); }
.search-toggle:active, .theme-toggle:active, .nav-toggle:active { transform: scale(0.94); }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="night"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="night"] .theme-toggle .icon-moon { display: block; }

.search-box { position: relative; }
.search-svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}
.search-input {
  width: clamp(140px, 16vw, 220px);
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 16px 0 38px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder { color: var(--text-soft); opacity: 0.8; }
.search-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 127, 80, 0.18);
}
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.nav-toggle { flex-direction: column; gap: 4px; }
.toggle-line {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--deep);
  transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .brand-title { display: none; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .search-input { width: 150px; }
}
@media (max-width: 960px) {
  .site-header { top: 8px; padding: 0 12px; }
  .header-inner { height: 60px; padding: 0 8px 0 12px; }
  .nav-toggle { display: inline-flex; }
  .search-toggle { display: inline-flex; }
  .search-box { display: none; }
  .search-box[data-open] {
    display: block;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 48px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-lift);
  }
  .search-box[data-open] .search-input { width: 100%; height: 44px; }
  .nav-wrap {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 10px;
    box-shadow: var(--shadow-lift);
  }
  .nav-wrap[data-open] { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { font-size: 15px; padding: 12px 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--deep); color: var(--cream); }
.btn-primary:hover { background: #274A78; color: var(--cream); box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--link); }
.btn-ghost:hover { border-color: var(--deep); background: rgba(30, 58, 95, 0.06); color: var(--link); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #FFDE33; color: var(--ink); box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #FF6B3D; color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb .sep { color: var(--line); }
.breadcrumb [aria-current="page"] { font-weight: 700; color: var(--ink); }

/* ---------- Page hero / prose ---------- */
.page-hero { padding: 56px 0 24px; }
.page-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 12px; }
.page-lead { font-size: 18px; color: var(--text-soft); max-width: 640px; }

.prose { max-width: 720px; font-size: 16px; line-height: 1.85; color: var(--text); }
.prose p { margin-bottom: 1em; }
.prose h2 { margin: 2em 0 0.6em; }
.prose h3 { margin: 1.5em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1em 1.5em; padding: 0; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 4px solid var(--sand);
  background: var(--tint-sand);
  border-radius: 0 16px 16px 0;
  padding: 12px 20px;
  margin: 1em 0;
  color: var(--text);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 6px;
}
.prose a { text-decoration: underline; text-decoration-color: rgba(30, 58, 95, 0.35); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--link-hover); text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.prose img { border-radius: 20px; margin: 1.5em 0; }

/* ---------- Section scaffolding ---------- */
.section { padding: 48px 0; }
.section-sm { padding: 24px 0; }
.section-tint {
  border-radius: 40px;
  padding: clamp(24px, 5vw, 56px);
  margin: 32px 0;
}
.section-tint.coral { background: var(--tint-coral); }
.section-tint.seaweed { background: var(--tint-seaweed); }
.section-tint.sand { background: var(--tint-sand); }
.section-tint.blush { background: var(--tint-blush); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}
.section-title { margin-top: 4px; }
.section-desc { color: var(--text-soft); max-width: 640px; margin-top: 8px; }

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card-grid.tight { gap: 12px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 127, 80, 0.4);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 14px; }

/* ---------- Tile matrix ---------- */
.tile-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.mega-tile {
  display: block;
  position: relative;
  border-radius: 28px;
  padding: 24px 20px;
  min-height: 140px;
  color: var(--deep);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.mega-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); text-decoration: none; color: var(--deep); }
.mega-tile.tile-seaweed { color: #F2FFF7; }
.mega-tile.tile-seaweed:hover { color: #F2FFF7; }
.mega-tile::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 24deg, currentColor 0 10deg, transparent 10deg 22deg);
  opacity: 0.14;
  pointer-events: none;
}
.tile-coral { background: linear-gradient(135deg, var(--coral), #FF9A76); }
.tile-seaweed { background: linear-gradient(135deg, var(--seaweed), #3DA46A); }
.tile-sand { background: linear-gradient(135deg, var(--sand), #E8C09A); }
.tile-coral-red { background: linear-gradient(135deg, var(--coral-red), #FF9F8A); }
.tile-title { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.tile-count {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  background: rgba(30, 58, 95, 0.1);
  color: var(--deep);
}
.tile-seaweed .tile-count { background: rgba(255, 255, 255, 0.2); color: #F2FFF7; }
.tile-arrow {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--deep);
}

/* ---------- Entry list ---------- */
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.entry-row:hover { border-color: var(--coral); background: var(--surface-alt); }
.entry-row.rows-4 { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.entry-row.rows-5 { grid-template-columns: 44px minmax(0, 1fr) auto auto auto; }
.entry-name { font-weight: 700; color: var(--ink); }
a.entry-name:hover { color: var(--link-hover); }
.entry-meta { color: var(--text-soft); font-size: 13px; white-space: nowrap; }
.entry-badge { justify-self: end; }
.batch-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ---------- Tags ---------- */
.tag-group { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--link);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.tag:hover { background: var(--link); border-color: var(--link); color: var(--nav-active-text); }
.tag:active { transform: scale(0.96); }
.tag.is-active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.tag.is-active:hover { background: var(--gold); color: var(--ink); }
.tag-hot { background: var(--surface-blush); border-color: #FFB0B0; color: #C0392B; }
.tag-mid { background: var(--surface-alt); border-color: #A0C8A0; color: #1E6B3A; }
.tag-low { background: var(--surface); border-color: var(--line); color: var(--text-soft); }
.current-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.current-filter span { font-family: var(--font-mono); font-weight: 700; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge-done { background: rgba(50, 205, 50, 0.15); color: #1E8A3A; }
.badge-progress { background: rgba(255, 140, 0, 0.18); color: #C26A00; }
.badge-pending { background: rgba(220, 20, 60, 0.12); color: #B0183E; }
.badge-gold { background: rgba(255, 215, 0, 0.25); color: #8F6E00; }
:root[data-theme="night"] .badge-done { background: rgba(50, 205, 50, 0.2); color: #63F063; }
:root[data-theme="night"] .badge-progress { background: rgba(255, 140, 0, 0.18); color: #FFB35C; }
:root[data-theme="night"] .badge-pending { background: rgba(220, 20, 60, 0.2); color: #FF6B6B; }
:root[data-theme="night"] .badge-gold { background: rgba(255, 215, 0, 0.18); color: #FFE066; }

/* ---------- Index number & metric bar ---------- */
.index-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--deep);
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.index-num.top { background: linear-gradient(135deg, var(--gold), #FFA500); color: #2E2E2E; }
.index-num.alt { background: var(--mint); color: var(--deep); }
.metric-bar {
  height: 10px;
  min-width: 80px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.metric-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--gold));
}
.metric-fill.deep { background: linear-gradient(90deg, var(--deep), #3B6F9E); }
.metric-fill.seaweed { background: linear-gradient(90deg, var(--seaweed), #5AB88A); }

/* ---------- Index strip ---------- */
.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.index-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.index-strip a:hover { background: var(--mint); color: var(--link); }
.index-strip a.is-current { background: var(--deep); color: var(--cream); box-shadow: 0 3px 10px rgba(30, 58, 95, 0.25); }

/* ---------- Horizontal scroll rail ---------- */
.h-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.h-scroll::-webkit-scrollbar { height: 8px; }
.h-scroll::-webkit-scrollbar-track { background: transparent; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.h-scroll > * { scroll-snap-align: start; }
.h-scroll-item {
  flex: 0 0 auto;
  width: min(280px, 80vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
}

/* ---------- Data table & compare grid ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .data-table { min-width: 640px; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  font-size: 14px;
}
.data-table th {
  background: var(--deep);
  color: var(--cream);
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-family: var(--font-display);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
  background: var(--surface);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-alt); }
.data-table .mono { font-family: var(--font-mono); }
.data-table td.badge-cell { text-align: right; }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.compare-grid .cg-cell {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}
.compare-grid .cg-cell:nth-child(2n+1) {
  background: var(--surface-alt);
  font-weight: 700;
  border-right: 1px solid var(--line);
}
.compare-grid > *:last-child:nth-child(odd) { border-bottom: none; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
}
.panel-tint-coral { background: var(--tint-coral); border-color: rgba(255, 127, 80, 0.25); }
.panel-tint-seaweed { background: var(--tint-seaweed); border-color: rgba(46, 139, 87, 0.25); }
.panel-tint-sand { background: var(--tint-sand); border-color: rgba(244, 164, 96, 0.3); }
.panel-tint-blush { background: var(--tint-blush); border-color: rgba(255, 100, 100, 0.2); }

/* ---------- Image frame ---------- */
.image-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 4 / 3;
}
.image-frame.wide { aspect-ratio: 16 / 9; }
.image-frame.tall { aspect-ratio: 3 / 4; }
.image-frame.shell-bg {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 127, 80, 0.35), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(46, 139, 87, 0.3), transparent 55%),
    var(--surface-alt);
}
.image-frame.shell-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.18) 0 10deg, transparent 10deg 20deg);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Decorative shell row ---------- */
.shell-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.shell-row span {
  font-style: normal;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 44% 44% / 68% 68% 32% 32%;
  background: var(--coral);
  opacity: 0.55;
  display: block;
}
.shell-row span:nth-child(2n) { background: var(--gold); }
.shell-row span:nth-child(3n) { background: var(--seaweed); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--footer-bg);
  color: var(--footer-text);
  border-radius: 40px 40px 0 0;
  padding: 48px 0 28px;
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #fff; }
.footer-shell-row { margin: 0 0 28px; }
.footer-shell-row span { width: 9px; height: 9px; opacity: 0.9; }

.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-col { padding-right: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-shell {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 44% 44% / 66% 66% 34% 34%;
  background: linear-gradient(160deg, var(--coral), var(--coral-red));
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15);
}
.footer-shell::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 2px, rgba(255, 255, 255, 0.3) 2px 4px);
}
.footer-shell::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 10px;
  border-radius: 50% 50% 30% 30% / 50% 50% 50% 50%;
  background: rgba(255, 255, 255, 0.35);
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}
.footer-desc {
  color: var(--footer-text-soft);
  font-size: 14px;
  margin: 16px 0 24px;
  max-width: 280px;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--footer-text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}
.contact-item svg { flex-shrink: 0; color: var(--coral); }

.footer-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 15px;
  padding: 4px 0;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-links a:hover { color: #fff; transform: translateX(4px); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 48px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--footer-text-soft);
}
.footer-icp, .footer-copy { font-family: var(--font-mono); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand-col { grid-column: 1 / -1; padding-right: 0; }
}
@media (max-width: 560px) {
  .site-footer { border-radius: 28px 28px 0 0; padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: var(--link);
  color: var(--nav-active-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 150;
  box-shadow: var(--shadow);
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--link-hover); }

/* ---------- Responsive helpers ---------- */
@media (max-width: 720px) {
  .section { padding: 32px 0; }
  .section-tint { border-radius: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .tile-matrix { grid-template-columns: 1fr 1fr; }
  .entry-row { grid-template-columns: minmax(0, 1fr) auto; }
  .entry-row .entry-meta { grid-column: 1 / -1; grid-row: auto; }
  .entry-row.rows-4 { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .entry-row.rows-4 .entry-meta { grid-column: 2 / -1; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-grid .cg-cell:nth-child(2n+1) { border-right: none; }
}
@media (max-width: 480px) {
  .tile-matrix { grid-template-columns: 1fr; }
  .header-actions { gap: 6px; }
}

/* ---------- 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;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .scroll-progress, .to-top, .skip-link { display: none !important; }
  body { background: #fff; }
  .section-tint { background: #fff !important; border: 1px solid #ccc; }
}
