/* WordPress-specific templates and safeguards. */

html {
  overflow-x: clip;
}

.site-main {
  min-height: 100vh;
}

.skip-link:focus {
  position: fixed;
  z-index: 100000;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.8rem 1rem;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}

.inner-site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 5.2rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid #c9c9c3;
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inner-brand {
  grid-column: 1;
  justify-self: start;
  font-size: clamp(1rem, 1.65vw, 1.6rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.055em;
}

.inner-nav {
  grid-column: 2;
  display: flex;
  gap: clamp(1rem, 2.3vw, 2.5rem);
}

.inner-nav a,
.inner-cta {
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}

.inner-nav a:hover,
.inner-nav a:focus-visible,
.inner-cta:hover,
.inner-cta:focus-visible {
  outline: none;
  border-color: var(--ink);
}

.inner-cta {
  grid-column: 3;
  justify-self: end;
  border-color: currentColor;
}

.read-week-image img,
.article-cover img,
.single-featured-image img {
  display: block;
}

.read-week-image img {
  position: absolute;
  inset: 0;
}

.single-entry-header {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
  padding: clamp(5rem, 9vw, 9rem) 0 clamp(3rem, 6vw, 5.5rem);
}

.single-entry-header h1,
.archive-header h1,
.not-found-page h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.5rem, 8.6vw, 8.5rem);
  font-weight: 850;
  line-height: 0.87;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.single-meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.single-deck {
  max-width: 48rem;
  margin: 2.25rem 0 0;
  color: #444;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.35;
}

.single-featured-image {
  width: min(100% - 1.5rem, 1500px);
  max-height: 78rem;
  margin: 0 auto clamp(4rem, 8vw, 8rem);
  overflow: hidden;
  border-radius: 1.2rem;
  background: #0c1622;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  max-height: 78rem;
  object-fit: cover;
}

.entry-content {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
  color: #202020;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.78;
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 1.6rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2.8em;
  margin-bottom: 0.7em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.entry-content h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.entry-content h3 { font-size: clamp(1.55rem, 3vw, 2.25rem); }

.entry-content a {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.12em;
}

.entry-content blockquote {
  margin-inline: 0;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 0.35rem solid var(--lime);
  font-size: 1.25em;
  font-weight: 650;
  line-height: 1.4;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.8rem;
}

.entry-content .alignwide {
  width: min(100vw - 3rem, 1120px);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-footer {
  display: block;
  width: min(100% - 2rem, 760px);
  margin: 3.5rem auto 0;
  padding: 1rem 0 5rem;
  border-top: 1px solid #c9c9c3;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.related-journal {
  border-top: 1px solid #d9d9d2;
}

.archive-page,
.standard-page,
.not-found-page {
  min-height: 65vh;
}

.archive-header {
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.archive-header h1 {
  max-width: 14ch;
}

.archive-description {
  max-width: 42rem;
  margin-top: 1.75rem;
  color: #444;
  font-size: 1.05rem;
  line-height: 1.55;
}

.archive-description p { margin: 0; }
.archive-grid { row-gap: 5rem; }

.navigation.pagination {
  margin-top: 5rem;
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.page-numbers {
  display: grid;
  min-width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding-inline: 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--lime);
}

.empty-state,
.not-found-page > p:not(.section-label) {
  max-width: 35rem;
  color: #444;
  font-size: 1.1rem;
  line-height: 1.6;
}

.not-found-page .button { margin-top: 1.5rem; }

.search-form {
  display: flex;
  max-width: 38rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--ink);
}

.search-form label { flex: 1; }

.search-field {
  width: 100%;
  padding: 1rem 0;
  border: 0;
  outline: 0;
  font: inherit;
}

.search-submit {
  border: 0;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
}

.trj-newsletter-success[hidden] { display: none; }

@media (max-width: 720px) {
  .inner-site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    min-height: 0;
    padding: 0;
  }

  .inner-brand {
    grid-column: 1;
    grid-row: 1;
    padding: 1.1rem 1rem;
    font-size: 0.82rem;
  }

  .inner-cta {
    grid-column: 2;
    grid-row: 1;
    margin-right: 1rem;
    font-size: 0.62rem;
  }

  .inner-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    gap: 0;
    overflow-x: auto;
    padding-inline: 0.35rem;
    border-top: 1px solid #d9d9d2;
    scrollbar-width: none;
  }

  .inner-nav::-webkit-scrollbar { display: none; }

  .inner-nav a {
    min-height: 2.9rem;
    flex: 0 0 auto;
    padding: 0.9rem 0.65rem;
    font-size: 0.65rem;
  }

  .single-entry-header {
    width: calc(100% - 2rem);
    padding: 4.5rem 0 3rem;
  }

  .single-entry-header h1,
  .archive-header h1,
  .not-found-page h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .single-featured-image {
    width: calc(100% - 1rem);
    margin-bottom: 4rem;
    border-radius: 0.85rem;
  }

  .single-deck { font-size: 1.15rem; }
  .entry-footer { padding-bottom: 4rem; }
  .archive-grid { row-gap: 3.5rem; }

  .entry-content .alignwide {
    width: calc(100vw - 1rem);
  }
}
