.pasture {
  --paper: #f8f0dc;
  --plum: #1b1321;
  --lime: #eaff36;
  --magenta: #ff40d0;
  --violet: #54217d;
  --muted: #423449;
  --line: #22162b;
  color-scheme: light;
  background: var(--paper);
  color: var(--plum);
}
.pasture .masthead { border-bottom: 4px solid var(--plum); }
.pasture .wordmark { color: var(--plum); text-transform: uppercase; }
.pasture .wordmark span { color: var(--violet); }
.pasture .hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(1.6rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}
.pasture .eyebrow { color: var(--violet); }
.home.pasture .hero h1 {
  font-size: clamp(3.8rem, 9.8vw, 9.2rem);
  text-transform: uppercase;
  line-height: .79;
  margin-block: .23em;
}
.pasture h1 > span { display: block; }
.pasture .muh {
  color: var(--paper);
  background: var(--violet);
  display: inline-block;
  padding: .04em .10em .10em .035em;
  transform: rotate(-5deg);
}
.tagline { font-size: clamp(1.1rem, 2.3vw, 1.55rem); font-weight: 800; margin: 1.3rem 0 .4rem; }
.pasture .intro { margin-top: .6rem; }
.cover-art {
  margin: 0;
  position: relative;
  border: 3px solid var(--plum);
  box-shadow: 9px 9px 0 var(--violet);
  background: var(--lime);
}
.cover-art img { display: block; width: 100%; height: auto; }
.cover-art figcaption {
  padding: .65rem .8rem;
  color: var(--paper);
  background: var(--plum);
  font: 700 .875rem/1.4 ui-monospace, monospace;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}
.pasture .primary { border-color: var(--plum); box-shadow: 3px 3px 0 var(--plum); }
.pasture .button.secondary { border-color: var(--plum); }
.pasture a:hover, .pasture .section-heading a, .pasture .footer-links a, .pasture .work-grid article > a { color: var(--violet); }
.pasture a:focus-visible { outline-color: var(--violet); }
.pasture .section { border-top-width: 3px; }
.pasture .featured { background: var(--lime); border-top: 0; border: 2px solid var(--plum); box-shadow: 6px 6px 0 var(--violet); }
.pasture .work-grid article { border: 2px solid var(--plum); }
@media (max-width: 800px) {
  .pasture .hero { grid-template-columns: 1fr; }
  .cover-art { max-width: 510px; }
}
@media (max-width: 400px) {
  .home.pasture .hero h1 { font-size: 16vw; }
}

.inner-page .masthead { border-bottom: 4px solid var(--plum); }
.inner-page .archive h1,
.inner-page .reading h1 {
  font-family: "Arial Black", system-ui, sans-serif;
  font-weight: 950;
  line-height: 1;
}
.inner-page .archive > .eyebrow,
.inner-page .reading-header > .eyebrow {
  display: inline-block;
  background: var(--lime);
  color: var(--plum);
  padding: .3rem .55rem;
  border-left: 4px solid var(--violet);
}
.inner-page .archive-list h2 a:hover,
.inner-page .prose a,
.inner-page .reading-footer a { color: var(--violet); }
.inner-page .archive-controls input,
.inner-page .archive-controls select {
  color: var(--plum);
  background: var(--paper);
  border: 2px solid var(--plum);
}
.inner-page .archive-list li,
.inner-page .reading-header {
  border-top-color: var(--plum);
  border-bottom-color: var(--plum);
}
.inner-page .reading-header { border-bottom-width: 3px; }

/* The cow has insisted on eight-bit working conditions. */
.pasture {
  background-image: radial-gradient(#54217d25 1px, transparent 1px),
    radial-gradient(#54217d25 1px, transparent 1px);
  background-position: 0 0, 4px 4px;
  background-size: 8px 8px;
}
.pasture .masthead {
  background: var(--paper);
  box-shadow: 0 4px 0 var(--violet);
}
.pasture .cover-art,
.pasture .featured,
.pasture .work-grid article {
  box-shadow: 4px 4px 0 var(--plum), 8px 8px 0 var(--violet);
}
.pasture .cover-art figcaption {
  border-top: 6px solid var(--lime);
  border-image: repeating-linear-gradient(90deg, var(--lime) 0 8px, var(--violet) 8px 16px) 1;
}
.pasture .button,
.pasture .archive-controls input,
.pasture .archive-controls select {
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--violet);
}
.pasture .button.secondary,
.pasture .work-grid article,
.inner-page .archive,
.inner-page .reading { background: var(--paper); }
.inner-page .archive,
.inner-page .reading {
  border: 2px solid var(--plum);
  box-shadow: 4px 4px 0 var(--plum), 8px 8px 0 var(--violet);
  padding: clamp(1rem, 4vw, 2.5rem);
}
.pasture .hero .eyebrow::before,
.inner-page .archive > .eyebrow::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 12px 2px 4px;
  background: currentColor;
  box-shadow: -4px 0, 4px 0, 0 -4px, 0 4px;
}

.pun-note { margin-block: .9rem 0; }
.pun-note summary {
  display: inline-block;
  list-style: none;
  padding: .2rem .55rem;
  border: 2px solid var(--plum);
  background: var(--lime);
  color: var(--plum);
  box-shadow: 3px 3px 0 var(--violet);
  cursor: pointer;
  font: 700 .875rem/1.7 ui-monospace, monospace;
}
.pun-note summary::-webkit-details-marker { display: none; }
.pun-note summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 5px; }
.pun-note p {
  max-width: 42ch;
  margin-block: .8rem 0;
  padding: .6rem .8rem;
  border-left: 4px solid var(--violet);
  background: var(--paper);
}

.pasture .masthead-brand { display: grid; gap: .15rem; }
.pasture .masthead-subtitle {
  color: var(--violet);
  font: 700 .875rem/1.4 ui-monospace, monospace;
}

/* All front-cover buttons get equal billing. The cow has negotiated a collective agreement. */
.home.pasture :is(.button, .pun-note summary) {
  background: var(--lime);
  border-color: var(--plum);
  color: var(--plum);
}
.home.pasture :is(.button, .pun-note summary):is(:hover, :focus-visible),
.home.pasture .pun-note[open] summary {
  background: var(--magenta);
  color: var(--plum);
}

.section-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

/* The cow can still hear you reading. */
.pasture .button.pasture-bedtime {
  font: inherit;
  font-weight: 700;
  border: 2px solid var(--plum);
  background: var(--lime);
  color: #22112e;
  cursor: pointer;
}
.pasture .button.pasture-bedtime[hidden] { display: none; }
.pasture .button.pasture-bedtime:hover,
.pasture .button.pasture-bedtime:focus-visible {
  background: var(--magenta);
  color: #22112e;
}
html[data-pasture-theme="dark"] { background: #211229; color-scheme: dark; }
[data-pasture-theme="dark"] .pasture {
  color-scheme: dark;
  --paper: #211229;
  --plum: #f7e9f4;
  --violet: #f3a5ec;
  --muted: #dbc5dc;
  --line: #9e749e;
  background-color: var(--paper);
  background-image: radial-gradient(#f3a5ec33 1px, transparent 1px),
    radial-gradient(#f3a5ec33 1px, transparent 1px);
}
[data-pasture-theme="dark"] .pasture .featured,
[data-pasture-theme="dark"] .pasture .featured a,
[data-pasture-theme="dark"] .pasture .featured .eyebrow,
[data-pasture-theme="dark"] .home.pasture :is(.button, .pun-note summary),
[data-pasture-theme="dark"] .inner-page :is(.archive, .reading-header) > .eyebrow {
  color: #22112e;
}

[data-pasture-theme="dark"] .pasture .button.pasture-bedtime {
  background: var(--magenta);
  color: #22112e;
}
[data-pasture-theme="dark"] .pasture .button.pasture-bedtime:is(:hover, :focus-visible) {
  background: var(--lime);
  color: #22112e;
}

/* After sunset, the ink gives way to fluorescent shopfront light. */
[data-pasture-theme="dark"] .pasture {
  background-image:
    radial-gradient(ellipse at 87% 22%, #6f12504f, transparent 38%),
    radial-gradient(ellipse at 13% 14%, #29337141, transparent 32%);
}
[data-pasture-theme="dark"] .pasture .masthead {
  background: transparent;
  border-bottom-color: #eaff36;
  box-shadow: 0 2px #ff40d0, 0 7px 18px -10px #ff40d0;
}
[data-pasture-theme="dark"] .pasture .masthead .wordmark {
  color: #fff0fb;
  text-shadow: 0 0 12px #ff40d080;
}
[data-pasture-theme="dark"] .pasture .cover-art {
  border-color: #ff40d0;
  box-shadow: 4px 4px #211229, 6px 6px #ff40d0,
    12px 12px 28px #ff40d055, -6px -4px 20px #9165ff44;
}
[data-pasture-theme="dark"] .pasture .cover-art figcaption {
  border-top-color: transparent;
  border-image: none;
  background: #28132f;
  color: #fff0fb;
}
[data-pasture-theme="dark"] .pasture .cover-art figcaption span {
  color: #eaff36;
  text-shadow: 0 0 9px #eaff3680;
}
[data-pasture-theme="dark"] .pasture .section {
  border-top: 1px solid #9165ff99;
  box-shadow: 0 -7px 14px -14px #9165ff;
}

/* Keep the masthead geometry independent of which lights are on. */
.pasture .masthead { align-items: center; }
.pasture .masthead .pasture-bedtime {
  box-sizing: border-box;
  inline-size: 15rem;
  max-inline-size: 100%;
  justify-content: center;
}

/* The masthead keeps the same tracks even when navigation links differ. */
.pasture .masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: .75rem;
  padding-block: 1.35rem;
}
.pasture .masthead .wordmark {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -.06em;
}
.pasture .masthead > nav { grid-column: 2; grid-row: 1; justify-self: center; gap: .75rem; }
.pasture .masthead > .pasture-bedtime { grid-column: 3; grid-row: 1; justify-self: end; }
@media (max-width: 62rem) {
  .pasture .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  .pasture .masthead > nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .pasture .masthead > .pasture-bedtime { grid-column: 2; }
}
@media (max-width: 34rem) {
  .pasture .masthead { grid-template-columns: minmax(0, 1fr); }
  .pasture .masthead > .pasture-bedtime { grid-column: 1; grid-row: 3; justify-self: start; }
}
