/* =====================================================================
   智学研途 · 院校选择 → AI 智能择校（模块内的第一个标签页）

   两件事：
   1) 样式全部限定在 #page-schools 内，且**只加 .sch-* / .clgp-***
      —— --zx-* 变量与 .zx-* 组件由 schools.css 提供，这里不重复定义，
      否则同一个页头两处定义，改一处忘一处就错位。
   2) 结果区直接套 live.css 的 .clg-* 卡片样式——两个入口必须长得一样，
      否则学生在不同页面看到的同一所学校像两份数据。
   ===================================================================== */

#page-schools * { box-sizing: border-box; }
#page-schools [hidden] { display: none !important; }

/* ---------- 标签页 ---------- */

.sch-tabs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 2px 0 14px; padding: 4px;
  background: var(--zx-surface, #fff);
  border: 1px solid var(--zx-border, #e3e6ef);
  border-radius: 10px;
}

.sch-tab {
  appearance: none; border: 1px solid transparent; background: transparent;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--zx-text-2, #545b6e); font-family: inherit;
  transition: background .16s, color .16s, border-color .16s;
}

.sch-tab:hover { background: var(--zx-surface-2, #f1f3f9); color: var(--zx-text, #1b1f2b); }

.sch-tab.is-on {
  background: var(--zx-accent-weak, #eef0fe);
  border-color: var(--zx-border-strong, #cfd4e3);
  color: var(--zx-accent, #4f46e5); font-weight: 600;
}

.sch-tab-note {
  font-size: 12px; color: var(--zx-text-3, #858ca0);
  margin-left: 4px; padding-left: 10px;
  border-left: 1px solid var(--zx-border, #e3e6ef);
}

.sch-tabs .zx-stats { margin-left: auto; }

/* ---------- 表单：结构化筛选条件 ---------- */

.clgp-fields {
  display: grid; gap: 10px; margin-bottom: 12px;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
}

.clgp-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.clgp-f > span { font-size: 11.5px; color: var(--zx-text-3, #858ca0); }

.clgp-f select,
.clgp-f input {
  width: 100%; padding: 8px 10px; font-family: inherit; font-size: 13px;
  color: var(--zx-text, #1b1f2b); background: var(--zx-surface, #fff);
  border: 1px solid var(--zx-border, #e3e6ef); border-radius: 8px;
}

.clgp-f select:focus,
.clgp-f input:focus {
  outline: none; border-color: var(--zx-accent, #4f46e5);
  box-shadow: 0 0 0 3px var(--zx-accent-weak, #eef0fe);
}

/* ---------- 408 四科掌握度 ---------- */

.clgp-mastery {
  margin-bottom: 12px; padding: 12px 14px;
  background: var(--zx-surface-2, #f1f3f9);
  border: 1px solid var(--zx-border, #e3e6ef); border-radius: 10px;
}

.clgp-m-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}

.clgp-m-head span { font-size: 12.5px; font-weight: 600; color: var(--zx-text, #1b1f2b); }
.clgp-m-head em { font-size: 11.5px; color: var(--zx-text-3, #858ca0); font-style: normal; }

.clgp-m-rows { display: grid; gap: 6px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.clgp-m-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.clgp-m-name { flex: 0 0 62px; font-size: 12px; color: var(--zx-text-2, #545b6e); }

.clgp-m-row input[type="range"] {
  flex: 1 1 auto; min-width: 0; height: 4px; accent-color: var(--zx-accent, #4f46e5);
}

.clgp-m-val {
  flex: 0 0 40px; text-align: right; font-size: 12px;
  color: var(--zx-text-3, #858ca0); font-variant-numeric: tabular-nums;
}

.clgp-m-val.is-set { color: var(--zx-accent, #4f46e5); }

@media (max-width: 720px) {
  .clgp-fields { grid-template-columns: 1fr; }
  .clgp-m-rows { grid-template-columns: 1fr; }
  .sch-tab-note { display: none; }
  .sch-tabs .zx-stats { width: 100%; margin-left: 0; }
}

.clgp-hero {
  background: var(--zx-surface);
  border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius);
  box-shadow: var(--zx-shadow);
  padding: 16px 20px 14px;
}
.clgp-lead { margin: 0 0 10px; font-size: 12.5px; color: var(--zx-text-2); line-height: 1.7; }
.clgp-form { margin: 0; }
.clgp-form textarea {
  width: 100%; min-height: 58px; resize: vertical;
  padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--zx-border-strong);
  background: var(--zx-surface);
  font-family: inherit; font-size: 13.5px; line-height: 1.7; color: var(--zx-text);
  outline: none;
}
.clgp-form textarea::placeholder { color: #9aa1b3; }
.clgp-form textarea:focus { border-color: var(--zx-accent); box-shadow: 0 0 0 3px var(--zx-accent-weak); }

.clgp-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.clgp-examples { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.clgp-ex {
  border: 1px solid var(--zx-border); background: var(--zx-surface-2);
  color: var(--zx-text-2); font-family: inherit; font-size: 11.5px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.clgp-ex:hover { border-color: var(--zx-accent); color: var(--zx-accent); background: var(--zx-accent-weak); }

.clgp-submit {
  flex: 0 0 auto; height: 36px; padding: 0 20px; border-radius: 9px;
  border: 1px solid transparent; background: var(--zx-accent); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.clgp-submit:hover { background: #4338ca; }
.clgp-submit:disabled { background: #a5a8e8; cursor: default; }

.clgp-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--zx-text-3); line-height: 1.7; }

/* ---------- 结果区 ---------- */

.clgp-result { margin-top: 16px; }
.clgp-empty {
  margin: 0; padding: 26px 20px; text-align: center;
  font-size: 12.5px; color: var(--zx-text-3); line-height: 1.8;
  background: var(--zx-surface); border: 1px dashed var(--zx-border-strong);
  border-radius: var(--zx-radius);
}

/* 结果区里的一句话总结：AI 讲的原文，卡片之上 */
.clgp-say {
  margin: 0 0 12px; padding: 12px 14px;
  background: var(--zx-surface); border: 1px solid var(--zx-border);
  border-left: 3px solid var(--zx-accent);
  border-radius: 10px; box-shadow: var(--zx-shadow);
  font-size: 13px; line-height: 1.85; color: var(--zx-text);
  white-space: pre-wrap;
}
.clgp-say .clgp-say-tag {
  display: inline-block; margin-right: 6px; padding: 1px 7px;
  border-radius: 5px; background: var(--zx-accent-weak); color: var(--zx-accent);
  font-size: 10.5px; font-weight: 600; vertical-align: 1px;
}

/* 卡片用 live.css 的 .clg-*，这里只补它在白底面板里的外框 */
.clgp-card {
  background: var(--zx-surface); border: 1px solid var(--zx-border);
  border-radius: var(--zx-radius); box-shadow: var(--zx-shadow);
  padding: 14px 16px 16px;
}

.clgp-err {
  margin: 0; padding: 14px 16px; border-radius: 10px;
  background: #fdecea; border: 1px solid #f5c6c0; color: #b42318;
  font-size: 12.5px; line-height: 1.7;
}

/* 口径面板 */
.clgp-note-body { display: grid; gap: 6px; }
.clgp-note-line { margin: 0; font-size: 12px; color: var(--zx-text-2); line-height: 1.75; }
.clgp-note-line b { color: var(--zx-text); font-weight: 600; margin-right: 6px; }
.clgp-note-warn {
  margin: 4px 0 0; padding: 7px 10px; border-radius: 7px;
  background: #fdf2e0; border: 1px solid #f0dcb0; color: #9a5b00;
  font-size: 11.5px; line-height: 1.75;
}
.clgp-note-sec { margin: 10px 0 0; font-size: 11.5px; color: var(--zx-text-3); }

/* 窄屏：卡片的 27px 缩进已经在 live.css 里收掉，这里只管本页容器 */
@media (max-width: 620px) {
  .clgp-hero { padding: 14px 14px 12px; }
  .clgp-row { flex-direction: column; align-items: stretch; }
  .clgp-submit { width: 100%; }
}
