:root {
  color-scheme: light;
  --paper: #f6f4f7;
  --ink: #22152f;
  --purple: #7d48b1;
  --blue: #2e566e;
  --surface: #fff;
  --lavender: #eee6f4;
  --mist: #e6eef2;
  --line: #c7bad0;
  --shadow: #ddd2e5;
  --radius: 6px;
  --duration: 250ms;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

[hidden] {
  display: none !important;
}

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

button {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

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

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

.edition-head {
  position: static;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 80px;
  padding-block: 8px;
  border-block-end: 3px solid var(--purple);
}

.edition-name {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
}

.read-main {
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 600;
}

.edition-title {
  color: var(--ink);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.edition-title:hover {
  text-decoration: underline;
}

.nav-switch {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background-color: transparent;
  color: var(--blue);
  font-weight: 600;
}

.nav-switch[aria-expanded='true'],
.nav-switch:hover {
  background-color: var(--mist);
}

.round-mark {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--mist);
  color: var(--blue);
}

.round-mark svg,
.playback svg {
  display: block;
  width: 18px;
  height: 18px;
}

.navigation-row {
  min-width: 0;
}

.menu-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
}

.menu-caption {
  margin: 0 0 6px;
  padding-inline: 8px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edition-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.edition-menu li + li::before {
  display: block;
  width: 14px;
  height: 1px;
  margin: 4px 8px;
  background-color: var(--line);
  content: '';
}

.edition-menu a {
  display: block;
  padding: 7px 8px;
  border-radius: 3px;
  color: var(--ink);
  text-decoration: none;
}

.edition-menu a:hover {
  text-decoration: underline;
}

.edition-menu a[aria-current='page'] {
  background-color: var(--lavender);
  box-shadow: inset 3px 0 0 var(--purple);
  color: var(--ink);
  font-weight: 600;
}

.main-content-frame {
  padding-block: 24px 40px;
  scroll-margin-block-start: 8px;
}

.home-sections {
  display: grid;
  gap: 40px;
  min-width: 0;
}

.opening {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.home-opening {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 21%);
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--purple);
  border-radius: var(--radius);
  background-color: var(--lavender);
}

.opening p {
  margin: 0;
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opening h1 {
  margin: 0;
  font-size: 62px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.home-opening p,
.home-opening h1 {
  grid-column: 1;
}

.opening-art {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  width: 100%;
  max-width: 200px;
  height: auto;
  color: var(--purple);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--blue);
  border-radius: var(--radius);
  background-color: var(--surface);
}

.topics h2 {
  font-size: 20px;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.post-label {
  padding: 3px 8px;
  border-radius: 3px;
  background-color: var(--lavender);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.feature {
  display: grid;
  gap: 16px;
  width: 75%;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--purple);
  border-radius: var(--radius);
  background-color: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playback {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--blue);
  border-radius: 50%;
  background-color: transparent;
  color: var(--blue);
}

.playback:hover {
  background-color: var(--mist);
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(175px, 30%);
  grid-template-areas: 'material choices';
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.slide-choices {
  display: flex;
  grid-area: choices;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.slide-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid #c7bad0;
  border-radius: 4px;
  background-color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: start;
}

.slide-choice:hover {
  border-color: var(--blue);
}

.slide-choice[aria-pressed='true'] {
  border-color: var(--purple);
  border-inline-start-color: var(--purple);
  background-color: var(--lavender);
}

.segment-number {
  color: var(--blue);
  font-size: 0.75rem;
  line-height: 1.65;
}

.slides {
  grid-area: material;
  min-width: 0;
  border-radius: var(--radius);
  background-color: var(--ink);
}

.slide {
  display: grid;
  grid-template-areas: 'picture';
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
  background-color: var(--ink);
  color: var(--surface);
}

.slide-image {
  display: block;
  grid-area: picture;
  align-self: start;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--blue);
}

.slide-copy {
  z-index: 1;
  display: grid;
  grid-area: picture;
  align-self: end;
  justify-items: start;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  background: linear-gradient(to top, #22152f, rgba(34, 21, 47, 0.84));
}

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

.slide-copy p {
  margin: 0;
}

.slide-link,
.post-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.slide-link {
  color: var(--surface);
}

.slide-link:hover {
  background-color: var(--surface);
  color: var(--ink);
}

.slide-link:focus-visible {
  outline-color: var(--surface);
}

.slide.is-fading {
  animation: slide-fade var(--duration) ease;
}

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

  to {
    opacity: 1;
  }
}

.post-section {
  display: grid;
  gap: 16px;
  padding-block-start: 12px;
  border-block-start: 3px solid var(--blue);
}

.post-list {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.post {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
  color: var(--ink);
  text-align: right;
  text-decoration: none;
  transition: transform var(--duration) ease, box-shadow var(--duration) ease;
}

.post:first-child {
  border-block-start: 3px solid var(--purple);
  background-color: #faf7fc;
}

.post-image {
  display: block;
  width: 72px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 4px;
  background-color: var(--lavender);
  object-fit: cover;
}

.post:first-child .post-image {
  width: 96px;
}

.post-copy {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.post-heading,
.abstract {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-heading {
  font-size: 30px;
  font-weight: 400;
  line-height: 1.18;
}

.abstract {
  color: var(--blue);
}

@media (hover: hover) {
  .post:hover {
    transform: translateY(-3px);
    box-shadow: 4px 7px 0 var(--shadow);
  }
}

.reading-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  align-items: start;
  gap: 38px;
  min-width: 0;
}

.post-page {
  display: grid;
  gap: 40px;
  width: 100%;
  min-width: 0;
  max-width: 614px;
  margin-left: auto;
  margin-right: 0;
}

.post-top {
  display: grid;
  gap: 16px;
}

.location ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.location li + li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.location [aria-current='page'] {
  color: var(--ink);
  font-weight: 500;
}

.prose {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--blue);
  border-radius: var(--radius);
  background-color: var(--surface);
}

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

.prose > :last-child {
  margin-block-end: 0;
}

.prose p {
  margin-block: 0 1em;
}

.prose h2,
.prose h3 {
  margin-block: 1.4em 0.55em;
  font-weight: 600;
  line-height: 1.2;
}

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

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

.prose strong,
.prose b {
  font-weight: 700;
}

.prose blockquote {
  margin: 1.25em 0;
  padding: 16px 18px;
  border-inline-start: 3px solid var(--purple);
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--lavender);
}

.prose blockquote::before {
  display: block;
  margin-block-end: 24px;
  color: var(--purple);
  font-size: 44px;
  line-height: 1;
  content: '«';
}

.prose blockquote > :last-child {
  margin-block-end: 0;
}

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

.prose ul,
.prose ol {
  margin-block: 0 1em;
  padding-inline-start: 1.65em;
  list-style-type: decimal;
}

.prose li + li {
  margin-block-start: 0.35em;
}

.prose li::marker {
  color: var(--purple);
  font-weight: 700;
}

.prose li > ul,
.prose li > ol {
  margin-block: 0.35em 0;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface);
}

.prose th,
.prose td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: start;
}

.prose th {
  background-color: var(--mist);
  font-weight: 600;
}

.prose caption {
  padding-block: 0 8px;
  color: var(--blue);
  font-weight: 600;
  text-align: start;
}

.prose [tabindex]:focus-visible {
  outline-offset: -2px;
}

.post-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block-start: 12px;
  border-block-start: 3px solid var(--purple);
}

.post-links a:hover {
  background-color: var(--mist);
}

.reading-note {
  padding: 18px;
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--blue);
  border-radius: var(--radius);
  background-color: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.reading-note h2 {
  font-size: 20px;
}

.reading-note p {
  margin: 10px 0;
}

.reading-note a {
  font-weight: 600;
}

.edition-foot {
  padding-block: 16px 24px;
  border-block-start: 3px solid var(--purple);
  color: var(--blue);
  font-size: 0.875rem;
}

.credits-row p {
  margin: 0;
}

@supports (grid-template-rows: subgrid) {
  @media (min-width: 881px) {
    body {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: auto 1fr auto;
      min-height: 100vh;
    }

    .edition-head {
      z-index: 2;
      display: grid;
      grid-column: 1;
      grid-row: 1 / 3;
      grid-template-rows: subgrid;
      pointer-events: none;
    }

    .brand-row,
    .navigation-row {
      pointer-events: auto;
    }

    .navigation-row {
      align-self: start;
      width: 248px;
      max-width: 100%;
      margin-block-start: 24px;
    }

    .main-content-frame {
      grid-column: 1;
      grid-row: 2;
    }

    .page-area {
      margin-inline-start: 274px;
    }

    .edition-foot {
      grid-column: 1;
      grid-row: 3;
    }
  }
}

@media (max-width: 1220px) {
  .feature {
    width: 100%;
  }
}

@media (max-width: 1120px) {
  .reading-area {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .reading-note {
    justify-self: end;
    width: 100%;
    max-width: 614px;
  }

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

  .post:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1000px) {
  .opening h1 {
    font-size: 48px;
  }
}

@media (max-width: 960px) {
  .feature-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'choices' 'material';
  }

  .slide-choices {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .slide-choice {
    flex: 1 1 130px;
  }
}

@media (max-width: 880px) {
  .navigation-row {
    margin-block-start: 8px;
  }
}

@media (min-width: 657px) and (max-width: 880px) {
  .edition-menu ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .edition-menu li {
    display: flex;
    align-items: center;
  }
}

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

  .brand-row {
    min-height: 64px;
  }

  .edition-title {
    font-size: 1.25rem;
  }

  .nav-switch {
    display: inline-flex;
  }

  .navigation-row {
    display: grid;
    grid-template-rows: 1fr;
    margin-block-start: 0;
    transition: grid-template-rows var(--duration) ease;
  }

  .navigation-row.is-collapsed {
    grid-template-rows: 0fr;
  }

  .edition-menu {
    min-height: 0;
    overflow: hidden;
  }

  .menu-panel {
    margin-block-start: 8px;
  }

  .edition-menu a {
    min-height: 40px;
    padding-block: 9px;
  }

  .main-content-frame {
    padding-block-start: 18px;
  }

  .home-opening {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .opening-art {
    display: none;
  }

  .opening h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .slide-choice {
    flex-basis: 110px;
  }

  .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-heading {
    font-size: 22px;
  }
}

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

  .feature-head .panel-heading {
    font-size: 20px;
  }

  .slide-copy h3 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .navigation-row,
  .post {
    transition: none;
  }

  .post:hover {
    transform: none;
  }

  .slide.is-fading {
    animation: none;
  }
}

/* Publication metadata and local covers */
.post-image, .post:first-child .post-image { width: 100%; aspect-ratio: 3 / 2; height: auto; }
.post-heading { display: block; overflow: visible; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
.post .abstract { -webkit-line-clamp: 3; }
.post-meta { font-size: .84rem; line-height: 1.5; color: var(--blue); margin: 0; }
.opening .post-meta { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .9rem; }
.slide-copy .post-meta { color: inherit; }
.article-cover { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); display: block; border: 1px solid var(--line); }
.post-page .opening h1 { font-size: clamp(30px, 4.4vw, 54px); overflow-wrap: anywhere; }
.topic-list a { text-decoration: none; }
.disclaimer { padding-block-start: 1em; border-block-start: 1px solid var(--line); font-size: .92em; }
.credits-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
