/* ==========================================================
   页面级样式：课程详情 / 知识库 / 工作台 / 个人中心
   ========================================================== */

/* ---------- 页面头部 ---------- */
.page-head { padding: 20px 0 44px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.6px; margin-bottom: 12px; }
.page-head p { font-size: 15px; color: var(--ink-3); max-width: 620px; line-height: 1.8; }
.page-head-flex { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }

/* ---------- 课程详情 ---------- */
.detail-top {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 52px;
  padding: 44px 0 60px;
}
.detail-cover {
  border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 16 / 10; border: 1px solid var(--line);
  background: var(--bg-soft); position: relative;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 28px; line-height: 1.42; font-weight: 600; letter-spacing: -.6px; margin-bottom: 16px; }
.detail-info .lead { font-size: 14.5px; line-height: 1.85; color: var(--ink-3); margin-bottom: 24px; }
.detail-price-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.detail-price-row .price { font-size: 34px; }
.detail-price-row .orig { font-size: 15px; color: var(--ink-4); text-decoration: line-through; font-family: var(--font-num); }
.detail-price-row .off { font-size: 12.5px; }
.gain-list { margin-bottom: 28px; }
.gain-list h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--ink); }
.gain-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--ink-2); padding: 7px 0; line-height: 1.65;
}
.gain-list li svg { flex-shrink: 0; margin-top: 4px; color: var(--success); }

/* 试听区 */
.trial-box {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: #fff; margin-bottom: 48px;
}
.trial-head {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: space-between;
}
.trial-head span.tag { font-weight: 500; }
.video-shell {
  aspect-ratio: 16 / 9; background: #12151a; margin: 24px 24px 0;
  border-radius: var(--r-md); position: relative; overflow: hidden;
  display: grid; place-items: center; cursor: pointer;
}
.video-shell .play {
  width: 66px; height: 66px; border-radius: 50%;
  background: rgba(255,255,255,.94); display: grid; place-items: center;
  transition: transform .2s ease; box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.video-shell:hover .play { transform: scale(1.07); }
.video-shell .vlabel {
  position: absolute; bottom: 16px; left: 18px;
  color: rgba(255,255,255,.82); font-size: 13px;
}
.video-shell .vtime {
  position: absolute; bottom: 16px; right: 18px;
  color: rgba(255,255,255,.6); font-size: 12.5px; font-family: var(--font-num);
}
.trial-foot { padding: 22px 24px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.trial-foot .tip { font-size: 13.5px; color: var(--ink-3); }

/* 章节折叠 */
.syllabus { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 48px; }
.syllabus-head {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.syllabus-head .meta { font-size: 13px; color: var(--ink-4); font-weight: 400; }
.chapter { border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter-row {
  display: flex; align-items: center; gap: 14px;
  padding: 17px 24px; cursor: pointer; transition: background .15s;
  user-select: none;
}
.chapter-row:hover { background: var(--bg-soft); }
.chapter-row .idx {
  font-family: var(--font-num); font-size: 12.5px; color: var(--ink-4); width: 22px; flex-shrink: 0;
}
.chapter-row .name { flex: 1; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.chapter-row .cnt { font-size: 12.5px; color: var(--ink-4); }
.chapter-row .chev { color: var(--ink-4); transition: transform .2s ease; display: grid; place-items: center; }
.chapter.open .chapter-row .chev { transform: rotate(180deg); }
.chapter-lessons { display: none; background: var(--bg-soft); padding: 6px 0; }
.chapter.open .chapter-lessons { display: block; }
.lesson {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px 11px 60px; font-size: 13.8px; color: var(--ink-3);
}
.lesson .lock-ico { color: var(--ink-4); flex-shrink: 0; }
.lesson .dur { margin-left: auto; font-family: var(--font-num); font-size: 12px; color: var(--ink-4); }
.syllabus-hint {
  padding: 14px 24px; background: var(--bg-warm);
  font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line);
}

/* 权限对比 */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 48px; }
.perm-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px;
  background: #fff;
}
.perm-card.pro { border-color: var(--brand-line); background: var(--brand-soft); }
.perm-card h4 {
  font-size: 15px; font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.perm-card ul li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.8px; padding: 8px 0; line-height: 1.65; color: var(--ink-2);
}
.perm-card ul li svg { flex-shrink: 0; margin-top: 3px; }

/* 底部购买条 */
.buy-bar {
  position: sticky; bottom: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.buy-bar-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.buy-bar .info { display: flex; align-items: baseline; gap: 10px; }
.buy-bar .info .price { font-size: 26px; }
.buy-bar .info .txt { font-size: 13px; color: var(--ink-3); }

/* ---------- 知识库 ---------- */
.kb-search {
  position: relative; max-width: 560px; margin-bottom: 28px;
}
.kb-search input {
  width: 100%; height: 50px; padding: 0 18px 0 48px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: 14.5px; background: #fff; transition: all .16s ease;
}
.kb-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,58,95,.08); }
.kb-search .ico {
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.kb-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  background: #fff; transition: all .2s ease; cursor: pointer;
  display: flex; flex-direction: column;
}
.kb-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kb-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kb-card h3 { font-size: 15.5px; font-weight: 600; line-height: 1.55; margin-bottom: 10px; letter-spacing: -.1px; }
.kb-card p {
  font-size: 13.3px; line-height: 1.75; color: var(--ink-3); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 16px;
}
.kb-card .more { font-size: 13px; color: var(--brand); font-weight: 500; display: flex; align-items: center; gap: 5px; }

/* 知识库详情 */
.article { max-width: 780px; padding: 12px 0 80px; }
.article h1 { font-size: 30px; font-weight: 600; line-height: 1.4; letter-spacing: -.6px; margin-bottom: 18px; }
.article .meta {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px;
  font-size: 13px; color: var(--ink-4);
}
.article-body { font-size: 15.5px; line-height: 2; color: var(--ink-2); }
.article-body h2 {
  font-size: 20px; font-weight: 600; color: var(--ink);
  margin: 40px 0 16px; letter-spacing: -.3px; padding-left: 14px;
  border-left: 3px solid var(--brand); line-height: 1.4;
}
.article-body h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 28px 0 12px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body ul li { list-style: disc; margin-bottom: 9px; }
.article-body ol li { list-style: decimal; margin-bottom: 9px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body table { margin: 22px 0 26px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.article-body th {
  background: var(--bg-soft); font-size: 13.5px; font-weight: 600; color: var(--ink);
  padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line);
}
.article-body td {
  padding: 12px 16px; font-size: 13.8px; border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.article-body tr:last-child td { border-bottom: 0; }
.article-body tbody tr:hover { background: var(--bg-soft); }
.article-body .callout {
  padding: 18px 20px; background: var(--accent-soft);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px; line-height: 1.85; color: var(--ink-2); margin: 20px 0;
}
.locked-box {
  padding: 44px 32px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--bg-soft); margin: 32px 0;
}
.locked-box .ico { font-size: 34px; margin-bottom: 16px; opacity: .55; }
.locked-box h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 10px; }
.locked-box p { font-size: 13.8px; color: var(--ink-3); margin-bottom: 22px; line-height: 1.8; }
.related-list { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.related-list h4 { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.related-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
  transition: color .15s;
}
.related-item:hover { color: var(--brand); }
.related-item .n { font-family: var(--font-num); font-size: 12px; color: var(--ink-4); }
.related-item .arr { margin-left: auto; color: var(--ink-4); }

/* ---------- 工作台 ---------- */
.workbench-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-bottom: 28px; flex-wrap: wrap;
}
.workbench-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.workbench-head .sub { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 80px; }
.project-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: #fff; transition: all .2s ease;
}
.project-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.project-thumb {
  aspect-ratio: 16 / 10; background: var(--bg-soft); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb .ph { color: var(--ink-4); font-size: 13px; text-align: center; }
.project-body { padding: 18px 20px 20px; }
.project-body h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.1px; }
.project-body .meta { font-size: 12.5px; color: var(--ink-4); display: flex; gap: 12px; flex-wrap: wrap; }
.project-body .acts { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.project-body .acts .btn { flex: 1; }
.new-project-card {
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  display: grid; place-items: center; min-height: 260px; cursor: pointer;
  transition: all .2s ease; color: var(--ink-3); background: transparent;
}
.new-project-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.new-project-card .ico { font-size: 28px; margin-bottom: 10px; }
.new-project-card span { font-size: 14px; }

/* ---------- 个人中心 ---------- */
.pc-layout { display: grid; grid-template-columns: 200px 1fr; gap: 44px; padding: 12px 0 80px; }
.pc-menu { display: flex; flex-direction: column; gap: 2px; }
.pc-menu button {
  text-align: left; padding: 11px 16px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-2); transition: all .16s;
}
.pc-menu button:hover { background: var(--bg-soft); }
.pc-menu button.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.pc-panel h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; letter-spacing: -.3px; }
.pc-panel .form-narrow { max-width: 420px; }
.card-box {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; background: #fff; margin-bottom: 16px;
}

/* ---------- 表格 ---------- */
.data-table { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.data-table th {
  background: var(--bg-soft); font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td {
  padding: 13px 16px; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--bg-soft); }
.data-table .num { font-family: var(--font-num); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .detail-top { grid-template-columns: 1fr; gap: 32px; }
  .kb-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .perm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .page-head h1 { font-size: 23px; }
  .detail-info h1 { font-size: 22px; }
  .detail-price-row .price { font-size: 28px; }
  .kb-grid, .project-grid { grid-template-columns: 1fr; }
  .pc-layout { grid-template-columns: 1fr; gap: 24px; }
  .pc-menu { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .pc-menu button { white-space: nowrap; }
  .buy-bar-inner { padding: 0 20px; }
  .buy-bar .info .txt { display: none; }
  .article h1 { font-size: 23px; }
  .article-body { font-size: 15px; }
  .article-body table { font-size: 13px; display: block; overflow-x: auto; }
  .trial-foot { flex-direction: column; align-items: stretch; }
  .video-shell { margin: 16px 16px 0; }
}
