:root {
  --paper: #f4f3ed;
  --paper-raised: #fbfaf5;
  --ink: #12130f;
  --body: #343530;
  --muted: #6d6f67;
  --rule: rgba(18, 19, 15, 0.14);
  --line-strong: rgba(18, 19, 15, 0.28);
  --green: #536a1b;
  --wash: rgba(83, 106, 27, 0.09);
  --editorial-shadow: 0 24px 70px rgba(22, 24, 18, 0.1);
  --editorial-sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --editorial-serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --editorial-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --editorial-page: min(1220px, calc(100vw - 48px));
  --editorial-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #10110f;
  --paper-raised: #171815;
  --ink: #f0f1e9;
  --body: #d1d3ca;
  --muted: #999c91;
  --rule: rgba(240, 241, 233, 0.12);
  --line-strong: rgba(240, 241, 233, 0.24);
  --green: #b3cf43;
  --wash: rgba(179, 207, 67, 0.09);
  --editorial-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

body.front-page,
body.archive-page {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  cursor: auto;
  font-family: var(--editorial-sans);
  text-rendering: optimizeLegibility;
}

body.front-page *,
body.archive-page * {
  cursor: auto;
}

body.front-page input,
body.archive-page input,
body.front-page textarea,
body.archive-page textarea {
  cursor: text;
}

body.front-page ::selection,
body.archive-page ::selection {
  background: var(--green);
  color: var(--paper-raised);
}

body.front-page .site-cursor,
body.archive-page .site-cursor {
  display: none !important;
}

body.front-page {
  overflow-x: hidden;
  overflow-y: auto;
}

body.front-page .front-shell {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 24%, rgba(255, 255, 255, 0.64), transparent 31%),
    radial-gradient(ellipse at 20% 80%, rgba(211, 217, 202, 0.25), transparent 30%),
    var(--paper);
}

:root[data-theme="dark"] body.front-page .front-shell {
  background:
    radial-gradient(ellipse at 78% 24%, rgba(96, 109, 69, 0.12), transparent 31%),
    radial-gradient(ellipse at 20% 80%, rgba(58, 65, 52, 0.17), transparent 30%),
    var(--paper);
}

body.front-page .front-shell::before {
  inset: var(--mast-height) 0 0;
  border-top: 1px solid var(--rule);
  background:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: min(34vw, 420px) min(34vw, 420px);
  opacity: 0.12;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 86%, transparent);
}

body.front-page .front-shell::after {
  position: absolute;
  top: 18vh;
  right: -24vw;
  bottom: auto;
  left: auto;
  width: 62vw;
  height: 62vw;
  border: 1px solid var(--rule);
  border-radius: 49% 51% 42% 58% / 53% 39% 61% 47%;
  background: transparent;
  box-shadow: 0 0 0 7vw var(--wash);
  opacity: 0.9;
  animation: editorial-ring 20s var(--editorial-ease) infinite alternate;
  transform: none;
}

body.front-page .signal-field {
  inset: var(--mast-height) 0 0;
  height: calc(100% - var(--mast-height));
  filter: contrast(1.03) saturate(0.94);
  opacity: 0.38;
}

body.front-page .signal-lens {
  inset: var(--mast-height) 0 0;
  opacity: 0.38;
}

body.front-page .signal-grain {
  opacity: 0.035;
}

.editorial-public {
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--mast-height);
}

.editorial-public[hidden] {
  display: none;
}

.editorial-public-inner {
  display: grid;
  width: var(--editorial-page);
  min-height: calc(100svh - var(--mast-height) - 64px);
  align-items: center;
  margin: 0 auto;
  padding: clamp(54px, 6vw, 88px) 0 clamp(48px, 5.6vw, 72px);
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  gap: clamp(60px, 8vw, 116px);
}

.editorial-copy {
  position: relative;
  z-index: 5;
}

.editorial-copy .eyebrow,
.editorial-note .eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editorial-title {
  max-width: 660px;
  margin: 18px 0 0;
  font-size: clamp(3.8rem, 7.1vw, 7.2rem);
  font-weight: 490;
  letter-spacing: -0.072em;
  line-height: 0.88;
}

.editorial-descriptor {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--ink);
  font-family: var(--editorial-serif);
  font-size: clamp(1.35rem, 2.05vw, 1.9rem);
  line-height: 1.23;
}

.editorial-proof {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--editorial-mono);
  font-size: 0.71rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.editorial-form {
  display: grid;
  width: min(540px, 100%);
  margin-top: 28px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-raised), transparent 7%);
  box-shadow: 0 12px 34px rgba(22, 24, 18, 0.06);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.editorial-form label {
  display: flex;
  min-width: 0;
  align-items: center;
}

.editorial-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.2;
}

.editorial-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.editorial-submit {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 650;
  transition: background-color 120ms ease, transform 180ms var(--editorial-ease);
}

.editorial-submit:hover,
.editorial-submit:focus-visible {
  background: color-mix(in srgb, var(--green), #000 12%);
  transform: translateY(-1px);
}

.editorial-status {
  min-height: 1em;
  margin: 10px 14px 0;
  color: var(--green);
  font-size: 0.78rem;
}

.editorial-returning {
  margin: 10px 14px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.editorial-returning a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.editorial-art {
  position: relative;
  min-height: 535px;
}

.editorial-poster {
  position: absolute;
  top: 58px;
  right: clamp(28px, 4vw, 56px);
  width: min(100%, 670px);
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  border-radius: 30px 84px 32px 72px;
  background: #1a2730;
  box-shadow: var(--editorial-shadow);
  transform: rotate(1.1deg);
}

.editorial-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 8, 8, 0.34), transparent 42%);
  content: "";
  pointer-events: none;
}

.editorial-poster-caption {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 24px;
  left: 36px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
}

.editorial-poster-caption span,
.editorial-poster-caption time {
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial-note {
  position: absolute;
  z-index: 3;
  right: -8px;
  bottom: 28px;
  width: min(340px, 58%);
  padding: 24px 26px 23px;
  border: 1px solid var(--line-strong);
  border-radius: 22px 22px 52px 22px;
  background: color-mix(in srgb, var(--paper-raised), transparent 4%);
  box-shadow: 0 20px 60px rgba(17, 19, 14, 0.14);
  transform: rotate(-1.1deg);
  backdrop-filter: blur(12px);
}

.editorial-note h2 {
  margin: 10px 0 0;
  font-family: var(--editorial-serif);
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  font-weight: 500;
  line-height: 1.04;
}

.editorial-note > p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.editorial-note a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--green);
  font-size: 0.79rem;
  font-weight: 720;
  text-decoration: none;
}

.editorial-fragment {
  position: absolute;
  z-index: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-raised), transparent 18%);
  box-shadow: 0 12px 32px rgba(17, 19, 14, 0.06);
  animation: editorial-tab 7s var(--editorial-ease) infinite alternate;
}

.editorial-fragment-one {
  top: 26px;
  left: 7%;
  width: 170px;
  height: 48px;
  transform: rotate(-7deg);
}

.editorial-fragment-two {
  top: 18px;
  right: 7%;
  width: 94px;
  height: 35px;
  transform: rotate(9deg);
  animation-delay: -2.1s;
}

.editorial-fragment-three {
  bottom: 68px;
  left: 2%;
  width: 124px;
  height: 42px;
  transform: rotate(5deg);
  animation-delay: -4.3s;
}

.appearance-footer {
  position: relative;
  z-index: 8;
  display: flex;
  width: var(--editorial-page);
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.76rem;
}

.appearance-toggle {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}

.appearance-toggle:hover,
.appearance-toggle:focus-visible {
  color: var(--green);
  text-decoration-color: var(--green);
}

/* Weeks */

body.archive-page .archive-main {
  padding: clamp(32px, 3.4vw, 48px) var(--editorial-gutter) 96px;
}

body.archive-page .archive-shell {
  width: 100%;
  max-width: var(--editorial-frame);
}

body.archive-page .archive-heading {
  display: grid;
  align-items: end;
  margin-bottom: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 40px;
}

body.archive-page .archive-heading > h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--editorial-sans);
  font-size: clamp(4rem, 6.6vw, 6.8rem);
  font-weight: 480;
  letter-spacing: -0.08em;
  line-height: 0.84;
}

body.archive-page .archive-count {
  color: var(--green);
  font-family: var(--editorial-sans);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.16em;
}

body.archive-page .archive-description {
  max-width: 370px;
  margin: 0;
  color: var(--muted);
  font-family: var(--editorial-serif);
  font-size: 1.22rem;
  line-height: 1.42;
}

body.archive-page .archive-tools {
  width: min(34rem, 100%);
  margin-top: 0.35rem;
  grid-column: 1 / -1;
}

body.archive-page .archive-year + .archive-year {
  margin-top: 2.7rem;
}

body.archive-page .archive-year-heading {
  padding: 0.9rem 8px 0.72rem;
  border-top-color: var(--line-strong);
}

body.archive-page .archive-list {
  border-bottom-color: var(--rule);
}

body.archive-page .archive-row {
  min-height: 124px;
  padding: 14px 8px;
  border-top-color: var(--rule);
  color: var(--ink);
  grid-template-columns: 54px 160px 112px minmax(0, 1fr) 70px;
  gap: clamp(16px, 2vw, 24px);
  transform-origin: 0 50%;
  transition: opacity 180ms ease, transform 260ms var(--editorial-ease);
}

body.archive-page .archive-number {
  display: inline-flex;
  align-items: center;
  grid-column: 1;
}

body.archive-page .archive-thumb {
  height: 92px;
  overflow: hidden;
  border-radius: 16px 34px 16px 28px;
  background: var(--wash);
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: auto;
}

body.archive-page .archive-row time {
  grid-column: 3;
  grid-row: 1;
}

body.archive-page .archive-story {
  grid-column: 4;
  grid-row: 1;
}

body.archive-page .archive-read {
  grid-column: 5;
  grid-row: 1;
  justify-self: end;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

body.archive-page .archive-story strong {
  color: var(--ink);
  font-family: var(--editorial-sans);
  font-size: clamp(1.38rem, 2.25vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

body.archive-page .archive-story small {
  display: none;
}

body.archive-page .archive-number,
body.archive-page .archive-row time,
body.archive-page .archive-read {
  color: var(--muted);
  font-family: var(--editorial-mono);
  font-size: 0.69rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body.archive-page .archive-thumb img {
  filter: saturate(0.9) contrast(0.98);
  transform: scale(1.01);
}

body.archive-page .archive-row:hover,
body.archive-page .archive-row:focus-visible,
body.archive-page .archive-row.is-archive-focus {
  color: var(--ink);
  transform: translateX(3px);
}

body.archive-page .archive-list.is-focusing .archive-row:not(.is-archive-focus) {
  opacity: 0.82;
}

body.archive-page .archive-row-no-art {
  grid-template-columns: 54px 160px 112px minmax(0, 1fr) 70px;
}

body.archive-page .archive-locked {
  min-height: 28rem;
}

body.archive-page .archive-ghost-list {
  height: 28rem;
}

.archive-appearance-footer {
  margin-top: 56px;
}

@keyframes editorial-tab {
  from { translate: -4px 4px; }
  to { translate: 5px -5px; }
}

@keyframes editorial-ring {
  from { transform: rotate(-5deg) translate3d(0, 0, 0); }
  to { transform: rotate(7deg) translate3d(-2vw, 2vh, 0); }
}

@media (max-width: 980px) {
  :root {
    --editorial-page: min(100% - 40px, 780px);
  }

  .editorial-public-inner {
    min-height: auto;
    padding-top: 76px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .editorial-art {
    min-height: 535px;
  }

  .editorial-poster {
    right: 6%;
    left: 0;
    width: auto;
  }

  .editorial-note {
    right: 0;
    width: min(330px, 60%);
  }

  body.archive-page .archive-heading {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  body.archive-page .archive-description {
    max-width: 520px;
  }

  body.archive-page .archive-row,
  body.archive-page .archive-row-no-art {
    grid-template-columns: 54px 142px minmax(0, 1fr) 62px;
  }

  body.archive-page .archive-thumb {
    grid-column: 2;
  }

  body.archive-page .archive-row time {
    display: none;
  }

  body.archive-page .archive-story {
    grid-column: 3;
  }

  body.archive-page .archive-read {
    grid-column: 4;
  }
}

@media (max-width: 680px) {
  :root {
    --editorial-page: calc(100% - 28px);
  }

  .editorial-public {
    padding-top: 66px;
  }

  .editorial-public-inner {
    padding: 54px 0 62px;
  }

  .editorial-title {
    font-size: clamp(3.5rem, 16vw, 5.3rem);
    line-height: 0.9;
  }

  .editorial-descriptor {
    margin-top: 23px;
    font-size: 1.27rem;
  }

  .editorial-form {
    padding: 8px;
    border-radius: 24px;
    grid-template-columns: 1fr;
  }

  .editorial-form input {
    min-height: 44px;
  }

  .editorial-submit {
    width: 100%;
  }

  .editorial-art {
    display: grid;
    min-height: 0;
    padding-top: 44px;
  }

  .editorial-poster {
    position: relative;
    top: auto;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 22px 54px 22px 46px;
    transform: rotate(0.5deg);
  }

  .editorial-poster-caption {
    right: 21px;
    bottom: 19px;
    left: 26px;
  }

  .editorial-note {
    position: relative;
    right: auto;
    bottom: auto;
    width: 88%;
    padding: 21px 22px;
    margin: -28px 0 0 auto;
  }

  .editorial-note > p:not(.eyebrow) {
    display: none;
  }

  .editorial-fragment-one {
    width: 110px;
  }

  .editorial-fragment-three {
    display: none;
  }

  .appearance-footer {
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }

  body.archive-page .archive-main {
    padding: 52px 14px 84px;
  }

  body.archive-page .archive-heading > h1 {
    font-size: clamp(4.2rem, 22vw, 6.6rem);
  }

  body.archive-page .archive-row,
  body.archive-page .archive-row-no-art {
    min-height: 104px;
    padding-right: 2px;
    padding-left: 2px;
    grid-template-columns: 38px 88px minmax(0, 1fr);
    gap: 12px;
  }

  body.archive-page .archive-thumb {
    height: 76px;
    border-radius: 12px 24px 12px 20px;
    grid-column: 2;
  }

  body.archive-page .archive-story {
    grid-column: 3;
  }

  body.archive-page .archive-read {
    display: none;
  }

  body.archive-page .archive-story strong {
    font-size: 1.22rem;
    line-height: 1.06;
  }

  body.archive-page .archive-locked,
  body.archive-page .archive-ghost-list {
    min-height: 22rem;
    height: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.front-page .front-shell::after,
  .editorial-fragment {
    animation: none;
  }

  .editorial-submit,
  body.archive-page .archive-row,
  body.archive-page .archive-thumb img {
    transition: none;
  }
}
