:root {
  --ink: #152033;
  --muted: #586476;
  --line: #dbe3ef;
  --paper: #ffffff;
  --soft: #f3f7fb;
  --blue: #075ed8;
  --green: #16745d;
  --gold: #8f6814;
  --red: #b13b4c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: min(190px, 48vw);
  height: auto;
  display: block;
}

.top-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-nav a {
  padding: 10px 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}

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

main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 56px;
}

.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 18px 0 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 40px;
  line-height: 1.08;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

.intro-stats {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.finder {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-group {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c8d4e4;
  border-radius: 6px;
  font: inherit;
}

.results {
  min-width: 0;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.results-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.session-block {
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.session-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.session-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.paper-table th,
.paper-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

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

.paper-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.paper-table td {
  font-size: 14px;
}

.paper-id {
  font-weight: 700;
}

.paper-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.paper-link:hover,
.paper-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 7px;
  color: var(--muted);
  background: #eef3f8;
  border: 1px solid #d9e3ee;
  border-radius: 6px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.open-button,
.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.open-button:hover,
.open-button:focus-visible,
.load-more:hover,
.load-more:focus-visible {
  background: #064eb1;
}

.load-more {
  width: 100%;
  margin-top: 6px;
  background: var(--blue);
}

.load-more[hidden] {
  display: none;
}

.subject-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  color: var(--ink);
  background: #eef3f8;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 820px) {
  .site-header,
  .page-intro,
  .results-head,
  .session-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
  }

  main {
    padding-top: 20px;
  }

  h1 {
    font-size: 32px;
  }

  .intro-stats,
  .results-head p:last-child {
    text-align: left;
  }

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

  .filters {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .filters {
    grid-template-columns: 1fr;
  }

  .paper-table,
  .paper-table tbody,
  .paper-table tr,
  .paper-table td {
    display: block;
    width: 100%;
  }

  .paper-table thead {
    display: none;
  }

  .paper-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .paper-table tr:last-child {
    border-bottom: 0;
  }

  .paper-table td {
    padding: 4px 0;
    border: 0;
  }

  .open-button {
    width: 100%;
    margin-top: 6px;
  }
}
