/*
 * Dark theme, the same ladder as packages/ui-kit/src/theme.css `.dark`: #101010 background,
 * MUI-style elevation surfaces, white foreground at 1 / 0.7 / 0.38, borders as white alpha,
 * the neutral filled button is white on black, blue is the `info` accent for links.
 */
@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/MonaSans-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101010;
  --surface-1: #171717;
  --surface-2: #202020;
  --surface-3: #242424;
  --fg: #ffffff;
  --fg-muted: rgb(255 255 255 / 0.7);
  --fg-disabled: rgb(255 255 255 / 0.38);
  --alpha-1: rgb(255 255 255 / 0.04);
  --alpha-2: rgb(255 255 255 / 0.08);
  --alpha-3: rgb(255 255 255 / 0.12);
  --alpha-4: rgb(255 255 255 / 0.3);
  --primary: #f5f5f5;
  --primary-hover: #e2e2e2;
  --on-primary: #000000;
  --info: #3b82f6; /* blue-500: links and focus on a dark surface */
  --info-hover: #60a5fa; /* blue-400 */
  --danger-container: rgb(239 68 68 / 0.12);
  --on-danger-container: #f87171;
  /* Aliases used by the layout rules below. */
  --ink: var(--fg);
  --paper: var(--bg);
  --blue: var(--info);
  --blue-hover: var(--info-hover);
  --dim: var(--fg-muted);
  --line: var(--alpha-2);
  --line-strong: var(--alpha-3);
  --surface: var(--surface-1);
  --font-sans: "Mona Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
  --measure: 1160px;
  --prose: 720px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-variation-settings: "wdth" 110;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

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

::selection {
  background: var(--alpha-4);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
}

.skip-link:focus {
  top: 8px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.button:hover {
  background: var(--alpha-1);
  border-color: var(--alpha-4);
}

.button--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.button--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button--large {
  height: 52px;
  padding: 0 28px;
  font-size: 17px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--measure);
  height: 84px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header__brand {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}

.header__mark {
  width: 40px;
  height: 40px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
}

.header__nav a:not(.header__brand) {
  text-decoration: none;
  color: var(--dim);
}

.header__nav a:not(.header__brand):hover,
.header__nav a[aria-current="page"] {
  color: var(--fg);
}

/* Main column */
.main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
}

/* Page heads (category, static pages, errors) */
.page-head {
  display: grid;
  gap: 10px;
  padding: clamp(32px, 6vw, 72px) 0 32px;
}

.page-head h1 {
  font-size: clamp(30px, 4.2vw, 52px);
}

.page-head__lead {
  max-width: 60ch;
  color: var(--dim);
  font-size: clamp(17px, 1.5vw, 20px);
}

.page-head__kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Home: an editorial layout around a full-bleed cinema lens. */
.main:has(> .home) {
  max-width: none;
  padding: 0;
}

.home {
  --home-ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  overflow: clip;
}

.home-shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.home [id] {
  scroll-margin-top: 32px;
}

.home-hero {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.home-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(790px, calc(100svh - 84px));
  padding-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.home-hero__art {
  position: absolute;
  z-index: -1;
  top: -28px;
  right: calc(50% - 770px);
  width: min(820px, 70vw);
  pointer-events: none;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 26%, #000 90%, transparent);
}

.cinema-lens {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(-12deg);
}

.home-hero__copy {
  max-width: 640px;
}

.home-hero__kicker,
.home-chapter {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-hero__kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--info);
  border-radius: 50%;
  box-shadow: 0 0 16px rgb(59 130 246 / 0.5);
}

.home-hero__kicker > span,
.home-chapter > span {
  color: var(--info-hover);
}

.home-hero h1 {
  margin-top: 26px;
  font-size: clamp(46px, 5.8vw, 84px);
  font-variation-settings: "wdth" 100;
  font-weight: 480;
  letter-spacing: -0.05em;
  line-height: 0.99;
}

.home-hero h1 > span {
  color: var(--fg-muted);
}

.home-hero__lead {
  max-width: 39ch;
  margin-top: 28px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.home-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 26px;
  margin-top: 30px;
}

.home .button--large {
  gap: 22px;
  height: 50px;
  padding-inline: 24px;
  font-size: 14px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.home-arrow {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  transition: transform 180ms var(--home-ease);
}

.home-section {
  padding-block: 104px;
  border-bottom: 1px solid var(--line);
}

.home-section__title {
  margin-top: 22px;
  font-size: clamp(32px, 3.3vw, 44px);
  font-weight: 480;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.home-section__text {
  margin-top: 22px;
  max-width: 38ch;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.7;
}

.home-mission__intro,
.home-audience,
.home-faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 64px;
}

.home-mission__statement {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.025em;
  color: var(--dim);
  text-wrap: pretty;
}

.home-mission__statement strong {
  color: var(--fg);
  font-weight: inherit;
}

.home-activities {
  margin-top: 76px;
}

.home-activities__label {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-activities__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-activity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.activity-drawing {
  display: block;
  width: 200px;
  max-width: 100%;
  height: 112px;
  margin-left: -20px;
  pointer-events: none;
  user-select: none;
}

.home-activity__heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-activity__heading > span {
  color: var(--dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.home-activity h4 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.home-activity > p {
  margin-block: 14px 20px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.75;
}

.home-activity .home-link {
  margin-top: auto;
  font-size: 13px;
}

.home-activity .home-arrow {
  color: var(--info-hover);
}

.home-audience {
  align-items: center;
}

.film-frames {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 22px 0 -24px -20px;
  pointer-events: none;
  user-select: none;
}

.home-reasons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-reasons > li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: baseline;
  gap: 18px;
  padding-block: 25px;
  border-bottom: 1px solid var(--line);
}

.home-reasons > li:first-child {
  border-top: 1px solid var(--line);
}

.home-reasons span {
  color: var(--info-hover);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.home-reasons p {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.home-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.journal {
  display: grid;
  grid-template-columns: minmax(0, 5.5fr) minmax(0, 4.5fr);
  gap: 44px;
}

.journal__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background: var(--surface-2);
}

.journal__image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}

.journal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms var(--home-ease);
}

.journal__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 65% 60%, rgb(59 130 246 / 0.14), transparent 65%), var(--surface-1);
}

.journal__feature > .journal__body {
  margin-top: 20px;
}

.journal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
}

.journal__meta a {
  color: var(--info-hover);
  text-decoration: none;
}

.journal__title {
  margin-top: 10px;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-wrap: pretty;
}

.journal__title a {
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.journal__excerpt {
  margin-top: 14px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.journal__item {
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.journal__item:first-child {
  padding-top: 0;
}

.journal__story {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.journal__story .journal__image {
  margin-top: 3px;
  aspect-ratio: 4 / 3;
}

.journal__story .journal__title {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.home-faq__items {
  border-top: 1px solid var(--line);
}

.home-faq__item {
  border-bottom: 1px solid var(--line);
}

.home-faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
  font-size: 16px;
  font-weight: 450;
  cursor: pointer;
  list-style: none;
}

.home-faq__item summary::-webkit-details-marker {
  display: none;
}

.home-faq__toggle {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.home-faq__toggle::before,
.home-faq__toggle::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 12px;
  height: 1px;
  background: var(--dim);
}

.home-faq__toggle::after {
  transform: rotate(90deg);
  transition: transform 180ms var(--home-ease);
}

.home-faq__item[open] .home-faq__toggle::after {
  transform: rotate(0deg);
}

.home-faq__item > p {
  max-width: 58ch;
  padding: 0 32px 24px 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.8;
}

.home-contact {
  position: relative;
  isolation: isolate;
  padding-block: 88px 104px;
}

.home-contact::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -100px;
  pointer-events: none;
  background: radial-gradient(ellipse at 15% 80%, rgb(59 130 246 / 0.06), transparent 55%);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

.home-contact .ask {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr;
  gap: 22px 64px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.home-contact .ask__title {
  max-width: 10ch;
  font-size: clamp(36px, 4.3vw, 56px);
  font-weight: 480;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.home-contact .ask__lead {
  grid-column: 1;
  max-width: 36ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}

.home-contact .form {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  min-width: 0;
  margin: 0;
}

.home-contact .form {
  gap: 22px;
}

.home-contact .field {
  gap: 10px;
}

.home-contact .field__label {
  color: var(--dim);
  font-size: 12px;
}

.home-contact .field__input {
  border-color: rgb(255 255 255 / 0.38);
  border-radius: 4px;
  background: var(--alpha-1);
}

.home-contact .field__input:focus {
  border-color: var(--info);
}

.home-contact .check {
  align-items: center;
  min-height: 44px;
  font-size: 12px;
}

.home-contact .check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .home-link:hover .home-arrow,
  .home .button:hover .home-arrow {
    transform: translate(2px, -2px);
  }

  .journal__image:hover img {
    transform: scale(1.025);
  }

  .journal__title a:hover,
  .journal__meta a:hover,
  .home-faq__item summary:hover,
  .home-link:hover {
    color: var(--dim);
  }
}

.home .button:active {
  transform: translateY(1px);
}

@media (max-width: 1000px) {
  .home-hero__art {
    right: -200px;
    top: 20px;
    width: 760px;
    opacity: 0.75;
  }

  .home-mission__intro,
  .home-audience,
  .home-faq,
  .home-contact .ask {
    gap: 40px;
  }

  .home-activities__list {
    gap: 28px;
  }

  .journal {
    gap: 28px;
  }

  .journal__story {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 799px) {
  .home-hero__inner {
    min-height: 740px;
  }

  .home-hero__art {
    right: -300px;
    opacity: 0.5;
  }

  .home-section {
    padding-block: 72px;
  }

  .home-mission__intro,
  .home-audience,
  .home-faq,
  .home-contact .ask,
  .journal {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-mission__statement {
    max-width: 32ch;
  }

  .home-activities {
    margin-top: 48px;
  }

  .home-activities__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .home-activity {
    position: relative;
    padding: 32px 150px 28px 0;
    border-bottom: 1px solid var(--line);
  }

  .home-activity:last-child {
    border: 0;
    padding-bottom: 0;
  }

  .activity-drawing {
    position: absolute;
    top: 20px;
    right: -20px;
    width: 150px;
    height: 100px;
  }

  .home-activity > p {
    max-width: 46ch;
    margin-bottom: 10px;
  }

  .home-audience__intro {
    position: relative;
    padding-right: 220px;
  }

  .film-frames {
    position: absolute;
    top: 40px;
    right: -40px;
    width: 270px;
    margin: 0;
  }

  .journal__story {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 24px;
  }

  .journal__item:first-child {
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .home-contact {
    padding-block: 72px;
  }

  .home-contact .ask {
    gap: 22px;
  }

  .home-contact .ask__title {
    max-width: 13ch;
  }

  .home-contact .ask__lead {
    max-width: 52ch;
  }

  .home-contact .form {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .home-hero__inner {
    min-height: 656px;
    padding-top: 32px;
    padding-bottom: 16px;
  }

  .home-hero__art {
    width: 510px;
    right: -250px;
    top: 70px;
    opacity: 0.8;
    mask-image: linear-gradient(90deg, transparent 10%, #000 65%);
  }

  .home-hero h1 {
    margin-top: 30px;
    font-size: clamp(34px, 10.5vw, 46px);
  }

  .home-hero__lead {
    max-width: 32ch;
    margin-top: 34px;
    font-size: 15px;
  }

  .home-hero__actions {
    gap: 12px 22px;
    margin-top: 26px;
  }

  .home .button--large {
    padding-inline: 18px;
    gap: 16px;
    font-size: 13px;
  }

  .home-hero__actions .home-link {
    gap: 12px;
    font-size: 13px;
  }

  .home-mission__intro,
  .home-audience,
  .home-faq {
    gap: 32px;
  }

  .home-chapter {
    font-size: 10px;
  }

  .home-activity {
    padding-right: 0;
  }

  .home-activity__heading {
    min-height: 64px;
    align-items: center;
  }

  .activity-drawing {
    width: 120px;
    height: 70px;
    top: 24px;
    right: -12px;
  }

  .home-audience__intro {
    padding-right: 0;
  }

  .film-frames {
    position: static;
    width: 280px;
    margin: 20px auto -10px;
  }

  .home-reasons > li {
    padding-block: 22px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
  }

  .home-section__head {
    gap: 12px;
    margin-bottom: 28px;
  }

  .home-section__head .home-link {
    gap: 12px;
    font-size: 12px;
  }

  .journal__title {
    font-size: 24px;
  }

  .journal__story {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }

  .journal__story .journal__title {
    font-size: 16px;
  }

  .home-faq__item summary {
    font-size: 15px;
  }

  .home-contact .form__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .home-arrow,
  .home .journal__image img,
  .home .home-faq__toggle::after,
  .home .button {
    transition: none;
  }

  .home-link:hover .home-arrow,
  .home .button:hover .home-arrow,
  .home .journal__image:hover img,
  .home .button:active {
    transform: none;
  }
}

/* Sections */
.section {
  display: grid;
  gap: 28px;
}

.section--related {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.section__title {
  font-size: 26px;
}

/* Category chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
}

.chip:hover {
  background: var(--alpha-1);
  border-color: var(--alpha-4);
}

.chip[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.chip__count {
  color: var(--dim);
  font-size: 12px;
}

.chip[aria-current="page"] .chip__count {
  color: rgb(0 0 0 / 0.6);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}

.card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.card__media img,
.card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__placeholder {
  display: block;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.card__body {
  display: grid;
  gap: 8px;
}

.card__meta,
.post__meta {
  font-size: 13px;
  color: var(--dim);
}

.card__meta a,
.post__meta a {
  color: var(--blue);
  text-decoration: none;
}

.card__meta a:hover,
.post__meta a:hover {
  text-decoration: underline;
}

.card__title {
  font-size: 21px;
}

.card__title a {
  text-decoration: none;
}

.card__title a:hover {
  color: var(--fg-muted);
}

.card__excerpt {
  font-size: 15px;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  color: var(--dim);
  padding: 40px 0;
}

/* Pagination */
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.pagination a {
  text-decoration: none;
  color: var(--blue);
}

.pagination a[rel="next"] {
  text-align: right;
}

.pagination__status {
  color: var(--dim);
}

/* Post */
.post {
  max-width: var(--prose);
  margin: 0 auto;
}

.post__head {
  display: grid;
  gap: 16px;
  padding: clamp(32px, 6vw, 72px) 0 32px;
}

.post__title {
  font-size: clamp(30px, 4.4vw, 48px);
}

.post__lead {
  font-size: 19px;
  color: var(--dim);
}

.post__hero {
  margin: 0 0 40px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.post__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Rich text */
.prose {
  max-width: var(--prose);
  font-size: 18px;
  line-height: 1.65;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 1.8em;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h2 {
  font-size: 28px;
}

.prose h3 {
  font-size: 22px;
}

.prose h4,
.prose h5,
.prose h6 {
  font-size: 18px;
}

.prose a {
  color: var(--blue);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose pre {
  padding: 16px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
}

.prose blockquote {
  margin: 1.5em 0;
  padding-left: 20px;
  border-left: 3px solid var(--blue);
  color: var(--dim);
}

.rt-figure {
  margin: 2em 0;
}

.rt-figure img {
  width: 100%;
  border-radius: 12px;
  background: var(--surface);
}

.rt-figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--dim);
}

.prose [data-oembed] iframe,
.prose iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 12px;
}

/* Static pages */
.page {
  max-width: var(--prose);
  margin: 0 auto;
}

.page--center {
  text-align: center;
  padding-bottom: 40px;
}

.page--center .page-head {
  justify-items: center;
}

.page--center .prose {
  margin: 0 auto 28px;
}

.page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Ask a question */
.ask {
  margin-top: clamp(80px, 11vw, 160px);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
    linear-gradient(
        135deg,
        rgb(59 130 246 / 0.55),
        rgb(255 255 255 / 0.08) 45%,
        rgb(255 255 255 / 0.08)
      )
      border-box;
}

.ask__title {
  font-size: 26px;
}

.ask__lead {
  margin-top: 10px;
  color: var(--dim);
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.form__error {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-container);
  color: var(--on-danger-container);
  font-size: 15px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 14px;
  font-weight: 500;
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--alpha-3);
  border-radius: 10px;
  background: var(--alpha-1);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}

.field__input:focus {
  outline: 2px solid var(--info);
  outline-offset: 1px;
  border-color: var(--info);
}

.field__input::placeholder {
  color: var(--fg-disabled);
}

textarea.field__input {
  resize: vertical;
  min-height: 140px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
}

.check input {
  margin: 4px 0 0;
  accent-color: var(--blue);
}

.form .button {
  justify-self: start;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px 48px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  font-size: 14px;
  color: var(--dim);
}

.footer__about {
  display: grid;
  gap: 14px;
  max-width: 52ch;
}

.footer__mark {
  width: 40px;
  height: 40px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav a {
  text-decoration: none;
}

.footer__nav a:hover {
  color: var(--ink);
}

.footer__legal {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer__legal-nav {
  display: flex;
  gap: 20px;
}

.footer__legal-nav a {
  text-decoration: none;
}

.footer__legal-nav a:hover {
  color: var(--ink);
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid,
  .form__row,
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .header__nav a:not(.header__brand) {
    display: none;
  }
  .pagination {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
