/* ============================================
   钢钢钢钠好多水更新目录 — Site Kit 共享层
============================================ */

/* 全局重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* 选中与焦点 */
::selection {
  background: var(--accent);
  color: #fff;
}

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

/* ============================================
   设计变量
============================================ */

:root {
  --paper: #F5F5F0;
  --paper-blue: #D8E6F2;
  --paper-yellow: #F5E3B3;
  --paper-pink: #F2D8D8;
  --paper-green: #D8E8D8;
  --card: #FFFFFF;
  --accent: #E8612A;
  --green: #2E8B57;
  --blue: #1E90FF;
  --orange: #FF8C00;
  --gray: #808080;
  --ink: #2D2D2D;
  --line: #E0E0E0;
  --night: #2F3B4C;
  --tag-blue: #4A90D9;
  --tag-gold: #D9A441;
  --tag-violet: #7B68EE;
  --tag-green: #2E8B57;
  --tag-red: #E8612A;

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "KaiTi", "STKaiti", "Kai", serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --container-max: 1280px;
  --page-pad: 24px;
  --radius: 4px;
  --radius-lg: 12px;
}

/* ============================================
   版心与区块
============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section {
  padding: 48px 0;
}

.section-heading {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--ink);
}

.section-sub {
  font-family: var(--font-serif);
  font-size: 16px;
  color: #6a6a6a;
  margin: -8px 0 28px;
}

/* 正文容器 */
.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.prose h2 {
  font-size: 28px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 2px solid var(--paper-blue);
}

.prose h3 {
  font-size: 20px;
  margin-top: 28px;
}

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

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  padding: 16px 0;
  color: #787878;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li::before {
  content: "/";
  margin-right: 8px;
  color: #bbb;
  font-family: var(--font-mono);
}

.breadcrumb li:first-child::before {
  content: "";
  margin: 0;
}

/* ============================================
   通用按钮
============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #d95a24;
  border-color: #d95a24;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ============================================
   站点头部
============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 245, 240, 0.76);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 224, 224, 0.42);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

body.scrolled .site-header {
  background: var(--paper);
  border-bottom-color: var(--line);
  box-shadow: 0 3px 16px rgba(45, 45, 45, 0.07);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-bracket {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9em;
  color: var(--accent);
}

.brand-name {
  font-weight: 900;
}

.brand-tagline {
  font-family: var(--font-serif);
  font-size: 13px;
  color: #6a6a6a;
  margin: 0;
  padding-left: 28px;
}

/* 导航 */
.site-nav {
  margin-left: auto;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: var(--paper-blue);
  color: var(--accent);
}

.nav-link[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

.nav-link-quiet {
  font-weight: 400;
  font-size: 14px;
  color: #6a6a6a;
}

.nav-list-secondary {
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle-bars {
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================
   全站页脚
============================================ */

.site-footer {
  background: var(--night);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 80px;
}

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

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.footer-brand-bracket {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85em;
  color: var(--tag-gold);
}

.footer-tagline {
  font-family: var(--font-serif);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.58);
  margin: 0;
}

.footer-update-schedule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-yellow);
}

.footer-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

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

.footer-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact-item {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 18px var(--page-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-icp,
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* 返回顶部 */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 97, 42, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(232, 97, 42, 0.46);
}

.back-top[hidden] {
  display: none;
}

/* ============================================
   内容陈列组件
============================================ */

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-top-width: 5px;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(45, 45, 45, 0.08);
  border-color: var(--accent);
}

.card-bordered-blue {
  border-top-color: var(--tag-blue);
}

.card-bordered-blue:hover {
  border-color: var(--tag-blue);
}

.card-bordered-yellow {
  border-top-color: var(--tag-gold);
}

.card-bordered-yellow:hover {
  border-color: var(--tag-gold);
}

.card-bordered-pink {
  border-top-color: #E89A9A;
}

.card-bordered-pink:hover {
  border-color: #E89A9A;
}

.card-bordered-green {
  border-top-color: var(--tag-green);
}

.card-bordered-green:hover {
  border-color: var(--tag-green);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-text {
  font-size: 14px;
  color: #6a6a6a;
  line-height: 1.6;
}

/* 磁贴矩阵 */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 2px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(45, 45, 45, 0.1);
}

.tile-blue {
  background: var(--paper-blue);
  border-color: transparent;
}

.tile-yellow {
  background: var(--paper-yellow);
  border-color: transparent;
}

.tile-pink {
  background: var(--paper-pink);
  border-color: transparent;
}

.tile-green {
  background: var(--paper-green);
  border-color: transparent;
}

.tile-count {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.tile-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}

/* 条目列表 */
.entry-list {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.entry-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}

.entry-row:last-child {
  border-bottom: none;
}

.entry-row:hover {
  background: var(--paper-blue);
}

.entry-order {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: #a0a0a0;
  min-width: 28px;
}

.entry-name {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
}

.entry-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

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

.tag-block {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--tag-blue);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tag-block:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.tag-level-1 {
  background: var(--tag-blue);
}

.tag-level-2 {
  background: var(--tag-gold);
}

.tag-level-3 {
  background: var(--tag-violet);
}

.tag-level-4 {
  background: var(--tag-green);
}

.tag-level-5 {
  background: var(--tag-red);
}

/* 状态徽标 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: rgba(128, 128, 128, 0.12);
  color: var(--gray);
}

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

.status-updated {
  background: rgba(46, 139, 87, 0.12);
  color: var(--green);
}

.status-new {
  background: rgba(30, 144, 255, 0.12);
  color: var(--blue);
}

.status-hot {
  background: rgba(255, 140, 0, 0.12);
  color: var(--orange);
}

.status-archived {
  background: rgba(128, 128, 128, 0.12);
  color: var(--gray);
}

/* 榜单序号 */
.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 14px;
  background: var(--paper-blue);
  color: var(--ink);
  flex-shrink: 0;
}

.rank-index-1 {
  background: var(--accent);
  color: #fff;
}

.rank-index-2 {
  background: var(--orange);
  color: #fff;
}

.rank-index-3 {
  background: var(--tag-gold);
  color: #fff;
}

/* 指标条 */
.metric-bar {
  height: 8px;
  background: rgba(128, 128, 128, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.metric-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* 索引条 */
.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.index-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.index-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--paper-blue);
}

.index-link[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* 横向滑轨 */
.scroll-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.rail-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* 对照表格 */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: var(--night);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-sans);
}

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

.compare-table tr:hover td {
  background: var(--paper-blue);
}

.compare-table .col-index {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

/* 图片占位框架 */
.picture-frame {
  background: var(--paper-blue);
  border: 2px dashed #c6d7e4;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8899aa;
  font-family: var(--font-mono);
  font-size: 14px;
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--night);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   响应式
============================================ */

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-tagline {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(330px, 86vw);
    max-width: 86vw;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 30px rgba(45, 45, 45, 0.18);
    padding: 88px 24px 24px;
    overflow-y: auto;
    z-index: 200;
    margin-left: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.35s ease, visibility 0s 0.35s;
  }

  .site-nav[data-open="true"] {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.35s ease;
  }

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

  .site-nav .nav-list-secondary {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .nav-link {
    font-size: 17px;
    padding: 12px 16px;
  }

  .nav-link-quiet {
    font-size: 15px;
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(45, 45, 45, 0.38);
    z-index: 150;
  }

  body.nav-open {
    overflow: hidden;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }

  .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 560px) {
  :root {
    --page-pad: 18px;
  }

  .section {
    padding: 32px 0;
  }

  .section-heading {
    font-size: 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 36px;
  }

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

  .entry-row {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 14px;
  }

  .entry-meta {
    width: 100%;
    padding-left: 44px;
  }

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

  .compare-table {
    font-size: 13px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px 10px;
  }
}

/* ============================================
   动效与无障碍
============================================ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover,
  .tile:hover {
    transition-duration: 0.18s;
  }
}
