/* =========================================================
   途研 Design System · 2026-09 redesign
   ---------------------------------------------------------
   迁移后的页面只引入：fonts/fonts.css → ds.css →（可选）页面自己的 page-*.css。
   不再引入 site.css / ui.css / inner-ui.css，也不在旧类名上覆盖。
   结构契约类名（被测试或脚本依赖，只换样式不换名）：
     .ui-header .ui-menu-toggle .ui-nav   ← ui-shell.js / 导航测试
     .brand .brand-mark .brand-copy .brand-sub ← 品牌锁定测试
     #navAuth .nav-auth-inner .nav-login .nav-write .nav-avatar .nav-menu ← site-auth.js
     .tuyan-online-widget .tuyan-online-dot ← track.js
     .ui-back-to-top ← ui-shell.js
     [data-seo-card] ← 服务端预渲染卡片（src/listSeo.mjs 内联样式读 --surface/--rule-2）
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* 中性色：偏冷的苹果灰阶 */
  --gray-0: #FFFFFF;
  --gray-50: #FBFBFD;
  --gray-100: #F5F5F7;
  --gray-150: #EFEFF3;
  --gray-200: #E5E5EA;
  --gray-300: #D2D2D7;
  --gray-400: #AEAEB2;
  --gray-500: #8E8E93;
  --gray-600: #6E6E73;
  --gray-700: #48484C;
  --gray-900: #1D1D1F;

  /* 品牌：深海军蓝做识别，亮蓝做动作 */
  --navy-950: #070F24;
  --navy-900: #0B1B3F;
  --navy-800: #13285A;
  --blue-50: #F0F5FF;
  --blue-100: #E2ECFF;
  --blue-200: #C4D7FF;
  --blue-300: #9DBCFF;          /* 深色底上的小标题，≥5.3:1 */
  --blue-400: #5B8CFF;
  --blue-500: #2F6BFF;
  --blue-600: #0B5CD5;
  --blue-700: #0848AB;

  /* 点缀色：只用于图标底块、渐变光晕，不用于大面积 */
  --indigo-500: #5E5CE6;
  --indigo-50: #EFEFFE;
  --teal-500: #0FA3A3;
  --teal-50: #E6F7F7;
  --orange-500: #F28A18;
  --orange-50: #FFF3E6;
  --green-500: #28A860;
  --green-50: #E9F7EF;
  --pink-500: #E8508A;
  --pink-50: #FDEEF4;

  /* 语义色 */
  --text: var(--gray-900);
  --text-2: #5E5E63;              /* 次要正文，所有浅底 ≥5.6:1 */
  --text-3: #6A6A6F;              /* 说明/标签，所有浅底 ≥4.6:1，最低可读档 */
  --text-disabled: var(--gray-400);
  --text-on-dark: #F5F5F7;
  --text-on-dark-2: rgba(245,245,247,.72);
  --accent: var(--blue-600);
  --accent-hover: var(--blue-700);
  --accent-soft: var(--blue-50);
  --accent-soft-2: var(--blue-100);
  --bg: var(--gray-100);          /* 画布 */
  --bg-elevated: var(--gray-0);   /* 卡片、面板 */
  --bg-subtle: var(--gray-50);
  --bg-inset: var(--gray-150);    /* 分段控件槽、输入框底 */
  --line: rgba(0,0,0,.08);
  --line-strong: rgba(0,0,0,.14);
  --focus: rgba(11,92,213,.45);

  --ok: #177A3E;      --ok-bg: #E9F7EE;      --ok-dot: #30B35C;
  --warn: #A94F00;    --warn-bg: #FFF4E5;    --warn-dot: #FF9500;
  --danger: #C4271C;  --danger-bg: #FDECEA;
  --muted: #636368; --muted-bg: #F1F1F4;

  /* 渐变：标题强调字、极光背景、深色区块 */
  --grad-text: linear-gradient(115deg, var(--navy-900) 0%, #1E4FD8 52%, #3FA2FF 100%);
  --grad-accent: linear-gradient(135deg, #2F6BFF 0%, #5E5CE6 100%);
  --grad-dark: radial-gradient(120% 90% at 85% 0%, #1D3B8C 0%, rgba(29,59,140,0) 55%), radial-gradient(90% 80% at 0% 100%, #2A1F6B 0%, rgba(42,31,107,0) 60%), var(--navy-950);
  --aurora:
    radial-gradient(42% 60% at 18% 12%, rgba(91,140,255,.26) 0%, rgba(91,140,255,0) 70%),
    radial-gradient(36% 50% at 82% 8%, rgba(150,118,255,.22) 0%, rgba(150,118,255,0) 70%),
    radial-gradient(40% 50% at 62% 78%, rgba(63,190,255,.14) 0%, rgba(63,190,255,0) 70%);

  /* 字体：苹果设备走系统字，其余走自托管思源黑体，保证跨平台一致 */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC Variable", "Noto Sans SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC Variable", "Noto Sans SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;

  /* 字号：大标题随视口伸缩，正文固定 */
  --fs-hero: clamp(44px, 6.6vw, 88px);
  --fs-display: clamp(34px, 4.8vw, 60px);
  --fs-title-1: clamp(28px, 3.4vw, 44px);
  --fs-title-2: clamp(22px, 2.3vw, 28px);
  --fs-title-3: 20px;
  --fs-headline: 17px;
  --fs-lead: clamp(17px, 1.45vw, 21px);
  --fs-body: 16px;
  --fs-callout: 15px;
  --fs-footnote: 13px;
  --fs-caption: 12px;
  --lh-tight: 1.08;
  --lh-title: 1.22;
  --lh-body: 1.7;
  --ls-hero: -.038em;
  --ls-title: -.022em;
  --ls-tight: -.01em;

  /* 间距：4px 基准 */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-32: 128px;
  --section-y: clamp(72px, 9vw, 128px);

  /* 圆角 */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-2xl: 36px; --r-pill: 999px;

  /* 阴影：很轻，靠层次不靠描边 */
  --shadow-1: 0 1px 2px rgba(16,24,48,.04), 0 1px 1px rgba(16,24,48,.03);
  --shadow-2: 0 2px 6px rgba(16,24,48,.04), 0 8px 24px rgba(16,24,48,.06);
  --shadow-3: 0 4px 12px rgba(16,24,48,.05), 0 24px 56px -16px rgba(16,36,90,.20);
  --shadow-accent: 0 8px 22px -8px rgba(11,92,213,.55);

  /* 毛玻璃 */
  --glass-bg: rgba(255,255,255,.72);
  --glass-bg-strong: rgba(255,255,255,.86);
  --glass-line: rgba(255,255,255,.7);
  --glass-filter: saturate(180%) blur(20px);

  /* 布局 */
  --container: 1180px;
  --container-wide: 1320px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 60px;

  /* 动效 */
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease: cubic-bezier(.4,0,.2,1);
  --dur-1: .15s; --dur-2: .25s; --dur-3: .5s;

  /* 层级 */
  --z-float: 70; --z-header: 100; --z-menu: 110; --z-overlay: 200;

  /* 兼容别名：服务端预渲染卡片、正文测试依赖这些名字 */
  --sans: var(--font-sans);
  --surface: var(--bg-elevated);
  --rule-2: var(--line);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-synthesis: none; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); }
body.ds-white { background: var(--bg-elevated); }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--text); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select, [role="button"] { cursor: pointer; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--blue-200); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: var(--z-overlay); padding: 10px 16px; border-radius: var(--r-pill); background: var(--text); color: #fff; font-size: var(--fs-footnote); }
.skip-link:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 3. Typography ---------- */
.t-hero { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: var(--ls-hero); font-weight: 700; }
.t-display { font-size: var(--fs-display); line-height: 1.1; letter-spacing: var(--ls-hero); font-weight: 700; }
.t-title-1 { font-size: var(--fs-title-1); line-height: 1.15; letter-spacing: var(--ls-title); font-weight: 700; }
.t-title-2 { font-size: var(--fs-title-2); line-height: var(--lh-title); letter-spacing: var(--ls-tight); font-weight: 650; }
.t-title-3 { font-size: var(--fs-title-3); line-height: 1.35; letter-spacing: var(--ls-tight); font-weight: 600; }
.t-headline { font-size: var(--fs-headline); line-height: 1.45; font-weight: 600; }
.t-lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-2); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-callout { font-size: var(--fs-callout); line-height: 1.55; }
.t-footnote { font-size: var(--fs-footnote); line-height: 1.5; color: var(--text-2); }
.t-caption { font-size: var(--fs-caption); line-height: 1.4; color: var(--text-3); }
.t-muted { color: var(--text-2); }
.t-gradient { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: var(--fs-footnote); font-weight: 600; letter-spacing: .02em; }
.eyebrow--on-dark { color: var(--blue-300); }

/* ---------- 4. Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--white { background: var(--bg-elevated); }
.section--aurora { position: relative; isolation: isolate; background: var(--bg-elevated); }
.section--aurora::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--aurora); pointer-events: none; }
.section--fade { overflow: hidden; }
.section--fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(to bottom, rgba(245,245,247,0), var(--bg)); pointer-events: none; }
.section--dark { background: var(--grad-dark); color: var(--text-on-dark); }
.section--dark :where(h1,h2,h3,h4) { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-8); margin-bottom: var(--space-10); }
.section-head__text { display: grid; gap: var(--space-3); max-width: 720px; }
.section-head--center { justify-content: center; text-align: center; }
.section-head--center .section-head__text { justify-items: center; margin-inline: auto; }
.stack { display: grid; gap: var(--stack-gap, var(--space-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.grid { display: grid; gap: var(--grid-gap, var(--space-5)); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.bento { display: grid; gap: var(--space-5); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bento > .span-2 { grid-column: span 2; } .bento > .span-3 { grid-column: span 3; } .bento > .span-4 { grid-column: span 4; } .bento > .span-6 { grid-column: span 6; }

/* ---------- 5. Buttons ---------- */
.btn { --btn-h: 44px; --btn-px: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-h); padding: 0 var(--btn-px); border: 1px solid transparent; border-radius: var(--r-pill); font-size: var(--fs-callout); font-weight: 600; line-height: 1; letter-spacing: .01em; white-space: nowrap; text-decoration: none; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease); }
.btn:active { transform: scale(.97); }
.btn--sm { --btn-h: 36px; --btn-px: 16px; font-size: var(--fs-footnote); }
.btn--lg { --btn-h: 54px; --btn-px: 30px; font-size: var(--fs-headline); }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--accent-soft); color: var(--accent); }
.btn--secondary:hover { background: var(--accent-soft-2); }
.btn--neutral { background: var(--bg-elevated); color: var(--text); border-color: var(--line-strong); }
.btn--neutral:hover { border-color: var(--gray-400); }
.btn--dark { background: var(--gray-900); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--gray-100); }
.btn--glass { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
.btn--glass:hover { background: rgba(255,255,255,.22); }
.btn__arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .btn__arrow, .link-arrow:hover .btn__arrow { transform: translateX(3px); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--bg-inset); color: var(--text); transition: background var(--dur-1) var(--ease); }
.icon-btn:hover { background: var(--gray-200); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: var(--fs-callout); font-weight: 600; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 6. Form controls ---------- */
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-footnote); font-weight: 600; color: var(--text); }
.field__hint { font-size: var(--fs-caption); color: var(--text-3); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--bg-inset); color: var(--text); font-size: 16px; transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.input::placeholder, .textarea::placeholder { color: var(--gray-500); }
.input:hover, .select:hover, .textarea:hover { background: var(--gray-200); }
.input:focus, .select:focus, .textarea:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236E6E73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select--pill { min-height: 36px; padding: 6px 34px 6px 14px; border-radius: var(--r-pill); font-size: var(--fs-footnote); font-weight: 500; background-color: var(--bg-elevated); border-color: var(--line-strong); background-position: right 12px center; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-callout); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

/* 大号胶囊搜索框 */
.search { display: flex; align-items: center; gap: 4px; width: 100%; max-width: 680px; min-height: 60px; padding: 6px 6px 6px 22px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-3); transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus), var(--shadow-3); }
.search__icon { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.search__input { flex: 1; min-width: 0; height: 48px; padding: 0 10px; border: 0; background: transparent; font-size: 17px; }
.search__input::placeholder { color: var(--gray-500); }
.search__input:focus, .search__input:focus-visible { outline: none; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__submit, .search > button[type="submit"] { flex: none; height: 48px; padding: 0 26px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: var(--fs-callout); font-weight: 600; box-shadow: var(--shadow-accent); transition: background var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.search__submit:hover, .search > button[type="submit"]:hover { background: var(--accent-hover); }
.search__submit:active, .search > button[type="submit"]:active { transform: scale(.97); }

/* 分段控件（苹果式 tab） */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--bg-inset); }
.segmented > button, .segmented > a { min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: var(--fs-footnote); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.segmented > :hover { color: var(--text); }
.segmented > [aria-pressed="true"], .segmented > [aria-selected="true"], .segmented > [aria-current="page"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.06); }

/* ---------- 7. Chips / Tags / Status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--bg-elevated); color: var(--text); font-size: var(--fs-footnote); font-weight: 500; white-space: nowrap; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"], .chip.is-active, .chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip--glass { background: var(--glass-bg); border-color: var(--glass-line); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--muted-bg); color: var(--text-2); font-size: var(--fs-caption); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--indigo { background: var(--indigo-50); color: #4745C2; }
.tag--teal { background: var(--teal-50); color: #0B7A7A; }
.tag--orange { background: var(--orange-50); color: #9A5200; }
/* 截止状态：颜色 + 圆点 + 文字三重表达，不单靠颜色 */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 9px; border-radius: var(--r-pill); font-size: var(--fs-caption); font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--muted-bg); color: var(--muted); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status--open { background: var(--ok-bg); color: var(--ok); }
.status--open::before { background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(48,179,92,.18); }
.status--today { background: var(--warn-bg); color: var(--warn); }
.status--today::before { background: var(--warn-dot); }
.status--closed { background: var(--muted-bg); color: var(--muted); }
.status--unknown { background: var(--accent-soft); color: var(--accent); }
/* 学校层次徽章 */
.tier { display: inline-flex; padding: 1px 7px; border-radius: var(--r-xs); font-size: 11px; font-weight: 700; line-height: 1.6; letter-spacing: .01em; }
.tier--985 { background: var(--navy-900); color: #fff; }
.tier--211 { background: var(--blue-100); color: var(--blue-700); }
.tier--double { background: var(--teal-50); color: #0B7A7A; }
/* school-tiers.js 输出的徽章（.tier-row > .tier-badge.tier-985/211/shuang），与 .tier 同一视觉 */
.tier-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tier-badge { display: inline-flex; padding: 1px 7px; border-radius: var(--r-xs); font-size: 11px; font-weight: 700; line-height: 1.6; letter-spacing: .01em; white-space: nowrap; }
.tier-985 { background: var(--navy-900); color: #fff; }
.tier-211 { background: var(--blue-100); color: var(--blue-700); }
.tier-shuang { background: var(--teal-50); color: #0B7A7A; }

/* ---------- 8. Cards ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--space-6); border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: var(--shadow-1); }
.card--pad-lg { padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-xl); }
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.card--subtle { background: var(--bg); box-shadow: none; }
.card--aurora { background: var(--aurora), var(--bg); box-shadow: none; }
.card--glass { background: var(--glass-bg); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-2); }
.card--dark { background: var(--grad-dark); color: var(--text-on-dark); box-shadow: var(--shadow-3); }
.card--dark :where(h2,h3,h4) { color: #fff; }
.card--link { transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
.card__eyebrow { margin-bottom: var(--space-3); }
.card__title { font-size: var(--fs-headline); font-weight: 600; line-height: 1.5; letter-spacing: 0; text-wrap: pretty; }
.card__body { margin-top: var(--space-2); color: var(--text-2); font-size: var(--fs-callout); line-height: 1.6; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-5); color: var(--text-3); font-size: var(--fs-footnote); }

/* 彩色图标底块（SF Symbols 式） */
.icon-tile { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile--lg { width: 56px; height: 56px; border-radius: 16px; }
.icon-tile--lg svg { width: 28px; height: 28px; }
.icon-tile--indigo { background: var(--indigo-50); color: var(--indigo-500); }
.icon-tile--teal { background: var(--teal-50); color: var(--teal-500); }
.icon-tile--orange { background: var(--orange-50); color: var(--orange-500); }
.icon-tile--green { background: var(--green-50); color: var(--green-500); }
.icon-tile--pink { background: var(--pink-50); color: var(--pink-500); }
.icon-tile--solid { background: var(--grad-accent); color: #fff; box-shadow: var(--shadow-accent); }

/* ---------- 9. List / Row ---------- */
.list { border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: var(--shadow-1); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); transition: background var(--dur-1) var(--ease); }
a.row:hover { background: var(--bg-subtle); }
.row__media { width: 48px; height: 48px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.row__media img { width: 36px; height: 36px; object-fit: contain; }
.row__main { display: grid; gap: 4px; min-width: 0; }
.row__title { font-size: var(--fs-callout); font-weight: 600; line-height: 1.5; text-wrap: pretty; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-3); font-size: var(--fs-footnote); }
.row__aside { display: grid; justify-items: end; gap: 6px; text-align: right; }
.row__chevron { width: 8px; height: 14px; color: var(--gray-400); }

/* ---------- 10. Stat bar（只放真实计算出的数字） ---------- */
.statbar { display: inline-flex; align-items: stretch; padding: 8px; border: 1px solid var(--glass-line); border-radius: var(--r-pill); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-2); }
.statbar__item { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 104px; padding: 6px 18px; }
.statbar__item + .statbar__item { border-left: 1px solid var(--line); }
.statbar__value { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.statbar__label { font-size: var(--fs-caption); color: var(--text-3); white-space: nowrap; }

/* ---------- 11. Callout / Empty / Skeleton ---------- */
.callout { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5) var(--space-6); border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: var(--fs-callout); }
.callout--warn { background: var(--warn-bg); }
.callout--neutral { background: var(--bg); }
.empty { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-16) var(--space-6); text-align: center; color: var(--text-2); font-size: var(--fs-callout); }
.empty a { color: var(--accent); font-weight: 600; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--r-xs); background: var(--bg-inset); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: ds-shimmer 1.4s var(--ease) infinite; }
@keyframes ds-shimmer { to { transform: translateX(100%); } }

/* ---------- 12. Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: var(--space-10); }
.pager a, .pager button, .pager span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: var(--fs-footnote); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager a:hover, .pager button:hover { background: var(--bg-inset); color: var(--text); }
.pager [aria-current="page"], .pager .is-current { background: var(--text); color: #fff; }

/* 列表页脚本渲染的翻页（.pagination > button.pg[data-page]），资讯/经验/竞赛共用 */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; padding: var(--space-8) 0 0; }
.pagination:empty { display: none; }
.pg { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: var(--fs-footnote); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.pg:hover:not([disabled]):not(.dots) { background: var(--bg-inset); color: var(--text); }
.pg.active { background: var(--text); color: #fff; }
.pg[disabled] { opacity: .35; cursor: default; }
.pg.dots { cursor: default; }
.pagination > span { color: var(--text-3); font-size: var(--fs-footnote); }

/* ---------- 13. Breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: var(--space-5) 0; color: var(--text-3); font-size: var(--fs-footnote); }
.crumbs a:hover { color: var(--accent); }
.crumbs > * + *::before { content: "›"; margin-right: 6px; color: var(--gray-400); }

/* ---------- 14. Global header（毛玻璃） ---------- */
.gnav { position: sticky; top: 0; z-index: var(--z-header); background: rgba(251,251,253,.78); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); border-bottom: 1px solid var(--line); }
.gnav-bar { display: flex; align-items: center; gap: var(--space-6); width: 100%; max-width: calc(var(--container-wide) + var(--gutter) * 2); min-height: var(--header-h); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, var(--navy-800), var(--navy-950)); color: #fff; font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px rgba(11,27,63,.25); }
.brand-copy { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { color: var(--text-3); font-family: var(--font-sans); font-size: var(--fs-caption); font-weight: 500; letter-spacing: .02em; }
.ui-nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.ui-nav > a { position: relative; padding: 8px 12px; border-radius: var(--r-pill); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease); }
.ui-nav > a:hover { color: var(--text); background: rgba(0,0,0,.04); }
.ui-nav > a.active { color: var(--text); font-weight: 600; }
.ui-nav > a.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.gnav-actions { display: flex; align-items: center; gap: var(--space-2); flex: none; font-size: 14px; }
.gnav-actions--end { margin-left: auto; }
.gnav-actions > a { padding: 8px 10px; border-radius: var(--r-pill); color: var(--text-2); white-space: nowrap; }
.gnav-actions > a:hover { color: var(--text); background: rgba(0,0,0,.04); }
.ui-menu-toggle { display: none; place-items: center; width: 40px; height: 40px; margin-left: auto; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text); }
.ui-menu-toggle:hover { background: rgba(0,0,0,.05); }
.ui-menu-toggle svg { width: 20px; height: 20px; }
.ui-menu-toggle .icon-close { display: none; }
.ui-header[data-nav-open] .ui-menu-toggle .icon-open { display: none; }
.ui-header[data-nav-open] .ui-menu-toggle .icon-close { display: block; }

/* 账号区（site-auth.js 渲染） */
#navAuth { display: inline-flex; align-items: center; }
.nav-auth-inner { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-write, .nav-login { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.nav-login { background: var(--text); color: #fff; }
.nav-login:hover { background: #000; }
.nav-write { background: var(--accent-soft); color: var(--accent); }
.nav-write:hover { background: var(--accent-soft-2); }
.nav-avatar { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--grad-accent); color: #fff; font-size: 14px; font-weight: 700; }
.nav-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: var(--z-menu); min-width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-3); }
.nav-menu-name { padding: 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.nav-menu a, .nav-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font-size: 14px; text-align: left; }
.nav-menu a:hover, .nav-menu button:hover { background: var(--accent); color: #fff; }

/* ---------- 15. Footer ---------- */
.gfoot { padding: var(--space-16) 0 var(--space-10); background: var(--bg); color: var(--text-2); font-size: var(--fs-footnote); }
.gfoot__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--space-10); padding-bottom: var(--space-10); border-bottom: 1px solid var(--line); }
.gfoot__about p { max-width: 320px; margin-top: var(--space-4); line-height: 1.7; }
.gfoot h5 { margin: 0 0 var(--space-4); color: var(--text); font-size: var(--fs-footnote); font-weight: 600; }
.gfoot ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gfoot a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.gfoot--compact { padding: var(--space-8) 0; margin-top: var(--space-16); border-top: 1px solid var(--line); }
.gfoot--compact .gfoot__bottom { padding-top: 0; align-items: center; }
.gfoot__links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.gfoot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-6); color: var(--text-3); font-size: var(--fs-caption); }

/* ---------- 16. Floating: 移动端底部行动条 / 返回顶部 / 在线人数 ---------- */
.dock { display: none; }
.ui-back-to-top { position: fixed; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: var(--z-float); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--glass-line); border-radius: 50%; background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); color: var(--text); box-shadow: var(--shadow-2); transition: transform var(--dur-2) var(--ease-out); }
.ui-back-to-top:hover { transform: translateY(-2px); }
.ui-back-to-top svg { width: 20px; height: 20px; }
.tuyan-online-widget { position: fixed; left: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: var(--z-float); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--glass-line); border-radius: var(--r-pill); background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-2); color: var(--text-2); font-size: var(--fs-caption); line-height: 1; }
.tuyan-online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(48,179,92,.18); }
.tuyan-online-widget strong { color: var(--text); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 服务端预渲染卡片（首屏无 JS 时可读） */
[data-seo-card] { border: 0 !important; border-radius: var(--r-lg) !important; box-shadow: var(--shadow-1); }
[data-seo-card] h3 { font-size: var(--fs-callout); }
[data-seo-card] p { color: var(--text-2); font-size: var(--fs-footnote); }
.list > [data-seo-card] { border-radius: 0 !important; box-shadow: none; padding: var(--space-4) var(--space-6) !important; }

/* 详情页服务端预渲染的面包屑与「来源与日期」条（src/seoRendering.mjs，资讯/经验/竞赛详情共用） */
nav[data-geo-breadcrumb] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: var(--space-3); color: var(--text-3); font-size: var(--fs-footnote); line-height: 1.6; }
nav[data-geo-breadcrumb] a:hover { color: var(--accent); }
aside[data-geo-evidence] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-5); margin-bottom: var(--space-4); padding: var(--space-3) var(--space-5); border-radius: var(--r-md); background: var(--bg-inset); color: var(--text-3); font-size: var(--fs-caption); line-height: 1.6; }
aside[data-geo-evidence] p { margin: 0; }
aside[data-geo-evidence] a { color: var(--accent); font-weight: 600; }

/* ---------- 17. Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1080px) {
  .brand-sub { display: none; }
  .ui-nav > a { padding: 8px 9px; font-size: 13.5px; }
}
@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .ui-menu-toggle { display: grid; }
  .gnav-bar { flex-wrap: wrap; gap: var(--space-2); }
  .ui-nav { order: 3; display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 0; margin: 0; padding: var(--space-2) 0 var(--space-4); }
  .ui-header[data-nav-open] .ui-nav { display: flex; }
  .ui-nav > a { padding: 14px 4px; border-radius: 0; font-size: 17px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
  .ui-nav > a:hover { background: transparent; }
  .ui-nav > a.active { color: var(--accent); }
  .ui-nav > a.active::after { display: none; }
  .gnav-actions > a { display: none; }
  .grid { --cols: 1; }
  .bento { grid-template-columns: 1fr; }
  .bento > [class*="span-"] { grid-column: auto; }
  .gfoot__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .gfoot__about { grid-column: 1 / -1; }
  .row { grid-template-columns: 40px minmax(0,1fr); padding: var(--space-4); }
  .row__media { width: 40px; height: 40px; border-radius: 10px; }
  .row__media img { width: 30px; height: 30px; }
  .row__aside { grid-column: 2; justify-items: start; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .statbar__item { min-width: 0; padding: 6px 12px; }
  .search { min-height: 56px; padding-left: 18px; }
  .search__submit, .search > button[type="submit"] { padding: 0 20px; }
  .dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-float); display: flex; align-items: center; gap: var(--space-3); padding: 10px 10px 10px 18px; border: 1px solid var(--glass-line); border-radius: var(--r-pill); background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); box-shadow: var(--shadow-3); }
  .dock__text { flex: 1; min-width: 0; font-size: var(--fs-caption); color: var(--text-2); line-height: 1.35; }
  .dock__text strong { display: block; color: var(--text); font-size: var(--fs-footnote); }
  body.has-dock { padding-bottom: 88px; }
  body.has-dock .ui-back-to-top { bottom: calc(92px + env(safe-area-inset-bottom)); right: 16px; }
  body.has-dock .tuyan-online-widget { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .gnav, .search, .card--glass, .statbar, .nav-menu, .dock, .ui-back-to-top, .tuyan-online-widget { background: #fff; }
}
