/* Shared reading and worksheet layouts. The approved homepage keeps its own scale. */
@media screen {
  .inner-page { line-height: 1.65; }
  .inner-page h1,
  .inner-page h2,
  .inner-page h3 {
    letter-spacing: -.02em;
    word-spacing: .025em;
    overflow-wrap: break-word;
  }
  .inner-page h1 { line-height: 1.12; }
  .inner-page h2 { line-height: 1.18; }
  .inner-page h3 { line-height: 1.24; }
  .inner-page .brand { letter-spacing: -.015em; }
  .inner-page .eyebrow { font-size: .75rem; line-height: 1.65; letter-spacing: .12em; margin-bottom: 1.25rem; }
  .inner-page .small { font-size: .875rem; line-height: 1.6; }
  .inner-page .lead { line-height: 1.6; }
  .inner-page .page-hero h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); max-width: 22ch; text-wrap: balance; margin-bottom: 1.5rem; }
  .inner-page .page-hero + .section { padding-top: 4rem; }
  .inner-page .section-heading { align-items: center; gap: 1.5rem; margin-bottom: 2.25rem; }
  .inner-page .section-heading h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
  .inner-page .section-heading > *,
  .inner-page .book-detail > *,
  .inner-page .about-grid > *,
  .inner-page .tool-layout > *,
  .inner-page .field-row > * { min-width: 0; }

  .inner-page .button { max-width: 100%; font-size: 1rem; line-height: 1.4; gap: .875rem; text-align: center; }
  .inner-page .button.small-button { font-size: .875rem; min-height: 44px; }
  .inner-page .button .arrow { flex-shrink: 0; }
  .inner-page .menu-toggle { min-height: 44px; }
  .inner-page .nav-links { line-height: 1.45; }
  .inner-page .footer-links { font-size: .875rem; gap: 1rem 1.5rem; }
  .inner-page .footer-links a { padding-block: .25rem; }

  .inner-page .guide-grid,
  .inner-page .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
  .inner-page .guide-body { padding: 1.5rem; }
  .inner-page .guide-body h3 { font-size: 1.5rem; line-height: 1.24; }
  .inner-page .guide-body p,
  .inner-page .resource-card p { font-size: 1rem; line-height: 1.6; }
  .inner-page .guide-meta { font-size: .75rem; line-height: 1.5; padding-top: .25rem; }
  .inner-page .tag { font-size: .75rem; letter-spacing: .02em; }
  .inner-page .resource-card h3 { font-size: 1.625rem; }
  .inner-page .resource-card .number { font-size: .75rem; line-height: 1.5; margin-bottom: .75rem; }
  .inner-page .filter { font-size: .875rem; line-height: 1.45; min-height: 44px; }
  .inner-page .results-count { font-size: .875rem; }
  .inner-page .download-band { padding: 2rem; gap: 2rem; }
  .inner-page .download-band > div { flex: 1; min-width: 0; }
  .inner-page .download-band p { font-size: 1rem; }
  .inner-page .download-band .button { flex-shrink: 0; max-width: 18rem; }

  .inner-page .article-heading { padding-bottom: 2.5rem; }
  .inner-page .article-heading h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.16; max-width: 30ch; margin-bottom: 1.75rem; text-wrap: balance; }
  .inner-page .article-meta { flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .875rem; }
  .inner-page .breadcrumbs { font-size: .8125rem; line-height: 1.5; margin-bottom: 1.75rem; }
  .inner-page .article-layout { gap: clamp(2rem, 5vw, 5rem); }
  .inner-page .article h2 { font-size: clamp(1.75rem, 3vw, 2.0625rem); line-height: 1.23; margin: 2.75rem 0 1.25rem; }
  .inner-page .article h3 { font-size: 1.5rem; line-height: 1.3; }
  .inner-page .article ul,
  .inner-page .article ol { padding-left: 1.5em; }
  .inner-page .article li { padding-left: .2em; }
  .inner-page .article a,
  .inner-page .wide-copy a,
  .inner-page .tool-aside a { overflow-wrap: anywhere; }
  .inner-page .toc summary { font-size: .8125rem; letter-spacing: .08em; line-height: 1.5; }
  .inner-page .toc li { font-size: .875rem; line-height: 1.5; break-inside: avoid; margin: .75rem 0; }
  .inner-page .toc a { display: inline-block; color: #55555f; }
  .inner-page .inline-resources h3 { font-size: 1.5rem; margin-top: 0; }

  .inner-page .tool-surface { padding: 2rem; }
  .inner-page .tool-surface h2 { font-size: 1.75rem; line-height: 1.25; margin-bottom: 1.5rem; }
  .inner-page .tool-surface h3 { line-height: 1.3; }
  .inner-page .tool-aside { font-size: 1rem; line-height: 1.65; }
  .inner-page .tool-aside h3 { font-size: 1.375rem; margin: 1.75rem 0 1rem; }
  .inner-page .field { margin-bottom: 1.5rem; }
  .inner-page .field span { font-size: .875rem; line-height: 1.5; }
  .inner-page .field small { font-size: .875rem; line-height: 1.55; margin-top: .5rem; }
  .inner-page .field input,
  .inner-page .field textarea,
  .inner-page .field select { min-width: 0; font-size: 1rem; line-height: 1.5; }
  .inner-page .field select { appearance: none; padding-right: 2.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23101014' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .875rem center; }
  .inner-page .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
  .inner-page .tool-actions { gap: .875rem 1rem; margin-top: 1.5rem; }
  .inner-page .text-button { font-size: .875rem; line-height: 1.5; min-height: 44px; text-align: left; }
  .inner-page .tool-status { font-size: .875rem; line-height: 1.5; }
  .inner-page .privacy-note { font-size: .8125rem; line-height: 1.6; margin-top: 1.5rem; }
  .inner-page .tool-result { padding: 1.5rem; }
  .inner-page .tool-result h3 { margin-bottom: 1.25rem; }
  .inner-page .tool-result pre { margin: 0; }
  .inner-page .result-tag { font-size: .8125rem; }
  .inner-page .worksheet-tabs { gap: .75rem; }
  .inner-page .worksheet-tabs a { font-size: .875rem; line-height: 1.5; min-height: 44px; }
  .inner-page .tracker-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inner-page .tracker-stat { min-width: 0; }
  .inner-page .tracker-stat strong { line-height: 1.2; }
  .inner-page .tracker-stat span { display: block; font-size: .8125rem; line-height: 1.4; margin-top: .5rem; overflow-wrap: break-word; }
  .inner-page .saved-item p { font-size: 1rem; }
  .inner-page .saved-item .meta { font-size: .8125rem; }
  .inner-page .item-actions { flex-wrap: wrap; }
  .inner-page .notice { font-size: 1rem; line-height: 1.65; }
  .inner-page blockquote.notice { margin: 1.5rem 0; }
  .inner-page .assignment { margin-bottom: 3rem; }
  .inner-page .assignment summary { font-size: 1rem; line-height: 1.5; }
  .inner-page .assignment .solution { font-size: 1rem; }
  .inner-page .script-item { padding: 2rem 0; }
  .inner-page .script-item h3 { margin-bottom: 1rem; }
  .inner-page .script-item p { font-size: 1rem; }

  .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 6px; margin: 1.5rem 0; }
  .table-scroll:focus-visible { outline: 3px solid #ff8f47; outline-offset: 3px; }
  .inner-page .table-scroll table { display: table; width: 100%; min-width: 30rem; margin: 0; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; overflow-wrap: normal; white-space: normal; }
  .inner-page .table-scroll th,
  .inner-page .table-scroll td { padding: .875rem; vertical-align: top; }
  .inner-page .table-scroll th { background: #e7e7df; }
  .table-hint { display: none; }
  .inner-page .offer-total { font-size: 1.5rem!important; white-space: nowrap; }

  .inner-page .book-detail h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); margin-bottom: 1.5rem; }
  .inner-page .book-detail .book-stage { width: 100%; }
  .inner-page .dark-section h2 { max-width: 25ch; text-wrap: balance; }
  .inner-page .book-detail .subtitle { line-height: 1.45; margin-bottom: 1.5rem; }
  .inner-page .book-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .inner-page .book-facts dt { font-size: .75rem; line-height: 1.5; }
  .inner-page .book-facts dd { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
  .inner-page .chapter-list li { line-height: 1.6; gap: 1rem; }
  .inner-page .chapter-list span { flex-shrink: 0; padding-top: .35rem; }
  .inner-page .wide-copy h2 { font-size: clamp(2rem, 3.5vw, 2.5rem); line-height: 1.23; }
  .inner-page .about-grid p { font-size: 1.0625rem; line-height: 1.7; }
  .inner-page .portrait-caption { font-size: .75rem; }
  .inner-page .closing h2 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.18; max-width: 22ch; text-wrap: balance; }
}

@media screen and (max-width: 1000px) {
  .inner-page .guide-grid,
  .inner-page .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inner-page .book-detail { gap: 2.5rem; }
  .inner-page .nav { gap: 1rem; }
  .inner-page .nav-links { gap: 1rem; }
  .inner-page .nav-links .button { padding-inline: 1rem; }
}
@media screen and (max-width: 900px) {
  .inner-page .tool-layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .inner-page .tool-aside { border-top: 1px solid var(--line); padding-top: 1.5rem; }
  .inner-page .article-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .inner-page .article-sidebar { grid-row: 1; }
  .inner-page .sidebar-inner { position: static; }
  .inner-page .toc { margin: 0; }
  .inner-page .toc ol { columns: 2; column-gap: 2rem; }
}
@media screen and (max-width: 760px) {
  .inner-page .section { padding-block: 3.5rem; }
  .inner-page .page-hero { padding-block: 2.5rem; }
  .inner-page .page-hero + .section { padding-top: 2.5rem; }
  .inner-page .page-hero h1 { font-size: clamp(2.125rem, 7.5vw, 3rem); }
  .inner-page .section-heading { align-items: flex-start; }
  .inner-page .article-heading { padding-block: 2rem; }
  .inner-page .article-heading h1 { font-size: clamp(2rem, 6.5vw, 2.75rem); }
  .inner-page .article blockquote { padding: 1.125rem; }
  .inner-page .book-detail h1 { font-size: clamp(2.25rem, 9.5vw, 3.25rem); }
  .inner-page .book-detail .book-stage { max-width: min(15rem, calc(100% - 2rem)); }
  .inner-page .book-detail .subtitle { font-size: 1.375rem; }
  .inner-page .closing { padding: 3.5rem 1.25rem; }
}
@media screen and (max-width: 600px) {
  .inner-page .guide-grid,
  .inner-page .resource-grid { grid-template-columns: minmax(0, 1fr); }
  .inner-page .guide-card:first-child:nth-last-child(3) { grid-column: auto; }
  .inner-page .field-row { grid-template-columns: minmax(0, 1fr); }
  .inner-page .tool-surface { padding: 1.25rem; }
  .inner-page .tool-result { padding: 1rem; }
  .inner-page .toc ol { columns: 1; }
  .inner-page .download-band { padding: 1.5rem; }
  .inner-page .download-band .button { max-width: 100%; }
  .inner-page .article h2 { font-size: 1.75rem; }
  .inner-page .article h3 { font-size: 1.375rem; }
  .inner-page .assignment details { padding: 1rem; }
  .inner-page .script-item blockquote { padding: 1rem; }
  .inner-page .inline-resources { padding: 1.25rem; }
  .inner-page .table-hint { display: block; font-size: .8125rem; color: var(--muted); margin: -.75rem 0 1.5rem; }
}
@media screen and (max-width: 360px) {
  .inner-page .brand { font-size: 1.125rem; gap: .5rem; }
  .inner-page .book-facts { grid-template-columns: 1fr; }
  .inner-page .tracker-stats { grid-template-columns: 1fr; gap: .5rem; }
  .inner-page .tracker-stat { display: flex; align-items: center; gap: 1rem; padding: .875rem; }
  .inner-page .tracker-stat span { margin: 0; }
}
@media print {
  .table-hint, .book-ad { display: none; }
}

@media screen {
  .book-ad {
    --ad-ink: #fff;
    --ad-ground: var(--blue);
    --ad-accent: var(--lime);
    --ad-button: var(--lime);
    --ad-button-text: var(--ink);
    display: grid;
    grid-template-columns: minmax(6.25rem, 26%) minmax(0, 1fr);
    grid-template-areas: "art label" "art headline" "art copy" "art actions";
    align-items: center;
    gap: .65rem clamp(1.25rem, 3vw, 2rem);
    margin: 2.5rem 0;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border: 1px solid var(--ad-ground);
    border-radius: .875rem;
    background: var(--ad-ground);
    color: var(--ad-ink);
  }
  .book-ad--next {
    --ad-ground: #fff;
    --ad-ink: var(--ink);
    --ad-accent: #3832be;
    --ad-button: var(--ink);
    --ad-button-text: #fff;
    grid-template-columns: minmax(0, 1fr) minmax(6.25rem, 26%);
    grid-template-areas: "label art" "headline art" "copy art" "actions art";
    border-color: #bdbdb4;
  }
  .ad-art {
    grid-area: art;
    display: grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    padding: .5rem;
  }
  .ad-art::before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #ffffff24;
  }
  .book-ad--next .ad-art::before { background: #e9e7ff; }
  .ad-art img {
    width: min(100%, 8.5rem);
    height: auto;
    transform: rotate(-5deg);
    border-radius: 1px 2px 2px 1px;
    box-shadow: 1px 1px #c5c3ad, 3px 2px #f1efde, 5px 3px #27272a, 7px 10px 16px #10101440;
  }
  .book-ad--next .ad-art img { transform: rotate(4deg); }
  .ad-label {
    grid-area: label;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .65rem;
    color: var(--ad-accent);
    font-size: .8125rem;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .ad-label span { color: var(--ad-ink); font-weight: 500; letter-spacing: normal; text-transform: none; }
  .ad-headline {
    grid-area: headline;
    font-size: clamp(1.45rem, 2.5vw, 2.05rem);
    font-weight: 800;
    line-height: 1.09;
    letter-spacing: -.025em;
    text-wrap: balance;
  }
  .book-ad .ad-copy { grid-area: copy; margin: 0; font-size: 1rem; line-height: 1.5; }
  .ad-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: .125rem 1rem; margin-top: .25rem; }
  .book-ad .ad-buy, .book-ad .ad-kindle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.25;
  }
  .book-ad .ad-buy { padding: .7rem 1.2rem; border-radius: 3rem; background: var(--ad-button); color: var(--ad-button-text); text-decoration: none; }
  .book-ad .ad-kindle { color: var(--ad-ink); text-decoration: underline; text-underline-offset: .2em; }
  .book-ad a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
  .book-ad--rail {
    --ad-ground: var(--ink);
    grid-template-columns: 3.5rem minmax(0, 1fr);
    grid-template-areas: "art label" "headline headline" "copy copy" "actions actions";
    gap: .8rem 1rem;
    margin: 0 0 1.75rem;
    padding: 1.25rem;
  }
  .book-ad--rail .ad-art { padding: .2rem; }
  .book-ad--rail .ad-art::before { display: none; }
  .book-ad--rail .ad-label { display: grid; font-size: .875rem; }
  .book-ad--rail .ad-headline { font-size: 1.55rem; }
  .book-ad--rail .ad-actions { gap: 0 .75rem; }
  .book-ad--rail .ad-buy { width: 100%; }
  .book-ad--rail .ad-kindle { margin: auto; }
  .article-sidebar .sidebar-inner { max-height: calc(100vh - 3rem); overflow-y: auto; }
}
@media screen and (max-width: 900px) {
  .book-ad--rail { display: none; }
  .article-sidebar .sidebar-inner { max-height: none; overflow: visible; }
}
@media screen and (max-width: 560px) {
  .book-ad {
    grid-template-columns: clamp(3.5rem, 16vw, 5rem) minmax(0, 1fr);
    grid-template-areas: "art label" "art headline" "copy copy" "actions actions";
    gap: .4rem 1rem;
    padding: 1.125rem;
    margin: 2rem 0;
  }
  .ad-label { align-self: end; }
  .ad-headline { align-self: start; font-size: clamp(1.25rem, 5vw, 1.55rem); }
  .ad-art { padding: .2rem; }
  .book-ad .ad-copy { margin-top: .55rem; }
}

.research-index { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,23rem),1fr)); gap:1.8rem 3rem; margin-top:2rem; }
.research-index > div { border-top:1px solid var(--line); padding-top:1rem; }
.research-index h3 { font-size:1.35rem; margin:0; }
.research-index p { margin:.6rem 0 0; }
.research-refs { white-space:nowrap; font-size:.85em; }
.research-example, .research-email { padding:1rem 1.4rem; margin:1.5rem 0; background:#f3f4ee; border-left:4px solid #302cf4; }
.research-email { white-space:pre-line; }
.research-example h3 { margin-top:0; }
.research-example p:last-child { margin-bottom:0; }
.research-sources li { margin-bottom:.8rem; overflow-wrap:anywhere; }
.research-article table caption { text-align:left; font-weight:650; padding:.8rem; }
