:root {
  --bg: #f7f7f2;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --ink: #1f2a36;
  --muted: #697586;
  --line: rgba(31, 42, 54, 0.12);
  --blue: #0d4c8c;
  --blue-deep: #0a3a69;
  --green: #1f8c62;
  --green-soft: rgba(31, 140, 98, 0.12);
  --shadow: 0 6px 18px rgba(31, 42, 54, 0.05);
  --radius-xl: 0;
  --radius-lg: 0;
  --radius-md: 0;
  --content-width: 820px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.app-shell {
  width: min(calc(100% - 24px), var(--content-width));
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.4rem 0 0.4rem;
  margin-top: 0.2rem;
  border-bottom: 1px solid rgba(31, 42, 54, 0.12);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  flex: 0 0 auto;
  color: #5f6c7b;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.top-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.65rem 0.25rem;
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 1px solid rgba(31, 42, 54, 0.1);
  box-shadow: none;
}

.hero__logo {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
}

.ladder-panel {
  margin-top: 0.55rem;
  padding: 0.8rem;
  border: 1px solid rgba(31, 42, 54, 0.08);
  border-radius: var(--radius-xl);
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: none;
}

.rungs {
  display: grid;
  gap: 0.55rem;
}

.rung-card {
  padding: 0.55rem 0;
  border: 0;
  border-top: 1px solid rgba(31, 42, 54, 0.12);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.rung-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.rung-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.22rem;
}

.rung-card__title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
}

.rung-card__updated {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.option-list {
  display: grid;
  gap: 0.42rem;
}

.option {
  display: grid;
  gap: 0.2rem;
  padding: 0.46rem 0;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 0;
  border-top: 1px solid rgba(31, 42, 54, 0.07);
}

.option:first-child {
  border-top: 0;
}

.option__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.65rem;
}

.option__institution {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
}

.option__institution a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.option__institution a:hover,
.option__institution a:focus-visible {
  color: var(--blue);
  border-color: rgba(13, 76, 140, 0.22);
  outline: none;
}

.option__yield {
  flex: 0 0 auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.option__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.option__meta span:not(:last-child)::after {
  content: "•";
  margin-left: 0.7rem;
  color: rgba(77, 104, 128, 0.45);
}

.footer {
  padding: 0.7rem 0 0.1rem;
}

.footer__disclaimer,
.footer__updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer__updated {
  margin-top: 0.65rem;
}

@media (min-width: 700px) {
  .top-nav {
    justify-content: center;
    gap: 1.4rem;
  }

  .hero {
    padding: 0.45rem 0.8rem 0.3rem;
  }

  .ladder-panel {
    padding: 1rem;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 17px;
  }

  .app-shell {
    width: min(calc(100% - 16px), var(--content-width));
  }

  .hero,
  .ladder-panel,
  .rung-card,
  .option {
    border-radius: 0;
  }

  .option__top {
    flex-direction: column;
  }
}

@media print {
  html {
    background: #ffffff;
    font-size: 12pt;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .hero,
  .ladder-panel,
  .rung-card,
  .option {
    box-shadow: none;
    background: #ffffff;
    border-color: #c9d3dc;
  }

  .rungs {
    grid-template-columns: 1fr;
  }

  a {
    text-decoration: none;
  }
}
