/* ============================================================
 * 普推知产工作台 · 全站统一外壳（页眉 / 页脚 / 导航）与首页
 * 商务蓝设计 token；断点 360 / 768 / 1024 / 1440；触控目标 ≥44px
 * 统一使用 .pt- 前缀，避免与三个工具自身的样式互相影响
 * ============================================================ */

:root {
  --pt-brand:       #1557D6;
  --pt-brand-deep:  #0B3F9E;
  --pt-brand-soft:  #EAF1FF;
  --pt-ink:         #1B2333;
  --pt-ink-2:       #4C5870;
  --pt-ink-3:       #8A93A6;
  --pt-line:        #E2E7F0;
  --pt-bg:          #F4F6FA;
  --pt-white:       #FFFFFF;
  --pt-header-h:    60px;
  --pt-footer-h:    34px;
  --pt-radius:      14px;
  --pt-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* 三个工具页自身已声明 border-box；首页只有本文件，必须在此统一盒模型，
 * 否则 width:100% + padding 会撑宽容器，导致横向溢出与页眉高度偏差。 */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ---------------- 统一页眉 ---------------- */
.pt-header {
  height: var(--pt-header-h);
  background: var(--pt-white);
  border-bottom: 1px solid var(--pt-line);
  position: relative; z-index: 50;
  font-family: var(--pt-font);
}
.pt-header-inner {
  height: 100%; max-width: 1280px; margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center; gap: 18px;
}
.pt-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--pt-ink); flex: none;
}
.pt-logo {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--pt-brand); color: #fff;
}
.pt-brand-text { font-size: 16px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.pt-nav { display: flex; align-items: center; gap: 2px; }
.pt-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--pt-ink-2); font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.pt-nav a:hover { background: #F5F8FF; color: var(--pt-brand); }
.pt-nav a[aria-current="page"] { background: var(--pt-brand-soft); color: var(--pt-brand); font-weight: 600; }
.pt-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pt-menu {
  display: none; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--pt-line); border-radius: 9px;
  background: #fff; color: var(--pt-ink-2);
  align-items: center; justify-content: center;
}
.pt-menu:hover { border-color: var(--pt-brand); color: var(--pt-brand); }

/* 移动端导航抽屉：浮层，不占文档流高度 */
.pt-drawer {
  position: fixed; left: 0; right: 0; top: var(--pt-header-h); z-index: 60;
  background: #fff; border-bottom: 1px solid var(--pt-line);
  box-shadow: 0 12px 28px rgba(24, 48, 92, .14);
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  font-family: var(--pt-font);
}
.pt-drawer a, .pt-drawer button {
  display: flex; align-items: center; width: 100%; min-height: 46px;
  padding: 0 14px; border: 0; border-radius: 9px; background: none;
  color: var(--pt-ink); font-size: 14px; text-decoration: none; text-align: left;
}
.pt-drawer a:hover, .pt-drawer button:hover { background: #F5F8FF; color: var(--pt-brand); }
.pt-drawer a[aria-current="page"] { background: var(--pt-brand-soft); color: var(--pt-brand); font-weight: 600; }
.pt-drawer-sep { height: 1px; background: var(--pt-line); margin: 6px 4px; }

/* ---------------- 统一页脚 ---------------- */
.pt-footer {
  height: var(--pt-footer-h); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--pt-white); border-top: 1px solid var(--pt-line);
  color: var(--pt-ink-3); font-family: var(--pt-font);
  font-size: 11.5px; letter-spacing: .2px; text-align: center;
}
.pt-footer small { line-height: 1.4; }

/* 首页：内容不足一屏时页脚贴底（工具页保持自身布局，不套 flex） */
body.pt-home {
  margin: 0; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--pt-bg); color: var(--pt-ink); font-family: var(--pt-font);
  -webkit-font-smoothing: antialiased;
}
body.pt-home > main { flex: 1 0 auto; }

/* 普通文档流的工具页：内容短时让页脚贴底，内容长时自然顺延 */
body.pt-flow { min-height: 100dvh; display: flex; flex-direction: column; }
body.pt-flow > main { flex: 1 0 auto; }
body.pt-flow > .pt-footer { margin-top: 0; }

/* ---------------- 首页 ---------------- */
.home-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 48px 24px 64px; }
.home-hero { margin-bottom: 30px; }
.home-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--pt-brand-soft); color: var(--pt-brand);
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.home-hero h1 { margin: 14px 0 10px; font-size: 30px; line-height: 1.35; letter-spacing: .5px; }
.home-hero p { margin: 0; max-width: 680px; font-size: 14px; line-height: 1.8; color: var(--pt-ink-2); }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-card {
  display: flex; flex-direction: column; min-height: 218px;
  padding: 24px; border: 1px solid var(--pt-line); border-radius: var(--pt-radius);
  background: var(--pt-white); color: var(--pt-ink); text-decoration: none;
  box-shadow: 0 2px 12px rgba(24, 48, 92, .05);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.home-card:hover { transform: translateY(-3px); border-color: var(--pt-brand); box-shadow: 0 10px 28px rgba(21, 87, 214, .13); }
.home-card:focus-visible { outline: 2px solid var(--pt-brand); outline-offset: 3px; }
.home-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--pt-brand-soft); color: var(--pt-brand);
}
.home-card h2 { margin: 18px 0 8px; font-size: 17px; font-weight: 700; }
.home-card p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--pt-ink-2); }
.home-card .home-go {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pt-brand); font-size: 13px; font-weight: 600;
}
.home-note {
  margin-top: 26px; padding: 14px 18px; border-radius: 10px;
  background: #EAF6EF; color: #1E7A47; font-size: 12.5px; line-height: 1.7;
}
.home-note strong { font-weight: 700; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1023px) {
  .pt-header-inner { padding: 0 16px; gap: 12px; }
  .pt-nav a { padding: 0 9px; font-size: 12.5px; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-main { padding: 36px 18px 52px; }
}

@media (max-width: 767px) {
  .pt-nav { display: none; }
  .pt-menu { display: inline-flex; }
  .pt-actions { margin-left: auto; }
  .pt-brand-text { font-size: 14px; }
  .pt-header-inner { padding: 0 14px; gap: 8px; }
  .pt-actions .privacy-pill { display: none; }
  .home-main { padding: 26px 16px 44px; }
  .home-hero h1 { font-size: 24px; }
  .home-hero p { font-size: 13px; }
  .home-grid { grid-template-columns: 1fr; gap: 14px; }
  .home-card { min-height: 0; padding: 20px; }
  .home-card h2 { margin-top: 14px; }
  .home-card .home-go { padding-top: 14px; }
}

@media (max-width: 359px) {
  .pt-brand-text { font-size: 13px; }
  .pt-actions .link-btn { font-size: 12px; }
}

/* 打印 / 另存为 PDF：站点外壳一律不进入纸面 */
@media print {
  .pt-header, .pt-footer, .pt-drawer, .pt-menu { display: none !important; }
  body.pt-home { display: block; min-height: 0; }
}
