/* 资源站首页：左边一句话，右边"最新一件实物 + 栏目索引"。环境光的色温跟着右边正在看的栏目走。
   变量与组件在 /resources/brand/（tokens.css、components.css），这里只管首页的排版。 */
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--on-ink); }
.skip:focus { top: 12px; }

/* ---------- 首屏 ---------- */
.hero { position: relative; display: flex; align-items: center; min-height: min(calc(100svh - 60px), 860px); padding: 40px 0 64px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 { margin-top: 30px; font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: var(--ls-display); }
.hero h1 > span { display: block; white-space: nowrap; }
.hero .lede { margin-top: 30px; max-width: 25em; font-size: var(--fs-lead); line-height: var(--lh-body); color: var(--ink-2); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero-meta { display: flex; gap: 36px; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--hair); max-width: 30em; }
.hero-meta div { display: grid; gap: 6px; }
.hero-meta b { font-family: var(--mono); font-weight: 500; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-meta span { font-size: 12px; color: var(--ink-3); }

.field { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 36px; align-items: center; }

/* 最新一件：书、海报或一张纸，下面一行说明它是什么、哪天的 */
.show { position: relative; }
.show-a { display: block; }
.show-stage { height: 360px; --floor: 6%; }
.show-stage .book3d { --w: 212px; }
.show.in .stage > * { animation: show-in .7s var(--ease) both; }
.show.in figcaption { animation: show-in .7s .08s var(--ease) both; }
@keyframes show-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.show figcaption { margin-top: 18px; display: grid; gap: 8px; }
.show figcaption .mono { font-size: 11px; letter-spacing: var(--ls-meta); color: var(--accent); text-transform: uppercase; }
.show figcaption b { font-size: 15px; line-height: 1.55; font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.show-a:hover figcaption b { text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 4px; }
.frame { width: 224px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--sunk); transform: perspective(1200px) rotateY(-14deg) rotateX(4deg); box-shadow: var(--highlight), var(--shadow-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.sheetlet { width: 214px; aspect-ratio: 3 / 4.1; display: flex; flex-direction: column; padding: 20px 18px 16px; border-radius: 12px; background: var(--paper);
  transform: perspective(1200px) rotateY(-16deg) rotateX(4deg); box-shadow: var(--highlight), var(--shadow-3); }
.sl-top { display: flex; align-items: center; gap: 8px; }
.sl-top .app-icon { --s: 24px; border-radius: 7px; }
.sl-top .app-icon .icon { width: 14px; height: 14px; }
.sl-top .mono { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.sl-top time { margin-left: auto; }
.sheetlet > b { margin-top: 22px; font-size: 17px; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sheetlet p { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sheetlet ol { margin-top: 14px; display: grid; }
.sheetlet li { display: grid; grid-template-columns: 22px 1fr; padding: 7px 0; border-top: 1px solid var(--hair); font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.sheetlet li i { font-style: normal; color: var(--accent); }
.sl-foot { margin-top: auto; font-size: 9px; letter-spacing: .14em; color: var(--ink-4); }

/* 栏目索引：发丝线分隔的行，正在看的那一行是一张浮起来的纸 */
.index { display: grid; }
.ix { --inset: 60px; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 16px; min-height: 64px; padding: 0 16px 0 14px; }
.ix .ix-name { display: block; font-size: 16px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix .ix-tag { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-meta { display: grid; justify-items: end; gap: 2px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ix-meta b { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.ix-new { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--accent); background: var(--accent-wash); vertical-align: 2px; }
.ix.on { background: var(--paper); box-shadow: var(--highlight), var(--shadow-2); z-index: 1; }
.ix.on::before, .ix.on + .ix::before { opacity: 0; }
.ix .app-icon { --s: 32px; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(0,0,0,.05), 0 1px 2px rgba(11,13,18,.1), 0 4px 10px -6px oklch(0.5 0.15 var(--h) / .55); }
.ix .app-icon .icon { width: 17px; height: 17px; }
.ix:not(.on):not(:hover) .app-icon { filter: saturate(.55); opacity: .88; }
.ix.on .ix-meta b { color: var(--accent); }
.index.dense .ix { min-height: 46px; }
.index.dense .ix-tag { display: none; }

/* ---------- 知识手册：一本书立在台面上 + 书架 ---------- */
.digest { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.feature { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: center; }
.feature-stage { height: 340px; --floor: 4%; }
.feature-stage .book3d { --w: 200px; transition: transform 1s var(--ease); }
.feature:hover .book3d { --ry: -14deg; }
.feature-body { display: flex; flex-direction: column; align-items: flex-start; }
.meta-line { font-size: 12px; color: var(--accent); letter-spacing: .02em; }
.feature-body h3 { margin-top: 14px; font-size: 30px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.feature-body p { margin-top: 16px; color: var(--ink-2); font-size: 15px; line-height: 1.85; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feature-body .from { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.feature-body .btn { margin-top: 24px; }
.shelf { display: grid; border-top: 1px solid var(--hair); }
.shelf a { --inset: 0; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 18px; padding: 16px 12px 16px 4px; }
.shelf .cover { width: 58px; }
.shelf .cover .glyph { display: none; }
.shelf .cover-t { font-size: 10px; }
.shelf h4 { font-size: 15px; line-height: 1.55; font-weight: 500; text-wrap: pretty; }
.shelf .mono { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-3); }

/* ---------- 技能榜：表格数字 + 细进度条 ---------- */
.rank { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.rrow { --inset: 0; grid-template-columns: 48px minmax(0, 1fr) 132px; gap: 16px; padding: 18px 10px; border-radius: 12px; }
.rank > div { border-top: 1px solid var(--hair); }
.rrow .no { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -.04em; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.rrow.top .no { color: var(--accent); }
.rrow h4 { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow .id { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.rrow .id i { font-style: normal; font-family: var(--sans); padding: 1px 7px; border-radius: 5px; background: var(--sunk); color: var(--ink-2); }
.meter { display: grid; gap: 8px; justify-items: end; }
.meter b { font-family: var(--mono); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.meter b small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.meter .bar { width: 100%; height: 2px; border-radius: 2px; background: var(--hair); overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--ink); transform-origin: left; transition: transform 1.2s var(--ease); }
.rrow.top .meter .bar i { background: var(--accent); }
.rv:not(.in) .meter .bar i { transform: scaleX(0); }

/* ---------- 提示词：可复制的东西才用纸 ---------- */
.prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pcard { display: flex; flex-direction: column; padding: 26px 24px 20px; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard-top .mono { font-size: 11px; color: var(--ink-3); }
.pcard-top a.mono:hover { color: var(--ink); }
.pcard h3 { margin-top: 18px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pcard .what { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--ink-3); text-wrap: pretty; }
.ptext { position: relative; margin-top: 20px; padding: 16px 16px 18px; border-radius: 12px; background: var(--sunk); font-size: 14px; line-height: 2; color: var(--ink-2); max-height: 216px; overflow: hidden; }
.ptext::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(transparent, var(--sunk)); }
.slot { padding: 2px 6px; margin: 0 2px; border-radius: 6px; color: var(--accent); background: var(--paper); box-shadow: 0 0 0 1px var(--accent-wash), 0 1px 2px rgba(11,13,18,.06); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pcard-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-3); }
.pcard-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 视频模板：海报 + 图下说明（浅色上不在图上压黑渐变） ---------- */
.media { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.mcard { display: block; }
.mimg { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--sunk); box-shadow: var(--shadow-2); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.mimg img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.mcard:hover .mimg { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.mcard:hover img { transform: scale(1.04); }
.mcard h4 { margin-top: 14px; font-size: 15px; font-weight: 500; line-height: 1.5; text-wrap: pretty; }
.mcard .mono { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.mcard .play .icon { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.mcard .play { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--glass); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); opacity: 0; transform: scale(.85); transition: .35s var(--ease); }
.mcard:hover .play { opacity: 1; transform: none; }
.mcard:first-child { grid-column: span 2; grid-row: span 2; }
.mcard:first-child .mimg { aspect-ratio: auto; height: calc(100% - 64px); min-height: 260px; }
.mcard:first-child h4 { font-size: 20px; font-weight: 700; }

/* ---------- 手机 ---------- */
@media (max-width: 1180px) and (min-width: 861px) {
  .field { grid-template-columns: minmax(0, 1fr); }
  .show { display: none; }
}
@media (max-width: 860px) {
  .hero { display: block; min-height: 0; padding: 36px 0 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { margin-top: 20px; font-size: 44px; line-height: 1.1; }
  .hero .lede { margin-top: 18px; font-size: 16px; }
  .hero-actions { margin-top: 26px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-meta { margin-top: 32px; gap: 24px; }
  .field { grid-template-columns: 1fr; gap: 12px; }
  .show-a { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 18px; align-items: center; }
  .show-stage { height: 190px; }
  .show-stage .book3d { --w: 112px; }
  .show-stage .book3d .s, .show-stage .book3d .a, .show-stage .book3d .k { display: none; }
  .frame, .sheetlet { width: 118px; }
  .sheetlet { padding: 12px 10px; }
  .sheetlet > b { margin-top: 10px; font-size: 12px; -webkit-line-clamp: 5; }
  .sheetlet p, .sheetlet ol, .sl-foot, .sl-top .mono { display: none; }
  .show figcaption { margin-top: 0; }
  .ix { --inset: 52px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; min-height: 60px; padding: 0 10px; }
  .ix .app-icon { --s: 30px; }
  .ix .ix-name { font-size: 15px; }

  .digest { grid-template-columns: 1fr; gap: 32px; }
  .feature { grid-template-columns: 116px minmax(0, 1fr); gap: 20px; align-items: start; }
  .feature-stage { height: 180px; }
  .feature-stage .book3d { --w: 104px; }
  .feature-stage .book3d .s, .feature-stage .book3d .a, .feature-stage .book3d .k { display: none; }
  .feature-body h3 { margin-top: 8px; font-size: 20px; }
  .feature-body p { display: none; }
  .feature-body .from { font-size: 12px; }
  .rank { grid-template-columns: 1fr; }
  .rank > div + div { border-top: 0; }
  .rrow { grid-template-columns: 34px minmax(0, 1fr) 88px; gap: 12px; padding: 16px 4px; }
  .rrow .no { font-size: 20px; }
  .rrow h4 { font-size: 15px; }
  .rail { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; margin: -24px calc(var(--gutter) * -1); padding: 24px var(--gutter) 40px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { scroll-snap-align: start; }
  .prompts.rail { gap: 14px; }
  .media.rail { grid-auto-columns: 78%; gap: 14px; }
  .mcard:first-child { grid-column: auto; grid-row: auto; }
  .mcard:first-child .mimg { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .mcard:first-child h4 { font-size: 15px; font-weight: 500; }
  .mcard .play { opacity: 1; transform: none; }
}
