/* AI 入门整合布局草稿
   上方控制“必备设备”，下方控制四段式学习目录与教程列表。 */

@media (min-width: 901px) {
  .essentials-inner {
    grid-template-columns: 260px minmax(0, 820px);
    align-items: start;
    justify-content: center;
    gap: 56px;
    width: min(1136px, 100%);
  }

  .essentials-heading {
    padding-top: 31px;
  }

  .essentials-heading h1 {
    display: block;
    font-size: clamp(36px, 4vw, 54px);
  }
}

@media (min-width: 1400px) {
  .essentials-inner { transform: translateX(-90px); }
}

/* 下方学习中心：同一页面内按顺序组织安装、教程、进阶与问题。 */
.content-nav {
  display: grid;
  gap: 6px;
}

.content-nav a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #596575;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.content-nav a:hover {
  color: #4f46e5;
  background: #eef0ff;
  transform: translateX(2px);
}

.content-nav a span {
  color: #756af0;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.content-nav a strong {
  font-size: 14px;
  font-weight: 680;
}

.content-nav a small {
  min-width: 26px;
  padding: 2px 7px;
  border: 1px solid #dfe4eb;
  border-radius: 999px;
  color: #8792a2;
  background: #fff;
  text-align: center;
  font-size: 11px;
}

.main-content > .search-panel { margin-top: 0; }

.content-section-anchor {
  scroll-margin-top: calc(var(--header-height) + 100px);
}

.priority-install { margin-top: 40px; }

.resource-section {
  margin-top: 58px;
}

.resource-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 19px;
  border-bottom: 1px solid #dfe4ec;
}

.resource-heading > div { min-width: 0; }

.resource-heading p {
  margin: 0 0 8px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.resource-heading h2 {
  margin: 0;
  color: #17202a;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

.resource-heading span {
  display: block;
  margin-top: 9px;
  color: #7d8898;
  font-size: 13px;
  line-height: 1.6;
}

.resource-heading > strong {
  flex: 0 0 auto;
  padding-bottom: 3px;
  color: #8b95a4;
  font-size: 13px;
}

.resource-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 22px;
  min-height: 94px;
  padding: 18px 12px;
  border-bottom: 1px solid #e5e9ef;
  color: #17202a;
  text-decoration: none;
  transition: padding .16s ease, background .16s ease;
}

.resource-list a:hover {
  padding-right: 7px;
  padding-left: 17px;
  background: #f8faff;
}

.resource-number {
  color: #6e63eb;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.resource-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.resource-copy strong {
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -.012em;
}

.resource-copy small {
  overflow: hidden;
  color: #697586;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: #8a95a5;
  font-size: 11px;
  font-weight: 700;
}

.resource-meta b {
  color: #a1aab7;
  font-size: 20px;
  font-weight: 500;
  transition: color .16s ease, transform .16s ease;
}

.resource-list a:hover .resource-copy strong,
.resource-list a:hover .resource-meta b { color: #4f46e5; }

.resource-list a:hover .resource-meta b { transform: translateX(2px); }

.resource-section-advanced .resource-heading p { color: #0b9a83; }
.resource-section-advanced .resource-number { color: #0b9a83; }

.question-section {
  margin-top: 64px;
  padding-top: 0;
}

.question-section .result-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid #dfe4ec;
  margin-bottom: 0;
}

.question-section .question-list { border-top: 0; }

/* 工作台式教程目录：专项模块与入门课程并排展示。 */
@media (min-width: 901px) {
  .site-shell { width: min(1640px, 100%); }
  .main-content {
    width: min(100%, 1370px);
    padding-right: 56px;
    padding-left: 56px;
  }
}

.learning-workbench {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  align-items: start;
  gap: 20px;
  margin-top: 52px;
}

.learning-workbench > .question-section,
.learning-workbench > .resource-section {
  min-width: 0;
  margin-top: 0;
  padding: 24px;
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 38px rgba(31, 42, 68, .055);
}

.learning-workbench .result-heading,
.learning-workbench .resource-heading {
  align-items: flex-end;
  min-height: 76px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.learning-workbench .result-heading > div,
.learning-workbench .resource-heading > div { min-width: 0; }

.learning-workbench .result-kicker,
.learning-workbench .resource-heading p {
  margin-bottom: 7px;
  color: #5c50ef;
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}

.learning-workbench .result-heading h2,
.learning-workbench .resource-heading h2 {
  color: #17202a;
  font-size: 24px;
  letter-spacing: -.035em;
}

.learning-workbench .panel-description,
.learning-workbench .resource-heading span {
  display: block;
  margin-top: 7px;
  color: #8a95a5;
  font-size: 11px;
  line-height: 1.5;
}

.learning-workbench .result-count,
.learning-workbench .resource-heading > strong {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: #9aa4b3;
  font-size: 11px;
}

.learning-workbench .question-list,
.learning-workbench .resource-list {
  max-height: 850px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-color: #d8deea transparent;
  scrollbar-width: thin;
}

.module-group,
.learning-workbench .resource-list > a {
  border: 1px solid #dfe5ef;
  border-radius: 11px;
  background: #fbfcfe;
}

.module-group + .module-group,
.learning-workbench .resource-list > a + a { margin-top: 9px; }

.module-group[hidden] { display: none; }

.module-group-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 14px;
}

.module-group-number,
.module-article-number {
  color: #655af0;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.module-group-head strong {
  overflow: hidden;
  color: #1b2430;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-group-head small {
  min-width: 27px;
  padding: 3px 7px;
  border: 1px solid #dfe4ec;
  border-radius: 999px;
  color: #8792a2;
  background: #fff;
  text-align: center;
  font-size: 10px;
}

.module-articles { border-top: 1px solid #e6eaf0; }

.module-group .question-row {
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
}

.module-group .question-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 10px 10px;
}

.module-group .question-row:hover {
  padding-right: 10px;
  padding-left: 18px;
  background: #f7f8ff;
}

.module-group .question-copy { gap: 4px; }
.module-group .question-copy strong { font-size: 13px; line-height: 1.4; }
.module-group .question-copy small {
  color: #7d8999;
  font-size: 10px;
  white-space: nowrap;
}
.module-group .question-arrow { font-size: 17px; }

.learning-workbench .resource-list > a {
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid #dfe5ef;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.learning-workbench .resource-list > a:hover {
  padding: 12px 14px;
  border-color: #bfc6ff;
  background: #f8f8ff;
  transform: translateY(-1px);
}

.learning-workbench .resource-copy { gap: 4px; }
.learning-workbench .resource-copy strong { font-size: 13px; line-height: 1.4; }
.learning-workbench .resource-copy small { font-size: 10px; }
.learning-workbench .resource-meta {
  overflow: hidden;
  width: 28px;
  color: transparent;
  gap: 0;
}
.learning-workbench .resource-meta b { color: #a1aab7; font-size: 18px; }
.learning-workbench .pagination { display: none; }

@media (max-width: 1180px) {
  .learning-workbench { grid-template-columns: 1fr; }
  .learning-workbench > #usage-guides { order: 1; }
  .learning-workbench > #questions { order: 2; }
  .learning-workbench .question-list,
  .learning-workbench .resource-list { max-height: none; overflow: visible; padding-right: 0; }
}

@media (max-width: 900px) {
  .content-nav {
    display: flex;
    width: max-content;
    gap: 7px;
  }

  .content-nav a {
    grid-template-columns: 22px auto auto;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #e2e6ed;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .learning-workbench { gap: 16px; margin-top: 38px; }
  .learning-workbench > .question-section,
  .learning-workbench > .resource-section { padding: 17px; border-radius: 13px; }
  .learning-workbench .result-heading,
  .learning-workbench .resource-heading { display: block; min-height: 0; }
  .learning-workbench .result-count,
  .learning-workbench .resource-heading > strong { display: none; }
  .module-group-head { min-height: 54px; padding: 11px 12px; }
  .module-group .question-row { min-height: 62px; padding: 10px 10px 10px 13px; }
  .module-group .question-row:hover { padding-right: 8px; padding-left: 15px; }

  .resource-section { margin-top: 46px; }
  .resource-heading { align-items: start; }
  .resource-heading h2 { font-size: 24px; }
  .resource-heading > strong { display: none; }

  .resource-list a {
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    gap: 12px;
    padding: 16px 6px;
  }

  .resource-list a:hover {
    padding-right: 3px;
    padding-left: 9px;
  }

  .resource-copy small { white-space: normal; }
  .resource-meta { overflow: hidden; width: 24px; color: transparent; gap: 0; }
  .resource-meta b { color: #a1aab7; }
}

/* 教程目录按工作台的开放式画布展开：取消外层卡片和内部滚动，
   让分类与课程列表在页面中自然延伸，移动端也不再被固定高度截断。 */
.learning-workbench > .question-section,
.learning-workbench > .resource-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.learning-workbench .question-list,
.learning-workbench .resource-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

@media (max-width: 620px) {
  .learning-workbench > .question-section,
  .learning-workbench > .resource-section {
    padding: 0;
  }

  /* The base homepage mobile rule places .question-copy in grid column 1.
     Module rows add a dedicated number column, so reset the copy and arrow
     placement here; otherwise each title is squeezed into the 34px number
     column and Chinese text wraps one character per line. */
  .module-group .module-article-number { grid-column: 1; grid-row: 1; }
  .module-group .question-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .module-group .question-arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

/* 首页不再使用左侧目录栏；内容画布居中并占据完整宽度。 */
.site-shell {
  display: block;
  width: 100%;
  min-height: 0;
  background: linear-gradient(115deg, rgba(238, 240, 255, .55), #fff 34%);
}

.site-shell > .sidebar { display: none; }

.site-shell > .main-content {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding-right: 40px;
  padding-left: 40px;
}

@media (min-width: 1400px) {
  .essentials-inner { transform: none; }
}

@media (max-width: 900px) {
  .site-shell > .main-content {
    width: 100%;
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 620px) {
  .site-shell > .main-content {
    padding-right: 18px;
    padding-left: 18px;
  }
}
