/* Comparison Result — full-page screen matching the product spec */

.cmp-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  background:
    radial-gradient(1100px 520px at 50% -8%, #eef1f6 0%, rgba(238,241,246,0) 70%),
    linear-gradient(180deg, #f6f7f9 0%, #eef1f5 100%);
  overflow-y: auto;
  animation: cmpFade 0.2s ease;
}
@keyframes cmpFade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Header ---- */
.cmp-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e9ebef;
  padding: 18px 28px;
}
.cmp-header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
}
.cmp-logo { display: flex; flex-direction: column; line-height: 1; }
.cmp-logo-mark {
  position: relative;
  font-weight: 900;
  font-size: 40px;
  letter-spacing: -0.04em;
  color: #ED1C24;
  font-family: var(--font-sans);
}
.cmp-logo-mark .dot {
  position: absolute;
  right: -3px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ED1C24;
}
.cmp-logo-text {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #11151c;
  border-top: 2px solid #11151c;
  padding-top: 4px;
}

.cmp-ribbon {
  position: relative;
  background: linear-gradient(180deg, #e8202b 0%, #b3121d 100%);
  border-radius: 5px;
  padding: 7px 22px 8px;
  text-align: center;
  color: #ffd64a;
  box-shadow: 0 6px 14px rgba(179,18,29,0.28);
}
.cmp-ribbon::before,
.cmp-ribbon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  border: 13px solid transparent;
  transform: translateY(-50%);
}
.cmp-ribbon::before { left: -12px; border-right-color: #9b0f18; }
.cmp-ribbon::after { right: -12px; border-left-color: #9b0f18; }
.cmp-ribbon-top {
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: #6d28d9;
  background: #fff;
  border-radius: 4px;
  padding: 1px 8px;
  display: inline-block;
  margin-bottom: 2px;
}
.cmp-ribbon-main {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffd64a;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
  line-height: 1.05;
}
.cmp-ribbon-bot {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cmp-back {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  transition: var(--transition-fast);
}
.cmp-back:hover { background: var(--gray-100); border-color: #cfd4dc; }

/* ---- Title ---- */
.cmp-body {
  max-width: 1760px;
  margin: 0 auto;
  padding: 44px 32px 80px;
}
.cmp-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.cmp-star {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff5a1f 0%, var(--expo-orange) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(232,64,16,0.32);
}
.cmp-star svg { fill: #fff; stroke: #fff; }
.cmp-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #15233f;
  line-height: 1;
}
.cmp-sub {
  text-align: center;
  margin: 14px 0 0;
  font-size: clamp(15px, 1.4vw, 19px);
  color: #64748b;
  font-weight: 500;
}

/* ---- Table ---- */
.cmp-table-card {
  margin-top: 40px;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(20,30,60,0.06);
  overflow: hidden;
}
.cmp-table { min-width: 720px; }
.cmp-row {
  display: grid;
  align-items: center;
}
.cmp-row + .cmp-row { border-top: 1px solid #eef1f5; }
.cmp-tint { background: #f3f6fb; }

.cmp-cell {
  padding: 22px 30px;
  min-width: 0;
}

/* header row */
.cmp-head {
  background: linear-gradient(180deg, #eef2f7 0%, #e7edf3 100%);
  position: relative;
}
.cmp-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(232,64,16,0.45) 0%, rgba(67,56,202,0.25) 35%, rgba(21,115,71,0.12) 70%, transparent 100%);
}
.cmp-head .cmp-cell { padding-top: 30px; padding-bottom: 30px; }
.cmp-field-head {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #64748b;
}
.cmp-univ-head { display: flex; flex-direction: column; gap: 4px; }
.cmp-abbr {
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.cmp-full {
  font-size: 15px;
  font-weight: 500;
  color: #9aa6b5;
}

/* field label column */
.cmp-field {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #64748b;
  background: #eef2f7;
  text-transform: uppercase;
}

/* value cells */
.cmp-val {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  color: #1e293b;
}
.cmp-rating, .cmp-loan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cmp-emoji { font-size: 1.05em; line-height: 1; }

/* footer cta */
.cmp-footer-cta {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.cmp-cta {
  width: auto;
  max-width: 360px;
  padding: 0 32px;
  height: 52px;
  font-size: 16px;
}

@media (max-width: 720px) {
  .cmp-table-card { border-radius: 16px; overflow-x: auto; }
  .cmp-cell { padding: 16px 18px; }
  .cmp-body { padding: 28px 16px 70px; }
}

/* ---- v2: data-rich comparison ---- */
.cmp-header-inner { min-height: 44px; }
.cmp-brand-img { height: 40px; width: auto; display: block; }
.cmp-cell { padding: 16px 22px; }
.cmp-val { font-size: 14.5px; font-weight: 500; line-height: 1.45; color: #1e293b; overflow-wrap: anywhere; }
.cmp-field { font-size: 12px; letter-spacing: 0.06em; }
.cmp-strong { font-weight: 700; display: block; }
.cmp-fee { font-size: 17px; color: var(--color-navy); }
.cmp-note { display: block; font-size: 12px; color: var(--gray-600); font-weight: 400; margin-top: 3px; line-height: 1.4; }
.cmp-nd { color: var(--gray-400); font-style: italic; font-weight: 500; }
.cmp-src a { color: var(--color-info-text); text-decoration: underline; font-weight: 600; }
.cmp-footnote { max-width: 980px; margin: 18px auto 0; text-align: center; font-size: 12.5px; color: var(--gray-600); line-height: 1.55; }

/* Mobile: field label becomes a full-width row heading, universities sit side by side */
@media (max-width: 720px) {
  .cmp-header { padding: 14px 16px; }
  .cmp-brand-img { height: 30px; }
  .cmp-back { right: 16px; padding: 6px 12px; font-size: 12px; }
  .cmp-table { min-width: 0 !important; }
  .cmp-table-card { overflow: hidden; }
  .cmp-row { grid-template-columns: repeat(var(--cmp-n), minmax(0, 1fr)) !important; }
  .cmp-row .cmp-field, .cmp-head .cmp-field-head { grid-column: 1 / -1; }
  .cmp-head .cmp-field-head { display: none; }
  .cmp-field { padding: 8px 12px; font-size: 11px; background: #e9eef5; }
  .cmp-cell { padding: 10px 12px; }
  .cmp-val { font-size: 13px; }
  .cmp-val + .cmp-val { border-left: 1px solid #eef1f5; }
  .cmp-head .cmp-cell { padding: 16px 12px; }
  .cmp-abbr { font-size: 18px; }
  .cmp-full { font-size: 12px; }
  .cmp-fee { font-size: 14.5px; }
  .cmp-note { font-size: 11px; }
}
