/* ---------------------------------------------------------
   MiSans：全站正文与等宽场景统一用它（可变字重 150–700）
   字体文件是 MiSansVF.ttf 的子集，保留站点用到的字符，约 2.6 MB
   --------------------------------------------------------- */
@font-face {
  font-family: "MiSans";
  src: url("fonts/MiSans.woff2?v=20261030") format("woff2");
  font-weight: 150 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------
   设计变量（与主站同一套语言）
   --------------------------------------------------------- */
:root {
  --bg: #fbfbf9;
  --bg-soft: #f4f3ef;
  --surface: #ffffff;
  --ink: #1b1d1b;
  --ink-soft: #4d524d;
  --muted: #6b706a;
  --line: #e6e4de;
  --line-strong: #d3d1ca;
  --hover: #f1f0eb;
  --accent: #1a67b3;
  --accent-ink: #14538f;
  --accent-soft: rgba(26, 103, 179, 0.09);
  --code-bg: #f3f2ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shell: 1120px;
  --head-h: 68px;
  --font-sans: "MiSans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "MiSans", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

/* 深色不再是系统媒体查询，而是 <html data-theme="dark">：
   由 assets/theme-init.js 在绘制前按「浅色 / 深色 / 跟随系统」三档算好写进 html，
   这样手动切到深色后不会被系统设置抢回去，也不会刷新闪白。 */
html[data-theme="dark"] {
  --bg: #0e100f;
  --bg-soft: #121513;
  --surface: #151816;
  --ink: #e9ebe6;
  --ink-soft: #b7bdb5;
  --muted: #8a9188;
  --line: #242925;
  --line-strong: #363c36;
  --hover: #191d19;
  --accent: #79aee6;
  --accent-ink: #a3c9f0;
  --accent-soft: rgba(121, 174, 230, 0.12);
  --code-bg: #161a17;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 手机上点按不再闪系统默认的半透明方块，交互反馈交给各自的样式 */
  -webkit-tap-highlight-color: transparent;
}

/* 接管翻页时关掉原生吸附与平滑，交给脚本缓动 */
html.js-pager {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(880px 520px at 82% -10%, var(--accent-soft), transparent 62%),
    radial-gradient(660px 460px at 0% 106%, var(--accent-soft), transparent 60%);
}

main {
  position: relative;
  z-index: 1;
}

/* hidden 属性必须能压过组件自己的 display（.dl-btn 之类），否则「待上传」和按钮会同时出现 */
[hidden] {
  display: none !important;
}

/* 图标精灵：Linux 的 Tux 路径很长，全页只存一份，按钮和菜单里的徽章都 <use> 它 */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code-bg);
  font: 0.9em var(--font-mono);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font: 11px/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16.5px);
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------
   顶栏 / 进度点
   --------------------------------------------------------- */
.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-head.is-scrolled {
  background: var(--surface);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}

.shell--head {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

/* 顶栏的文字式入口：不带边框和底色，靠颜色变化表示悬停与当前页 */
.head-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.head-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.head-link.is-current {
  color: var(--ink);
}

.head-help-short {
  display: none;
}

.head-cta {
  padding: 8px 16px;
  font-size: 13.5px;
}

/* 主题切换按钮：动态图标与管理后台同一套资源（浅色 → 深色 → 跟随系统），位置放在顶栏左侧、紧跟标志。
   静态图靠 mask 上 currentColor，切换时 theme.js 会把它换成 21px 的过渡 SVG 播一次动画。
   静态 SVG 必须用 evenodd 把字母 A 挖空、内部不许再套 <mask>：mask-image 只看 alpha，
   旧那版用 <mask> + 再描一遍 A，落到这里就变成一个实心黑块，图标看着是烂的。 */
.theme-btn {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.theme-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.theme-btn.is-animating {
  background: var(--hover);
}

.theme-btn svg {
  width: 21px;
  height: 21px;
  display: block;
}

.theme-icon {
  width: 21px;
  height: 21px;
  display: block;
  background: currentColor;
  --theme-icon: url("/PasswordManager/assets/icons/theme/light.svg");
  -webkit-mask: var(--theme-icon) center / contain no-repeat;
  mask: var(--theme-icon) center / contain no-repeat;
}

html:not([data-theme]) .theme-icon,
html[data-theme="light"][data-mode="light"] .theme-icon {
  --theme-icon: url("/PasswordManager/assets/icons/theme/light.svg");
}

html[data-theme="dark"][data-mode="dark"] .theme-icon {
  --theme-icon: url("/PasswordManager/assets/icons/theme/dark.svg");
}

html[data-theme="light"][data-mode="auto"] .theme-icon {
  --theme-icon: url("/PasswordManager/assets/icons/theme/light-a.svg");
}

html[data-theme="dark"][data-mode="auto"] .theme-icon {
  --theme-icon: url("/PasswordManager/assets/icons/theme/dark-a.svg");
}

/* 主题切换时只做颜色过渡，别把布局动画也带上 */
html.theme-anim *:not(svg):not(svg *) {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* 宽屏顶栏放大一档：标和字一起变大，右侧两个入口保持原尺寸 */
@media (min-width: 900px) {
  :root {
    --head-h: 82px;
  }

  .brand {
    gap: 12px;
    font-size: 22px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }
}

.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (min-width: 1280px) {
  .rail {
    display: flex;
  }
}

.rail-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  transition: height 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.rail-dot:hover {
  border-color: var(--ink-soft);
}

.rail-dot.is-active {
  height: 24px;
  border-color: var(--accent);
  background: var(--accent);
}

.rail-dot span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.rail-dot:hover span,
.rail-dot:focus-visible span {
  opacity: 1;
}

/* ---------------------------------------------------------
   分屏
   --------------------------------------------------------- */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 0 72px;
  /* 任何一节都不许把页面撑出横向可拖的范围：手机上一旦能左右拖，
     斜着滑的那一下就被横向吃掉，上下翻页手感立刻变差（光晕、轮播位移都可能溢出） */
  overflow-x: clip;
}

.screen-inner {
  width: 100%;
}

@media (min-width: 900px) and (min-height: 700px) {
  html:not(.js-pager) {
    scroll-snap-type: y mandatory;
  }

  .screen {
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

.section-head {
  margin-bottom: clamp(26px, 4vh, 42px);
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
}

.section-head .lede {
  margin-top: 12px;
}

/* ---------------------------------------------------------
   按钮
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}

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

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

.btn-block {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
}

.btn-lg {
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 15px;
}

/* ---------------------------------------------------------
   首屏
   --------------------------------------------------------- */
.hero {
  padding-top: 96px;
  padding-bottom: 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}

.hero h1 {
  /* 标题只有五个字，放大到接近栏宽；再大就会换行 */
  font-size: clamp(52px, 6.2vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  white-space: nowrap;
  /* 副标题更宽时（窄一点的桌面宽度），两行仍共用同一条中线 */
  text-align: center;
}

/* 后续屏（教务导入等）沿用首屏结构，标题更长，字号收到单行放得下为止 */
.hero--sub h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  white-space: normal;
}

/* 标题只有一行：把文案块收到标题的宽度，副标题再在标题下居中 */
.hero-copy {
  width: max-content;
  max-width: 100%;
}

.hero .lede {
  font-size: clamp(15px, 1.2vw, 17px);
  max-width: none;
  text-align: center;
}

/* 首屏类页脚注：教务适配的求助说明，跟着文案块居中、压小一档 */
.hero-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  text-wrap: pretty;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 26px;
  color: var(--muted);
  font: 11.5px/1.5 var(--font-mono);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.scroll-hint i {
  font-style: normal;
  animation: hint-bob 2.4s var(--ease) infinite;
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------------------------------------------------------
   课表示意（设备框）
   --------------------------------------------------------- */
.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -6% 12%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(26, 103, 179, 0.15);
  filter: blur(50px);
}

html[data-theme="dark"] .hero-visual::before {
  background: rgba(121, 174, 230, 0.13);
}

.hero-shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* 首屏要保持「一屏装得下」：可用高度 = 视口 - 顶栏留白(96) - 底部留白(44) */
  max-height: calc(100vh - 140px);
  max-height: calc(100svh - 140px);
  margin: 0 auto;
  filter: drop-shadow(0 26px 46px rgba(20, 30, 24, 0.22));
}

/* ---------------------------------------------------------
   首屏（文字在上、截图在下，两张截图同位轮流淡入淡出）
   --------------------------------------------------------- */
.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vh, 30px);
}

/* 文案块不再按标题宽度收，整屏居中 */
.hero-stack .hero-copy {
  width: auto;
  max-width: 100%;
}

.hero-stage {
  /* 手机那张约到屏高 2/3；电脑端与它同高（object-fit 保证两张都不变形） */
  --shot-h: min(66svh, calc(100svh - 250px));
  position: relative;
  width: 100%;
  height: var(--shot-h);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  filter: drop-shadow(0 26px 46px rgba(20, 30, 24, 0.22));
  user-select: none;
  -webkit-user-drag: none;
}

.hero-slide.is-active {
  opacity: 1;
}

/* 没跑脚本 / 减少动效时只留第一张（手机），不要把两张叠在一起 */
html:not(.js-slides) .hero-slide:not(.is-active) {
  display: none;
}

/* ---------------------------------------------------------
   文字 + 录屏（左文右视频）
   --------------------------------------------------------- */
.media {
  padding-top: 96px;
  padding-bottom: 44px;
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.media-copy h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.14;
  margin-bottom: 18px;
}

.media-copy .lede {
  font-size: clamp(15px, 1.2vw, 17px);
  /* 别让最后一行只剩「不怕。」两个字 */
  text-wrap: pretty;
}

.media-visual {
  position: relative;
  /* 光晕左右各溢出 12%；但窄屏上一栏几乎占满视口，再溢 12% 就把整页撑出「能左右拖」的范围，
     斜着滑的那一下被横向吃掉、上下翻页跟着发飘。所以溢出量再封一次：最多溢到视口边为止。 */
  --glow-bleed: min(12%, calc((100vw - 100%) / 2));
}

.media-visual::before {
  content: "";
  position: absolute;
  inset: 8% calc(var(--glow-bleed) * -1) 12%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(26, 103, 179, 0.15);
  filter: blur(50px);
}

html[data-theme="dark"] .media-visual::before {
  background: rgba(121, 174, 230, 0.13);
}

/* 视频按高度定尺寸（录屏是竖屏比例），宽度 auto 跟着比例走，
   只留一个 max-width 兜住特别高的窗口，避免把左边的文字挤没 */
.media-shot {
  display: block;
  height: calc(100svh - 190px);
  max-height: calc(100svh - 190px);
  width: auto;
  max-width: min(42vw, 420px);
  filter: drop-shadow(0 26px 46px rgba(20, 30, 24, 0.22));
  background: none;
}

/* ---------------------------------------------------------
   通知轮播（中间一张是前两屏的 2/3，两边 3/4 并淡一点）
   --------------------------------------------------------- */
:root {
  /* 栏宽（shell 1120 减去左右内边距）；轮播每一段都按它算高度 */
  --avail: min(calc(100vw - 48px), 1072px);
}

.showcase {
  /* 一段的高度：竖屏手机 + 横屏窗口并排 ≈ 2.02 倍高，所以高度既要让屏高装得下，
     也要让栏宽装得下（谁小听谁），这样两张图都是原比例，不会被横向压窄。 */
  --gap: calc(var(--part-h) * 0.08);
  --part-h: min(calc(100svh - 300px), calc(var(--avail) / 2.02));
  /* 换段时的横向位移：排在当前段后面的停在 +36（右边候场），排在前面的停在 -36（已经往左走开），
     当前段回到 0 —— 往前翻向左走、往后翻向右走 */
  --slide-x: 36px;
  padding-top: 96px;
  padding-bottom: 40px;
  /* 只裁横向：位移出去的那一段不许撑出横向滚动条；
     纵向不能用 overflow，否则截图四周的投影会被切掉 */
  overflow-x: clip;
}

.showcase-inner {
  display: flex;
  flex-direction: column;
}

/* 没有脚本或系统减少了动效时：三段从上到下都摆出来、三条文案并排，不藏内容 */
.showcase-copies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px clamp(24px, 4vw, 56px);
}

.showcase-copy {
  text-align: center;
}

.showcase-copy h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
}

.showcase-copy p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16.5px);
}

.showcase-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: clamp(24px, 4vh, 40px);
}

.showcase-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  height: var(--part-h);
}

.showcase-shot {
  display: block;
  height: 100%;
  width: auto;
  filter: drop-shadow(0 18px 34px rgba(20, 30, 24, 0.18));
  background: none;
}

/* ---- 轮播态：三段叠在同一个位置，只做淡入淡出，左右不露邻段 ---- */
.showcase.is-carousel .showcase-copies {
  display: grid;
  justify-items: center;
}

/* 文案和图像走同一套位移：没露出来的那几条/那几段，排在当前这一段**前面的停在左边、后面的停在右边**，
   所以往前翻整体向左走（下一段从右边向左淡入），往后翻整体向右走（上一段从左边向右淡入），
   不会出现「进来的和出去的都往同一边挤」。叠在同一格里交叉，切换时不撑动版面。 */
.showcase.is-carousel .showcase-copy {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateX(var(--slide-x));
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.showcase.is-carousel .showcase-copy.is-before {
  transform: translateX(calc(var(--slide-x) * -1));
}

.showcase.is-carousel .showcase-copy.is-current {
  opacity: 1;
  transform: none;
}

.showcase.is-carousel .showcase-stage {
  position: relative;
  display: block;
  height: var(--part-h);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.showcase.is-carousel .showcase-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(var(--slide-x));
  pointer-events: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  z-index: 1;
  -webkit-user-drag: none;
}

.showcase.is-carousel .showcase-item.is-before {
  transform: translateX(calc(var(--slide-x) * -1));
}

.showcase.is-carousel .showcase-item.is-current {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}

/* 进度点跳转、从别的屏进来时不做补间，免得两段内容叠着淡一遍 */
.showcase.no-transition .showcase-item,
.showcase.no-transition .showcase-copy {
  transition: none;
}

/* ---------------------------------------------------------
   同步（文案在上、两张图并排在下；只有一段，不轮播）
   --------------------------------------------------------- */
.sync {
  /* 高度算法与 .showcase 完全一样：手机 0.472 + 间距 0.08 + 电脑 1.469 ≈ 2.02 倍高，
     屏高和栏宽谁先装不下就按谁来，两张图都保持原比例、不横向压窄。
     这里比轮播屏多留 60px，因为下面还有一句带链接的注释。 */
  --part-h: min(calc(100svh - 360px), calc(var(--avail) / 2.02));
  --gap: calc(var(--part-h) * 0.08);
  padding-top: 96px;
  padding-bottom: 44px;
}

.sync-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sync-copy {
  text-align: center;
}

.sync-copy h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
}

.sync-copy .lede {
  margin-top: 12px;
  max-width: none;
  font-size: clamp(15px, 1.2vw, 17px);
}

.sync-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  height: var(--part-h);
  margin-top: clamp(22px, 3.6vh, 38px);
}

.sync-shot {
  display: block;
  height: 100%;
  width: auto;
  filter: drop-shadow(0 18px 34px rgba(20, 30, 24, 0.18));
  background: none;
}

/* ---------------------------------------------------------
   节假日（文字夹在两张截图中间）
   --------------------------------------------------------- */
.festival {
  padding-top: 96px;
  padding-bottom: 44px;
}

/* 比常规栏宽一点：两张全尺寸截图 + 中间一列文字才放得下；
   间隔随窗口变宽，让截图与文字之间留出呼吸位 */
.festival-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left copy right";
  gap: clamp(24px, 6vw, 96px);
  align-items: center;
  width: 100%;
  max-width: 1424px;
  margin: 0 auto;
  padding: 0 24px;
}

.festival-copy {
  grid-area: copy;
  text-align: center;
}

.festival-copy h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  white-space: nowrap;
}

.festival-copy .lede {
  margin-top: 16px;
  max-width: none;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
}

.festival-shot--left {
  grid-area: left;
}

.festival-shot--right {
  grid-area: right;
}

/* 两列并排时按格子收窄，别沿用首屏手机上 380px 的宽度上限 */
.festival-shot .hero-shot {
  max-width: 100%;
}

/* ---------------------------------------------------------
   多比例适配（两行设备截图，高度约为通知屏中图的一半）
   --------------------------------------------------------- */
.adapt {
  /* 通知屏中图是 (100svh - 140px) 的 2/3，这里再取一半 */
  --shot-h: calc((100svh - 140px) * 0.3333);
  padding-top: 96px;
  padding-bottom: 44px;
}

.adapt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.adapt-copy {
  text-align: center;
}

.adapt-copy h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
}

.adapt-copy .lede {
  margin-top: 14px;
  max-width: none;
  font-size: clamp(15px, 1.2vw, 17px);
}

.adapt-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.6vh, 32px);
  width: 100%;
  margin-top: clamp(26px, 4vh, 40px);
}

.adapt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.6vw, 38px);
  max-width: 100%;
}

/* 四张图统一高度、各自按比例定宽；放不下时按行收窄（min-width: 0 才允许收缩） */
.adapt-shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--shot-h);
  min-width: 0;
  filter: drop-shadow(0 14px 28px rgba(20, 30, 24, 0.18));
}

/* ---------------------------------------------------------
   功能（6 张卡）
   --------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.card p {
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------
   教务导入
   --------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13.5px;
  counter-increment: step;
}

.steps li::before {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  content: counter(step);
  font: 11px/1 var(--font-mono);
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding: 5px 0 5px 20px;
  color: var(--muted);
  font-size: 13px;
}

.ticks li::before {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
}

/* ---------------------------------------------------------
   数据 / 权限
   --------------------------------------------------------- */
.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--code-bg);
}

.code code {
  padding: 0;
  background: none;
  /* 目录树靠空格对齐，不能让浏览器把连续空白折掉 */
  white-space: pre;
  font-size: 12px;
  line-height: 1.7;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

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

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table td:first-child {
  width: 42%;
  white-space: nowrap;
}

.table code {
  font-size: 11.5px;
}

/* ---------------------------------------------------------
   下载（主按钮按当前系统变化 + 「更多下载」下拉菜单）
   --------------------------------------------------------- */
.dl-action {
  /* 主按钮和下面菜单同宽：改一处两边一起变 */
  --dl-w: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 26px;
}

.dl-primary {
  min-width: var(--dl-w);
  height: 50px;
  padding: 0 28px;
  gap: 9px;
  font-size: 15.5px;
}

.dl-primary .os-icon {
  width: 19px;
  height: 19px;
  flex: none;
}

/* JS 把检测到的系统写进 data-os，只露对应那枚图标；没脚本时默认显示 Windows 版 */
.dl-primary[data-os="windows"] .os-icon:not(.os-icon--windows),
.dl-primary[data-os="android"] .os-icon:not(.os-icon--android),
.dl-primary[data-os="linux"] .os-icon:not(.os-icon--linux) {
  display: none;
}

/* 当前系统对应的包还没上传时，app.js 直接把按钮 hidden 掉，不留占位 */

.dl-more {
  position: relative;
  margin-top: 12px;
}

/* 「使用网页端」跟「更多下载」同档：跳本站 /web/，不占主按钮的位置 */
.dl-web-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.16s;
}

.dl-web-link:hover {
  color: var(--ink);
}

.dl-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.16s;
}

.dl-more-trigger:hover {
  color: var(--ink);
}

.dl-caret {
  width: 14px;
  height: 14px;
  transition: transform 0.22s var(--ease);
}

.dl-more:hover .dl-caret,
.dl-more:focus-within .dl-caret,
.dl-more.is-open .dl-caret {
  transform: rotate(180deg);
}

.dl-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 30;
  width: min(var(--dl-w), calc(100vw - 48px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 22px 48px -26px rgba(15, 26, 20, 0.38), 0 4px 14px rgba(15, 26, 20, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  pointer-events: none;
  /* 收起时留缓冲：鼠标从触发文字挪到菜单要跨过一段空隙，不能刚离开就消失 */
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s linear 0.24s;
}

/* 触发文字与菜单之间的空隙用透明桥接层填上，鼠标下移时始终落在 .dl-more 内，:hover 不会断 */
.dl-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 16px;
}

.dl-more:hover .dl-menu,
.dl-more:focus-within .dl-menu,
.dl-more.is-open .dl-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s;
}

.dl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink);
  transition: background 0.16s;
}

.dl-row:hover {
  background: var(--hover);
}

.dl-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.dl-badge svg {
  width: 16px;
  height: 16px;
}

.dl-name {
  font-size: 14.5px;
  font-weight: 600;
}

.dl-ver {
  margin-left: auto;
  color: var(--muted);
  font: 12.5px/1 var(--font-mono);
}

/* 网页端不是安装包，菜单里用一条分隔线跟三个平台区分开 */
.dl-row-wrap--web {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------
   下载
   --------------------------------------------------------- */
.download {
  text-align: center;
}

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.12;
  margin-bottom: 12px;
}

.download .lede {
  max-width: 54ch;
}

/* 下载页收着排：版本、日期/下载次数、下载入口连成一串，别和课程表那张参考图一样散 */
.download .meta-row {
  margin-top: 14px;
}

/* 页脚按个人站首页的格式：版权一行、备案号一行，整体居中 */
.download .site-foot {
  flex-direction: column;
  gap: 4px;
  margin-top: clamp(36px, 6vh, 64px);
}

.site-foot .footer-beian {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.site-foot .footer-beian a {
  color: inherit;
}

.site-foot .footer-beian a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 备案号下面一行：字体授权说明，跟备案号同样的小号等宽 */
.site-foot .footer-font {
  font-family: var(--font-mono);
  font-size: 11.5px;
}


/* 友情链接：四站互链，按「个人网站 / 软件 / 服务」分三列、列内竖排；配色跟各站 token，深浅色自动适配 */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  text-align: left;
}
.friend-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}
.friend-group-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.friend-links a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.6;
}
.friend-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  width: min(560px, 100%);
  margin-top: clamp(48px, 9vh, 92px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-foot p {
  margin: 0;
}

/* ---------------------------------------------------------
   返回顶部
   --------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 26;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: 0 6px 18px rgba(20, 30, 24, 0.1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease),
    border-color 0.16s var(--ease), background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.to-top:hover {
  background: var(--hover);
  color: var(--ink);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------------------------------------------------------
   进场
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.screen.is-active .reveal {
  opacity: 1;
  transform: none;
}

.screen.is-active .cards .card:nth-child(2) {
  transition-delay: 0.06s;
}

.screen.is-active .cards .card:nth-child(3) {
  transition-delay: 0.12s;
}

.screen.is-active .cards .card:nth-child(4) {
  transition-delay: 0.18s;
}

.screen.is-active .cards .card:nth-child(5) {
  transition-delay: 0.24s;
}

.screen.is-active .cards .card:nth-child(6) {
  transition-delay: 0.3s;
}

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

  /* 返回顶部只剩淡入淡出，不再上移 */
  .to-top {
    transform: none;
    transition: opacity 0.2s linear, visibility 0.2s linear;
  }

  .reveal,
  .screen.is-active .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-hint i {
    animation: none;
  }
}

/* ---------------------------------------------------------
   窄屏
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .screen {
    min-height: 0;
    padding: 92px 0 56px;
  }

  .hero {
    padding-top: 100px;
  }

  /* 首屏：手机上文案占掉一截，截图的高度预算跟着收一档 */
  .hero-stage {
    --shot-h: min(60svh, calc(100svh - 270px));
  }

  /* 文字 + 录屏：手机上改成上文下图 */
  .media {
    padding-top: 100px;
    padding-bottom: 56px;
  }

  .media-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .media-copy h2 {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  .media-shot {
    height: min(58svh, calc(100svh - 330px));
    max-height: min(58svh, calc(100svh - 330px));
    max-width: 100%;
    margin: 0 auto;
  }

  /* 动态令牌那一屏：一段里两张图改成上下叠。
     高度先按「屏高 - 文案 - 上下内边距 - 间隔」算（220px 是这些占位的经验值），
     再用 52svh 封顶；图片自身再用 max-height 按这个高度封一次——
     可视高度小的手机（地址栏展开）上，图片会跟着缩小，而不是撑出容器、
     被 flex 居中后上下同时溢出压到文字上。 */
  .showcase {
    --gap: 12px;
    --part-h: min(calc(100svh - 220px), 56svh);
  }

  .showcase-item,
  .showcase.is-carousel .showcase-item {
    flex-direction: column;
    align-items: center;
    gap: var(--gap);
  }

  .showcase-shot {
    height: auto;
  }

  .showcase-shot--phone {
    width: min(34vw, 170px);
    max-height: calc((var(--part-h) - var(--gap)) * 0.57);
  }

  .showcase-shot--wide {
    width: min(74vw, 360px);
    max-height: calc((var(--part-h) - var(--gap)) * 0.43);
  }

  /* 同步屏：同上，一段里两张图上下叠；下面多一句注释，再扣掉 120px */
  .sync {
    --gap: 12px;
    --part-h: min(calc(100svh - 340px), 50svh);
  }

  .sync-stage {
    flex-direction: column;
    align-items: center;
  }

  .sync-shot {
    height: auto;
  }

  .sync-shot--phone {
    width: min(34vw, 170px);
    max-height: calc((var(--part-h) - var(--gap)) * 0.57);
  }

  .sync-shot--wide {
    width: min(74vw, 360px);
    max-height: calc((var(--part-h) - var(--gap)) * 0.43);
  }

  /* 手机：文字在上，两张截图并排在下 */
  .festival-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy copy" "left right";
    gap: 32px 12px;
    padding: 0 16px;
  }

  .festival-copy h1 {
    font-size: clamp(30px, 8.4vw, 44px);
    white-space: normal;
  }

  /* 两行并排时按宽度收一档，两行保持同一缩放，不会一行大一行小 */
  .adapt {
    --shot-h: min(calc((100svh - 140px) * 0.3333), calc(50vw - 24px));
  }

  .hero-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(44px, 12vw, 68px);
    white-space: normal;
  }

  .hero--sub h1 {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  /* 手机上副标题比标题还宽，居中只能两行一起居中 */
  .hero-copy {
    width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 0 16px;
  }

  .to-top {
    right: 16px;
    bottom: 18px;
  }

  .table td:first-child {
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-shot {
    max-width: min(380px, 92vw);
    max-height: 90vh;
    max-height: 90svh;
  }

}

@media (max-width: 480px) {
  .shell--head {
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .head-help-full {
    display: none;
  }

  .head-help-short {
    display: inline;
  }
}

/* ---------------------------------------------------------
   竖屏手机 / 触屏：系统吸附翻页
   （第三屏上下滑直接翻页，只有左右滑才换图；鼠标滚轮仍走脚本翻页）
   --------------------------------------------------------- */
/* 减少动效时也保留吸附：吸附是滚动落点，不是我们加的动画；
   脚本翻页才是动画，那边照旧关掉。这样任何屏幕都还有翻页 */
@media (max-width: 899px) and (orientation: portrait),
       (pointer: coarse) and (min-height: 700px) {
  html:not(.js-pager) {
    scroll-snap-type: y mandatory;
  }

  .screen {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

/* 触屏的一屏一节：site.js 量完每屏高度后加 is-paged。
   不靠 pointer 媒体判断——折叠屏展开时 Chrome 可能把主指针报成 fine。 */
html.is-paged {
  scroll-snap-type: y mandatory;
}

html.is-paged .screen {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (max-width: 899px) and (orientation: portrait) {
  /* 一屏一节：整屏高度，内容在中间 */
  .screen {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding: 84px 0 24px;
  }

  .hero {
    padding-top: 84px;
    padding-bottom: 24px;
  }

  /* 首屏两张图改成「文字在上、图吃掉剩余高度」，不会被切掉 */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 3vh, 30px);
    height: 100%;
  }

  .hero-visual {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
  }

  .hero-visual .hero-shot {
    max-height: 100%;
  }
}
