/* ==========================================================================
   绿茶VPN使用教程站 (jiaocheng.green-tea.buzz) 样式表
   定位：规范技术文档系统、移动端优先、纯原生 CSS、支持本地 file:/// 打开
   ========================================================================== */

:root {
  --brand: #059669;
  --brand-hover: #047857;
  --brand-dark: #064e3b;
  --brand-light: #ecfdf5;
  --brand-border: #a7f3d0;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-title: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --max-w: 1120px;
  --max-w-reading: 860px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* 顶部页眉：包含品牌Logo、品牌名、域名小字、主导航与控制台 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand-icon-box {
  width: 28px;
  height: 28px;
  background-color: var(--brand);
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.brand-name-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-title);
  white-space: nowrap;
}

.brand-domain-text {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* 页眉独立主导航 */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  overflow-x: auto;
}

.header-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.header-nav a:hover, .header-nav a.active {
  color: var(--brand);
  background-color: var(--brand-light);
}

.header-action {
  flex-shrink: 0;
}

.header-action a {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-title);
  text-decoration: none !important;
  background: #ffffff;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.header-action a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background-color: var(--brand-light);
}

/* 页面主容器 */
.main-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
}

.main-wrapper-reading {
  max-width: var(--max-w-reading);
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
}

/* 一、加长版技术文档 Hero 样式 */
.hero-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--brand-border);
}

.hero-compact h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text-title);
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-compact p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
  max-width: 960px;
}

.hero-features-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
  padding: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.hero-feat-item {
  display: flex;
  flex-direction: column;
}

.hero-feat-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-feat-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 22px;
  background-color: var(--brand);
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none !important;
  transition: background-color 0.15s ease;
  border: 1px solid transparent;
}

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

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  background-color: #ffffff;
  color: var(--text-main) !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none !important;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand) !important;
}

/* 二、套餐价格（紧接 Hero 之后） */
.pricing-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section-head-sm {
  margin-bottom: 16px;
}

.section-head-sm h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 4px;
}

.section-head-sm p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.pricing-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.price-item-box {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
}

.price-plan-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-title);
  margin-bottom: 4px;
}

.price-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.price-val small {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-limits {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.price-limits li {
  margin-bottom: 4px;
}

.price-btn {
  display: block;
  text-align: center;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-title) !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.price-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand) !important;
}

.price-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* 三、主导航与分类卡片栏 */
.nav-categories-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.nav-categories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nav-categories-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-title);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.nav-cat-btn {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  color: var(--text-title);
  transition: all 0.15s ease;
}

.nav-cat-btn:hover, .nav-cat-btn.active {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand);
}

.nav-cat-btn-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.nav-cat-btn-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 四、教程卡片列表 (12个独立任务页面) */
.doc-section-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-section-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-title);
}

.doc-section-head span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tutorials-grid-12 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.tutorial-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tutorial-task-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.task-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 4px;
  margin-bottom: 8px;
}

.task-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.task-card-title a {
  color: var(--text-title);
  text-decoration: none;
}

.task-card-title a:hover {
  color: var(--brand);
}

.task-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  flex-grow: 1;
}

.task-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.task-card-footer a {
  font-weight: 600;
  color: var(--brand);
}

/* 五、底部注册 CTA 区块 */
.bottom-cta-banner {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-top: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.bottom-cta-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 4px;
}

.bottom-cta-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* 正文与阅读排版 (教程内页) */
.article-header {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.article-title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: var(--text-title);
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* 摘要轻量注册提示条 */
.article-sub-cta {
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-sub-cta a {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.doc-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.doc-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-title);
  margin: 30px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.doc-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-title);
  margin: 20px 0 10px;
}

.doc-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 14px;
}

.doc-content ul, .doc-content ol {
  font-size: 0.92rem;
  line-height: 1.7;
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.doc-content li {
  margin-bottom: 6px;
}

/* 步骤块 */
.step-item {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.step-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-title);
  margin-bottom: 8px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Callout 提示框 */
.callout {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  font-size: 0.88rem;
  border-left: 4px solid;
}

.callout-info {
  background-color: #f0fdf4;
  border-left-color: #10b981;
  color: #14532d;
}

.callout-warn {
  background-color: #fffbeb;
  border-left-color: #f59e0b;
  color: #78350f;
}

.callout-danger {
  background-color: #fef2f2;
  border-left-color: #ef4444;
  color: #7f1d1d;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  padding: 2px 6px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #0f172a;
  word-break: break-all;
  overflow-wrap: break-word;
}

pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 16px 0;
  border: 1px solid var(--border);
}

pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: inherit;
  word-break: normal;
  white-space: pre;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th, td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 0.86rem;
  text-align: left;
}

th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-title);
  white-space: nowrap;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* 正文结束后明确注册卡片 */
.article-end-cta {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 30px 0 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.article-end-cta h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 6px;
}

.article-end-cta p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* 相关文档卡片 */
.related-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 30px;
}

.related-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 12px;
}

.related-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.related-link-item {
  display: block;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-title);
  text-decoration: none !important;
  font-size: 0.86rem;
  font-weight: 600;
}

.related-link-item:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* 页脚 */
.doc-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--brand);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ==========================================================================
   响应式断点适配 (移动端优先 Mobile-First Optimization)
   ========================================================================== */

/* 全局移动端防横向抖动与触控体验 */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: rgba(5, 150, 105, 0.1);
}

/* 平板与中等屏幕 (<= 960px) */
@media (max-width: 960px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .header-inner {
    height: auto;
    padding: 10px 16px 8px;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 8px;
  }
  .brand-wrap {
    flex-shrink: 0;
  }
  .header-action {
    margin-left: auto;
  }
  .header-action a {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  /* 移动端横向滑块式导航栏：保留完整导航项目，首屏常驻，手指滑动极其顺畅 */
  .header-nav {
    display: flex !important;
    width: 100%;
    order: 3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 6px;
    gap: 6px;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .header-nav::-webkit-scrollbar {
    display: none;
  }
  .header-nav a {
    font-size: 0.82rem;
    padding: 6px 12px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    flex-shrink: 0;
    line-height: 1.2;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
  .header-nav a.active, .header-nav a:hover {
    background: var(--brand-light);
    border-color: var(--brand-border);
    color: var(--brand);
    font-weight: 700;
  }

  .pricing-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tutorials-grid-12 {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-features-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 手机端核心适配 (<= 640px) */
@media (max-width: 640px) {
  .main-wrapper, .main-wrapper-reading {
    padding: 16px 14px 44px;
  }
  .brand-domain-text {
    display: none;
  }
  .brand-name-text {
    font-size: 1rem;
  }

  /* Hero 区域在手机端的排版优化 */
  .hero-compact {
    padding: 20px 16px;
    margin-bottom: 16px;
  }
  .hero-tag {
    font-size: 0.74rem;
    padding: 3px 8px;
    line-height: 1.35;
    white-space: normal;
  }
  .hero-compact h1 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 10px;
  }
  .hero-compact p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }
  .hero-features-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
    margin: 14px 0 18px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.92rem;
  }

  /* 套餐价格手机端优化 */
  .pricing-section {
    padding: 18px 14px;
    margin-bottom: 16px;
  }
  .pricing-compact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .price-item-box {
    padding: 16px 14px;
  }
  .price-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 导航卡片手机端 */
  .nav-categories-bar {
    padding: 14px 12px;
    margin-bottom: 16px;
  }
  .nav-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .nav-cat-btn {
    padding: 10px;
  }
  .nav-cat-btn-name {
    font-size: 0.84rem;
  }

  /* 教程列表手机端 */
  .tutorials-grid-12 {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .tutorial-task-card {
    padding: 16px 14px;
  }
  .task-card-title {
    font-size: 0.95rem;
  }
  .task-card-footer a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* 教程正文与阅读内页手机端优化 */
  .article-header {
    padding: 18px 14px;
    margin-bottom: 16px;
  }
  .article-title {
    font-size: 1.35rem;
    line-height: 1.35;
  }
  .article-meta-bar {
    gap: 6px 10px;
    font-size: 0.78rem;
  }
  .article-sub-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }
  .article-sub-cta a {
    align-self: flex-start;
    padding: 6px 14px;
    background: var(--brand);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
  }
  .doc-content {
    padding: 20px 14px;
    margin-bottom: 16px;
  }
  .doc-content h2 {
    font-size: 1.15rem;
    margin: 22px 0 10px;
  }
  .doc-content h3 {
    font-size: 1rem;
    margin: 16px 0 8px;
  }
  .doc-content p, .doc-content ul, .doc-content ol {
    font-size: 0.9rem;
    line-height: 1.65;
  }
  .step-item {
    padding: 14px 12px;
  }
  .callout {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  .article-end-cta {
    padding: 20px 14px;
    margin: 20px 0 16px;
  }
  .article-end-cta .btn-primary {
    width: 100%;
    padding: 11px 16px;
  }
  .related-box {
    padding: 16px 14px;
    margin-top: 20px;
  }
  .related-links-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .related-link-item {
    padding: 10px 12px;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  /* 底部 CTA 手机端 */
  .bottom-cta-banner {
    padding: 20px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .bottom-cta-banner .btn-primary {
    width: 100%;
    padding: 11px 16px;
    text-align: center;
    justify-content: center;
  }

  /* 页脚手机端 */
  .doc-footer {
    padding: 20px 14px;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-nav {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}

/* 超窄屏手机进一步针对性优化 (<= 380px，如 iPhone SE 1/2代、小屏Android机) */
@media (max-width: 380px) {
  .nav-categories-grid {
    grid-template-columns: 1fr;
  }
  .brand-icon-box {
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
  }
  .brand-name-text {
    font-size: 0.92rem;
  }
  .header-action a {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}
