.story-library,
.story-reading-wrap {
  --story-ink: #253f35;
  --story-muted: #54685e;
  --story-gold: #9c4e24;
  --story-line: #dcded0;
  color: var(--story-ink);
  padding-bottom: 40px;
}
.story-library .breadcrumb,
.story-reading-wrap .breadcrumb {
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.story-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #765133;
}
.story-library-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding: 42px;
  background: #f3f2e8;
  border: 1px solid #e0e3d6;
  border-radius: 24px;
  overflow: hidden;
}
.story-library-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.18;
  letter-spacing: -1.2px;
  margin: 18px 0;
  color: #284a3b;
}
.story-library-hero p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 500px;
  color: var(--story-muted);
}
.story-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 21px;
  background: #284e3c;
  color: white !important;
  border-radius: 9px;
  font-weight: 700;
  margin-top: 12px;
}
.story-library-stats {
  display: flex;
  gap: 26px;
  align-items: center;
  margin-top: 30px;
  font-size: 12px;
  color: #536457;
}
.story-library-stats strong {
  font-size: 26px;
  color: #284e3c;
  display: block;
}
.story-library-stats > span:last-child {
  border-left: 1px solid #c4cebf;
  padding-left: 22px;
  line-height: 1.7;
}
.story-featured {
  display: block;
  background: #fffefa;
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 15px 35px #264d3620;
  transform: rotate(2deg);
}
.story-art {
  aspect-ratio: 1;
  background-color: #e9e4d3;
  background-size: 200% 200%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.story-featured > div:last-child {
  display: grid;
  padding: 14px 13px 12px;
  gap: 5px;
}
.story-featured small {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: #765133;
  font-weight: 800;
}
.story-featured strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  color: #263f34;
}
.story-featured span {
  font-size: 12px;
  color: #576a5b;
}
.story-placeholder {
  position: absolute;
  inset: 20%;
  border: 2px solid #b5aa8c;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #74613e;
  font:
    22px Georgia,
    serif;
}
.story-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 42px 0 20px;
}
.story-section-heading h2 {
  font-size: 29px;
  font-family: Georgia, "Times New Roman", serif;
  margin: 9px 0 0;
}
.story-section-heading p {
  font-size: 13px;
  color: #536457;
}
.story-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px;
  background: #f6f7f2;
  border: 1px solid var(--story-line);
  border-radius: 13px;
  margin-bottom: 25px;
}
.story-filters > div {
  min-width: 0;
  flex: 1;
}
.story-filters .story-search {
  flex: 1.8;
}
.story-filters label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}
.story-filters input,
.story-filters select,
.story-audio select {
  width: 100%;
  border: 1px solid #aebcae;
  border-radius: 7px;
  background: white;
  color: #243e33;
  padding: 11px;
  font: inherit;
  font-size: 14px;
  min-height: 44px;
}
.story-library button,
.story-reading-wrap button {
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #b3c2b3;
  background: #fffef8;
  border-radius: 7px;
  color: #274939;
  font-weight: 700;
}
.story-library button:hover,
.story-reading-wrap button:hover {
  background: #eaf0e5;
}
.story-library button[aria-pressed="true"],
.story-reading-wrap button[aria-pressed="true"] {
  background: #294f3d;
  color: #fff;
  border-color: #294f3d;
}
.story-library button:focus-visible,
.story-reading-wrap button:focus-visible,
.story-library a:focus-visible,
.story-reading-wrap a:focus-visible,
.story-library input:focus-visible,
.story-library select:focus-visible {
  outline: 3px solid #ad6238;
  outline-offset: 3px;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.story-card {
  border: 1px solid var(--story-line);
  background: #fffefa;
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.story-card:hover {
  box-shadow: 0 9px 24px #2d4e3017;
  transform: translateY(-3px);
}
.story-cover-link {
  display: block;
  padding: 9px 9px 0;
}
.story-card-copy {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.story-tags span {
  font-size: 11px;
  background: #edf0e7;
  color: #40563f;
  padding: 5px 8px;
  border-radius: 5px;
  font-weight: 700;
}
.story-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.25;
  margin: 12px 0 8px;
}
.story-card h2 a {
  color: #2a4839;
}
.story-card p {
  font-size: 12px;
  line-height: 1.65;
  color: #596a5c;
  margin: 0 0 10px;
}
.story-with-adult {
  font-size: 11px;
  font-weight: 700;
  color: #78431d;
  margin: 1px 0 13px;
  display: block;
}
.story-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e8e8de;
}
.story-read-link {
  font-size: 12px;
  font-weight: 800;
  color: #29503d !important;
}
.story-card-bottom button {
  padding: 7px 11px;
  min-height: 36px;
  font-size: 12px;
}
.story-card [data-story-read-state] {
  font-size: 11px;
  color: #355c44;
  line-height: 1.5;
  margin-top: 8px;
}
.story-card[hidden],
.story-empty[hidden],
.story-continue[hidden] {
  display: none;
}
.story-empty {
  text-align: center;
  background: #f3f4ed;
  padding: 35px;
  border-radius: 12px;
  line-height: 1.8;
}
.story-parent-note {
  background: #f3f1e7;
  border-left: 4px solid #9f8250;
  border-radius: 0 13px 13px 0;
  padding: 23px 28px;
  margin-top: 36px;
}
.story-parent-note h2 {
  font-size: 20px;
  margin: 0 0 10px;
}
.story-parent-note p {
  color: #58634f;
  font-size: 14px;
  line-height: 1.8;
  margin: 8px 0;
}
.story-local-note {
  font-size: 12px;
  color: #53685b;
  margin: 16px 0;
}
.story-continue {
  background: #eaf1e5;
  padding: 18px 22px;
  border-radius: 12px;
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.story-continue a {
  font-weight: 700;
  color: #2e523a;
}
.story-continue strong {
  display: block;
  font-size: 13px;
}
.story-continue small {
  color: #556752;
}
.story-page {
  max-width: none !important;
}
.story-heading {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
  margin: 30px 0;
}
.story-heading > .story-art {
  max-width: 330px;
  width: 100%;
  justify-self: end;
  box-shadow: 0 12px 35px #304b3420;
  border: 8px solid #fffdfa;
  border-radius: 14px;
}
.story-page .story-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  margin: 14px 0;
}
.story-byline {
  font-size: 14px;
  color: #586958;
  line-height: 1.6;
}
.story-heading .story-tags {
  margin: 15px 0;
}
.story-edition {
  font-size: 13px;
  color: #60705f;
  line-height: 1.75;
  max-width: 600px;
}
.story-companion {
  padding: 16px 20px;
  background: #fbf0dc;
  border-left: 4px solid #b98b44;
  border-radius: 0 9px 9px 0;
  margin: 20px 0;
  color: #644718;
}
.story-companion strong {
  font-size: 14px;
}
.story-companion p {
  font-size: 13px;
  margin: 7px 0 0;
  line-height: 1.7;
}
.story-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--story-line);
  border-bottom: 1px solid var(--story-line);
}
.story-audio {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 15px;
}
.story-audio label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.story-audio select {
  width: auto;
  min-height: 40px;
  padding: 7px;
}
.story-audio > span {
  font-size: 12px;
  color: #596c5e;
  flex: 1;
  min-width: 180px;
}
.story-reading-wrap button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.story-reader-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 760px);
  gap: 35px;
  justify-content: center;
  margin-top: 24px;
}
.story-index {
  align-self: start;
  position: sticky;
  top: 22px;
  font-size: 13px;
  display: grid;
  gap: 12px;
}
.story-index nav {
  display: grid;
  gap: 10px;
}
.story-index a {
  color: #51664f;
  line-height: 1.5;
}
.story-index button {
  text-align: left;
  font-size: 12px;
}
.story-index p {
  font-size: 11px;
  line-height: 1.6;
  color: #586e59;
}
.story-paper {
  border: 1px solid #e0e3d5;
  border-radius: 12px;
  padding: 32px 42px;
  background: #fffefa;
  box-shadow: 0 5px 20px #28433005;
  min-width: 0;
}
.story-page .body {
  font-size: var(--story-font, 19px);
  line-height: 1.95;
  color: #2f3d32;
  font-family: Georgia, "Times New Roman", serif;
  overflow-wrap: break-word;
}
.story-page .body > p {
  margin: 0 0 1.25em;
}
.story-page .body > p:first-child:first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.95;
  padding: 8px 10px 0 0;
  color: #81522b;
}
.story-page .body > h2 {
  font: 700 24px/1.4 system-ui;
  margin: 38px 0 18px;
  padding-top: 25px;
  border-top: 1px solid var(--story-line);
  scroll-margin-top: 30px;
}
.story-page .body .quiz-card,
.story-page .body .quiz-hud,
.story-page .body .quiz-finish {
  font-family: system-ui;
  font-size: 16px;
  line-height: 1.65;
}
.story-page .body .answer {
  font-family: system-ui;
  font-size: 15px;
  line-height: 1.75;
}
.story-page .body p.story-speaking {
  background: #e8efd9;
  outline: 8px solid #e8efd9;
  border-radius: 3px;
}
.story-page.warm .story-paper {
  background: #f5edda;
}
.story-finish-reading {
  border-top: 1px solid var(--story-line);
  margin-top: 32px;
  padding-top: 24px;
  text-align: center;
}
.story-finish-reading button {
  background: #2a4c3a;
  color: #fff;
}
.story-finish-reading p {
  font: 13px/1.7 system-ui;
  color: #566957;
  margin-top: 10px;
}
.story-source {
  margin-top: 25px;
  font: 12px/1.75 system-ui;
  color: #596b5c;
}
.story-source summary {
  cursor: pointer;
  font-weight: 700;
}
.story-source p {
  margin: 8px 0;
}
.story-source a {
  text-decoration: underline;
  color: #365a43;
}
.story-related {
  margin-top: 42px;
}
.story-related > h2 {
  font:
    700 25px/1.4 Georgia,
    "Times New Roman",
    serif;
  margin-bottom: 20px;
}
.story-related .story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.story-back {
  display: inline-block;
  margin-top: 30px;
  color: #365b42;
  font-weight: 700;
}
.story-focus .story-heading,
.story-focus .story-companion,
.story-focus .story-index,
.story-focus .story-related,
.story-focus .topbar,
.story-focus .breadcrumb {
  display: none;
}
.story-focus .story-reader-layout {
  grid-template-columns: minmax(0, 800px);
}
.story-focus .story-tools {
  position: sticky;
  top: 0;
  background: #fffefa;
  z-index: 20;
}
.story-page [hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .story-library-hero {
    gap: 30px;
    padding: 30px;
  }
  .story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .story-reader-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 22px;
  }
  .story-paper {
    padding: 28px;
  }
  .story-filters {
    flex-wrap: wrap;
  }
  .story-filters .story-search {
    flex-basis: 100%;
  }
}
@media (max-width: 700px) {
  .story-library-hero {
    grid-template-columns: 1fr;
    padding: 25px;
    gap: 25px;
  }
  .story-featured {
    max-width: 350px;
    justify-self: center;
    width: 100%;
  }
  .story-library-hero h1 {
    font-size: 35px;
  }
  .story-library-stats {
    gap: 20px;
  }
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
  .story-filters > div {
    flex-basis: 40%;
  }
  .story-section-heading {
    display: block;
  }
  .story-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .story-heading > .story-art {
    justify-self: center;
    max-width: 310px;
  }
  .story-reader-layout {
    display: block;
  }
  .story-index {
    position: static;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 22px;
    gap: 10px;
  }
  .story-index > strong,
  .story-index nav,
  .story-index p {
    grid-column: 1/-1;
  }
  .story-index nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 17px;
  }
  .story-paper {
    padding: 24px;
  }
  .story-related .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-continue {
    align-items: start;
    flex-direction: column;
  }
  .story-parent-note {
    padding: 20px;
  }
  .story-reading-wrap .breadcrumb {
    font-size: 11px;
  }
  .story-page .body {
    font-size: var(--story-font, 18px);
  }
}
@media (max-width: 430px) {
  .story-grid,
  .story-related .story-grid {
    grid-template-columns: 1fr;
  }
  .story-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .story-cover-link {
    padding: 9px 0 9px 9px;
    align-self: start;
  }
  .story-card h2 {
    font-size: 21px;
    margin: 10px 0;
  }
  .story-card-copy {
    padding: 13px 12px;
  }
  .story-card p {
    font-size: 11px;
  }
  .story-card .story-tags span {
    font-size: 10px;
    padding: 3px 5px;
  }
  .story-card-bottom {
    flex-wrap: wrap;
  }
  .story-library-stats {
    font-size: 11px;
    gap: 15px;
  }
  .story-library-stats > span:last-child {
    padding-left: 15px;
  }
  .story-library-hero {
    padding: 22px;
  }
  .story-paper {
    padding: 21px 18px;
  }
  .story-tools button {
    padding: 8px 11px;
  }
  .story-page .body > h2 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-card {
    transition: none;
  }
  .story-card:hover {
    transform: none;
  }
}
@media print {
  body > *:not(.content),
  .story-tools,
  .story-audio,
  .story-index,
  .story-related,
  .story-finish-reading,
  .story-local-note,
  .story-reading-wrap > .breadcrumb,
  .story-back,
  .quiz-finish,
  .story-heading > .story-art {
    display: none !important;
  }
  .story-reading-wrap,
  .story-reader-layout,
  .story-heading {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
  }
  .story-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .story-page .body {
    font-size: 12pt;
    line-height: 1.6;
  }
  .story-source {
    break-inside: avoid;
  }
  .story-page .body .answer {
    display: none;
  }
  .story-page .body > h2 {
    break-after: avoid;
  }
  .story-page .body .quiz-card {
    break-inside: avoid;
  }
}

.story-page [id^="story-paragraph-"] {
  scroll-margin-top: 145px;
}
