/* ============================================================
   Author Workshop · 作者工作坊（/insights/author-booking/）
   命名空间：ab-*，避免与 insights_base / base 全局样式冲突
   ============================================================ */

:root {
  --ab-purple: #4A3A6B;
  --ab-purple-d: #3B2E56;
  --ab-gold: #D4AF37;
  --ab-gold-l: #E9C55A;
  --ab-ink: #2B2B2B;
  --ab-ink2: #3A2D55;
  --ab-muted: #8A86A0;
  --ab-line: #E8E2F0;
  --ab-bg: #F5F7FA;
}

.ab-page {
  max-width: 1180px; margin: 0 auto; padding: 8px 0 48px;
  font-family: Inter, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ab-ink);
}

/* 双语文案（英文为主，中文为辅） */
.bi b { font-weight: 700; }
.bi i { font-style: normal; font-weight: 400; opacity: .68; margin-left: 6px; font-size: .92em; }

/* 面包屑：小屏收紧 */
.breadcrumb { font-size: 13px; color: #6F6A85; flex-wrap: wrap; }
.ab-page .breadcrumb { margin: 0 0 20px; }
@media (max-width: 568px) { .ab-page .breadcrumb a { display: inline-block; padding: 4px 2px; } }

/* ---------- ① 英雄栏 ---------- */
.ab-hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 40px 38px 34px;
  background-color: #3B2E56;
  background-image:
    linear-gradient(135deg, rgba(20,20,40,0.88) 0%, rgba(58,46,90,0.72) 55%, rgba(74,58,107,0.55) 100%),
    url('/static/img/insights/hero-academic-bg.jpg');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(212, 175, 55, .35);
  margin-bottom: 26px; color: #fff;
}
.ab-hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(233, 197, 90, .25) 0%, transparent 65%); pointer-events: none; }
.ab-hero::after { content: ""; position: absolute; width: 340px; height: 340px; left: -100px; bottom: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(139, 116, 168, .45) 0%, transparent 70%); pointer-events: none; }
.ab-hero-inner { position: relative; z-index: 2; max-width: 900px; }
body .site-shell .ab-hero-inner h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; line-height: 1.2; color: #fff !important; letter-spacing: .01em; overflow-wrap: break-word; }
.ab-hero-sub { display: block; margin: 0 0 14px; font-size: 16px; font-weight: 600; color: #F4D27A; letter-spacing: 2px; }
.ab-hero-desc { margin: 0; font-size: 14.5px; line-height: 1.8; color: rgba(255, 255, 255, .85) !important; max-width: 760px; }

/* 班型切换 Tab */
.ab-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ab-tab {
  display: inline-flex; align-items: baseline; gap: 6px; cursor: pointer; font-family: inherit;
  border: 1px solid rgba(212, 175, 55, .45); background: rgba(255, 255, 255, .08);
  color: #FFF !important; border-radius: 999px; padding: 10px 18px; font-size: 14px; transition: all .16s ease;
}
.ab-tab:hover { background: rgba(255, 255, 255, .16); }
.ab-tab.active { background: linear-gradient(135deg, var(--ab-gold-l), var(--ab-gold)); color: #3B2E56 !important; border-color: transparent; box-shadow: 0 8px 22px rgba(212, 175, 55, .35); }
@media (max-width: 640px) { .ab-hero { padding: 28px 20px 24px; } .ab-hero-inner h1 { font-size: 26px; } }

/* ---------- 通用区块标题 ---------- */
.ab-sec { margin-top: 30px; }
.ab-sec-t { font-size: 20px; font-weight: 800; color: var(--ab-ink) !important; margin: 0 0 6px; }
body .site-shell .ab-sec-t { color: var(--ab-ink) !important; }
.ab-sec-sub { font-size: 13px; color: var(--ab-muted); margin: 0 0 16px; }

/* ---------- ② 班型卡片 ---------- */
.ab-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .ab-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .ab-cards { grid-template-columns: 1fr; } }

.ab-card {
  position: relative; display: flex; flex-direction: column; gap: 13px;
  padding: 18px 18px 16px; background: #fff; cursor: pointer;
  border: 1px solid var(--ab-line); border-top: 4px solid var(--acc, var(--ab-purple));
  border-radius: 16px; box-shadow: 0 2px 10px rgba(74, 58, 107, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ab-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(74, 58, 107, .13); }
.ab-card.active { outline: 2px solid var(--acc, var(--ab-purple)); outline-offset: -1px; box-shadow: 0 14px 30px rgba(74, 58, 107, .12); }
.ab-card:focus-visible { outline: 2px dashed var(--ab-gold); outline-offset: 2px; }

.ab-card-head { display: flex; gap: 12px; align-items: center; }
.ab-card-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--acc-soft, #EFE9F8); border: 1px solid rgba(74, 58, 107, .1);
}
.ab-card-name { font-size: 17px; font-weight: 800; color: var(--ab-ink2); line-height: 1.15; }
.ab-card-zh { font-size: 12px; color: var(--ab-muted); margin-top: 2px; }

/* 状态彩色标签 */
.ab-chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.ab-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ab-chip.open      { background: #E8F1FD; color: #1D5FB8; } .ab-chip.open .dot      { background: #2E86DE; }
.ab-chip.waiting   { background: #FDF3DC; color: #9A6B00; } .ab-chip.waiting .dot   { background: #E0A11B; }
.ab-chip.confirmed { background: #E7F6EC; color: #1E7A41; } .ab-chip.confirmed .dot { background: #27AE60; }
.ab-chip.full      { background: #FDECEA; color: #B71C1C; } .ab-chip.full .dot      { background: #E2433A; }
.ab-chip .st-zh { font-size: 11px; font-weight: 500; opacity: .8; }

.ab-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-pill { font-size: 11.5px; font-weight: 700; color: #6F6A85; background: #F6F2FC; border: 1px solid #E6DCF3; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

.ab-progress { margin-top: 2px; }
.ab-progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ab-muted); margin-bottom: 5px; }
.ab-progress-meta b { color: var(--ab-ink2); }
.ab-bar { height: 7px; background: #F0EAF8; border-radius: 999px; overflow: hidden; }
.ab-bar i { display: block; height: 100%; border-radius: 999px; background: var(--acc, var(--ab-purple)); }

/* 报名按钮（卡片内 CTA） */
.ab-card-btn {
  margin-top: auto; border: 0; border-radius: 10px; padding: 11px 12px; min-height: 44px;
  font-size: 14px; font-weight: 800; letter-spacing: .3px;
  cursor: pointer; font-family: inherit; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--acc, var(--ab-purple)), var(--acc-d, var(--ab-purple-d)));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--acc, var(--ab-purple)) 32%, transparent);
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}
.ab-card-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 18px color-mix(in srgb, var(--acc, var(--ab-purple)) 42%, transparent); }
.ab-card-btn:active { transform: translateY(0); }

/* ---------- ③ 选中班型详情 + 咨询 ---------- */
.ab-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 26px; }
@media (max-width: 820px) { .ab-row { grid-template-columns: 1fr; } }
.ab-panel { background: #fff; border: 1px solid var(--ab-line); border-radius: 14px; padding: 22px; }
.ab-panel-t { font-size: 17px; font-weight: 800; color: var(--ab-ink2); margin: 0 0 14px; }
body .site-shell .ab-panel-t { color: var(--ab-ink2) !important; }
.ab-detail-status { font-size: 15px; }
.ab-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.ab-kv-item { background: #FAF9FC; border: 1px solid #EEE8F6; border-radius: 10px; padding: 10px 12px; }
.ab-kv-item label { display: block; font-size: 11.5px; color: var(--ab-muted); margin-bottom: 3px; }
.ab-kv-item .v { font-size: 14px; font-weight: 700; color: var(--ab-ink2); }

.ab-consult { text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.ab-consult .q-icon { font-size: 30px; }
.ab-consult p { margin: 0; font-size: 14px; color: #595959; line-height: 1.7; }
.ab-consult-email { color: var(--ab-purple); font-weight: 700; text-decoration: none; font-size: 15px; word-break: break-all; }
.ab-consult-email:hover { text-decoration: underline; }
.ab-consult-note { font-size: 12.5px; color: var(--ab-muted); border: 1px dashed #E7D9A8; background: #FFFDF4; border-radius: 10px; padding: 10px 14px; }

/* ---------- ④ 课程安排 ---------- */
.ab-course { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 4px; }
@media (max-width: 900px) { .ab-course { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .ab-course { grid-template-columns: 1fr; } }
.ab-course-item {
  background: linear-gradient(180deg, #FBFAFE, #FFFFFF); border: 1px solid #EEE8F6;
  border-radius: 14px; padding: 18px 18px 14px;
}
.ab-course-item .ic { font-size: 24px; line-height: 1; }
.ab-course-item .k { font-size: 12px; color: var(--ab-muted); font-weight: 700; letter-spacing: .4px; margin: 12px 0 4px; }
.ab-course-item .v { font-size: 16px; font-weight: 800; color: var(--ab-ink2); }
.ab-course-item .d { font-size: 12.5px; color: var(--ab-muted); line-height: 1.6; margin-top: 5px; }

/* ---------- ⑤ FAQ 折叠面板 ---------- */
.ab-faq { margin-top: 4px; border: 1px solid var(--ab-line); border-radius: 14px; overflow: hidden; background: #fff; }
.ab-faq-item { border-bottom: 1px solid #F0EDF5; }
.ab-faq-item:last-child { border-bottom: none; }
.ab-faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 15px 18px; background: none; border: 0; cursor: pointer; font-family: inherit;
  text-align: left; font-size: 14.5px; font-weight: 700; color: var(--ab-ink2); transition: background .15s ease;
}
.ab-faq-q:hover { background: #FAF7FE; }
.ab-faq-q .q { display: flex; align-items: baseline; gap: 8px; }
.ab-faq-q .q .n { color: var(--ab-gold); font-weight: 800; font-size: 13px; flex-shrink: 0; }
.ab-faq-q .q small { font-size: 12px; font-weight: 500; color: var(--ab-muted); margin-left: 8px; }
.ab-faq-arrow { color: var(--ab-gold); font-size: 12px; flex-shrink: 0; transition: transform .2s ease; }
.ab-faq-item.open .ab-faq-arrow { transform: rotate(180deg); }
.ab-faq-a { display: none; padding: 0 18px 16px; font-size: 13.5px; color: #6B6882; line-height: 1.75; }
.ab-faq-item.open .ab-faq-a { display: block; animation: abFadeIn .2s ease; }
@keyframes abFadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---------- ⑥ 班型对比表（小屏转卡片列表） ---------- */
.ab-compare-wrap { margin-top: 30px; background: #fff; border: 1px solid var(--ab-line); border-radius: 14px; overflow: hidden; }
.ab-compare-wrap > h2 { padding: 18px 20px 0; margin: 0 0 6px; }
.ab-table { width: 100%; border-collapse: collapse; }
.ab-table th { background: #F7F4FB; color: var(--ab-purple); font-size: 13px; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ab-line); white-space: nowrap; }
.ab-table td { padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid #F0EDF5; color: #333; vertical-align: top; }
.ab-table td strong { color: var(--ab-ink2); }
.ab-table tbody tr:hover { background: #FAF7FE; }
.ab-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
  .ab-compare-wrap { overflow: visible; }
  .ab-table, .ab-table tbody, .ab-table tr, .ab-table td { display: block; width: 100%; box-sizing: border-box; }
  .ab-table thead { display: none; }
  .ab-table tr { border-bottom: 1px solid #F0EDF5; padding: 14px; }
  .ab-table tr:last-child { border-bottom: none; }
  .ab-table td { position: relative; padding: 7px 0 7px 46%; border: none; white-space: normal; }
  .ab-table td::before {
    content: attr(data-label); position: absolute; left: 0; top: 7px;
    font-weight: 700; color: var(--ab-muted); font-size: 12.5px;
  }
  .ab-table td:first-child { padding: 0 0 8px; }
  .ab-table td:first-child::before { display: none; }
  .ab-table td:first-child strong { font-size: 15px; }
}

/* ---------- ⑦ 温馨提示 ---------- */
.ab-note { margin-top: 20px; padding: 14px 18px; border-radius: 12px; background: #FFFDF4; border: 1px dashed #E7D9A8; font-size: 13.5px; color: #7A6310; line-height: 1.7; }
.ab-note b { color: #5C4A0E; }

/* ---------- ⑧ 报名意向弹窗 ---------- */
.ab-overlay {
  position: fixed; inset: 0; background: rgba(24, 16, 42, .55); backdrop-filter: blur(2px);
  z-index: 9990; display: none; align-items: center; justify-content: center; padding: 20px;
}
.ab-overlay.open { display: flex; }
.ab-modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 460px; max-height: 92vh;
  overflow: auto; padding: 26px 26px 22px; box-shadow: 0 24px 70px rgba(24, 16, 42, .4);
  animation: abPop .22s ease;
}
@keyframes abPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ab-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.ab-modal-head h3 { margin: 0; font-size: 19px; color: var(--ab-ink2); }
.ab-modal-head .sub { font-size: 12.5px; color: var(--ab-muted); margin-top: 4px; }
.ab-modal-close { border: 0; background: #F4F0FA; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; cursor: pointer; color: #6F6A85; flex-shrink: 0; transition: background .15s ease; }
.ab-modal-close:hover { background: #EAE2F6; }

.ab-f { display: grid; gap: 14px; }
.ab-f label { display: block; font-size: 13px; font-weight: 700; color: var(--ab-ink2); margin-bottom: 6px; }
.ab-f label .req { color: #E2433A; }
.ab-f input, .ab-f textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #E0D9EB; border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--ab-ink2); background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ab-f input:focus, .ab-f textarea:focus { outline: none; border-color: var(--ab-purple); box-shadow: 0 0 0 3px rgba(74, 58, 107, .12); }
.ab-f textarea { min-height: 80px; resize: vertical; }
.ab-f-msg { display: none; font-size: 13px; padding: 10px 12px; border-radius: 8px; line-height: 1.5; }
.ab-f-msg.err { display: block; background: #FDECEA; color: #B71C1C; }
.ab-f-msg.ok { display: block; background: #E7F6EC; color: #1E7A41; }
.ab-f-submit {
  border: 0; border-radius: 30px; padding: 13px 20px; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 800; letter-spacing: .5px; color: #3B2E56;
  background: linear-gradient(135deg, var(--ab-gold-l), var(--ab-gold));
  box-shadow: 0 6px 18px rgba(212, 175, 55, .35); transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.ab-f-submit:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 10px 24px rgba(212, 175, 55, .45); }
.ab-f-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.ab-f-alt { margin: 0; font-size: 12.5px; color: var(--ab-muted); text-align: center; }
.ab-f-alt a { color: var(--ab-purple); font-weight: 700; text-decoration: none; }
.ab-f-alt a:hover { text-decoration: underline; }

/* 关闭动画 */
.ab-overlay.closing { animation: abFadeOut .18s ease forwards; }
@keyframes abFadeOut { to { opacity: 0; } }