:root {
  --paper: #eae6e1;
  --ink: #603a4f;
  --plum: #a14076;
  --blue: #183578;
  --surface: #f5f0ed;
  --tint: #eee0e8;
  --rule: #603a4f38;
  --shadow: 0 6px 18px #603a4f12;
}

html {
  box-sizing: border-box;
}

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

html:has(dialog:modal) {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

button {
  font-size: inherit;
  line-height: inherit;
}

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

a {
  color: var(--plum);
  text-underline-offset: 0.19em;
}

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

.read-main {
  position: fixed;
  z-index: 10;
  top: 10px;
  left: 10px;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue);
  color: white;
}

.read-main:focus {
  width: auto;
  height: auto;
  clip-path: inset(0);
  padding: 8px 14px;
}

.edition-head,
.main-content-frame,
.edition-foot {
  width: calc(100% - 40px);
  max-width: 1366px;
  margin-inline: auto;
  padding-inline: 0;
}

.edition-head {
  position: sticky;
  z-index: 5;
  top: 0;
  display: grid;
  align-items: center;
  min-height: 78px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.brand-row {
  display: flex;
  justify-content: center;
  padding-block: 8px;
}

.edition-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  color: var(--ink);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
}

.edition-title img {
  flex: none;
  width: 42px;
  height: 42px;
}

.navigation-row {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  align-items: center;
}

.nav-switch,
.drawer-close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  cursor: pointer;
}

.nav-switch {
  display: none;
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(340px, calc(100% - 24px));
  max-width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 20px;
  overflow: auto;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0 14px 14px 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.drawer[open] {
  animation: slide-drawer 400ms ease-out;
}

.drawer::backdrop {
  background: #18357855;
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.drawer-top p {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.drawer-close {
  flex: none;
}

.main-content-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 246px;
  gap: 30px;
  align-items: start;
  padding-block: 30px;
  scroll-margin-top: 78px;
}

.front {
  display: grid;
  gap: 30px;
  min-width: 0;
}

.nav-place {
  min-width: 0;
}

.edition-links {
  padding: 14px 18px 16px;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-caption {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.edition-links ul,
.credits-row ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.edition-links ul {
  padding-top: 8px;
}

.edition-links li {
  display: grid;
  justify-items: start;
}

.edition-links a,
.credits-row a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.edition-links a {
  padding-block: 3px;
  font-size: 20px;
  line-height: 1.3;
}

.edition-links a:hover,
.credits-row a:hover {
  text-decoration: underline;
}

.edition-links a[aria-current="page"],
.credits-row a[aria-current="page"] {
  color: var(--blue);
}

.link-dot {
  color: var(--plum);
}

.edition-links .link-dot {
  margin-left: 3px;
  line-height: 1;
}

.opening {
  border-block: 1px solid var(--rule);
  border-top: 3px solid var(--plum);
  background: linear-gradient(105deg, var(--surface), transparent 82%);
}

.opening-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  padding-block: 16px 18px;
}

.opening p {
  grid-column: 1;
  margin: 0 0 3px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.opening h1,
.story-head h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.04;
}

.opening-art {
  grid-area: 1 / 2 / span 2;
  width: clamp(64px, 11vw, 132px);
  height: auto;
  color: var(--plum);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-block: 10px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.12;
}

.section-title svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.feature,
.materials,
.topics,
.story-head {
  border-top: 3px solid var(--plum);
}

.slide-visual {
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 12px 12px 0 0;
  background: repeating-linear-gradient(90deg, transparent 0 35px, #a140761a 35px 36px), linear-gradient(105deg, #e1cddc, #f2e8eb 48%, #d7dce9);
}

.slide-visual img {
  width: min(100%, clamp(175px, 38%, 266px));
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px #603a4f29;
}

.slide-copy {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.slide-copy h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.17;
}

.slide-copy a {
  color: var(--ink);
  text-decoration-color: var(--plum);
}

.slide.fading {
  animation: fade-slide 400ms ease-out both;
}

.slider-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  padding-top: 10px;
}

.slider-controls[hidden] {
  display: none;
}

.slide-count {
  margin: 0;
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
}

.slide-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-inline-start: auto;
}

.slide-picks button {
  min-width: 44px;
  min-height: 44px;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.slide-picks button:hover {
  border-color: var(--plum);
}

.slide-picks button[aria-current="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.post-list {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  gap: 12px;
}

.post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 174px;
  align-items: center;
  gap: 22px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 400ms ease, box-shadow 400ms ease;
}

.post:first-child {
  grid-row: span 2;
  background: linear-gradient(135deg, var(--tint), var(--surface) 76%);
}

.post-copy {
  min-width: 0;
  text-align: center;
}

.post h3 {
  margin: 0;
  overflow: hidden;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta,
.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  color: var(--ink);
  font-weight: 500;
}

.post-meta {
  justify-content: center;
  margin-top: 8px;
}

.post-label {
  display: inline-block;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid #a140764d;
  border-radius: 14px;
  background: var(--tint);
  color: var(--ink);
  font-weight: 600;
}

.abstract {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
}

.post-action {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 15px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-weight: 600;
}

.post:focus-visible .post-action {
  text-decoration: underline;
}

.post-preview {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0;
}

.post-preview img {
  width: auto;
  max-width: 100%;
  height: 132px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--tint);
}

.topic-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-bottom: 10px;
}

.topic-note p {
  margin: 0;
}

.post-page {
  min-width: 0;
  width: 100%;
  max-width: 622px;
  margin-left: auto;
  margin-right: auto;
}

.story-head {
  padding-block: 14px 16px;
  border-bottom: 1px solid var(--rule);
}

.location {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  margin-block: 10px;
}

.location a {
  font-weight: 600;
}

.post-page p,
.post-page ul,
.post-page ol {
  margin-block: 12px;
}

.post-page h2,
.post-page h3 {
  margin-block: 24px 8px;
  color: var(--blue);
  font-weight: 600;
  line-height: 1.15;
}

.post-page h2 {
  font-size: 30px;
}

.post-page h3 {
  font-size: 24px;
}

.post-page blockquote {
  margin: 18px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--plum);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
}

.post-page blockquote p {
  margin-block: 0 8px;
}

.post-page blockquote p:last-child {
  margin-bottom: 0;
}

.post-page cite {
  color: var(--blue);
  font-style: italic;
}

.post-page ul,
.post-page ol {
  padding-inline-start: 24px;
}

.post-page ul {
  list-style-type: square;
}

.post-page li::marker {
  color: var(--plum);
}

.post-page table {
  width: 100%;
  margin-block: 12px;
  border-collapse: collapse;
  background: var(--surface);
}

.post-page th,
.post-page td {
  padding: 7px 10px;
  border: 1px solid #603a4f70;
  text-align: start;
  vertical-align: top;
}

.post-page th {
  background: var(--tint);
  font-weight: 700;
}

.post-page caption {
  padding-bottom: 5px;
  color: var(--blue);
  font-weight: 600;
  text-align: start;
}

.edition-foot {
  border-top: 3px solid var(--blue);
}

.credits-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 18px;
  padding-block: 12px 16px;
}

.credits-row p {
  margin: 0;
  font-weight: 700;
}

.credits-row ul,
.credits-row li {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  align-items: baseline;
}

.reveal {
  width: calc(100% - 24px);
  margin-inline: auto;
  animation: reveal-items 400ms ease-out 150ms both;
}

.feature .reveal,
.post:first-child .reveal {
  animation-delay: 300ms;
}

.post:nth-child(2) .reveal {
  animation-delay: 450ms;
}

.post:nth-child(3) .reveal {
  animation-delay: 600ms;
}

.topics .reveal {
  animation-delay: 750ms;
}

@keyframes reveal-items {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-slide {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-drawer {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (hover: hover) {
  .post:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px #603a4f21;
  }
}

@media (max-width: 1150px) {
  .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .post:first-child {
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .post {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .post-preview {
    grid-row: 1;
  }
}

@media (max-width: 702px) {
  body {
    font-size: 16px;
  }

  .edition-head {
    min-height: 64px;
  }

  .edition-title {
    max-width: calc(100% - 100px);
    font-size: 28px;
  }

  .edition-title img {
    width: 34px;
    height: 34px;
  }

  .nav-switch:not([hidden]) {
    display: inline-grid;
  }

  .main-content-frame {
    grid-template-columns: minmax(0, 1fr);
    scroll-margin-top: 64px;
  }

  .opening h1,
  .story-head h1 {
    font-size: 36px;
  }

  .opening p {
    letter-spacing: 0.05em;
  }

  .section-title,
  .post-page h2 {
    font-size: 26px;
  }

  .post h3,
  .slide-copy h3 {
    font-size: 24px;
  }

  .slide-visual img {
    width: min(100%, 218px);
  }
}

@media (max-width: 480px) {
  .edition-head,
  .main-content-frame,
  .edition-foot {
    width: calc(100% - 48px);
  }

  .opening-content {
    column-gap: 8px;
  }

  .opening-art {
    width: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .slide.fading,
  .drawer[open] {
    animation: none;
  }

  .post {
    transition: none;
  }

  .post:hover {
    transform: none;
  }
}

/* Layout additions for editorial article covers and full headlines. */
.post h3 {white-space:normal;overflow:visible;text-overflow:clip;}
.post-preview img {width:100%;height:auto;aspect-ratio:3 / 2;object-fit:cover;}
.slide-visual img {width:min(100%,520px);aspect-ratio:3 / 2;}
.article-cover {width:100%;height:auto;aspect-ratio:3 / 2;object-fit:cover;margin:18px 0;border:1px solid var(--rule);border-radius:9px;}
.medical-note {border-top:1px solid var(--rule);padding-top:12px;font-style:italic;}
.story-meta a.post-label {text-decoration:none;}
.slide-copy .story-meta {margin-top:8px;}
@media (max-width:820px) {.post-preview img {max-width:440px;}}
