/* Hayfolk — a deliberately small stylesheet meant to be replaced.
   Vertical rhythm is built on a baseline grid: 1rlh is the root line-height,
   and every margin, padding and gap is a half or whole multiple of it. */

:root {
  color-scheme: light;

  /* Baseline unit. The rem value is the fallback; rlh wins in browsers that
     support it, so spacing stays locked to the root line-height. */
  --rlh: 1.5rem;
  --rlh: 1rlh;
  --r1: var(--rlh);
  --half: calc(var(--rlh) / 2);
  --r15: calc(var(--rlh) * 1.5);
  --r2: calc(var(--rlh) * 2);
  --r3: calc(var(--rlh) * 3);
  --r4: calc(var(--rlh) * 4);

  /* Palette sampled from hayfolk-logo.svg */
  --bg: #efcd84;
  --ink: #0e5656;
  --accent: #a42422;
  --accent-2: #d94927;
  --accent-3: #e38b25;
  --sage: #599f96;
  --surface: color-mix(in srgb, var(--bg) 92%, var(--accent-3));
  --muted: color-mix(in srgb, var(--ink) 93%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 22%, var(--bg));
  --accent-soft: color-mix(in srgb, var(--accent-3) 6%, var(--bg));
  --accent-ink: var(--bg);
  --icon-size: 1.25rem;
  --placeholder: color-mix(in srgb, var(--ink) 92%, var(--surface));
  --radius-control: 4px;
  --shadow: none;
  --measure: 66ch;
  --a4-ratio: 1 / 1.4142;
  --cover-ratio: 12 / 5;
  --max: 1120px;
  --font-body: "Sentient", "Gambetta", Georgia, "Times New Roman", serif;
  --font-display: "Clash Display", "General Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font-ui: "Clash Grotesk", "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale. Body starts at 16px and settles at 17px; each
     heading step is a 1.25× jump from the one below. */
  --text-xs: clamp(0.78rem, 0.75rem + 0.12vw, 0.85rem);
  --text-sm: clamp(0.86rem, 0.83rem + 0.12vw, 0.95rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-ui: clamp(0.95rem, 0.93rem + 0.12vw, 1rem);
  --text-lg: clamp(1.25rem, 1.16rem + 0.35vw, 1.328rem);
  --text-xl: clamp(1.5625rem, 1.4rem + 0.8vw, 1.66rem);
  --text-2xl: clamp(1.953rem, 1.3rem + 2.8vw, 2.594rem);

  /* Heading rhythm, snapped to the baseline. */
  --heading-before-major: var(--r2);
  --heading-before: var(--r1);
  --heading-before-minor: var(--half);
  --heading-after: var(--half);

  /* Shared spacing roles. */
  --space-tight: calc(var(--rlh) / 4);
  --space-base: var(--half);
  --space-loose: var(--r1);
  --space-section: var(--r2);
  --space-page: var(--r3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html {
  /* Defines 1rlh = 1.5 × root font size, i.e. the baseline. */
  line-height: 1.5;
  /* Keep the root canvas and scrollbar from showing browser white. */
  background: var(--bg);
  scrollbar-color: color-mix(in srgb, var(--ink) 28%, var(--bg)) var(--bg);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink) 28%, var(--bg));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  /* Measured x-height ratios: Sentient .502, Clash Display .501,
     Clash Grotesk .494–.497. Normalise all faces to .5em. */
  font-size-adjust: 0.5;
  /* Every line of body copy is exactly one baseline tall. */
  line-height: var(--rlh);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Layout ---------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--half);
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: var(--half) var(--r1);
  font-family: var(--font-ui);
  text-decoration: none;
}

.skip-link:focus {
  left: var(--half);
}

.site-header,
.site-main,
.site-footer,
.messages {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--half) var(--r1);
  align-items: center;
  justify-content: flex-start;
  padding-block: var(--half);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--r1);
}

.site-title {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--muted);
}

.social-link svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.social-link:hover {
  color: var(--accent);
}

.site-logo {
  width: auto;
  /* Let the slab serifs breathe: big on desktop, still fits beside Menu. */
  height: clamp(1.5rem, 8vw, 3.25rem);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-family: var(--font-ui);
  font-size: var(--text-ui);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* Mobile menu, using the native Popover API ----------------------------- */

.menu-toggle,
.menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  appearance: none;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.menu-toggle svg,
.menu-close svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.menu-toggle:hover,
.menu-close:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.menu-close {
  display: inline-flex;
  flex: 0 0 44px;
}

.mobile-menu {
  display: none;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0 clamp(1rem, 4vw, 2rem) calc(var(--r1) + env(safe-area-inset-bottom));
  border: 0;
  outline: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  overflow-y: auto;
}

.mobile-menu:popover-open {
  display: block;
}

.mobile-menu::backdrop {
  background: transparent;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  margin-bottom: var(--half);
}

.mobile-menu > nav {
  display: flex;
  flex-direction: column;
  gap: var(--half);
  align-items: flex-end;
  width: 100%;
  text-align: right;
}

.mobile-menu > nav a {
  width: 100%;
  font-size: 1.05rem;
  color: var(--ink);
  text-align: right;
  text-decoration: none;
  padding-block: var(--half);
}

.mobile-menu .inline-form {
  width: 100%;
  text-align: right;
}

.link-button {
  border: 0;
  appearance: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link-button:active {
  color: var(--ink);
}

.site-main {
  padding-block: var(--half) var(--r2);
}

.site-footer {
  padding-block: var(--r1);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  line-height: var(--rlh);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--half) var(--r1);
}

.footer-pages a {
  color: var(--ink);
}

.footer-meta {
  margin-top: var(--space-base);
}

.site-footer p {
  margin-top: var(--space-base);
  margin-bottom: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.narrow {
  max-width: 34rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--half) var(--r1);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--r1);
}

.section-head h2,
.section-head h1 {
  margin: 0;
}

.section-head > a {
  align-self: baseline;
  font-family: var(--font-ui);
  font-size: var(--text-ui);
}

/* Clash Display sits slightly lower than Clash Grotesk at the same baseline. */
.section-head > a:not(.button) {
  position: relative;
  top: 0.18em;
}

.section-head > .button {
  align-self: center;
}

.section-head > .button.align-top {
  align-self: flex-start;
}

/* Type ------------------------------------------------------------------ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  letter-spacing: -0.02em;
}

h2 {
  letter-spacing: -0.015em;
}

h3 {
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-2xl);
  line-height: var(--r2);
  margin: 0 0 var(--half);
}

h2,
h3 {
  margin: var(--heading-before) 0 var(--heading-after);
}

h4,
h5,
h6 {
  margin: var(--heading-before-minor) 0 var(--heading-after);
  line-height: var(--rlh);
}

h2 {
  font-size: var(--text-xl);
  line-height: var(--r15);
}

h3 {
  font-size: clamp(1.3125rem, 1.22rem + 0.35vw, 1.375rem);
  line-height: var(--rlh);
}

p {
  margin: 0 0 var(--half);
  text-wrap: pretty;
}

.page-tools {
  float: right;
  margin: 0 0 var(--half) var(--r1);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.post.has-cover {
  position: relative;
}

.post.has-cover .page-tools {
  position: absolute;
  z-index: 2;
  top: var(--half);
  right: var(--half);
  float: none;
  margin: 0;
  padding: 0 var(--half);
  border-radius: var(--radius-control);
  background: var(--surface);
  line-height: var(--rlh);
}

.edit-link {
  display: inline-flex;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.meta,
.kicker {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--rlh);
}

.meta {
  font-family: var(--font-ui);
}

.kicker + h1,
.kicker + h2 {
  margin-top: var(--half);
}

.kicker {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: var(--half);
}

/* Buttons --------------------------------------------------------------- */

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-control);
  appearance: none;
  padding: calc(var(--rlh) / 4) var(--r1);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  font-weight: 500;
  line-height: var(--rlh);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

.button:active {
  background: color-mix(in srgb, var(--accent) 72%, var(--ink));
}

.button.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.button.secondary:hover {
  background: color-mix(in srgb, var(--accent) 4%, var(--bg));
  color: var(--ink);
}

.button.secondary:active {
  background: var(--accent);
  color: var(--accent-ink);
}

.button.disabled {
  background: color-mix(in srgb, var(--accent-3) 10%, var(--surface));
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

/* Text links get a momentary pressed colour; buttons keep their own states. */
a:active:not(.button) {
  color: var(--ink);
}

/* Messages and notices -------------------------------------------------- */

.messages {
  list-style: none;
  margin-block: var(--r1);
}

.messages li {
  background: var(--surface);
  padding: var(--half) var(--r1);
  margin-bottom: var(--half);
  font-size: 0.95rem;
}

.messages .error {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.messages .success {
  background: color-mix(in srgb, var(--ink) 12%, var(--surface));
}

.notice {
  background: var(--accent-soft);
  padding: var(--r1);
  margin: var(--r1) 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Cards and lists ------------------------------------------------------- */

.releases-grid,
.events-grid {
  display: grid;
  gap: var(--r1);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: var(--r1);
}


.events-grid {
  gap: var(--r1);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.event-poster-link {
  position: relative;
  z-index: 2;
  display: block;
}

.release-item:hover img,
.release-item:focus-within img,
.event-list-item:hover .event-card-media img,
.event-list-item:focus-within .event-card-media img,
.event-banner-poster:hover img {
  filter: brightness(0.96);
}

.event-list-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--r1);
}

.event-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--half);
  width: 100%;
}

.event-list-item img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--a4-ratio);
  object-fit: contain;
  background: var(--surface);
}

.event-list-item .placeholder {
  width: 100%;
  aspect-ratio: var(--a4-ratio);
  object-fit: cover;
}

.event-list-item h3 {
  margin: 0;
}

.event-list-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.event-list-item h3 a:hover {
  color: var(--accent);
}

.event-list-item .meta {
  margin: 0;
}

.past-events-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.past-event-item {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  align-items: center;
  gap: var(--r1);
}



.release-item {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* The title link stretches over the card so the whole thing is clickable. */
.stretched-link {
  display: inline-block;
  min-height: 24px;
}

.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.release-item .button,
.release-item .chip {
  position: relative;
  z-index: 2;
}

.release-item:focus-within,
.event-list-item:focus-within {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.release-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent-3) 22%, var(--surface)),
      color-mix(in srgb, var(--sage) 18%, var(--surface))
    );
}

.release-item h3 {
  margin: var(--half) 0 0;
  font-size: var(--text-lg);
}

.release-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.release-item h3 a:hover {
  color: var(--accent);
}

.release-item .meta {
  margin: 0;
}

.list-item,
.answer,
.question,
.release,
.post,
.page,
.event {
  margin-bottom: var(--r1);
}

.release-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--r2);
  align-items: start;
}

.release-art img,
.release-art .placeholder {
  width: 100%;
  height: auto;
}

.release-art .placeholder {
  aspect-ratio: 1;
}

.release-info .prose {
  max-width: none;
}

@media (max-width: 800px) {
  .release-detail {
    grid-template-columns: 1fr;
    gap: var(--r1);
  }
}

.release-item .meta a {
  position: relative;
  z-index: 2;
}

.list-item h2,
.answer h3 {
  margin-bottom: var(--half);
}

.post-list {
  display: grid;
  gap: var(--r2);
}

.post-list .post-listing {
  margin-bottom: 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--r1);
  margin-top: var(--r2);
  font-family: var(--font-ui);
}

.post-nav a {
  max-width: 48%;
  color: var(--ink);
  text-decoration: none;
}

.post-nav a:hover {
  color: var(--accent);
}

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

.post-nav span {
  display: block;
  margin-bottom: calc(var(--rlh) / 4);
  color: var(--muted);
  font-size: 0.85rem;
}

.post-listing h2 {
  margin-top: 0;
  font-size: var(--text-xl);
}

.post-listing h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-listing h2 a:hover {
  color: var(--accent);
}

.post-listing .hero {
  margin-top: var(--r1);
}

.list-item h2 a {
  color: var(--ink);
  text-decoration: none;
}

.list-item h2 a:hover {
  color: var(--accent);
}

.answers h2 {
  margin-top: var(--r1);
}

.answer .prose,
.question .prose {
  margin-bottom: var(--half);
}

.invite-box {
  margin-top: var(--r1);
  padding-top: var(--half);
}

.invite-box summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
}

.invite-box summary:hover,
.invite-box details[open] summary {
  color: var(--ink);
}

.invite-box > .meta {
  margin-top: var(--half);
}

/* Event banner ---------------------------------------------------------- */

.event-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  margin-bottom: var(--r1);
}

.event-banner-poster {
  display: block;
  align-self: start;
}

.event-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--a4-ratio);
  object-fit: contain;
  background: var(--surface);
  align-self: start;
}

.event-poster {
  aspect-ratio: var(--a4-ratio);
  background: var(--surface);
}

.event-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.event-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: var(--r2);
  align-items: start;
}

.event-poster .placeholder {
  width: 100%;
  height: 100%;
}

@media (max-width: 800px) {
  .event-detail {
    grid-template-columns: 1fr;
    gap: var(--r1);
  }
}

.event-banner-body {
  padding: 0;
  align-self: start;
}

.event-banner-body h2 {
  margin-bottom: var(--half);
}

.event-banner-body p:last-child {
  margin-bottom: 0;
}

@supports selector(:has(*)) {
  @media (min-width: 721px) {
    .event-banner:has(img) {
      grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
      gap: var(--r1);
    }
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  background: color-mix(in srgb, var(--accent-3) 16%, var(--surface));
  padding: 0.15rlh calc(var(--rlh) * 0.6);
  font-size: 0.85rem;
  line-height: var(--rlh);
  color: var(--ink);
}

/* Articles -------------------------------------------------------------- */

.hero {
  width: 100%;
  height: auto;
  aspect-ratio: var(--cover-ratio);
  object-fit: cover;
  margin-bottom: var(--r1);
}

.artists {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: var(--r1);
}

.bandcamp-embed {
  margin-block: var(--r1);
}

.bandcamp-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

.prose {
  max-width: var(--measure);
  font-size: var(--text-base);
  line-height: var(--rlh);
}

.home-section + .home-section,
.page-section + .page-section {
  margin-top: var(--space-section);
}

/* Match the Journal: heading straight into the first section. */
.page-title-section + .page-section {
  margin-top: var(--space-base);
}

.page-title-section + .page-section > h2:first-child {
  margin-top: 0;
}

.latest-post {
  margin-bottom: var(--r1);
}

.post-listing p,
.event-banner-body p {
  max-width: var(--measure);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-bottom: var(--heading-after);
  line-height: var(--r15);
}

.prose h2 {
  margin-top: var(--heading-before-major);
}

.prose h3 {
  margin-top: var(--heading-before);
}

.prose h4 {
  margin-top: var(--heading-before-minor);
  line-height: var(--rlh);
}

.prose a {
  text-underline-offset: 0.2em;
}

.prose img {
  height: auto;
  margin-block: var(--r1);
}

.prose figure {
  margin: var(--r1) 0;
}

.prose figcaption {
  margin-top: var(--half);
  font-size: 0.9rem;
  line-height: var(--rlh);
  color: var(--muted);
  text-align: center;
}

.prose .image-style-align-left,
.prose .image-style-side {
  float: left;
  max-width: 50%;
  margin: var(--half) var(--r15) var(--r1) 0;
}

.prose .image-style-align-right {
  float: right;
  max-width: 50%;
  margin: var(--half) 0 var(--r1) var(--r15);
}

.prose .image-style-align-center {
  margin-inline: auto;
  text-align: center;
}

.prose blockquote {
  margin: var(--r1) 0;
  padding: var(--half) var(--r1);
  background: color-mix(in srgb, var(--accent-3) 6%, var(--surface));
  color: var(--ink);
}

.prose pre {
  background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  padding: var(--r1);
  margin: var(--r1) 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}

.prose code {
  background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  padding: 0.12rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.prose ul,
.prose ol {
  padding-left: var(--r1);
  margin-block: var(--r1);
}

.prose li {
  margin-bottom: 0.25rlh;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose table {
  width: 100%;
  margin-block: var(--r2);
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: var(--half);
  text-align: left;
}

.prose th,
.table th {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface));
}

.prose tbody tr:nth-child(even),
.table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

/* Chips ------------------------------------------------------------------ */

.chips,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: var(--half) 0;
}

.chips span,
a.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  min-height: 34px;
  padding: 0 0.75rem;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--sage) 8%, var(--bg));
  font-size: var(--text-sm);
  line-height: var(--rlh);
  color: var(--ink);
  text-decoration: none;
}

a.chip:hover {
  color: var(--accent);
}

/* Forms ----------------------------------------------------------------- */

form p {
  margin-bottom: var(--r1);
}

label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--half);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 34rem;
  padding: calc(var(--rlh) / 4) var(--half);
  border: 1px solid color-mix(in srgb, var(--ink) 70%, var(--bg));
  border-radius: var(--radius-control);
  appearance: none;
  font: inherit;
  font-family: var(--font-ui);
  line-height: var(--rlh);
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 4%, var(--bg));
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-note {
  margin-top: var(--r1);
}

.grow-textarea {
  field-sizing: content;
  min-height: calc(var(--rlh) * 3);
}

input[type="checkbox"] {
  width: auto;
}

::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.helptext,
form .helptext,
form span.helptext {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  line-height: var(--rlh);
  color: var(--muted);
  margin-top: calc(var(--rlh) / 4);
}

.errorlist {
  list-style: none;
  font-family: var(--font-ui);
  padding: 0;
  margin: 0 0 var(--half);
  color: var(--accent);
  font-size: var(--text-sm);
  line-height: var(--rlh);
}

/* Tables and pagination ------------------------------------------------- */

.table {
  width: 100%;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: var(--half);
  text-align: left;
  vertical-align: top;
}

.table th {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--rlh);
  color: var(--muted);
}

.table code {
  font-size: 0.8rem;
  word-break: break-all;
}

.pagination {
  display: flex;
  font-family: var(--font-ui);
  gap: var(--r1);
  align-items: center;
  margin-top: var(--r2);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Small screens --------------------------------------------------------- */

/* Never show the popover menu on desktop, even if left open while resizing. */
@media (min-width: 721px) {
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .past-events-grid {
    grid-template-columns: 1fr;
  }

  .past-event-item {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--half);
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a,
  .post-nav .next {
    max-width: none;
    margin-left: 0;
    text-align: left;
  }

  .site-header {
    gap: 0.5rem;
    justify-content: space-between;
  }

  .site-brand {
    gap: var(--half);
  }

  .site-logo {
    height: clamp(1.3rem, 6.5vw, 2rem);
  }

  .social-link {
    width: 1.75rem;
    height: 1.75rem;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .event-banner img {
    width: 100%;
    margin-inline: 0;
  }

  .prose .image-style-align-left,
  .prose .image-style-align-right,
  .prose .image-style-side {
    float: none;
    max-width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 340px) {
  .site-header {
    padding-inline: 0.75rem;
  }

  .site-logo {
    height: 1.35rem;
  }
}
