* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eee9dd;
  color: #15120d;
  font-family: Georgia, "Times New Roman", serif;
  --heading-1: clamp(0.95rem, 1dvw, 1.15rem);
  --heading-2: clamp(1.1rem, 1.35dvw, 1.55rem);
  --heading-3: clamp(1.35rem, 1.85dvw, 2rem);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0.35 0.7 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 96px 96px;
  content: "";
  image-rendering: pixelated;
  mix-blend-mode: multiply;
  opacity: 0.18;
  pointer-events: none;
}

::selection {
  background: #ffe84a;
  color: unset;
}

.page {
  min-height: 100dvh;
  width: 100dvw;
  padding: 1rem;
}

.paper {
  display: flex;
  min-height: calc(100dvh - 2rem);
  width: 100%;
  flex-direction: column;
  border-block: 3px solid #15120d;
}

.masthead {
  border-bottom: 3px solid #15120d;
  padding-block: 0.5rem;
  text-align: center;
}

.source {
  margin: 0;
  color: #6e1d18;
  font-size: 0.65rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  font-size: clamp(2.5rem, 5.9dvw, 6.75rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.78;
}

.title-text {
  position: relative;
  top: 6px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.title-the {
  display: inline-block;
  position: relative;
}

.title-flourish {
  display: flex;
  position: absolute;
  top: -20%;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 0.34em;
  overflow: hidden;
  transform: translateY(-50%);
}

.title-flourish:first-child {
  right: calc(50% + 1.75em);
}

.title-flourish-left {
  transform: translateY(-50%) scaleX(-1);
}

.title-flourish:last-child {
  left: calc(50% + 1.75em);
}

.title-flourish img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edition {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  border-block: 1px solid #15120d;
  padding-block: 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: inherit;

  a {
    color: inherit;
  }
}

.edition span {
  min-width: 0;
  text-align: center;
}

.edition span:last-child {
  text-align: center;
}

.edition-volume {
  display: none;
}

.newspaper-masonry {
  display: block;
  flex: 1;
}

.newspaper-article {
  border-bottom: 1px solid #15120d;
  padding: 0.75rem;
}

.newspaper-article-job {
  padding: 0.5rem;
}

.newspaper-article-job .newspaper-article-inner {
  border: 1px solid #15120d;
  box-shadow: inset 0 0 0 2px #ead4d9, inset 0 0 0 3px #15120d;
  background: #ead4d9;
  padding: 0.75rem;
  text-align: center;
}

.newspaper-article-job .article-meta {
  color: #15120d;
}

.newspaper-article-job .newspaper-heading {
  font-size: clamp(0.95rem, 1.1dvw, 1.2rem);
  text-transform: uppercase;
}

.newspaper-article-job .newspaper-copy {
  font-size: 0.68rem;
  text-align: center;
}

.newspaper-article-ad .newspaper-article-inner {
  border: 2px solid #15120d;
  background: #d7e8df;
  padding: 0.75rem;
}

.newspaper-article-ad .newspaper-heading {
  color: #143f32;
  font-size: clamp(1.65rem, 2.35dvw, 2.6rem);
  text-align: center;
}

.newspaper-article-ad .article-meta {
  color: #8c1f43;
}

.article-meta {
  margin: 0 0 0.25rem;
  color: #6e1d18;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.article-meta a {
  color: inherit;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.newspaper-heading {
  margin: 0 0 0.25rem;
  font-size: var(--heading-size);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-wrap: pretty;
  word-break: break-word;
  hyphens: auto;
}

.newspaper-heading a {
  color: inherit;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.newspaper-copy {
  margin: 0;
  color: #282018;
  font-size: 0.82rem;
  line-height: 1.075;
  text-align: justify;
  text-wrap: pretty;
  word-break: break-word;
  hyphens: auto;
}

.newspaper-image {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  border: 1px solid #15120d;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.25rem 0 0;
  color: #6f6659;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100dvh;
  width: 100dvw;
  padding: 1rem;
}

.legal-paper {
  min-height: calc(100dvh - 2rem);
  border-block: 3px solid #15120d;
}

.legal-header {
  border-bottom: 3px solid #15120d;
  padding: 1rem 0;
  text-align: center;
}

.legal-title {
  margin: 0;
  font-size: clamp(2.5rem, 5.9dvw, 6.75rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.78;
}

.legal-copy {
  max-width: 42rem;
  margin: 0.75rem auto 0;
  color: #282018;
  font-size: 0.85rem;
  line-height: 1.25;
  text-wrap: pretty;
}

.legal-section {
  max-width: 48rem;
  margin: 0 auto;
  border-bottom: 1px solid #15120d;
  padding: 1rem 0;
}

.legal-section h2 {
  margin: 0 0 0.5rem;
  color: #6e1d18;
  font-size: clamp(1.35rem, 2dvw, 2rem);
  line-height: 1;
}

.legal-section p {
  margin: 0.6rem 0 0;
  color: #282018;
  font-size: 0.95rem;
  line-height: 1.35;
  text-wrap: pretty;
}

.flourish {
  max-height: 50px;
  height: auto;
}

.divider {
  transform: scaleY(-1);
  width: 300px;
  margin: 0 auto;
}

.admin-page {
  min-height: 100dvh;
  padding: 1.5rem;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid #15120d;
  padding-bottom: 1rem;
}

.admin-header a {
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-title {
  margin: 0;
  font-size: clamp(2rem, 5dvw, 4rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.admin-list {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  border-bottom: 1px solid #15120d;
  padding: 1rem 0;
}

.admin-heading {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1;
  text-wrap: balance;
}

.admin-heading a {
  color: inherit;
  text-decoration: none;
}

.admin-copy {
  margin: 0;
  color: #282018;
  font-size: 0.8rem;
  line-height: 1.2;
}

.admin-image {
  display: block;
  width: min(24rem, 100%);
  margin: 0.5rem 0;
  border: 1px solid #15120d;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.admin-article button {
  width: max-content;
  border: 1px solid #15120d;
  background: #15120d;
  color: #eee9dd;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.7rem;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .page {
    padding-inline: 1.5rem;
  }

  .legal-page {
    padding-inline: 1.5rem;
  }

  .edition {
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) {
  .page {
    padding: 1.5rem;
  }

  .legal-page {
    padding: 1.5rem;
  }

  .legal-paper {
    min-height: calc(100dvh - 3rem);
  }

  .masthead {
    padding-block: 0.25rem;
  }

  .title-text {
    top: 0;
  }

  .title-flourish {
    position: static;
    width: 1.4em;
    height: 0.48em;
    flex: 0 0 auto;
    transform: none;
  }

  .title-flourish-left {
    transform: scaleX(-1);
  }

  .edition {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    margin-top: 0.25rem;
  }

  .edition-volume {
    display: inline;
  }

  .edition span:nth-child(2) {
    text-align: center;
  }

  .newspaper-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .newspaper-masonry-column {
    border-right: 1px solid #15120d;
  }

  .newspaper-masonry-column:last-child {
    border-right: 0;
  }

  .newspaper-masonry-column:nth-child(3n) {
    border-right: 0;
  }

  .newspaper-masonry-column .newspaper-article:last-child {
    border-bottom: 0;
  }

  .divider {
    transform: scaleY(-1) scaleX(1.35);
  }
}

@media (min-width: 1181px) {
  .newspaper-masonry {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .newspaper-masonry-column:nth-child(3n) {
    border-right: 1px solid #15120d;
  }

  .newspaper-masonry-column:last-child {
    border-right: 0;
  }
}
