/* Scoped homepage styling; mobile layout corrections live at the end. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope/Manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
.home-page {
  --sans: "Manrope", Arial, Helvetica, sans-serif;
  --ink: #091b22;
  --teal: #006b75;
  --muted: #536269;
  --border: #d8dfda;
  --home-surface: #f0f5f2;
  --home-radius: 8px;
  font-family: var(--sans);
  color: var(--ink);
}
.home-page :is(h1, h2, h3, h4) {
  color: var(--ink);
}
.home-page
  :is(
    .category-panel h2,
    .section-title h2,
    .info-box h2,
    .collection-card h3
  ) {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.25;
}
.home-page .hero {
  background: var(--teal);
}
.home-page .hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}
.home-page .hero p {
  color: white;
}
.home-page .search-form {
  border-radius: var(--home-radius);
  box-shadow: none;
  color: var(--teal);
}
.home-page .search-form:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.home-page .hero-search:focus-within {
  outline-color: white;
}
.home-page .search-form input {
  font-size: 17px;
}
.home-page button,
.home-page .button {
  font-family: var(--sans);
  border-radius: 6px;
  background: var(--teal);
  min-height: 44px;
  font-weight: 600;
}
.home-page .button.outline {
  background: transparent;
  color: var(--teal);
  border-color: #91b2b5;
}
.home-page .button.subtle {
  background: #e5efeb;
  color: var(--teal);
  border-color: var(--border);
}
.home-page button:hover,
.home-page .button:hover {
  background: #005760;
  color: white;
}
.home-page .popular a {
  font-size: 13px;
  background: transparent;
  border-color: #a8cbd0;
}
.home-page .popular a:hover {
  background: #ffffff18;
}
.home-page :is(.panel, .person-card) {
  background: white;
  border-radius: var(--home-radius);
}
.home-page .category-panel {
  background: var(--home-surface);
  border-radius: var(--home-radius);
}
.home-page .category-panel > div > a {
  font-size: 14px;
  line-height: 1.5;
  min-width: 0;
}
.home-page .category-panel > div > a > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-page .category-panel small {
  color: var(--muted);
}
.home-page .category-panel .button {
  font-size: 14px;
}
.home-page .feature h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.home-page .feature p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.home-page .feature-years {
  color: var(--muted);
}
.home-page .feature .button {
  font-size: 15px;
}
.home-page .eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  border-radius: 5px;
  background: #e7f0ec;
  color: var(--teal);
}
.home-page .portrait {
  border-radius: 5px;
}
.home-page .week h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.15;
}
.home-page .week p {
  font-size: 14px;
  line-height: 1.5;
}
.home-page .week-content span {
  color: var(--muted);
  font-size: 14px;
}
.home-page .day time {
  color: var(--teal);
  font-size: 13px;
}
.home-page .day-event-label {
  font-size: 13px;
}
.home-page .day-events strong {
  font: 400 21px/1.2 var(--serif);
}
.home-page .day p {
  font-size: 14px;
  line-height: 1.5;
}
.home-page .section-title h2 {
  font-size: 30px;
  letter-spacing: -0.6px;
}
.home-page .section-title > a {
  font-size: 15px;
  color: var(--teal);
}
.home-page .card-name {
  font: 400 22px/1.15 var(--serif);
  letter-spacing: -0.2px;
}
.home-page .card-years {
  color: var(--muted);
}
.home-page .person-card p {
  font-size: 14px;
  line-height: 1.5;
}
.home-page .tags > span {
  background: #edf3f0;
  color: var(--muted);
  font-size: 12px;
  border-radius: 4px;
}
.home-page .info-box {
  background: var(--home-surface);
  border-radius: var(--home-radius);
}
.home-page .info-box h2 {
  font-size: 24px;
}
.home-page .info-box h2 svg {
  color: var(--teal);
}
.home-page .info-box p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.home-page .info-box .button {
  font-size: 14px;
}
.home-page .stats strong {
  font-size: 34px;
  font-weight: 800;
  color: var(--teal);
}
.home-page .stats span {
  font-size: 13px;
  color: var(--muted);
}
.home-page .collection-card {
  background: var(--home-surface);
  border-radius: var(--home-radius);
  min-width: 0;
}
.home-page .collection-card h3 {
  font-size: 24px;
  letter-spacing: -0.4px;
}
.home-page .collection-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.home-page :is(.home-mobile-catalog, .home-mobile-categories) {
  display: none;
}
/* Mobile reading order shares the same articles with the unchanged desktop grid. */
@media (min-width: 641px) {
  .home-page .home-top > :is(.feature, .empty) {
    grid-column: 2;
    grid-row: 1;
  }
  .home-page .home-top > .category-panel {
    grid-column: 1;
    grid-row: 1;
  }
  .home-page .home-top > .home-side {
    grid-column: 3;
    grid-row: 1;
  }
  .home-page .home-top > .home-recent {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 6px;
  }
  .home-page .home-side > .week {
    order: 0;
  }
  .home-page .home-side > .day {
    order: 1;
  }
}
@media (min-width: 641px) and (max-width: 1250px) {
  .home-page .home-top > .home-side {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .home-page .home-top > .home-recent {
    grid-row: 3;
  }
}
@media (min-width: 641px) and (max-width: 900px) {
  .home-page .home-top > :is(.feature, .empty) {
    grid-column: 1;
  }
  .home-page .home-top > .category-panel {
    grid-row: 2;
  }
  .home-page .home-top > .home-side {
    grid-column: 1;
    grid-row: 3;
  }
  .home-page .home-top > .home-recent {
    grid-row: 4;
  }
}
@media (max-width: 900px) {
  .home-page .home-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-page .feature {
    order: 1;
  }
  .home-page .category-panel {
    order: 2;
  }
  .home-page .category-panel > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-page .home-side {
    order: 3;
  }
  .home-page .feature h2 {
    font-size: 30px;
  }
  .home-page .info-box h2 {
    font-size: 23px;
  }
  .home-page .home-bottom > *,
  .home-page .home-top > * {
    min-width: 0;
  }
  .home-page .info-box.blue > div {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 640px) {
  .home-page .hero {
    padding: 24px 0;
  }
  .home-page .hero-content {
    width: calc(100% - 32px);
  }
  .home-page .hero-pattern {
    width: 10px;
    opacity: 0.25;
  }
  .home-page .hero h1 {
    max-width: none;
    margin-bottom: 12px;
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.15;
    letter-spacing: -0.5px;
  }
  .home-page .hero p {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
  }
  .home-page .hero-search {
    gap: 8px;
    margin-bottom: 4px;
    padding-left: 10px;
  }
  .home-page .search-form input {
    font-size: 16px;
  }
  .home-page .search-form button {
    min-width: 70px;
    font-size: 14px;
  }
  .home-page .home-mobile-catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .home-page .popular,
  .home-page .home-thematic,
  .home-page .home-desktop-categories,
  .home-page .home-recent .person-card:nth-child(n + 3) {
    display: none;
  }
  .home-page .home-top > .home-recent {
    order: 2;
    margin-top: 0;
  }
  .home-page .category-panel {
    order: 3;
  }
  .home-page .home-side {
    order: 4;
  }
  .home-page .home-side > .day {
    order: 0;
  }
  .home-page .home-side > .week {
    order: 1;
  }
  .home-page .home-mobile-categories {
    display: grid;
  }
  .home-page .home-content {
    padding-top: 16px;
  }
  .home-page .category-panel {
    padding: 16px;
  }
  .home-page .category-panel > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .home-page .category-panel > div > a {
    gap: 10px;
    min-height: 44px;
    padding-block: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .home-page .category-panel > div > a > span {
    overflow-wrap: normal;
  }
  .home-page .category-panel small {
    font-size: 12px;
  }
  .home-page .feature {
    display: flow-root;
    min-height: 0;
    padding: 16px;
  }
  .home-page .feature-portrait {
    float: left;
    display: block;
    width: clamp(80px, 24vw, 96px);
    margin: 0 14px 12px 0;
  }
  .home-page .feature .portrait-large {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 3 / 4;
  }
  .home-page .feature-body {
    display: block;
  }
  .home-page .eyebrow {
    max-width: 100%;
    white-space: normal;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  .home-page .feature h2 {
    margin-bottom: 6px;
    font-size: 25px;
    line-height: 1.12;
    overflow-wrap: normal;
  }
  .home-page .feature-years {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
  }
  .home-page .feature p {
    clear: both;
    display: block;
    overflow: visible;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.5;
    -webkit-line-clamp: unset;
  }
  .home-page .feature .tags {
    margin-bottom: 16px;
  }
  .home-page .feature .button {
    margin-top: 0;
    padding: 10px 14px;
    font-size: 14px;
  }
  .home-page .week-content {
    display: flow-root;
  }
  .home-page .week-content .portrait {
    float: left;
    width: 80px;
    min-height: 0;
    max-height: none;
    height: auto;
    aspect-ratio: 3 / 4;
    margin: 0 14px 12px 0;
  }
  .home-page .week h3 {
    max-width: none;
    padding-right: 20px;
    font-size: 23px;
    line-height: 1.15;
    overflow-wrap: normal;
  }
  .home-page .week p {
    clear: both;
    display: block;
    overflow: visible;
    margin-top: 8px;
    font-size: 15px;
    -webkit-line-clamp: unset;
  }
  .home-page .week-content > svg {
    position: absolute;
    top: 0;
    right: 0;
  }
  .home-page .day-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .home-page .day time {
    padding-block: 4px;
  }
  .home-page .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
  }
  .home-page .section-title h2 {
    font-size: 25px;
    line-height: 1.2;
  }
  .home-page .section-title > a {
    min-height: 44px;
    font-size: 14px;
  }
  .home-page .person-card {
    display: flow-root;
    min-height: 0;
    padding: 16px;
  }
  .home-page .person-card .portrait {
    float: left;
    width: 80px;
    height: auto;
    aspect-ratio: 3 / 4;
    margin: 0 14px 12px 0;
  }
  .home-page .person-card-content {
    display: block;
  }
  .home-page .card-name {
    font-size: 23px;
    line-height: 1.15;
    padding-right: 20px;
    overflow-wrap: normal;
  }
  .home-page .card-years {
    display: block;
    font-size: 14px;
  }
  .home-page .person-card p {
    clear: both;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.5;
  }
  .home-page .tags {
    margin-top: 0;
  }
  .home-page .tags > span {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.4;
  }
  .home-page .info-box {
    min-width: 0;
    padding: 16px;
  }
  .home-page .info-box h2 {
    align-items: flex-start;
    gap: 10px;
    font-size: 22px;
    line-height: 1.25;
  }
  .home-page .info-box h2 svg {
    width: 22px;
    margin-top: 3px;
  }
  .home-page .info-box p {
    font-size: 15px;
    line-height: 1.5;
  }
  .home-page .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .home-page .stats strong {
    font-size: clamp(28px, 8vw, 34px);
  }
  .home-page .stats span {
    font-size: 12px;
  }
  .home-page .collection-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .home-page .collection-card {
    padding: 18px;
  }
  .home-page .collection-card > svg {
    margin-bottom: 12px;
  }
  .home-page .collection-card h3 {
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: normal;
  }
  .home-page .collection-card p {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: normal;
  }
}
