/* Finance PSU Guide: small design system on top of Bootstrap 5.3. Navy + gold palette, Poppins headings and the wave +
   gold hairline signature all come from the client's approved Homepage Banner (D42-1, D52). Poppins is self-hosted. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
    --psu-navy: #0b1f3a;
    --psu-navy-2: #14305a;
    --psu-blue: #1a3f86;
    --psu-blue-hover: #133070;
    --psu-blue-soft: #e9eef8;
    --psu-gold: #f2b01e;
    --psu-gold-hover: #e09f0c;
    --psu-gold-ink: #8a5a00;     /* gold for text on white: 5.9:1 */
    --psu-gold-soft: #fdf3dc;
    --psu-surface: #faf8f3;      /* warm off-white */
    --psu-border: #e2e7ef;
    --psu-text: #172033;
    --psu-muted: #566174;
    --psu-wave-blue: #1d5ea3;    /* the banner's wave */
    --psu-wave-soft: #cfe0f1;
    --psu-display: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --psu-radius: .875rem;
    --psu-shadow: 0 1px 2px rgba(11, 31, 58, .05), 0 6px 20px -8px rgba(11, 31, 58, .12);
    --psu-shadow-hover: 0 2px 4px rgba(11, 31, 58, .06), 0 18px 36px -14px rgba(11, 31, 58, .24);
    --psu-ease: cubic-bezier(.2, .7, .2, 1);

    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --bs-body-color: var(--psu-text);
    --bs-body-bg: #fff;
    --bs-secondary-color: var(--psu-muted);
    --bs-primary: var(--psu-blue);
    --bs-primary-rgb: 26, 63, 134;
    --bs-link-color: var(--psu-blue);
    --bs-link-color-rgb: 26, 63, 134;
    --bs-link-hover-color: var(--psu-blue-hover);
    --bs-link-hover-color-rgb: 19, 48, 112;
    --bs-border-color: var(--psu-border);
    --bs-border-radius: .5rem;
    --bs-focus-ring-color: rgba(26, 63, 134, .35);
}

body { background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--psu-navy); font-family: var(--psu-display); font-weight: 600; letter-spacing: -.01em; }
.text-body-secondary { color: var(--psu-muted) !important; }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid rgba(26, 63, 134, .55); outline-offset: 2px; }

/* ---------- Buttons: one height, clear hierarchy ---------- */
.btn { --bs-btn-padding-y: .55rem; --bs-btn-padding-x: 1.1rem; --bs-btn-font-weight: 600; --bs-btn-border-radius: .5rem; }
.btn { font-family: var(--psu-display); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .2s var(--psu-ease), transform .2s var(--psu-ease); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled, [aria-busy="true"] .btn { opacity: .62; cursor: progress; }
.btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .8rem; --bs-btn-font-size: .875rem; }
.btn-lg { --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.5rem; --bs-btn-font-size: 1.05rem; }
.btn-primary {
    --bs-btn-bg: var(--psu-blue); --bs-btn-border-color: var(--psu-blue);
    --bs-btn-hover-bg: var(--psu-blue-hover); --bs-btn-hover-border-color: var(--psu-blue-hover);
    --bs-btn-active-bg: #0e2656; --bs-btn-active-border-color: #0e2656;
    --bs-btn-disabled-bg: var(--psu-blue); --bs-btn-disabled-border-color: var(--psu-blue);
    --bs-btn-focus-shadow-rgb: 26, 63, 134;
}
.btn-outline-primary {
    --bs-btn-color: var(--psu-blue); --bs-btn-border-color: #b9c9f3;
    --bs-btn-hover-color: var(--psu-blue-hover); --bs-btn-hover-bg: var(--psu-blue-soft); --bs-btn-hover-border-color: var(--psu-blue);
    --bs-btn-active-color: var(--psu-blue-hover); --bs-btn-active-bg: #dbe6ff; --bs-btn-active-border-color: var(--psu-blue);
    --bs-btn-focus-shadow-rgb: 26, 63, 134;
}
.btn-outline-secondary {
    --bs-btn-color: var(--psu-text); --bs-btn-border-color: #cfd6e1;
    --bs-btn-hover-color: var(--psu-navy); --bs-btn-hover-bg: var(--psu-surface); --bs-btn-hover-border-color: #aeb8c8;
    --bs-btn-active-color: var(--psu-navy); --bs-btn-active-bg: #e9edf3; --bs-btn-active-border-color: #aeb8c8;
}
.btn-gold {
    --bs-btn-color: var(--psu-navy); --bs-btn-bg: var(--psu-gold); --bs-btn-border-color: var(--psu-gold);
    --bs-btn-hover-color: var(--psu-navy); --bs-btn-hover-bg: var(--psu-gold-hover); --bs-btn-hover-border-color: var(--psu-gold-hover);
    --bs-btn-active-color: var(--psu-navy); --bs-btn-active-bg: #c98c06; --bs-btn-active-border-color: #c98c06;
    --bs-btn-focus-shadow-rgb: 242, 176, 30;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 8px 18px -10px rgba(160, 109, 18, .8);
}
.btn-gold:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 12px 22px -10px rgba(160, 109, 18, .9); }
.btn-light-on-dark {
    --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .45);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .1); --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: rgba(255, 255, 255, .16); --bs-btn-active-border-color: #fff;
}
.btn-on-dark {
    --bs-btn-color: var(--psu-navy); --bs-btn-bg: #fff; --bs-btn-border-color: #fff;
    --bs-btn-hover-color: var(--psu-navy); --bs-btn-hover-bg: #e8efff; --bs-btn-hover-border-color: #e8efff;
    --bs-btn-active-color: var(--psu-navy); --bs-btn-active-bg: #d6e2ff; --bs-btn-active-border-color: #d6e2ff;
}

/* Bootstrap components compiled with the stock blue */
.form-check-input:checked { background-color: var(--psu-blue); border-color: var(--psu-blue); }
.form-check-input:focus, .form-control:focus, .form-select:focus { border-color: #6f8cc7; box-shadow: 0 0 0 .2rem rgba(26, 63, 134, .2); }
.progress { --bs-progress-bar-bg: var(--psu-blue); --bs-progress-bg: #e7ecf3; --bs-progress-height: .5rem; }
.badge-subject {
    display: inline-block; font-size: .75rem; font-weight: 600; color: var(--psu-navy-2);
    background: var(--psu-blue-soft); border-radius: 999px; padding: .25rem .6rem; margin: 0 .25rem .35rem 0;
}

/* ---------- Navigation ---------- */
/* The gold rule fades to the right, like the banner's gold curve, in place of a flat stripe. */
.site-nav { background: #fff; box-shadow: 0 1px 0 var(--psu-border), 0 10px 24px -20px rgba(11, 31, 58, .35); --bs-navbar-padding-y: .6rem; }
.site-nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--psu-gold), #c79a3f 45%, rgba(199, 154, 63, 0)); pointer-events: none; }
.site-nav .navbar-brand { color: var(--psu-navy); font-family: var(--psu-display); font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.brand-logo { flex: none; width: 2.6rem; height: auto; }
.brand-logo-gold { fill: #c79a3f; }
.brand-logo-navy { fill: #0f2d5c; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-size: 1.1rem; }
.brand-tagline { font-family: var(--bs-body-font-family); font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--psu-gold-ink); margin-top: .15rem; }
.site-nav .nav-link { color: #3b4658; font-weight: 500; padding-inline: .7rem !important; border-radius: .5rem; transition: color .15s ease, background-color .15s ease; }
.site-nav .nav-link:hover { color: var(--psu-navy); background: var(--psu-surface); }
.site-nav .nav-link.active { color: var(--psu-navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--psu-gold); border-radius: .5rem .5rem 0 0; }
.site-nav .dropdown-menu { border-color: var(--psu-border); box-shadow: var(--psu-shadow); border-radius: .6rem; }
@media (max-width: 1199.98px) {
    .site-nav .navbar-collapse { border-top: 1px solid var(--psu-border); margin-top: .6rem; padding-top: .5rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
    .site-nav .nav-link { display: flex; align-items: center; min-height: 2.75rem; }
    .site-nav .nav-link.active { background: var(--psu-gold-soft); box-shadow: none; border-radius: .5rem; }   /* D71: tint + weight, no side stripe */
    .site-nav .nav-actions { border-top: 1px solid var(--psu-border); margin-top: .35rem; padding-top: .35rem; }
    .site-nav .nav-actions .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 2.75rem; margin: .35rem 0 .25rem; }
}

/* ---------- Page structure ---------- */
.section { padding-block: 3.5rem; }
.section-alt { background: var(--psu-surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.section-head p { margin: .25rem 0 0; color: var(--psu-muted); }
.section-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.page-header { position: relative; overflow: hidden; background: var(--psu-surface); padding-block: 2.25rem 2rem; }
.page-header > * { position: relative; }
/* The banner's top-right wave. Wide screens only, where the heading's 46rem measure can't reach it. */
@media (min-width: 992px) {
    .page-header::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 17rem; background: right top / auto 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 272 130' preserveAspectRatio='xMaxYMin slice'%3E%3Cpath fill='%23cfe0f1' d='M52 0c26 30 72 26 112 34 44 9 76 36 108 74V0z'/%3E%3Cpath fill='%230f2d5c' d='M108 0c20 20 54 22 86 28 34 7 58 26 78 52V0z'/%3E%3Cpath fill='none' stroke='%23c79a3f' stroke-width='1.5' d='M70 22c46 18 100-2 202-22'/%3E%3C/svg%3E"); }
}
.page-header h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); margin-bottom: .35rem; }
.page-header .lead-sm { color: var(--psu-muted); margin: 0; max-width: 46rem; }
.page-header .breadcrumb { margin-bottom: .6rem; font-size: .875rem; }
.page-body { padding-block: 2.25rem 3.5rem; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--psu-navy) 0%, var(--psu-navy-2) 100%); color: #fff; padding-block: 3.5rem 3rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.2vw, 2.85rem); font-weight: 700; line-height: 1.15; max-width: 48rem; }
.hero .hero-lead { color: #cdd8ea; font-size: 1.125rem; max-width: 38rem; margin-block: 1rem 1.75rem; }
.hero .hero-note { color: #b8c6dc; font-size: .925rem; margin-top: 1rem; }
.hero .hero-note a { color: #fff; font-weight: 600; }
.hero-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fb8e6; margin-bottom: .75rem; }
.hero-points { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: .75rem 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 1.5rem; }
.hero-points li { color: #dbe4f2; font-size: .95rem; display: flex; gap: .6rem; align-items: baseline; }
.hero-points li::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #6f95ea; transform: translateY(-.1rem); }

/* ---------- Card grid & cards ---------- */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(max(17.5rem, calc((100% - 3rem) / 3)), 1fr)); }
.card-grid > .col { width: auto; max-width: none; padding: 0; }
.card { --bs-card-border-color: var(--psu-border); --bs-card-border-radius: var(--psu-radius); box-shadow: var(--psu-shadow); transition: box-shadow .25s var(--psu-ease), transform .25s var(--psu-ease), border-color .25s ease; }
.card-grid .card:hover, .product-card:hover { box-shadow: var(--psu-shadow-hover); transform: translateY(-3px); border-color: #d9c48f; }
.card-grid .card-body { padding: 1.35rem 1.35rem 1rem; }
.card-grid .card-footer { padding: 0 1.35rem 1.35rem; background: transparent; border: 0; }
.card-title a { color: var(--psu-navy); text-decoration: none; }
.card-title a:hover { color: var(--psu-blue); }
.card-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--psu-gold-ink); margin-bottom: .5rem; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; padding: 0; margin: 0; font-size: .875rem; color: var(--psu-muted); }
.card-price { min-height: 3.2rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--psu-border); margin-top: 1rem; padding-top: .9rem; }
.card-price .amount { font-family: var(--psu-display); font-size: 1.25rem; font-weight: 700; color: var(--psu-navy); }
.card-price .note { font-size: .8rem; color: var(--psu-muted); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.card-actions > div { display: contents; }
.card-actions .btn { width: 100%; }
@media (prefers-reduced-motion: reduce) { .card, .card-grid .card:hover, .product-card:hover, .btn, .btn:active { transition: none; transform: none; } }

.article-card time { font-size: .825rem; color: var(--psu-muted); }
.article-card h3 { font-size: 1.1rem; margin: .35rem 0 .5rem; }

.empty-state { background: var(--psu-surface); border-radius: .6rem; padding: 1.1rem 1.35rem; color: var(--psu-muted); margin: 0; }

/* ---------- Panels (detail pages, dashboard) ---------- */
.panel { background: #fff; border: 1px solid var(--psu-border); border-radius: var(--psu-radius); box-shadow: var(--psu-shadow); padding: 1.5rem; }
.panel + .panel { margin-top: 1.5rem; }
.panel h2 { font-size: 1.15rem; margin-bottom: .85rem; }
.panel-sticky { position: sticky; top: 5.5rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .45rem 0 .45rem 1.6rem; position: relative; border-bottom: 1px solid #eef1f6; }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: ""; position: absolute; left: .2rem; top: .95rem; width: .6rem; height: .35rem; border-left: 2px solid var(--psu-blue); border-bottom: 2px solid var(--psu-blue); transform: rotate(-45deg); }
.plan-option { border: 1px solid var(--psu-border); border-radius: .6rem; padding: .7rem .9rem .7rem 2.4rem; margin-bottom: .5rem; }
.plan-option:has(input:checked) { border-color: var(--psu-blue); background: var(--psu-blue-soft); }

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom: 1.75rem; }
.stat { background: #fff; border: 1px solid var(--psu-border); border-radius: var(--psu-radius); padding: 1.1rem 1.25rem; box-shadow: var(--psu-shadow); }
.stat .value { font-family: var(--psu-display); font-size: 1.75rem; font-weight: 700; color: var(--psu-navy); line-height: 1.1; }
.stat .label { font-size: .875rem; color: var(--psu-muted); }
.panel .list-group { --bs-list-group-border-color: var(--psu-border); }

/* ---------- Auth forms ---------- */
/* The banner's bottom-left wave sits behind the card. */
.auth-wrap { position: relative; overflow: hidden; padding-block: 3rem 4rem; background: var(--psu-surface); flex: 1; }
.auth-wrap::before { content: ""; position: absolute; left: 0; bottom: 0; width: min(38rem, 70%); height: 11rem; background: left bottom / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 180' preserveAspectRatio='none'%3E%3Cpath fill='%23cfe0f1' d='M0 70c60 16 110 62 190 66 110 6 190-26 290 8 40 14 80 26 120 36H0z'/%3E%3Cpath fill='%231d5ea3' d='M0 96c50 14 90 50 160 58 90 10 170-16 260 26H0z'/%3E%3Cpath fill='none' stroke='%23c79a3f' stroke-width='2' d='M0 110c70 20 120 52 230 70'/%3E%3C/svg%3E"); pointer-events: none; }
.auth-wrap > * { position: relative; }
.auth-card { max-width: 27rem; margin-inline: auto; background: #fff; border: 1px solid var(--psu-border); border-radius: var(--psu-radius); box-shadow: 0 2px 4px rgba(11, 31, 58, .05), 0 24px 48px -24px rgba(11, 31, 58, .28); padding: 2.25rem 2rem 2rem; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-card .auth-sub { color: var(--psu-muted); margin-bottom: 1.5rem; }
.auth-card label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--psu-navy); }
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]) {
    display: block; width: 100%; padding: .6rem .8rem; font-size: 1rem; color: var(--psu-text);
    background: #fff; border: 1px solid #b8c2d1; border-radius: .55rem; min-height: 2.875rem; transition: border-color .15s, box-shadow .15s;
}
.auth-card input:not([type=checkbox]):not([type=radio]):focus { outline: none; border-color: #6f8cc7; box-shadow: 0 0 0 .2rem rgba(26, 63, 134, .2); }
/* Password field + Show/Hide button share one row (the full-width rule above would push the button below). */
.auth-card .input-group > input:not([type=checkbox]):not([type=radio]):not([type=hidden]) {
    width: 1%; flex: 1 1 auto; border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.auth-card .input-group > .btn { border-color: #cbd3df; border-radius: 0 .5rem .5rem 0; }
.auth-card input[type=checkbox] { margin-right: .4rem; }
.auth-card .field-check label { display: inline; font-weight: 500; }
.auth-card .helptext, .auth-card .field-help { display: block; font-size: .8rem; color: var(--psu-muted); margin-top: .3rem; }
.auth-card .field-help ul { padding-left: 1.1rem; margin: .25rem 0 0; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--psu-muted); font-size: .825rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--psu-border); }

/* ---------- Footer ---------- */
/* The banner's gold curve opens the footer, on top of a slightly lighter navy swell. */
.site-footer { position: relative; background: var(--psu-navy); color: #b9c6da; padding-block: 4rem 1.5rem; font-size: .925rem; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2.75rem; background: center top / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 44' preserveAspectRatio='none'%3E%3Cpath fill='%2314305a' d='M0 0h1440v8c-280 30-520 34-760 22C420 18 200 16 0 34z'/%3E%3Cpath fill='none' stroke='%23f2b01e' stroke-width='2' vector-effect='non-scaling-stroke' d='M0 34c200-18 420-16 680-4 240 12 480 8 760-22'/%3E%3C/svg%3E"); pointer-events: none; }
.site-footer h2 { color: var(--psu-gold); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem; }
.site-footer a { color: #dbe4f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
/* Tap targets ≥ 24 px (WCAG 2.2 AA 2.5.8, finding P3): the link padding now provides the row gap. */
.site-footer li a { display: inline-block; padding-block: .25rem; }
.auth-card p.small a { display: inline-block; padding-block: .3rem; }
.site-footer .footer-brand { color: #fff; font-family: var(--psu-display); font-weight: 600; font-size: 1.15rem; }
.site-footer .footer-tagline { color: var(--psu-gold); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .85rem; }
.site-footer .footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; font-size: .825rem; color: #93a3bd; }

/* Keyboard focus: one visible ring everywhere (replaces Bootstrap's faint default glow). */
.site-nav .nav-link:focus-visible, .navbar-toggler:focus-visible, .btn:focus-visible, .dropdown-item:focus-visible {
    outline: 3px solid rgba(26, 63, 134, .6); outline-offset: 2px; box-shadow: none;
}
.hero .btn:focus-visible, .site-footer a:focus-visible { outline-color: var(--psu-gold); }

/* ---------- Policy pages (/privacy-policy/, /terms-and-conditions/, /refund-policy/) ---------- */
.legal { max-width: 52rem; font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.legal h2 { font-size: 1.2rem; margin: 2rem 0 .65rem; padding-top: .35rem; border-top: 1px solid var(--psu-border); }
.legal h3 { font-size: 1.02rem; margin: 1.25rem 0 .4rem; color: var(--psu-navy-2); }
.legal ul { padding-left: 1.35rem; margin-bottom: 1rem; }
.legal li { margin-bottom: .3rem; }
.legal .legal-meta { margin-bottom: .2rem; color: var(--psu-muted); }
.legal .legal-meta + p:not(.legal-meta) { margin-top: 1.25rem; }
.navbar-toggler:focus:not(:focus-visible) { box-shadow: none; }

/* Study material reader (/library/read/, static/js/reader.js): ported from the Django reader. */
#pdf-canvas { display: block; margin: 0 auto; background: #fff; }
#pdf-viewer:fullscreen { display: flex; flex-direction: column; padding: .5rem; }
#pdf-viewer:fullscreen #pdf-stage { flex: 1 1 auto; }
@media print {
    /* D70 (restores D43; supersedes D15 / P5 and the 2026-11-09 print permission): study material is not printed.
       The rendered page and the reader controls are left out of any printout; only the notice prints.
       Best-effort: it cannot stop screenshots or OS-level capture. */
    body[data-page="reader"] #pdf-viewer > :not(.reader-print-notice) { display: none !important; }
    body[data-page="reader"] #pdf-canvas { display: none !important; }
    .back-to-top, .reading-progress, .reading-bar, .reading-toc, .list-tools, .toast-region { display: none !important; }
}

/* ---------- Home (client artwork; client UI directive 2026-10-04) ---------- */
/* Artwork is shown whole (never cropped): width/height attributes + height:auto keep the space reserved. */
.site-img, .home-hero-img { display: block; width: 100%; height: auto; }
/* D51: the client's Homepage Banner rebuilt in HTML. Words are real text and owner-editable; only the text-free right
   side of the artwork stays a picture. Wide screens keep the banner's 8:3 stage with the picture at its own shape; below
   that the order is text, calls to action, picture, so the heading and buttons stay near the top. */
.home-hero { --hero-paper: #f7f4f0; --hero-gold: #a06d12; --hero-navy: #0f2d5c; display: flex; flex-direction: column; background: var(--hero-paper); }
.home-hero-stage { display: contents; }
.home-hero-content { order: 1; padding-block: 1.5rem; }
.home-hero-bar { order: 2; }
.home-hero-art { order: 3; }
.home-hero-brand { display: flex; align-items: center; gap: .85rem; margin: 0 0 1.1rem; }
.home-hero-logo { flex: none; width: 3.5rem; height: auto; }
.home-hero-logo-gold { fill: #c79a3f; }
.home-hero-logo-navy { fill: var(--hero-navy); }
.home-hero-brand-text { display: flex; flex-direction: column; gap: .3rem; }
.home-hero-brand-name { color: var(--hero-navy); font-family: var(--psu-display); font-size: 1.5rem; font-weight: 700; line-height: 1.05; letter-spacing: -.015em; }
.home-hero-brand-gold { color: var(--hero-gold); }
.home-hero-brand-tag { color: var(--hero-navy); font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; word-spacing: .25em; }
.home-hero-title { margin: 0 0 .75rem; font-family: var(--psu-display); font-size: clamp(1.9rem, 1.15rem + 3.4vw, 3.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.home-hero-line1, .home-hero-line2 { display: block; }
.home-hero-line1 { color: var(--hero-navy); }
.home-hero-line2 { color: var(--hero-gold); }
.home-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; margin: 0 0 1.25rem; color: var(--hero-navy); font-size: clamp(.98rem, .9rem + .4vw, 1.25rem); }
.home-hero-sep { color: var(--hero-gold); }
/* Owner text may be one long unbroken word (a web address): it wraps, it never widens the page. */
[data-hero-text] { overflow-wrap: break-word; min-width: 0; max-width: 100%; }
/* Longer owner text can reach the wave: the highlight words keep their own ground, so they stay readable. */
.home-hero-features [data-hero-text] { background: rgba(247, 244, 240, .92); border-radius: .25rem; padding-inline: .2rem; }
.home-hero-features { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; margin: 0; padding: 0; }
.home-hero-features li { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--hero-navy); font-size: .92rem; line-height: 1.25; text-align: center; }
.home-hero-icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #e4eef8; }
.home-hero-wave { display: none; }
@media (min-width: 576px) { .home-hero-features { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 44rem; } }
@media (min-width: 1200px) {
    .home-hero-stage { display: flex; position: relative; overflow: hidden; min-height: min(37.5vw, 45rem); }
    .home-hero-stage::before { content: ""; position: absolute; left: .4vw; top: 15%; width: 3.2vw; height: 15%;
        background: radial-gradient(circle, #b9cfe6 1.5px, transparent 2px) 0 0 / .8vw .8vw; }
    .home-hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding-block: 1.25rem 1.75rem; }
    .home-hero-content > * { width: 54%; }
    .home-hero-brand { margin-bottom: 1.6vw; }
    .home-hero-logo { width: min(4.8vw, 5.5rem); }
    .home-hero-brand-name { font-size: min(2.55vw, 3rem); }
    .home-hero-brand-tag { font-size: min(.85vw, 1rem); }
    .home-hero-title { margin-bottom: .7vw; font-size: min(4.1vw, 4.1rem); }
    .home-hero-tags { margin-bottom: 1.7vw; font-size: min(1.65vw, 1.65rem); }
    .home-hero-features { max-width: none; width: 46%; }
    .home-hero-features li { font-size: min(1.15vw, 1.15rem); }
    .home-hero-icon { width: min(4.8vw, 5.5rem); height: min(4.8vw, 5.5rem); }
    .home-hero-icon svg { width: 62%; height: 62%; }
    .home-hero-wave { display: block; position: absolute; z-index: 0; left: 0; bottom: 0; width: 45%; height: 31%; }
    .home-hero-wave-light { fill: #cfe0f1; }
    .home-hero-wave-navy { fill: #1d5ea3; }
    .home-hero-wave-gold { fill: none; stroke: #c79a3f; stroke-width: 2; vector-effect: non-scaling-stroke; }
}
/* D48: an owner-uploaded card image keeps the shipped artwork's shape (1672:941) and is shown whole. */
.site-img[data-cms-image] { aspect-ratio: 1672 / 941; object-fit: contain; background: #fff; }
.home-hero-bar { background: var(--psu-surface); padding-block: 1.1rem; }
.home-hero-note { color: var(--psu-muted); font-size: .95rem; }
.home-hero-note a { font-weight: 600; }
.home-section-head h2 { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.95rem); position: relative; padding-bottom: .6rem; }
.home-section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.25rem; height: 4px; border-radius: 2px; background: var(--psu-gold); }

.promo-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* D42/D43 homepage modules: four equal cards in one row on wide screens. Coming-soon cards are not links (no hover
   lift); the one available module carries a gold "Available" label. Status labels use the brand navy and gold. */
.promo-soon, .promo-soon:hover { transform: none; background: var(--psu-tint); cursor: default; }
.promo-badge { align-self: flex-start; margin-top: .45rem; font-weight: 650; }
.promo-badge-soon { background: var(--psu-navy); color: #fff; }
.promo-badge-live { background: var(--psu-gold); color: var(--psu-navy); }
.promo-card { min-width: 0; }
.promo-link {
    --promo-rule: var(--psu-gold);
    display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: #fff;
    border-radius: var(--psu-radius); overflow: hidden; background: var(--psu-tint);
    transition: transform .25s var(--psu-ease), background-color .25s ease;
}
.promo-link:hover { transform: translateY(-3px); background: var(--psu-blue-soft); }
.promo-link:focus-visible { outline: 3px solid var(--psu-gold); outline-offset: 3px; }
.promo-body { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem 1.15rem; }
.promo-title { font-family: var(--psu-display); font-size: 1.08rem; font-weight: 600; color: var(--psu-navy); }
.promo-sub { font-size: .92rem; color: var(--psu-muted); }
.promo-cta { margin-top: .45rem; font-weight: 650; color: var(--psu-blue); font-size: .93rem; }
.promo-link:hover .promo-cta { text-decoration: underline; }

.home-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.home-points li { background: #fff; border-radius: .6rem; padding: .85rem 1rem; color: var(--psu-navy); font-weight: 600; }

.subject-groups { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.subject-group { background: var(--psu-tint); border-radius: var(--psu-radius); padding: 1.25rem 1.4rem; }
.subject-group h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.subject-group ul { margin: 0; padding-left: 1.15rem; columns: 2 10rem; column-gap: 1.5rem; }
.subject-group li { padding-block: .2rem; break-inside: avoid; }
.subject-group li::marker { color: var(--psu-gold-ink); }

/* Benefits strip: the "Prepare for Success" artwork as a faded decorative background (no content image). */
.home-why { position: relative; overflow: hidden; }
.home-why::before {
    content: ""; position: absolute; inset: -8px; pointer-events: none; opacity: .035; filter: blur(3px);
    background: center / cover no-repeat url("/static/img/site/prepare-for-success-1200.jpg");
    background-image: image-set(url("/static/img/site/prepare-for-success-1200.webp") type("image/webp"), url("/static/img/site/prepare-for-success-1200.jpg") type("image/jpeg"));
}
.home-why > .container { position: relative; }

.package-row { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
.package-title { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.95rem); }
.package-list { list-style: none; padding: 0; margin: 1rem 0; }
.package-list li { padding: .4rem 0 .4rem 1.75rem; position: relative; font-weight: 550; color: var(--psu-navy); }
.package-list li::before { content: ""; position: absolute; left: .15rem; top: .8rem; width: .65rem; height: .38rem; border-left: 2px solid var(--psu-gold-ink); border-bottom: 2px solid var(--psu-gold-ink); transform: rotate(-45deg); }
/* Upcoming items: an open circle, not the "included" tick, and normal weight. */
.package-list-soon li { font-weight: 400; color: var(--bs-secondary-color); }
.package-list-soon li::before { width: .6rem; height: .6rem; top: .78rem; border: 2px solid currentColor; border-radius: 50%; transform: none; }

.home-cta { background: linear-gradient(135deg, var(--psu-navy) 0%, var(--psu-navy-2) 100%); color: #dbe4f2; text-align: center; padding-block: 3.5rem; }
.home-cta h2 { color: #fff; font-size: clamp(1.45rem, 1.15rem + 1vw, 1.95rem); }
.home-cta p { margin: .5rem auto 1.5rem; max-width: 36rem; }
.home-cta .btn:focus-visible { outline-color: var(--psu-gold); }
@media (prefers-reduced-motion: reduce) { .promo-link, .promo-link:hover { transition: none; transform: none; } }
/* The signed-in menu has 9 links: below 1200 px it lives in the toggler menu (navbar-expand-xl). */
@media (min-width: 1200px) { .site-nav .nav-link { white-space: nowrap; } }

/* D35: phone log-in (login page) */
.phone-login summary { cursor: pointer; font-weight: 600; color: var(--psu-blue); padding-block: .25rem; }
.phone-login label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--psu-navy); }

/* ---- D36 public product structure (RC6) ---- */
.announce-strip[hidden], #home-updates[hidden], #home-courses[hidden], #home-mocks[hidden], #home-practice[hidden], #home-blog[hidden] { display: none !important; }
.announce-strip { background: var(--psu-navy); color: #dbe4f2; font-size: .9rem; padding-block: .45rem; border-bottom: 2px solid var(--psu-gold); }
.announce-strip [data-slot] { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem; min-height: 1.5rem; }
.announce-strip .announce-title { color: #fff; font-weight: 650; }
.announce-strip a.announce-title { text-decoration: underline; text-underline-offset: 2px; }
.announce-strip a.announce-title:focus-visible { outline: 2px solid var(--psu-gold); outline-offset: 2px; }
.announce-strip .announce-msg { color: #c9d4e6; }
.product-card { border-color: var(--psu-border); }
.product-card .card-img-top { aspect-ratio: 16 / 9; object-fit: cover; }
.offer-free { color: var(--psu-navy); background: var(--psu-blue-soft); border: 1px solid var(--psu-blue); }
.offer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .4rem; }
.offer-price { color: var(--psu-navy); }
.home-updates .list-group-item { border-color: var(--psu-border); }
.topic-group { border-top: 1px solid var(--psu-border); padding-top: .6rem; margin-top: .6rem; }
.topic-group > summary { cursor: pointer; }
.included-facts .col { text-align: center; }
.support-panel { background: var(--psu-surface); }
@media (max-width: 575.98px) {
    .announce-strip { font-size: .84rem; }
    .announce-strip .announce-msg { flex-basis: 100%; margin-left: 0 !important; }
    .home-section-head { flex-wrap: wrap; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .product-card { transition: none; }
}

/* ---- D38 owner analytics + opt-in banner (RC7) ---- */
.analytics-banner { z-index: 1080; }
.analytics-banner[hidden] { display: none !important; }
.kpi-card { border: 1px solid var(--psu-border); border-radius: var(--psu-radius); padding: .75rem 1rem; background: #fff; }
.kpi-value { color: var(--psu-navy); }
.chart-svg { width: 100%; height: auto; max-height: 260px; }
.chart-label, .chart-value { font-size: 12px; fill: var(--psu-muted); }
.chart-value { fill: var(--psu-navy); font-weight: 600; }
.chart-bar { fill: var(--psu-blue); }
.chart-axis { stroke: var(--psu-border); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2.5; stroke: var(--psu-blue); }
.chart-dot { fill: var(--psu-blue); }
.chart-line.series-b, .chart-dot.series-b { stroke: var(--psu-gold); fill: none; }
.chart-dot.series-b { fill: var(--psu-gold); }
.chart-line.series-c { stroke: #2e8b57; }
.chart-key.series-a { color: var(--psu-blue); }
.chart-key.series-b { color: var(--psu-gold-ink); }
.chart-key.series-c { color: #1e7145; }   /* legend text, AA on white */
.analytics-section .table td { overflow-wrap: anywhere; }

/* ---- D50 UX ---- */
/* Headings wrap evenly; figures that are compared line up. */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { text-wrap: balance; }
.card-price .amount, .offer-price, .stat .value, .kpi-value, .table, .included-facts, .form-text, #mock-timer, [data-tabular] { font-variant-numeric: tabular-nums; }
/* Card geometry: cards in a row share one height and their actions sit on one line. */
.card-grid > li, .row > div > .product-card { height: 100%; }
.card > .card-body { flex: 1 1 auto; }
.card > .card-footer { margin-top: auto; }

/* Loading skeletons: static in the page, gone by CSS the moment real content or an error message appears. */
.skeleton-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(17.5rem, 100%), 1fr)); }
.skeleton-card { height: 11rem; border-radius: var(--psu-radius); border: 1px solid var(--psu-border); background: var(--psu-surface); animation: psu-pulse 1.4s ease-in-out infinite; }
@keyframes psu-pulse { 50% { opacity: .55; } }
[aria-live]:has(> :not(.skeleton-grid, .skeleton-note)) > .skeleton-grid,
[aria-live]:has(> :not(.skeleton-grid, .skeleton-note)) > .skeleton-note { display: none; }
#message:not([hidden]) ~ [aria-live] > .skeleton-grid,
#message:not([hidden]) ~ [aria-live] > .skeleton-note { display: none; }
/* A browser without :has() could never remove them, so it simply does not show them. */
@supports not selector(:has(a)) { .skeleton-grid, .skeleton-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .skeleton-card { animation: none; } }

/* List search and sort */
.list-tools { display: grid; gap: .75rem 1rem; grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem); align-items: end; margin-bottom: 1.25rem; }
.list-tools-status { grid-column: 1 / -1; }
.list-filtered-out { display: none !important; }
@media (max-width: 575.98px) { .list-tools { grid-template-columns: minmax(0, 1fr); } }

/* Reading pages */
.reading-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; margin-bottom: 1rem; max-width: 52rem; }
.reading-time { margin-right: auto; }
.reading-toc { max-width: 52rem; margin-bottom: 1.5rem; padding: .85rem 1.1rem; background: var(--psu-surface); border: 1px solid var(--psu-border); border-radius: var(--psu-radius); }
.reading-toc summary { cursor: pointer; }
.reading-toc-list { margin: .6rem 0 0; padding-left: 0; list-style: none; columns: 2 16rem; column-gap: 2rem; }
.reading-toc-list li { break-inside: avoid; padding-block: .15rem; }
.reading-content h2 { scroll-margin-top: 6rem; }
[data-text-size="small"] .reading-content { font-size: .9375rem; }
[data-text-size="large"] .reading-content { font-size: 1.1875rem; }
[data-text-size="large"] .reading-content h2 { font-size: 1.4rem; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 1040; pointer-events: none; }
.reading-progress > span { display: block; height: 100%; background: var(--psu-gold); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .reading-progress > span { transform-origin: right; }

/* Back to top */
.back-to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 1030; --bs-btn-color: #fff; --bs-btn-bg: #0b1f3a; --bs-btn-border-color: var(--psu-gold); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #14305a; --bs-btn-hover-border-color: var(--psu-gold); --bs-btn-active-color: #fff; --bs-btn-active-bg: #14305a; box-shadow: var(--psu-shadow-hover); }
.back-to-top[hidden] { display: none; }
body:has(.analytics-banner:not([hidden])) .back-to-top { display: none; }

/* WhatsApp button and the plans table: AA contrast on the card ground (axe, seeded course page). */
.btn-outline-success { --bs-btn-color: #146c43; --bs-btn-border-color: #146c43; --bs-btn-hover-bg: #146c43; --bs-btn-hover-border-color: #146c43; --bs-btn-active-bg: #0f5132; --bs-btn-active-border-color: #0f5132; }
[data-bs-theme="dark"] .btn-outline-success { --bs-btn-color: #75d9a7; --bs-btn-border-color: #75d9a7; --bs-btn-hover-color: #0b1424; --bs-btn-hover-bg: #75d9a7; --bs-btn-hover-border-color: #75d9a7; --bs-btn-active-color: #0b1424; --bs-btn-active-bg: #75d9a7; --bs-btn-active-border-color: #75d9a7; }
/* The signed-in menu with the theme control must still fit one line from 1200 px up. */
#nav-signout { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) { .site-nav .nav-link { padding-inline: .4rem !important; font-size: .925rem; } .site-nav .navbar-nav.me-auto { margin-left: .25rem !important; } .theme-toggle { --bs-btn-padding-x: .4rem; } }

.theme-toggle { --bs-btn-color: var(--psu-text); --bs-btn-hover-color: var(--psu-text); --bs-btn-hover-bg: var(--psu-surface); font-size: 1.1rem; line-height: 1; }
.theme-toggle[hidden] { display: none; }

/* Owner page: notifications and command menu */
.toast-region { position: fixed; right: 1rem; bottom: 4rem; z-index: 1085; display: flex; flex-direction: column; gap: .5rem; width: min(24rem, calc(100vw - 2rem)); }
.psu-toast { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .7rem .9rem; color: var(--psu-text); background: var(--bs-body-bg); border: 1px solid var(--psu-border); border-left: 4px solid var(--psu-gold); border-radius: .6rem; box-shadow: var(--psu-shadow-hover); }
.psu-toast-danger { border-left-color: var(--bs-danger); }
.psu-toast-text { flex: 1 1 10rem; font-size: .925rem; overflow-wrap: anywhere; }
.command-menu { width: min(32rem, calc(100vw - 2rem)); padding: 1.1rem; color: var(--psu-text); background: var(--bs-body-bg); border: 1px solid var(--psu-border); border-radius: var(--psu-radius); box-shadow: var(--psu-shadow-hover); }
.command-menu::backdrop { background: rgba(11, 31, 58, .45); }
.command-list { margin: .6rem 0 0; max-height: 18rem; overflow-y: auto; }
.command-item { padding: .55rem .7rem; border-radius: .4rem; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.command-item.active, .command-item:hover { background: var(--psu-blue-soft); }

/* Touch: 44 px targets on coarse pointers (phones, tablets), in lists, forms, navigation and the footer. */
@media (pointer: coarse) {
    .btn, .btn-sm, .form-control, .form-select, .site-nav .nav-link, .navbar-toggler, .page-link, .dropdown-item { min-height: 44px; }
    .btn-sm, .btn { display: inline-flex; align-items: center; justify-content: center; }
    .form-check { padding-left: 2.1rem; }
    .form-check .form-check-input { width: 1.5rem; height: 1.5rem; margin-left: -2.1rem; }
    .site-footer li a, .auth-card p.small a, .breadcrumb-item a, .reading-toc-list a, .section-link { display: inline-flex; align-items: center; min-height: 44px; }
    .site-nav .nav-link, .nav-pills .nav-link { display: flex; align-items: center; min-height: 44px; }
    #post > a, main .empty-state > a, main .empty-state + a, main div > a:only-child:not(.btn), .list-group-item > a:not(.btn), .card-title a { display: inline-flex; align-items: center; min-height: 44px; }
    .topic-group > summary, .phone-login summary, .reading-toc summary { min-height: 44px; display: flex; align-items: center; }
}

/* Dark mode (visitor's choice): the same navy and gold on a dark ground. Brand panels keep their literal navy. */
:root[data-bs-theme="dark"] {
    color-scheme: dark;
    --psu-navy: #eaf0f9; --psu-navy-2: #cdd8ea; --psu-text: #e4eaf4; --psu-muted: #aab7cb;
    --psu-blue: #9dbcf5; --psu-blue-hover: #c0d4fa; --psu-blue-soft: #1b2c49;
    --psu-gold-ink: #f2c14e; --psu-gold-soft: #33290f;
    --psu-surface: #121d30; --psu-border: #2e3d55;
    --psu-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
    --psu-shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .35);
    --bs-body-bg: #0b1424; --bs-body-color: var(--psu-text); --bs-secondary-color: var(--psu-muted); --bs-tertiary-bg: #16233a;
    --bs-primary: #9dbcf5; --bs-primary-rgb: 157, 188, 245; --bs-link-color: #9dbcf5; --bs-link-color-rgb: 157, 188, 245;
    --bs-link-hover-color: #c0d4fa; --bs-link-hover-color-rgb: 192, 212, 250;
    --bs-emphasis-color: #fff; --bs-border-color: var(--psu-border); --bs-focus-ring-color: rgba(242, 176, 30, .45);
    --bs-secondary-bg: #16233a; --bs-secondary-bg-rgb: 22, 35, 58; --bs-tertiary-bg-rgb: 22, 35, 58;
}
[data-bs-theme="dark"] body { background: var(--bs-body-bg); }
[data-bs-theme="dark"] :focus-visible, [data-bs-theme="dark"] .btn:focus-visible, [data-bs-theme="dark"] .site-nav .nav-link:focus-visible { outline-color: var(--psu-gold); }
[data-bs-theme="dark"] .site-nav, [data-bs-theme="dark"] .empty-state, [data-bs-theme="dark"] .panel, [data-bs-theme="dark"] .stat, [data-bs-theme="dark"] .auth-card,
[data-bs-theme="dark"] .home-hero, [data-bs-theme="dark"] .promo-link, [data-bs-theme="dark"] .home-points li, [data-bs-theme="dark"] .subject-group, [data-bs-theme="dark"] .kpi-card,
[data-bs-theme="dark"] .card { --bs-card-bg: #16233a; background: #16233a; }
[data-bs-theme="dark"] .auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { background: #0f1a2c; border-color: #41526d; }
[data-bs-theme="dark"] .site-nav .nav-link { color: #d3dcea; }
[data-bs-theme="dark"] .site-nav .nav-link:hover { color: #fff; }
[data-bs-theme="dark"] .brand-mark, [data-bs-theme="dark"] .promo-badge-soon { background: #0b1f3a; }
[data-bs-theme="dark"] .promo-badge-live, [data-bs-theme="dark"] .btn-gold { color: #0b1f3a; }
[data-bs-theme="dark"] .btn-gold { --bs-btn-color: #0b1f3a; --bs-btn-hover-color: #0b1f3a; --bs-btn-active-color: #0b1f3a; }
[data-bs-theme="dark"] .btn-on-dark { --bs-btn-color: #0b1f3a; --bs-btn-hover-color: #0b1f3a; --bs-btn-active-color: #0b1f3a; }
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0b1424; --bs-btn-bg: #9dbcf5; --bs-btn-border-color: #9dbcf5; --bs-btn-hover-color: #0b1424; --bs-btn-hover-bg: #c0d4fa; --bs-btn-hover-border-color: #c0d4fa; --bs-btn-active-color: #0b1424; --bs-btn-active-bg: #c0d4fa; --bs-btn-disabled-color: #0b1424; --bs-btn-disabled-bg: #9dbcf5; --bs-btn-disabled-border-color: #9dbcf5; }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-border-color: #5f7fb8; --bs-btn-active-bg: #24375a; }
[data-bs-theme="dark"] .btn-outline-secondary { --bs-btn-color: #e4eaf4; --bs-btn-border-color: #5a6b86; --bs-btn-hover-bg: #1b2c49; --bs-btn-active-bg: #24375a; }
[data-bs-theme="dark"] .hero, [data-bs-theme="dark"] .site-footer, [data-bs-theme="dark"] .announce-strip { background: #081325; }
[data-bs-theme="dark"] .home-cta { background: linear-gradient(135deg, #081325 0%, #14305a 100%); }
[data-bs-theme="dark"] .home-hero-img[data-cms-image], [data-bs-theme="dark"] .site-img[data-cms-image] { background: #fff; }
[data-bs-theme="dark"] .check-list li { border-bottom-color: var(--psu-border); }
[data-bs-theme="dark"] .progress { --bs-progress-bg: #24375a; }
[data-bs-theme="dark"] .chart-bar, [data-bs-theme="dark"] .chart-dot { fill: #9dbcf5; }

/* ---- D52 shared controls ---- */
/* Forms and tables outside the auth cards: one height, one ring. */
.form-control, .form-select { --bs-border-color: #b8c2d1; border-radius: .55rem; }
.form-label { font-weight: 600; font-size: .9rem; color: var(--psu-navy); }
.table { --bs-table-border-color: var(--psu-border); }
.table > thead th { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--psu-muted); }
.alert { border-radius: .6rem; }
.badge { font-weight: 600; }
/* Not a Bootstrap class: without this the course badge has no background. */
.text-bg-primary-subtle { background: var(--psu-blue-soft); }

/* Owner Content Manager and other pill bars: brand navy instead of Bootstrap's stock blue. */
.nav-pills { --bs-nav-pills-link-active-bg: #0b1f3a; --bs-nav-pills-link-active-color: #fff; --bs-nav-pills-border-radius: .55rem; --bs-nav-link-color: #3b4658; --bs-nav-link-hover-color: var(--psu-navy); --bs-nav-link-font-weight: 500; }
.nav-pills .nav-link:not(.active):hover { background: var(--psu-surface); }
.nav-pills .nav-link.active { box-shadow: inset 0 -2px 0 var(--psu-gold); }
#tabs { border-bottom: 1px solid var(--psu-border); padding-bottom: .75rem; }

/* Loading: while a panel is busy, its text pulses gently. The word "Loading" stays for screen readers. */
@keyframes psu-pulse { 50% { opacity: .55; } }
[aria-busy="true"] { animation: psu-pulse 1.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    [aria-busy="true"] { animation: none; }
    .site-nav .nav-link, .nav-pills .nav-link { transition: none; }
}

/* D53-6: for screen readers. Not in the way of a visitor selecting the page. */
#pdf-text { -webkit-user-select: none; user-select: none; }

/* D53 premium components: one finish for what every page shares. Banner colours only. */
.alert { border-width: 1px 1px 1px 4px; }
.card { --bs-card-border-color: var(--psu-border); --bs-card-border-radius: var(--psu-radius); }
.badge { border-radius: 999px; letter-spacing: .01em; padding-inline: .7em; }
.list-group { --bs-list-group-border-radius: .6rem; --bs-list-group-border-color: var(--psu-border); }
.list-group-item-action:hover, .list-group-item-action:focus { background: var(--psu-surface); }
.table > thead th { border-bottom: 2px solid var(--psu-border); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--psu-surface); }
.pagination { --bs-pagination-color: var(--psu-blue); --bs-pagination-border-color: var(--psu-border); --bs-pagination-hover-color: var(--psu-blue); --bs-pagination-hover-bg: var(--psu-surface); --bs-pagination-active-bg: #0b1f3a; --bs-pagination-active-border-color: #0b1f3a; }
.progress { --bs-progress-height: .6rem; --bs-progress-border-radius: 999px; --bs-progress-bar-bg: var(--psu-blue); }
.dropdown-menu { --bs-dropdown-link-active-bg: #0b1f3a; padding: .35rem; }
.dropdown-item { border-radius: .4rem; }
summary { cursor: pointer; }

/* D53 dark mode, site wide: the banner's navy and gold on a dark ground. The client's photograph stays, dimmed; PDFs stay white. */
[data-bs-theme="dark"] .brand-logo-navy { fill: #eaf0f9; }
[data-bs-theme="dark"] .analytics-banner.bg-white { background: #16233a !important; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { --bs-border-color: #41526d; --bs-body-bg: #0f1a2c; background-color: #0f1a2c; }
[data-bs-theme="dark"] .form-check-input:not(:checked) { background-color: #0f1a2c; border-color: #5a6b86; }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { border-color: #9dbcf5; box-shadow: 0 0 0 .2rem rgba(157, 188, 245, .25); }
[data-bs-theme="dark"] .nav-pills { --bs-nav-pills-link-active-bg: #24375a; --bs-nav-link-color: #d3dcea; --bs-nav-link-hover-color: #fff; }
[data-bs-theme="dark"] .page-header::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 272 130' preserveAspectRatio='xMaxYMin slice'%3E%3Cpath fill='%23223a5e' d='M52 0c26 30 72 26 112 34 44 9 76 36 108 74V0z'/%3E%3Cpath fill='%230f2d5c' d='M108 0c20 20 54 22 86 28 34 7 58 26 78 52V0z'/%3E%3Cpath fill='none' stroke='%23c79a3f' stroke-width='1.5' d='M70 22c46 18 100-2 202-22'/%3E%3C/svg%3E"); }
[data-bs-theme="dark"] .auth-wrap::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 180' preserveAspectRatio='none'%3E%3Cpath fill='%23223a5e' d='M0 70c60 16 110 62 190 66 110 6 190-26 290 8 40 14 80 26 120 36H0z'/%3E%3Cpath fill='%2317457c' d='M0 96c50 14 90 50 160 58 90 10 170-16 260 26H0z'/%3E%3Cpath fill='none' stroke='%23c79a3f' stroke-width='2' d='M0 110c70 20 120 52 230 70'/%3E%3C/svg%3E"); }
[data-bs-theme="dark"] .home-hero { --hero-paper: #16233a; --hero-gold: #f2c14e; --hero-navy: #eaf0f9; }
[data-bs-theme="dark"] .home-hero-features [data-hero-text] { background: rgba(22, 35, 58, .88); }
[data-bs-theme="dark"] .home-hero-icon { background: #24375a; }
@media (min-width: 1200px) {
    [data-bs-theme="dark"] .home-hero-stage::before { background-image: radial-gradient(circle, #4d6a92 1.5px, transparent 2px); }
    [data-bs-theme="dark"] .home-hero-wave-light { fill: #223a5e; }
    [data-bs-theme="dark"] .home-hero-wave-navy { fill: #17457c; }
}
[data-bs-theme="dark"] .pagination { --bs-pagination-bg: #16233a; --bs-pagination-active-bg: #24375a; --bs-pagination-active-border-color: #5f7fb8; }
[data-bs-theme="dark"] .dropdown-menu { --bs-dropdown-bg: #16233a; --bs-dropdown-link-active-bg: #24375a; }
[data-bs-theme="dark"] .chart-key.series-c { color: #75d9a7; }
[data-bs-theme="dark"] .text-bg-primary { color: #0b1424 !important; }
[data-bs-theme="dark"] .text-bg-light { background-color: #24375a !important; color: #e4eaf4 !important; }
[data-bs-theme="dark"] .form-check-input:checked { background-color: #2f5fb3; border-color: #9dbcf5; }
[data-bs-theme="dark"] .text-danger { color: #f28b95 !important; }
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-color: #f28b95; --bs-btn-border-color: #f28b95; --bs-btn-hover-color: #0b1424; --bs-btn-hover-bg: #f28b95; --bs-btn-hover-border-color: #f28b95; --bs-btn-active-color: #0b1424; --bs-btn-active-bg: #f28b95; --bs-btn-active-border-color: #f28b95; }
[data-bs-theme="dark"] .text-success { color: #75d9a7 !important; }

/* Option B keeps D60's image composition and nine CMS text places. */
[data-page="home"] .home-hero-summary { color: var(--hero-navy); font-size: 1.05rem; line-height: 1.75; margin-bottom: 1rem; }
[data-page="home"] .home-hero-line2 { color: var(--hero-navy); }
[data-page="home"] .home-secondary { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; }
[data-page="home"] .home-actions .btn { white-space: normal; }
.site-nav .navbar-toggler, .site-nav .theme-toggle { min-width: 44px; min-height: 44px; }
.site-nav .nav-link { min-height: 44px; display: flex; align-items: center; }
[data-page="home"] .promo-link picture[hidden] { display: none; }
@media (min-width: 768px) {
    [data-page="home"] .home-hero-title { font-size: clamp(1.9rem, 3.4vw, 3.7rem); }
    [data-page="home"] .home-hero-content { padding-block: 2.5rem 4rem; }
}

/* ---------- D65 refinement (2026-11-13): one button language, flat accents, admin canvas ---------- */
.btn-gold, .btn-gold:hover, .btn-primary { box-shadow: none; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.btn-link.btn-sm { min-height: 24px; padding-block: .125rem; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--psu-gold); outline-offset: 2px; box-shadow: none; }
.btn:disabled, .btn.disabled { cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .btn:active:not(:disabled) { transform: none; } }
.site-nav::after { background: var(--psu-gold); height: 1px; }
.home-cta { background: var(--psu-navy); }
[data-bs-theme="dark"] .home-cta { background: #081325; }

/* Admin: the Content Manager uses the screen. The page container widens to a readable 100rem cap (Bootstrap's
   .container stopped at 1140px on a 1366px screen); tabs stay on one line and scroll inside their own row only
   when they do not fit; an empty panel takes no space; the course editor's empty pane reads as a placeholder. */
body[data-page="admin"] main > .page-header > .container, body[data-page="admin"] main > .page-body { max-width: 100rem; padding-inline: clamp(1rem, 3vw, 2.5rem); }
body[data-page="admin"] #tabs { flex-wrap: nowrap !important; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
    padding-bottom: .375rem; border-bottom: 1px solid var(--psu-border); }
body[data-page="admin"] #tabs > * { flex: none; white-space: nowrap; }
body[data-page="admin"] #tabs > .btn { margin-left: auto; align-self: center; }
body[data-page="admin"] #tabs .nav-link { padding: .5rem .875rem; }
/* Laptops (1024-1439px): tighter tabs so all ten and the Commands button fit on one line without a cut-off label. */
@media (min-width: 1024px) and (max-width: 1439.98px) {
    body[data-page="admin"] #tabs { gap: .125rem !important; }
    body[data-page="admin"] #tabs .nav-link { padding: .5rem .5rem; font-size: .9375rem; }
    body[data-page="admin"] #tabs > .btn { font-size: .875rem; padding-inline: .625rem; }
}
body[data-page="admin"] .panel:empty { display: none; }
body[data-page="admin"] #view .col-lg-8 > p.text-body-secondary:only-child { margin: 0; padding: 2rem 1.5rem; border: 1px dashed #c9d2df; border-radius: var(--psu-radius); background: var(--psu-surface); }
body[data-page="admin"] .table-responsive { overflow-x: auto; }
@media (max-width: 767.98px) {
    body[data-page="admin"] .page-header { padding-block: 1.25rem 1rem; }
    body[data-page="admin"] .page-header::before { display: none; }
    body[data-page="admin"] .page-body { padding-top: 1.25rem; }
    body[data-page="admin"] #tabs { margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); padding-inline: calc(var(--bs-gutter-x, 1.5rem) * .5); }
}

/* D66: the owner's ten-item signed-in header fits one row down to 1200px (it overflowed by 5-6px at 1200-1279). */
@media (min-width: 1200px) and (max-width: 1279.98px) {
    .site-nav .nav-link { padding-inline: .3rem !important; font-size: .875rem; }
    .site-nav .navbar-brand { margin-right: .5rem; }
}
.site-nav .nav-actions .btn { white-space: nowrap; }


/* D68: private, print-ready owner analytics summary. Hidden during normal browsing.
   The PDF button opens the browser print dialog; Save as PDF creates the file locally. */
#analytics-print-report { display: none; }
@media print {
  body:has(#analytics-print-report) > :not(#analytics-print-report) { display: none !important; }
  body:has(#analytics-print-report) { display: block !important; background: #fff !important; color: #111 !important; }
  body #analytics-print-report { display: block !important; position: static; margin: 0; padding: 0; font: 10pt/1.4 Arial, sans-serif; color: #111; }
  #analytics-print-report h1 { font-size: 17pt; margin-bottom: .5rem; }
  #analytics-print-report .report-meta { margin: 0 0 .15rem; }
  #analytics-print-report table { margin-top: .75rem; }
  #analytics-print-report table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  #analytics-print-report tr { break-inside: avoid; }
  #analytics-print-report td, #analytics-print-report th { border-bottom: 1px solid #ccc; padding: .25rem .4rem; vertical-align: top; overflow-wrap: anywhere; text-align: left; }
  #analytics-print-report thead { display: table-header-group; }
  #analytics-print-report th { border-bottom: 2px solid #111; }
  @page { size: A4; margin: 14mm; }
}

/* ---------- D71 critique fixes (owner request 2026-11-20) ----------
   Sections are told apart by a flat tint, never by hairlines or outlined boxes. One header on every page.
   Page gutters are 24px. The hero keeps the client's banner exactly as drawn; only its entrance moves. */
:root { --psu-tint: #eef3fa; }
:root[data-bs-theme="dark"] { --psu-tint: #101b2e; }
.section-tint { background: var(--psu-tint); }
/* One grid for every page (the homepage's 76rem measure): header, content and footer share the same edges. */
/* The owner admin keeps its own gutters and width: its tab bar is offset by the gutter (phones scrolled sideways). */
:where(body:not([data-page="admin"])) .container { --bs-gutter-x: 3rem; }
@media (min-width: 1200px) { :where(body:not([data-page="admin"])) .container { max-width: 76rem; } }

[data-page="home"] .home-actions { gap: .75rem !important; }
.btn, .home-secondary, .promo-link { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--psu-ease); }

@media (prefers-reduced-motion: no-preference) {
    @keyframes psu-hero-in { from { opacity: 0; transform: translateY(24px); } }
    @keyframes psu-fade-in { from { opacity: 0; } }
    .home-hero-title > span, .home-hero-summary, .home-actions > *, .home-hero-note, .home-hero-features > li { animation: psu-hero-in .7s var(--psu-ease) backwards; }
    .home-hero-title > .home-hero-line2 { animation-delay: .08s; }
    .home-hero-summary { animation-delay: .16s; }
    .home-actions > :nth-child(1) { animation-delay: .24s; }
    .home-actions > :nth-child(2) { animation-delay: .31s; }
    .home-actions > :nth-child(3) { animation-delay: .38s; }
    .home-hero-note { animation-delay: .44s; }
    .home-hero-features > li:nth-child(1) { animation-delay: .5s; }
    .home-hero-features > li:nth-child(2) { animation-delay: .56s; }
    .home-hero-features > li:nth-child(3) { animation-delay: .62s; }
    .home-hero-features > li:nth-child(4) { animation-delay: .68s; }
    /* The banner itself fades in whole: never scaled, cropped or moved inside its frame. */
    .home-hero-art { animation: psu-fade-in 1.1s ease-out .1s backwards; }
    .btn:hover:not(:disabled) { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) { .btn, .home-secondary, .promo-link { transition: none; } }

/* Homepage sections */
.home-points { counter-reset: none; }
.home-points li { font-weight: 600; padding: 1.1rem 1.25rem; }
.home-why .home-why-cta { margin-top: 1.5rem; }
.package-row { gap: 2.5rem; }
@media (min-width: 992px) { .package-row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.package-art { margin: 0; }
.package-art img { border-radius: var(--psu-radius); }
.package-art figcaption { margin-top: .75rem; font-size: .9375rem; color: var(--psu-muted); }
.home-study-art img { border-radius: var(--psu-radius); }

/* Inner pages: a real lead under the title, body text at 16px in the full ink. */
body:not([data-page="home"]):not([data-page="admin"]) .page-header { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 3vw, 2.75rem); }
body:is([data-page="courses"], [data-page="library"], [data-page="mock-tests"]) .page-header h1 { font-size: clamp(2.25rem, 1.2rem + 4vw, 4.5rem); line-height: 1.05; letter-spacing: -.03em; margin-bottom: .75rem; }
@media (prefers-reduced-motion: no-preference) {
    body:is([data-page="courses"], [data-page="library"], [data-page="mock-tests"]) :is(.page-header h1, .page-header .lead-sm, .course-feature > *, .course-topics li, .lib-subject > *, .lib-item, .mock-empty > *) {
        animation: psu-hero-in .6s var(--psu-ease) backwards; }
    .page-header .lead-sm { animation-delay: .08s; }
    :is(.course-feature, .mock-empty) > :nth-child(2) { animation-delay: .12s; }
    :is(.course-topics li, .lib-item):nth-child(n+2) { animation-delay: .06s; }
    :is(.course-topics li, .lib-item):nth-child(n+5) { animation-delay: .12s; }
    :is(.course-topics li, .lib-item):nth-child(n+9) { animation-delay: .18s; }
}
.page-header .lead-sm { font-size: 1.125rem; color: var(--psu-text); }
.page-body { font-size: 1rem; }
.page-body .empty-state { color: var(--psu-text); }

/* Courses: one full-width feature per course. */
.course-feature { display: grid; gap: 1.5rem 2.5rem; align-items: start; background: var(--psu-tint); border-radius: var(--psu-radius); padding: clamp(1.25rem, 3vw, 2.5rem); }
.course-feature + .course-feature { margin-top: 2rem; }
@media (min-width: 992px) { .course-feature { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.course-feature-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: .6rem; background: #fff; }
.course-feature h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: .5rem 0 .5rem; }
.course-feature .course-facts { font-size: 1.0625rem; margin-bottom: 1.25rem; }
.course-feature .course-free { font-weight: 600; color: var(--psu-navy); margin-bottom: 1.25rem; }
.course-feature .course-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.course-topics { grid-column: 1 / -1; }
.course-topics h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.course-topics ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.course-topics li { background: var(--bs-body-bg); border-radius: .5rem; padding: .6rem .85rem; color: var(--psu-text); }
.course-topics li strong { color: var(--psu-navy); font-weight: 600; margin-right: .35rem; }
.course-topics .course-topics-note { margin: 1rem 0 0; color: var(--psu-muted); }

/* Study Materials: what can be read now, prominent; what is coming, folded once per subject. */
.lib-subject { background: var(--psu-tint); border-radius: var(--psu-radius); padding: clamp(1.25rem, 3vw, 2rem); }
.lib-subject + .lib-subject, .lib-later { margin-top: 2rem; }
.lib-subject > h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); margin-bottom: .35rem; }
.lib-subject > .lib-count { margin-bottom: 1.25rem; color: var(--psu-text); }
.lib-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 992px) { .lib-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lib-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .75rem; background: var(--bs-body-bg); border-radius: .6rem; padding: .75rem 1rem; }
.lib-item-title { font-weight: 600; color: var(--psu-navy); }
.lib-item-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lib-item-actions .btn { min-height: 44px; }
.lib-soon { margin-top: 1.25rem; }
.lib-soon summary { font-weight: 600; color: var(--psu-navy); min-height: 44px; display: flex; align-items: center; }
.lib-soon p { margin: .25rem 0 0; }
.lib-waiting { list-style: none; margin: .5rem 0 0; padding: 0; }
.lib-waiting li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-block: .35rem; }
.lib-later h2 { font-size: 1.25rem; }
.lib-later ul { margin: 0; padding-left: 1.2rem; }

/* Mock tests: an honest empty state with somewhere to go next. */
.mock-empty { display: grid; gap: 1.5rem 2.5rem; background: var(--psu-tint); border-radius: var(--psu-radius); padding: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 992px) { .mock-empty { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; } }
.mock-empty h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.mock-empty p { font-size: 1.0625rem; color: var(--psu-text); }
.mock-empty .mock-empty-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.mock-empty img { display: block; width: 100%; height: auto; border-radius: .6rem; }

/* D71: one footer on every page (the homepage's): 16px text, 44px link targets, columns from 768px. */
.site-footer { font-size: 1rem; line-height: 1.65; padding-block: 48px 24px; overflow-wrap: anywhere; }
.site-footer .row { flex-direction: column; gap: 24px !important; }
.site-footer .row > * { width: 100%; margin-left: 0; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; text-transform: none; }
.site-footer li a, .site-footer p a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; max-width: 100%; }
.site-footer .footer-tagline, .site-footer .footer-bottom { font-size: .875rem; }
@media (min-width: 768px) {
    .site-footer .row { flex-direction: row; gap: 0 !important; }
    .site-footer .row > * { width: auto; flex: 1; }
    .site-footer .row > :first-child { flex: 2; }
}
@media (max-width: 575.98px) { :is(.course-actions, .mock-empty-actions) > .btn { flex: 1 1 100%; } }
@media (prefers-reduced-motion: no-preference) {
    .mock-empty :is(h2, p, .mock-empty-actions > *) { animation: psu-hero-in .6s var(--psu-ease) backwards; }
    .mock-empty p { animation-delay: .08s; }
    .mock-empty .mock-empty-actions > * { animation-delay: .16s; }
}
/* Phones: the course sits on the page margins itself (a tinted panel there only narrowed the text). */
@media (max-width: 575.98px) {
    .course-feature, .mock-empty { background: none; padding: 0; }
    .course-topics li { background: var(--psu-tint); }
}
/* D71 under reduced motion: everything above is shown at once, in place. */
@media (prefers-reduced-motion: reduce) {
    .home-hero-title > span, .home-hero-summary, .home-actions > *, .home-hero-note, .home-hero-features > li, .home-hero-art { animation: none; }
    body:is([data-page="courses"], [data-page="library"], [data-page="mock-tests"]) :is(.page-header h1, .page-header .lead-sm, .course-feature > *, .course-topics li, .lib-subject > *, .lib-item, .mock-empty > *) { animation: none; }
    .mock-empty :is(h2, p, .mock-empty-actions > *) { animation: none; }
    .btn:hover:not(:disabled) { transform: none; }
}

/* D71: a topic with several documents names each one; a course without a cover puts its topics beside it;
   course, mock-test and article cards are flat tinted surfaces (no outline, no resting shadow). */
.lib-read { display: inline-flex; align-items: center; gap: .5rem; }
.lib-read-kind { font-weight: 600; color: var(--psu-text); }
.lib-item-actions:has(.lib-read) { display: grid; width: 100%; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.lib-read { justify-content: space-between; }
@media (min-width: 992px) {
    .course-feature:not(:has(> .course-feature-art)) .course-topics { grid-column: auto; }
    .course-feature:not(:has(> .course-feature-art)) .course-topics ol { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
}
.card.product-card, #home-blog .card, body[data-page="blog"] .card { --bs-card-border-width: 0; border: 0; box-shadow: none; background: var(--psu-tint); }
.product-card .card-body .small:not(.badge) { font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
    body:is([data-page="courses"], [data-page="mock-tests"]) .page-body .row > div { animation: psu-hero-in .6s var(--psu-ease) backwards; }
    body:is([data-page="courses"], [data-page="mock-tests"]) .page-body .row > div:nth-child(n+2) { animation-delay: .08s; }
}
@media (prefers-reduced-motion: reduce) {
    body:is([data-page="courses"], [data-page="mock-tests"]) .page-body .row > div { animation: none; }
}
/* A subject with one readable topic uses the full row; mock-test labels stay at a readable 14px. */
@media (min-width: 992px) { .lib-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); } }
.product-card .badge { font-size: .875rem; }

/* D71: the AAI coverage details moved here from the homepage (Courses → #coverage). */
.course-coverage { margin-top: 3rem; padding: 1.5rem; background: var(--psu-tint); border-radius: var(--psu-radius); scroll-margin-top: 5rem; }
.course-coverage h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); text-wrap: balance; }
.course-coverage h3 { font-size: 1.125rem; margin-top: 1.25rem; }
.course-coverage ul { padding-left: 1.15rem; margin-bottom: 0; }
.course-coverage li { padding-block: .25rem; }
.course-coverage li::marker { color: var(--psu-gold-ink); }
.course-coverage p:last-child { margin-bottom: 0; }
[data-bs-theme="dark"] .course-coverage li::marker { color: var(--psu-gold); }

/* D71 polish: no word left alone on a line. Running text wraps "pretty"; short items (topic names, card and caption
   text, one-line notes) balance their lines. Headings already balance (above). */
p, li, dd, figcaption, summary, blockquote { text-wrap: pretty; }
li, figcaption, .promo-sub, .course-free, .course-topics-note, .home-hero-note { text-wrap: balance; }
/* The address is one unbreakable word: where its column is too narrow for "Email: address", the address takes its own line. */
@media (min-width: 768px) and (max-width: 991.98px) { .site-footer a[href^="mailto:"] { display: block; } }
