/*
 * Home Sweet Eclectic: styles for pages other than the homepage (1.10.0).
 * Moved verbatim from style.css sections 7, 8, 10, 11 and 12 so the homepage does not
 * download them. Enqueued right after style.css on every request except the front page,
 * which keeps the cascade order. Do not add homepage rules here.
 */

/* ============================================================
   7. BREADCRUMBS
   ============================================================ */
.hse-breadcrumbs {
  margin-bottom: var(--space-3);
}
.hse-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}
.hse-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--mustard);
}
.hse-breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.6rem;
  color: var(--cream-2);
}
.hse-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  color: var(--cream);
  text-decoration: none;
}
.hse-breadcrumbs a:hover {
  color: var(--mustard-2);
  text-decoration: underline;
}
.hse-breadcrumbs [aria-current="page"] {
  overflow: hidden;
  max-width: 34ch;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   8. PAGE HEAD (category hubs, archive, author, search, tag and date archives)
   A colour panel with a scalloped lower edge and a checker corner.
   ============================================================ */
.page-head {
  --r: 16px;
  position: relative;
  padding-top: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--r));
  background: var(--sw, var(--plum));
  color: var(--sw-ink, var(--cream));
  -webkit-mask: radial-gradient(var(--r) at 50% calc(100% - var(--r)), #000 calc(100% - 1px), #0000) 50% 100% / calc(2 * var(--r)) calc(2 * var(--r)) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--r)) no-repeat;
  mask: radial-gradient(var(--r) at 50% calc(100% - var(--r)), #000 calc(100% - 1px), #0000) 50% 100% / calc(2 * var(--r)) calc(2 * var(--r)) repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - var(--r)) no-repeat;
}
.page-head__deco > span {
  position: absolute;
  display: block;
  pointer-events: none;
}
.page-head__disc {
  right: 8%;
  top: -18%;
  width: clamp(12rem, 34vw, 30rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sw2, var(--cobalt));
}
.page-head__pattern {
  right: clamp(3rem, 6vw, 5rem);
  top: 0;
  width: clamp(5.5rem, 15vw, 13rem);
  height: min(52%, 13rem);
  border-radius: 0 0 0 2rem;
  background: conic-gradient(var(--night) 0 25%, var(--sw3, var(--mustard)) 0 50%, var(--night) 0 75%, var(--sw3, var(--mustard)) 0) 0 0 / 2rem 2rem;
}
.page-head__stripes {
  right: 0;
  top: 0;
  bottom: 0;
  width: clamp(1.75rem, 4vw, 3rem);
  background: repeating-linear-gradient(180deg, var(--mustard) 0 22px, var(--oxblood) 0 44px);
}
.swatch--emerald .page-head__disc,
.swatch--forest .page-head__disc { --sw2: var(--cobalt); }
.swatch--cobalt .page-head__disc { --sw2: var(--plum); }
.swatch--plum .page-head__disc,
.swatch--oxblood .page-head__disc { --sw2: var(--emerald); }
.swatch--fuchsia .page-head__disc { --sw2: var(--plum); }
.swatch--mustard .page-head__disc,
.swatch--pink .page-head__disc { --sw2: var(--emerald-hi); }
.swatch--mustard .page-head__pattern,
.swatch--pink .page-head__pattern { --sw3: var(--cream); }
.swatch--mustard .page-head__stripes { background: repeating-linear-gradient(180deg, var(--emerald) 0 22px, var(--oxblood) 0 44px); }
@media (max-width: 40rem) {
  .page-head__disc {
    right: 0;
    top: 30%;
    width: 58vw;
  }
  .page-head__pattern {
    height: 34%;
  }
}
.page-head__inner {
  position: relative;
  /* keep running text clear of the full-height stripe column on the right */
  padding-right: calc(clamp(1.75rem, 4vw, 3rem) + var(--space-2));
}
.page-head .hse-breadcrumbs li,
.page-head .hse-breadcrumbs a,
.page-head .hse-breadcrumbs li + li::before {
  color: var(--sw-ink, var(--cream));
}
.page-head__grid {
  display: grid;
  gap: var(--space-3) var(--space-5);
}
.page-head__grid > * {
  min-width: 0;
}
.page-head__sticker {
  --tilt: 8deg;
  font-family: var(--f-groovy); /* the groovy accent of every header, beside the block title */
  font-style: normal;
  font-weight: 400;
  position: absolute;
  z-index: 2;
  top: var(--space-3);
  right: clamp(4.5rem, 16vw, 14rem);
}
.page-head__main {
  position: static;
}
.page-head__main {
  padding-top: var(--space-2);
}
.page-head__title {
  font-size: var(--text-3xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.page-head__title .t-italic {
  color: var(--sw-ink, var(--cream));
}
.page-head__title .t-num {
  color: var(--sw-hi, var(--mustard-2));
}
.page-head__title .t-groovy {
  color: var(--sw-ink, var(--cream));
}
.swatch--emerald .page-head__title .t-groovy,
.swatch--plum .page-head__title .t-groovy,
.swatch--forest .page-head__title .t-groovy,
.swatch--oxblood .page-head__title .t-groovy {
  color: var(--mustard);
}
/* The intro sits on its own plate in the panel colour, above the disc, checker and
   sticker, so decoration can never cover its words at any width. */
.page-head__intro {
  position: relative;
  z-index: 3;
  max-width: 56ch;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 1.25rem;
  background: var(--sw, var(--plum));
  color: var(--sw-ink, var(--cream));
  font-family: var(--f-read);
  font-size: var(--text-md);
  line-height: 1.6;
}
.page-head__intro a {
  color: inherit;
}
.page-head__meta {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: var(--space-3) 0 0;
  padding: 0.15rem 0.9rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: var(--sw-ink, var(--cream));
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.page-head__bio {
  margin: 0 0 0.8em;
}
.page-head__intro > :last-child {
  margin-bottom: 0;
}
.page-head .search-form {
  border-color: currentColor;
  background: var(--night);
}
@media (min-width: 64rem) {
  .page-head__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }
  /* on wide screens the intro plate fills the right column, so the sticker hangs in the
     open space of the title column instead of tucking under the plate */
  .page-head__sticker {
    right: auto;
    left: 44%;
  }
}

/* ============================================================
   10. PAGINATION
   ============================================================ */
.hse-pagination {
  margin-top: var(--space-5);
}
.hse-pagination ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hse-pagination__link,
.hse-pagination__current,
.hse-pagination__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
}
.hse-pagination__link {
  border: 2px solid var(--mustard-2);
  color: var(--mustard-2);
  transition: transform var(--dur-normal) var(--ease-pop), background-color var(--dur-fast), color var(--dur-fast);
}
.hse-pagination__link:hover {
  background: var(--mustard-2);
  color: var(--night);
  transform: rotate(-4deg);
}
.hse-pagination__current {
  background: var(--mustard);
  color: var(--night);
}
.hse-pagination__gap {
  color: var(--cream-2);
}
.hse-pagination__step--prev {
  margin-right: auto;
}
.hse-pagination__step--next {
  margin-left: auto;
}
@media (max-width: 40rem) {
  .hse-pagination ul {
    justify-content: space-between;
  }
}

/* ============================================================
   11. SEARCH FORM, 404, EMPTY STATES, ROOM LINKS
   ============================================================ */
.search-form {
  display: flex;
  max-width: 40rem;
  padding: 0.3rem;
  border: 2px solid var(--mustard);
  border-radius: 999px;
  background: var(--night-2);
}
.search-form:focus-within {
  border-color: var(--mustard);
}
.search-form__field {
  flex: 1;
  min-width: 0;
  min-height: var(--touch);
  padding: 0 1rem;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--f-ui);
  font-size: var(--text-md);
}
.search-form__field::placeholder {
  color: var(--line-strong);
  opacity: 1;
}
.search-form__field:focus {
  outline: none;
}
.search-form__submit {
  min-height: var(--touch);
  padding: 0 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--mustard);
  color: var(--night);
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--dur-fast);
}
.search-form__submit:hover {
  background: var(--mustard-2);
}
.empty-state {
  padding-block: var(--space-5) var(--space-section);
}
.empty-state__art {
  position: relative;
  display: inline-block;
}
.empty-state__code {
  display: block;
  color: var(--mustard);
  font-family: var(--f-groovy);
  font-size: clamp(6rem, 3rem + 16vw, 15rem);
  line-height: 0.9;
}
.empty-state__sticker {
  position: absolute;
  top: -0.5rem;
  right: -2.5rem;
  --tilt: 10deg;
}
.empty-state__sticker--two {
  top: auto;
  right: auto;
  bottom: -1.25rem;
  left: 22%;
  --tilt: -6deg;
}
.empty-state__title {
  max-width: 18ch;
  margin-top: var(--space-3);
  font-size: var(--text-2xl);
}
.empty-state__text {
  max-width: 48ch;
  margin-top: var(--space-2);
  font-family: var(--f-read);
  font-size: var(--text-md);
}
.empty-state .search-form {
  margin-top: var(--space-4);
}
.room-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}
.room-link--emerald { --rl: var(--emerald); --rl-ink: var(--cream); }
.room-link--cobalt { --rl: var(--cobalt); --rl-ink: var(--cream); }
.room-link--pink { --rl: var(--pink); --rl-ink: var(--night); }
.room-link--mustard { --rl: var(--mustard); --rl-ink: var(--night); }
.room-link--plum { --rl: var(--plum); --rl-ink: var(--cream); }
.room-link--oxblood { --rl: var(--oxblood); --rl-ink: var(--cream); }
.room-link--forest { --rl: var(--forest); --rl-ink: var(--cream); }
.room-link--fuchsia { --rl: var(--fuchsia); --rl-ink: var(--cream); }
.room-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.4rem 1.2rem;
  border: 2px solid var(--cream);
  border-radius: 999px;
  background: var(--rl, var(--plum));
  color: var(--rl-ink, var(--cream));
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: transform var(--dur-normal) var(--ease-pop), background-color var(--dur-fast), color var(--dur-fast);
}
.room-links a:hover {
  background: var(--cream);
  color: var(--night);
  transform: rotate(-3deg);
}
.more-rooms {
  margin-top: var(--space-5);
}
.more-rooms__title {
  font-size: var(--text-xl);
  color: var(--cream);
}
.more-rooms--top {
  margin: 0 0 var(--space-4);
}
.more-rooms .room-links {
  margin-top: var(--space-2);
}
.more-rooms--top .room-links {
  margin-top: 0;
}

/* ============================================================
   12. AUTHOR BOX
   ============================================================ */
.hse-author {
  position: relative;
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--plum);
}
.hse-author__name {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
}
.hse-author__by {
  display: block;
  color: var(--mustard-2);
  font-family: var(--f-didone);
  font-style: italic;
  font-weight: 500;
  font-size: 0.7em;
}
.hse-author__name a {
  color: var(--mustard);
  font-family: var(--f-groovy);
  text-decoration: none;
}
.hse-author__name a:hover {
  color: var(--mustard-2);
}
.hse-author__bio {
  margin: 0 0 0.8em;
  color: var(--cream);
  font-family: var(--f-read);
  font-size: var(--text-base);
}
.hse-author__more {
  margin: var(--space-2) 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .room-links a:hover,
  .hse-pagination__link:hover {
    transform: none;
  }
}
