:root {
  --bg: #f5f0e8;
  --bg-deep: #e7ded0;
  --paper: rgba(255, 252, 247, 0.82);
  --paper-strong: rgba(255, 250, 243, 0.94);
  --line: rgba(31, 43, 60, 0.12);
  --ink: #1f2b3c;
  --ink-soft: rgba(31, 43, 60, 0.72);
  --accent: #8f4f2d;
  --accent-soft: rgba(143, 79, 45, 0.12);
  --accent-2: #3a5d70;
  --shadow: 0 18px 50px rgba(31, 43, 60, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(143, 79, 45, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(58, 93, 112, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 40%, var(--bg-deep) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(31, 43, 60, 0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

#site-header,
#site-footer,
.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.8rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18rem;
}

.brand-mark {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.9rem, 1.25vw, 1.15rem);
  line-height: 1;
  max-width: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(31, 43, 60, 0.08);
}

.page-shell {
  padding: 2rem 0 4rem;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 250, 243, 0.9), rgba(245, 236, 223, 0.78));
  border: 1px solid rgba(31, 43, 60, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 2rem;
  padding: 3rem;
}

.page-hero {
  padding: 2.6rem 2.4rem;
}

.page-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
}

.page-hero-top > div:first-child {
  min-width: 0;
}

.hero-view-control {
  width: min(240px, 100%);
  flex: 0 0 240px;
}

.view-toggle {
  width: 100%;
  min-height: 88px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  border: 1px solid rgba(31, 43, 60, 0.08);
  border-radius: 20px;
  padding: 0.95rem 1rem 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 235, 223, 0.9)),
    radial-gradient(circle at top right, rgba(58, 93, 112, 0.12), transparent 48%);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(31, 43, 60, 0.1);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.view-toggle::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(143, 79, 45, 0.16), rgba(58, 93, 112, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.view-toggle::after {
  content: attr(data-next-view);
  position: absolute;
  top: 22px;
  right: 18px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.view-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(31, 43, 60, 0.14);
  border-color: rgba(58, 93, 112, 0.18);
}

.view-toggle:active {
  transform: translateY(1px);
}

.view-toggle[data-view-mode="table"] {
  background:
    linear-gradient(145deg, rgba(245, 251, 253, 0.96), rgba(228, 240, 245, 0.94)),
    radial-gradient(circle at top right, rgba(58, 93, 112, 0.18), transparent 48%);
  border-color: rgba(58, 93, 112, 0.16);
}

.view-toggle-kicker,
.view-toggle-mode,
.view-toggle-hint {
  position: relative;
  z-index: 1;
}

.view-toggle-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.view-toggle-mode {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  line-height: 0.9;
  color: var(--ink);
}

.view-toggle-hint {
  font-size: 0.82rem;
  color: rgba(31, 43, 60, 0.62);
  font-weight: 700;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 79, 45, 0.16), transparent 68%);
}

.eyebrow,
.panel-label {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.92;
  max-width: 10ch;
}

.hero-copy h1 {
  max-width: 16ch;
  font-size: clamp(2.55rem, 5.6vw, 4.35rem);
}

.hero-nowrap {
  white-space: nowrap;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.96;
}

h3 {
  font-size: 1.6rem;
  line-height: 1;
}

.lead,
.section-note,
.paper-meta,
.paper-institution,
.footer-copy,
.principle-card p,
.panel-list,
.empty-state {
  color: var(--ink-soft);
  line-height: 1.7;
}

.lead {
  max-width: 62ch;
  margin: 1.15rem 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: #fff8f1;
  box-shadow: 0 16px 28px rgba(31, 43, 60, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 43, 60, 0.08);
}

.hero-panel,
.principle-card,
.paper-card,
.section-card,
.filter-shell {
  background: var(--paper);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.08);
}

.hero-panel {
  border-radius: 24px;
  padding: 1.5rem;
  align-self: stretch;
}

.panel-list {
  padding-left: 1.1rem;
  margin: 0 0 1.5rem;
}

.panel-list li + li {
  margin-top: 0.55rem;
}

.stats-grid,
.section-grid,
.paper-grid,
.principle-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 43, 60, 0.08);
}

.stat-card-link {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.stat-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 43, 60, 0.1);
  border-color: rgba(58, 93, 112, 0.16);
  background: rgba(255, 255, 255, 0.94);
}

.stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent-2);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.section-block {
  margin-top: 2.2rem;
}

.section-block.compact {
  margin-top: 1.6rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-note {
  max-width: 34rem;
  margin: 0;
  text-align: right;
}

.heading-inline {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-inline-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.section-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.institution-module {
  display: grid;
  gap: 1rem;
}

.wordcloud-module {
  display: grid;
  gap: 1rem;
}

.filter-shell.institution-filter-shell {
  grid-template-columns: repeat(5, minmax(0, calc((100% - 2.6rem) / 5)));
  gap: 0.65rem;
  margin-top: 0;
}

.filter-shell.institution-filter-shell .filter-field {
  min-width: 0;
}

.filter-shell.institution-filter-shell .filter-field select,
.filter-shell.institution-filter-shell .filter-field input {
  min-width: 0;
}

.institution-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  gap: 1.2rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--paper);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.08);
}

.wordcloud-panel {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--paper);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.08);
}

.institution-chart-panel,
.institution-legend-panel {
  border-radius: calc(var(--radius-md) + 2px);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(31, 43, 60, 0.06);
  padding: 1.25rem;
}

.institution-chart-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.institution-chart-shell {
  width: min(100%, 320px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.institution-pie {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(rgba(31, 43, 60, 0.12) 0deg 360deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 24px 38px rgba(31, 43, 60, 0.12);
}

.institution-pie-center {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 251, 245, 0.98), rgba(245, 238, 228, 0.96));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(31, 43, 60, 0.06);
}

.institution-pie-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.institution-pie-value {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 0.9;
  color: var(--accent-2);
}

.institution-pie-meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.institution-legend-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.institution-legend-head p {
  margin: 0;
  color: var(--ink-soft);
  text-align: right;
}

.institution-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.institution-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.8rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(31, 43, 60, 0.06);
}

.institution-legend-link {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.institution-legend-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(31, 43, 60, 0.09);
  border-color: rgba(58, 93, 112, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

.institution-legend-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.3rem;
  border-radius: 50%;
  flex: 0 0 12px;
}

.institution-legend-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.institution-legend-copy strong {
  font-size: 0.94rem;
  line-height: 1.25;
  word-break: break-word;
}

.institution-legend-copy span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.wordcloud-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.wordcloud-head p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
}

.wordcloud-canvas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.85rem;
  min-height: 220px;
  padding: 1rem;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(143, 79, 45, 0.08), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(247, 240, 229, 0.72));
  border: 1px solid rgba(31, 43, 60, 0.06);
}

.wordcloud-term {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(31, 43, 60, 0.08);
  color: var(--word-color);
  font-size: var(--word-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: var(--word-opacity);
  box-shadow: 0 12px 22px rgba(31, 43, 60, 0.06);
}

.subsection-block + .subsection-block {
  margin-top: 2rem;
}

.section-card,
.paper-card,
.principle-card {
  border-radius: var(--radius-md);
  padding: 1.3rem;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.section-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.section-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.section-count {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
}

.text-link {
  font-weight: 700;
  color: var(--accent-2);
}

.muted-link {
  font-weight: 700;
  color: rgba(31, 43, 60, 0.48);
}

.paper-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grouping-note {
  color: rgba(31, 43, 60, 0.58);
  font-size: 0.92rem;
}

.inline-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.inline-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.inline-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 43, 60, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.inline-nav-link.disabled {
  color: rgba(31, 43, 60, 0.42);
}

.paper-bucket + .paper-bucket {
  margin-top: 1.2rem;
}

.paper-bucket-stack {
  display: block;
}

.expandable-paper-group:not(.expanded) .paper-card-collapsed {
  display: none;
}

.expandable-paper-group:not(.expanded) .paper-row-collapsed {
  display: none;
}

.expandable-paper-group:not(.expanded) .bucket-hidden-until-expand {
  display: none;
}

.paper-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.paper-bucket-head h3 {
  font-size: 1.35rem;
}

.paper-expand-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.paper-expand-toggle {
  min-height: 40px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(31, 43, 60, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.paper-expand-toggle:hover {
  background: rgba(255, 255, 255, 0.98);
}

.paper-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  min-height: 230px;
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.08);
  overflow: hidden;
}

.paper-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.paper-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(58, 93, 112, 0.12);
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 800;
}

.paper-badge-featured {
  background: rgba(179, 92, 32, 0.18);
  color: #b35c20;
  box-shadow: inset 0 0 0 1px rgba(179, 92, 32, 0.16);
}

.paper-publication {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.paper-title {
  font-size: 1.18rem;
  line-height: 1.08;
}

.paper-front-copy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.paper-tag-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.paper-tag-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.paper-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(58, 93, 112, 0.08);
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
}

.paper-institution,
.paper-meta {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.subsection-intro {
  margin: 0.55rem 0 0;
  max-width: 64ch;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.97rem;
}

.paper-actions {
  margin-top: auto;
  padding-top: 0.25rem;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent-2);
}

.paper-button {
  min-height: 38px;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(31, 43, 60, 0.1);
}

.filter-shell {
  display: grid;
  grid-template-columns:
    minmax(0, 1.7fr)
    minmax(220px, 0.8fr)
    minmax(200px, 0.8fr)
    minmax(180px, 0.7fr);
  gap: 1rem;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1.4rem;
}

.subtype-filter-shell {
  margin-top: 0;
  margin-bottom: 1rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.filter-field label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 1px solid rgba(31, 43, 60, 0.1);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.paper-table-shell {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.06);
}

.paper-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.paper-table th,
.paper-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(31, 43, 60, 0.08);
  text-align: left;
  vertical-align: top;
}

.paper-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 800;
  background: rgba(247, 243, 236, 0.92);
}

.paper-table tbody tr:last-child td {
  border-bottom: none;
}

.paper-table-title {
  min-width: 280px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.paper-table-type {
  width: 120px;
}

.paper-table-tags {
  min-width: 180px;
}

.table-badge {
  white-space: nowrap;
}

.table-tag {
  margin: 0 0.35rem 0.35rem 0;
}

.paper-table-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(58, 93, 112, 0.08);
  color: var(--accent-2);
  font-weight: 800;
  white-space: nowrap;
}

.principle-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.empty-state {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(31, 43, 60, 0.16);
}

.year-share-card {
  border-radius: var(--radius-md);
  padding: 1.3rem;
  background: var(--paper-strong);
  border: 1px solid rgba(31, 43, 60, 0.08);
  box-shadow: 0 16px 34px rgba(31, 43, 60, 0.08);
}

.share-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(31, 43, 60, 0.08);
  overflow: hidden;
}

.share-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hidden {
  display: none;
}

.site-footer {
  padding: 0 0 2.5rem;
}

.footer-card {
  border-top: 1px solid rgba(31, 43, 60, 0.1);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  min-height: 44px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(31, 43, 60, 0.12);
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.92);
  color: var(--ink);
  box-shadow: 0 16px 32px rgba(31, 43, 60, 0.16);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.98);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2.2rem;
  }

  .page-hero-top {
    flex-direction: column;
  }

  .hero-view-control {
    width: 100%;
    flex-basis: auto;
  }

  .section-heading,
  .footer-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    text-align: left;
  }

  .filter-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #site-header,
  #site-footer,
  .page-shell {
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .page-hero {
    padding: 1.5rem;
  }

  .paper-grid,
  .section-grid,
  .principle-grid,
  .institution-legend-grid {
    grid-template-columns: 1fr;
  }

  .institution-panel {
    grid-template-columns: 1fr;
  }

  .institution-chart-shell {
    width: min(100%, 280px);
  }

  .institution-legend-head {
    display: grid;
    gap: 0.35rem;
  }

  .institution-legend-head p {
    text-align: left;
  }
}
