/*
  教程站视觉：浅色高级感（与官网一致）
  独立于官网 styles.css，避免互相影响。
*/

:root{
  --bg: #ffffff;
  --bg-2: #ffffff;
  --panel: rgba(255,255,255,.72);
  --panel-2: rgba(255,255,255,.82);
  --line: rgba(11,15,23,.10);
  --line-2: rgba(11,15,23,.14);
  --text: #0b0f17;
  --muted: rgba(11, 15, 23, .66);
  --muted-2: rgba(11, 15, 23, .48);
  --shadow: 0 18px 70px rgba(11,15,23,.12);

  --accent: #b9892a;
  --accent-2: #d3b26b;
  --accent-soft: rgba(185,137,42,.16);

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --wrap: 1220px;
  --sidebar: 340px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(185,137,42,.12), rgba(185,137,42,0) 60%),
    radial-gradient(900px 520px at 85% 18%, rgba(11,15,23,.06), rgba(11,15,23,0) 62%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{color:inherit; text-decoration:none}
button{font:inherit}

.skip{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip:focus{
  left:16px;
  top:16px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background: #fff;
  border: 1px solid rgba(11,15,23,.14);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* 教程正文内按钮（不覆盖官网 header 的 .btn） */
.content .article .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.72);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(11,15,23,.10);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.content .article .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 44px rgba(11,15,23,.14);
  background: rgba(255,255,255,.86);
}
.content .article .btn:active{transform: translateY(0)}
.content .article .btn-primary{
  border-color: rgba(185,137,42,.36);
  background:
    radial-gradient(120% 160% at 20% 10%, rgba(255,255,255,.18), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(185,137,42,.96), rgba(211,178,107,.88));
  color: #ffffff;
  font-weight: 900;
}
.content .article .btn-ghost{
  background: rgba(255,255,255,.55);
}

/* 移动端：打开教程目录（侧栏隐藏时） */
.tutorial-toc-fab{
  display:none;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 55;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: 0 14px 40px rgba(11,15,23,.12);
  font-weight: 800;
  cursor: pointer;
}
.tutorial-toc-fab:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 46px rgba(11,15,23,.16);
}

.layout{
  display:grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: calc(100vh - 70px);
}

.sidebar{
  border-right: 1px solid rgba(11,15,23,.08);
  background:
    radial-gradient(900px 520px at 30% 5%, rgba(185,137,42,.10), rgba(185,137,42,0) 60%),
    linear-gradient(180deg, rgba(11,15,23,.02), rgba(11,15,23,0));
}
.sidebar-inner{
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  display:flex;
  flex-direction:column;
  padding: 14px 14px 16px;
  gap: 12px;
}

.sidebar-search{padding: 4px 2px}
.input{
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(11,15,23,.14);
  background: rgba(255,255,255,.86);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}
.input::placeholder{color: rgba(11,15,23,.44)}
.input:focus{
  border-color: rgba(185,137,42,.46);
  box-shadow: 0 0 0 4px rgba(185,137,42,.18);
}

.guide-nav{
  flex: 1;
  min-height: 0;
  overflow:auto;
  padding-right: 4px;
}
.guide-nav::-webkit-scrollbar{width:10px}
.guide-nav::-webkit-scrollbar-thumb{
  background: rgba(11,15,23,.10);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
.guide-nav--mobile{max-height: min(64vh, 560px)}

.group{
  border: 1px solid rgba(11,15,23,.10);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.76);
  overflow:hidden;
  margin-bottom: 12px;
}
.group summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px;
  font-weight: 950;
  letter-spacing: -.1px;
}
.group summary::-webkit-details-marker{display:none}
.group .chev{
  width: 26px;
  height: 26px;
  border-radius: 12px;
  border: 1px solid rgba(11,15,23,.10);
  background: rgba(11,15,23,.03);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .15s ease;
  color: var(--muted);
}
.group[open] summary .chev{transform: rotate(180deg)}

.item-list{
  display:flex;
  flex-direction:column;
  gap: 6px;
  padding: 10px 10px 12px;
  border-top: 1px solid rgba(11,15,23,.08);
}
.nav-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  color: rgba(11,15,23,.78);
  border: 1px solid transparent;
  background: rgba(11,15,23,.02);
}
.nav-link:hover{
  background: rgba(11,15,23,.04);
  border-color: rgba(11,15,23,.10);
  color: rgba(11,15,23,.92);
}
.nav-link.active{
  background: rgba(185,137,42,.12);
  border-color: rgba(185,137,42,.26);
  color: rgba(11,15,23,.96);
}
.nav-link .tag{
  font-size: 12px;
  color: rgba(11,15,23,.72);
  border: 1px solid rgba(11,15,23,.12);
  background: rgba(255,255,255,.62);
  padding: 4px 8px;
  border-radius: 999px;
}
.nav-link.active .tag{
  border-color: rgba(185,137,42,.30);
  color: rgba(11,15,23,.82);
}

.content{
  padding: 22px 0 44px;
}
.content-inner{
  width: min(860px, calc(100% - 44px));
  margin: 0 auto;
}
.breadcrumb{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
  color: var(--muted-2);
  font-size: 12px;
  margin: 6px 0 14px;
}
.breadcrumb .crumb{
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.breadcrumb .dot{
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(185,137,42,.8);
  box-shadow: 0 0 0 4px rgba(185,137,42,.14);
}

.article{
  border-radius: 22px;
  border: 1px solid rgba(11,15,23,.10);
  background:
    radial-gradient(900px 420px at 25% 0%, rgba(185,137,42,.10), rgba(185,137,42,0) 60%),
    rgba(255,255,255,.76);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.article-head{
  padding: 22px 22px 10px;
  border-bottom: 1px solid rgba(11,15,23,.08);
}
.article-title{
  margin:0;
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -.5px;
  line-height: 1.18;
  font-weight: 980;
}
.article-meta{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11,15,23,.12);
  background: rgba(11,15,23,.03);
}
.pill strong{color: rgba(11,15,23,.86); font-weight: 900}

.article-body{
  padding: 18px 22px 18px;
  color: rgba(11,15,23,.84);
  line-height: 1.9;
  font-size: 14px;
}
.article-body h2{
  margin: 18px 0 8px;
  font-size: 16px;
  letter-spacing: -.2px;
  font-weight: 950;
}
.article-body h3{
  margin: 14px 0 6px;
  font-size: 14px;
  letter-spacing: -.1px;
  font-weight: 950;
  color: rgba(11,15,23,.92);
}
.article-body p{margin: 10px 0}
.article-body ul{margin: 8px 0 12px; padding-left: 18px; color: rgba(11,15,23,.82)}
.article-body li{margin: 6px 0}
.article-body code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(11,15,23,.12);
  background: rgba(11,15,23,.06);
  color: rgba(11,15,23,.88);
}

.callout{
  border-radius: 18px;
  border: 1px solid rgba(11,15,23,.12);
  background: rgba(255,255,255,.72);
  padding: 12px 12px;
  margin: 12px 0;
}
.callout-title{
  font-weight: 950;
  display:flex;
  align-items:center;
  gap: 10px;
}
.callout-title .badge{
  width: 22px; height: 22px;
  border-radius: 10px;
  background: rgba(185,137,42,.16);
  border: 1px solid rgba(185,137,42,.24);
}
.callout-text{margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.75}

.steps{
  margin: 12px 0;
  display:grid;
  gap: 10px;
}
.step{
  border-radius: 18px;
  border: 1px solid rgba(11,15,23,.10);
  background: rgba(255,255,255,.72);
  padding: 12px 12px;
}
.step-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.step-title{
  margin:0;
  font-weight: 950;
  letter-spacing: -.2px;
  font-size: 14px;
}
.step-no{
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(185,137,42,.14);
  border: 1px solid rgba(185,137,42,.26);
  color: rgba(11,15,23,.92);
  font-weight: 950;
}
.step-body{margin-top: 6px; color: rgba(11,15,23,.78); font-size: 13px; line-height: 1.8}

.figure{
  margin: 12px 0;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(11,15,23,.10);
  background: rgba(11,15,23,.03);
}
.figure img{
  display:block;
  width:100%;
  height:auto;
}
.figcap{
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid rgba(11,15,23,.08);
}

.article-foot{
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(11,15,23,.08);
}
.nextprev{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
.fineprint{
  margin-top: 12px;
  color: rgba(11,15,23,.44);
  font-size: 12px;
}

.mobile-dialog{
  border: none;
  padding: 0;
  width: min(720px, calc(100% - 28px));
  border-radius: 22px;
  background: transparent;
  box-shadow: var(--shadow);
}
.mobile-dialog::backdrop{
  background: rgba(11,15,23,.26);
}
.mobile-sheet{
  border-radius: 22px;
  border: 1px solid rgba(11,15,23,.10);
  background: rgba(255,255,255,.96);
  overflow:hidden;
}
.mobile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(11,15,23,.08);
}
.mobile-title{font-weight: 950; letter-spacing: -.2px}
.mobile-body{padding: 12px 14px 14px}

@media (max-width: 980px){
  :root{ --sidebar: 320px; }
  .layout{grid-template-columns: 1fr}
  .sidebar{display:none}
  .content-inner{width: min(920px, calc(100% - 34px))}
  .tutorial-toc-fab{display:inline-flex}
}

@media (max-width: 520px){
  .content .article .btn{height: 36px; padding: 0 12px; font-size: 13px}
  .article-head{padding: 18px 16px 10px}
  .article-body{padding: 14px 16px 14px}
  .article-foot{padding: 12px 16px 16px}
}

@media (prefers-reduced-motion: reduce){
  .content .article .btn, .group .chev, .tutorial-toc-fab{transition:none}
  html:focus-within{scroll-behavior:auto}
}

