/* ============================================================
   小满公考官网 · 全站共用层（2026-09 改版）
   所有页面都加载本文件；首页另加 xm-home.css，详情页另加 xm-detail.css。
   设计基调：暖纸蓝金（方向 D）不变——稿纸底、墨蓝字、金色 X；
   标题改用公文标题气质的宋体（XM Serif = Noto Serif SC 700 子集，scripts/build_fonts.py 生成）。
   ============================================================ */
@font-face {
  font-family: "XM Serif";
  src: url("assets/fonts/xm-serif.woff2?v=20260927c") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 纸 */
  --cream: #f6efe1;      /* 页面底：稿纸 */
  --cream-2: #efe5d2;
  --cream-3: #f1e8d6;
  --paper: #fffdf8;      /* 卡片、表格底 */
  --white: #ffffff;
  /* 墨 */
  --ink: #2a2c38;        /* 正文 */
  --sub: #66625a;        /* 次要文字：在 --cream 上约 5.3:1 */
  --blue: #2750dd;       /* 行动色：按钮、链接 */
  --blue-ink: #1b2a66;   /* 标题、深色面 */
  --blue-deep: #14225a;
  --night: #101a48;      /* 夜：一天的尽头、师资墙 */
  /* 金 */
  --gold: #c0923a;
  --gold-text: #8a6420;  /* 金色小字专用：米/白底上约 4.8:1 */
  --gold-2: #ddb35e;
  --gold-3: #ecca81;
  /* 印泥红：只用于公示的红头线和「上岸」印，别挪作他用 */
  --seal: #c0392b;
  --line: rgba(27, 42, 102, 0.14);
  --line-2: rgba(27, 42, 102, 0.08);
  --serif: "XM Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1200px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  /* 品牌元素：logo 原始几何 —— 金色双矩形条 X、全彩 M 标、深底描线 M 标 */
  --xm-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='169 272 174 87'%3E%3Cg fill='%23F7B000'%3E%3Cpolygon points='256,323 205,272 169,308 220,359'/%3E%3Cpolygon points='256,323 307,272 343,308 292,359'/%3E%3C/g%3E%3C/svg%3E");
  --xm-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='58 101 396 310'%3E%3Cg fill='%23F7B000'%3E%3Cpolygon points='256,323 205,272 169,308 220,359'/%3E%3Cpolygon points='256,323 307,272 343,308 292,359'/%3E%3C/g%3E%3Cg fill='%23202B8E'%3E%3Cpolygon points='58,101 128,101 200,169 149,220 129,200 129,411 58,411'/%3E%3Cpolygon points='454,101 382,101 312,169 363,220 382,201 382,411 454,411'/%3E%3Cpolygon points='218,187 256,225 294,187 343,236 256,323 169,236'/%3E%3C/g%3E%3C/svg%3E");
  --xm-line-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='58 101 396 310'%3E%3Cg fill='none' stroke='%23DDB35E' stroke-opacity='0.6' stroke-width='4'%3E%3Cpolygon points='256,323 205,272 169,308 220,359'/%3E%3Cpolygon points='256,323 307,272 343,308 292,359'/%3E%3C/g%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-opacity='0.22' stroke-width='4'%3E%3Cpolygon points='58,101 128,101 200,169 149,220 129,200 129,411 58,411'/%3E%3Cpolygon points='454,101 382,101 312,169 363,220 382,201 382,411 454,411'/%3E%3Cpolygon points='218,187 256,225 294,187 343,236 256,323 169,236'/%3E%3C/g%3E%3C/svg%3E");
}

/* 跨页导航的淡入淡出（支持的浏览器才生效，其余照常跳转） */
@view-transition { navigation: auto; }
@media print { [data-anim], .day-photos img { opacity: 1 !important; clip-path: none !important; animation: none !important; } .hd, .sheet, .lb { display: none !important; } }

/* 关闭触屏系统默认的蓝色点按高亮，按压反馈由下方 hover:none 规则统一提供 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
::selection { background: var(--gold-3); color: var(--blue-deep); }
/* 键盘焦点可见（鼠标点按不触发 focus-visible） */
:is(a, button, [role="button"], input, select, textarea, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
:is(.night, .section.dark, .ft, .sheet) :is(a, button, [role="button"], input, select, textarea):focus-visible { outline-color: var(--gold-3); }
.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 触屏点按反馈：统一轻压变暗（filter 不会与入场动画锁住的 transform/opacity 冲突） */
@media (hover: none) { a:active, button:active { filter: brightness(0.94); } }

/* ---------- 字体角色 ---------- */
/* 宋体只给「标题与大数字」；正文、表格、界面文字一律无衬线 */
h1, h2, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: 0; }
/* 中文标题只在标点和空格处换行（避免「更 / 懂」这种断法）；单段超宽时才允许任意处断开 */
h1, h2, h3 { word-break: keep-all; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 入场动效（冻结时钟安全：xm-shared.js 探测动画时钟正常才加 anim-ready） ---------- */
html.anim-ready [data-anim] { opacity: 0; }
html.anim-ready [data-anim].in { animation: rise 0.8s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.anim-ready [data-anim] { opacity: 1; }
  html.anim-ready [data-anim].in { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 小标签（子页 hero 用；只写中文，不加英文大写） ---------- */
.ey { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 0.84rem; font-weight: 700; color: var(--gold-text); }
.ey::before { content: ""; width: 19px; height: 11px; background: var(--xm-x) center/contain no-repeat; }
.ey.on-dark { color: var(--gold-3); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; white-space: nowrap; transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn.pri { background: var(--blue); color: #fff; box-shadow: 0 12px 26px rgba(39, 80, 221, 0.24); }
.btn.pri:hover { box-shadow: 0 16px 30px rgba(39, 80, 221, 0.3); }
.btn.gho { border: 1px solid var(--line); background: rgba(255, 253, 248, 0.7); color: var(--blue-ink); }
.btn.gho:hover { border-color: var(--gold); }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #fff; box-shadow: 0 12px 26px rgba(192, 146, 58, 0.26); }
.btn.on-dark.gho { border-color: rgba(255, 255, 255, 0.36); color: #fff; background: transparent; }
.btn.on-dark.gho:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }
/* 文字链接：下划线随悬停展开，不再在文字后面挂箭头 */
.dlink { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 700; color: var(--blue); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.3s var(--ease); }
.dlink:hover, a:hover > .dlink { background-size: 100% 1px; }
.dlink.on-dark { color: var(--gold-3); }

/* ---------- 区块外壳 ---------- */
.section { padding: clamp(80px, 11vh, 128px) 0; }
.section.alt { background: var(--cream-3); }
.section.dark, .night { position: relative; background: var(--night); color: #fff; }
.section.dark { overflow: hidden; background: linear-gradient(165deg, var(--blue-ink), var(--blue-deep)); }
.section.dark .wrap { position: relative; z-index: 1; }
.head { max-width: 720px; margin-bottom: clamp(36px, 5vh, 56px); }
.head.center { margin-inline: auto; text-align: center; }
.head h2 { text-wrap: balance; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.16; color: var(--blue-ink); }
.head p { margin-top: 16px; color: var(--sub); font-size: 1.02rem; text-wrap: pretty; }
:is(.night, .section.dark) .head h2 { color: #fff; }
:is(.night, .section.dark) .head p { color: rgba(255, 255, 255, 0.72); }

/* ============ 页头 ============ */
.hd { position: fixed; inset: 14px clamp(14px, 3vw, 32px) auto; z-index: 60; height: 60px; display: flex; align-items: center; padding: 0 10px 0 20px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 253, 248, 0.82); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
  box-shadow: 0 10px 30px rgba(27, 42, 102, 0.07); transition: box-shadow 0.3s, background-color 0.3s; view-transition-name: xm-header; }
.hd.scrolled { background: rgba(255, 253, 248, 0.95); box-shadow: 0 12px 34px rgba(27, 42, 102, 0.12); }
.hd .row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; }
.hd .brand { display: flex; align-items: center; }
.hd .brand img { width: 110px; }
.hd nav { display: flex; gap: 2px; }
.hd nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap; font-size: 0.88rem; font-weight: 600; color: #44485c; transition: background-color 0.2s, color 0.2s; }
.hd nav a:hover { background: rgba(27, 42, 102, 0.06); color: var(--blue-ink); }
.hd nav a.spy-on, .hd nav a[aria-current="page"] { background: rgba(27, 42, 102, 0.08); color: var(--blue-ink); }
.hd nav a.accent { color: var(--gold-text); }
.hd nav a.accent.spy-on { background: rgba(138, 100, 32, 0.12); }
.hd .cta { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; white-space: nowrap; font-size: 0.86rem; font-weight: 700; color: #fff; background: var(--blue); box-shadow: 0 10px 22px rgba(39, 80, 221, 0.26); transition: transform 0.2s var(--ease); }
.hd .cta:hover { transform: translateY(-1px); }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 999px; background: rgba(27, 42, 102, 0.06); place-content: center; justify-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--blue-ink); transition: transform 0.3s, opacity 0.3s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sheet { position: fixed; inset: 0; z-index: 55; display: grid; align-content: center; gap: 2px; padding: 12vh 32px 32px; background: linear-gradient(165deg, var(--blue-ink), var(--night)); opacity: 0; visibility: hidden; transform: translateY(-2%); transition: opacity 0.4s, transform 0.4s var(--ease), visibility 0.4s; }
body.nav-open .sheet { opacity: 1; visibility: visible; transform: none; }
body.nav-open { overflow: hidden; }
.sheet a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: #fff; }
.sheet a small { font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--gold-3); }
.sheet .scta { margin-top: 22px; justify-content: center; border-radius: 999px; border: 0; background: var(--gold); color: #fff; padding: 15px; font-family: var(--sans); font-size: 1rem; font-weight: 800; }
@media (max-width: 1080px) {
  .hd nav, .hd .cta { display: none; }
  .nav-toggle { display: grid; }
}

/* ============ 品牌线稿（深色块里逐笔描出的 M/X，由 xm-shared.js 注入） ============ */
.xm-line { pointer-events: none; }
.xm-line .ld { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-width: 4; }
.xm-line .ld-m { stroke: #fff; stroke-opacity: 0.4; }
.xm-line .ld-x { stroke: var(--gold-3); stroke-opacity: 0.8; }
.xm-line .ld-legL, .xm-line .ld-legR { stroke-dasharray: 900; stroke-dashoffset: 900; }
.xm-line .ld-ctr { stroke-dasharray: 360; stroke-dashoffset: 360; }
.xm-line .ld-xL, .xm-line .ld-xR { stroke-dasharray: 260; stroke-dashoffset: 260; }
.xm-line.in .ld-legL { animation: xm-ld-draw 0.6s ease 0.1s forwards; }
.xm-line.in .ld-legR { animation: xm-ld-draw 0.6s ease 0.5s forwards; }
.xm-line.in .ld-ctr { animation: xm-ld-draw 0.55s ease 0.95s forwards; }
.xm-line.in .ld-xL { animation: xm-ld-draw 0.45s ease 1.45s forwards; }
.xm-line.in .ld-xR { animation: xm-ld-draw 0.45s ease 1.78s forwards; }
@keyframes xm-ld-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .xm-line .ld { animation: none !important; stroke-dashoffset: 0 !important; } }

/* ============ 答题卡式筛选（涂卡）：选中项的椭圆被「涂黑」 ============ */
.omr { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.omr button { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 4px 2px; font-size: 0.92rem; font-weight: 700; color: var(--blue-ink); white-space: nowrap; }
.omr button em { font-style: normal; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; }
.omr i { position: relative; flex: 0 0 auto; width: 24px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; overflow: hidden; opacity: 0.7; transition: opacity 0.2s; }
/* 涂抹：从左往右扫过去，像 2B 铅笔填涂 */
.omr i::after { content: ""; position: absolute; inset: -2px; background: currentColor; transform: scaleX(0); transform-origin: left center; transition: transform 0.32s var(--ease-out); }
.omr button:hover i { opacity: 1; }
.omr button[aria-pressed="true"] i { opacity: 1; }
.omr button[aria-pressed="true"] i::after { transform: scaleX(1); }
.omr.on-dark button { color: #fff; }
.omr.on-dark button em { color: rgba(255, 255, 255, 0.6); }
.omr.on-dark button[aria-pressed="true"] { color: var(--gold-3); }

/* ============ 灯箱（点开实拍大图） ============ */
.lb { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 64px 16px 20px; background: rgba(12, 18, 48, 0.92); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.lb.open { opacity: 1; visibility: visible; }
.lb figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-height: 100%; }
.lb img { max-width: min(1200px, 100%); max-height: calc(100svh - 150px); object-fit: contain; border-radius: 12px; transform: scale(0.97); transition: transform 0.35s var(--ease-out); }
.lb.open img { transform: none; }
.lb figcaption { color: rgba(255, 255, 255, 0.86); font-size: 0.92rem; text-align: center; }
.lb-bar { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.7); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.lb-bar button, .lb-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.2rem; transition: background-color 0.2s; }
.lb-bar button:hover, .lb-close:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { position: absolute; top: 14px; right: 14px; }
body.lb-open { overflow: hidden; }

/* ============ 页脚 ============ */
.ft { position: relative; overflow: hidden; background: var(--night); color: rgba(243, 246, 255, 0.62); padding: 72px 0 30px; }
.ft::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent 4%, var(--gold) 38%, var(--gold-3) 50%, var(--gold) 62%, transparent 96%); opacity: 0.7; }
.ft .wrap { position: relative; z-index: 1; }
.ft .main { display: grid; grid-template-columns: 1.5fr 0.9fr 0.9fr 1.3fr; gap: clamp(26px, 4vw, 48px); }
.ft .brand > img { width: 148px; filter: brightness(0) invert(1); opacity: 0.96; }
.ft .slogan { margin-top: 18px; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: #fff; }
.ft .brand > p:not(.slogan) { margin-top: 10px; font-size: 0.88rem; line-height: 1.85; max-width: 300px; }
.ft-mascot { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 14px 10px 10px; max-width: 280px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.ft-mascot img { width: 44px; height: auto; flex: 0 0 auto; }
.ft-mascot b { display: block; font-size: 0.88rem; color: #fff; }
.ft-mascot small { display: block; font-size: 0.74rem; color: rgba(243, 246, 255, 0.55); }
.ft .col h4 { font-size: 0.92rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.ft .col a, .ft .col p { display: block; font-size: 0.88rem; margin-bottom: 11px; transition: color 0.2s; }
.ft .col a:hover { color: var(--gold-3); }
.ft .col .phone { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--gold-3); font-variant-numeric: tabular-nums; }
.ft .col .phone:hover { color: #fff; }
.ft .addr { display: grid; gap: 2px; }
.ft .addr b { font-size: 0.82rem; font-weight: 800; color: rgba(255, 255, 255, 0.92); }
.ft .legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.78rem; color: rgba(243, 246, 255, 0.46); }
.ft .legal a { transition: color 0.2s; }
.ft .legal a:hover { color: var(--gold-3); }
.ft .legal-links { display: inline-flex; flex-wrap: wrap; gap: 18px; }
.ft .totop { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.8); font-size: 0.78rem; font-weight: 700; transition: border-color 0.2s, color 0.2s; }
.ft .totop:hover { border-color: var(--gold-3); color: var(--gold-3); }
.ft .xm-line { position: absolute; z-index: 0; right: -70px; bottom: -80px; width: 360px; height: 282px; }
@media (max-width: 980px) { .ft .main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .ft { padding: 46px 0 22px; }
  .ft .main { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
  .ft .brand, .ft .main > div:last-child { grid-column: 1 / -1; }
  .ft .col h4 { margin-bottom: 12px; }
  .ft .col a, .ft .col p { margin-bottom: 9px; }
  .ft .legal { margin-top: 26px; padding-top: 18px; }
  .ft .xm-line { width: 230px; height: 180px; right: -46px; bottom: -48px; }
  .btn { height: 46px; padding: 0 20px; font-size: 0.92rem; }
}
