/* ==========================================================================
   Thorium Reader 中文站 (www.thoriumreader.cn) 公共样式
   品牌色取自 logo：主蓝 #4080F0 / 深蓝 #2B5FC7，浅色主题，扁平现代风
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand: #4080F0;
  --brand-dark: #2B5FC7;
  --brand-darker: #1E4BA8;
  --brand-ink: #14346E;
  --brand-light: #6BA3F5;
  --brand-bg: #EDF3FE;
  --brand-bg-2: #E0EBFD;

  /* 中性色 */
  --text: #1F2937;
  --text-2: #4B5563;
  --text-3: #6B7280;
  --line: #E5E9F0;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --card: #FFFFFF;

  /* 语义色 */
  --ok: #1E9E6A;
  --warn: #C77700;

  /* 圆角与阴影（扁平，弱阴影） */
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(20, 52, 110, 0.06);
  --shadow-2: 0 4px 16px rgba(20, 52, 110, 0.10);
  --shadow-3: 0 12px 40px rgba(20, 52, 110, 0.16);

  --header-h: 64px;
  --max-w: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
ul, ol { padding-left: 1.25em; }
li { margin: 0.3em 0; }

/* 可访问性：仅屏幕阅读器可见 */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* 跳转到主内容 */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand-dark); color: #fff; padding: 10px 18px;
  border-radius: var(--r-sm); transition: top 0.2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* 焦点可见性 */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(64, 128, 240, 0.55);
  outline-offset: 2px; border-radius: 4px;
}

/* ==========================================================================
   布局容器
   ========================================================================== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section--brand { background: var(--brand-bg); }

.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-head .kicker {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--brand-dark); background: var(--brand-bg); border: 1px solid var(--brand-bg-2);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: 30px; line-height: 1.35; color: var(--brand-ink); }
.section-head p { margin-top: 12px; color: var(--text-2); }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 28px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand .brand-name { font-size: 18px; color: var(--brand-ink); letter-spacing: 0.01em; }
.brand .brand-tld { color: var(--text-3); font-weight: 500; font-size: 14px; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; padding: 0; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 15px; font-weight: 500;
}
.main-nav a:hover { color: var(--brand-dark); background: var(--brand-bg); }
.main-nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-bg); font-weight: 600; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .link-ghost { color: var(--text-2); font-size: 15px; font-weight: 500; }

.nav-toggle {
  display: none; margin-left: auto; border: 1px solid var(--line); background: #fff;
  border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--brand-ink);
  margin: 4px 0; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--secondary { background: var(--brand-ink); color: #fff; }
.btn--secondary:hover { background: #0F2A5C; color: #fff; }

.btn--outline { background: #fff; color: var(--brand-dark); border-color: #C4D7F8; }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); }

.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--brand-dark); }

.btn--lg { padding: 15px 34px; font-size: 16px; border-radius: 12px; }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }

.btn .os-tag {
  font-size: 12px; font-weight: 500; opacity: 0.85;
  border-left: 1px solid rgba(255,255,255,0.35); padding-left: 10px;
}

/* ==========================================================================
   首屏 Hero
   ========================================================================== */
.hero { background: linear-gradient(180deg, var(--brand-bg) 0%, #fff 100%); padding: 88px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--brand-bg-2); border-radius: 999px;
  padding: 6px 16px; font-size: 13.5px; color: var(--text-2); margin-bottom: 22px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.hero h1 { font-size: 42px; line-height: 1.28; color: var(--brand-ink); letter-spacing: 0.005em; }
.hero h1 .hl { color: var(--brand-dark); }
.hero .lede { margin-top: 18px; font-size: 17px; color: var(--text-2); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px;
  font-size: 13.5px; color: var(--text-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

.hero-visual { position: relative; }
.hero-window {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.hero-window .bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.hero-window .bar i { width: 10px; height: 10px; border-radius: 50%; background: #D6DEE9; }
.hero-window .bar i:nth-child(1) { background: #F0B8B4; }
.hero-window .bar i:nth-child(2) { background: #F3D9A4; }
.hero-window .bar i:nth-child(3) { background: #B5DFC8; }
.hero-window .bar .bar-title { margin-left: 10px; font-size: 12.5px; color: var(--text-3); }

.hero-window .win-body { padding: 26px 28px 30px; }
.win-book { display: flex; gap: 18px; }
.win-cover {
  width: 132px; height: 184px; border-radius: 8px; flex: none;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-darker) 100%);
  color: #fff; padding: 16px 14px; display: flex; flex-direction: column;
}
.win-cover .cv-line { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.45); margin: 6px 0; }
.win-cover .cv-line--t { width: 72%; height: 13px; background: rgba(255,255,255,0.85); }
.win-cover .cv-line--s { width: 45%; margin-top: auto; }
.win-cover .cv-tag { margin-top: 10px; font-size: 11px; letter-spacing: 0.18em; opacity: 0.8; }

.win-info h3 { font-size: 18px; color: var(--brand-ink); }
.win-info .win-author { font-size: 13.5px; color: var(--text-3); margin: 4px 0 14px; }
.win-progress { height: 6px; border-radius: 3px; background: var(--brand-bg-2); overflow: hidden; }
.win-progress i { display: block; height: 100%; width: 62%; background: var(--brand); }
.win-note { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

.hero-chip {
  position: absolute; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 10px 16px;
  font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px;
}
.hero-chip b { color: var(--brand-ink); font-weight: 600; }
.hero-chip .ic { width: 26px; height: 26px; flex: none; }
.hero-chip--a { right: -14px; top: 26px; }
.hero-chip--b { left: -18px; bottom: 30px; }

/* ==========================================================================
   卡片与网格
   ========================================================================== */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--shadow-1);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: #C4D7F8; box-shadow: var(--shadow-2); transform: translateY(-2px); }

.card .ic {
  width: 44px; height: 44px; border-radius: 10px; flex: none;
  background: var(--brand-bg); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font-size: 17.5px; color: var(--brand-ink); margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-2); }
.card ul { margin-top: 10px; }
.card li { font-size: 14px; color: var(--text-2); }

/* ==========================================================================
   使用场景（首页）
   ========================================================================== */
.scene { display: flex; gap: 26px; align-items: flex-start; }
.scene .num {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.scene h3 { font-size: 17px; color: var(--brand-ink); margin-bottom: 6px; }
.scene p { font-size: 14.5px; color: var(--text-2); }

/* 规格表 */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { width: 168px; color: var(--brand-ink); font-weight: 600; background: var(--bg-soft); }
.spec-table td { color: var(--text-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ==========================================================================
   页面通用 Hero（内页）
   ========================================================================== */
.page-hero { background: var(--brand-bg); padding: 56px 0 52px; border-bottom: 1px solid var(--brand-bg-2); }
.page-hero h1 { font-size: 32px; color: var(--brand-ink); }
.page-hero p { margin-top: 10px; color: var(--text-2); max-width: 46em; font-size: 16px; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .sep { margin: 0 8px; color: #B7C3D4; }

/* ==========================================================================
   下载页
   ========================================================================== */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dl-card { display: flex; flex-direction: column; }
.dl-card .os-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dl-card .os-head .ic { margin-bottom: 0; width: 40px; height: 40px; }
.dl-card h3 { font-size: 18px; margin: 0; }
.dl-card .req { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.dl-card .btn { margin-top: 18px; }
.dl-card .dl-note { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.dl-card ul { margin-top: 14px; }

.install-steps { counter-reset: step; list-style: none; padding: 0; }
.install-steps li {
  position: relative; padding: 0 0 22px 52px; counter-increment: step;
}
.install-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.install-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 4px;
  width: 2px; background: var(--brand-bg-2);
}
.install-steps h3 { font-size: 16px; color: var(--brand-ink); margin-bottom: 4px; }
.install-steps p { font-size: 14px; color: var(--text-2); }
.install-steps code {
  background: var(--brand-bg); color: var(--brand-darker);
  padding: 2px 8px; border-radius: 5px; font-size: 13px;
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--brand-ink);
  padding: 14px 0; list-style: none; position: relative; font-size: 15.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--brand); font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 0 16px; color: var(--text-2); font-size: 14.5px; }

/* ==========================================================================
   教程页步骤
   ========================================================================== */
.toc-steps { list-style: none; padding: 0; counter-reset: ts; }
.toc-steps > li { counter-increment: ts; margin-bottom: 34px; }
.toc-steps > li > h3 { font-size: 18px; color: var(--brand-ink); display: flex; align-items: center; gap: 12px; }
.toc-steps > li > h3::before {
  content: counter(ts, decimal-leading-zero);
  font-size: 15px; color: var(--brand); font-weight: 700;
  border-bottom: 2px solid var(--brand); padding-bottom: 2px;
}
.toc-steps > li > p { margin: 10px 0 0 0; color: var(--text-2); font-size: 14.5px; }
.toc-steps .sub { margin-top: 10px; }

/* ==========================================================================
   数据 / 统计条
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md); }
.stat .v { font-size: 28px; font-weight: 700; color: var(--brand-dark); }
.stat .k { margin-top: 4px; font-size: 13px; color: var(--text-3); }

/* 引用 */
blockquote.quote {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--r-md); padding: 20px 24px; font-size: 14.5px; color: var(--text-2);
}
blockquote.quote footer { margin-top: 8px; font-size: 13px; color: var(--text-3); }

/* ==========================================================================
   CTA 横幅
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  border-radius: var(--r-lg); color: #fff; padding: 44px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
}
.cta-banner h2 { font-size: 26px; color: #fff; }
.cta-banner p { margin-top: 8px; color: rgba(255,255,255,0.85); font-size: 15px; }
.cta-banner .btn--white { background: #fff; color: var(--brand-darker); }
.cta-banner .btn--white:hover { background: var(--brand-bg); color: var(--brand-dark); }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer { background: #101D33; color: #A7B4C9; margin-top: 84px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand span { color: #fff; font-weight: 700; font-size: 17px; }
.site-footer p { font-size: 13.5px; line-height: 1.8; }
.site-footer h4 { color: #E8EEF8; font-size: 14px; margin-bottom: 14px; letter-spacing: 0.04em; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: #A7B4C9; font-size: 13.5px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #7E8CA6;
}

/* ==========================================================================
   下载弹窗（所有页面复用）
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(16, 29, 51, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.22s, visibility 0.22s;
}
.modal-overlay.is-open { opacity: 1; visibility: visible;     left: 0;
    right: 0;
    top: 0;
    bottom: 0;}
button { outline: none } 
.modal {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  transform: translateY(14px) scale(0.98); transition: transform 0.24s;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 26px 0;
}
.modal-head h2 { font-size: 20px; color: var(--brand-ink); }
.modal-head .modal-sub { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.modal-close {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  width: 34px; height: 34px; border-radius: 8px; font-size: 18px; line-height: 1;
  cursor: pointer; flex: none;
}
.modal-close:hover { border-color: var(--brand); color: var(--brand-dark); }

.modal-body { padding: 20px 26px 26px; }
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qr-item {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 16px;
  text-align: center; background: var(--bg-soft);
}
.qr-item img {
  width: 172px; height: 172px; margin: 0 auto 12px; border-radius: 8px;
  background: #fff; padding: 8px; border: 1px solid var(--line);
}
.qr-item .qr-title { font-size: 15px; font-weight: 600; color: var(--brand-ink); }
.qr-item .qr-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.qr-item .qr-brand { font-size: 12px; margin-top: 8px; color: var(--text-3); }

.modal-tips { margin-top: 18px; font-size: 13px; color: var(--text-3);
  border-top: 1px dashed var(--line); padding-top: 14px; }
.modal-tips b { color: var(--text-2); font-weight: 600; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-chip--a { right: 6px; }
  .hero-chip--b { left: 6px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    display: none; padding: 10px 24px 18px; margin-left: 0;
    box-shadow: var(--shadow-2);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 11px 12px; font-size: 15px; }
  .header-cta .link-ghost { display: none; }

  .section { padding: 52px 0; }
  .section-head h2 { font-size: 25px; }
  .grid--3, .grid--2, .dl-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 56px; }
  .cta-banner { padding: 32px 26px; }
  .qr-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .win-book { flex-direction: column; }
  .spec-table th, .spec-table td { display: block; width: auto; }
  .spec-table th { border-bottom: none; padding-bottom: 0; }
}

/* 打印 */
@media print {
  .site-header, .site-footer, .cta-banner, .hero-chip { display: none; }
}
