/* ============================================================
   درس‌نامه — Lecture Atlas
   A calm, academic portal for visual lecture notes.
   ============================================================ */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fbfcff;
  --ink: #0f172a;
  --ink-2: #26324a;
  --muted: #667085;
  --muted-2: #626e83;
  --line: #e4e9f2;
  --line-strong: #d5ddeb;
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --navy: #0b1020;
  --navy-2: #111a33;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 8px 24px -16px rgba(15, 23, 42, .22);
  --shadow: 0 24px 60px -32px rgba(15, 23, 42, .3);
  --shadow-lg: 0 40px 90px -40px rgba(15, 23, 42, .45);
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: "Space Grotesk", "Segoe UI", monospace;
  --topbar: 74px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 22px);
}

body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(900px 500px at 100% -8%, rgba(79, 70, 229, .08), transparent 60%),
    radial-gradient(700px 420px at 0% 55%, rgba(6, 182, 212, .06), transparent 65%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(79, 70, 229, .18); }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid rgba(79, 70, 229, .4);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.shell {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--topbar);
  background: rgba(244, 246, 251, .82);
  border-bottom: 1px solid rgba(213, 221, 235, .65);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar-inner {
  width: min(1240px, calc(100% - 56px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 5px 12px -5px #14203d66;
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand:hover { text-decoration: none; }
.brand:hover .brand-mark { transform: translateY(-2px); box-shadow: 0 9px 18px -7px #14203d66; }
.brand:focus-visible { outline: 3px solid #0d9488; outline-offset: 6px; border-radius: 12px; }
.brand-word-accent { color: #334a76; }

.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.5; white-space: nowrap; }
.brand-text strong { font-size: 23px; font-weight: 900; letter-spacing: -.65px; color: #172540; }
.brand-text small {
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  color: #596982;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: 10px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.main-nav a:hover { background: #fff; color: var(--brand); }
.main-nav a.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-xs); }

.top-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .7);
  color: var(--ink-2);
  transition: background .18s, border-color .18s, color .18s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: #fff; border-color: #c7d2fe; color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1 55%, #06b6d4);
  color: #fff;
  box-shadow: 0 14px 30px -16px rgba(79, 70, 229, .8);
}
.btn-primary:hover { box-shadow: 0 20px 38px -18px rgba(79, 70, 229, .9); }

.btn-ghost {
  background: rgba(255, 255, 255, .72);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { background: #fff; border-color: #c7d2fe; color: var(--brand); }

.btn-glass {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .16); }

/* ---------- hero ---------- */

.home-hero {
  color: #f8fafc;
  background: linear-gradient(110deg, #102a38, #15243b 65%, #182741);
  border-radius: 0 0 28px 28px;
}
.hero-inner { padding-block: 52px 26px; }
.hero-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}
.hero-copy { max-width: 730px; min-width: 0; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a2dbd5;
  font-size: 11px;
  font-weight: 600;
}
.hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #75d9c9;
}
.hero-copy h1 {
  margin: 12px 0 13px;
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -.85px;
  text-wrap: balance;
}
.hero-sub {
  margin: 0;
  max-width: 650px;
  color: #bac6d6;
  font-size: 13px;
  line-height: 2.1;
}
.hero-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-actions .btn { min-height: 46px; padding-inline: 19px; border-radius: 12px; font-size: 12px; }
.hero-primary { background: #b4ede2; color: #153d3c; border-color: #b4ede2; box-shadow: none; }
.hero-primary:hover { background: #cdf7ee; border-color: #cdf7ee; }
.hero-secondary { background: transparent; color: #e0e7ef; border-color: #546579; box-shadow: none; }
.hero-secondary:hover { background: rgba(255, 255, 255, .07); border-color: #8492a5; }
.hero-actions .btn:focus-visible { outline: 3px solid #b4ede2; outline-offset: 4px; }
.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 23px;
  border-top: 1px solid rgba(214, 230, 242, .14);
}
.hero-metrics { display: flex; align-items: center; margin: 0; }
.hero-metrics > div { display: flex; align-items: baseline; gap: 9px; padding-inline: 27px; }
.hero-metrics > div:first-child { padding-inline-start: 0; }
.hero-metrics > div + div { border-inline-start: 1px solid #465468; }
.hero-metrics dt { color: #bdc9d8; font-size: 12px; }
.hero-metrics dd { order: -1; margin: 0; color: #f8fafc; font-size: 25px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.hero-updated { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0; color: #a7b7c9; font-size: 10px; line-height: 1.9; }
.hero-updated time { color: #c1cbd7; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .7px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .7;
}
.eyebrow.light { color: #a5b4fc; }

/* ---------- sections ---------- */

.section { padding-block: 62px; }
.section.tight { padding-block: 42px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.section-head h2 {
  margin: 7px 0 4px;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -.6px;
}
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }
.section-head .head-copy { max-width: 620px; }

.search-wrap { position: relative; flex: 0 0 min(360px, 100%); }
.search-wrap svg {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-wrap input::placeholder { color: var(--muted-2); }
.search-wrap input:focus {
  outline: none;
  border-color: #a5b4fc;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .1);
}

/* ---------- university cards ---------- */

.uni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 16px;
}

.uni-card {
  --accent: #4f46e5;
  --accent2: #06b6d4;
  --soft: #eef2ff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.uni-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: .9;
}
.uni-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 26px 50px -28px color-mix(in srgb, var(--accent) 45%, transparent);
}

.uni-pattern {
  position: absolute;
  inset: 0;
  opacity: .09;
  pointer-events: none;
  background-color: var(--soft);
}
.pattern-grid {
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(135deg, #000, transparent 72%);
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 72%);
}
.pattern-plaid {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 12px, var(--accent) 12px 15px, transparent 15px 28px),
    repeating-linear-gradient(90deg, transparent 0 18px, var(--accent2) 18px 21px, transparent 21px 38px);
  opacity: .12;
}
.pattern-orbit {
  background-image:
    radial-gradient(circle at 78% 18%, transparent 0 27px, var(--accent) 28px 29px, transparent 30px 48px, var(--accent2) 49px 50px, transparent 51px),
    radial-gradient(circle at 18% 82%, transparent 0 17px, var(--accent) 18px 19px, transparent 20px);
}
.pattern-lines {
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, var(--accent) 18px 19px);
  opacity: .07;
}
.pattern-dots {
  background-image: radial-gradient(var(--accent) 1.3px, transparent 1.3px);
  background-size: 18px 18px;
  mask-image: linear-gradient(140deg, #000, transparent 75%);
  -webkit-mask-image: linear-gradient(140deg, #000, transparent 75%);
}

.uni-card-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.uni-monogram {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 12px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent);
}
.uni-logo {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 12px 22px -16px color-mix(in srgb, var(--accent) 80%, transparent);
}
.uni-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.uni-count b { color: var(--ink-2); font-family: var(--mono); font-size: 11px; }

.uni-card h3 {
  position: relative;
  margin: 17px 0 0;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.4;
}
.uni-card .latin {
  position: relative;
  margin-top: 2px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .4px;
}
.uni-card .tagline {
  position: relative;
  margin: 13px 0 18px;
  color: var(--muted);
  font-size: 12.2px;
  line-height: 1.85;
}
.uni-card-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.uni-card-footer .mini-stats { color: var(--muted); font-size: 11px; }
.uni-card-footer .mini-stats b { color: var(--ink-2); font-family: var(--mono); }
.card-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  transition: background .18s, color .18s, transform .18s;
}
.card-arrow svg { width: 14px; height: 14px; }
.uni-card:hover .card-arrow { background: var(--accent); color: #fff; transform: translateX(-3px); }

/* ---------- course cards ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.course-card {
  --accent: #4f46e5;
  --accent2: #06b6d4;
  --soft: #eef2ff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.course-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.course-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  box-shadow: 0 26px 50px -28px color-mix(in srgb, var(--accent) 40%, transparent);
}
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-code {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
}
.course-count { color: var(--muted); font-size: 11px; }
.course-count b { color: var(--ink-2); font-family: var(--mono); }
.course-card h3 { margin: 14px 0 3px; font-size: 21px; font-weight: 900; line-height: 1.4; }
.course-card .latin { color: var(--muted-2); font-family: var(--mono); font-size: 10px; }
.course-card p { margin: 12px 0 16px; color: var(--muted); font-size: 12.8px; line-height: 1.9; }
.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.course-card-footer .card-arrow { flex: 0 0 auto; }

/* ---------- page hero ---------- */

.page-hero {
  --accent: #4f46e5;
  --accent2: #06b6d4;
  --soft: #eef2ff;
  position: relative;
  overflow: hidden;
  padding-block: 36px 44px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 240px at 92% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    linear-gradient(135deg, var(--soft), #fff 62%);
}
.page-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  inset-inline-start: -150px;
  bottom: -260px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 55px color-mix(in srgb, var(--accent) 4%, transparent);
  pointer-events: none;
}
.page-hero .shell { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--accent); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb a { color: var(--muted); transition: color .18s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: #b7c0d1; }
.breadcrumb .current { color: var(--ink-2); font-weight: 700; }

.uni-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.uni-hero .uni-monogram {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 27px;
  font-size: 24px;
  box-shadow: 0 22px 42px -24px color-mix(in srgb, var(--accent) 80%, transparent);
}
.uni-logo-hero {
  width: 112px;
  height: 112px;
  padding: 12px;
  border-radius: 28px;
  box-shadow: 0 22px 42px -24px color-mix(in srgb, var(--accent) 80%, transparent);
}
.uni-hero h1 {
  margin: 4px 0 4px;
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.9px;
}
.uni-hero .latin { color: var(--muted-2); font-family: var(--mono); font-size: 11px; letter-spacing: .4px; }
.uni-hero .lede { max-width: 760px; margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.pill b { color: var(--ink-2); font-family: var(--mono); }
.pill.accent { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: #fff; color: var(--accent); }

/* ---------- course page ---------- */

.course-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}
.course-hero h1 {
  margin: 4px 0 2px;
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -.8px;
}
.course-hero .latin { color: var(--muted-2); font-family: var(--mono); font-size: 11px; }
.course-hero .lede { max-width: 760px; margin: 11px 0 0; color: var(--muted); font-size: 14px; }

.course-summary {
  min-width: 200px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
}
.course-summary .big {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}
.course-summary .small { color: var(--muted); font-size: 11px; }
.course-summary .divider { height: 1px; margin: 10px 0; background: var(--line); }
.course-summary .latest { color: var(--muted); font-size: 10.5px; }
.course-summary .latest b { color: var(--ink-2); font-weight: 700; }

/* ---------- lecture list ---------- */

/* Home additions have their own compact layout; course lists stay independent. */
.latest-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.latest-card { display:flex; flex-direction:column; min-width:0; padding:24px; gap:14px; border:1px solid var(--line); border-radius:22px; background:var(--surface); color:var(--ink); box-shadow:var(--shadow-xs); transition:transform .2s,border-color .2s,box-shadow .2s; }
.latest-card:hover { transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow-md); text-decoration:none; }
.latest-card:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.latest-card.newest { background:linear-gradient(135deg,var(--surface) 45%,var(--soft)); border-color:color-mix(in srgb,var(--accent) 35%,var(--line)); }
.latest-card-top,.latest-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.latest-status { color:var(--muted); font-size:11px; }
.newest .latest-status { background:var(--accent); color:#fff; padding:4px 11px; border-radius:999px; font-weight:700; }
.latest-card-heading { display:flex; align-items:flex-start; gap:13px; }
.latest-card-heading .lecture-index { flex:0 0 42px; width:42px; height:42px; }
.latest-card h3 { margin:0; font-size:17px; line-height:1.8; font-weight:800; }
.latest-english { margin:0; color:var(--accent); font-family:var(--mono); font-size:12px; text-align:right; overflow-wrap:anywhere; }
.latest-description { margin:0; color:var(--muted); font-size:12px; line-height:1.95; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.latest-card-bottom { margin-top:auto; padding-top:15px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.latest-read { display:inline-flex; align-items:center; gap:6px; color:var(--accent); font-weight:800; white-space:nowrap; }
.latest-read svg { width:17px; height:17px; }
@media(max-width:680px) { .latest-grid{grid-template-columns:1fr;gap:12px}.latest-card{padding:18px;gap:12px}.latest-card h3{font-size:15px}.latest-card-bottom{flex-wrap:wrap}.latest-status{font-size:10px} }
@media(prefers-reduced-motion:reduce) { .latest-card{transition:none}.latest-card:hover{transform:none} }

.lecture-list { display: flex; flex-direction: column; gap: 10px; }

.lecture-row {
  --accent: #4f46e5;
  --accent2: #06b6d4;
  --soft: #eef2ff;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto 34px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lecture-row:hover {
  transform: translateX(-4px);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 20px 40px -28px color-mix(in srgb, var(--accent) 45%, transparent);
}

.lecture-index {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}
.lecture-main { min-width: 0; }
.lecture-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lecture-title-line h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.55; }
.lecture-uni {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding-block: 2px;
  padding-inline: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.lecture-uni-logo {
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}
.lecture-uni-fallback {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 7.5px;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.lecture-main p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lecture-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 9.5px;
}
.lecture-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}
.lecture-side .duration { color: var(--ink-2); font-weight: 700; }
.lecture-arrow {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  transition: background .18s, color .18s, transform .18s;
}
.lecture-arrow svg { width: 14px; height: 14px; }
.lecture-row:hover .lecture-arrow { background: var(--accent); color: #fff; transform: translateX(-3px); }

/* ---------- search results ---------- */

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.results-head b { color: var(--ink); font-family: var(--mono); }
.result-list { display: flex; flex-direction: column; gap: 8px; }
.result-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.result-row:hover {
  transform: translateX(-3px);
  border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}
.result-uni {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.result-uni.has-logo {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.result-logo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}
.result-main { min-width: 0; flex: 1; }
.result-main strong { display: block; overflow: hidden; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.result-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.result-arrow { color: var(--muted-2); }
.result-arrow svg { width: 15px; height: 15px; }

/* ---------- empty / not found ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, .56);
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 17px;
  background: var(--soft, #eef2ff);
  color: var(--accent, #4f46e5);
}
.empty-icon svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0 0 5px; font-size: 18px; font-weight: 800; }
.empty-state p { max-width: 480px; margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- reader ---------- */

.reader-view {
  min-height: calc(100vh - var(--topbar));
  display: flex;
  flex-direction: column;
  background: #e9edf5;
}
.reader-bar {
  position: sticky;
  top: var(--topbar);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.reader-back:hover { color: var(--brand); }
.reader-back svg { width: 15px; height: 15px; }
.reader-title { min-width: 0; flex: 1; }
.reader-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.reader-title small { display: block; margin-top: 1px; color: var(--muted); font-size: 10.5px; }
.reader-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.reader-actions .btn { min-height: 36px; padding: 0 12px; font-size: 12px; }
.reader-frame-wrap {
  flex: 1;
  min-height: 0;
  padding: 12px;
}
.reader-frame {
  display: block;
  width: 100%;
  height: calc(100vh - var(--topbar) - 78px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -30px rgba(15, 23, 42, .4);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  z-index: 150;
  inset-inline: 0;
  bottom: 24px;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin-inline: auto;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 58px;
  padding-block: 34px;
  background: var(--navy);
  color: #c8d1e2;
}
.footer-inner {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.brand-footer .brand-text strong { color: #f5f8ff; }
.brand-footer .brand-word-accent { color: #a5f3e5; }
.brand-footer .brand-text small { color: #a8b5cd; }
.brand-footer .brand-mark { box-shadow: 0 0 0 1px #ffffff14, 0 8px 22px -10px #0008; }
.footer-brand p { margin: 14px 0 0; color: #8e9bb8; font-size: 11.5px; }
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #7f8ca8;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .5px;
}
.footer-meta span:first-child { color: #aeb9d2; }

/* ---------- boot / loading ---------- */

.boot {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.boot-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #dfe5f1;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.brand-loading { position: relative; display: grid; place-items: center; width: 90px; height: 90px; }
.brand-loading img { display: block; width: 64px; height: 64px; }
.brand-loading .boot-spinner { position: absolute; inset: 0; width: 90px; height: 90px; border-width: 2px; border-color: #dfe5f1; border-top-color: #0d9488; }
.error-card {
  max-width: 620px;
  margin: 70px auto;
  padding: 28px;
  border: 1px solid #fecaca;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.error-card h2 { margin: 0 0 8px; font-size: 20px; }
.error-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.error-card code {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 11px;
  direction: ltr;
}

/* ---------- animations ---------- */

/* ---------- books: independent, additive catalog branch ---------- */
.books-shelf,.universities-shelf{border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:var(--shadow-xs);overflow:hidden}
.books-shelf-head,.universities-shelf-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:24px;padding:26px 28px}
.shelf-heading{display:flex;align-items:center;gap:16px;min-width:0}
.shelf-heading>.shelf-icon{flex-shrink:0}
.shelf-icon{width:50px;height:50px;display:grid;place-items:center;background:#ecfdf5;color:#0f766e;border-radius:14px}
.shelf-icon svg{width:25px;height:25px}
.shelf-heading h2{margin:0;font-size:clamp(24px,3vw,30px);font-weight:900;line-height:1.5}
.shelf-heading p{margin:4px 0 0;color:var(--muted);font-size:12px}
.shelf-navigation{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin-inline-start:auto}
.shelf-count{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin:0;color:var(--muted);font-size:12px}
.shelf-count>span{white-space:nowrap}
.shelf-count strong{color:var(--ink-2);font-weight:800}
.shelf-library-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;border:1px solid #cce8df;border-radius:12px;background:#f0fdf7;color:#0f766e;font-size:12px;font-weight:700;transition:background .2s,border-color .2s}
.shelf-library-link:hover{background:#e3f8ee;border-color:#9dd6c2}
.shelf-library-link svg{width:16px;height:16px}
.books-shelf-content{padding:24px 28px 28px;border-top:1px solid var(--line);background:linear-gradient(180deg,#f5faf8,var(--surface))}
.book-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));gap:22px}
.book-card{display:grid;grid-template-columns:170px minmax(0,1fr);gap:28px;padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:20px;transition:box-shadow .2s,border-color .2s}
.book-card:hover{border-color:var(--accent);box-shadow:var(--shadow-md)}
.book-cover{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:238px;padding:22px 19px;background:linear-gradient(145deg,#102c32,var(--accent));color:#fff;border-radius:5px 16px 16px 5px;border-left:7px solid rgba(0,0,0,.2);box-shadow:8px 12px 25px -15px #163d42;direction:ltr;overflow:hidden}
.book-cover:after{content:"";position:absolute;width:220px;height:220px;border:1px solid #ffffff21;border-radius:50%;left:20%;top:45%;box-shadow:0 0 0 26px #ffffff08,0 0 0 53px #ffffff08;pointer-events:none}
.book-cover-label{font-family:var(--mono);font-size:8px;letter-spacing:1.5px;opacity:.7}
.book-cover strong{font-family:var(--mono);font-size:23px;line-height:1.22;font-weight:600;margin-top:23px;position:relative;z-index:1}
.book-cover small{font-family:var(--mono);font-size:10px;margin-top:auto;position:relative;z-index:1}
.book-card .book-cover{align-self:center}
.book-cover-orbit{margin:15px 0;color:#8ae6d1}
.book-cover-orbit svg{width:35px;height:35px}
.book-card-copy{min-width:0;align-self:center}
.book-card h3{margin:7px 0;font-size:22px;font-weight:900;line-height:1.6}
.book-card p{color:var(--muted);font-size:12.5px;line-height:1.9;margin:6px 0}
.book-latin{font-family:var(--mono);color:var(--muted);font-size:12px;text-align:right}
.book-open,.book-library-link{display:inline-flex;align-items:center;gap:8px;color:var(--accent,#0f766e);font-size:12px;font-weight:700;margin-top:20px}
.book-open svg,.book-library-link svg{width:16px;height:16px}
.book-hero-grid{display:grid;grid-template-columns:210px minmax(0,1fr);gap:36px;align-items:center;margin-top:22px}
.book-hero-grid .book-cover{min-height:280px}
.book-hero-grid h1{font-size:clamp(26px,4vw,40px);font-weight:900;line-height:1.6;margin:6px 0}
.book-scope{padding:12px 16px;background:#ecfdf5;color:#0f766e;border-radius:12px;font-size:12px;margin-top:18px}
.result-uni>svg{width:23px;height:23px}
@media(max-width:860px){.main-nav{display:flex!important;gap:12px}.main-nav a{font-size:11px}.book-hero-grid{grid-template-columns:165px minmax(0,1fr);gap:22px}}
@media(max-width:620px){.books-shelf-head{padding:20px 16px;gap:18px}.shelf-heading{gap:12px}.shelf-heading p{font-size:11px}.shelf-navigation{width:100%;gap:12px;justify-content:space-between}.shelf-count{font-size:11px;gap:4px 12px}.shelf-library-link{font-size:11px;padding:8px 12px}.books-shelf-content{padding:16px 14px 20px}.book-card{grid-template-columns:105px minmax(0,1fr);gap:15px;padding:16px}.book-card .book-cover{min-height:180px;padding:15px 10px}.book-cover strong{font-size:17px}.book-cover-label{font-size:6px}.book-cover small{font-size:8px}.book-card h3{font-size:17px}.book-card .meta-row{gap:4px}.book-card .pill{font-size:9px}.book-hero-grid{grid-template-columns:1fr}.book-hero-grid>.book-cover{width:170px;min-height:230px}.book-card p{font-size:11px}.main-nav{gap:9px}.brand-text small{display:none}.topbar-inner{gap:10px}}
@media(max-width:620px){.book-card .book-cover{height:190px}.book-card .book-cover strong{font-size:12px;overflow-wrap:anywhere}.book-card .book-cover small{font-size:7px}}
@media(max-width:380px){.books-shelf-content .book-card{grid-template-columns:minmax(0,1fr);gap:20px}.books-shelf-content .book-cover{width:105px;justify-self:center}}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-enter { animation: pageIn .34s ease both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-intro { align-items: flex-start; flex-direction: column; gap: 23px; }
  .course-grid { grid-template-columns: 1fr; }
  .uni-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .uni-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --topbar: 68px; }
  .shell, .topbar-inner, .footer-inner { width: calc(100% - 36px); }
  .main-nav { display: none; }
  .section { padding-block: 44px; }
  .section-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .search-wrap { flex-basis: auto; }
  .course-hero-inner { grid-template-columns: 1fr; align-items: start; }
  .course-summary { min-width: 0; width: 100%; }
  .lecture-row { grid-template-columns: 48px minmax(0, 1fr) 30px; gap: 13px; padding: 15px; }
  .lecture-side { display: none; }
  .lecture-index { width: 42px; height: 42px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .shell, .topbar-inner, .footer-inner { width: calc(100% - 28px); }
  .brand-text small { display: none; }
  .home-hero { border-radius: 0 0 22px 22px; }
  .hero-inner { padding-block: 32px 22px; }
  .hero-copy h1 { margin-block: 12px; font-size: clamp(26px, 6.6vw, 36px); letter-spacing: -.5px; }
  .hero-sub { font-size: 12px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { min-height: 44px; padding-inline: 16px; }
  .hero-bottom { margin-top: 27px; padding-top: 20px; flex-direction: column; align-items: stretch; gap: 17px; }
  .hero-metrics { justify-content: space-between; }
  .hero-metrics > div { justify-content: center; flex: 1; gap: 7px; padding-inline: 10px; }
  .hero-metrics > div:first-child { justify-content: flex-start; }
  .hero-metrics > div:last-child { padding-inline-end: 0; }
  .hero-metrics dd { font-size: 23px; }
  .hero-metrics dt { font-size: 11px; }
  .hero-updated { font-size: 9px; gap: 4px 8px; }
  .uni-grid { grid-template-columns: 1fr; }
  .uni-card { min-height: 210px; }
  .uni-hero-inner { align-items: flex-start; gap: 15px; }
  .uni-hero .uni-monogram { width: 62px; height: 62px; border-radius: 18px; font-size: 15px; }
  .uni-logo-hero { width: 76px; height: 76px; padding: 8px; border-radius: 19px; }
  .uni-hero h1 { font-size: 28px; }
  .page-hero { padding-block: 24px 32px; }
  .lecture-row { grid-template-columns: 38px minmax(0, 1fr) 26px; gap: 10px; padding: 13px; }
  .lecture-index { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }
  .lecture-title-line h3 { font-size: 14.5px; }
  .lecture-uni { gap: 4px; padding-inline: 3px 6px; font-size: 8px; }
  .lecture-uni-logo, .lecture-uni-fallback { width: 18px; height: 18px; }
  .lecture-main p { font-size: 11px; -webkit-line-clamp: 2; }
  .lecture-arrow { width: 26px; height: 26px; }
  .reader-bar { flex-wrap: wrap; padding: 9px 12px; gap: 8px; }
  .reader-title { order: 3; flex-basis: 100%; }
  .reader-title strong { white-space: normal; }
  .reader-actions { margin-inline-start: auto; }
  .reader-frame-wrap { padding: 6px; }
  .reader-frame { height: calc(100vh - var(--topbar) - 126px); min-height: 460px; border-radius: 10px; }
  .footer-inner { gap: 16px; }
}

/* University shelf follows the book shelf; identities and routes stay independent. */
.university-shelf-icon { background: #eef2ff; color: #4f46e5; }
.universities-shelf-content { padding: 24px 28px 28px; border-top: 1px solid var(--line); background: linear-gradient(180deg,#f7f9fe,var(--surface)); }
.university-search-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.university-search-row label { display: block; font-size: 13px; font-weight: 800; }
.university-search-row p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.university-search-row .search-wrap { min-width: 0; }
.uni-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.uni-card { padding: 22px; border-radius: 20px; min-width: 0; min-height: 0; box-shadow: none; }
.uni-card::before { display: none; }
.uni-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.uni-card-main { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 20px; align-items: center; margin-bottom: 20px; }
.uni-card-copy { min-width: 0; }
.uni-card-top { align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.uni-wordmark { font-family: var(--mono); font-weight: 800; font-size: 14px; color: var(--accent); letter-spacing: .3px; }
.uni-availability { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; white-space: nowrap; }
.uni-availability::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #94a3b8; }
.uni-availability.has-lessons { color: #16624a; background: #effaf4; border-color: #cfe8dc; }
.uni-availability.has-lessons::before { background: #27946b; }
.uni-logo-stage { position: relative; display: grid; place-items: center; height: 126px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.uni-logo-stage .uni-logo { width: 100%; height: 105px; padding: 10px; border: 0; border-radius: 0; box-shadow: none; }
.uni-card h3 { margin: 0; font-size: 19px; line-height: 1.7; }
.uni-card .latin { display: block; margin-top: 3px; text-align: right; font-size: 10px; letter-spacing: 0; line-height: 1.8; color: var(--muted); }
.uni-card .tagline { margin: 9px 0 0; }
.uni-card-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.uni-card-stats > span { white-space: nowrap; color: var(--muted); font-size: 11px; }
.uni-card-stats b { font-size: 15px; font-weight: 800; color: var(--ink-2); margin-inline-end: 4px; }
.uni-card-footer { flex-wrap: wrap; margin-top: auto; padding-top: 14px; gap: 12px; }
.uni-card-action { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; color: var(--accent); font-size: 11px; font-weight: 800; }
.uni-card .card-arrow { width: 33px; height: 33px; }
.uni-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (max-width: 960px) { .uni-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .universities-shelf-head { padding: 20px 16px; gap: 18px; }
  .universities-shelf-content { padding: 16px 14px 20px; }
  .university-search-row { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .university-search-row .search-wrap { flex-basis: auto; }
  .uni-grid { gap: 16px; }
  .uni-card { padding: 16px; }
  .uni-card-main { grid-template-columns: 86px minmax(0,1fr); gap: 14px; }
  .uni-card h3 { font-size: 17px; }
  .uni-logo-stage { height: 106px; }
  .uni-logo-stage .uni-logo { height: 88px; padding: 8px; }
}
@media (max-width: 380px) { .uni-card-main { grid-template-columns: minmax(0,1fr); gap: 16px; } .uni-logo-stage { width: 128px; justify-self: center; } }

/* The same vector mark serves every route, footer, loading state and favicon. */
@media (max-width: 620px) {
  .brand { gap: 9px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .brand-text strong { font-size: 21px; }
  .brand-footer .brand-text small { display: block; }
  .topbar .main-nav { gap: 3px; margin-inline-start: 0; }
  .topbar .main-nav a { padding-inline: 8px; font-size: 10.5px; }
}
@media (max-width: 360px) {
  .topbar-inner { gap: 6px; }
  .topbar .brand { gap: 7px; }
  .topbar .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .topbar .brand-text strong { font-size: 19px; }
  .topbar .main-nav a { padding-inline: 5px; font-size: 10px; }
  .topbar .icon-btn { width: 32px; height: 32px; }
}
