/* ScreenFlows 学习中心（/learn）：静态内容页样式，不依赖任何框架 */
:root {
  /* 与首页（展示页）一致的深色视觉 */
  --bg: #000000;
  --bg-soft: #101014;
  --bg-input: #1c1c21;
  --text: #f5f5f7;
  --text-body: #d4d4d8;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #67e8f9;
  --accent-2: #a5b4fc;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --code-bg: #1c1c21;
  --radius: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.8 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1320px; padding: 0 24px; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 10; background: rgba(0, 0, 0, 0.72); backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.top-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; font-size: 16px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2306b6d4'/%3E%3Cstop offset='1' stop-color='%236366f1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='32' height='32' rx='8' fill='url(%23g)'/%3E%3Cpath d='M7 21c4 0 5-10 9-10s5 6 9 6' stroke='white' stroke-width='2.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / cover; }
.nav { display: flex; gap: 26px; font-size: 14px; flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav a { color: var(--text-2); }
.nav a:hover { color: #fff; text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-login { color: #d4d4d8; font-size: 14px; padding: 6px 12px; }
.top-login:hover { color: #fff; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 24px; border-radius: 999px; background: #f5f5f7; color: #000; font-weight: 600; font-size: 16px; line-height: 1.2; transition: background .2s, transform .2s; }
.btn:hover { text-decoration: none; background: #fff; transform: scale(1.02); }
.btn-sm { padding: 7px 16px; font-size: 14px; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* 正文 */
main { min-height: 60vh; }
.article { max-width: 760px; padding-top: 28px; padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.crumbs a { color: var(--text-3); }
h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 14px; color: var(--text); text-wrap: balance; }
.lede { font-size: 19px; color: var(--text-2); margin: 0 0 12px; text-wrap: pretty; }
.meta { font-size: 13px; color: var(--text-3); margin: 0; }
.toc { margin: 28px 0 8px; padding: 16px 20px; background: var(--bg-soft); border-radius: var(--radius); font-size: 15px; }
.toc-title { font-weight: 600; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.prose { margin-top: 28px; }
.prose h2 { font-size: 26px; line-height: 1.35; margin: 44px 0 12px; scroll-margin-top: 72px; }
.prose h3 { font-size: 20px; line-height: 1.4; margin: 30px 0 8px; scroll-margin-top: 72px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: var(--text-body); }
.prose h2, .prose h3 { color: var(--text); letter-spacing: -0.015em; }
.prose li { margin: 4px 0; }
.prose strong { font-weight: 600; color: var(--text); }
.prose blockquote { margin: 20px 0; padding: 12px 18px; border-left: 3px solid var(--accent-2); background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--text-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code-bg); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--code-bg); padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose img { display: block; max-width: 100%; height: auto; margin: 24px auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.prose figure { margin: 24px 0; }
.prose figcaption { margin-top: 8px; text-align: center; font-size: 13px; color: var(--text-3); }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: rgba(255, 255, 255, 0.04); color: var(--text); font-weight: 600; white-space: nowrap; }
.prose td { color: var(--text-body); }
.prose tr:last-child td { border-bottom: 0; }

/* 号召行动、卡片 */
.cta { margin: 56px 0 0; padding: 32px; border-radius: var(--radius); background: radial-gradient(80% 120% at 0% 0%, rgba(79, 70, 229, 0.28), transparent 60%), var(--bg-soft); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(79, 70, 229, 0.35); }
.cta h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.cta p { margin: 0 0 18px; color: var(--text-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.related { margin-top: 48px; }
.related h2 { font-size: 20px; margin: 0 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--bg-soft); transition: border-color .2s, transform .2s; }
.card:hover { text-decoration: none; border-color: rgba(129, 140, 248, 0.5); transform: translateY(-2px); }
.card-kind { font-size: 12px; color: var(--accent-2); font-weight: 600; }
.card-title { font-weight: 600; line-height: 1.45; }
.card-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--text-3); }

/* 学习中心首页、栏目页 */
.hub { padding-top: 32px; padding-bottom: 56px; }
.hub { padding-top: 56px; }
.hub-head { margin-bottom: 32px; max-width: 760px; }
.hub-section { margin: 36px 0; }
.hub-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.hub-section-head h2 { margin: 0; font-size: 22px; }
.hub-section-head h2 a { color: var(--text); }
.hub-section-head span { color: var(--text-3); font-size: 14px; }

/* 计算工具 */
.calc { margin: 24px 0 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.calc input, .calc select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; background: var(--bg-input); color: var(--text); width: 100%; }
.calc input:focus, .calc select:focus { outline: 2px solid #818cf8; outline-offset: 0; border-color: transparent; }
.calc-hint { font-size: 12px; color: var(--text-3); }
.calc-out { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
.calc-stat { padding: 16px 18px; border-radius: 16px; background: #000; border: 1px solid var(--line); }
.calc-stat b { display: block; font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #67e8f9, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc-stat span { font-size: 13px; color: var(--text-3); }
.calc-note { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.calc-error { color: #fda4af; }

/* 页脚 */
.foot { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 40px 0 48px; font-size: 13px; color: var(--text-3); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-brand .logo { width: 24px; height: 24px; border-radius: 6px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-links a { color: var(--text-3); }
.foot-links a:hover { color: #d4d4d8; text-decoration: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .top-in { justify-content: space-between; }
  .top-login { display: none; }
  .lede { font-size: 17px; }
  .prose h2 { font-size: 22px; }
  .cta { padding: 22px; }
}

/* ── 宽屏布局 ─────────────────────────────────────────────────────────────── */
/* 文章页：左侧目录 · 正文 · 右侧试用入口与相关阅读 */
.article-page { padding-top: 32px; padding-bottom: 64px; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.article-main { min-width: 0; }
.side { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.tags span { font-size: 12px; color: var(--text-2); padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.toc-side { margin: 0; padding: 0; background: none; font-size: 14px; }
.toc-side .toc-title { font-size: 12px; color: var(--text-3); text-transform: none; margin-bottom: 10px; }
.toc-side ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc-side li { margin: 0; }
.toc-side a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-2); line-height: 1.5; }
.toc-side a:hover { color: #fff; border-left-color: var(--accent-2); text-decoration: none; }
.side-sticky, .toc-side { position: sticky; top: 96px; }
.side-cta { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(120% 90% at 0% 0%, rgba(79, 70, 229, 0.3), transparent 60%), var(--bg-soft); }
.side-cta-title { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.side-cta p { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.btn-block { display: flex; width: 100%; font-size: 15px; padding: 11px 16px; }
.side-link { display: block; text-align: center; margin-top: 10px; font-size: 14px; }
.side-related { margin-top: 28px; }
.side-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.side-related ul { list-style: none; margin: 0; padding: 0; }
.side-related li a { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 14px; line-height: 1.5; }
.side-related li a:hover { color: #fff; text-decoration: none; }
.side-related li a:hover .card-kind { text-decoration: underline; }
.article-page > .cta, .article-page > .related { max-width: none; }
.article-page .related .cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

@media (min-width: 1040px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .side-right { display: block; }
  .article-page > .cta { display: none; }   /* 右侧已有试用入口 */
}
@media (min-width: 1280px) {
  .article-grid { grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 56px; }
  .side-left { display: block; }
  .toc-inline { display: none; }
}

/* 学习中心首页：标题 + 栏目磁贴并排，最新内容铺满整行 */
.hub-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 48px; }
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--accent-2); }
.hub-hero h1 { font-size: clamp(36px, 5vw, 64px); }
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); transition: border-color .2s, transform .2s; }
.tile:hover { text-decoration: none; border-color: rgba(129, 140, 248, 0.5); transform: translateY(-2px); }
.tile-name { font-weight: 600; }
.tile-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.tile-count { margin-top: 6px; font-size: 12px; color: var(--accent); }
.hub-section-head .more { margin-left: auto; font-size: 14px; }
.cards-featured { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-featured { background: radial-gradient(90% 120% at 0% 0%, rgba(79, 70, 229, 0.3), transparent 65%), var(--bg-soft); }
.card-featured .card-title { font-size: 22px; line-height: 1.35; letter-spacing: -0.015em; }
.card-featured .card-desc { font-size: 15px; -webkit-line-clamp: 4; }
@media (min-width: 900px) {
  .hub-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .cards-featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-featured { grid-column: span 2; padding: 28px 32px; }
}
@media (min-width: 1200px) {
  .cards-featured, .hub .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 语言切换 */
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; margin-right: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); font-size: 12px; }
.lang a, .lang span { padding: 3px 10px; border-radius: 999px; color: var(--text-2); white-space: nowrap; }
.lang a:hover { color: #fff; text-decoration: none; }
.lang span[aria-current] { background: #f5f5f7; color: #000; font-weight: 600; }
@media (max-width: 640px) {
  .lang { margin-right: 4px; padding: 0; background: none; }
  .lang span[aria-current] { display: none; }
  .lang a { padding: 4px 6px; font-size: 13px; }
  .top-actions .btn-sm { padding: 7px 12px; font-size: 13px; }
}
