/* Finder results (#372) and curriculum browse (#376): inc/pages/finder.php, assets/js/pages/finder.js.
   Reads tokens.css. The product card and the finder sentence's .finder-s / .blank are shell.css's.
   Breakpoints follow the shell: 1100, 960, 560. */

/* ---------- finder hero: heading + the sentence ---------- */
.fd-hero{background:var(--mist);border-bottom:1px solid var(--line);padding:0 0 34px}
.fd-hero .crumbs ol{padding-bottom:18px}
.fd-hero h1{font-size:clamp(2rem,4vw,2.8rem);margin:10px 0 18px}
.fd-finder{background:var(--white);border:1px solid var(--line);border-radius:8px;padding:20px 24px 18px;max-width:860px}
.fd-finder .finder-s.flow{display:block;line-height:1.8}
.fd-finder .nw{white-space:nowrap}
.fd-finder .flow .blank{margin:0 .06em}
.fd-finder .blank select{max-width:100%}
.finder-a{display:flex;align-items:center;gap:8px 18px;margin-top:14px;flex-wrap:wrap;font-size:.95rem}
.finder-a .btn{padding:0 24px}
.finder-a a{font-weight:600;text-decoration:underline;text-underline-offset:3px}
/* the page's intro (#513): under the heading; on a phone finder.js folds it to two lines, "Read more" at the end of the
   second (over a fade of the hero's own colour, its tap area 44px tall), so it adds no row of its own */
.fd-intro{position:relative;max-width:72ch;margin:-6px 0 22px}
.fd-intro p{font-size:1.06rem;line-height:1.6;color:var(--ink)}
.fd-intro-more{display:none;position:absolute;right:0;bottom:0;align-items:center;height:1.55em;padding:0 0 0 2.6em;border:0;background:linear-gradient(90deg,transparent,var(--mist) 2.2em);color:var(--navy);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.fd-intro-more::after{content:"";position:absolute;left:1.6em;right:0;top:50%;height:44px;transform:translateY(-50%)}
.fd-intro-more:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:2px}

/* ---------- sections ---------- */
.fd-sec{padding:44px 0 8px}
.fd-sec h2:focus{outline:0}
.fd-count{color:var(--muted);margin:0 0 14px;min-height:1.5em}
.fd-count:empty{min-height:0;margin:0}
.fd-msg{color:var(--brick);margin:0 0 14px}
.fd-msg:empty{display:none}
.fd-more{text-align:center;margin-top:26px}
.fd-empty{margin-top:4px}
.fd-empty h3{font:400 1.35rem/1.25 var(--serif);color:var(--navy);max-width:40ch}
.fd-empty p{color:var(--muted);max-width:56ch}
.fd-empty-a{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:6px}
.fd-prod .grid[aria-busy="true"],.fd-grid[aria-busy="true"]{opacity:.55;transition:opacity .15s}
.fd-prod .grid:empty,.fd-grid:empty{display:none}

/* ---------- curriculum cards (the mockup's .prog, with the grade ruler) ---------- */
.fd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.fd-browse .fd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fd-card{position:relative;display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:6px;padding:18px 18px 16px;background:var(--white);transition:border-color .15s,box-shadow .15s;min-width:0}
.fd-card:hover,.fd-card:focus-within{border-color:var(--roof);box-shadow:0 12px 24px -16px rgba(20,30,50,.5)}
.fd-s{font-size:.72rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:var(--garden)}
.fd-card h3{font:400 1.25rem/1.2 var(--serif);color:var(--navy)}
.fd-card h3 a{color:inherit;text-decoration:none}
.fd-card h3 a::after{content:"";position:absolute;inset:0;border-radius:6px}
.fd-card h3 a:hover{text-decoration:underline;text-underline-offset:3px}
.fd-card h3 a:focus-visible{outline:0}
.fd-card h3 a:focus-visible::after{outline:3px solid var(--focus);outline-offset:2px}
.fd-b{font-size:.88rem;color:var(--muted)}
.fd-fit{background:var(--garden-t);border-radius:4px;padding:8px 10px;font-size:.92rem;color:var(--ink);margin:4px 0 2px}
.fd-fit b{color:var(--navy)}
.fd-pr{font-size:.92rem;color:var(--muted)}.fd-pr del{font-weight:400}
.fd-x{font-size:.9rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.fd-g{margin-top:auto;padding-top:10px;font-weight:700;font-size:.9rem;color:var(--navy)}
.fd-ruler{display:block;position:relative;height:10px;border-radius:2px;margin-bottom:16px;background:linear-gradient(90deg,transparent calc(var(--a)/14*100%),var(--roof) calc(var(--a)/14*100%),var(--roof) calc(var(--b)/14*100%),transparent calc(var(--b)/14*100%)),repeating-linear-gradient(90deg,var(--mist-2) 0 calc(100%/14 - 2px),var(--white) 0 calc(100%/14))}
.fd-ruler::before,.fd-ruler::after{position:absolute;top:13px;font-size:.68rem;line-height:1;color:var(--muted)}
.fd-ruler::before{content:"Pre-K";left:0}
.fd-ruler::after{content:"12";right:0}
.fd-seq{font-size:.82rem;color:var(--muted)}
.fd-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.fd-tags li{font-size:.78rem;font-weight:600;color:var(--navy);background:var(--mist);border-radius:999px;padding:3px 10px}

/* ---------- the five filters ---------- */
.fd-fg summary{list-style:none;display:flex;align-items:center;gap:8px;font-weight:700;color:var(--navy);cursor:pointer;min-height:44px}
.fd-fg summary::-webkit-details-marker{display:none}
.fd-fg summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:0 4px 4px auto;flex:none}
.fd-fg[open]>summary::after{transform:rotate(-135deg);margin-bottom:-4px}
.fd-fg fieldset{border:0;margin:0;padding:2px 0 8px;min-width:0}
.fd-fn{background:var(--brick);color:var(--white);border-radius:10px;min-width:20px;height:20px;padding:0 6px;font-size:.75rem;display:grid;place-items:center}
.fd-fn:empty{display:none}
.fd-ck{display:flex;align-items:center;gap:10px;min-height:40px;font-size:.95rem;cursor:pointer;line-height:1.25}
.fd-ck input{width:18px;height:18px;accent-color:var(--roof);margin:0;flex:none;cursor:pointer}
.fd-ck span{min-width:0;overflow-wrap:anywhere}
.fd-n{margin-left:auto;color:var(--muted);font-size:.85rem;font-variant-numeric:tabular-nums}
.fd-ck.zero{color:var(--muted)}

/* finder: a row of drop-downs over the cards */
.fd-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 16px}
.fd-bar-l{font-weight:700;color:var(--muted);font-size:.9rem;margin-right:4px}
.fd-groups{display:flex;flex-wrap:wrap;gap:8px}
.fd-bar .fd-fg{position:relative}
.fd-bar .fd-fg summary{border:1.5px solid var(--line);border-radius:999px;padding:0 14px 0 16px;background:var(--white);font-size:.92rem}
.fd-bar .fd-fg summary:hover,.fd-bar .fd-fg[open] summary{border-color:var(--roof)}
.fd-bar .fd-fg summary::after{margin-left:2px}
.fd-bar .fd-fg fieldset{position:absolute;z-index:15;top:calc(100% + 6px);left:0;min-width:250px;background:var(--white);border:1px solid var(--line);border-radius:8px;box-shadow:0 24px 48px -20px rgba(20,30,50,.45);padding:8px 16px}

.fd-act{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.fd-act:empty{display:none}
.fd-act button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 10px 0 14px;border-radius:999px;border:0;background:var(--mist-2);color:var(--navy);font-weight:600;font-size:.88rem}
.fd-act button .ic{width:15px;height:15px}
.fd-act button:hover{background:var(--line)}
.fd-act .clr{background:none;padding:0 8px;text-decoration:underline;text-underline-offset:3px;color:var(--roof)}

/* browse: a sidebar */
.fd-bh p{max-width:70ch}
.fd-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:40px;padding-top:12px;position:relative}
.fd-side-h,.fd-side-f{display:none}
.fd-side .fd-fg{border-bottom:1px solid var(--line);padding:6px 0}
.fd-grade{display:grid;gap:6px;padding:12px 0 14px!important}
.fd-grade label{font-weight:700;color:var(--navy)}
.fd-grade select{min-height:44px;border:1.5px solid var(--field);border-radius:4px;padding:0 10px;background:var(--white);font:inherit;color:var(--ink)}
.fd-tb{display:flex;align-items:center;gap:16px;margin-bottom:14px;flex-wrap:wrap;min-height:44px}
.fd-tb .fd-count{margin:0 auto 0 0}
.fd-filt{display:none;align-items:center;gap:8px;min-height:44px;padding:0 16px;border:1.5px solid var(--navy);border-radius:4px;background:var(--white);color:var(--navy);font-weight:700}
.fd-filt b{background:var(--brick);color:var(--white);border-radius:10px;min-width:20px;height:20px;padding:0 6px;font-size:.75rem;display:grid;place-items:center}
.fd-filt b:empty{display:none}
/* #572: Sort (Featured / A to Z) at the end of the toolbar */
.fd-shead{grid-column:1/-1;margin-top:14px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.fd-shead:first-child{margin-top:0}
.fd-shead h3{font:400 1.5rem/1.2 var(--serif);color:var(--navy)}
.fd-sort{display:flex;align-items:center;gap:8px;margin-left:auto}
.fd-sort label{font-weight:700;color:var(--navy)}
.fd-sort select{min-height:44px;border:1.5px solid var(--field);border-radius:4px;padding:0 10px;background:var(--white);font:inherit;color:var(--ink);max-width:100%}

.fd-help{display:flex;align-items:center;justify-content:space-between;gap:16px 28px;flex-wrap:wrap;margin-top:56px;background:var(--mist);border-left:3px solid var(--garden);border-radius:0 6px 6px 0;padding:18px 22px}
.fd-help div{max-width:70ch}
.fd-help b{color:var(--navy)}

/* ---------- kinds of card (#432): sections after the curricula, the links that end them, hands-on chips ---------- */
.fd-grp{padding-top:36px}
.fd-for{font-size:.88rem;color:var(--muted)}
.fd-for a{position:relative;z-index:1;color:var(--navy);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.fd-cov,.fd-need{font-size:.9rem;color:var(--ink)}
.fd-cov b,.fd-need b{color:var(--navy)}
.fd-need.ok{color:var(--garden);font-weight:600}
.fd-next{padding-top:32px}
.fd-next ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px}
.fd-next li{background:var(--mist);border-left:3px solid var(--roof);border-radius:0 6px 6px 0;padding:14px 18px;min-width:0}
.fd-next a{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--navy);text-decoration:underline;text-underline-offset:3px;min-height:28px}
.fd-next a span{overflow-wrap:anywhere}
.fd-next a .ic{flex:none;width:16px;height:16px}
.fd-next li>span{display:block;color:var(--muted);font-size:.88rem;margin-top:2px}
.fd-chips ul{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
.fd-chips .chip{white-space:normal}

/* ---------- tablet ---------- */
@media (max-width:1100px){
.fd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fd-layout{grid-template-columns:220px minmax(0,1fr);gap:28px}
}
@media (max-width:960px){
.fd-layout{grid-template-columns:minmax(0,1fr)}
.fd-filt{display:inline-flex}
.fd-side{display:none;position:absolute;left:0;right:0;top:4px;z-index:20;background:var(--white);border:1px solid var(--line);border-radius:8px;box-shadow:0 30px 60px -20px rgba(20,30,50,.5);padding:0 20px 20px}
.fd-side.open{display:block}
.fd-side-h{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line);margin-bottom:4px}
.fd-side-h h2{font-size:1.3rem}
.fd-side-h h2:focus{outline:0}
.fd-side-h button{width:44px;height:44px;margin-right:-10px;border:0;background:none;display:grid;place-items:center;color:var(--navy);border-radius:4px}
.fd-side-h button:hover{background:var(--mist)}
.fd-side-f{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;padding-top:16px}
.fd-tb .fd-count{order:3;width:100%}
}

/* ---------- phone ---------- */
@media (max-width:700px){
.fd-grid,.fd-browse .fd-grid{grid-template-columns:minmax(0,1fr)}
.fd-bar{align-items:stretch}
.fd-groups{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:0;border-top:1px solid var(--line)}
.fd-bar .fd-fg{border-bottom:1px solid var(--line)}
.fd-bar .fd-fg summary{border:0;border-radius:0;padding:0 2px}
.fd-bar .fd-fg fieldset{position:static;box-shadow:none;border:0;min-width:0;padding:0 2px 8px}
}
@media (max-width:560px){
.fd-hero{padding-bottom:24px}
.fd-intro{margin:-8px 0 14px}
.fd-intro p{font-size:1rem;line-height:1.55}
.fd-intro.fold p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fd-intro.fold .fd-intro-more{display:inline-flex}
.fd-finder{padding:16px 16px 14px}
.fd-finder .finder-s.flow{line-height:1.65}
/* "and need [subject]." still moves to its own line as one piece, but no wider than the card, breaking before the
   drop-down when it must: beside its longest choices ("history & geography") it is wider than a 360px phone's card,
   and nowrap pushed the page sideways */
.fd-finder .finder-s>.nw:last-child{display:inline-block;max-width:100%;white-space:normal}
.finder-a .btn{width:100%}
.fd-sec{padding-top:32px}
.fd-ck{min-height:44px}
.fd-side{padding:0 16px 16px}
.fd-help{padding:16px}
.fd-help .btn{width:100%}
}
/* the few words under each filter (#527) */
.fd-fh{font-size:.85rem;line-height:1.4;color:var(--muted);margin:0 0 6px;max-width:44ch}
.fd-fh a{font-weight:600;text-decoration:underline;text-underline-offset:3px}   /* a filter's glossary entry (parent involvement) */
