/* Layout: long-form APK / guide pages (参考 cobolcoder 式 — 顶栏 + 横向章节条 + 居中正文栏) */
:root {
  --bg: #f0f2f7;
  --surface: #ffffff;
  --text: #1a1d26;
  --muted: #5c6478;
  --border: #dfe3ed;
  --accent: #0d8a5b;
  --accent-dark: #066747;
  --gold: #c9a227;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(20, 30, 60, 0.08);
  /* 正文阅读宽度（与 cobolcoder 类长文接近） */
  --max: 920px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

/* 顶栏 + 章节条一并 sticky（类似 cobolcoder 双层头） */
.site-head-stack {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(20, 30, 60, 0.06);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.55rem 0;
  flex-wrap: nowrap;
  min-height: 3.25rem;
}

.brand img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}
.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.header-cta {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
}

/* 横向章节条（桌面主入口；与 cobolcoder 下方 About / Rules 一排同类） */
.site-subnav {
  background: linear-gradient(180deg, #f5f7fc 0%, #eef1f8 100%);
  border-bottom: 1px solid var(--border);
}

.subnav-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0.45rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.subnav-scroll a {
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
}

.subnav-scroll a:hover {
  color: var(--accent);
  background: rgba(13, 138, 91, 0.08);
}

.subnav-scroll a + a {
  border-left: 1px solid var(--border);
  margin-left: 0.35rem;
  padding-left: 0.85rem;
}

/* 桌面：顶栏只保留 Logo + CTA，链接走章节条 */
@media (min-width: 769px) {
  .site-nav {
    display: none !important;
  }
  .nav-toggle {
    display: none !important;
  }
  .header-cta {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .site-subnav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .header-cta {
    display: none;
  }
  .site-header {
    position: relative;
  }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 60;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: 0 12px 24px rgba(20, 30, 60, 0.12);
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
  }
}

main {
  padding-block: 0 3rem;
}

.hero {
  background: linear-gradient(160deg, #0f3d2e 0%, #0d8a5b 45%, #1a1d26 100%);
  color: #f4f7f5;
  padding: 2.25rem 0 2.25rem;
  margin-bottom: 1.75rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero .lead {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0 0 1.25rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.hero-stats span {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.hero figure {
  margin: 0;
}
.hero img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary {
  background: var(--gold);
  color: #1a1203;
  border-color: #e8d48a;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem 1.5rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow);
}

.section h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.55rem);
  line-height: 1.25;
}
.section h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}

.content-narrow {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1rem;
  padding-bottom: 0.5rem;
}

/* 内页首块与 sticky 头留出间距（首页首块是 .hero，不适用） */
main > .content-narrow:first-child {
  padding-top: 1.75rem;
}

.figure-inline {
  margin: 1rem 0;
}
.figure-inline img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

table.app-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.98rem;
}
table.app-table th,
table.app-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
table.app-table th {
  background: #f0f3fa;
  width: 32%;
}

ul.check,
ol.steps {
  padding-left: 1.25rem;
}
ul.check li,
ol.steps li {
  margin-bottom: 0.5rem;
}

.bonus-callout {
  background: linear-gradient(90deg, #fff9e6, #fff);
  border: 1px solid #f0e0b2;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.bonus-callout strong {
  color: #7a5200;
}

.faq {
  margin-top: 1rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item .faq-body {
  padding: 0 1rem 1rem;
  color: var(--muted);
}

.site-footer {
  background: #12151c;
  color: #c9ceda;
  padding: 2rem 0 1rem;
  margin-top: 2rem;
}
.site-footer a {
  color: #e8ecf5;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  max-width: 36rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .footer-links {
    justify-content: flex-start;
  }
}
.footer-bottom {
  border-top: 1px solid #2a3140;
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.page-title {
  margin-top: 0;
}

.hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, #fff, #fafbff);
  box-shadow: var(--shadow);
}
.hub-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.hub-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.hub-card a {
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
}
.hub-card a:hover {
  text-decoration: underline;
}

.lead-strong {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.download-bar {
  text-align: center;
  padding: 1.5rem;
}
