/* Dayfigure v1 —— 像素复刻 Figma 稿（doc/design/2026-11-04/v1） */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-latin-800-normal.woff2') format('woff2'); }

:root {
  --bg: #f7f7f4; --panel: #ffffff; --ink: #1c1c1a; --muted: #5d5d57;
  --line: #e4e4de; --blue: #2563eb; --blue-deep: #1d4ed8; --indigo: #4f46e5;
  --chip: #eef2ff; --ok: #15803d; --amber: #b57a17;
  --hero-a: #0e1730; --hero-b: #1f2e52;
  --hero-text: #ebedf5; --hero-muted: #9ea8bd;
  --radius: 14px; --shadow: 0 6px 18px rgba(13, 20, 38, .10);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; font-size: 16px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 120px; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue); }

/* ===== 顶栏 ===== */
.header { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 120px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.4px; }
.logo:hover { color: var(--blue); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; }
.nav a:hover { background: var(--chip); color: var(--blue-deep); }

.crumbs { font-size: 13px; color: var(--muted); margin: 28px 0 4px; }
.crumbs a { color: var(--muted); }

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); letter-spacing: -1.2px; line-height: 1.15; margin: 8px 0 10px; font-weight: 800; }
h2 { font-size: 28px; letter-spacing: -0.5px; margin: 56px 0 12px; font-weight: 800; }
.lede { font-size: 16px; color: var(--muted); max-width: 49em; }

/* ===== 徽章 ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .8px;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase; }
.badge.green { background: var(--ok); color: #fff; }
.badge.chip { background: var(--chip); color: var(--blue-deep); }
.badge.glass { background: rgba(255, 255, 255, .12); color: var(--hero-text); }

/* ===== Hero（首页深色区） ===== */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); color: var(--hero-text); padding: 46px 120px 42px; margin: 0 -120px; }
.hero::before { content: ''; position: absolute; right: 80px; top: 10px; width: 300px; height: 210px; border-radius: 50%;
  background: rgba(79, 100, 250, .16); }
.hero::after { content: ''; position: absolute; left: -140px; bottom: 10px; width: 300px; height: 220px; border-radius: 50%;
  background: rgba(37, 140, 235, .10); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: var(--hero-text); font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero .lede { color: var(--hero-muted); font-size: 18px; }
.hero-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 36px 0; }
.hero-card { display: flex; flex-direction: column; gap: 4px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.hero-card:hover { border-color: var(--blue); transform: translateY(-2px); color: inherit; }
.hc-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--hero-muted); }
.hc-v { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: #fff; }
.hc-s { font-size: 12px; color: var(--hero-muted); }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-foot p { margin: 0; font-size: 14px; font-weight: 500; color: var(--hero-muted); }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(90deg, var(--blue), var(--indigo));
  color: #fff; border-radius: 9px; padding: 12px 22px; font-weight: 700; font-size: 13px; text-decoration: none; }
.btn-cta:hover { color: #fff; filter: brightness(1.08); }

/* ===== 答案卡（变体页锚点） ===== */
.answer-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 28px; margin: 24px 0; display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.answer-kicker { font-size: 13px; font-weight: 500; color: var(--muted); margin: 10px 0 4px; }
.answer-date { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin: 0 0 8px; }
.answer-unit { font-size: .45em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.answer-sub { color: var(--muted); margin: 0; font-size: 15px; }
.answer-sub b { color: var(--ink); }
.answer-grid { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; grid-column: 1; }
.answer-side { display: flex; flex-direction: column; gap: 8px; justify-content: center; grid-column: 2; grid-row: 1 / span 3; }
.answer-side label { font-size: 13px; font-weight: 700; }
.recalc-row { display: flex; gap: 8px; }
.recalc-row input { flex: 1; min-width: 0; }
.recalc-out { font-weight: 650; color: var(--ok); font-size: 13px; min-height: 1.4em; margin-top: 4px; line-height: 1.4; }

.mini { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 150px; flex: 1; }
.mini b { display: block; font-size: 1.4rem; letter-spacing: -0.5px; }
.mini span { font-size: 11.5px; color: var(--muted); line-height: 1.35; display: inline-block; margin-top: 2px; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.results .mini.big b { font-size: 1.9rem; }
.results .note { grid-column: 1 / -1; }

/* ===== 通用卡/网格 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card.lead { border-left: 4px solid var(--blue); padding-left: 24px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 20px; }
.card a { font-weight: 600; }
.card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--chip); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--blue-deep); }

/* ===== 工具面板（business-days 深色旗舰） ===== */
.tool-panel { background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); border-radius: var(--radius);
  padding: 24px 28px; margin: 20px 0; color: var(--hero-text); }
.tool-panel .badge { margin-bottom: 14px; }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--hero-muted); }
.controls label.chk { flex-direction: row; align-items: center; gap: 8px; padding-bottom: 12px; font-size: 13px; font-weight: 500; color: var(--hero-text); }
input, select, button { font: inherit; }
input[type="date"], input[type="number"], input[type="time"], select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); min-width: 150px; }
.tool-panel input[type="date"] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--hero-text); color-scheme: dark; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.btn { background: linear-gradient(90deg, var(--blue), var(--indigo)); color: #fff; border: 0; border-radius: 9px;
  padding: 11px 20px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(1.08); }
.tool-panel .controls .btn { margin-left: auto; }
.tri { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.tri .mini { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.tri .mini b { color: #fff; font-size: 34px; letter-spacing: -1px; display: inline-block; }
.tri .mini em { font-style: normal; font-weight: 700; font-size: 15px; color: var(--hero-text); margin-left: 8px; }
.tri .mini span { color: var(--hero-muted); font-size: 12px; display: block; margin-top: 6px; }
.tool-sep { border: 0; border-top: 1px dashed rgba(255, 255, 255, .2); margin: 20px 0; }
.tool { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 20px 0; }

/* ===== 表格 ===== */
.matrix { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; font-size: 14px; }
.matrix th, .matrix td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix thead th { background: var(--bg); font-size: 13px; color: var(--muted); font-weight: 700; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr:nth-child(even) { background: #fbfbf8; }
.matrix th { font-weight: 700; }
.tag { display: inline-block; font-size: .72rem; background: var(--chip); color: var(--blue-deep); border-radius: 999px; padding: 1px 8px; vertical-align: middle; font-weight: 600; }

/* ===== FAQ ===== */
.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 650; font-size: 15px; list-style: none; position: relative; padding-right: 42px; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 1.25rem; color: var(--muted); font-weight: 400; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 13.5px; }

.note { font-size: 13px; color: var(--muted); background: #fbfbf8; border-left: 3px solid var(--line); padding: 10px 14px; border-radius: 0 8px 8px 0; }

.related { margin: 36px 0 8px; font-size: 14px; color: var(--muted); }
.related b { color: var(--ink); }

/* ===== 首页工具清单 ===== */
.tool-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tool-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 46px;
  font-size: 12.5px; color: var(--muted); position: relative; line-height: 20px; }
.tool-list li::before { content: '→'; position: absolute; left: 18px; top: 14px; color: var(--blue); font-weight: 700; font-size: 15px; }
.tool-list li a:first-child { font-size: 14px; font-weight: 700; }
.popular { margin: 28px 0 8px; font-size: 15px; }
.popular a { font-weight: 500; font-size: 13px; }
.popular .sep { color: var(--line); margin: 0 6px; }

.guide p, .guide li { color: var(--ink); }
.guide h2 { margin-top: 30px; }
.legal { font-size: .95rem; }

.changelog { font-size: .78rem; color: var(--muted); margin: 40px 0 0; }

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 56px; padding: 28px 0 40px; }
.foot-brand { font-weight: 800; font-size: 17px; margin: 0; flex-basis: 140px; flex-shrink: 0; }
.foot-tag { color: var(--muted); font-size: 13px; margin: 4px 0 14px; max-width: 44em; }
.foot-grid { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-nav a { font-size: 13px; }
.foot-links { font-size: 12px; color: var(--muted); margin: 12px 0 10px; }
.foot-legal { font-size: 12px; color: var(--muted); margin: 0; }

@media (max-width: 900px) {
  .wrap, .bar { padding-left: 20px; padding-right: 20px; }
  .hero { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .answer-card { grid-template-columns: 1fr; }
  .answer-side { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .answer-card { padding: 20px 16px; }
  .matrix { font-size: .85rem; }
}
