:root {
  --night: #0a0f1d; --night-2: #121a2e; --line-d: #26304a; --text-d: #e8ecf4; --muted-d: #8f9bb5;
  --paper: #f7f4ef; --paper-2: #ece6dc; --ink: #1d2230; --ink-2: #4a5163; --muted: #858a96; --rule: #dcd5c8; --flame: #e2602f;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 17px/1.7 var(--sans); }
a { color: inherit; }
button { font: 600 15px/1 var(--sans); cursor: pointer; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.num { font-variant-numeric: tabular-nums; }
.fatal { padding: 40px; color: #a33; }

/* ---------- 深色测评台 ---------- */
.deck { background: radial-gradient(1200px 500px at 15% -10%, #1b2a52 0%, transparent 60%), radial-gradient(900px 400px at 90% 0%, #3a1f33 0%, transparent 55%), var(--night); color: var(--text-d); }
.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); background: rgba(10, 15, 29, .72); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 64px; transition: height .3s var(--ease); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand b { font: 900 20px var(--serif); color: #fff; }
.brand span { font-size: 13px; color: var(--muted-d); letter-spacing: 2px; }
.nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav a { font-size: 14px; color: var(--muted-d); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
@supports (animation-timeline: scroll()) {
  .topbar .wrap { animation: shrink linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
  @keyframes shrink { to { height: 52px; } }
}

.intro { padding-top: 40px; padding-bottom: 22px; }
.intro .kicker { margin: 0; font-size: 13px; letter-spacing: 3px; color: var(--muted-d); }
.intro h1 { font: 900 46px/1.25 var(--serif); margin: 8px 0 10px; color: #fff; letter-spacing: .5px; }
.intro p { margin: 0; color: #b9c2d6; font-size: 18px; max-width: 900px; }
.intro .stamp { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-d); margin-top: 14px; }
.intro .stamp i { width: 7px; height: 7px; border-radius: 50%; background: #39d07a; box-shadow: 0 0 0 4px rgba(57, 208, 122, .15); }

/* 题目横栏：大图卡片，图是测评画面截图；当前题目全彩高亮，其余压暗，悬停时亮起并缓慢放大 */
.tasks { display: grid; grid-template-columns: repeat(var(--n), minmax(280px, 1fr)); gap: 16px; padding: 6px 0 4px; }
.task { position: relative; overflow: hidden; height: 260px; border-radius: 16px; border: 1px solid var(--line-d); padding: 0; text-align: left; color: #fff; background: #000; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.task .img { position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; filter: saturate(.55) brightness(.62); transform: scale(1.02); transition: filter .5s var(--ease), transform 1.6s var(--ease); }
.task::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 8, 18, .88) 0%, rgba(5, 8, 18, .45) 45%, transparent 75%), linear-gradient(0deg, rgba(5, 8, 18, .7), transparent 55%); }
.task:hover .img { filter: saturate(.85) brightness(.8); transform: scale(1.07); }
.task[aria-selected="true"] { border-color: var(--flame); box-shadow: 0 0 0 1px var(--flame), 0 18px 50px rgba(226, 96, 47, .25); transform: translateY(-2px); }
.task[aria-selected="true"] .img { filter: none; }
.task .body { position: absolute; left: 26px; bottom: 22px; right: 26px; display: flex; flex-direction: column; gap: 6px; }
.task .idx { font: 600 13px var(--sans); letter-spacing: 3px; color: rgba(255, 255, 255, .7); display: flex; align-items: center; gap: 10px; }
.task .idx em { font-style: normal; letter-spacing: 1px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--flame); color: #fff; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease); }
.task[aria-selected="true"] .idx em { opacity: 1; transform: none; }
.task b { font: 900 38px/1.15 var(--serif); letter-spacing: 1px; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.task b small { font: 500 16px var(--sans); margin-left: 12px; color: rgba(255, 255, 255, .75); letter-spacing: 0; }
.task .q { font: 400 15px/1.5 var(--sans); color: rgba(255, 255, 255, .82); max-width: 460px; }
.task .lead { font: 500 14px var(--sans); color: rgba(255, 255, 255, .9); display: flex; align-items: center; gap: 6px; }
.task .lead i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.controls { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; padding-top: 16px; padding-bottom: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips .label { font-size: 13px; color: var(--muted-d); margin-right: 4px; }
.chip { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-d); background: rgba(255, 255, 255, .03); color: var(--text-d); font-size: 14px; font-weight: 500; transition: border-color .2s, background .2s, opacity .2s; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip small { color: var(--muted-d); font-weight: 400; }
.chip[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); color: #fff; }
.chip:disabled { opacity: .35; cursor: not-allowed; }
/* 鼠标跟随的高光（Linear / Vercel 常见的 spotlight 效果） */
.spot::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(140px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .18), transparent 60%); }
.spot:hover::after { opacity: 1; }

/* 通栏舞台 */
.stage { position: relative; width: 100%; height: min(56.25vw, calc(100vh - 150px)); min-height: 360px; background: #05060a; view-transition-name: stage; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted-d); pointer-events: none; }
.stage .full { position: absolute; right: 16px; top: 14px; z-index: 3; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 15, 29, .6); color: #fff; padding: 8px 12px; border-radius: 8px; }
.stage:fullscreen { height: 100vh; }
.grid4 { position: absolute; inset: 0; display: grid; gap: 6px; padding: 6px; }
.grid4.n1 { grid-template-columns: 1fr; } .grid4.n2 { grid-template-columns: 1fr 1fr; } .grid4.n3, .grid4.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tile { position: relative; overflow: hidden; border-radius: 6px; background: #1d1630; box-shadow: inset 0 3px 0 var(--c); }
.tile iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transition: filter .8s; }
.tile .cap { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(10, 15, 29, .7); border: 1px solid var(--c); color: #fff; }
.tile iframe { top: 3px; height: calc(100% - 3px); }
.tile .cap em { font-style: normal; }
.tile.out iframe { filter: saturate(.2) brightness(.6); }
.tile .badge { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-7deg) scale(.6); opacity: 0; font: 900 40px var(--serif); padding: 8px 20px; border: 4px solid #ff6a3d; color: #ff6a3d; border-radius: 8px; background: rgba(10, 15, 29, .75); transition: transform .5s var(--ease), opacity .3s; white-space: nowrap; }
.tile.out .badge, .tile.win .badge { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
.tile.win .badge { color: #ffd166; border-color: #ffd166; }

.under { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 14px 0; }
.under select { font: 15px var(--sans); padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-d); background: var(--night-2); color: var(--text-d); max-width: 100%; }
.under .btn { border: 1px solid #e8ecf4; background: transparent; color: #e8ecf4; padding: 10px 16px; border-radius: 8px; }
.under .btn.primary { background: #e8ecf4; color: var(--night); }
.under .btn:disabled { opacity: .4; cursor: default; }
.under .say { color: #c9d1e3; font-size: 15px; flex: 1 1 380px; }
.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 22px; padding: 0 0 26px; font-size: 15px; }
.verdicts > div { display: flex; gap: 8px; align-items: baseline; }
.verdicts .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.verdicts b { white-space: nowrap; }
.verdicts .why { display: block; color: var(--muted-d); font-size: 13px; line-height: 1.5; }

::view-transition-old(stage), ::view-transition-new(stage) { animation-duration: .45s; animation-timing-function: var(--ease); }
::view-transition-old(board) { animation: vt-out .3s var(--ease) both; }
::view-transition-new(board) { animation: vt-in .45s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- 浅色区 ---------- */
section { margin-top: 64px; }
h2 { font: 900 32px/1.3 var(--serif); margin: 0 0 6px; }
.lead { color: var(--ink-2); margin: 0 0 22px; max-width: 820px; }
.board { view-transition-name: board; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.board-head a.more { text-decoration: none; font-weight: 600; border-bottom: 2px solid var(--flame); padding-bottom: 2px; white-space: nowrap; }
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bar { display: grid; grid-template-columns: 44px 220px 1fr 150px; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--rule); position: relative; overflow: hidden; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.bar:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20, 30, 50, .08); }
.bar.sel { border-color: var(--c); box-shadow: inset 4px 0 0 var(--c); }
.bar .r { font: 900 22px var(--serif); color: var(--muted); }
.bar .who b { display: block; font-size: 16px; }
.bar .who small { color: var(--muted); font-size: 13px; }
.bar .track { height: 12px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--c); border-radius: 6px; transform-origin: left; transform: scaleX(0); transition: transform 1.3s var(--ease); }
.bars.in .track i { transform: scaleX(var(--v)); }
.bar .val { text-align: right; }
.bar .val b { font: 900 24px var(--serif); }
.bar .val small { display: block; color: var(--muted); font-size: 13px; }
.bar.ref { background: repeating-linear-gradient(135deg, #fff 0 10px, #f8f5f0 10px 20px); cursor: default; }
.bar.ref:hover { transform: none; box-shadow: none; }

/* 这道题考什么：左边能力（对应栏目的速度 / 广度 / 深度 / 高度），右边难点 */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.about h3 { font: 900 20px var(--serif); margin: 0 0 12px; }
.skills, .hard { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px; }
.skill { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.skill:first-of-type { border-top: 0; padding-top: 0; }
.skill b { display: block; font-size: 17px; }
.skill p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.dim { align-self: start; text-align: center; font: 900 16px var(--serif); padding: 6px 0; border-radius: 8px; color: #fff; }
.d-深度 { background: #2a5f9e; } .d-广度 { background: #1f8a8a; } .d-高度 { background: #b8436e; } .d-速度 { background: #c98a1a; }
.hard ol { margin: 0; padding: 0; list-style: none; counter-reset: k; }
.hard li { counter-increment: k; position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.hard li:first-child { border-top: 0; padding-top: 0; }
.hard li::before { content: counter(k, decimal-leading-zero); position: absolute; left: 0; top: 10px; font: 900 22px var(--serif); color: var(--flame); }
.hard li:first-child::before { top: -2px; }
.hard li b { color: var(--ink); }
.task .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.task .tags i { font-style: normal; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .9); background: rgba(10, 15, 29, .35); }

.table-wrap { overflow-x: auto; }
table.mx { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 620px; font-size: 15px; }
table.mx th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--ink); padding: 8px 14px; }
table.mx td { border-bottom: 1px solid var(--rule); padding: 12px 14px; }
table.mx td.m { display: flex; align-items: center; gap: 10px; }
table.mx td.m .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
table.mx td.m small { color: var(--muted); display: block; font-size: 13px; }
table.mx td.s { cursor: pointer; border-radius: 8px; transition: background .2s; }
table.mx td.s:hover { background: #fff; }
table.mx td.s b { font: 900 20px var(--serif); }
table.mx td.s small { display: block; color: var(--muted); font-size: 13px; }
table.mx td.none { color: #c3bdb2; }

.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.method div { border-top: 3px solid var(--ink); padding-top: 12px; color: var(--ink-2); font-size: 15px; }
.method b { display: block; color: var(--ink); font: 900 18px var(--serif); margin-bottom: 4px; }
footer { margin: 72px 0 40px; padding-top: 14px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 14px; }

/* 滚动进入时浮现（浏览器支持 scroll-driven animations 时启用，不支持就直接显示） */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .intro h1 { font-size: 32px; }
  .tasks { grid-template-columns: 1fr; } .task { height: 190px; } .task b { font-size: 30px; }
  .bar { grid-template-columns: 32px 1fr 110px; } .bar .track { display: none; }
  .about, .method { grid-template-columns: 1fr; }
  .nav a.hide-s { display: none; }
}
