/* A readable native library, using Otter's bold outlines and warm learning palette. */
.native-library {
  --native-ink: #191c1b;
  --native-mint: #aee2cb;
  --native-yellow: #ffe688;
  --native-paper: #fffef9;
  color: var(--native-ink);
  min-width: 0;
  font-size: 18px;
  line-height: 1.6;
}
.native-library *, .native-source-preview * { box-sizing: border-box; }
.native-library h1, .native-library h2, .native-library h3 { line-height: 1.18; text-wrap: balance; }
.native-library h1 { font-size: clamp(30px, 3.4vw, 48px); }
.native-library h2 { font-size: clamp(24px, 2.4vw, 32px); }
.native-library h3 { font-size: 22px; }
.native-library a { text-underline-offset: 4px; }
.native-library button, .native-library select, .native-library input, .native-library textarea { font: inherit; }
.native-library input, .native-library textarea, .native-library select {
  max-width: 100%; min-width: 0; color: var(--native-ink); background: #fff;
  border: 2px solid var(--native-ink); border-radius: 3px;
}
.native-library input, .native-library select { min-height: 46px; padding: 9px 11px; }
.native-library textarea { width: 100%; padding: 12px; line-height: 1.6; resize: vertical; }
.native-library label { min-width: 0; }
.native-library .field { display: grid; gap: 7px; margin-bottom: 20px; }
.native-library .field > span, .native-library label > span { font-weight: 750; }
.native-library .btn, .native-library .tab, .native-library .text-link { min-height: 44px; }
.native-library :is(a, button, input, select, textarea, summary):focus-visible,
.native-source-preview a:focus-visible {
  outline: 3px solid #175fa2; outline-offset: 4px; box-shadow: 0 0 0 2px #fff;
}
.native-library button:disabled { opacity: .48; cursor: not-allowed; }
.native-library .row { flex-wrap: wrap; }
.native-library-hero {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); gap: 32px;
  padding: clamp(22px, 3vw, 38px); margin: 18px 0 34px;
  border: 3px solid var(--native-ink); box-shadow: 6px 6px 0 var(--native-ink);
  background: var(--native-mint);
}
.native-library-hero > div { min-width: 0; }
.native-library-hero h2 { font-size: clamp(34px, 4.2vw, 58px); margin: 20px 0 16px; letter-spacing: -.035em; }
.native-library-hero p { max-width: 58ch; }
.native-library-hero .row { margin-top: 24px; }
.native-library-numbers { align-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.native-library-numbers > div {
  min-width: 0; background: var(--native-paper); padding: 22px 16px;
  border: 2px solid var(--native-ink); box-shadow: 3px 3px 0 var(--native-ink);
}
.native-library-numbers strong { display: block; font-size: clamp(34px, 3.5vw, 48px); line-height: 1.1; margin-bottom: 10px; }
.native-library-numbers span { font-size: 16px; line-height: 1.45; display: block; }
.native-library-numbers p { font-size: 15px; margin: 2px 0 0; grid-column: 1 / -1; }
.native-collection-tabs {
  display: flex; gap: 10px; overflow-x: auto; padding: 3px 4px 12px;
  max-width: 100%; margin-bottom: 18px; scrollbar-width: thin;
}
.native-collection-tab {
  border: 2px solid var(--native-ink); border-radius: 3px; padding: 12px 16px; min-height: 48px;
  flex: 0 0 auto; background: #fff; font-weight: 800; max-width: min(330px, 85vw); text-align: left;
}
.native-collection-tab span { display: inline-block; padding: 0 7px; margin-left: 7px; background: #f1f2ed; border: 1px solid currentColor; }
.native-collection-tab[aria-pressed="true"] { background: var(--native-yellow); box-shadow: 3px 3px 0 var(--native-ink); }
.native-library-filters {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 18px; align-items: end;
  border-top: 2px solid var(--native-ink); border-bottom: 2px solid var(--native-ink);
  padding: 22px 0; margin: 18px 0 30px; scroll-margin-top: 25px;
}
.native-library-filters label { display: grid; gap: 8px; font-weight: 750; }
.native-library-filters > div { padding-bottom: 8px; }
.native-library-filters > div strong { font-size: 27px; }
.native-library-filters input { width: 100%; }
.native-library-filters .btn { display: block; margin-top: 8px; }
.native-issue-group { margin: 30px 0 42px; }
.native-issue-group .section-heading h2 { margin: 0; }
.native-issue-group h2 > span { display: inline-block; margin-left: 8px; padding: 5px 10px; font-size: 20px; background: var(--native-yellow); border: 2px solid var(--native-ink); }
.native-issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 25px; }
.native-issue-card { min-width: 0; display: flex; flex-direction: column; background: #fff; border: 3px solid var(--native-ink); box-shadow: 5px 5px 0 var(--native-ink); }
.native-cover { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; color: var(--native-ink); background: #e8e4d7; border-bottom: 3px solid var(--native-ink); }
.native-cover img { width: 100%; height: 100%; display: block; object-fit: contain; }
.native-cover-label { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 4px 9px; background: var(--native-yellow); border: 2px solid var(--native-ink); font-size: 12px; font-weight: 900; letter-spacing: .035em; }
.native-cover-fallback { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding: 30px; width: 100%; height: 100%; background: var(--native-mint); }
.native-cover-fallback svg { width: 56px; height: 56px; }
.native-cover-fallback strong { font-size: 29px; line-height: 1.15; overflow-wrap: anywhere; }
.native-cover-fallback > span { font-weight: 900; font-size: 26px; }
.native-issue-card-body { display: flex; flex-direction: column; align-items: flex-start; padding: 18px; flex: 1; min-width: 0; }
.native-issue-card-body > .row { width: 100%; gap: 8px; }
.native-issue-card h3 { margin: 14px 0 8px; overflow-wrap: anywhere; }
.native-issue-card h3 a { color: inherit; text-decoration: none; }
.native-issue-card h3 a:hover { text-decoration: underline; }
.native-issue-card p { margin: 0 0 13px; }
.native-card-source { font-size: 16px; color: #535a55; }
.native-issue-card-body > .btn { margin-top: auto; width: 100%; justify-content: center; }
.native-cambridge, .native-source-preview {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding: 28px; border: 3px solid #191c1b; background: #ffedaa; box-shadow: 5px 5px 0 #191c1b;
  margin: 35px 0;
}
.native-cambridge > div:first-child, .native-source-preview > div { flex: 1 1 420px; min-width: 0; }
.native-cambridge h2, .native-source-preview h2 { margin: 12px 0; }
.native-cambridge p, .native-source-preview p { max-width: 72ch; margin-bottom: 0; }
.native-source-preview { background: #d4f0e3; }
.native-source-preview .btn { flex: 0 1 auto; }
.native-library-footnote { margin-top: 32px; font-size: 16px; color: #535a55; }
.native-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 12px; font-size: 16px; }
.native-breadcrumb .text-link { display: inline-flex; align-items: center; }
.native-breadcrumb .text-link svg:first-child { transform: rotate(180deg); }
.native-breadcrumb > span { color: #535a55; }
.native-reader-toolbar {
  display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px; background: #fff; border: 2px solid var(--native-ink); margin-bottom: 16px; scroll-margin-top: 20px;
}
.native-page-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.native-page-controls > .btn:first-child svg { transform: rotate(180deg); }
.native-page-controls label { display: inline-flex; align-items: center; gap: 8px; }
.native-page-controls input { width: 76px; }
.native-page-controls > span { white-space: nowrap; }
.native-font-control { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.native-font-control select { width: 112px; }
.native-view-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.native-view-switch [aria-pressed="true"] { background: var(--native-yellow); box-shadow: 2px 2px 0 var(--native-ink); }
.native-selection-help { padding: 18px 22px; margin: 16px 0 22px; background: #e0f2e9; border-left: 5px solid var(--native-ink); }
.native-selection-help p { font-size: 16px; margin: 4px 0 12px; }
.native-reader-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 24px; align-items: start; }
.native-reader-paper { min-width: 0; padding: clamp(20px, 3.4vw, 42px); border: 3px solid var(--native-ink); background: var(--native-paper); box-shadow: 5px 5px 0 var(--native-ink); }
.native-page-heading { display: grid; gap: 16px; justify-items: start; padding-bottom: 20px; border-bottom: 1px solid #c6c9bf; margin-bottom: 24px; }
.native-page-heading h2 { margin: 0; }
.native-page-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; font-weight: 450; }
.native-font-18 .native-page-text { font-size: 18px; }
.native-font-21 .native-page-text { font-size: 21px; }
.native-font-24 .native-page-text { font-size: 24px; }
.native-page-text mark { color: inherit; background: #ffe482; padding: 1px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.native-page-text::selection, .native-page-text *::selection { color: #14251d; background: #a3d9ff; }
.native-page-bottom { border-top: 1px dashed #878d82; margin-top: 28px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 15px; }
.native-reader-sidebar { min-width: 0; border: 2px solid var(--native-ink); background: #fff; }
.native-reader-sidebar .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; gap: 0; border-bottom: 2px solid var(--native-ink); }
.native-reader-sidebar .tab { border: 0; border-radius: 0; padding: 13px 7px; box-shadow: none; text-align: center; font-size: 16px; font-weight: 800; }
.native-reader-sidebar .tab + .tab { border-left: 1px solid #bdc2b8; }
.native-reader-sidebar .tab.active { background: var(--native-yellow); }
.native-sidebar-body { padding: 20px; max-height: min(1000px, 115vh); overflow-y: auto; }
.native-sidebar-body h3 { margin-top: 8px; }
.native-sidebar-body .field { font-size: 16px; }
.native-sidebar-body textarea { font-size: 17px; }
.native-sidebar-body input, .native-sidebar-body select { width: 100%; }
.native-article-list, .native-page-results { display: grid; gap: 10px; margin: 12px 0 24px; }
.native-article-link, .native-page-result { min-width: 0; display: grid; gap: 8px; text-align: left; color: var(--native-ink); background: #f8f8f1; padding: 13px; border: 1.5px solid var(--native-ink); border-radius: 3px; overflow-wrap: anywhere; }
.native-article-link strong, .native-page-result strong { font-size: 17px; line-height: 1.35; }
.native-article-link span, .native-page-result span { font-size: 15px; line-height: 1.5; }
.native-article-link[aria-pressed="true"] { background: #d5efdf; border-width: 2px; }
.native-reader-note { background: #f4f4e8; padding: 17px; font-size: 16px; line-height: 1.6; border-left: 3px solid var(--native-ink); margin-bottom: 20px; }
.native-reader-note p { margin: 7px 0 0; }
.native-bookmark-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.native-highlight-note { border-top: 2px solid var(--native-ink); padding: 17px 0; }
.native-highlight-note blockquote { border-left: 4px solid #e4b849; margin: 10px 0 16px; padding-left: 12px; font-size: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.native-highlight-note label { display: grid; gap: 8px; }
.native-reader-practice { border: 3px solid var(--native-ink); background: #d7ebfa; padding: 28px; margin: 34px 0 24px; }
.native-reader-practice h2 { margin: 12px 0; }
.native-reader-practice p { max-width: 72ch; }
.native-test-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.native-test-links a { min-width: 0; display: grid; gap: 10px; padding: 18px; border: 2px solid var(--native-ink); background: #fff; color: inherit; text-decoration: none; }
.native-test-links a strong { font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.native-test-links a span { font-size: 15px; }
.native-provenance { border-top: 2px solid var(--native-ink); margin-top: 24px; padding: 18px 0; font-size: 16px; }
.native-provenance summary { min-height: 44px; font-weight: 800; cursor: pointer; }
.native-provenance p { max-width: 85ch; }
.native-pdf-frame { display: block; width: 100%; height: min(900px, 82dvh); min-height: 460px; background: #e9e9e5; border: 2px solid var(--native-ink); }
.native-pdf-evidence { margin: 0; }
.native-pdf-evidence figcaption { font-size: 15px; margin-top: 12px; line-height: 1.55; }
.native-empty-page { padding: 24px 0; }
.native-load-state { padding: 36px; margin-top: 20px; }
.native-loading-dot { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: var(--native-yellow); border: 3px solid var(--native-ink); box-shadow: 7px 0 0 #aee2cb; }
.native-author-layout { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.4fr); align-items: start; gap: 26px; }
.native-author-source { min-width: 0; border: 3px solid var(--native-ink); padding: 24px; background: var(--native-paper); position: sticky; top: 24px; }
.native-author-source h2 { font-size: 24px; margin: 18px 0; }
.native-author-source > div[lang] { max-height: 60dvh; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: 18px; padding-right: 8px; }
.native-author-source .native-pdf-frame { min-height: 340px; height: 55dvh; }
.native-author-main { min-width: 0; }
.native-author-main > .panel { margin: 0 0 22px; }
.native-author-main input[type="number"] { max-width: 160px; }
.native-question-editor { border: 2px solid var(--native-ink); box-shadow: 4px 4px 0 var(--native-ink); padding: 24px; margin-bottom: 26px; background: #fff; }
.native-question-editor > .row { border-bottom: 2px solid var(--native-ink); padding-bottom: 14px; margin-bottom: 20px; }
.native-question-editor h3 { margin: 0; }
.native-question-editor .field:last-child { margin-bottom: 0; }
.native-question-kind { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; margin-bottom: 20px; }
.native-question-kind label { display: grid; gap: 7px; font-size: 16px; font-weight: 750; }
.native-option-editor { display: grid; gap: 12px; margin: 18px 0; }
.native-option-editor label { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 8px; }
.native-author-actions { position: sticky; bottom: 10px; display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; border: 2px solid var(--native-ink); background: #fff9e6; box-shadow: 4px 4px 0 var(--native-ink); z-index: 2; }
.native-author-actions .btn { flex: 1 1 200px; justify-content: center; }
.native-draft-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 24px; margin-top: 28px; }
.native-draft-grid h2 { font-size: 25px; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .native-reader-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
  .native-reader-paper { padding: 24px; }
  .native-sidebar-body { padding: 16px; }
  .native-author-layout { grid-template-columns: minmax(240px, .85fr) minmax(0, 1.15fr); gap: 18px; }
}
@media (max-width: 900px) {
  .native-library-hero { grid-template-columns: 1fr; gap: 22px; }
  .native-library-numbers { grid-template-columns: 1fr 1fr; }
  .native-library-numbers > div { display: flex; align-items: center; gap: 16px; padding: 18px; }
  .native-library-numbers strong { margin: 0; }
  .native-library-filters { grid-template-columns: minmax(0, 1fr) 150px; }
  .native-library-filters > div { grid-column: 1 / -1; padding-bottom: 0; }
  .native-reader-layout, .native-author-layout { grid-template-columns: minmax(0, 1fr); }
  .native-reader-sidebar { margin-top: 10px; }
  .native-sidebar-body { max-height: 580px; }
  .native-author-source { position: static; }
  .native-author-source > div[lang] { max-height: 340px; }
}
@media (max-width: 560px) {
  .native-library { font-size: 18px; }
  .native-library .pagehead { margin-bottom: 20px; }
  .native-library-hero { padding: 20px; margin-right: 5px; gap: 20px; }
  .native-library-hero h2 { font-size: 39px; }
  .native-library-hero .row { align-items: stretch; }
  .native-library-hero .row > .btn { flex: 1 1 100%; }
  .native-library-numbers { gap: 12px; }
  .native-library-numbers > div { display: block; padding: 14px; }
  .native-library-numbers strong { font-size: 34px; margin-bottom: 8px; }
  .native-library-numbers span { font-size: 15px; }
  .native-library-filters { grid-template-columns: 1fr; gap: 16px; }
  .native-library-filters > div { grid-column: auto; }
  .native-issue-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-right: 5px; }
  .native-cover { aspect-ratio: 4 / 4.8; }
  .native-issue-card-body { padding: 20px; }
  .native-issue-card h3 { font-size: 24px; }
  .native-cambridge, .native-source-preview { padding: 22px; margin-right: 5px; }
  .native-cambridge .row { width: 100%; }
  .native-cambridge .btn { width: 100%; }
  .native-reader-toolbar { padding: 12px; gap: 16px; }
  .native-reader-toolbar > .row { gap: 10px; }
  .native-page-controls { gap: 7px; }
  .native-page-controls .btn { font-size: 15px; padding-left: 9px; padding-right: 9px; }
  .native-page-controls .btn svg { display: none; }
  .native-page-controls input { width: 62px; }
  .native-page-controls label { gap: 5px; font-size: 16px; }
  .native-selection-help { padding: 17px; }
  .native-selection-help .btn { flex: 1 1 140px; justify-content: center; }
  .native-reader-paper { padding: 20px 17px; margin-right: 5px; }
  .native-reader-practice { padding: 21px; }
  .native-page-bottom { align-items: flex-start; }
  .native-page-bottom .btn { width: 100%; }
  .native-pdf-frame { height: 70dvh; min-height: 400px; }
  .native-author-source, .native-question-editor { padding: 20px; }
  .native-question-editor { margin-right: 4px; }
  .native-question-kind { grid-template-columns: minmax(0, 1fr); }
  .native-question-kind input { width: 140px; }
  .native-author-actions { bottom: 6px; padding: 12px; margin-right: 4px; }
  .native-author-actions .btn { min-width: 0; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .native-library * { scroll-behavior: auto !important; transition: none !important; } }
@media (forced-colors: active) {
  .native-collection-tab[aria-pressed="true"], .native-article-link[aria-pressed="true"], .native-reader-sidebar .tab.active { border: 3px solid Highlight; }
  .native-page-text mark { outline: 2px solid Highlight; }
  .native-issue-card, .native-reader-paper, .native-library-hero { box-shadow: none; }
}
