/* Browse surfaces share the same cards. The exam and PDF readers keep their own layout. */
html {
  scrollbar-gutter: stable;
}
.site-header {
  background: white;
  border-color: #d5e4df;
}
.site-header .header-inner {
  max-width: 1280px;
  min-height: 68px;
}
.site-header .brand {
  color: #183c36;
  font-size: 28px;
}
.site-header nav {
  gap: clamp(16px, 2.3vw, 34px);
}
.site-header nav a {
  font-size: 15px;
  white-space: nowrap;
  padding: 22px 0 19px;
}
.library-hero {
  background: #edf6f2;
  box-shadow: 0 0 0 100vmax #edf6f2;
  clip-path: inset(0 -100vmax);
  color: #132b29;
  padding: 32px 0 30px;
}
.library-hero h1, .library-intro h1 {
  margin-bottom: 8px;
}
.library-intro p {
  margin: 0;
  color: #415955;
  font-size: 17px;
  max-width: 64ch;
}
.library-intro {
  color: #132b29;
  padding: 35px 0 6px;
}
.library-grid {
  display: grid;
  gap: 16px;
}
.library-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}
.library-card {
  --accent: #176c62;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #cbded8;
  border-top: 4px solid var(--accent);
  border-radius: 11px;
  background: white;
  color: #132b29;
  overflow-wrap: anywhere;
}
.tone-study, .tone-study .library-card { --accent: #176c62; }
.tone-unit, .tone-unit .library-card { --accent: #709724; }
.tone-mock, .tone-mock .library-card { --accent: #276fb0; }
.tone-papers, .tone-papers .library-card { --accent: #238b88; }
a.library-card {
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
a.library-card:hover {
  background: #f6fbf8;
  box-shadow: 0 4px 12px #173c3610;
}
.library-card h2, .library-card h3, .library-card h4 {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.24;
  margin: 0 0 7px;
}
.library-card h2 {
  font-size: 25px;
}
.library-card h3, .library-card h4 {
  font-size: 19px;
}
.library-card p {
  margin: 0 0 12px;
  color: #415955;
  font-size: 14px;
  line-height: 1.45;
}
.subject-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) 18px;
  gap: 6px 12px;
  align-content: start;
}
.subject-card h3, .subject-card p {
  margin: 0;
}
.subject-card p {
  grid-column: 1 / -1;
}
.subject-card > .icon, .card-actions .icon {
  width: 17px;
  height: 17px;
}
.subject-card > .icon {
  align-self: center;
  color: var(--teal-dark);
}
.subject-directory .list-filters, .library-collection .list-filters {
  gap: 12px;
  margin: 16px 0 12px;
}
.subject-directory .library-hero .list-filters {
  margin: 14px 0 0;
}
.subject-directory #directory {
  padding-top: 10px;
}
.subject-directory .compact, .library-collection .compact,
.subject-directory select, .library-collection select {
  border-color: #bbcdc9;
}
.library-group {
  margin: 0 0 28px;
}
.library-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 15px;
  margin: 12px 0;
  border-radius: 7px;
  background: #e8f3ef;
  color: #183c36;
  font: 700 22px/1.3 Georgia, 'Times New Roman', serif;
}
.library-group-heading h2 {
  margin: 0;
  font: inherit;
}
.library-group-heading button {
  background: white;
  min-height: 38px;
  padding: 7px 11px;
  color: var(--teal-dark);
  font-size: 13px;
  border-color: #bbcdc9;
}
.card-label {
  background: #e4f1ec;
  color: #125447;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 7px;
  border-radius: 4px;
  margin-bottom: 9px;
}
.library-card .source-details {
  margin: -6px 0 12px;
}
.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 2px;
  margin-top: auto;
}
.card-actions .button, .card-actions button {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
}
.matching-guide {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 600;
}
.library-empty {
  padding: 28px 0;
}
#matching-resources .library-grid {
  margin-bottom: 28px;
}
@media (max-width: 1000px) {
  .library-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 760px) {
  .site-header .header-inner {
    display: block;
    padding-top: 14px;
  }
  .site-header nav {
    gap: 0 18px;
    flex-wrap: wrap;
    margin-top: 6px;
  }
  .site-header nav a {
    padding: 9px 0 8px;
    font-size: 14px;
  }
  .library-hero {
    padding: 27px 0 25px;
  }
  .library-intro {
    padding-top: 26px;
  }
  .library-intro p {
    font-size: 15px;
  }
  .library-grid {
    gap: 12px;
  }
  .library-card {
    padding: 14px;
  }
  .subject-tabs {
    flex-wrap: wrap;
    gap: 0 14px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
  .subject-tabs a {
    font-size: 14px;
    padding: 9px 2px;
  }
}
@media (max-width: 560px) {
  .library-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .library-collection select, .subject-directory select {
    flex: 1 1 140px;
    width: 0;
  }
}

.access-notice {
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 10px 20px;
 margin: 18px 0;
 padding: 14px 18px;
 border: 1px solid #cbded8;
 border-radius: 8px;
 background: #edf6f2;
}
.access-notice p { margin: 0; color: #183c36; font-size: 15px; }
