/*
Theme Name: Nauka Pisania
Theme URI: https://naukapisania.edu.pl
Author: naukapisania.edu.pl
Description: Lekki, autorski motyw dla portalu z kartami pracy PDF do nauki pisania.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: naukapisania
*/

:root {
  --navy: #092650;
  --navy-2: #18375e;
  --green: #4d9c3e;
  --green-dark: #33852f;
  --green-soft: #f1f8ee;
  --blue-soft: #f1f7ff;
  --line: #dfe6ee;
  --muted: #61738d;
  --white: #fff;
  --shadow: 0 14px 38px rgba(26, 56, 88, .08);
  --radius: 17px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--navy); font-family: "Avenir Next", Avenir, Nunito, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.02em; }
h1 { margin-bottom: 22px; font-size: clamp(2.5rem, 4.5vw, 4.5rem); line-height: 1.08; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.18; }
h3 { line-height: 1.25; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.section { margin-top: 74px; }
.lead { max-width: 690px; color: var(--navy-2); font-size: 1.08rem; line-height: 1.9; }
.site-header { position: relative; z-index: 20; background: rgba(255,255,255,.97); }
.header-inner { height: 124px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; min-width: 260px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 56px; color: var(--navy); font-family: Georgia, serif; font-size: 3.6rem; line-height: 1; transform: rotate(-9deg); }
.brand strong { display: block; font-size: 1.28rem; font-weight: 800; }
.brand small { display: block; margin-top: 2px; color: var(--navy-2); font-size: .79rem; font-weight: 500; letter-spacing: 0; }
.desktop-nav { min-width: 0; display: flex; flex: 1; justify-content: center; gap: 4px; white-space: nowrap; }
.menu-link { position: relative; min-width: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 5px 11px; border: 1px solid transparent; border-radius: 13px; color: var(--navy); text-align: center; transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.menu-link:hover, .menu-link:focus-visible { border-color: #dce7f0; background: #f8fbfd; box-shadow: 0 7px 18px rgba(9,38,80,.07); color: var(--navy); transform: translateY(-2px); }
.menu-link::after { position: absolute; right: 15px; bottom: 5px; left: 15px; height: 2px; border-radius: 999px; background: transparent; content: ""; }
.menu-link.active { border-color: #dcebd8; background: #f4faf2; }
.menu-link.active::after { background: var(--green); }
.menu-symbol { min-width: 44px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: 999px; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.menu-label { font-size: .76rem; font-weight: 750; white-space: nowrap; }
.menu-blue .menu-symbol { background: #eef5fe; color: #2e72bf; }
.menu-green .menu-symbol { background: #eef8ee; color: #438d37; }
.menu-gold .menu-symbol { background: #fff7e3; color: #bd8412; }
.menu-purple .menu-symbol { background: #f3efff; color: #7658bd; }
.menu-rose .menu-symbol { background: #fff0f5; color: #c95380; font-size: .63rem; }
.menu-cyan .menu-symbol { background: #eefdff; color: #2699aa; font-size: 1.05rem; }
.menu-neutral .menu-symbol { background: #f1f5f9; color: #58708e; font-family: inherit; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--green); border-radius: 11px; background: linear-gradient(135deg, #55a644, #348b31); color: white; font-weight: 750; line-height: 1.15; transition: .2s ease; }
.button:hover { box-shadow: 0 9px 24px rgba(59, 139, 48, .2); transform: translateY(-1px); }
.header-cta { flex: 0 0 auto; min-height: 46px; font-size: .9rem; }
.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary { display: grid; gap: 5px; padding: 12px; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { width: 25px; height: 2px; border-radius: 2px; background: var(--navy); }
.mobile-menu nav { position: absolute; top: 104px; right: 24px; left: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.mobile-menu .menu-link { min-width: 0; flex-direction: row; justify-content: flex-start; padding: 9px; border-color: #edf1f5; }
.mobile-menu .menu-link::after { top: 10px; right: 5px; bottom: 10px; left: auto; width: 2px; height: auto; }
.mobile-menu .menu-label { font-size: .86rem; }
.mobile-menu nav > .button { grid-column: 1 / -1; margin-top: 4px; }

/* Home */
.hero { min-height: 505px; display: grid; grid-template-columns: minmax(520px, .92fr) minmax(0, 1.08fr); align-items: center; gap: 26px; padding-top: 40px; }
.hero h1 { font-size: clamp(3rem, 4vw, 4rem); }
.hero h1, .hero h1 span { white-space: nowrap; }
.hero h1 span { display: block; margin-top: 8px; color: var(--green); }
.hero-copy { position: relative; z-index: 2; padding-top: 15px; }
.hero-copy .lead { max-width: 480px; }
.check-list { display: grid; gap: 12px; margin: 26px 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { position: absolute; top: .13em; left: 0; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--green); color: #fff; content: "✓"; font-size: .72rem; font-weight: 900; }
.pencil-scene { position: relative; min-height: 420px; isolation: isolate; }
.pencil-scene::before { position: absolute; right: 0; bottom: 23px; width: 95%; height: 225px; border-radius: 51% 49% 44% 56% / 52% 44% 56% 48%; background: #fff1c9; content: ""; z-index: -2; }
.scene-sheet { position: absolute; top: 40px; width: 285px; }
.sheet-one { left: 50px; transform: rotate(-7deg); }
.sheet-two { right: 43px; top: 49px; transform: rotate(7deg); }
.scene-star { position: absolute; right: 0; top: 42px; color: #61cae0; font-size: 5rem; line-height: 1; transform: rotate(-15deg); }
.scene-heart { position: absolute; left: 0; bottom: 63px; color: #f5a2c0; font-size: 4.5rem; line-height: 1; transform: rotate(-13deg); }
.scene-dash { position: absolute; left: 25px; top: 190px; color: #b9d4ed; font-size: 4rem; transform: rotate(-65deg); }
.pencil { position: absolute; right: 5px; bottom: 62px; color: #65ae43; font-family: Georgia, serif; font-size: 8.8rem; transform: rotate(-47deg); text-shadow: 3px 4px 0 #dceaa3; }
.worksheet { position: relative; overflow: hidden; border: 1px solid #e0e5ea; border-radius: 9px; background: #fff; box-shadow: 0 3px 10px rgba(25, 55, 87, .08); }
.worksheet-hero { min-height: 375px; padding: 22px 20px; border-radius: 5px; box-shadow: 0 14px 26px rgba(15, 39, 70, .18); }
.worksheet-page { height: 480px; padding: 25px 24px; box-shadow: none; }
.worksheet-card { height: 185px; padding: 15px 13px; border: 0; border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; box-shadow: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; min-height: 67px; color: #101820; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 3.5rem; line-height: 1; }
.worksheet-card .sheet-head { min-height: 49px; font-size: 2.55rem; }
.worksheet-hero .sheet-head { min-height: 69px; font-size: 3.1rem; }
.sheet-head small { font-size: 1.7rem; }
.practice-line { position: relative; height: 61px; border-top: 1px solid #b8d0e8; border-bottom: 1px solid #d9e8f4; background: repeating-linear-gradient(to right, transparent 0 30px, rgba(152,187,215,.2) 30px 31px); }
.practice-line::after { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #bed0df; content: ""; }
.practice-line span { position: relative; z-index: 1; color: #4f6170; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 1.42rem; word-spacing: 11px; white-space: nowrap; }
.worksheet-card .practice-line { height: 38px; }
.worksheet-card .practice-line span { color: #7f8d99; font-size: .91rem; word-spacing: 2px; }
.worksheet-hero .practice-line { height: 54px; }
.worksheet-hero .practice-line span { font-size: 1.25rem; }
.section-heading h2 { margin-bottom: 3px; }
.section-heading.centered { text-align: center; }
.squiggle { display: inline-block; color: var(--green); font-size: 2.4rem; line-height: .7; }
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; margin-top: 35px; }
.category-tile { min-height: 240px; display: flex; flex-direction: column; align-items: center; padding: 22px 12px 12px; border-radius: 14px; text-align: center; transition: .2s ease; }
.category-tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tile-blue { background: #eef5fe; } .tile-green { background: #eef8ee; } .tile-yellow { background: #fff7e3; } .tile-purple { background: #f3efff; } .tile-pink { background: #fff0f5; } .tile-cyan { background: #eefaFA; }
.tile-glyph { min-height: 70px; display: grid; place-items: center; color: #3178c8; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 3.25rem; line-height: 1; }
.tile-green .tile-glyph { color: #4b9b38; } .tile-yellow .tile-glyph { color: #e4a51a; } .tile-purple .tile-glyph { color: #8464d2; } .tile-pink .tile-glyph { color: #de6191; font-size: 1.65rem; } .tile-cyan .tile-glyph { color: #3fb8c8; }
.category-tile strong { min-height: 45px; display: grid; place-items: center; font-size: .94rem; }
.category-tile p { flex: 1; margin: 0; color: var(--navy-2); font-size: .78rem; line-height: 1.6; }
.round-arrow { width: 29px; height: 29px; display: grid; place-items: center; margin-top: 10px; border-radius: 50%; background: #3178c8; color: #fff; }
.tile-green .round-arrow { background: #4b9b38; } .tile-yellow .round-arrow { background: #e4a51a; } .tile-purple .round-arrow { background: #8464d2; } .tile-pink .round-arrow { background: #de6191; } .tile-cyan .round-arrow { background: #3fb8c8; }
.why-panel { padding: 35px 45px 42px; border-radius: 18px; background: linear-gradient(110deg, #f4f8ff, #f8fbff); }
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; }
.feature { min-width: 0; display: flex; align-items: flex-start; gap: 16px; padding: 9px 22px; border-right: 1px solid #dce7f3; }
.feature:first-child { padding-left: 0; } .feature:last-child { padding-right: 0; border-right: 0; }
.feature-icon { flex: 0 0 auto; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 7px 20px rgba(25, 55, 87, .08); color: var(--green); font-size: 2.15rem; }
.feature:nth-child(1) .feature-icon { color: #2c75cd; } .feature:nth-child(4) .feature-icon { color: #dc5c93; }
.feature strong { display: block; margin: 5px 0 8px; font-size: .88rem; }
.feature p { margin: 0; color: var(--navy-2); font-size: .76rem; line-height: 1.65; }
.latest { display: grid; grid-template-columns: 235px 1fr; gap: 28px; padding-bottom: 50px; }
.latest-intro p { margin: 23px 0 28px; color: var(--navy-2); font-size: .9rem; }
.button-outline { border-color: var(--green); background: #fff; color: var(--green-dark); }
.material-row, .similar-row { min-width: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.material-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 10px rgba(21, 52, 84, .04); transition: .2s ease; }
.material-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.material-card a { display: block; height: 100%; }
.material-image, .worksheet-media img { display: block; width: 100%; height: auto; object-fit: contain; }
.worksheet-media { display: grid; place-items: center; min-height: 480px; overflow: hidden; border: 1px solid #e0e5ea; border-radius: 9px; background: #fff; }
.material-copy { padding: 15px; }
.material-copy strong { display: block; font-size: .92rem; }
.material-copy p { min-height: 46px; margin: 8px 0 12px; color: var(--navy-2); font-size: .78rem; line-height: 1.45; }
.material-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .73rem; }
.pdf-badge { margin-left: auto; padding: 1px 7px; border: 1px solid #68af55; border-radius: 5px; background: #f7fff5; color: var(--green-dark); font-size: .67rem; font-weight: 700; }
.download-icon { width: 28px; height: 28px; display: grid; place-items: center; margin-left: auto; border: 1px solid #bae0b7; border-radius: 50%; color: var(--green); font-size: 1.15rem; }
.compact .material-copy { padding: 10px 2px 0; }
.compact { overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.compact:hover { box-shadow: none; }
.compact .worksheet { border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 3px 10px rgba(21,52,84,.07); }
.compact .material-copy strong { font-size: .78rem; }
.trust-band { padding: 26px 0; background: #f3f8ff; }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 35px; }
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-icon { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 50%; background: #eaf3ff; color: #3978c8; font-size: 1.7rem; }
.trust-item strong { font-size: .75rem; }
.trust-item p { margin: 1px 0 0; color: var(--muted); font-size: .68rem; }
.footer-mini { padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .75rem; }

/* Shared inner pages */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 11px; margin: 18px 0 28px; color: #58708e; font-size: .75rem; }
.breadcrumbs a:hover { color: var(--green); }
.category-hero { min-height: 420px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 25px; }
.category-hero h1, .detail-page h1, .attachment-page h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.category-hero .lead { max-width: 590px; }
.category-scene { min-height: 320px; }
.category-scene::before { height: 175px; bottom: 12px; }
.category-scene .scene-sheet { top: 24px; width: 205px; }
.category-scene .sheet-one { left: 15px; }
.category-scene .sheet-two { right: 10px; }
.category-scene .worksheet-hero { min-height: 295px; padding: 15px; }
.category-scene .practice-line { height: 38px; }
.category-scene .pencil { right: -8px; bottom: 48px; font-size: 6.5rem; }
.category-scene .scene-star { right: -8px; top: 12px; font-size: 4rem; }
.category-scene .scene-heart { left: -45px; bottom: 91px; font-size: 3.7rem; }
.category-feature-wrap { margin-top: 40px; }
.feature-strip-category { grid-template-columns: repeat(3,1fr); padding: 22px 28px; border-radius: 15px; background: linear-gradient(110deg, #f1f8f0, #fbfdf8); }
.feature-strip-category .feature { padding: 0 22px; }
.feature-strip-category .feature-icon { width: 47px; height: 47px; background: transparent; box-shadow: none; color: var(--green); font-size: 1.8rem; }
.feature-strip-category .feature strong { font-size: .78rem; }
.feature-strip-category .feature p { font-size: .68rem; }
.category-content { padding-bottom: 50px; }
.filters { display: flex; flex-wrap: nowrap; gap: 7px; margin: 18px 0 38px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.filters a { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #cfdae7; border-radius: 50%; background: #fff; font-size: .78rem; font-weight: 700; }
.filters a:first-child { width: auto; padding: 0 17px; border-radius: 20px; }
.filters a:hover, .filters a.selected { border-color: var(--green); background: var(--green); color: #fff; }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; color: var(--navy-2); font-size: .86rem; }
.results-bar p { margin: 0; }
.results-bar strong { color: var(--green); font-size: 1.15rem; }
.results-bar select { margin-left: 10px; padding: 10px 36px 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy-2); }
.category-layout { display: grid; grid-template-columns: 1fr 205px; gap: 26px; align-items: stretch; }
.materials-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.alphabet-box { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 18px; border-radius: 15px; background: linear-gradient(150deg, #f6fcf4, #eef7e9); text-align: center; }
.gift { color: var(--green); font-size: 4rem; }
.alphabet-box h3 { margin: 10px 0; font-size: 1.3rem; }
.alphabet-box p { font-size: .78rem; }
.alphabet-box .button { width: 100%; margin-top: 10px; font-size: .78rem; }
.alphabet-box .pdf-badge { margin: 8px auto 0; }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 38px 0 40px; }
.pagination a { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-weight: 700; }
.pagination a.active { border-color: var(--green); background: var(--green); color: white; }
.guide-banner { display: flex; align-items: center; gap: 22px; padding: 24px 34px; border-radius: 15px; background: #f0f6ff; }
.guide-banner .bulb { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: #e3f0ff; color: #2e70c5; font-size: 3rem; }
.guide-banner h3 { margin: 0 0 4px; }
.guide-banner p { margin: 0; color: var(--muted); font-size: .83rem; }
.button-blue { margin-left: auto; border-color: #2c69c5; background: linear-gradient(135deg, #3378d6, #2456ad); }

/* Detail */
.detail-page, .attachment-page { padding-top: 2px; padding-bottom: 60px; }
.detail-title-row, .attachment-title { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 30px; margin-bottom: 35px; }
.detail-title-row h1, .attachment-title h1 { margin-bottom: 12px; }
.detail-title-row .lead, .attachment-title .lead { margin-bottom: 8px; font-size: .95rem; }
.favorite { display: inline-flex; align-items: center; gap: 10px; margin-top: 13px; padding: 9px; border: 0; background: transparent; color: var(--navy); cursor: pointer; }
.favorite span { color: #f188b2; font-size: 2.7rem; line-height: 1; }
.category-pill { display: inline-block; padding: 3px 11px; border-radius: 12px; background: var(--green-soft); color: var(--navy-2); font-size: .72rem; }
.category-pill strong { color: var(--green-dark); }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 42px; align-items: stretch; }
.preview-panel, .single-preview { padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.spread { min-height: 500px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.activity-page { min-height: 480px; padding: 25px 24px; border: 1px solid #e0e5ea; border-radius: 9px; background: #fff; color: #101820; }
.activity-page h3 { font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 3rem; font-weight: 400; }
.activity-page p { font-size: .69rem; }
.activity { position: relative; display: grid; gap: 12px; padding: 10px; font-size: 1.5rem; }
.activity strong { position: absolute; right: 25px; top: 45px; font-family: "Segoe Print", cursive; font-size: 2.8rem; font-weight: 400; }
.letter-circles { padding: 10px; border: 1px solid #aab5c0; border-radius: 25px; font-family: "Segoe Print", cursive; text-align: center; }
.thumb-strip { min-width: 0; display: grid; grid-template-columns: repeat(6, 1fr) auto auto; gap: 12px; align-items: center; margin-top: 18px; }
.thumb-strip > div { text-align: center; }
.thumb-strip .worksheet { height: 78px; padding: 5px; border-radius: 6px; opacity: .65; }
.thumb-strip .active .worksheet { outline: 2px solid var(--green); opacity: 1; }
.thumb-strip .sheet-head { min-height: 22px; font-size: .8rem; }
.thumb-strip .practice-line { height: 13px; }
.thumb-strip .practice-line span { font-size: .25rem; }
.thumb-strip small { font-size: .65rem; }
.thumb-more { font-size: 1.7rem; }
.page-count { display: grid; place-items: center; min-width: 47px; height: 40px; border: 1px solid var(--line); border-radius: 9px; font-weight: 700; }
.download-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 22px rgba(25,55,87,.05); }
.download-top { display: flex; align-items: center; gap: 18px; padding: 28px; background: linear-gradient(135deg, #f5fbf2, #f0f9ec); }
.pdf-file { width: 52px; height: 62px; display: grid; place-items: center; border: 3px solid var(--green); border-radius: 6px; color: var(--green-dark); font-weight: 800; }
.download-top div { flex: 1; text-align: center; }
.download-top .button { width: 100%; }
.download-top small { display: block; margin-top: 7px; color: #4e6653; font-size: .69rem; }
.info-list { padding: 15px 28px; }
.info-row { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 8px; align-items: center; min-height: 51px; border-bottom: 1px solid var(--line); font-size: .73rem; }
.info-row:last-child { border-bottom: 0; }
.info-row > span:first-child { font-size: 1.2rem; }
.green-check-panel { margin: 0 18px 18px; padding: 22px; border-radius: 14px; background: linear-gradient(140deg, #f0f8ec, #fbfefa); }
.green-check-panel h3 { margin-bottom: 8px; color: var(--green-dark); font-size: 1rem; }
.green-check-panel .check-list { gap: 8px; margin: 8px 0 0; font-size: .71rem; }
.green-check-panel .check-list li { padding-left: 25px; }
.green-check-panel .check-list li::before { width: 15px; height: 15px; }
.advice-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; margin-top: 34px; }
.advice-grid section { padding: 24px; border-radius: 15px; background: #f5f8fc; }
.advice-grid h3 { margin-bottom: 10px; }
.advice-grid p, .advice-grid li { font-size: .78rem; }
.advice-grid p:last-child { margin-bottom: 0; }
.advice-grid .check-list { gap: 8px; margin: 0; }
.similar-section { margin-top: 34px; }
.similar-section h2, .attachment-bottom h2 { font-size: 1.45rem; }
.similar-row { margin: 18px 55px 26px; }
.centered-button { width: max-content; display: flex; margin: 28px auto 0; }

/* Attachment */
.attachment-title { grid-template-columns: 1.3fr .7fr; }
.back-link { margin-top: 22px; color: #2868bd; font-weight: 700; }
.attachment-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(290px, .9fr); gap: 45px; }
.single-sheet { width: min(720px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; margin: 0 auto; box-shadow: 0 9px 24px rgba(18,48,82,.12); }
.single-sheet .worksheet, .single-sheet .activity-page { border-radius: 0; }
.attachment-actions { display: flex; flex-direction: column; gap: 13px; }
.button-wide { width: 100%; }
.attachment-actions .info-list { margin-top: 2px; border: 1px solid var(--line); border-radius: 11px; }
.attachment-actions .green-check-panel { margin: 0; }
.page-status { margin: 0; text-align: center; font-size: .75rem; }
.compact-advice { grid-template-columns: 1.1fr 1fr; margin-top: 18px; }
.compact-advice section { padding: 16px 20px; }
.attachment-bottom { display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; margin-top: 12px; }
.attachment-bottom .thumb-strip { grid-template-columns: repeat(5, 1fr); }
.attachment-bottom .thumb-more, .attachment-bottom .page-count { display: none; }
.attachment-bottom .similar-row { grid-template-columns: repeat(4, 1fr); margin: 0; }
.attachment-bottom .material-card:nth-child(n+5) { display: none; }
.attachment-bottom .worksheet-card { height: 105px; }
.attachment-bottom .worksheet-card .practice-line { height: 19px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.3fr .9fr 1fr; gap: 38px; padding-top: 34px; padding-bottom: 29px; }
.footer-grid > div:not(:first-child) { padding-left: 35px; border-left: 1px solid var(--line); }
.footer-brand { min-width: 0; }
.footer-brand .brand-mark { width: 38px; height: 42px; font-size: 2.9rem; }
.footer-brand strong { font-size: 1.15rem; }
.footer-brand small { line-height: 1.8; }
.footer-grid > div > strong { display: block; margin-bottom: 12px; font-size: .75rem; }
.footer-links { display: grid; gap: 2px; color: var(--navy-2); font-size: .72rem; }
.footer-links.two-col { grid-template-columns: 1fr 1fr; }
.socials { display: flex; gap: 12px; margin: 12px 0 0 50px; }
.socials span, .facebook span { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; background: #d7e0ec; color: #647895; font-size: .7rem; font-weight: 800; }
.facebook { display: flex; align-items: center; gap: 12px; font-size: .73rem; line-height: 1.35; }
.facebook span { width: 35px; height: 35px; background: #3471c8; color: white; font-size: 1.2rem; }
.copyright { padding: 14px; border-top: 1px solid var(--line); background: #f8fafd; color: var(--muted); text-align: center; font-size: .69rem; }
.listing-page, .content-page { min-height: 62vh; padding-bottom: 70px; }
.listing-header { max-width: 780px; margin: 42px 0; }
.listing-grid { grid-template-columns: repeat(4, 1fr); }
.nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.nav-links .page-numbers { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.nav-links .current { border-color: var(--green); background: var(--green); color: white; }
.empty-state { grid-column: 1 / -1; padding: 60px 25px; border-radius: 16px; background: var(--blue-soft); text-align: center; }
.content-page article { max-width: 820px; margin: 40px auto; }
.content-page h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.entry-content { color: var(--navy-2); }
.entry-content > * + * { margin-top: 1em; }
.error-page { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-glyph { color: var(--green); font-family: "Segoe Print", cursive; font-size: 6rem; }
.favorite.is-active span:first-child { color: #e95b95; }

@media (max-width: 1120px) {
  .desktop-nav, .header-cta { display: none; }
  .mobile-menu { display: block; }
  .brand { min-width: 255px; }
  .hero { grid-template-columns: minmax(480px, .95fr) minmax(0, 1.05fr); }
  .hero h1 { font-size: clamp(3rem, 5.3vw, 3.7rem); }
  .scene-sheet { width: 245px; }
  .sheet-one { left: 0; } .sheet-two { right: 5px; }
  .category-grid { grid-template-columns: repeat(3,1fr); }
  .category-tile { min-height: 215px; }
  .feature { padding-inline: 14px; gap: 10px; }
  .feature-icon { width: 52px; height: 52px; }
  .category-layout { grid-template-columns: 1fr 190px; }
  .materials-grid { grid-template-columns: repeat(3,1fr); }
  .product-layout { grid-template-columns: 1fr 320px; gap: 25px; }
  .footer-grid { gap: 20px; }
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  .shell { width: min(100% - 36px, 760px); }
  .header-inner { height: 92px; }
  .desktop-nav, .header-cta { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu nav { top: 86px; }
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-copy { max-width: 650px; }
  .pencil-scene { width: 680px; max-width: 100%; margin: 0 auto; }
  .category-grid { grid-template-columns: repeat(3,1fr); }
  .feature-strip { grid-template-columns: repeat(2,1fr); row-gap: 25px; }
  .feature:nth-child(2) { border-right: 0; }
  .latest { grid-template-columns: 1fr; }
  .latest-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8px 25px; }
  .latest-intro p { margin: 0; }
  .latest-intro .button { width: max-content; }
  .material-row { grid-template-columns: repeat(3,1fr); }
  .material-row .material-card:nth-child(n+4) { display: none; }
  .trust-grid { grid-template-columns: repeat(2,1fr); }
  .category-hero { grid-template-columns: 1fr; }
  .category-hero > div:first-child { padding-top: 10px; }
  .category-scene { display: none; }
  .category-feature-wrap { margin: 28px 0; }
  .category-layout { grid-template-columns: 1fr; }
  .materials-grid { grid-template-columns: repeat(3,1fr); }
  .alphabet-box { min-height: 250px; }
  .product-layout, .attachment-layout { grid-template-columns: 1fr; }
  .download-card, .attachment-actions { width: 100%; }
  .attachment-title { grid-template-columns: 1fr; gap: 0; }
  .back-link { margin-top: 0; }
  .attachment-bottom { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-grid > div:last-child { display: none; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .shell { width: min(100% - 28px, 520px); }
  .brand { min-width: 0; }
  .brand-mark { width: 38px; height: 46px; font-size: 2.9rem; }
  .brand strong { font-size: 1.02rem; }
  .brand small { font-size: .66rem; }
  .hero { min-height: 0; padding-top: 25px; }
  .hero h1 { font-size: clamp(2.25rem, 10.8vw, 2.9rem); }
  .hero .lead { font-size: 1rem; }
  .hero .button { width: 100%; }
  .pencil-scene { min-height: 350px; }
  .scene-sheet { width: 190px; top: 42px; }
  .sheet-one { left: 10px; }
  .sheet-two { right: 10px; }
  .worksheet-hero { min-height: 280px; padding: 13px; }
  .worksheet-hero .sheet-head { min-height: 49px; font-size: 2.3rem; }
  .worksheet-hero .practice-line { height: 39px; }
  .worksheet-hero .practice-line span { font-size: .8rem; }
  .pencil-scene::before { height: 175px; }
  .pencil { right: -16px; bottom: 48px; font-size: 6rem; }
  .scene-star { right: -4px; font-size: 3.5rem; }
  .scene-heart { left: -5px; bottom: 48px; font-size: 3.4rem; }
  .section { margin-top: 55px; }
  .category-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .category-tile { min-height: 220px; }
  .why-panel { padding: 28px 20px; }
  .feature-strip { grid-template-columns: 1fr; margin-top: 20px; }
  .feature { border-right: 0; border-bottom: 1px solid #dce7f3; padding: 14px 0; }
  .feature:last-child { border-bottom: 0; }
  .latest-intro { display: block; }
  .latest-intro p { margin: 15px 0 22px; }
  .material-row { display: flex; margin-right: -14px; overflow-x: auto; padding: 4px 14px 16px 0; scroll-snap-type: x mandatory; }
  .material-row .material-card { flex: 0 0 72%; display: block !important; scroll-snap-align: start; }
  .trust-grid { grid-template-columns: 1fr; gap: 15px; }
  .breadcrumbs { margin-bottom: 20px; }
  .category-hero h1, .detail-page h1, .attachment-page h1 { font-size: 2.35rem; }
  .feature-strip-category { grid-template-columns: 1fr; padding: 15px 20px; }
  .feature-strip-category .feature { padding: 13px 0; }
  .results-bar { align-items: flex-start; gap: 12px; }
  .results-bar label { font-size: 0; }
  .results-bar select { margin: 0; font-size: .8rem; }
  .materials-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }
  .material-copy { padding: 11px; }
  .material-copy p { min-height: 55px; }
  .worksheet-card { height: 160px; }
  .guide-banner { align-items: flex-start; flex-wrap: wrap; padding: 22px; }
  .guide-banner .bulb { width: 48px; height: 48px; }
  .guide-banner div { flex: 1; }
  .guide-banner .button { width: 100%; margin-left: 0; }
  .detail-title-row { grid-template-columns: 1fr; gap: 0; }
  .favorite { justify-self: start; margin-top: 0; }
  .preview-panel, .single-preview { padding: 10px; }
  .spread, .single-sheet { grid-template-columns: 1fr; box-shadow: none; }
  .activity-page { min-height: 410px; }
  .worksheet-page { height: 410px; }
  .thumb-strip { display: flex; overflow-x: auto; padding: 3px; }
  .thumb-strip > div { flex: 0 0 90px; }
  .thumb-strip .thumb-more, .thumb-strip .page-count { flex: 0 0 40px; }
  .download-top { padding: 20px; }
  .advice-grid, .compact-advice { grid-template-columns: 1fr; }
  .similar-row { display: flex; margin: 15px -14px 20px 0; overflow-x: auto; padding: 4px 14px 15px 0; }
  .similar-row .material-card { flex: 0 0 66%; }
  .centered-button { width: 100%; }
  .attachment-bottom .thumb-strip { display: flex; }
  .attachment-bottom .similar-row { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:nth-child(3) { display: none; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid > div:nth-child(2) { padding-left: 20px; }
}

@media (max-width: 420px) {
  .brand small { display: none; }
  .category-grid { grid-template-columns: 1fr; }
  .category-tile { min-height: 185px; }
  .materials-grid { grid-template-columns: 1fr; }
  .listing-grid { grid-template-columns: 1fr; }
  .worksheet-card { height: 185px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:nth-child(2) { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
