@import url("https://fonts.bunny.net/css?family=poppins:400,500,600,700,800");
@import url("https://fonts.bunny.net/css?family=source-serif-4:400,500,600,700");

:root {
  --ghost-accent: #fa7b09;
  --dark: #15171a;
  --mid: #738a94;
  --secondary: #979797;
  --light: #f1f1f1;
  --border: #e1e1e1;
  --page: #ffffff;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
}

body {
  background: var(--page);
  color: var(--dark);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--dark);
  text-decoration: none;
}

a:hover {
  opacity: 0.92;
}

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

.viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.outer {
  padding: 0 max(4vmin, 20px);
}

.inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.gh-head {
  background: #fff;
  height: 88px;
  border-bottom: 1px solid #f3f3f3;
  position: sticky;
  top: 0;
  z-index: 100;
}

.gh-head-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  height: 100%;
  column-gap: 40px;
}

.gh-head-brand {
  display: flex;
  align-items: center;
}

.gh-head-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.gh-head-logo img {
  display: block;
  width: auto;
  height: 60px;
  max-width: min(48vw, 280px);
}

.gh-head-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.gh-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid #ddd7cc;
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  padding: 0;
}

.gh-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.gh-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.gh-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.gh-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.gh-head-menu .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

.gh-head-menu .nav > li {
  margin: 0;
  padding: 0;
  position: relative;
}

.gh-head-menu .nav a,
.nav-link-button {
  color: var(--dark);
  font-weight: 500;
  line-height: 1.7;
}

.gh-head-menu .nav a.is-active {
  color: var(--ghost-accent);
}

.nav-inline-form {
  margin: 0;
}

.nav-link-button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.nav-login-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #e3ded4;
  padding: 0 14px;
  font-weight: 600;
  background: #fff;
}

.nav-dropdown > a::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  margin-bottom: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
}

.gh-dropdown {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 240px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 7px 20px -5px rgba(0, 0, 0, 0.18);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 40;
}

.nav-dropdown:hover .gh-dropdown,
.nav-dropdown:focus-within .gh-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gh-dropdown a {
  display: block;
  padding: 7px 16px;
  color: var(--dark);
  font-size: 1.45rem;
  font-weight: 500;
}

.gh-dropdown .view-all {
  margin-top: 4px;
  border-top: 1px solid #efefef;
  padding-top: 10px;
  color: var(--ghost-accent);
}

.site-main {
  flex-grow: 1;
  padding-top: 0;
}

.flash-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.flash {
  border: 1px solid #f0d4bd;
  background: #fff7f0;
  color: #8c4510;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.site-header-content {
  align-items: center;
  display: flex;
  text-align: center;
  position: relative;
  padding-top: calc(8vmin + 24px);
  padding-bottom: 8vmin;
  margin: 0 -max(4vmin, 20px);
}

.site-header-content.has-cover {
  min-height: 360px;
  color: #fff;
  background: var(--ghost-accent);
}

.site-header-content.is-authenticated,
.site-header-content.has-cover.is-authenticated {
  min-height: 260px;
  padding-top: calc(5vmin + 14px);
  padding-bottom: 5vmin;
}

.site-header-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header-content::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 20, 23, 0.08), rgba(17, 20, 23, 0.35));
  opacity: 0;
}

.site-header-content.has-cover::after {
  opacity: 1;
}

.site-header-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 max(4vmin, 20px);
}

.site-title {
  font-size: 6rem;
  line-height: 1;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-description {
  margin: 16px auto 0;
  font-size: 2.4rem;
  line-height: 1.4;
  font-weight: 400;
  max-width: 700px;
}

.post-feed {
  display: grid;
  gap: 4.8vmin 4vmin;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: max(4.8vmin, 36px) 0 0;
}

.home-series-list {
  padding: max(4.8vmin, 36px) 0 0;
}

.home-series-list-head {
  margin-bottom: 14px;
}

.home-series-list-head .section-title {
  margin-bottom: 0;
}

.home-series-rows {
  display: grid;
  gap: 16px;
}

.home-series-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.home-series-row:hover {
  border-color: #d4b795;
  background: #fffdf9;
  box-shadow: 0 10px 24px rgba(21, 23, 26, 0.08);
  transform: translateY(-1px);
}

.home-series-media {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--light);
  min-height: 148px;
}

.home-series-media img {
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
  object-position: center center;
}

.home-series-media-fallback {
  width: 100%;
  height: 100%;
  min-height: 148px;
  display: grid;
  place-items: center;
  color: #7f8f97;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1.2rem;
}

.home-series-media-tags {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.home-series-media-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: rgba(15, 20, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-series-content {
  display: grid;
  gap: 8px;
}

.home-series-header {
  display: grid;
  gap: 4px;
}

.home-series-title {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 800;
}

.home-series-kicker {
  margin: 0;
  color: var(--secondary);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-series-excerpt {
  margin: 0;
  color: #4e5f68;
  font-size: 1.52rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-series-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-series-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-size: 1.3rem;
}

.home-series-read {
  flex-shrink: 0;
}

.newsletter-panel {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 18px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(15, 20, 24, 0.5) 0%, rgba(15, 20, 24, 0.3) 70%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.newsletter-panel h2 {
  margin: 4px 0 8px;
  font-size: clamp(2.2rem, 2.4vw, 3.1rem);
  color: #fff;
}

.newsletter-copy .muted {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.newsletter-copy .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.newsletter-form {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.newsletter-form input[type="email"] {
  height: 44px;
  border-radius: 999px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.94);
}

.newsletter-form button {
  height: 44px;
}

.post-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
}

.post-card-image-link {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 2px;
  background: var(--light);
}

.post-card-image-link::after {
  content: "";
  display: block;
  padding-bottom: 55%;
}

.post-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 260ms ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.02);
}

.post-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-tags {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.post-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: rgba(15, 20, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card-title {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1.18;
  font-weight: 800;
}

.post-card-excerpt {
  margin-top: 12px;
  font-size: 1.55rem;
  line-height: 1.52;
  color: #4e5f68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  margin-top: 12px;
  color: var(--secondary);
  font-size: 1.3rem;
}

.post-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.read-button {
  min-width: 88px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 10px 24px rgba(21, 23, 26, 0.05);
}

.site-main .inner > .panel:first-child:not(.hero) {
  margin-top: 28px;
}

body.editor-template .panel {
  margin: 28px auto 0;
}

.hero {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.eyebrow {
  margin: 0;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.2rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 4.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.9rem;
  font-weight: 800;
  margin-bottom: 12px;
}

h3 {
  font-size: 2.2rem;
  font-weight: 700;
}

.muted,
.meta-row {
  color: var(--secondary);
}

.meta-row {
  font-size: 1.35rem;
}

.auth-embed {
  margin-top: 14px;
}

.auth-embed-meta {
  margin: 10px 0 0;
  color: #6d7f88;
  font-size: 1.3rem;
}

.auth-embed-meta a {
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 1200;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.56);
}

.auth-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  margin: 0;
  box-shadow: 0 24px 52px rgba(7, 10, 12, 0.28);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #e3d8c9;
  background: #fff;
  color: #4d5f68;
  font-size: 2rem;
  line-height: 1;
  z-index: 3;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.book-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.book-card > * {
  padding-left: 16px;
  padding-right: 16px;
}

.card-media {
  margin: 0 0 14px;
  padding: 0;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
}

.book-card .eyebrow {
  margin-top: 2px;
}

.book-card h3 {
  font-size: 2.1rem;
}

.book-card p {
  margin: 0 0 12px;
}

.chapter-list,
.comment-list,
.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.chapter-item,
.comment-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.chapter-item-clickable {
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.chapter-item-clickable:hover,
.chapter-item-clickable:focus-visible {
  border-color: #d4b795;
  background: #fffdf9;
  box-shadow: 0 10px 24px rgba(21, 23, 26, 0.08);
  transform: translateY(-1px);
}

.chapter-item-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.chapter-item-content > p:last-child {
  margin-bottom: 0;
}

.chapter-kicker {
  margin: 0 0 6px;
  color: var(--secondary);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.locked-item {
  border-color: #edd5be;
  background: #fff9f3;
}

.locked-item .chapter-item-title::after {
  content: "LOCKED";
  font-size: 1.05rem;
  margin-left: 8px;
  color: #9f6c3b;
  border: 1px solid #e6c9a9;
  border-radius: 999px;
  padding: 2px 7px;
  vertical-align: middle;
}

.chapter-section .section-title {
  margin-bottom: 14px;
}

.chapter-section {
  margin-bottom: 18px;
}

.series-release-schedule {
  margin: 0;
}

.series-offline-tools {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.series-offline-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.series-offline-status {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

@media (max-width: 767px) {
  .series-offline-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .series-offline-footer .button {
    width: 100%;
  }
}

.chapter-item.with-media {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.item-body.with-media {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.chapter-item-media {
  display: block;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  align-self: center;
  position: relative;
}

.chapter-item-media img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  object-position: center center;
}

.chapter-item-media-badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  transition: opacity 180ms ease;
}

.chapter-item-media:hover .chapter-item-media-badges {
  opacity: 0.35;
}

.chapter-description {
  margin-top: 0.5rem;
  line-height: 1.55;
  max-height: calc(1.55em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.format-badges {
  margin: 0.45rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid #ddd5c9;
  background: #faf7f2;
  color: #5a4a3a;
  padding: 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.format-badge.on-media {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 20, 24, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.prose {
  font-size: 1.9rem;
  line-height: 1.8;
  max-width: 74ch;
}

.prose h1,
.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  font-size: 3rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 1em 0 0;
}

.prose blockquote {
  border-left: 4px solid #d7e8f4;
  padding-left: 16px;
  color: #4f6775;
}

.hero-media {
  margin: -26px -26px 20px;
}

.hero-media img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center center;
}

.book-hero-media {
  position: relative;
}

.hero-image-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: rgba(15, 20, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chapter-nav-panel {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdfa;
  overflow: hidden;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.chapter-nav.has-both {
  justify-content: center;
}

.chapter-nav.has-prev {
  justify-content: center;
}

.chapter-nav.has-next {
  justify-content: center;
}

.chapter-nav.has-none {
  justify-content: center;
}

.chapter-nav-slot {
  display: flex;
}

.chapter-nav-slot.next {
  justify-content: flex-end;
}

.chapter-nav-slot.solo {
  justify-content: center;
}

.chapter-nav-link {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  transition: border-color 180ms ease, background-color 180ms ease;
  white-space: nowrap;
}

.chapter-nav-link:hover {
  border-color: #c9b39a;
  background: #fcf5ec;
  opacity: 1;
}

.chapter-nav-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 9px;
  padding: 0 12px;
  border: 1px solid #ddd5c9;
  background: #faf7f2;
  color: #5a4a3a;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chapter-nav-toolbar {
  border-top: 1px solid #ece7df;
  background: #fcfbf8;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chapter-nav-toolbar-label {
  color: #7d8f98;
  font-size: 1.2rem;
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chapter-nav-toolbar a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid #ddd5c9;
  background: #fff;
  color: #3d4f58;
  padding: 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.chapter-nav-toolbar .chapter-share-copy {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  height: 28px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid #ddd5c9;
  background: #fff;
  color: #3d4f58;
  padding: 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.chapter-nav-toolbar a:hover {
  border-color: #cab49b;
  background: #fcf5ec;
  opacity: 1;
}

.chapter-nav-toolbar .chapter-share-copy:hover {
  border-color: #cab49b;
  background: #fcf5ec;
  opacity: 1;
}

.comment-meta {
  color: var(--secondary);
  font-size: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chapter-form-section + .chapter-form-section {
  margin-top: 18px;
}

.chapter-details-disclosure {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.chapter-details-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 1.85rem;
  font-weight: 700;
  background: #fbfaf7;
  border-bottom: 1px solid var(--border);
}

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

.chapter-details-summary::before {
  content: "▾";
  margin-right: 8px;
  color: #556a74;
}

.chapter-details-disclosure:not([open]) .chapter-details-summary::before {
  content: "▸";
}

.chapter-details-disclosure:not([open]) .chapter-details-summary {
  border-bottom: 0;
}

.chapter-details-content {
  padding: 14px;
}

.chapter-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chapter-form-grid-full {
  grid-column: 1 / -1;
}

.editor-tabs {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.editor-tab-list {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: #fbfaf7;
  padding: 6px;
  gap: 6px;
}

.editor-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #5c6f79;
  border-radius: 999px;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 1.35rem;
  font-weight: 600;
}

.editor-tab.is-active {
  border-color: #e2d8cb;
  background: #fff;
  color: var(--dark);
}

.editor-tab-panel {
  padding: 14px;
}

.editor-action-row {
  margin-top: 14px;
}

.editor-inline-form {
  margin: 0;
}

.editor-hidden-form {
  display: none;
}

.item-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  flex-wrap: wrap;
  width: 100%;
  height: 4em;
  background: #f8f4ed;
  border: 1px solid #e4dbcf;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.chapter-item.with-top-header {
  padding: 0;
  overflow: hidden;
}

.chapter-item.with-top-header .item-head-row {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e4dbcf;
  border-radius: 0;
  padding: 7px 12px;
}

.chapter-item.with-top-header .item-body {
  padding: 12px 14px;
}

.item-head-meta {
  min-width: 0;
}

.item-submeta {
  margin-top: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #ddd5c9;
  background: #faf7f2;
  color: #5a4a3a;
  padding: 2px 8px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
}

.item-head-row .chapter-kicker,
.item-head-row .chapter-item-title {
  margin-bottom: 0;
}

.chapter-empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
}

.recent-item-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.recent-item-submeta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  justify-self: start;
}

.recent-item-kicker {
  justify-self: center;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item-head-row .item-actions {
  justify-self: end;
}

.recent-item-head-row > * {
  align-self: center;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: center;
}

.item-actions form {
  margin: 0;
  display: flex;
  align-items: center;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: #2f3c44;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
}

.item-actions button.chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 24px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  margin: 0;
  appearance: none;
}

.chip-link:hover {
  border-color: #cab49b;
  background: #fcf5ec;
  opacity: 1;
}

.chip-link.danger {
  border-color: #e9c3bf;
  color: #8f2517;
  background: #fff7f6;
  cursor: pointer;
}

.chip-link.danger:hover {
  border-color: #da9d95;
  background: #ffeceb;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel-header-row h1,
.panel-header-row h2 {
  margin: 0;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  height: 44px;
  padding: 0 18px;
  font-size: 1.55rem;
  font-weight: 600;
  background: var(--ghost-accent);
  color: #fff;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--dark);
}

form p {
  margin: 0 0 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 1.35rem;
  color: #566973;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #d0b088;
  box-shadow: 0 0 0 3px rgba(250, 123, 9, 0.14);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f8f6f1;
  opacity: 1;
}

.editor-toolbar a {
  color: #4b5f69 !important;
}

.editor-toolbar a.no-icon.toolbar-label {
  width: auto;
  min-width: 0;
  padding: 0 9px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.editor-toolbar button.no-icon.toolbar-label {
  width: auto;
  min-width: 0;
  padding: 0 9px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: #334a56;
  text-transform: none;
}

.editor-toolbar a.active,
.editor-toolbar a:hover {
  background: #efe6db;
  border-color: #ddc6aa;
}

.EasyMDEContainer .CodeMirror {
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  font-family: "Source Serif 4", "Iowan Old Style", "Book Antiqua", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.7;
}

.EasyMDEContainer .CodeMirror-focused {
  border-color: #d0b088;
  box-shadow: 0 0 0 3px rgba(250, 123, 9, 0.14);
}

.editor-preview,
.editor-preview-side {
  font-family: "Source Serif 4", "Iowan Old Style", "Book Antiqua", Georgia, serif;
  font-size: 1.95rem;
  line-height: 1.72;
  color: #1f2529;
  background: #fffdf9;
}

.editor-preview.markdown-preview-prose,
.editor-preview-side.markdown-preview-prose {
  padding: 24px clamp(18px, 3vw, 36px);
  background: #fffdf9;
}

.editor-preview.markdown-preview-prose {
  max-width: none;
  width: 100%;
  min-height: 100%;
  margin: 0;
}

.editor-preview-side.markdown-preview-prose {
  max-width: 72ch;
  margin: 0 auto;
}

.editor-preview.markdown-preview-prose p,
.editor-preview.markdown-preview-prose ul,
.editor-preview.markdown-preview-prose ol,
.editor-preview.markdown-preview-prose blockquote,
.editor-preview-side.markdown-preview-prose p,
.editor-preview-side.markdown-preview-prose ul,
.editor-preview-side.markdown-preview-prose ol,
.editor-preview-side.markdown-preview-prose blockquote {
  margin: 1em 0 0;
}

.editor-preview.markdown-preview-prose h1,
.editor-preview.markdown-preview-prose h2,
.editor-preview.markdown-preview-prose h3,
.editor-preview-side.markdown-preview-prose h1,
.editor-preview-side.markdown-preview-prose h2,
.editor-preview-side.markdown-preview-prose h3 {
  margin-top: 1.55em;
  margin-bottom: 0.4em;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.editor-preview.markdown-preview-prose h1,
.editor-preview-side.markdown-preview-prose h1 {
  font-size: clamp(3.1rem, 3.3vw, 4.4rem);
}

.editor-preview.markdown-preview-prose h2,
.editor-preview-side.markdown-preview-prose h2 {
  font-size: clamp(2.5rem, 2.2vw, 3.1rem);
}

.editor-preview.markdown-preview-prose h3,
.editor-preview-side.markdown-preview-prose h3 {
  font-size: clamp(2.05rem, 1.8vw, 2.4rem);
}

.editor-preview.markdown-preview-prose blockquote,
.editor-preview-side.markdown-preview-prose blockquote {
  border-left: 4px solid #d7e8f4;
  padding-left: 16px;
  color: #4f6775;
}

.editor-preview.markdown-preview-prose pre,
.editor-preview-side.markdown-preview-prose pre {
  border-radius: 10px;
  padding: 12px 14px;
  background: #f4f5f0;
  overflow: auto;
}

.editor-preview.markdown-preview-prose code,
.editor-preview-side.markdown-preview-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

.editor-preview.markdown-preview-prose a,
.editor-preview-side.markdown-preview-prose a {
  color: #2d5f85;
  text-decoration: underline;
}

.comment-form {
  margin-top: 14px;
}

.hero-upload-box {
  border: 1px dashed #d8c8b5;
  background: #fffcf8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.hero-upload-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-upload-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-upload-help {
  margin: 6px 0 10px;
  color: #6a7b85;
  font-size: 1.35rem;
}

.image-anchor-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.image-anchor-label {
  color: #6a7b85;
  font-size: 1.2rem;
  font-weight: 600;
}

.image-anchor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7c7b2;
  background: #fff;
  color: #566973;
  border-radius: 999px;
  height: 28px;
  padding: 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.image-anchor-btn.is-active {
  border-color: #cb9f6f;
  background: #fff2e3;
  color: #7a4c1f;
}

.image-anchor-control {
  display: none;
}

.hero-upload-control input[type="file"] {
  border: 1px solid #e2d8cc;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.hero-upload-preview {
  margin: 12px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2ddd4;
}

.hero-upload-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center center;
}

.audio-upload-box {
  background: #f8fbff;
  border-color: #bdd5ea;
}

.audio-upload-preview {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #d5e4f2;
  background: #fff;
  padding: 12px;
}

.audio-upload-preview audio {
  width: 100%;
}

.series-image-grid {
  display: grid;
  gap: 12px;
}

.series-image-box {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.series-image-preview {
  width: 190px;
  min-width: 190px;
  border-radius: 10px;
  border: 1px dashed #d8c8b5;
  background-color: #fff;
  background-position: center center;
  background-size: cover;
  cursor: pointer;
  position: relative;
}

.series-image-preview::before {
  content: "Drop image";
  position: absolute;
  left: 10px;
  bottom: 10px;
  height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: rgba(15, 20, 24, 0.68);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-image-preview.is-dragover {
  border-color: #d0b088;
  box-shadow: 0 0 0 4px rgba(250, 123, 9, 0.16);
}

.series-image-copy {
  min-width: 0;
  flex: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.comment-composer {
  margin-top: 18px;
}

.comment-composer-input-wrap {
  position: relative;
}

.comment-composer textarea {
  min-height: 122px;
  padding: 14px 116px 14px 14px;
  border-radius: 12px;
  border-color: #dfd9cf;
  background: #fffdfa;
}

.comment-composer textarea:focus {
  border-color: #cfab80;
}

.comment-send-button {
  position: absolute;
  right: 10px;
  bottom: 12px;
  height: 38px;
  padding: 0 14px;
  font-size: 1.35rem;
  border-radius: 999px;
}

.form-errors {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 6px;
  color: #9e2d1f;
  font-size: 1.3rem;
}

.form-errors li {
  background: #fff2ef;
  border: 1px solid #f2cec7;
  border-radius: 8px;
  padding: 8px 10px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: #6a7b85;
  font-size: 1.25rem;
}

.schedule-ordinals-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-ordinals-grid > div {
  margin: 0;
}

.schedule-ordinals-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid #d9c9b4;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 10px;
  color: #4f616b;
  background: #fff;
}

.schedule-ordinals-grid input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.chapter-panel {
  max-width: 920px;
  margin: 28px auto 0;
  padding: 0;
  border-radius: 16px;
  border-color: #e7e1d7;
  box-shadow: 0 24px 46px rgba(21, 23, 26, 0.08);
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 42%);
  overflow: hidden;
}

.chapter-panel .hero-media {
  margin: 0;
  position: relative;
}

.chapter-panel .hero-media img {
  max-height: 560px;
}

.chapter-panel .hero-media .chapter-item-media-badges {
  right: 12px;
  bottom: 12px;
}

.chapter-panel .hero-media:hover .chapter-item-media-badges {
  opacity: 0.35;
}

.chapter-head,
.chapter-prose,
.chapter-nav {
  padding-left: clamp(20px, 4vw, 58px);
  padding-right: clamp(20px, 4vw, 58px);
}

.chapter-head {
  padding-top: 30px;
  max-width: 80ch;
  margin-left: auto;
  margin-right: auto;
}

.chapter-title {
  margin-top: 8px;
  font-size: clamp(3.1rem, 3.4vw, 4.5rem);
  line-height: 1.08;
}

.chapter-meta {
  margin-top: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 1.18rem;
}

.chapter-excerpt {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 1.72rem;
  line-height: 1.7;
  color: #5f707a;
}

.chapter-prose {
  margin-top: 26px;
  padding-bottom: 26px;
  font-family: "Source Serif 4", "Iowan Old Style", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.95rem, 1.1vw + 1.5rem, 2.28rem);
  line-height: 1.92;
  max-width: 66ch;
  margin-left: auto;
  margin-right: auto;
  color: #212222;
  text-wrap: pretty;
}

.chapter-audio {
  padding-left: clamp(20px, 4vw, 58px);
  padding-right: clamp(20px, 4vw, 58px);
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  max-width: 66ch;
}

.chapter-audio audio {
  width: 100%;
}

.audio-player {
  border: 1px solid #d8dcd2;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7f8f3 100%);
  padding: 12px;
}

.audio-player-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-toggle,
.audio-skip {
  border: 1px solid #d4b795;
  background: #fff;
  color: #33271b;
  height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

.audio-player.is-playing .audio-toggle {
  background: #fa7b09;
  border-color: #fa7b09;
  color: #fff;
}

.audio-meta {
  min-width: 0;
}

.audio-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.audio-subtitle {
  margin: 0.2rem 0 0;
  color: #6e7a83;
  font-size: 1.2rem;
}

.audio-progress-wrap {
  margin-top: 12px;
}

.audio-progress-wrap input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
  height: 4px;
  border: 0;
  background: transparent;
}

.audio-time {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  color: #6f7d87;
}

.audio-controls-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-download {
  margin-left: auto;
  font-size: 1.2rem;
  font-weight: 600;
  color: #324a5d;
}

.audio-bookmark {
  margin-left: 2px;
}

.chapter-bookmark-feedback {
  margin: 2px 12px 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e4d5be;
  background: #fff8ef;
  color: #815529;
  font-size: 1.25rem;
}

.chapter-bookmark-feedback.bookmark-feedback-error {
  border-color: #e4c3be;
  background: #fff2f0;
  color: #8a2c23;
}

.bookmarkable-paragraph {
  position: relative;
  padding-right: 34px;
}

.chapter-text-bookmark-btn {
  position: absolute;
  top: 0.4em;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(243, 239, 232, 0.92);
  color: #777 !important;
  padding: 0;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 600;
  opacity: 0;
  transition: opacity 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.chapter-text-bookmark-btn.is-bookmarked {
  opacity: 0.95;
  border: 0;
  background: #ffe9d3;
  color: #b75800;
}

.bookmarkable-paragraph:hover .chapter-text-bookmark-btn,
.chapter-text-bookmark-btn:focus-visible {
  opacity: 1;
}

.chapter-text-bookmark-btn:hover {
  border: 0;
  background: #eee9df;
}

.bookmark-target-highlight {
  background: rgba(250, 123, 9, 0.12);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(226, 180, 127, 0.35);
}

body.dropcap-enabled .chapter-prose > p:first-of-type {
  margin-top: 0;
  line-height: 1.78;
}

body.dropcap-enabled .chapter-prose > p:first-of-type::first-letter {
  float: left;
  font-family: "Source Serif 4", "Iowan Old Style", "Book Antiqua", Georgia, serif;
  font-size: 2.78em;
  line-height: 0.84;
  margin-top: 0.06em;
  margin-right: 0.11em;
  margin-bottom: -0.04em;
  font-weight: 700;
  color: #3d3228;
}

@supports ((-webkit-initial-letter: 2) or (initial-letter: 2)) {
  body.dropcap-enabled .chapter-prose > p:first-of-type::first-letter {
    float: none;
    margin-top: 0;
    margin-right: 0.1em;
    margin-bottom: 0;
    -webkit-initial-letter: 2;
    initial-letter: 2;
  }
}

.chapter-prose h1,
.chapter-prose h2,
.chapter-prose h3 {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-top: 1.8em;
  margin-bottom: 0.48em;
  line-height: 1.22;
  font-size: clamp(2.5rem, 1.1vw + 1.7rem, 3.2rem);
}

.chapter-prose p,
.chapter-prose ul,
.chapter-prose ol,
.chapter-prose blockquote {
  margin-top: 1.18em;
}

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

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

.chapter-prose a {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.chapter-prose blockquote {
  border-left: 3px solid #d8c7b2;
  padding: 8px 0 8px 16px;
  color: #665849;
  font-style: italic;
}

.chapter-prose hr {
  border: 0;
  border-top: 1px solid #e5dfd6;
  margin: 2.3em 0;
}

.chapter-nav {
  margin-top: 6px;
  margin-bottom: 30px;
  max-width: 66ch;
  margin-left: auto;
  margin-right: auto;
}

.chapter-nav a {
  border-color: #e2ddd4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f4ec 100%);
  padding: 14px 16px;
  font-weight: 600;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.chapter-nav a:hover {
  border-color: #d0c2b2;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(21, 23, 26, 0.08);
}

.chapter-comments-panel {
  max-width: 920px;
  margin: 34px auto 0;
  border-color: #ece6dc;
  box-shadow: 0 16px 30px rgba(21, 23, 26, 0.05);
}

.chapter-comments-panel .section-title {
  margin-bottom: 12px;
}

.bookmark-list {
  margin-top: 6px;
}

.bookmark-item {
  display: grid;
  gap: 10px;
}

.bookmark-item-locked {
  border-color: #e8ccb1;
  background: #fffbf6;
}

.bookmark-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.bookmark-meta {
  min-width: 0;
}

.bookmark-target-meta strong {
  font-weight: 700;
}

.bookmark-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bookmark-actions form {
  margin: 0;
}

.bookmark-quote {
  margin: 0;
  border-left: 3px solid #dac8b2;
  padding-left: 10px;
  color: #4d5f69;
  font-size: 1.5rem;
  line-height: 1.58;
}

.bookmark-access-note {
  color: #9a5c24;
}

.bookmark-remark-form {
  margin: 0;
  display: grid;
  gap: 8px;
}

.bookmark-remark-form textarea {
  min-height: 82px;
}

.editor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.split-layout,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pricing-controls {
  display: grid;
  gap: 14px;
}

.pricing-billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ddcfbe;
  background: #fff8ef;
  border-radius: 999px;
  padding: 5px;
  justify-self: center;
}

.pricing-toggle-btn {
  height: 34px;
  border-radius: 999px;
  border: 0;
  padding: 0 14px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #5b4a38;
  background: transparent;
  cursor: pointer;
}

.pricing-toggle-btn.is-active {
  color: #fff;
  background: var(--ghost-accent);
}

.split-layout > :first-child {
  grid-column: span 2;
}

.pricing-card {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
}

.pricing-benefits {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  color: #4a5d68;
  font-size: 1.35rem;
}

.pricing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pricing-card-head .eyebrow {
  margin: 0;
}

.pricing-popular {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #f0bc8e;
  background: #fff3e4;
  color: #8f4d14;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding: 5px 9px;
}

.pricing-card.featured {
  border-color: #f0bc8e;
  box-shadow: 0 16px 28px rgba(250, 123, 9, 0.15);
}

.pricing-values {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fcfbf9;
  display: grid;
  gap: 4px;
}

.pricing-value-amount {
  margin: 0;
  text-align: left;
  font-size: 2.2rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #1d262d;
}

.pricing-value-period {
  color: #667985;
  font-size: 1.4rem;
  font-weight: 600;
  margin-left: 3px;
}

.pricing-value-note {
  margin: 0;
  color: #738892;
  font-size: 1.3rem;
}

.pricing-card .actions {
  margin-top: auto;
}

.pricing-checkout-form {
  margin: 0;
}

.pricing-cta {
  width: 100%;
  justify-content: center;
  font-weight: 700;
}

.supporter-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.supporter-counts p {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fcfbf8;
  color: #4a5d68;
  font-size: 1.3rem;
}

.supporter-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.supporter-top-card {
  margin: 0;
  padding: 14px 14px 12px;
}

.supporter-top-card h3 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  line-height: 1.2;
}

.supporter-rank-badge {
  display: inline-flex;
  margin: 0 0 7px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #694f2b;
  background: #f9edd4;
}

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

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

.supporter-rank-inline {
  color: #7a8b95;
  font-size: 1.3rem;
  font-weight: 700;
  margin-right: 4px;
}

.supporter-row {
  margin: 0;
  padding: 12px 14px;
}

.supporter-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
}

.supporter-row-head .chapter-item-title {
  margin: 0;
}

.supporter-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.supporter-row-meta .chapter-kicker {
  margin: 0;
}

.supporter-since {
  margin: 0;
}

@media (max-width: 900px) {
  .supporter-top-grid {
    grid-template-columns: 1fr;
  }

  .supporters-list {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  background: #0a0b0c;
  color: rgba(255, 255, 255, 0.72);
  margin-top: max(12vmin, 64px);
  padding-top: 34px;
  padding-bottom: 56px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  font-size: 1.35rem;
}

.footer-brand {
  min-width: 0;
}

.footer-tagline {
  margin-top: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.site-footer a,
.site-footer .copyright {
  color: #fff;
}

.mobile-pwa-prompt {
  border-bottom: 1px solid #d9cfbf;
  background: #f8f4ed;
}

.mobile-pwa-prompt__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px max(4vmin, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-pwa-prompt__copy {
  min-width: 0;
}

.mobile-pwa-prompt__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 700;
  color: #2e261f;
}

.mobile-pwa-prompt__text {
  margin: 2px 0 0;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #5f4e3e;
}

.mobile-pwa-prompt__hint {
  margin: 3px 0 0;
  font-size: 1.18rem;
  line-height: 1.28;
  color: #8c4b1f;
}

.mobile-pwa-prompt__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-pwa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 13px;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-pwa-btn-primary {
  border-color: #d88738;
  background: #fa7b09;
  color: #fff;
}

.mobile-pwa-btn-primary:hover {
  background: #ef7508;
}

.mobile-pwa-btn-secondary {
  border-color: #d0c5b7;
  background: #fff;
  color: #544638;
}

.mobile-pwa-btn-secondary:hover {
  background: #f6f1e8;
}

@media (min-width: 901px) {
  .mobile-pwa-prompt {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .gh-head {
    height: auto;
  }

  .gh-head-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .gh-nav-toggle {
    display: inline-flex;
  }

  .gh-head-logo img {
    height: 36px;
    max-width: min(65vw, 230px);
  }

  .gh-head-menu {
    grid-column: 1 / -1;
    width: 100%;
    display: none;
    justify-content: flex-start;
    border-top: 1px solid #f0ebe2;
    padding: 8px 8px 6px;
    margin-top: 2px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(18, 21, 24, 0.08);
  }

  .gh-head-menu.is-open {
    display: flex;
  }

  .gh-head-menu .nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .gh-head-menu .nav > li,
  .gh-head-menu .nav > li > a,
  .gh-head-menu .nav > li > form {
    width: 100%;
  }

  .gh-head-menu .nav a,
  .gh-head-menu .nav .nav-link-button {
    min-height: 40px;
    display: flex;
    align-items: center;
    line-height: 1.35;
    padding: 0 4px;
  }

  .nav-inline-form {
    width: 100%;
  }

  .nav-link-button {
    text-align: left;
  }

  .nav-login-trigger {
    justify-content: center;
  }

  .nav-dropdown > a::after {
    display: none;
  }

  .nav-dropdown .gh-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1px solid #ece3d6;
    border-radius: 8px;
    margin: 6px 0 8px;
    display: block;
    min-width: 0;
    background: #fcfaf6;
  }

  .gh-dropdown a {
    font-size: 1.35rem;
    padding: 8px 12px;
  }

  .mobile-pwa-prompt__inner {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

@media (max-width: 1000px) {
  .post-feed {
    grid-template-columns: 1fr 1fr;
  }

  .home-series-row {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .book-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-layout,
  .pricing-grid,
  .editor-columns {
    grid-template-columns: 1fr 1fr;
  }

  .newsletter-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .split-layout > :first-child {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  body.post-template .site-main.outer {
    padding-left: 0;
    padding-right: 0;
  }

  .post-feed {
    grid-template-columns: 1fr;
  }

  .home-series-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .home-series-media,
  .home-series-media img,
  .home-series-media-fallback {
    min-height: 180px;
  }

  .home-series-excerpt {
    -webkit-line-clamp: 3;
  }

  .home-series-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-series-read {
    width: 100%;
    justify-content: center;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .newsletter-form button {
    width: 100%;
  }

  .nav-login-trigger {
    min-height: 38px;
    padding: 0 12px;
  }

  .site-header-content,
  .site-header-content.has-cover {
    min-height: 200px;
    padding-top: calc(8vmin + 18px);
    padding-bottom: 7vmin;
  }

  .site-header-content.is-authenticated,
  .site-header-content.has-cover.is-authenticated {
    min-height: 150px;
    padding-top: calc(4vmin + 10px);
    padding-bottom: 4vmin;
  }

  .site-title {
    font-size: 3.4rem;
  }

  .gh-head-logo img {
    height: 36px;
    max-width: min(56vw, 220px);
  }

  .site-description {
    font-size: 2rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  .chapter-nav {
    justify-content: center;
  }

  .chapter-panel {
    border-radius: 12px;
  }

  .panel-header-row {
    align-items: flex-start;
  }

  .panel-header-actions {
    justify-content: flex-start;
  }

  .panel {
    padding: 18px;
  }

  body.post-template .panel {
    padding: 0;
  }

  body.post-template .chapter-comments-panel {
    padding: 18px;
  }

  .hero-media {
    margin: -18px -18px 16px;
  }

  .item-actions {
    justify-content: flex-start;
  }

  .item-head-row {
    height: auto;
    min-height: 4em;
  }

  .recent-item-head-row {
    grid-template-columns: 1fr;
    height: auto;
    row-gap: 8px;
  }

  .recent-item-head-row .recent-item-submeta,
  .recent-item-head-row .recent-item-kicker,
  .recent-item-head-row .item-actions {
    justify-self: start;
    text-align: left;
  }

  .recent-item-kicker {
    white-space: normal;
  }

  .chapter-head {
    padding-top: 20px;
  }

  body.post-template .chapter-panel {
    margin-top: 0;
    border-radius: 0;
    border-left-width: 0;
    border-right-width: 0;
  }

  body.post-template .chapter-panel .hero-media,
  body.post-template .chapter-panel .hero-media img {
    border-radius: 0;
  }

  .chapter-prose {
    font-size: 1.95rem;
    line-height: 1.84;
  }

  .hero-upload-head-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .bookmarkable-paragraph {
    padding-right: 0;
  }

  .chapter-text-bookmark-btn {
    opacity: 1;
    position: static;
    margin-top: 6px;
  }

  body.dropcap-enabled .chapter-prose > p:first-of-type::first-letter {
    font-size: 2.45em;
    margin-top: 0.03em;
    margin-right: 0.09em;
  }

  .book-grid,
  .split-layout,
  .pricing-grid,
  .editor-columns,
  .chapter-form-grid {
    grid-template-columns: 1fr;
  }

  .chapter-item.with-media {
    grid-template-columns: 1fr;
  }

  .chapter-item {
    padding: 14px;
  }

  .item-body.with-media {
    grid-template-columns: 1fr;
  }

  .chapter-item-media img {
    height: 180px;
  }

  .series-image-box {
    flex-direction: column;
  }

  .series-image-preview {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }

  .split-layout > :first-child {
    grid-column: span 1;
  }

  .pricing-value-amount {
    font-size: 2rem;
  }

  .pricing-billing-toggle {
    width: 100%;
    max-width: 360px;
  }

  .pricing-toggle-btn {
    flex: 1;
  }

  .chapter-nav-link {
    min-width: 0;
    max-width: 100%;
  }

  .chapter-nav-toolbar-label {
    width: 100%;
    margin-right: 0;
  }

  .staff-key-create-form {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-key-create-form input[type="text"] {
    min-width: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 12px;
  }

  .footer-links {
    justify-content: center;
  }

  .auth-modal {
    padding: 12px;
  }

  .auth-modal-dialog {
    width: 100%;
    max-height: 92vh;
  }

  .mobile-pwa-prompt__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .mobile-pwa-prompt__actions {
    width: 100%;
  }

  .mobile-pwa-btn {
    flex: 1;
    justify-content: center;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.staff-key-create-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.staff-key-create-form input[type="text"] {
  min-width: 220px;
}

.staff-key-reveal {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid var(--light-gray-color);
  border-radius: 10px;
  background: rgba(245, 243, 236, 0.65);
}

.staff-key-reveal input[type="text"] {
  width: 100%;
  margin-top: 8px;
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.account-preferences-form {
  display: grid;
  gap: 10px;
}

.account-page .panel + .panel {
  margin-top: 18px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  appearance: auto;
}

.web-push-controls {
  display: grid;
  gap: 10px;
}

.web-push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
