:root {
  --c-ink: #2C3E50;
  --c-forest: #1F4E3D;
  --c-cream: #F5F0E6;
  --c-sand: #E8E0D5;
  --c-orange: #E67E22;
  --c-yellow: #F1C40F;
  --c-teal: #16A085;
  --c-purple: #8E44AD;
  --c-slate: #34495E;
  --c-gray: #7F8C8D;
  --c-white: #FFFFFF;
  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --maxw: 1200px;
  --radius: 6px;
  --shadow-sm: 0 2px 6px rgba(44, 62, 80, .12);
  --shadow-md: 0 8px 24px rgba(44, 62, 80, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 1rem/1.6 var(--font-body); color: var(--c-ink); background: var(--c-cream); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
li { list-style: none; }
a { color: var(--c-orange); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--c-yellow); color: var(--c-ink); }
main { display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.page-main { padding-top: 2rem; }
.section-block { margin-top: 3.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding-left: 1rem; border-left: 6px solid var(--c-orange); }
.section-title { font: 900 1.6rem/1.25 var(--font-head); color: var(--c-ink); }
.section-desc { font-size: .9rem; color: var(--c-gray); }
.section-index { font: 700 .8rem var(--font-mono); color: var(--c-orange); }

.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 300; background: var(--c-yellow); color: var(--c-ink); padding: .7rem 1.2rem; border-radius: 0 0 .6rem .6rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); }
.skip-link:focus { top: 0; }

.progress-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 120; pointer-events: none; background: rgba(0, 0, 0, .12); }
.progress-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--c-yellow), var(--c-orange)); }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--c-ink); color: var(--c-cream); border-bottom: 3px solid var(--c-orange); box-shadow: var(--shadow-sm); }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; min-height: 64px; display: flex; align-items: stretch; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--c-cream); text-decoration: none; flex-shrink: 0; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; background: var(--c-orange); color: var(--c-white); font: 900 .9rem var(--font-mono); letter-spacing: .12em; padding: .25rem .5rem; border-radius: .35rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font: 900 1.15rem var(--font-head); }
.brand-sub { font: 600 .62rem var(--font-mono); letter-spacing: .18em; color: var(--c-sand); }
.nav-wrap { margin-left: auto; display: flex; align-items: stretch; }
.nav-list { display: flex; align-items: stretch; gap: .15rem; }
.nav-item { display: flex; }
.nav-link { display: flex; align-items: center; gap: .45rem; padding: 0 .9rem; color: var(--c-cream); text-decoration: none; font: 600 .92rem var(--font-head); border-bottom: 3px solid transparent; transition: background .15s ease, color .15s ease; }
.nav-link::before { content: attr(data-index); font: 600 .68rem var(--font-mono); color: var(--c-sand); opacity: .75; }
.nav-link:hover { background: rgba(255, 255, 255, .08); color: var(--c-yellow); }
.nav-link:hover::before { color: var(--c-yellow); }
.nav-link[aria-current="page"] { background: var(--c-orange); color: var(--c-white); border-bottom-color: var(--c-yellow); }
.nav-link[aria-current="page"]::before { color: var(--c-yellow); }
.header-status { display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; margin-left: .25rem; border-left: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; font: 600 .72rem var(--font-mono); color: var(--c-sand); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-teal); box-shadow: 0 0 0 3px rgba(22, 160, 133, .28); }
.status-text { letter-spacing: .04em; }
.nav-toggle { display: none; align-items: center; gap: .5rem; background: transparent; border: 1px solid rgba(255, 255, 255, .35); border-radius: .45rem; color: var(--c-cream); font: 600 .85rem var(--font-mono); padding: .4rem .75rem; align-self: center; }
.nav-toggle:hover { background: rgba(255, 255, 255, .1); }
.nav-toggle-icon { width: 1em; height: 1px; background: currentColor; display: inline-block; position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; }
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }

.site-footer { background: var(--c-forest); color: var(--c-cream); margin-top: 4rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.25rem 1.5rem; }
.footer-brand-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem 1.2rem; margin-bottom: 2rem; }
.footer-brand { font: 900 1.8rem var(--font-head); color: var(--c-white); }
.footer-sub { font: 600 .7rem var(--font-mono); letter-spacing: .18em; color: var(--c-yellow); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col-title { margin: 0 0 .8rem; font: 900 .85rem var(--font-head); letter-spacing: .12em; color: var(--c-yellow); border-bottom: 1px solid rgba(255, 255, 255, .22); padding-bottom: .5rem; }
.footer-links { display: flex; flex-direction: column; gap: .28rem; }
.footer-link { color: var(--c-cream); text-decoration: none; font-size: .92rem; width: fit-content; }
.footer-link:hover { color: var(--c-orange); }
.footer-contact-item { margin: .15rem 0; color: var(--c-sand); font-size: .9rem; word-break: break-word; }
.footer-note { margin-top: .5rem; font-size: .78rem; color: var(--c-sand); opacity: .78; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .18); display: flex; justify-content: space-between; gap: .6rem 1.5rem; flex-wrap: wrap; font: 500 .72rem var(--font-mono); color: var(--c-sand); }
.footer-icp { letter-spacing: .05em; }
.footer-year { white-space: nowrap; }

.breadcrumbs { margin-bottom: 1.5rem; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font: 500 .8rem var(--font-mono); color: var(--c-gray); }
.breadcrumb-link { color: var(--c-gray); text-decoration: none; }
.breadcrumb-link:hover { color: var(--c-orange); }
.breadcrumb-sep { opacity: .7; }
.breadcrumb-item[aria-current="page"] { color: var(--c-ink); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.2rem; border: 2px solid transparent; border-radius: var(--radius); font: 600 .95rem var(--font-head); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--c-orange); color: var(--c-white); }
.btn-primary:hover { background: #ca6f1e; box-shadow: 0 4px 14px rgba(230, 126, 34, .35); }
.btn-secondary { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.btn-secondary:hover { background: var(--c-ink); color: var(--c-cream); }
.btn-small { padding: .35rem .8rem; font-size: .82rem; }
.btn[data-tone="teal"] { background: var(--c-teal); color: var(--c-white); }
.btn[data-tone="purple"] { background: var(--c-purple); color: var(--c-white); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card { position: relative; display: block; background: var(--c-cream); border: 1px solid var(--c-sand); border-radius: .65rem; padding: 1.1rem; color: var(--c-ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; border-radius: .65rem 0 0 .65rem; background: var(--c-teal); }
.card[data-tone="orange"]::before { background: var(--c-orange); }
.card[data-tone="purple"]::before { background: var(--c-purple); }
.card[data-tone="yellow"]::before { background: var(--c-yellow); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-cover { aspect-ratio: 16 / 9; border-radius: .45rem; background: linear-gradient(135deg, var(--c-sand), var(--c-cream)); border: 1px solid var(--c-sand); display: flex; align-items: center; justify-content: center; color: var(--c-gray); font: 600 .78rem var(--font-mono); margin-bottom: .8rem; overflow: hidden; }
.card-title { margin: .15rem 0 .25rem; font: 900 1.05rem/1.35 var(--font-head); color: var(--c-ink); }
.card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; font: 500 .72rem var(--font-mono); color: var(--c-gray); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.tile { position: relative; display: flex; flex-direction: column; gap: .8rem; min-height: 116px; padding: 1.1rem; border-radius: .7rem; background: var(--c-ink); color: var(--c-cream); text-decoration: none; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.tile::after { content: "↗"; position: absolute; right: .75rem; top: .6rem; font: 700 .85rem var(--font-mono); opacity: .6; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile[data-tone="forest"] { background: var(--c-forest); }
.tile[data-tone="purple"] { background: var(--c-purple); }
.tile[data-tone="slate"] { background: var(--c-slate); }
.tile[data-tone="orange"] { background: var(--c-orange); }
.tile[data-tone="teal"] { background: var(--c-teal); }
.tile[data-tone="yellow"] { background: var(--c-yellow); color: var(--c-ink); }
.tile[data-tone="sand"] { background: var(--c-sand); color: var(--c-ink); }
.tile-label { font: 900 1.1rem/1.2 var(--font-head); }
.tile-count { display: inline-flex; align-items: center; align-self: flex-start; background: rgba(0, 0, 0, .22); color: var(--c-yellow); border-radius: .35rem; padding: .18rem .55rem; font: 700 .78rem var(--font-mono); }
.tile[data-tone="yellow"] .tile-count, .tile[data-tone="sand"] .tile-count { color: var(--c-ink); background: rgba(44, 62, 80, .12); }

.entry-list { display: flex; flex-direction: column; }
.entry-row { display: grid; grid-template-columns: 3rem 1fr auto auto; align-items: center; gap: 1rem; padding: .8rem .6rem; border-bottom: 1px dashed var(--c-sand); text-decoration: none; color: var(--c-ink); transition: background .12s ease, padding-left .12s ease; }
.entry-row:hover { background: var(--c-sand); padding-left: 1rem; }
.entry-index { font: 700 .82rem var(--font-mono); color: var(--c-gray); }
.entry-name { font: 600 .98rem var(--font-head); }
.entry-cat { font: 500 .76rem var(--font-mono); color: var(--c-teal); background: rgba(22, 160, 133, .13); padding: .2rem .5rem; border-radius: .35rem; }
.entry-time { font: 500 .76rem var(--font-mono); color: var(--c-gray); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .55rem; }
.tag-block { display: inline-flex; align-items: center; gap: .35rem; background: var(--c-cream); border: 1px solid var(--c-sand); border-radius: .5rem; padding: .35rem .8rem; font: 600 .85rem var(--font-head); color: var(--c-ink); text-decoration: none; transition: background .12s ease, border-color .12s ease; }
.tag-block:hover { background: var(--c-orange); border-color: var(--c-orange); color: var(--c-white); }
.tag-block[data-count]::after { content: attr(data-count); font: 600 .72rem var(--font-mono); color: var(--c-gray); }
.tag-block:hover::after { color: var(--c-white); }

.status-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .7rem; border-radius: 999px; font: 700 .76rem var(--font-mono); white-space: nowrap; }
.badge-new { background: var(--c-yellow); color: var(--c-ink); }
.badge-updating { background: var(--c-teal); color: var(--c-white); }
.badge-hot { background: var(--c-purple); color: var(--c-white); }
.badge-archived { background: var(--c-gray); color: var(--c-white); }

.meter { display: flex; align-items: center; gap: .6rem; max-width: 100%; }
.meter-label { min-width: 4.5rem; font: 600 .75rem var(--font-mono); color: var(--c-gray); }
.meter-bar { flex: 1; height: 8px; background: var(--c-sand); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--c-teal); border-radius: inherit; }
.meter-fill[data-tone="orange"] { background: var(--c-orange); }
.meter-fill[data-tone="purple"] { background: var(--c-purple); }
.meter-fill[data-tone="yellow"] { background: var(--c-yellow); }

.index-strip { display: flex; flex-wrap: wrap; gap: .4rem; }
.index-item { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; border-radius: .4rem; background: var(--c-sand); color: var(--c-ink); text-decoration: none; font: 700 .78rem var(--font-mono); transition: background .12s ease, color .12s ease; }
.index-item:hover { background: var(--c-orange); color: var(--c-white); }
.index-item.is-active { background: var(--c-ink); color: var(--c-yellow); }

.rail { position: relative; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--c-sand) transparent; padding-bottom: .25rem; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--c-sand); border-radius: 999px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail-track { display: flex; gap: 1rem; min-width: min-content; }
.rail-item { flex: 0 0 260px; max-width: 80vw; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; background: var(--c-cream); border: 1px solid var(--c-sand); border-radius: .6rem; overflow: hidden; font-size: .9rem; }
.data-table th { background: var(--c-slate); color: var(--c-cream); padding: .7rem 1rem; text-align: left; font: 700 .82rem var(--font-head); letter-spacing: .06em; white-space: nowrap; }
.data-table td { padding: .65rem 1rem; border-top: 1px solid var(--c-sand); vertical-align: top; }
.data-table tr:first-child td { border-top: 0; }
.data-table tr:hover td { background: var(--c-sand); }

.ordinal { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--c-ink); color: var(--c-yellow); font: 800 .8rem var(--font-mono); flex-shrink: 0; }
.ordinal[data-rank="1"] { background: var(--c-orange); color: var(--c-white); }
.ordinal[data-rank="2"] { background: var(--c-purple); color: var(--c-white); }
.ordinal[data-rank="3"] { background: var(--c-teal); color: var(--c-white); }

.rank-list { display: flex; flex-direction: column; }
.rank-item { display: grid; grid-template-columns: 2.4rem 1fr 5.5rem; align-items: center; gap: 1rem; padding: .65rem .5rem; border-bottom: 1px dashed var(--c-sand); }
.rank-item:last-child { border-bottom: 0; }
.rank-name { font: 600 .95rem var(--font-head); }
.rank-value { font: 700 .76rem var(--font-mono); color: var(--c-gray); text-align: right; }

.timeline { position: relative; margin: 1rem 0; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: .3rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--c-sand); }
.timeline-item { position: relative; margin-bottom: 1.8rem; }
.timeline-item::before { content: ""; position: absolute; left: -1.6rem; top: .4rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c-orange); border: 3px solid var(--c-cream); box-shadow: 0 0 0 1px var(--c-orange); }
.timeline-item[data-tone="teal"]::before { background: var(--c-teal); box-shadow: 0 0 0 1px var(--c-teal); }
.timeline-item[data-tone="purple"]::before { background: var(--c-purple); box-shadow: 0 0 0 1px var(--c-purple); }
.timeline-item[data-tone="yellow"]::before { background: var(--c-yellow); box-shadow: 0 0 0 1px var(--c-yellow); }
.timeline-year { font: 900 1.1rem var(--font-head); color: var(--c-ink); }
.timeline-detail { margin-top: .1rem; font-size: .88rem; color: var(--c-gray); }

.collapse-wrap { background: var(--c-cream); border: 1px solid var(--c-sand); border-radius: .6rem; }
.collapse-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: transparent; border: 0; padding: 1rem 1.1rem; color: var(--c-ink); font: 700 .98rem var(--font-head); text-align: left; }
.collapse-toggle::after { content: "+"; font: 700 1rem var(--font-mono); color: var(--c-orange); }
.collapse-wrap[data-open] .collapse-toggle::after { content: "–"; }
.collapse-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.collapse-wrap[data-open] .collapse-panel { max-height: 600px; }
.collapse-panel-inner { padding: 0 1.1rem 1.1rem; color: var(--c-ink); font-size: .9rem; }

.glass-panel { background: rgba(245, 240, 230, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .55); border-radius: .8rem; }

.tag-filter-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-btn { background: var(--c-cream); border: 1px solid var(--c-sand); border-radius: 999px; padding: .35rem 1rem; font: 600 .84rem var(--font-head); color: var(--c-ink); transition: background .12s ease, border-color .12s ease, color .12s ease; }
.filter-btn:hover { border-color: var(--c-orange); color: var(--c-orange); }
.filter-btn[data-active="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-yellow); }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .header-status { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header { border-bottom-width: 2px; }
  .nav-wrap { position: absolute; top: 100%; left: 0; right: 0; display: block; margin-left: 0; background: var(--c-slate); max-height: 0; overflow: hidden; opacity: 0; box-shadow: var(--shadow-md); transition: max-height .25s ease, opacity .22s ease; }
  .nav-wrap[data-open] { max-height: 480px; opacity: 1; }
  .nav-list { flex-direction: column; gap: 0; padding: .5rem .75rem 1rem; }
  .nav-item { display: block; }
  .nav-link { padding: .7rem 1rem; border-left: 3px solid transparent; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav-link[aria-current="page"] { background: var(--c-orange); border-left-color: var(--c-yellow); }
  .footer-cols { gap: 1.5rem; }
}

@media (max-width: 700px) {
  .brand-text { font-size: 1rem; }
  .brand-sub { display: none; }
  .brand-mark { font-size: .78rem; }
  .header-inner { min-height: 56px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .entry-row { grid-template-columns: 2.2rem 1fr auto; }
  .entry-time { display: none; }
  .rank-item { grid-template-columns: 2.2rem 1fr 4rem; }
}

@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 1.35rem; }
}

:focus-visible { outline: 3px solid var(--c-yellow); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
