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

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

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

body {
  margin: 0;
  background: #fbfce9;
  color: #1e1c15;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

button {
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  color: inherit;
}

button,
summary {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.35;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #7a5f06;
}

:focus-visible {
  outline: 2px solid #7a5f06;
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

strong,
b {
  font-weight: 700;
}

.glyph {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

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

.read-main {
  display: block;
  padding-block: 5px;
  color: #7a5f06;
  font-size: 14px;
}

.edition-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fbfce9;
  border-bottom: 2px solid #264014;
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding-block: 12px;
}

.edition-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  text-decoration: none;
}

.edition-mark img {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.edition-title {
  min-width: 0;
  color: #264014;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.navigation-row {
  position: absolute;
  top: calc(100% + 38px);
  right: 0;
  width: 256px;
  max-width: 100%;
}

.nav-slot {
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  padding: 6px;
  background: #fbfce9;
}

#edition-nav {
  min-width: 0;
  border-top: 1px solid #7a5f06;
  padding-top: 18px;
}

.nav-caption {
  margin: 0 0 18px;
  color: #7a5f06;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link,
.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border-left: 1px solid rgba(38, 64, 20, 0.3);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.nav-link {
  transition: color 400ms ease;
}

.nav-link[aria-current='page'] {
  color: #264014;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-group {
  margin-top: 10px;
}

.nav-group summary {
  list-style: none;
  font-weight: 500;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary .glyph {
  transition: transform 400ms ease;
}

.nav-group[open] summary .glyph {
  transform: rotate(180deg);
}

.nav-entries {
  margin: 8px 0 0 12px;
  padding: 0;
  list-style: none;
}

.nav-entries li + li {
  margin-top: 4px;
}

.nav-entries .nav-link {
  font-size: 16px;
  line-height: 1.4;
}

.nav-group[open] .nav-entries {
  animation: unfold-list 400ms ease;
}

.nav-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(38, 64, 20, 0.25);
  color: #615d45;
  font-size: 14px;
  line-height: 1.5;
}

.nav-switch {
  position: absolute;
  right: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #264014;
}

.nav-dialog {
  width: min(256px, calc(100% - 24px));
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto 0 0;
  padding: 20px;
  border: 0;
  border-right: 2px solid #264014;
  background: #fbfce9;
  color: #1e1c15;
  overflow-y: auto;
}

.nav-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: unfold-dialog 400ms ease;
}

.nav-dialog::backdrop {
  background: rgba(30, 28, 21, 0.35);
}

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

.dialog-head p {
  margin: 0;
  color: #264014;
  font-weight: 600;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #264014;
}

.main-content-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 256px;
  column-gap: 36px;
  padding-block: 38px 0;
  scroll-margin-top: 100px;
}

.home-flow,
.story-flow {
  display: flex;
  flex-direction: column;
  gap: 38px;
  grid-column: 1;
  min-width: 0;
}

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  column-gap: 20px;
  align-items: center;
}

.opening p {
  grid-column: 1;
  margin: 0 0 14px;
  color: #7a5f06;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.opening h1,
.post-heading h1 {
  margin: 0;
  font-size: 58px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.opening h1 {
  grid-column: 1;
}

.opening-mark {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 76px;
  height: 110px;
  color: #7a5f06;
}

.opening,
.post,
.feature-slider {
  animation: reveal-items 400ms ease 50ms backwards;
}

.posts-section,
.topics-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  border-top: 1px solid #7a5f06;
  padding-top: 20px;
}

.section-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.section-top h2,
.feature-slider h2,
.post-links h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.section-top p {
  margin: 0;
  color: #615d45;
  font-size: 14px;
}

#posts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border-left: 2px solid #7a5f06;
  border-bottom: 1px solid rgba(38, 64, 20, 0.3);
  background: rgba(122, 95, 6, 0.035);
  transition: transform 400ms ease, border-color 400ms ease;
}

.post-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 152px;
  max-width: 100%;
}

.post-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e8ecd3;
}

.post:nth-child(2) .post-preview img {
  width: 88%;
}

.post:nth-child(3) .post-preview img {
  width: 94%;
}

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

.post h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
}

.post h3 a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}

.post h3 a:hover {
  text-decoration: underline;
}

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

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.post-label {
  display: inline-block;
  color: #264014;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.post-meta .post-label {
  padding-block: 2px;
  border-bottom: 1px solid #7a5f06;
}

.feature-slider {
  display: grid;
  gap: 18px;
  width: 75%;
  min-width: 0;
  margin-left: auto;
  border-top: 1px solid #7a5f06;
  padding-top: 20px;
}

.slider-tools {
  display: grid;
  gap: 10px;
}

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

.slide-previous,
.slide-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #264014;
}

.slide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}

.slide-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  padding: 8px;
  border: 0;
  background: transparent;
}

.slide-dot span {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid #264014;
  background: transparent;
}

.slide-dot[aria-pressed='true'] span {
  background: #264014;
}

.slide-progress {
  display: block;
  width: 100%;
  height: 3px;
  border: 0;
  border-radius: 0;
  background: rgba(38, 64, 20, 0.15);
  color: #7a5f06;
  appearance: none;
}

.slide-progress::-webkit-progress-bar {
  background: rgba(38, 64, 20, 0.15);
}

.slide-progress::-webkit-progress-value {
  background: #7a5f06;
}

.slide-progress::-moz-progress-bar {
  background: #7a5f06;
}

.slider-status,
.slider-state {
  margin: 0;
  color: #615d45;
  font-size: 13px;
  line-height: 1.5;
}

.slider-status {
  text-align: right;
}

.slide-stage {
  display: grid;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.feature-panel {
  grid-area: 1 / 1;
  min-width: 0;
  padding-bottom: 6px;
}

.feature-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8ecd3;
}

.feature-copy {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin: -36px 20px 0;
  padding: 18px;
  border-top: 2px solid #7a5f06;
  background: #fbfce9;
}

.feature-copy h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.slide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #264014;
  text-decoration: none;
  transition: color 400ms ease;
}

.slide-enter-forward {
  z-index: 1;
  animation: frame-in-forward 400ms ease-in-out;
}

.slide-exit-forward {
  animation: frame-out-forward 400ms ease-in-out;
}

.slide-enter-back {
  z-index: 1;
  animation: frame-in-back 400ms ease-in-out;
}

.slide-exit-back {
  animation: frame-out-back 400ms ease-in-out;
}

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

.topic-list li {
  min-width: 0;
  border-left: 1px solid rgba(38, 64, 20, 0.35);
  padding-left: 14px;
}

.topic-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.glyph-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: rgba(38, 64, 20, 0.08);
  color: #264014;
}

.topic-name .post-label {
  font-size: 18px;
}

.topic-list p {
  margin: 10px 0 0;
  color: #615d45;
  font-size: 15px;
  line-height: 1.5;
}

.location {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  width: 100%;
  max-width: 604px;
  margin-inline: auto;
  color: #615d45;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.location a {
  flex-shrink: 0;
}

.location [aria-current='page'] {
  min-width: 0;
}

.post-page {
  width: 100%;
  max-width: 604px;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: anywhere;
}

.post-heading {
  margin-bottom: 32px;
  border-bottom: 1px solid #7a5f06;
  padding-bottom: 24px;
}

.post-heading .post-meta {
  justify-content: flex-start;
  margin-top: 20px;
}

.post-page p {
  margin: 0 0 20px;
}

.post-page h2 {
  margin: 32px 0 14px;
  color: #264014;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
}

.post-page h3 {
  margin: 24px 0 12px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.post-page a {
  color: #7a5f06;
}

.post-page blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid #7a5f06;
  color: #264014;
}

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

.post-page cite {
  display: block;
  margin-top: 12px;
  color: #615d45;
  font-size: 16px;
  font-style: italic;
}

.post-page ul,
.post-page ol {
  margin: 0 0 20px;
  padding-left: 26px;
}

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

.post-page li {
  padding-left: 4px;
}

.post-page li + li {
  margin-top: 8px;
}

.post-page li::marker {
  color: #7a5f06;
  font-weight: 600;
}

.post-page li > ul,
.post-page li > ol {
  margin-top: 8px;
}

.post-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

.post-page caption {
  padding-block: 12px;
  color: #264014;
  font-size: 18px;
  font-weight: 500;
  text-align: left;
}

.post-page th,
.post-page td {
  border-bottom: 1px solid rgba(38, 64, 20, 0.3);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.post-page th {
  border-bottom-color: #7a5f06;
  color: #264014;
  font-weight: 600;
}

.post-page img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 24px;
}

.post-page pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 16px;
  border-left: 2px solid #7a5f06;
  background: rgba(38, 64, 20, 0.04);
}

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

.post-links {
  width: 100%;
  max-width: 604px;
  margin-inline: auto;
  border-top: 1px solid #7a5f06;
  padding-top: 20px;
}

.post-links ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.post-links li {
  border-bottom: 1px solid rgba(38, 64, 20, 0.25);
}

.post-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 16px;
  text-decoration: none;
}

.post-links a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.post-links a:hover,
.post-links a[aria-current='page'] {
  text-decoration: underline;
}

.edition-foot {
  margin-top: 38px;
}

.credits-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  border-top: 2px solid #264014;
  padding-block: 24px;
  color: #615d45;
  font-size: 14px;
}

.credits-row p {
  margin: 0;
}

@media (hover: hover) {
  .post:hover {
    border-color: #264014;
    transform: translateY(-2px);
  }
}

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

  .opening-mark {
    display: none;
  }

  .opening h1,
  .post-heading h1 {
    font-size: 46px;
  }

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

  .post-preview {
    width: 100%;
  }

  .post:nth-child(2) .post-preview img,
  .post:nth-child(3) .post-preview img {
    width: 100%;
  }

  .feature-slider {
    width: 100%;
  }

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

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

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

  .edition-mark {
    gap: 10px;
    max-width: calc(100% - 88px);
  }

  .edition-mark img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .edition-title {
    font-size: 21px;
  }

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

  .navigation-row {
    position: static;
    width: 100%;
  }

  .nav-slot {
    max-height: none;
    padding: 16px 0;
  }

  .js-ready .nav-slot {
    display: none;
  }

  .main-content-frame {
    display: block;
    padding-top: 30px;
  }

  .opening h1,
  .post-heading h1 {
    font-size: 38px;
    line-height: 1.12;
  }

  .opening p {
    font-size: 12px;
  }

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

  .post {
    gap: 20px;
    padding: 18px;
  }

  .feature-copy {
    gap: 10px;
    margin-inline: 12px;
    padding: 16px;
  }

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

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

  .post-page blockquote {
    padding-left: 18px;
  }
}

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

  .edition-title {
    font-size: 19px;
  }

  .opening h1,
  .post-heading h1 {
    font-size: 36px;
  }

  .feature-copy h3 {
    font-size: 22px;
  }
}

@keyframes reveal-items {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes unfold-list {
  from {
    max-height: 0;
    overflow: hidden;
  }

  to {
    max-height: 70vh;
    overflow: hidden;
  }
}

@keyframes unfold-dialog {
  from {
    max-height: 0;
  }

  to {
    max-height: 100dvh;
  }
}

@keyframes frame-in-forward {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes frame-out-forward {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }
}

@keyframes frame-in-back {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes frame-out-back {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(100%);
  }
}

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

  .opening,
  .post,
  .feature-slider,
  .nav-dialog[open],
  .nav-group[open] .nav-entries,
  .slide-enter-forward,
  .slide-exit-forward,
  .slide-enter-back,
  .slide-exit-back {
    animation: none;
  }

  .post,
  .nav-link,
  .nav-group summary .glyph,
  .slide-link {
    transition: none;
  }

  .post:hover {
    transform: none;
  }
}
