/* english-compare · 机构对比诊断看板 */
/* 主题系统：与父CSS（/css/style.css）保持对齐 */
:root {
  --card: #ffffff;
  --text: #1a1a1a;
  --text2: #666;
  --accent: #2b2b2b;
  --border: #ddd;
  --green: #2e7d32;
  --red: #c62828;
  --amber: #e65100;
  --blue: #1565c0;
  --radius: 12px;
  --bg: #f5f5f0;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --card: #ffffff;
    --text: #1a1a1a;
    --text2: #666;
    --accent: #2b2b2b;
    --border: #ddd;
    --green: #2e7d32;
    --red: #c62828;
    --amber: #e65100;
    --blue: #1565c0;
    --bg: #f5f5f0;
  }
}
:root.light {
  --card: #ffffff;
  --text: #1a1a1a;
  --text2: #666;
  --accent: #2b2b2b;
  --border: #ddd;
  --green: #2e7d32;
  --red: #c62828;
  --amber: #e65100;
  --blue: #1565c0;
  --bg: #f5f5f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card: #1c1c20;
    --text: #e4e4e7;
    --text2: #8a8a8e;
    --accent: #e4e4e7;
    --border: #2a2a2e;
    --green: #4caf50;
    --red: #ef5350;
    --amber: #ff9800;
    --blue: #42a5f5;
    --bg: #121214;
  }
}
:root.dark {
  --card: #1c1c20;
  --text: #e4e4e7;
  --text2: #8a8a8e;
  --accent: #e4e4e7;
  --border: #2a2a2e;
  --green: #4caf50;
  --red: #ef5350;
  --amber: #ff9800;
  --blue: #42a5f5;
  --bg: #121214;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}
.container { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }

/* header */
.header { margin-bottom: 28px; }
.header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; display:flex;align-items:center;gap:12px; }
.header .meta { color: var(--text2); font-size: 13px; }
.header .tag { display: inline-block; background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.header .tag.ready { background: var(--amber); }

/* section */
.section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.section h2 {
  font-size: 18px; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--accent); display: flex; align-items: center; gap: 8px;
}
.section h2 .badge {
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px;
  background: var(--border); color: var(--text2);
}
.section h2 .badge.done { background: var(--green); color: #fff; }
.section h2 .badge.waiting { background: var(--amber); color: #fff; }

/* grade */
.grade {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.5px;
}
.grade-a { background: #e8f5e9; color: var(--green); }
.grade-bp { background: #e3f2fd; color: var(--blue); }
.grade-b { background: #fff3e0; color: var(--amber); }
.grade-c { background: #fce4ec; color: var(--red); }
.grade-d { background: #ffebee; color: var(--red); }
@media (prefers-color-scheme: dark) {
  .grade-a { background: #1b3a1b; }
  .grade-bp { background: #1a2a4a; }
  .grade-b { background: #3a2a0a; }
  .grade-c, .grade-d { background: #3a1a1a; }
}
:root.light .grade-a { background: #e8f5e9; }
:root.light .grade-bp { background: #e3f2fd; }
:root.light .grade-b { background: #fff3e0; }
:root.light .grade-c, :root.light .grade-d { background: #fce4ec; }
:root.dark .grade-a { background: #1b3a1b; }
:root.dark .grade-bp { background: #1a2a4a; }
:root.dark .grade-b { background: #3a2a0a; }
:root.dark .grade-c, :root.dark .grade-d { background: #3a1a1a; }

/* eval grid */
.eval-grid { display: flex; flex-direction: column; gap: 4px; }
.eval-row {
  display: grid; grid-template-columns: minmax(78px, 110px) minmax(0, 1fr); gap: 12px;
  align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.eval-row:last-child { border-bottom: none; }
.eval-row .dim { font-weight: 600; color: var(--text); }
.eval-row .note { min-width: 0; color: var(--text2); font-size: 13px; overflow-wrap: anywhere; }
.eval-row .score { text-align: right; }
.eval-row .note.empty { color: #bbb; font-style: italic; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap th { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.section > ul { padding-left: 1.35em; }
.section > ul li { margin: 6px 0; }

/* comp table */
.comp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comp-table th {
  text-align: left; padding: 10px 12px; font-weight: 600;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-bottom: 2px solid var(--accent);
}
.comp-table th:first-child { width: 180px; }
.comp-table th:last-child { border-left: 1px solid var(--border); }
.comp-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.comp-table td:first-child { font-weight: 600; color: var(--text2); font-size: 13px; }
.comp-table td:last-child { border-left: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 30%, transparent); }
.comp-table td .empty { color: #bbb; font-style: italic; }
.comp-table .section-row td {
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px;
}
.comp-table .section-row td:last-child { background: var(--accent); }

/* verdict */
.verdict { border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; }
.verdict.ready { background: color-mix(in srgb, var(--green) 15%, var(--card)); border-left: 4px solid var(--green); }
.verdict.waiting { background: color-mix(in srgb, var(--amber) 15%, var(--card)); border-left: 4px solid var(--amber); }
.verdict h3 { font-size: 16px; margin-bottom: 8px; }
.verdict p { font-size: 14px; }

/* pros cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.pc-list h4 { font-size: 14px; margin-bottom: 6px; }
.pc-list ul { list-style: none; padding: 0; }
.pc-list li { font-size: 13px; padding: 3px 0; padding-left: 16px; position: relative; }
.pc-list li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%;
}
.pc-list.pros li::before { background: var(--green); }
.pc-list.cons li::before { background: var(--red); }
.pc-list li.cons-like::before { background: transparent; border: 1.5px solid var(--text2); }

/* method badge */
.method-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin: 1px 2px; }
.method-badge.situational { background: #e3f2fd; color: #1565c0; }
.method-badge.phonics { background: #f3e5f5; color: #6a1b9a; }
.method-badge.translation { background: #fce4ec; color: #c62828; }
.method-badge.task { background: #e8f5e9; color: #2e7d32; }
@media (prefers-color-scheme: dark) {
  .method-badge.situational { background: #1a2a4a; color: #90caf9; }
  .method-badge.phonics { background: #2a1a3a; color: #ce93d8; }
  .method-badge.translation { background: #3a1a1a; color: #ef9a9a; }
  .method-badge.task { background: #1a3a1a; color: #81c784; }
}
:root.light .method-badge.situational { background: #e3f2fd; color: #1565c0; }
:root.light .method-badge.phonics { background: #f3e5f5; color: #6a1b9a; }
:root.light .method-badge.translation { background: #fce4ec; color: #c62828; }
:root.light .method-badge.task { background: #e8f5e9; color: #2e7d32; }
:root.dark .method-badge.situational { background: #1a2a4a; color: #90caf9; }
:root.dark .method-badge.phonics { background: #2a1a3a; color: #ce93d8; }
:root.dark .method-badge.translation { background: #3a1a1a; color: #ef9a9a; }
:root.dark .method-badge.task { background: #1a3a1a; color: #81c784; }

/* student profile */
.student-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.student-profile .item { background: var(--bg); padding: 10px 14px; border-radius: 8px; }
.student-profile .item label { font-size: 12px; color: var(--text2); display: block; }
.student-profile .item span { font-size: 14px; font-weight: 600; }

/* theme toggle */
.theme-toggle-wrap { margin-left: auto; display: flex; align-items: center; gap: 6px; }
#themeToggle { background: transparent; border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: 14px; line-height: 1.6; color: var(--text); transition: all 0.2s; }
#themeToggle:hover { border-color: var(--accent); }

/* footer */
.footer { text-align: center; font-size: 12px; color: var(--text2); padding: 24px 0 40px; position: relative; }
.site-ver { margin-top: 4px; }

/* update banner */
.update-banner {
  display: none; position: fixed; bottom: 20px; right: 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 100;
  max-width: 320px; font-size: 13px;
}
.update-banner.visible { display: block; }
.update-banner button { margin-top: 8px; background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 4px 14px; cursor: pointer; font-size: 12px; }

@media (max-width: 720px) {
  .pros-cons { grid-template-columns: 1fr; }
  .eval-row { grid-template-columns: minmax(72px, 96px) minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .comp-table th:first-child, .comp-table td:first-child { width: auto; }
  .student-profile { grid-template-columns: 1fr; }
  .header h1 { font-size: 20px; flex-wrap: wrap; }
}

.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.flex { display: flex; align-items: center; gap: 8px; }
