/* ===== AI Resources for Faculty — polished library styling ===== */
:root{
  --f-ink:#1e293b; --f-mut:#556071; --f-faint:#e2e8f0; --f-line:#e5e9f0;
  --f-accent:#1d4ed8; --f-accent-d:#1e40af; --f-bg:#f6f7fb; --f-card:#fff;
  --f-amber:#b45309;
  --funnel:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.5V19l4 2v-8.5z'/%3E%3C/svg%3E");
}
.facultypage{background:var(--f-bg)}
.facultypage main{max-width:1180px}

/* progressive enhancement: JS-only UI hidden until enhanced; noscript fallback shows otherwise */
.needs-js{display:none}
body.js .needs-js{display:block}
body.js .nojs-fallback{display:none}

/* ---------- Resource of the week spotlight ---------- */
.spotlight{display:flex;gap:22px;align-items:flex-start;background:linear-gradient(135deg,#fffbeb,#fff);border:1px solid #fcd34d;border-left:5px solid #f59e0b;border-radius:14px;padding:20px;margin:18px 0 4px;flex-wrap:wrap}
.spotlight .spotart{flex:0 0 150px;max-width:150px}
.spotlight .spotart .art{width:150px;aspect-ratio:1/1;border-radius:12px;background-size:cover;background-position:center;box-shadow:0 3px 10px rgba(15,23,42,.14);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.spotlight .spotart .art .cglyph{width:54px;height:54px}
.spotlight .spotbody{flex:1;min-width:240px}
.spotlight .spotlabel{font-size:12px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#b45309;margin-bottom:4px}
.spotlight h2{margin:0 0 2px;font-size:21px}
@media(max-width:560px){.spotlight .spotart{flex:0 0 110px}.spotlight .spotart .art{width:110px}}

/* ---------- Classroom-ready prompt library ---------- */
/* Promoted above the library: these are the most immediately usable thing on the page,
   and at the bottom nobody found them. Given a tinted band so it reads as its own zone. */
/* Collapsed accordion: the whole prompt library is one bar until opened, so it no longer
   makes the page a long scroll, but the header keeps it visible and inviting. */
.promptlib{margin:20px 0 24px;background:#f5f3ff;border:1px solid #ddd6fe;border-radius:14px;overflow:hidden}
.promptsummary{cursor:pointer;padding:16px 20px;list-style:none;display:block}
.promptsummary::-webkit-details-marker{display:none}
.promptsummary::before{content:"▸";float:right;color:#7c3aed;font-size:15px;transition:transform .15s}
.promptlib[open] .promptsummary::before{transform:rotate(90deg)}
.promptsummary:hover .pstitle{color:#6d28d9}
.pstitle{font-size:18px;font-weight:700;color:var(--f-ink)}
.pstitle .count{color:var(--f-mut);font-weight:400;font-size:14px}
.pssub{display:block;margin-top:3px;font-size:13px;color:var(--f-mut)}
.promptbody{padding:0 20px 18px}
.prompttools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.promptsuggest{border:1px solid #ddd6fe;background:#fff;color:#6d28d9;font-weight:600;font-size:13px;
  padding:7px 13px;border-radius:8px;cursor:pointer;font-family:inherit}
.promptsuggest:hover{background:#ede9fe}
.promptjump{margin-left:auto;font-size:13px;color:#6d28d9;text-decoration:none;font-weight:600;
  border:1px solid #ddd6fe;background:#fff;padding:7px 13px;border-radius:8px;white-space:nowrap}
.promptjump:hover{background:#ede9fe}
.promptnote{margin:8px 0;font-size:13.5px;color:#5b21b6;background:#ede9fe;border-radius:8px;padding:8px 12px}
.promptnote[hidden]{display:none}
.promptcard[hidden]{display:none}
.ptag{display:inline-block;margin:4px 6px 0 22px;font-size:11px;font-weight:600;color:#9a3412;
  background:#ffedd5;padding:2px 9px;border-radius:99px;vertical-align:middle}
@media(max-width:760px){
  .promptlib{margin:16px -4px 20px;padding:16px 14px;border-radius:12px}
  .promptjump{padding:6px 11px;font-size:12.5px}
  .ptag{margin-left:0}
}
.promptcard{background:#fff;border:1px solid var(--f-line);border-radius:12px;margin:10px 0;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.promptcard.pfeatured{border-color:#fcd34d;background:#fffdf7}
.promptcard summary{cursor:pointer;padding:14px 18px;font-size:15px;list-style-position:inside}
.promptcard summary:hover{color:var(--f-accent)}
.promptcard .pscenario{display:block;margin:2px 0 0 22px;font-size:13px;color:var(--f-mut);font-weight:400}
.promptcard[open] summary{border-bottom:1px solid var(--f-line)}
.promptcard pre{margin:14px 18px 10px;padding:14px;background:#f8fafc;border:1px solid var(--f-line);border-radius:8px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word;color:#334155}
.promptcard .ptips{margin:0 18px 10px;font-size:13px;color:#92400e;background:#fffbeb;border-radius:6px;padding:8px 10px}
.promptcard .plinks{margin:0 18px 10px;display:flex;flex-wrap:wrap;gap:8px}
.promptcard .plinks a{font-size:12.5px;font-weight:600;color:var(--f-accent-d,#4338ca);text-decoration:none;background:#eef2ff;border:1px solid #c7d2fe;border-radius:99px;padding:4px 11px}
.promptcard .plinks a:hover{text-decoration:underline}
.promptcard .pcopy{margin:0 18px 14px;border:none;cursor:pointer;background:var(--f-accent);color:#fff;padding:9px 16px;border-radius:7px;font-size:13px;font-weight:600}
.promptcard .pcopy:hover{background:var(--f-accent-d)}

/* ---------- Monthly digest subscribe box ---------- */
.subscribebox{background:#1e293b;color:#fff;border-radius:14px;padding:26px 24px;margin:26px 0 8px;text-align:center}
.subscribebox h2{margin:0 0 6px;font-size:20px}
.subscribebox p{margin:0 auto 14px;color:#cbd5e1;font-size:14px;max-width:520px}
.subscribebox form{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;max-width:440px;margin:0 auto}
.subscribebox input{flex:1;min-width:200px;border:none;border-radius:8px;padding:11px 12px;font-size:14px}
.subscribebox .btn{background:#f59e0b;color:#1e293b;font-weight:700;border:none;border-radius:8px;padding:11px 20px;font-size:14px;cursor:pointer}
.subscribebox .btn:hover{filter:brightness(1.06)}

/* ---------- New this month strip (server-rendered, shows in both modes) ---------- */
.newstrip{background:linear-gradient(180deg,#f5f3ff,rgba(245,243,255,0));border:1px solid #ede9fe;border-radius:14px;padding:4px 18px 16px;margin:18px 0 4px}
.newstrip .grouphead{margin:14px 0 2px}
.newstrip .covergrid{grid-template-columns:repeat(auto-fill,minmax(132px,1fr))}

/* ---------- Hero ---------- */
.fhero{background:linear-gradient(160deg,#1e293b 0%,#243352 60%,#1e3a8a 140%);color:#fff;padding:46px 20px 40px}
.fhero-in{max-width:820px;margin:0 auto;text-align:center}
.fhero-top{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:68px;margin-bottom:20px;text-align:left}
.fherologo{height:68px;width:auto;margin:0}
.fhero h1{margin:0 0 10px;font-size:34px;letter-spacing:-.02em;line-height:1.1}
.fhero .sub{margin:0 auto 22px;max-width:600px;color:#cbd6e6;font-size:16px;line-height:1.5}
.herosub-link{margin:0 0 6px;font-size:13.5px}
.herosub-link button{background:none;border:0;padding:0;font:inherit;color:#cbd6e6;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.herosub-link button:hover{color:#fff}
.askbox{display:flex;align-items:center;gap:8px;background:#fff;border-radius:14px;padding:8px 8px 8px 14px;box-shadow:0 10px 30px rgba(2,8,23,.35);max-width:640px;margin:0 auto}
.askbox .askicon{font-size:18px;line-height:1}
.askbox input{flex:1;border:0;outline:0;font-size:15.5px;color:var(--f-ink);background:transparent;min-width:0;padding:8px 4px}
.askbox button{flex:0 0 auto;border:0;cursor:pointer;background:var(--f-accent);color:#fff;font-weight:600;font-size:15px;padding:11px 22px;border-radius:10px}
.askbox button:hover{background:var(--f-accent-d)}
.chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:16px auto 0;max-width:680px}
.chips form{margin:0}
.chip{border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.08);color:#e8eefb;font-size:13px;padding:7px 13px;border-radius:99px;cursor:pointer;font-family:inherit}
.chip:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.5)}
.chip::before{content:"✨ ";opacity:.7}

/* "what do you teach" row — deliberately a different affordance from the ✨ ask chips
   above it: squared, no sparkle, so it reads as picking who you are rather than
   firing another question. Selecting one re-ranks the library; it never hides anything. */
/* hidden without JS — these re-rank a client-rendered list, so they'd be dead links
   in the no-JS fallback. Same contract as .needs-js on the toolbar. */
.teachrow{display:none;margin:22px auto 0;max-width:700px;padding-top:18px;border-top:1px solid rgba(255,255,255,.14)}
body.js .teachrow{display:block}
.teachlbl{display:block;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:#93a5c4;margin-bottom:10px}
.dchips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.dchip{text-decoration:none;border:1px solid rgba(255,255,255,.34);background:transparent;color:#dbe6f8;font-size:13px;padding:7px 14px;border-radius:8px;cursor:pointer}
.dchip:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.6);color:#fff}
.dchip.on{background:#fff;border-color:#fff;color:#1e3a8a;font-weight:600}
.dnote{margin:14px auto 0;max-width:620px;font-size:14px;line-height:1.55;color:#cbd6e6;text-align:left;
  background:rgba(255,255,255,.07);border-left:3px solid rgba(255,255,255,.45);border-radius:0 8px 8px 0;padding:11px 14px}
.dnote[hidden]{display:none} /* explicit: a bare display rule here would defeat the hidden attribute */

/* ---------- Sticky toolbar ---------- */
.toolbar{position:sticky;top:0;z-index:30;background:rgba(246,247,251,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--f-line);margin:0 -20px 8px;padding:12px 20px}
.tbrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.tbrow + .tbrow{margin-top:10px}
.tbtop{display:flex;align-items:center;gap:10px}
/* Category tab bar — a separate, always-visible control (not another filter chip hidden
   behind the Filters button), so switching "kind of resource" no longer means scrolling past
   every section. Underline style rather than pills, on purpose: it reads as navigation/
   structure rather than one more filter, which is the distinction the whole feature rests on. */
.tabsrow{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  border-bottom:1px solid var(--f-line);margin-top:10px}
.tabsrow::-webkit-scrollbar{display:none}
.tabsrow:empty{display:none}
.rtab{flex:0 0 auto;background:none;border:0;border-bottom:2px solid transparent;
  padding:9px 13px 8px;font-size:13.5px;font-weight:600;color:var(--f-mut);cursor:pointer;
  font-family:inherit;white-space:nowrap;display:flex;align-items:center;gap:6px;margin-bottom:-1px}
.rtab:hover{color:var(--f-ink)}
.tcount{font-size:11px;font-weight:600;color:var(--f-mut);background:#f1f5f9;border-radius:99px;padding:1px 7px}
.rtab[aria-selected="true"]{color:var(--f-accent);border-bottom-color:var(--f-accent)}
.rtab[aria-selected="true"] .tcount{background:#dbeafe;color:var(--f-accent)}
/* Four filter groups laid out inline ate roughly 280px of every desktop page before any
   content appeared. Same fix as mobile: collapsed behind the Filters button, opening as a
   panel rather than a bottom sheet. The sticky bar is one row again, and the active-filter
   tags below it still show what's on while the panel is shut. */
.tbpanel{display:none;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:10px;
  background:#fff;border:1px solid var(--f-line);border-radius:12px;padding:14px 16px;
  box-shadow:0 4px 14px rgba(15,23,42,.07)}
.tbpanel.open{display:flex}
.tbpanel .fgroup{flex:1 1 100%}
.tbfoot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1 1 100%;
  border-top:1px solid var(--f-line);padding-top:12px;margin-top:2px}
/* Reads as a real control now: accent border and text, a funnel icon, on white. It sat
   next to the search box looking like faint grey text and got missed. */
.filtersbtn{border:1.5px solid var(--f-accent);background:#fff;color:var(--f-accent);font-size:13.5px;font-weight:600;
  padding:9px 16px;border-radius:10px;cursor:pointer;font-family:inherit;white-space:nowrap;
  display:inline-flex;align-items:center;gap:7px}
.filtersbtn::before{content:"";width:15px;height:15px;flex:0 0 auto;
  background:currentColor;-webkit-mask:var(--funnel) center/contain no-repeat;mask:var(--funnel) center/contain no-repeat}
.filtersbtn:hover{background:#eff4ff}
.filtersbtn[aria-expanded="true"]{background:var(--f-accent);border-color:var(--f-accent);color:#fff}
.fbadge{background:var(--f-accent);color:#fff;font-size:11px;font-weight:700;min-width:18px;height:18px;
  border-radius:99px;display:grid;place-items:center;padding:0 5px}
.filtersbtn[aria-expanded="true"] .fbadge{background:#fff;color:var(--f-accent)}
.fbadge[hidden]{display:none}
/* the sheet chrome and dimming backdrop are mobile-only — a backdrop here would grey out
   the page behind a dropdown, which is the bug that shipped once already */
.sheet-head,.sheet-done,.sheet-back{display:none}
.fgroup{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.flabel{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--f-mut);margin-right:2px}
.fchip{border:1px solid var(--f-line);background:#fff;color:#475569;font-size:13px;padding:6px 13px;border-radius:99px;cursor:pointer;font-family:inherit}
.fchip:hover{border-color:#94a3b8}
.fchip[aria-pressed="true"]{background:var(--f-accent);border-color:var(--f-accent);color:#fff;font-weight:600}
.search{position:relative;flex:1;min-width:200px}
.search input{width:100%;border:1px solid var(--f-line);border-radius:10px;padding:9px 12px 9px 34px;font-size:14px;font-family:inherit;background:#fff}
.search::before{content:"🔍";position:absolute;left:11px;top:50%;transform:translateY(-50%);font-size:13px;opacity:.6}
.sortwrap{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--f-mut)}
.sortwrap select{border:1px solid var(--f-line);border-radius:8px;padding:8px 10px;font-size:13px;font-family:inherit;background:#fff}
.tbtn{border:1px solid var(--f-line);background:#fff;color:#475569;font-size:13px;padding:8px 13px;border-radius:8px;cursor:pointer;font-family:inherit;white-space:nowrap}
.tbtn:hover{border-color:#94a3b8}
.tbtn[aria-pressed="true"]{background:#fef3c7;border-color:#fcd34d;color:var(--f-amber);font-weight:600}
.activebar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}
.activebar .lbl{font-size:12px;color:var(--f-mut)}
.atag{display:inline-flex;align-items:center;gap:6px;background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;font-size:12px;padding:4px 6px 4px 10px;border-radius:99px}
.atag button{border:0;background:#c7d2fe;color:#312e81;width:16px;height:16px;border-radius:50%;cursor:pointer;font-size:11px;line-height:1;display:grid;place-items:center}
.atag button:hover{background:#a5b4fc}

/* ---------- Sections ---------- */
.rsection{margin:30px 0}
.rsection.starter{background:linear-gradient(180deg,#fffdf5,#fff);border:1px solid #fde9c8;border-radius:16px;padding:20px 20px 24px;margin:22px 0}
.rhead{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:2px}
.rhead h2{font-size:21px;margin:0;letter-spacing:-.01em}
.rhead .count{font-size:13px;color:var(--f-mut);font-weight:500}
.rsub{font-size:14px;color:var(--f-mut);margin:0 0 14px}
.resultline{font-size:14px;color:#334155;margin:6px 0 16px}
.resultline b{color:var(--f-ink)}

/* ---------- Card grid ---------- */
.rgrid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(258px,1fr))}
@media(min-width:1000px){.rgrid{gap:22px}}
.rcard{position:relative;display:flex;flex-direction:column;background:var(--f-card);border:1px solid var(--f-line);border-radius:14px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);transition:box-shadow .15s,transform .15s,border-color .15s}
.rcard:hover{box-shadow:0 10px 26px rgba(15,23,42,.12);transform:translateY(-3px);border-color:#cdd7e5}
.rcard:focus-within{border-color:var(--f-accent);box-shadow:0 0 0 3px rgba(29,78,216,.18)}
.rcard.rec{border-color:#fcd34d}
.rmedia{position:relative;aspect-ratio:16/9;background:#0f172a;overflow:hidden;display:grid;place-items:center}
.rmedia .bg{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(16px) brightness(.82);transform:scale(1.18)}
.rmedia img.fg{position:absolute;inset:0;width:100%;height:100%}
.rmedia .cglyph{width:46px;height:46px;opacity:.92;filter:drop-shadow(0 2px 5px rgba(0,0,0,.3))}
/* the icon shows only when there's no image (.gen) or the image failed to load (.imgfail) */
.rmedia .cglyph{display:none}
.rmedia.gen .cglyph,.rmedia.imgfail .cglyph{display:block}
.rmedia.imgfail .bg,.rmedia.imgfail img.fg{display:none}
.recribbon{position:absolute;top:10px;left:10px;z-index:2;background:#f59e0b;color:#3b2600;font-size:11px;font-weight:800;letter-spacing:.02em;padding:4px 9px;border-radius:99px;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.bm{position:absolute;top:8px;right:8px;z-index:3;width:34px;height:34px;border-radius:50%;border:0;cursor:pointer;background:rgba(15,23,42,.55);color:#fff;font-size:16px;line-height:1;display:grid;place-items:center;backdrop-filter:blur(2px)}
.bm:hover{background:rgba(15,23,42,.78)}
.bm[aria-pressed="true"]{background:#f59e0b;color:#fff}
.rbody{display:flex;flex-direction:column;gap:8px;padding:14px 15px 15px;flex:1}
.rbadges{display:flex;flex-wrap:wrap;gap:6px}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:99px;border:1px solid transparent}
.badge.type{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
.badge.lv-beginner{background:#ecfdf5;color:#047857;border-color:#bbf7d0}
.badge.lv-intermediate{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.badge.lv-proficient{background:#fdf4ff;color:#a21caf;border-color:#f5d0fe}
.badge.rec{background:#fffbeb;color:var(--f-amber);border-color:#fde68a}
.badge.disc{background:#fff7ed;color:#c2410c;border-color:#fed7aa}
.rtitle{font-size:16.5px;line-height:1.28;margin:0;font-weight:700;letter-spacing:-.01em}
.rtitle a{color:var(--f-ink);text-decoration:none}
.rtitle a:hover{color:var(--f-accent)}
.rsrc{font-size:13px;color:var(--f-mut);margin-top:-2px}
.rwhy{font-size:13.5px;color:#3f4a5a;line-height:1.45;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rwhy b{color:#334155}
.ractions{display:flex;gap:8px;margin-top:auto;padding-top:4px;flex-wrap:wrap}
.btn-primary,.btn-ghost{font-size:13.5px;font-weight:600;padding:9px 14px;border-radius:9px;text-decoration:none;cursor:pointer;border:1px solid transparent;display:inline-block}
.btn-primary{background:var(--f-accent);color:#fff}
.btn-primary:hover{background:var(--f-accent-d)}
.btn-ghost{background:#fff;color:#334155;border-color:var(--f-line)}
.btn-ghost:hover{border-color:#94a3b8}
/* Deliberately quiet — always available, never competing with "Open resource".
   Given its own full-width line (the three buttons don't fit on one row at card width),
   right-aligned and tight, so it reads as intentional rather than as a wrap accident. */
.rreport{flex:0 0 100%;text-align:right;border:0;background:none;cursor:pointer;font-family:inherit;
  font-size:11.5px;color:#94a3b8;padding:1px 2px 0;border-radius:6px;white-space:nowrap}
.rreport:hover{color:#c2410c;background:#fff7ed}
.rreport.done{color:#047857;background:none;cursor:default}
.linkish{border:0;background:none;padding:0;font:inherit;color:var(--f-accent);cursor:pointer;text-decoration:underline}
.rreport:disabled{cursor:default}
.reportbtn{border:0;background:none;cursor:pointer;font-family:inherit;font-size:13px;
  color:#94a3b8;padding:8px 6px;margin-left:6px}
.reportbtn:hover{color:#c2410c;text-decoration:underline}

/* ---------- Empty state ---------- */
.empty{text-align:center;padding:48px 20px;color:var(--f-mut)}
.empty .big{font-size:40px}
.empty h3{color:var(--f-ink);margin:10px 0 4px;font-size:18px}

/* ---------- Ask result banner ---------- */
.askresult{background:linear-gradient(180deg,#eef4ff,#fff);border:1px solid #c7d7fe;border-radius:14px;padding:18px 20px;margin:20px 0 8px}
.askresult .q{font-size:13px;color:var(--f-mut)}
.askresult h2{margin:2px 0 8px;font-size:20px}
.askresult p{margin:0;font-size:15px;color:#334155;line-height:1.5}

/* ---------- Suggest / subscribe FAB (speed-dial: 3 actions behind one toggle) ---------- */
.fabgroup{position:fixed;right:20px;bottom:20px;z-index:40;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.fabmenu{display:flex;flex-direction:column;gap:8px}
.fabmenu[hidden]{display:none}
.fabitem{background:#fff;color:var(--f-ink);border:1px solid var(--f-line);padding:10px 16px;border-radius:99px;font-size:13.5px;font-weight:600;box-shadow:0 6px 18px rgba(2,8,23,.16);cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:7px;font-family:inherit}
.fabitem:hover{background:#f8fafc;border-color:#cbd5e1}
.suggest-fab{background:var(--f-accent);color:#fff;border:0;cursor:pointer;border-radius:50%;width:56px;height:56px;font-size:24px;display:grid;place-items:center;box-shadow:0 8px 22px rgba(29,78,216,.42);font-family:inherit;flex-shrink:0}
.suggest-fab:hover{background:var(--f-accent-d)}
.modal-back{position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.55);display:grid;place-items:center;padding:18px}
.modal-back[hidden]{display:none}
.modal{background:#fff;border-radius:16px;max-width:460px;width:100%;padding:24px;box-shadow:0 20px 60px rgba(2,8,23,.4)}
.modal h2{margin:0 0 4px;font-size:20px}
.modal .msub{margin:0 0 16px;color:var(--f-mut);font-size:14px}
.modal label{display:block;font-size:13px;font-weight:600;color:#334155;margin:12px 0 4px}
.modal .opt{font-weight:400;color:var(--f-mut)}
.modal input{width:100%;border:1px solid var(--f-line);border-radius:9px;padding:10px 12px;font-size:14px;font-family:inherit}
.modal .err{border-color:#dc2626}
.modal .errmsg{color:#dc2626;font-size:12.5px;margin-top:5px;display:none}
.modal .errmsg.show{display:block}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
.modal-actions .cancel{background:#fff;border:1px solid var(--f-line);color:#334155;padding:10px 16px;border-radius:9px;cursor:pointer;font-size:14px;font-family:inherit}
.modal-actions .submit{background:var(--f-accent);border:0;color:#fff;padding:10px 18px;border-radius:9px;cursor:pointer;font-size:14px;font-weight:600;font-family:inherit}
.modal .success{text-align:center;padding:12px 0}
.modal .success .big{font-size:44px}

/* ---------- Responsive ---------- */
@media(max-width:760px){
  /* Hero: was 552px on a phone — trim type, and let the example chips scroll
     sideways in one row instead of stacking into five. */
  .fhero{padding:26px 16px 20px}
  .fhero-top{min-height:52px;margin-bottom:16px;gap:10px}
  .fherologo{height:52px}
  .fhero h1{font-size:26px;margin-bottom:6px}
  .fhero .sub{font-size:14.5px;margin-bottom:16px}
  .askbox{padding:6px 6px 6px 12px}
  .askbox input{font-size:15px;padding:9px 4px}
  .askbox button{padding:10px 18px}
  .chips{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;gap:7px;margin-top:14px;
    padding:2px 16px 4px;margin-left:-16px;margin-right:-16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .chips::-webkit-scrollbar{display:none}
  .chips form{flex:0 0 auto}
  .chip{white-space:nowrap}
  /* teaching-area chips scroll sideways too, so the hero stays short on a phone.
     Kept tight: this row costs ~70px and the hero is already the biggest thing above the fold. */
  .teachrow{margin-top:12px;padding-top:11px}
  .teachlbl{margin-bottom:6px;font-size:11px}
  .dchips{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;gap:7px;
    padding:2px 16px 4px;margin-left:-16px;margin-right:-16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .dchips::-webkit-scrollbar{display:none}
  .dchip{flex:0 0 auto;white-space:nowrap}
  .dnote{font-size:13.5px;margin-top:12px}

  /* Sticky bar collapses to ONE row: search + Filters button.
     backdrop-filter must go here: a filtered ancestor becomes the containing block
     for position:fixed children, which would trap the bottom sheet inside the bar. */
  .toolbar{margin:0 -20px 8px;padding:9px 16px;backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--f-bg)}
  .filtersbtn{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;border:1px solid var(--f-line);
    background:#fff;color:#334155;font-size:14px;font-weight:600;padding:10px 15px;border-radius:10px;
    cursor:pointer;font-family:inherit;min-height:44px}
  .filtersbtn[aria-expanded="true"]{background:var(--f-accent);border-color:var(--f-accent);color:#fff}
  .fbadge{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:99px;
    background:var(--f-accent);color:#fff;font-size:11.5px;font-weight:700}
  .filtersbtn[aria-expanded="true"] .fbadge{background:#fff;color:var(--f-accent)}
  .search input{min-height:44px}

  /* edge-to-edge scroll strip, same bleed trick as .chips/.dchips above: toolbar's own
     padding is 16px here, so a matching negative margin lets the tab strip run full-width */
  .tabsrow{margin:9px -16px 0;padding:0 16px 1px;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .rtab{padding:9px 12px 10px;font-size:13px;min-height:40px}

  /* Filter groups become a bottom sheet */
  .tbpanel{position:fixed;left:0;right:0;bottom:0;z-index:80;display:none;margin:0;
    background:#fff;border-radius:18px 18px 0 0;padding:6px 18px calc(18px + env(safe-area-inset-bottom));
    max-height:80vh;overflow-y:auto;box-shadow:0 -8px 40px rgba(2,8,23,.3)}
  .tbpanel.open{display:block;animation:sheetup .2s ease-out}
  @keyframes sheetup{from{transform:translateY(100%)}to{transform:translateY(0)}}
  @media(prefers-reduced-motion:reduce){.tbpanel.open{animation:none}.fabgroup{transition:none}}
  /* :not([hidden]) matters — a bare display:block would override the hidden attribute
     and leave the dimming backdrop permanently over the page */
  .sheet-back:not([hidden]){display:block;position:fixed;inset:0;z-index:75;background:rgba(15,23,42,.45)}
  .sheet-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#fff;
    padding:12px 0 8px;border-bottom:1px solid var(--f-line);margin-bottom:12px}
  .sheet-head h2{margin:0;font-size:17px}
  .sheet-x{border:0;background:#f1f5f9;color:#334155;width:34px;height:34px;border-radius:50%;font-size:15px;cursor:pointer}
  .tbpanel .fgroup{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
  .tbpanel .flabel{width:100%;margin-bottom:2px}
  .tbpanel .fchip{padding:9px 15px;font-size:14px;min-height:40px}
  .tbfoot{border-top:1px solid var(--f-line);padding-top:14px;gap:12px}
  .tbfoot .tbtn{min-height:42px;padding:10px 14px}
  .sortwrap select{min-height:42px}
  .sheet-done{display:block;width:100%;margin-top:14px;border:0;background:var(--f-accent);color:#fff;
    font-size:15.5px;font-weight:600;padding:14px;border-radius:11px;cursor:pointer;font-family:inherit}
  .activebar{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;padding-bottom:2px}
  .activebar::-webkit-scrollbar{display:none}
  .atag{flex:0 0 auto}

  /* FAB was covering card buttons — pull in from the edge and get out of the way on scroll */
  .fabgroup{right:14px;bottom:calc(14px + env(safe-area-inset-bottom));transition:transform .2s ease,opacity .2s ease}
  .suggest-fab{width:54px;height:54px;font-size:22px}
  .fabgroup.hide{transform:translateY(90px);opacity:0;pointer-events:none}
  body.sheet-open{overflow:hidden}
  body.sheet-open .fabgroup{opacity:0;pointer-events:none}
  /* let the last card scroll clear of the FAB */
  main{padding-bottom:96px}
}

/* ---------- Episodes picked out from a show we also recommend ---------- */
/* Sits inside the show's card so the picks are visibly attached to the show, rather than
   floating separately in "Individual episodes & picks" with nothing connecting them. */
.epilist{margin-top:10px;padding-top:9px;border-top:1px dashed var(--f-line);display:flex;flex-direction:column;gap:3px}
.epihead{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--f-mut)}
.epi{font-size:13px;color:var(--f-accent);text-decoration:none;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.epi:hover{text-decoration:underline}
.epi::before{content:"▸ ";color:var(--f-mut)}
.epimore{font-size:12px;color:var(--f-mut)}
.faculty-account{position:relative;z-index:40}
.faculty-account summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:5px 9px 5px 6px;border:1px solid rgba(255,255,255,.22);border-radius:8px;background:rgba(255,255,255,.08);cursor:pointer;list-style:none;transition:background .18s ease,border-color .18s ease}
.faculty-account summary::-webkit-details-marker{display:none}
.faculty-account summary:hover,.faculty-account[open] summary{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.4)}
.faculty-account summary:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}
.account-avatar{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:6px;background:#fff;color:#1e3a8a;font-size:13px;font-weight:800}
.account-identity{display:flex;flex-direction:column;min-width:0;color:#cbd6e6;font-size:11px;line-height:1.2}
.account-identity strong{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff;font-size:13.5px;font-weight:600}
.account-chevron{color:#bfdbfe;font-size:15px;transition:transform .18s ease}
.faculty-account[open] .account-chevron{transform:rotate(180deg)}
.account-menu{position:absolute;top:calc(100% + 8px);right:0;width:230px;padding:6px;background:#fff;border:1px solid #dbe3ee;border-radius:8px;box-shadow:0 14px 35px rgba(2,8,23,.28);color:#334155}
.account-email{padding:9px 10px 10px;border-bottom:1px solid #e5e9f0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:12px}
.account-menu a,.account-menu button{display:grid;grid-template-columns:20px 1fr auto;align-items:center;gap:8px;width:100%;padding:10px;border:0;border-radius:5px;background:transparent;color:#334155;text-align:left;text-decoration:none;font-family:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.account-menu a:hover,.account-menu button:hover{background:#f1f5f9;color:#1e3a8a}
.account-menu a:focus-visible,.account-menu button:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}
.account-count{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:5px;background:#e8eef9;color:#1e3a8a;font-size:11.5px;font-variant-numeric:tabular-nums}
.account-status{color:#64748b;font-size:11.5px;font-weight:700}
.account-status.on{color:#047857}
.subscription-state{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid #bbf7d0;border-radius:8px;background:#f0fdf4;color:#166534}
.subscription-state>span:first-child{display:grid;place-items:center;width:30px;height:30px;border-radius:6px;background:#dcfce7;font-weight:800}
.subscription-state strong,.subscription-state small{display:block}.subscription-state small{margin-top:1px;color:#4b5563;font-size:12px}
.modal-actions .unsubscribe{border:1px solid #fecaca;background:#fff;color:#b91c1c;padding:10px 16px;border-radius:9px;cursor:pointer;font-size:14px;font-weight:600;font-family:inherit}
.modal-actions .unsubscribe:hover{background:#fef2f2}
.modal input[readonly]{background:#f8fafc;color:#475569}
.faculty-signin{display:flex;align-items:center;gap:10px;color:#cbd6e6;font-size:13px}
.faculty-signin a{border:1px solid rgba(255,255,255,.35);border-radius:7px;padding:9px 12px;color:#fff;font-weight:700;text-decoration:none}
.faculty-signin a:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.6)}
.faculty-signin a:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}
@media(max-width:640px){
  .account-identity>span{display:none}
  .account-identity strong{max-width:100px;font-size:12.5px}
  .faculty-signin>span{display:none}
}
@media(max-width:360px){
  .account-identity{display:none}
  .faculty-account summary{gap:5px;padding-right:7px}
  .account-menu{right:0;width:min(230px,calc(100vw - 32px))}
}
