/* Plain bricks repeat across the page. The mural is a separate top layer. */
:root {
  --brick-color: #c7c4b8;
  --brick-image: url('assets/wall-bricks.jpg');
  --brick-width: clamp(960px, 100vw, 1536px);
  --wall-lift: rgb(245 237 223 / 31%);
  --reading-paper: #f2eee6f7;
}

body.accepted-home,
body.site-wall {
  min-height: 100vh;
  background:
    linear-gradient(var(--wall-lift), var(--wall-lift)) right top / 100% 100% no-repeat,
    var(--brick-color) var(--brick-image) right top / var(--brick-width) auto repeat;
}

:is(.accepted-home .wall, .rubric-wall) {
  --mural-height: calc(100vw * 2 / 3);
  --mural-size: 100% auto;
  --mural-wash: linear-gradient(90deg, #f5eddf5c, #f5eddf50 52%, #f5eddf0a 73%);
}

.accepted-home .wall {
  background: transparent;
}

.rubric-wall {
  position: relative;
  isolation: isolate;
}

.rubric-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

:is(.accepted-home .wall, .rubric-wall)::before {
  background:
    var(--mural-wash),
    url('assets/wall.png') right top / var(--mural-size) no-repeat;
  mask: linear-gradient(#000 62%, transparent 88%) top / 100% var(--mural-height) no-repeat;
}

.accepted-home .recent-materials,
.accepted-home .recent-materials .card {
  background: transparent;
}

.site-wall :is(.library-page, .section-page) {
  background: transparent;
}

/* Lists of links and long texts retain a quiet reading surface. */
.site-wall .publication-index section {
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: var(--reading-paper);
}

body.reading-page {
  padding-bottom: clamp(0.75rem, 2.5vw, 2rem);
}

.reading-page > main {
  box-sizing: border-box;
  width: calc(100% - 1.5rem);
  max-width: calc(760px + 2.6rem);
  margin-top: clamp(0.75rem, 2.5vw, 2rem);
  background: var(--reading-paper);
}

.site-header,
.accepted-home .site-header {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: flex-start;
  gap: 10px 32px;
  height: auto;
  min-height: 90px;
  padding: 12px 5%;
  border-bottom: 1px solid #242b2540;
}

.site-header .site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  width: auto;
  gap: 8px clamp(12px, 2vw, 28px);
  font: 700 13px/1.4 Arial, sans-serif;
}

.site-header .site-nav a {
  display: inline;
  color: #171b19;
  font: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.site-header .site-nav a:is(:hover, [aria-current="page"]) {
  text-decoration: underline;
}

.site-info-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100% - 32px));
  padding: 30px;
  border: 0;
  background: #eeebdf;
  color: #222;
  font: 16px/1.5 Arial, sans-serif;
}

.site-info-dialog::backdrop { background: #000a; }

.site-info-dialog button {
  padding: 9px 15px;
  border: 0;
  background: #25362a;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 700px) {
  :root { --brick-width: 1020px; }

  :is(.accepted-home .wall, .rubric-wall) {
    --mural-height: 680px;
    --mural-size: auto 680px;
  }

  .accepted-home .wall {
    --mural-wash: linear-gradient(#f5eddf0d, #f5eddf35 60%, #f5eddf4f);
  }

  .site-wall.rubric-wall {
    --mural-wash: linear-gradient(#f5eddf85, #f5eddf85);
  }

  .site-header,
  .accepted-home .site-header {
    min-height: 65px;
  }
}
