/* School Profile visual layer: scoped so the shared /schools skin remains unchanged. */
.school-profile {
  --profile-accent: #e4572e;
  --profile-accent-soft: #fff0ea;
  --profile-deep: #172a46;
  background:
    radial-gradient(circle at 88% 2%, rgba(228,87,46,.11), transparent 28rem),
    #f7fafc;
}

.school-kai {
  --profile-accent: #087f8c;
  --profile-accent-soft: #e7f8f7;
  background:
    radial-gradient(circle at 86% 2%, rgba(8,127,140,.14), transparent 28rem),
    #f7fafc;
}

.school-akamonkai {
  --profile-accent: #a43b47;
  --profile-accent-soft: #fcebed;
  background:
    radial-gradient(circle at 86% 2%, rgba(164,59,71,.12), transparent 28rem),
    #f7fafc;
}

.school-profile .topbar { border-bottom-color: rgba(16,42,67,.14); }
.school-profile .brand-mark { background: var(--profile-accent); }
.school-profile .eyebrow, .school-profile .evidence-label { color: var(--profile-accent); }
.school-profile .button.primary { background: var(--profile-deep); }
.school-profile .comparison-unit { color: var(--profile-accent); background: var(--profile-accent-soft); }
.school-profile .back-link:hover, .school-profile nav a:hover { color: var(--profile-accent); }

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(300px, .97fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  min-height: 540px;
  padding: 38px 0 60px;
}

.profile-hero-copy { min-width: 0; }
.profile-hero h1 { max-width: 680px; color: var(--profile-deep); }
.profile-hero .lead { max-width: 700px; font-size: clamp(18px, 2.1vw, 23px); }
.profile-hero-media {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border-radius: 28px 28px 72px 28px;
  background: var(--profile-accent-soft);
  box-shadow: 20px 24px 0 rgba(16,42,67,.06);
}

.profile-hero-media::after {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 12px rgba(255,255,255,.12), 0 0 0 24px rgba(255,255,255,.08);
}

.profile-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center;
  filter: saturate(.95) contrast(1.02);
}

.school-isi .profile-hero-media img { object-position: center 48%; }
.school-kai .profile-hero-media img { object-position: center; }
.school-akamonkai .profile-hero-media img { object-position: center 42%; }
.profile-scope-warning { margin-top: -18px; border-left-color: var(--profile-accent); background: var(--profile-accent-soft); }
.profile-scope-warning strong { color: var(--profile-accent); }
.section-kicker {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--profile-accent) 25%, white);
  border-radius: 999px;
  color: var(--profile-accent);
  background: var(--profile-accent-soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.evidence-panel { position: relative; overflow: hidden; }
.evidence-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--profile-accent);
  content: "";
}
.evidence-panel h2 { max-width: 720px; }
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.chain-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.evidence-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(16,42,67,.035);
}
.evidence-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.evidence-card-heading h3 { margin: 0; font-size: 16px; }
.evidence-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}
.status-confirmed { color: #17633a; background: #e8f8ee; }
.status-case-confirmed { color: #6c4a00; background: #fff4c9; }
.status-partial { color: #6b43a4; background: #f1e9ff; }
.status-unknown { color: #5b6b7a; background: #eef2f5; }
.status-explicit-no { color: #8a2f3b; background: #ffe8eb; }
.status-not-applicable { color: #53616d; background: #e9edf0; }
.evidence-detail { margin: 11px 0 0; color: #334e68; font-size: 14px; line-height: 1.6; }
.evidence-scope { margin: 11px 0 0; color: var(--profile-accent); font-size: 12px; font-weight: 750; line-height: 1.5; }
.evidence-note { margin: 9px 0 0; color: #718096; font-size: 12px; font-style: italic; line-height: 1.5; }
.evidence-card.status-unknown { border-style: dashed; background: #fbfcfd; }
.evidence-card.status-unknown .evidence-card-heading h3 { color: #4a5a68; }
.evidence-card.status-explicit-no { border-color: #f2c9ce; }

.housing-panel { background: linear-gradient(135deg, #fff 0%, #fff 62%, var(--profile-accent-soft) 100%); }
.housing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.housing-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.housing-panel .subheading { margin: 28px 0 0; font-size: 15px; color: var(--profile-deep); }
.profile-supporting-media { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; align-items: center; gap: 18px; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-supporting-media img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; }
.profile-supporting-media figcaption { color: var(--muted); font-size: 12px; }

.unknown-panel {
  border-color: #cbd5df;
  background: linear-gradient(135deg, #fff, #f4f7f9);
  box-shadow: inset 5px 0 0 #7c8b98;
}
.unknown-panel .section-kicker { color: #526372; border-color: #cbd5df; background: #eef2f5; }
.unknown-panel ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; padding-left: 22px; margin-bottom: 0; }
.unknown-panel li { color: #465867; }

.school-profile .judgment-panel { border-color: color-mix(in srgb, var(--profile-accent) 25%, var(--line)); background: var(--profile-accent-soft); }
.school-profile .judgment-two-col > div { border: 1px solid color-mix(in srgb, var(--profile-accent) 15%, var(--line)); }
.school-profile .judgment-two-col span { color: var(--profile-accent); }
.school-profile .related-card:hover { border-color: var(--profile-accent); transform: translateY(-2px); }

@media (max-width: 1050px) {
  .profile-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr); gap: 30px; }
  .chain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .housing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .profile-hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 42px; }
  .profile-hero-media, .profile-hero-media img { min-height: 320px; }
  .profile-hero-media { order: -1; border-radius: 22px 22px 52px 22px; box-shadow: 10px 14px 0 rgba(16,42,67,.06); }
  .profile-hero-copy { padding-top: 5px; }
  .profile-hero h1 { font-size: clamp(40px, 12vw, 62px); }
  .evidence-grid, .chain-grid, .subject-grid, .housing-grid, .housing-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unknown-panel ul { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .profile-hero-media, .profile-hero-media img { min-height: 250px; }
  .evidence-grid, .chain-grid, .subject-grid, .housing-grid, .housing-check-grid { grid-template-columns: 1fr; }
  .evidence-card-heading { display: block; }
  .evidence-card-heading .evidence-status { margin-top: 8px; }
  .profile-supporting-media { grid-template-columns: 1fr; }
  .profile-supporting-media img { max-height: 220px; }
  .section-kicker { margin-top: 12px; }
}
