/* =============================================
   森本塾 — 大学別分析ページ 共通スタイル
   配置: /analysis/analysis.css
   依存: ../style.css（--teal, --ink, --border 等のCSS変数）
   ============================================= */

/* ===== サマリーボックス ===== */
.summary-box {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 1.5em 1.75em;
  margin: 1.5em 0;
}
.summary-box p {
  font-size: 0.9375em;
  line-height: 1.95;
  margin: 0.5em 0;
  color: var(--ink-mid);
}
.summary-box p:first-child { margin-top: 0; }
.summary-box p:last-child { margin-bottom: 0; }
.summary-box strong { color: var(--teal-dark); }
.summary-box .hl {
  background: linear-gradient(transparent 60%, #ffe88a 60%);
  font-weight: 700;
  color: var(--ink);
}
.summary-box .note {
  font-size: 0.75em;
  color: var(--ink-light);
  line-height: 1.75;
  margin-top: 0.75em;
}

/* ===== 分析サブ見出し ===== */
.bunseki-h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.125em, 2.5vw, 1.375em);
  font-weight: 700;
  color: var(--ink);
  margin-top: 3em;
  margin-bottom: 1em;
  padding-left: 0.75em;
  border-left: 4px solid var(--teal);
  line-height: 1.5;
}
.bunseki-h2:first-of-type { margin-top: 0; }

/* ===== メタ情報 ===== */
.bunseki-meta {
  color: var(--ink-light);
  font-size: 0.8125em;
  margin-bottom: 1.5em;
  letter-spacing: 0.04em;
}

/* ===== 出題傾向表（メインテーブル） ===== */
.trend-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1em 0 0.75em;
}
.trend-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 38em;
  font-size: 0.8125em;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.trend-table th,
.trend-table td {
  border: 1px solid var(--border);
  padding: 0.5em 0.625em;
  text-align: center;
  white-space: nowrap;
}
.trend-table th {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.trend-table th.field,
.trend-table td.field {
  text-align: left;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink);
}
.trend-table .total-row td {
  background: var(--teal-light);
  font-weight: 700;
  color: var(--teal-dark);
}
.trend-table .total-row td.field {
  background: #d9efee;
}
.trend-table .zero { color: #c5c5c5; font-weight: 400; }

/* ===== ％の色分け（表内） ===== */
.pct-yellow {
  background: #fff2a8 !important;
  font-weight: 700;
  color: #7a5a00;
}
.pct-orange {
  background: #ffd99a !important;
  font-weight: 700;
  color: #a05a00;
}
.pct-blue {
  background: #b4dffa !important;
  font-weight: 700;
  color: #1a5a8a;
}

/* ===== 色凡例 ===== */
.legend {
  font-size: 0.75em;
  color: var(--ink-light);
  margin-top: 0.75em;
  line-height: 2;
}
.legend .chip {
  display: inline-block;
  padding: 0.1em 0.7em;
  border-radius: 3px;
  font-weight: 700;
  margin: 0 0.2em;
}

/* ===== 特徴・対策テーブル ===== */
.feature-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875em;
  margin-top: 0.75em;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.feature-table th,
.feature-table td {
  border: 1px solid var(--border);
  padding: 0.875em 1em;
  vertical-align: top;
}
.feature-table th {
  width: 9em;
  background: var(--bg-soft);
  color: var(--teal-dark);
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.02em;
}
.feature-table td {
  text-align: left;
  line-height: 1.85;
  color: var(--ink-mid);
}
.feature-table td strong { color: var(--ink); }

/* ===== 分野別ポイント（バッジ付き） ===== */
.field-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875em;
  margin-top: 0.75em;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.field-table th,
.field-table td {
  border: 1px solid var(--border);
  padding: 1em 1em;
  vertical-align: middle;
}
.field-table th.field-cell {
  width: 9.5em;
  background: var(--bg-soft);
  text-align: center;
  padding: 1.1em 0.5em;
}
.field-table th.field-cell .name {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.0625em;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 0.6em;
  line-height: 1.4;
}
.field-table th.field-cell .pct {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 1em;
  font-weight: 600;
  color: var(--ink-mid);
  background: #fff;
  border: 1.5px solid var(--teal);
  border-radius: 20px;
  padding: 0.2em 0.85em;
  min-width: 4.2em;
  letter-spacing: 0.02em;
}
.field-table th.field-cell .pct.big {
  color: #1a5a8a;
  background: #b4dffa;
  border-color: #1a5a8a;
}
.field-table th.field-cell .pct.mid {
  color: #a05a00;
  background: #ffd99a;
  border-color: #a05a00;
}
.field-table th.field-cell .pct.low {
  color: #7a5a00;
  background: #fff2a8;
  border-color: #c0a040;
}
.field-table th.field-cell .pct.zero {
  color: #999;
  background: #f5f5f5;
  border-color: #ccc;
}
.field-table td {
  text-align: left;
  line-height: 1.9;
  color: var(--ink-mid);
}
.field-table td strong { color: var(--ink); }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .summary-box { padding: 1.25em 1.25em; }
  .summary-box p { font-size: 0.9em; }

  .trend-table { font-size: 0.7em; min-width: 32em; }
  .trend-table th,
  .trend-table td { padding: 0.35em 0.4em; }

  .feature-table { font-size: 0.85em; }
  .feature-table th { width: 7em; }
  .feature-table th,
  .feature-table td { padding: 0.7em 0.75em; }

  .field-table { font-size: 0.85em; }
  .field-table th.field-cell { width: 7em; padding: 0.85em 0.4em; }
  .field-table th.field-cell .name { font-size: 0.95em; margin-bottom: 0.45em; }
  .field-table th.field-cell .pct { font-size: 0.875em; padding: 0.15em 0.6em; min-width: 3.6em; }
  .field-table td { padding: 0.85em 0.85em; line-height: 1.8; }
}
