:root { color-scheme: light; }
.search-page { margin: 0; background: #fbf5e9; color: #332919; }
.search-shell { max-width: 1180px; padding: 0 28px; margin: auto; font-family: system-ui, sans-serif; line-height: 1.65; }
.search-shell * { box-sizing: border-box; }
.search-shell a { color: #a33521; text-underline-offset: 4px; }
.search-shell :is(a, button, input, select):focus-visible { outline: 3px solid #19668a; outline-offset: 5px; }
.search-shell [hidden] { display: none !important; }
.search-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; border-bottom: 1px solid #d9cdb6; }
.search-header nav, .search-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; }
.search-header .search-brand { font: 600 32px Georgia, serif; color: #bd361f; text-decoration: none; }
.search-skip { position: absolute; top: -80px; left: 20px; background: #fff; padding: 12px; z-index: 3; }
.search-skip:focus { top: 12px; }
.search-breadcrumb { font-size: 13px; margin-top: 30px; }
.story-heading { padding: 52px 0 32px; max-width: 840px; }
.search-shell h1 { font: 500 clamp(34px, 5vw, 62px)/1.13 Georgia, serif; letter-spacing: -.025em; margin: 8px 0 22px; overflow-wrap: anywhere; }
.search-shell h2 { font: 500 clamp(25px, 3vw, 34px)/1.25 Georgia, serif; }
.search-intro { font-size: 19px; max-width: 710px; color: #66553f; }
.search-meta, .story-availability { font-size: 13px; color: #72573c; }
.search-meta { letter-spacing: .035em; }
.search-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.story-topics { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; font-size: 14px; }
.story-topics a { display: inline-flex; align-items: center; min-height: 44px; }
.worksheet { max-width: 800px; margin: 32px auto; }
.worksheet-tools { font-size: 15px; margin-bottom: 28px; }
.worksheet-tools summary { min-height: 44px; cursor: pointer; padding: 10px 0; }
.worksheet-tools summary:focus-visible { outline: 3px solid #19668a; outline-offset: 4px; }
.worksheet-page { background: #fffdf8; border: 1px solid #d9cdb6; padding: 32px; margin: 24px 0; }
.worksheet .worksheet-page h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.25; }
.worksheet-page h2 { font-size: 26px; }
.worksheet-brand, .worksheet-edition, .worksheet-source { font-size: 12px; }
.worksheet-source { overflow-wrap: anywhere; margin-top: 24px; }
.worksheet-name { padding-block: 10px; font-size: 14px; }
.worksheet-questions { padding-left: 24px; }
.worksheet-questions li { padding-left: 4px; margin-block: 20px; }
.answer-lines { height: 46px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 22px, #bdb8ab 22px, #bdb8ab 23px); }
.worksheet-drawing { height: 160px; border: 1px solid #bdb8ab; }
.worksheet-adult { font-size: 15px; }
.worksheet-adult li { margin-block: 16px; }
.worksheet-permission { border-top: 1px solid #d9cdb6; padding-top: 16px; }
@media (max-width: 480px) {
  .search-header { padding-block: 18px; }
  .worksheet-page { padding: 20px 16px; }
  .worksheet-name { line-height: 2; }
  .worksheet-tools .search-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .worksheet-tools a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  .search-page { background: white; color: black; }
  .search-shell { max-width: none; padding: 0; font-size: 10pt; line-height: 1.45; }
  .search-header, .search-footer, .search-skip, .worksheet-tools { display: none !important; }
  .worksheet { max-width: none; margin: 0; }
  .worksheet-page { border: 0; background: white; padding: 0; margin: 0; break-after: page; }
  .worksheet-page:last-child { break-after: auto; }
  .worksheet .worksheet-page h1 { font: bold 19pt/1.2 system-ui, sans-serif; margin: 5mm 0; }
  .worksheet-page h2 { font: bold 14pt/1.3 system-ui, sans-serif; }
  .worksheet-page h3 { font-size: 11pt; }
  .worksheet-page p { margin: 3mm 0; }
  .worksheet-brand, .worksheet-edition, .worksheet-source { font-size: 8pt; }
  .worksheet-name { font-size: 10pt; padding: 2mm 0; }
  .worksheet-questions li { break-inside: avoid; margin: 4mm 0; }
  .answer-lines { height: 10mm; background: none; border-bottom: 1px solid #aaa; }
  .worksheet-drawing { height: 35mm; }
  .worksheet-adult { font-size: 10pt; }
  .worksheet-adult li { margin: 3mm 0; }
  .search-shell a { color: black; text-decoration: none; }
}
.search-shell .search-button { display: inline-block; min-height: 44px; padding: 12px 18px; background: #c63820; color: #fff; text-decoration: none; border-radius: 4px; font-size: 15px; }
.collection-links { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 20px 0; margin: 10px 0 30px; border-block: 1px solid #d9cdb6; font-size: 14px; }
.collection-menu { border-block: 1px solid #d9cdb6; margin: 10px 0 30px; }
.collection-menu summary { padding: 14px 0; cursor: pointer; font-size: 15px; min-height: 44px; }
.collection-menu summary:focus-visible { outline: 3px solid #19668a; outline-offset: 5px; }
.collection-menu .collection-links { border: 0; margin: 0; padding-top: 0; }
.featured-collections { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 22px; font-size: 15px; }
.featured-collections a { display: inline-flex; align-items: center; min-height: 44px; }
.collection-chooser { max-width: 760px; margin: 24px 0; padding: 0 20px; background: #f1e9d9; border-left: 3px solid #c59a53; font-size: 15px; }
.collection-chooser summary { padding: 14px 0; min-height: 44px; cursor: pointer; }
.collection-chooser summary:focus-visible { outline: 3px solid #19668a; outline-offset: 4px; }
.collection-chooser[open] { padding-bottom: 20px; }
.collection-chooser ol { padding-left: 22px; }
.collection-chooser li { margin-bottom: 24px; }
.collection-chooser h3 { font-size: 17px; margin-bottom: 4px; }
.collection-chooser p { margin: 8px 0; }
@media (max-width: 480px) { .featured-collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-size: 14px; } }
.search-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; padding: 0; margin: 32px 0; }
.search-card { display: block; text-decoration: none; }
.search-card img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: contain; background: #efe6d7; border-radius: 3px; }
.search-card h2 { font-size: 25px; margin: 10px 0; color: #332919; }
.search-card p { font-size: 14px; color: #675740; margin: 0; }
.search-card .search-meta { display: block; margin-top: 14px; }
.reading-library .directory-heading { padding: 32px 0 18px; }
.directory-heading .search-intro { margin-bottom: 12px; }
.directory-heading .story-availability { margin: 8px 0; }
.reading-library-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px 24px; max-width: 840px; }
.reading-library-fields label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.reading-library-fields input, .reading-library-fields select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #ad9271; border-radius: 4px; background: #fffdf8; color: #332919; font: 400 16px/1.5 system-ui, sans-serif; }
.reading-library-status { font-size: 14px; margin: 14px 0 8px; color: #72573c; }
.reading-library-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; margin: 12px 0 20px; }
.reading-library-pagination button, .reading-library-empty button { min-height: 44px; padding: 8px 12px; border: 1px solid #ad9271; border-radius: 4px; background: transparent; color: #8e2e1b; font: inherit; cursor: pointer; }
.reading-library-pagination button:disabled { color: #796d5b; border-color: #d9cdb6; cursor: default; }
.reading-library-pagination span { text-align: center; }
.reading-library .search-grid { margin-top: 20px; scroll-margin-top: 24px; }
.reading-library-empty { padding: 24px 0 40px; }
.story-reading .story-heading { padding-bottom: 8px; }
.story-reading .story-topics, .story-resource-link { max-width: 760px; margin: 24px auto; }
.story-reading .story-chapter:first-child { padding-top: 8px; }
.story-parent-note, .story-question { max-width: 760px; border-left: 3px solid #c59a53; padding: 10px 22px; margin: 20px auto 35px; background: #f1e9d9; }
.story-parent-note { padding: 0 16px; margin-block: 8px; }
.story-parent-note summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 14px; }
.story-parent-note summary:focus-visible { outline: 3px solid #19668a; outline-offset: 4px; }
.story-parent-note[open] { padding-bottom: 10px; }
.story-parent-note p { margin: 8px 0; font-size: 14px; }
.story-chapters { max-width: 760px; margin: auto; }
.story-contents { max-width: 760px; margin: 20px auto; border-block: 1px solid #d9cdb6; }
.story-contents summary { padding: 14px 0; min-height: 44px; cursor: pointer; font-size: 15px; }
.story-contents nav { display: grid; padding: 0 0 18px; gap: 8px; }
.story-contents a { display: block; padding: 8px 0; }
.story-contents summary:focus-visible { outline: 3px solid #19668a; outline-offset: 5px; }
.reading-guide, .activity-card { scroll-margin-top: 24px; }
.reading-guide li { margin: 14px 0; }
.reading-guide li a { white-space: nowrap; }
.activity-card { border-top: 1px solid #d9cdb6; padding: 22px 0; }
.activity-card .search-actions { margin-top: 14px; }
.reading-steps { padding-left: 24px; }
.reading-steps h3 { margin-bottom: 6px; }
.reading-steps p { margin-top: 0; }
.story-chapter { padding: 32px 0 40px; border-bottom: 1px solid #d9cdb6; scroll-margin-top: 24px; }
.story-chapter figure { margin: 24px 0; }
.story-chapter img { display: block; width: 100%; height: auto; border-radius: 4px; }
.story-prose { font-family: Georgia, 'Nirmala UI', serif; font-size: 22px; line-height: 1.8; overflow-wrap: break-word; }
html[lang=hi] .story-prose { font-family: 'Nirmala UI', system-ui, sans-serif; }
.story-provenance { max-width: 760px; margin: 48px auto; font-size: 15px; }
.story-provenance details { padding: 15px 0; border-bottom: 1px solid #d9cdb6; }
.story-provenance summary { cursor: pointer; font-size: 17px; min-height: 44px; }
.story-provenance summary:focus-visible { outline: 3px solid #19668a; outline-offset: 5px; }
.search-related { border-top: 1px solid #d9cdb6; padding-top: 30px; margin-top: 54px; }
.search-footer { margin-top: 60px; padding: 28px 0 38px; border-top: 1px solid #d9cdb6; font-size: 14px; }
@media (max-width: 760px) { .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } .search-header { align-items: start; flex-direction: column; gap: 12px; } }
@media (max-width: 480px) { .search-shell { padding: 0 20px; } .search-grid { grid-template-columns: 1fr; } .story-heading { padding-top: 34px; } .story-prose { font-size: 20px; line-height: 1.8; } .story-chapter { padding: 24px 0; } .search-intro { font-size: 17px; } }
@media (max-width: 480px) {
  .reading-library .directory-heading { padding-top: 24px; }
  .reading-library .directory-heading h1 { font-size: 32px; margin-bottom: 12px; }
  .directory-heading .search-intro { font-size: 16px; line-height: 1.55; margin-top: 0; }
  .reading-library-fields { gap: 12px; grid-template-columns: 1fr; }
  .reading-library-pagination { gap: 8px; font-size: 12px; }
  .reading-library-pagination button { padding-inline: 9px; }
  .story-reading .search-breadcrumb { margin-top: 18px; }
  .story-reading .story-heading { padding-top: 14px; }
  .story-reading .story-heading h1 { margin-bottom: 12px; }
  .story-reading .search-intro { margin-block: 12px; line-height: 1.55; }
  .story-reading .search-actions { gap: 8px 18px; margin-top: 16px; }
  .story-reading .search-actions a { min-height: 44px; display: inline-flex; align-items: center; }
  .story-reading .story-chapter h2 { margin: 10px 0; }
  .story-reading .story-chapter figure { margin: 16px 0; }
}
