/* AcadPills homepage refresh. Loaded only on the front page. */
:root {
  --ap5-blue: #2563eb;
  --ap5-blue-dark: #1d4ed8;
  --ap5-navy: #10183f;
  --ap5-ink: #172033;
  --ap5-muted: #627087;
  --ap5-border: #e1e7ef;
  --ap5-surface: #ffffff;
  --ap5-canvas: #f6f8fc;
  --ap5-mint: #e4f7f1;
  --ap5-mint-ink: #15745e;
  --ap5-shadow: 0 8px 24px rgba(20, 35, 70, .07);
}

body.front-page { background: var(--ap5-canvas); color: var(--ap5-ink); }
body.front-page .topbar { display: none; }
body.front-page .ap-header { background: rgba(255,255,255,.96); border-color: var(--ap5-border); }
body.front-page .logo { color: var(--ap5-navy); }
body.front-page .logo-mark { background: var(--ap5-blue); box-shadow: 0 5px 14px rgba(37,99,235,.2); }
body.front-page .logo span { color: var(--ap5-blue); }
body.front-page .hdr-search input { background: #f8fafc; border-color: var(--ap5-border); }
body.front-page .btn-tg { background: var(--ap5-blue); box-shadow: none; }
body.front-page .ap-nav { background: #fff; border-color: var(--ap5-border); }
body.front-page .nav-list li a:hover,
body.front-page .nav-list li a.active { color: var(--ap5-blue); }
body.front-page .nav-list li a:hover .ap-i,
body.front-page .nav-list li a.active .ap-i { color: var(--ap5-blue); }
body.front-page .nav-list li a::after { background: var(--ap5-blue); }

.ap5-home { color: var(--ap5-ink); }
.ap5-container { width: min(100% - 40px, 1240px); margin-inline: auto; }
.ap5-home a { text-decoration: none; }
.ap5-home a:focus-visible,
.ap5-home button:focus-visible,
.ap5-bottom-nav a:focus-visible,
.ap5-bottom-nav button:focus-visible { outline: 3px solid #80b7ff; outline-offset: 3px; }
.ap5-update-bar { background: #eef5ff; border-bottom: 1px solid #d9e7ff; }
.ap5-update-inner { min-height: 44px; display: flex; align-items: center; gap: 12px; font-size: .86rem; }
.ap5-update-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ap5-blue-dark); font-weight: 750; white-space: nowrap; }
.ap5-update-inner > a { color: var(--ap5-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap5-update-inner time { color: var(--ap5-muted); margin-left: auto; white-space: nowrap; font-size: .78rem; }

.ap5-hero { position: relative; overflow: hidden; padding: clamp(52px, 7vw, 84px) 0 48px; background: radial-gradient(ellipse at 10% 50%, #e7faf5 0, transparent 37%), radial-gradient(ellipse at 92% 25%, #e9efff 0, transparent 33%), linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
.ap5-hero::before,
.ap5-hero::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.ap5-hero::before { width: 240px; height: 240px; left: -155px; top: 8%; border: 1px solid rgba(37,99,235,.08); box-shadow: 0 0 0 28px rgba(37,99,235,.025), 0 0 0 58px rgba(37,99,235,.02); }
.ap5-hero::after { width: 300px; height: 300px; right: -210px; bottom: -42%; border: 1px solid rgba(16,116,94,.09); box-shadow: 0 0 0 30px rgba(16,116,94,.025), 0 0 0 62px rgba(16,116,94,.02); }
.ap5-hero-inner { position: relative; z-index: 1; text-align: center; }
.ap5-eyebrow,
.ap5-kicker { margin: 0; color: var(--ap5-mint-ink); font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.ap5-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #b9e8d9; border-radius: 999px; background: var(--ap5-mint); }
.ap5-hero h1 { max-width: 850px; margin: 18px auto 12px; color: var(--ap5-navy); font-size: clamp(2.2rem, 5vw, 3.65rem); line-height: 1.08; letter-spacing: -.03em; }
.ap5-hero h1 span { color: var(--ap5-blue); word-spacing: .06em; }
.ap5-hero-copy { max-width: 700px; margin: 0 auto 24px; color: var(--ap5-muted); font-size: clamp(1rem, 1.7vw, 1.15rem); line-height: 1.6; }
.ap5-search { display: flex; align-items: center; gap: 10px; max-width: 760px; min-height: 58px; margin: 0 auto; padding: 6px 7px 6px 18px; border: 1px solid #d5dce8; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(24,42,80,.1); }
.ap5-search-icon { flex: 0 0 auto; color: #7c8798; }
.ap5-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ap5-ink); font: inherit; font-size: 1rem; }
.ap5-search input::placeholder { color: #667085; opacity: 1; }
.ap5-search:focus-within { border-color: var(--ap5-blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12), 0 10px 30px rgba(24,42,80,.08); }
.ap5-search button { flex: 0 0 auto; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 21px; border-radius: 10px; background: var(--ap5-blue); color: #fff; font: inherit; font-weight: 750; }
.ap5-search button:hover { background: var(--ap5-blue-dark); }
.ap5-search-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.ap5-search-chip { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid #dfe5ef; border-radius: 999px; background: rgba(255,255,255,.78); color: #33415d; font: inherit; font-size: .83rem; cursor: pointer; }
.ap5-search-chip:hover { border-color: #9ab9f5; color: var(--ap5-blue-dark); background: #fff; }
.ap5-reassurance { display: inline-flex; align-items: center; gap: 7px; margin: 16px 0 0; color: #526174; font-size: .84rem; }
.ap5-reassurance .ap-i { color: #16a47b; }

.ap5-paths { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 12px; padding-top: 8px; }
.ap5-path-card { min-height: 112px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--ap5-border); border-radius: 16px; background: var(--ap5-surface); box-shadow: var(--ap5-shadow); color: var(--ap5-ink); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ap5-paths > .ap5-path-card:only-child { grid-column: 1 / -1; }
.ap5-path-card:hover { transform: translateY(-2px); border-color: #b7ccf5; box-shadow: 0 12px 28px rgba(20,35,70,.1); }
.ap5-path-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 14px; background: #edf4ff; color: var(--ap5-blue); }
.ap5-path-school .ap5-path-icon { background: var(--ap5-mint); color: var(--ap5-mint-ink); }
.ap5-path-text { display: grid; gap: 4px; min-width: 0; }
.ap5-path-text strong { color: var(--ap5-navy); font-size: 1rem; line-height: 1.3; }
.ap5-path-text span { color: var(--ap5-muted); font-size: .82rem; line-height: 1.4; }
.ap5-path-arrow { margin-left: auto; flex: 0 0 auto; color: #8090a8; }

.ap5-section { padding-top: 54px; }
.ap5-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.ap5-section-heading h2 { margin: 5px 0 0; color: var(--ap5-navy); font-size: clamp(1.45rem, 2.5vw, 1.9rem); line-height: 1.2; }
.ap5-section-heading > div > p:last-child { margin: 6px 0 0; color: var(--ap5-muted); font-size: .9rem; }
.ap5-text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ap5-blue); font-size: .88rem; font-weight: 750; white-space: nowrap; }
.ap5-text-link:hover { color: var(--ap5-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.ap5-class-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.ap5-class-tab { min-width: 92px; min-height: 42px; padding: 0 17px; border: 1px solid var(--ap5-border); border-radius: 999px; background: #fff; color: #3f4c62; font: inherit; font-size: .88rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.ap5-class-tab:hover { border-color: #9ab9f5; }
.ap5-class-tab.is-active { border-color: var(--ap5-blue); background: var(--ap5-blue); color: #fff; }
.ap5-subject-panel { padding: 4px 0; }
.ap5-subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ap5-subject-card { min-height: 88px; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--ap5-border); border-radius: 14px; background: #fff; color: var(--ap5-ink); box-shadow: 0 3px 12px rgba(20,35,70,.035); transition: border-color .18s ease, transform .18s ease; }
.ap5-subject-card:hover { transform: translateY(-1px); border-color: #a9c4f7; }
.ap5-subject-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; background: #eef5ff; color: var(--ap5-blue); }
.ap5-subject-copy { display: grid; gap: 4px; min-width: 0; }
.ap5-subject-copy strong { color: var(--ap5-navy); font-size: .93rem; line-height: 1.3; }
.ap5-subject-copy span { color: var(--ap5-muted); font-size: .78rem; }
.ap5-subject-arrow { margin-left: auto; color: #8793a6; flex: 0 0 auto; }

.ap5-content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: start; gap: 18px; padding-top: 48px; }
.ap5-content-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.ap5-panel { min-width: 0; padding: 22px; border: 1px solid var(--ap5-border); border-radius: 18px; background: #fff; box-shadow: 0 4px 18px rgba(20,35,70,.045); }
.ap5-section-heading-compact { align-items: center; margin-bottom: 14px; }
.ap5-section-heading-compact h2 { font-size: 1.32rem; }
.ap5-resource-list { display: grid; }
.ap5-resource-row { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 14px 2px; border-top: 1px solid #edf0f5; }
.ap5-resource-row:first-child { border-top: 0; }
.ap5-resource-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 12px; background: #eef5ff; color: var(--ap5-blue); }
.ap5-resource-copy { flex: 1; min-width: 0; }
.ap5-resource-category { margin: 0 0 3px; color: var(--ap5-muted); font-size: .75rem; font-weight: 650; }
.ap5-resource-copy h3,
.ap5-update-card h3,
.ap5-quiz-card h3 { margin: 0; color: var(--ap5-navy); font-size: .94rem; line-height: 1.4; }
.ap5-resource-copy h3 a,
.ap5-update-card h3 a,
.ap5-quiz-card h3 a { color: inherit; }
.ap5-resource-copy h3 a:hover,
.ap5-update-card h3 a:hover,
.ap5-quiz-card h3 a:hover { color: var(--ap5-blue); }
.ap5-open-link { display: inline-flex; align-items: center; gap: 5px; color: var(--ap5-blue); font-size: .8rem; font-weight: 750; white-space: nowrap; }
.ap5-update-list { display: grid; gap: 10px; }
.ap5-update-card { padding: 15px; border: 1px solid #e8edf5; border-radius: 13px; background: #fbfcff; }
.ap5-update-date { margin: 0 0 7px; color: var(--ap5-blue-dark); font-size: .75rem; font-weight: 750; }
.ap5-update-card > p:not(.ap5-update-date) { margin: 7px 0 10px; color: var(--ap5-muted); font-size: .82rem; line-height: 1.5; }
.ap5-empty { padding: 18px 0; color: var(--ap5-muted); font-size: .9rem; }
.ap5-quiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ap5-quiz-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--ap5-border); border-radius: 14px; background: #fff; }
.ap5-quiz-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 12px; background: #f0f4ff; color: var(--ap5-blue); }
.ap5-quiz-card > div { min-width: 0; flex: 1; }
.ap5-quiz-card h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ap5-quiz-action { display: inline-flex; align-items: center; gap: 4px; color: var(--ap5-blue); font-size: .8rem; font-weight: 750; white-space: nowrap; }
.ap5-quiz-card-interactive { align-items: flex-start; }
.ap5-quiz-card-interactive .ap5-resource-category { margin-bottom: 4px; }
.ap5-quiz-card-interactive .ap5-quiz-action { margin-left: auto; padding-top: 3px; }
.ap5-latest-articles { padding-bottom: 54px; }
.ap5-article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ap5-article-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--ap5-border); border-radius: 17px; background: #fff; box-shadow: 0 4px 18px rgba(20,35,70,.045); }
.ap5-article-media { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg,#eff7ff,#e8f6f2); color: var(--ap5-blue); }
.ap5-article-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ap5-article-card:hover .ap5-article-media img { transform: scale(1.025); }
.ap5-article-placeholder { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: #fff; box-shadow: var(--ap5-shadow); }
.ap5-article-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px; }
.ap5-article-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 9px; color: var(--ap5-muted); font-size: .75rem; }
.ap5-article-meta a { color: var(--ap5-mint-ink); font-weight: 750; }
.ap5-article-body h3 { margin: 0; color: var(--ap5-navy); font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; font-weight: 700; line-height: 1.35; letter-spacing: -.015em; }
.ap5-article-body h3 a { color: inherit; }
.ap5-article-body h3 a:hover { color: var(--ap5-blue); }
.ap5-article-excerpt { display: -webkit-box; margin: 9px 0 16px; overflow: hidden; color: var(--ap5-muted); font-size: .86rem; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.ap5-article-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--ap5-blue); font-size: .83rem; font-weight: 750; }
.ap5-article-link:hover { color: var(--ap5-blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.ap5-mobile-nav { display: none; }

.mobile-nav-inner { box-shadow: -16px 0 40px rgba(12,22,48,.12); }

@media (max-width: 1024px) {
  .ap5-subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap5-content-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); }
  .ap5-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .ap5-container { width: min(100% - 32px, 1240px); }
  body.front-page .ap-nav { display: none; }
  body.front-page .hdr-inner { min-height: 66px; }
  body.front-page .hdr-search { display: none; }
  body.front-page .hdr-cta .btn-tg { display: none; }
  body.front-page .mobile-toggle { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
  .ap5-hero { padding: 42px 0 36px; }
  .ap5-hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .ap5-hero-copy { max-width: 540px; font-size: .98rem; }
  .ap5-search { min-height: 56px; border-radius: 13px; }
  .ap5-search button { min-height: 44px; padding-inline: 14px; }
  .ap5-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding-top: 4px; }
  .ap5-path-card { min-height: 100px; gap: 10px; padding: 13px; border-radius: 14px; }
  .ap5-path-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .ap5-path-icon .ap-i { width: 24px !important; height: 24px !important; }
  .ap5-path-text strong { font-size: .9rem; }
  .ap5-path-text span { font-size: .75rem; }
  .ap5-path-arrow { display: none; }
  .ap5-section { padding-top: 38px; }
  .ap5-section-heading { align-items: start; }
  .ap5-section-heading h2 { font-size: 1.4rem; }
  .ap5-section-heading > div > p:last-child { font-size: .82rem; }
  .ap5-class-tab { min-width: 76px; min-height: 44px; padding-inline: 13px; }
  .ap5-search-chip { min-height: 44px; }
  .ap5-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ap5-subject-card { min-height: 78px; gap: 9px; padding: 11px; }
  .ap5-subject-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .ap5-subject-icon .ap-i { width: 21px !important; height: 21px !important; }
  .ap5-subject-copy strong { font-size: .85rem; }
  .ap5-subject-copy span { font-size: .72rem; }
  .ap5-content-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 34px; }
  .ap5-article-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ap5-article-card { display: grid; grid-template-columns: minmax(108px, .36fr) minmax(0, 1fr); }
  .ap5-article-media { min-height: 100%; aspect-ratio: auto; }
  .ap5-article-body { padding: 14px; }
  .ap5-article-body h3 { font-size: 1.05rem; }
  .ap5-article-excerpt { margin: 6px 0 10px; font-size: .8rem; -webkit-line-clamp: 2; }
  .ap5-panel { padding: 17px; border-radius: 15px; }
  .ap5-section-heading-compact h2 { font-size: 1.23rem; }
  .ap5-resource-row { gap: 10px; padding: 12px 0; }
  .ap5-resource-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .ap5-resource-copy h3 { font-size: .86rem; }
  .ap5-open-link span { display: none; }
  .ap5-quiz-grid { grid-template-columns: minmax(0, 1fr); }
  .ap5-mobile-nav { position: fixed; z-index: 500; right: 0; bottom: 0; left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ap5-border); background: rgba(255,255,255,.97); box-shadow: 0 -6px 22px rgba(20,35,70,.08); }
  .ap5-mobile-nav a,
  .ap5-mobile-nav button { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #49566b; font: inherit; font-size: .68rem; font-weight: 650; }
  .ap5-mobile-nav .ap-i { width: 20px; height: 20px; }
  .ap5-mobile-nav a[aria-current="page"] { color: var(--ap5-blue); }
  body.front-page { padding-bottom: 72px; }
}
@media (max-width: 480px) {
  .ap5-container { width: min(100% - 24px, 1240px); }
  .ap5-update-inner { min-height: 40px; gap: 8px; font-size: .75rem; }
  .ap5-update-label { font-size: .72rem; }
  .ap5-update-inner time { display: none; }
  .ap5-hero { padding-top: 34px; }
  .ap5-hero h1 { font-size: 2rem; }
  .ap5-hero-copy { margin-bottom: 19px; }
  .ap5-search { flex-wrap: wrap; padding: 8px; gap: 8px; }
  .ap5-search-icon { margin-left: 5px; }
  .ap5-search input { width: calc(100% - 42px); flex: 1; min-height: 40px; font-size: .9rem; }
  .ap5-search button { width: 100%; }
  .ap5-search-suggestions { justify-content: flex-start; }
  .ap5-search-chip { min-height: 44px; font-size: .76rem; }
  .ap5-reassurance { font-size: .77rem; }
  .ap5-paths { gap: 8px; }
  .ap5-path-card { min-height: 96px; flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px; }
  .ap5-paths > .ap5-path-card:only-child { min-height: 76px; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  .ap5-paths > .ap5-path-card:only-child .ap5-path-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .ap5-paths > .ap5-path-card:only-child .ap5-path-text strong { font-size: .9rem; }
  .ap5-paths > .ap5-path-card:only-child .ap5-path-text span { font-size: .75rem; }
  .ap5-path-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
  .ap5-path-icon .ap-i { width: 21px !important; height: 21px !important; }
  .ap5-path-text { gap: 2px; }
  .ap5-path-text strong { font-size: .82rem; }
  .ap5-path-text span { font-size: .7rem; }
  .ap5-section-heading { gap: 9px; }
  .ap5-section-heading h2 { font-size: 1.25rem; }
  .ap5-section-heading .ap5-text-link { margin-top: 5px; font-size: .77rem; }
  .ap5-subject-grid { gap: 7px; }
  .ap5-subject-card { padding: 9px; }
  .ap5-subject-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .ap5-subject-copy strong { font-size: .78rem; }
  .ap5-subject-copy span { font-size: .68rem; }
  .ap5-subject-arrow { display: none; }
  .ap5-resource-category { font-size: .68rem; }
  .ap5-resource-copy h3 { font-size: .82rem; }
  .ap5-panel { padding: 14px; }
  .ap5-article-card { grid-template-columns: 94px minmax(0, 1fr); border-radius: 13px; }
  .ap5-article-placeholder { width: 42px; height: 42px; border-radius: 14px; }
  .ap5-article-placeholder .ap-i { width: 24px !important; height: 24px !important; }
  .ap5-article-body { padding: 11px; }
  .ap5-article-meta { gap: 4px; margin-bottom: 5px; font-size: .66rem; }
  .ap5-article-body h3 { font-size: .94rem; line-height: 1.3; }
  .ap5-article-excerpt { display: none; }
  .ap5-article-link { margin-top: 8px; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ap5-path-card,
  .ap5-subject-card,
  .ap5-article-media img { transition: none; }
}
