/* akaturk.com /universities/{id} — detail refresh + yearly/quality sections (2026-09-25)
   Loads after akaturk-universities.css and akaturk-universities-v2.css. Light
   masthead for the detail hero, faculty tree, scope hero, unit comparison,
   sparkline cards, yearly matrix and quartile-by-year stacks. */

/* ───────────────────────── Detail hero on light ───────────────────────── */
.aka-uni-body--detail { background: #ffffff; }
.aka-uni__hero--detail { padding-bottom: 2rem; }
.aka-uni__hero--detail::before, .aka-uni__hero--detail::after { display: none; }
.aka-uni__title--detail { color: var(--u-ink); }
.aka-uni__lead--detail { color: var(--u-muted); }
.aka-uni__detail-badge {
  color: var(--u-ink);
  background: #ffffff;
  border: 1px solid var(--u-line);
}
.aka-uni__detail-badge--type { background: var(--u-red-soft); border-color: #f3c3c7; color: var(--u-red); }
.aka-uni__detail-kpis {
  margin-top: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--u-line);
  border-radius: 18px;
  box-shadow: var(--u-shadow);
  backdrop-filter: none;
}
.aka-uni__detail-kpi { padding: 1.05rem 1.2rem; }
.aka-uni__detail-kpi:not(:first-child)::before { background: var(--u-line); }
.aka-uni__detail-kpi:nth-child(3)::after { background: var(--u-line); }
.aka-uni__detail-kpi:not(:first-child) { border-top-color: var(--u-line); }
.aka-uni__detail-kpi--btn { cursor: pointer; transition: background 0.15s ease; }
.aka-uni__detail-kpi--btn:hover { background: var(--u-red-tint); }
.aka-uni__detail-kpi-val { color: var(--u-ink); font-weight: 800; letter-spacing: -0.03em; }
.aka-uni__detail-kpi:nth-child(4) .aka-uni__detail-kpi-val { color: var(--u-red); }
.aka-uni__detail-kpi-label { color: var(--u-faint); font-weight: 700; letter-spacing: 0.06em; }
.aka-uni__back-link {
  color: var(--u-ink);
  background: #ffffff;
  border: 1px solid var(--u-line);
  border-radius: 12px;
}
.aka-uni__back-link:hover { color: var(--u-red); border-color: var(--u-red); background: var(--u-red-tint); }
.aka-uni__back-link:focus-visible { outline-color: var(--u-red); }

/* ───────────────────────── Faculty tree sidebar ───────────────────────── */
.aka-uni__sidebar--faculty { border-color: var(--u-line); border-radius: 18px; box-shadow: var(--u-shadow); }
.aka-uni__sidebar--faculty .aka-uni__sidebar-head { padding: 1rem 1rem 0.75rem; }
.aka-uni__faculty-node, .aka-uni__dept-node { color: #3d4757; border-radius: 10px; margin: 0 0.4rem; width: calc(100% - 0.8rem); }
.aka-uni__faculty-row .aka-uni__faculty-node { margin-left: 0; width: auto; }
.aka-uni__faculty-node:hover, .aka-uni__dept-node:hover,
.aka-uni__faculty-node:focus-visible, .aka-uni__dept-node:focus-visible { background: #f7f2f3; color: var(--u-ink); }
.aka-uni__faculty-node.is-active, .aka-uni__dept-node.is-active { background: var(--u-red-soft); color: var(--u-red); font-weight: 700; }
.aka-uni__faculty-expand { color: var(--u-faint); }
.aka-uni__faculty-expand:hover { color: var(--u-red); }
.aka-uni__dept-node { color: var(--u-muted); }
.aka-uni__dept-list { padding-left: 1.6rem; }

/* ───────────────────────── Scope hero ───────────────────────── */
.aka-scopehero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.5rem 1.3rem;
  background: linear-gradient(135deg, #fff6f6 0%, #ffffff 60%);
  border: 1px solid #f5dcdf;
  border-radius: 18px;
  box-shadow: var(--u-shadow);
}
.aka-scopehero__main { min-width: 0; }
.aka-scopehero__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: 0.55rem; }
.aka-uni__scope-badge--detail {
  background: #ffffff;
  border: 1px solid #f3c3c7;
  color: var(--u-red);
  letter-spacing: 0.1em;
  font-size: 0.66rem;
}
.aka-scopehero__kind {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--u-faint);
}
.aka-scopehero__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--u-ink);
  text-wrap: balance;
}
.aka-scopehero__parent { margin: 0.45rem 0 0; font-size: 0.86rem; color: var(--u-muted); }
.aka-scopehero__parent[hidden] { display: none; }
.aka-scopehero__parent-btn {
  margin-left: 0.3rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--u-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--u-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.aka-scopehero__parent-btn:hover { border-color: var(--u-red); color: var(--u-red); }
.aka-scopehero__meta { margin: 0.4rem 0 0; font-size: 0.86rem; font-weight: 600; color: var(--u-muted); }
.aka-scopehero__meta[hidden] { display: none; }
.aka-scopehero__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex-shrink: 0; }
.aka-scopehero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--u-red);
  border-radius: 12px;
  background: var(--u-red);
  color: #ffffff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.aka-scopehero__btn:hover { background: #9a0e18; border-color: #9a0e18; }
.aka-scopehero__btn.is-done { background: #047857; border-color: #047857; }
.aka-scopehero__btn--ghost { background: #ffffff; color: var(--u-ink); border-color: var(--u-line); }
.aka-scopehero__btn--ghost:hover { background: var(--u-red-tint); color: var(--u-red); border-color: var(--u-red); }
.aka-scopehero__btn[hidden] { display: none; }

/* ───────────────────────── Unit comparison ───────────────────────── */
.aka-unitcmp[hidden] { display: none; }
.aka-unitcmp__lead { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--u-muted); max-width: 60ch; }
.aka-unitcmp__state { margin: 0; padding: 1rem; font-size: 0.9rem; color: var(--u-muted); text-align: center; }
.aka-unitcmp__state[hidden] { display: none; }
.aka-unitcmp__row { cursor: pointer; }
.aka-unitcmp__row:focus-visible { outline: 2px solid var(--u-red); outline-offset: -2px; }
.aka-unitcmp__name { font-weight: 700; color: var(--u-ink); }
.aka-unitcmp__row:hover .aka-unitcmp__name { color: var(--u-red); }

/* ───────────────────────── Sparkline cards ───────────────────────── */
.aka-yearly__lead { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--u-muted); max-width: 64ch; }
.aka-yearly__sparks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.aka-yearly__sparks[hidden] { display: none; }
.aka-spark-card {
  padding: 0.9rem 1rem 0.85rem;
  border: 1px solid var(--u-line);
  border-radius: 14px;
  background: var(--u-soft);
}
.aka-spark-card.is-zero { opacity: 0.55; }
.aka-spark-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.aka-spark-card__label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--u-faint); }
.aka-spark-card__change {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #ece6e7;
  color: var(--u-muted);
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.aka-spark-card__change.is-up { background: #e6f5ef; color: #047857; }
.aka-spark-card__change.is-down { background: var(--u-red-soft); color: var(--u-red); }
.aka-spark-card__val {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--u-ink);
  font-variant-numeric: tabular-nums;
}
.aka-spark-card__val small { margin-left: 0.4rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--u-faint); }
.aka-spark { display: block; width: 100%; height: 40px; }
.aka-spark__area { fill: rgba(193, 18, 31, 0.10); }
.aka-spark__line { fill: none; stroke: var(--u-red); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.aka-spark__dot { fill: var(--u-red); }
.aka-spark-card__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--u-muted);
}
.aka-spark-card__foot b { color: var(--u-ink); }

/* ───────────────────────── Yearly / quality tables ───────────────────────── */
.aka-yearly__tablewrap, .aka-quality__tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--u-line);
  border-radius: 14px;
}
.aka-yearly__tablewrap[hidden], .aka-quality__tablewrap[hidden] { display: none; }
.aka-yearly__table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}
.aka-yearly__table th, .aka-yearly__table td {
  padding: 0.6rem 0.8rem;
  text-align: right;
  border-bottom: 1px solid var(--u-line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--u-ink);
}
.aka-yearly__table th[scope="row"], .aka-yearly__table thead th:first-child { text-align: left; }
.aka-yearly__table thead th {
  background: var(--u-soft);
  color: var(--u-faint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.aka-yearly__table th[scope="row"] { font-weight: 800; position: sticky; left: 0; background: #ffffff; z-index: 1; }
.aka-yearly__table tbody tr:hover td, .aka-yearly__table tbody tr:hover th { background: var(--u-red-tint); }
.aka-yearly__table tr.is-partial th, .aka-yearly__table tr.is-partial td { color: var(--u-muted); }
.aka-yearly__partial {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #ece6e7;
  color: var(--u-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.aka-yearly__cell { position: relative; }
.aka-yearly__cell.has-val { background: rgba(193, 18, 31, calc(var(--heat, 0) * 0.16)); }
.aka-yearly__cellbtn {
  padding: 0.15rem 0.45rem;
  margin: -0.15rem -0.45rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aka-yearly__cellbtn:hover { background: var(--u-red); color: #ffffff; }
.aka-yearly__cellbtn:focus-visible { outline: 2px solid var(--u-red); outline-offset: 1px; }
.aka-yearly__zero { color: #b3bac6; }
.aka-yearly__total { font-weight: 800; background: var(--u-soft); }
.aka-yearly__table tfoot th, .aka-yearly__table tfoot td { background: var(--u-soft); font-weight: 800; border-bottom: none; border-top: 2px solid var(--u-line); }
.aka-yearly__table tfoot tr.aka-yearly__avg th, .aka-yearly__table tfoot tr.aka-yearly__avg td { font-weight: 600; color: var(--u-muted); border-top: 1px solid var(--u-line); font-size: 0.8rem; }
.aka-yearly__state { margin: 0; padding: 1.25rem 1rem; text-align: center; color: var(--u-muted); border: 1px dashed #cdc3c5; border-radius: 14px; background: var(--u-soft); }
.aka-yearly__state[hidden] { display: none; }
.aka-yearly.is-loading, .aka-quality.is-loading { opacity: 0.6; }
.aka-quality__oa { color: #047857 !important; }
.aka-yearly__table thead th.aka-quality__oa { color: #047857 !important; background: #e6f5ef; }

/* ───────────────────────── Quality toggle + stacks ───────────────────────── */
.aka-quality__toggle { display: inline-flex; gap: 0; padding: 3px; background: var(--u-soft); border: 1px solid var(--u-line); border-radius: 999px; flex-shrink: 0; }
.aka-quality__toggle-btn {
  padding: 0.42rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--u-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.aka-quality__toggle-btn.is-active { background: #ffffff; color: var(--u-red); box-shadow: 0 2px 8px rgba(20, 10, 12, 0.08); }
.aka-quality__legend-note { margin: 0 0 0.9rem; font-size: 0.8rem; color: var(--u-faint); }
.aka-quality__chart { margin-bottom: 1.1rem; }
.aka-quality__chart[hidden] { display: none; }
.aka-quality__legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.7rem; font-size: 0.74rem; font-weight: 700; color: var(--u-muted); }
.aka-quality__legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.aka-quality__swatch { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 3px; }
.aka-quality__swatch--q1, .aka-quality__seg--q1 { background: var(--u-red); }
.aka-quality__swatch--q2, .aka-quality__seg--q2 { background: #e2a03f; }
.aka-quality__swatch--q3, .aka-quality__seg--q3 { background: #8892a4; }
.aka-quality__swatch--q4, .aka-quality__seg--q4 { background: #c5cbd5; }
.aka-quality__swatch--none, .aka-quality__seg--none { background: repeating-linear-gradient(45deg, #efe8e9 0 4px, #f8f3f4 4px 8px); }
.aka-quality__rows { display: flex; flex-direction: column; gap: 0.4rem; }
.aka-quality__row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 7.5rem; align-items: center; gap: 0.6rem; }
.aka-quality__row.is-partial { opacity: 0.7; }
.aka-quality__year { font-weight: 800; color: var(--u-ink); font-variant-numeric: tabular-nums; }
.aka-quality__year small { display: block; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--u-faint); }
.aka-quality__bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: transparent; min-width: 2px; }
.aka-quality__seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 0;
  border: none;
  padding: 0;
  color: #ffffff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
}
.aka-quality__seg--q3, .aka-quality__seg--q4, .aka-quality__seg--none { color: var(--u-ink); }
button.aka-quality__seg { cursor: pointer; }
button.aka-quality__seg:hover { filter: brightness(0.9); }
button.aka-quality__seg:focus-visible { outline: 2px solid var(--u-ink); outline-offset: -2px; }
.aka-quality__n { font-size: 0.84rem; font-weight: 800; color: var(--u-ink); font-variant-numeric: tabular-nums; text-align: right; }
.aka-quality__n small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--u-muted); }
.aka-quality__prov { margin-top: 1rem; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 960px) {
  .aka-uni__sidebar--faculty { border-radius: 0; }
  .aka-yearly__sparks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .aka-scopehero { flex-direction: column; align-items: stretch; padding: 1rem 1.05rem 1.1rem; border-radius: 16px; }
  .aka-scopehero__actions { justify-content: flex-start; }
  .aka-scopehero__btn { flex: 1 1 auto; justify-content: center; }
  .aka-yearly__sparks { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .aka-spark-card { padding: 0.75rem 0.8rem; }
  .aka-spark-card__val { font-size: 1.25rem; }
  .aka-quality__row { grid-template-columns: 3.6rem minmax(0, 1fr) 5.5rem; gap: 0.4rem; }
  .aka-quality__toggle { width: 100%; }
  .aka-quality__toggle-btn { flex: 1; }
  .aka-uni__section-head--detail { flex-direction: column; align-items: stretch; }
}
@media (max-width: 400px) {
  .aka-yearly__sparks { grid-template-columns: 1fr; }
}

/* h-index chip in top-academicians list (2026-09-26) */
.aka-uni__top-academic-h { display: inline-block; margin-right: 0.4rem; padding: 0.06rem 0.45rem; border-radius: 999px; background: #e6f5ef; color: #047857; font-size: 0.68rem; font-weight: 800; vertical-align: middle; }
