/*
 * The shared look of the Bible study pages: library, study detail, the three
 * create forms, their "building" and review pages, saved lessons and research.
 *
 * The scale and the use of the brand fonts are taken from the Bible verse and
 * chapter pages and the customer dashboard, measured in a browser in
 * November 2026:
 *   - page title: Playfair Display, capitals, 600, 30px (24px on phones)
 *   - section title: Playfair Display, capitals, 600, 20px
 *   - card title: Playfair Display, capitals, 600, 16px
 *   - reading text: Inter 15px / 1.6 in slate; notes 13-14px; labels 12px
 *   - cards: white, 14px corners, 1px pale border, 24px padding (16px on phones)
 *   - buttons: Inter 14px semibold, 10px corners, 44px tall
 * These pages used to inherit the site's 18px base text size and 32px card
 * padding, so everything ran a size larger than the pages around them.
 *
 * Everything is scoped to `.study-shell.study-pages` (set in
 * bible_study/base.html; the home and session templates opt out). Two classes
 * are needed so these rules outrank the pages' inline `<style>` blocks, which
 * use one class and an element (`.lesson-hero h1`). `!important` appears only
 * where an older sheet already uses it (bible_study.css forces the Tailwind
 * text sizes on phones, base.css forces `.bg-brand-orange`).
 */

.study-shell.study-pages {
    --sp-ink: var(--brand-dark, #11192c);
    --sp-navy: var(--brand-navy, #2b3a7f);
    --sp-navy-dark: var(--brand-navy-dark, #1e2b69);
    /* slate-600, the verse page's reading colour: 6.5:1 on the page, 7.6:1 on white. */
    --sp-muted: #475569;
    --sp-line: var(--brand-background, #e6eef4);
    --sp-gold: var(--brand-accent, #fcd34d);
    --sp-display: var(--study-font-display, 'Playfair Display', serif);
    --sp-sans: var(--study-font-body, 'Inter', sans-serif);
    --sp-radius: 0.875rem;
    --sp-pad: 1.5rem;

    max-width: 68rem;
    padding-top: 1.25rem;
    font-family: var(--sp-sans);
    /* Everything without its own size inherits this instead of the site's 18px. */
    font-size: 0.9375rem;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .study-shell.study-pages { --sp-pad: 1rem; }
}

/* ---- Type ---- */

.study-shell.study-pages h1,
.study-shell.study-pages h2,
.study-shell.study-pages h3 {
    font-family: var(--sp-display);
    font-weight: 600;
    text-transform: uppercase;
}

.study-shell.study-pages h1,
.study-shell.study-pages h1.font-display,
.study-shell.study-pages .study-hero h1,
.study-shell.study-pages .study-hero h1.font-display {
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem) !important;
    letter-spacing: 0.02em;
    line-height: 1.2 !important;
}

.study-shell.study-pages h2 {
    font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem) !important;
    letter-spacing: 0.04em;
    line-height: 1.3 !important;
}

.study-shell.study-pages h3 {
    font-size: 1rem !important;
    letter-spacing: 0.05em;
    line-height: 1.35 !important;
}

.study-shell.study-pages h4 {
    font-family: var(--sp-sans);
    font-size: 0.875rem;
    font-weight: 700;
}

.study-shell.study-pages p,
.study-shell.study-pages li,
.study-shell.study-pages dd,
.study-shell.study-pages label,
.study-shell.study-pages .font-serif {
    font-family: var(--sp-sans);
}

/* Text that asked for a larger size (Tailwind text-lg / text-xl, or a page's
   own rule) reads at the same 15px as the rest. */
.study-shell.study-pages .text-lg,
.study-shell.study-pages .text-xl,
.study-shell.study-pages .text-2xl,
.study-shell.study-pages .lesson-hero p,
.study-shell.study-pages .study-subtitle,
.study-shell.study-pages .passage-link,
.study-shell.study-pages .question-text,
.study-shell.study-pages .activity-name,
.study-shell.study-pages .study-cost-panel__value {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
}

/* Values in a profile list ("High School", "45 minutes"). */
.study-shell.study-pages dd,
.study-shell.study-pages dd.profile-value {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
}

/* Italic serif was used for ordinary helper text; italics stay for Scripture. */
.study-shell.study-pages .font-serif.italic,
.study-shell.study-pages .lesson-hero p,
.study-shell.study-pages .diversity-note { font-style: normal; }

.study-shell.study-pages .scripture-text {
    font-family: var(--sp-display);
    font-style: italic;
}

/* Small labels: one size and one spacing, never under 12px. Several of these
   are headings (h2-h4) used as a label above a panel. */
.study-shell.study-pages .panel-kicker,
.study-shell.study-pages .profile-label,
.study-shell.study-pages .mini-label,
.study-shell.study-pages .card-kicker,
.study-shell.study-pages .block-label,
.study-shell.study-pages .eyebrow,
.study-shell.study-pages .study-kicker,
.study-shell.study-pages .study-form-kicker,
.study-shell.study-pages .study-cost-panel__label,
.study-shell.study-pages .study-outline-label,
.study-shell.study-pages [class*="text-[10px]"],
.study-shell.study-pages .profile-list dt,
.study-shell.study-pages .instruction-block span,
.study-shell.study-pages .question-item span,
.study-shell.study-pages .comparison-card h4,
.study-shell.study-pages .activity-cols h4,
.study-shell.study-pages .debrief-box h4,
.study-shell.study-pages .prayer-prompt-form label,
.study-shell.study-pages .stacked-form label {
    font-family: var(--sp-sans);
    font-size: 0.75rem !important;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.35 !important;
    text-transform: uppercase;
}

.study-shell.study-pages button.regenerate-section-btn { font-size: 0.75rem; letter-spacing: 0.06em; }

/* ---- Hero: the dusk sky of the study home, at the scale of a page header ---- */
.study-shell.study-pages .study-hero {
    margin-bottom: 1.25rem !important;
    padding: 1.75rem 1.5rem;
    border-radius: var(--sp-radius);
    background: linear-gradient(160deg, var(--sp-ink) 0%, var(--sp-navy-dark) 45%, var(--sp-navy) 74%, rgba(250, 131, 52, 0.85) 125%);
    box-shadow: 0 14px 36px rgba(17, 25, 44, 0.18);
}

@media (max-width: 767px) {
    .study-shell.study-pages .study-hero { padding: 1.25rem 1rem; }
}

.study-shell.study-pages .study-hero .study-kicker {
    margin-bottom: 0.375rem;
    color: var(--sp-gold);
}

.study-shell.study-pages .study-hero .study-subtitle {
    margin-bottom: 0;
    opacity: 1;
    color: rgba(255, 255, 255, 0.88);
}

.study-shell.study-pages .study-hero .mt-8 { margin-top: 1rem; }

/* ---- Buttons: Inter 14px semibold, 10px corners, 44px tall ---- */
.study-shell.study-pages .study-cta,
.study-shell.study-pages .study-hero a.study-cta,
.study-shell.study-pages .study-hero a.bg-white\/10,
.study-shell.study-pages button.bg-brand-navy,
.study-shell.study-pages button.review-save,
.study-shell.study-pages button.wizard-submit,
.study-shell.study-pages button.action-btn,
.study-shell.study-pages a.action-btn {
    min-height: 2.75rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.625rem;
    font-family: var(--sp-sans);
    font-size: 0.875rem !important;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3 !important;
    text-transform: none;
}

.study-shell.study-pages .study-cta .material-icons,
.study-shell.study-pages .study-hero a .material-icons,
.study-shell.study-pages button.review-save .material-icons { font-size: 1.125rem; }

/* The one action that matters on a page is gold with dark ink, as on the home. */
.study-shell.study-pages .study-cta.bg-brand-orange,
.study-shell.study-pages button.review-save {
    background-color: var(--sp-gold) !important;
    color: var(--sp-ink) !important;
    box-shadow: 0 1px 2px rgba(17, 25, 44, 0.12);
}

.study-shell.study-pages .study-cta.bg-brand-orange:hover,
.study-shell.study-pages button.review-save:hover { background-color: #fbc934 !important; }

/* ---- Cards: 14px corners, a pale border, 24px padding (16px on phones) ---- */
.study-shell.study-pages .rounded-\[2rem\],
.study-shell.study-pages .rounded-\[1\.5rem\],
.study-shell.study-pages .rounded-3xl,
.study-shell.study-pages .rounded-2xl,
.study-shell.study-pages .lesson-panel,
.study-shell.study-pages .research-panel,
.study-shell.study-pages .lesson-section,
.study-shell.study-pages .side-panel,
.study-shell.study-pages .study-form-card { border-radius: var(--sp-radius); }

.study-shell.study-pages .research-card,
.study-shell.study-pages .comparison-card,
.study-shell.study-pages .scripture-card,
.study-shell.study-pages .source-card,
.study-shell.study-pages .term-card { border-radius: 0.625rem; padding: 1rem; }

.study-shell.study-pages .p-8,
.study-shell.study-pages .p-6,
.study-shell.study-pages .lesson-panel,
.study-shell.study-pages .research-panel,
.study-shell.study-pages .lesson-section,
.study-shell.study-pages .side-panel,
.study-shell.study-pages .study-form-card { padding: var(--sp-pad); }

.study-shell.study-pages .shadow-xl,
.study-shell.study-pages .shadow-lg,
.study-shell.study-pages .lesson-panel,
.study-shell.study-pages .research-panel,
.study-shell.study-pages .lesson-section,
.study-shell.study-pages .side-panel { box-shadow: 0 1px 2px rgba(17, 25, 44, 0.05); }

/* ---- Spacing between blocks: 24px, not 40-96px ---- */
.study-shell.study-pages .mb-20,
.study-shell.study-pages .mb-24,
.study-shell.study-pages .mb-16 { margin-bottom: 2.5rem; }
.study-shell.study-pages .mb-12,
.study-shell.study-pages .mb-10 { margin-bottom: 1.5rem; }
.study-shell.study-pages .mb-8 { margin-bottom: 1.25rem; }
.study-shell.study-pages .mt-16 { margin-top: 2rem; }
.study-shell.study-pages .mt-8 { margin-top: 0.5rem; }
.study-shell.study-pages .gap-12,
.study-shell.study-pages .gap-10,
.study-shell.study-pages .gap-8 { gap: 1.5rem; }
.study-shell.study-pages .space-y-8 > * + * { margin-top: 1.25rem; }
.study-shell.study-pages .lesson-layout,
.study-shell.study-pages .lesson-hero { gap: 1.5rem; }
.study-shell.study-pages .study-form-page,
.study-shell.study-pages .youth-detail-shell { margin-bottom: 2.5rem; }

/* ---- Form fields: the size of the verse page's Book and Bible dropdowns
   (40px tall, 14px regular text, 6px / 12px padding, 10px corners). They were
   46px tall with 12px / 16px padding and 16px text, bold in the library. ---- */
.study-shell.study-pages select,
.study-shell.study-pages input[type="text"],
.study-shell.study-pages input[type="search"],
.study-shell.study-pages .form-control {
    min-height: 2.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Room for the arrow only. */
.study-shell.study-pages select { padding-right: 2rem; }

.study-shell.study-pages textarea.form-control {
    min-height: 5.5rem;
    padding: 0.5rem 0.75rem;
}

.study-shell.study-pages .study-form-grid { gap: 1rem 1.25rem; }

/* A thumb needs 44px. (16px text on phones is set near the end of this file.) */
@media (max-width: 767px) {
    .study-shell.study-pages select,
    .study-shell.study-pages input[type="text"],
    .study-shell.study-pages input[type="search"],
    .study-shell.study-pages .form-control { min-height: 2.75rem; }
}

/* ---- What an AI action costs: one quiet line with a wallet, as on the
   customer dashboard's question box (.credit-notice). ---- */
.study-shell.study-pages p.sp-credit-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--brand-navy-subtle-bg, #eef2ff);
    color: var(--sp-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.study-shell.study-pages p.sp-credit-notice .material-icons {
    font-size: 1.1rem;
    color: var(--sp-navy);
}

.study-shell.study-pages p.sp-credit-notice--on-dark {
    margin: 1rem 0 0;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
}

.study-shell.study-pages p.sp-credit-notice--on-dark .material-icons { color: var(--sp-gold); }

/* Too few credits: said on the form, with the way to add more. */
.study-shell.study-pages p.sp-credit-notice--short {
    flex-wrap: wrap;
    border-left: 3px solid var(--sp-gold);
    background: var(--brand-accent-light, #fef5d8);
    color: var(--sp-ink);
}

.study-shell.study-pages .sp-credit-notice__add {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    margin-left: auto;
    color: var(--sp-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Study detail: where an enrolled reader is in the study. */
.study-shell.study-pages .sp-step {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.study-shell.study-pages .sp-step .material-icons { font-size: 1rem; }
.study-shell.study-pages .sp-step--done { color: var(--sp-muted); }
.study-shell.study-pages .sp-step--next { color: var(--brand-accent-ink, #806000); }
/* !important: .study-border-soft sets its colour with it. */
.study-shell.study-pages a.bg-white:has(.sp-step--next) { border-color: var(--sp-gold) !important; box-shadow: 0 0 0 1px var(--sp-gold); }

/* Library: one tap takes the filters off; filters and page links stay at the list. */
.study-shell.study-pages .study-filters__clear {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--sp-navy);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.study-shell.study-pages .study-filters__clear--center { margin-top: 0.5rem; }
.study-shell.study-pages #studies { scroll-margin-top: 1rem; }

/* Library: the whole card opens the study, not only the strip at the bottom. */
/* bible_study.css pads every article by 24px; the card's own inner box does that job. */
.study-shell.study-pages .study-card { position: relative; padding: 0; box-shadow: 0 1px 2px rgba(17, 25, 44, 0.05); }
.study-shell.study-pages .study-card > .p-8 { padding: 1.25rem 1.25rem 0.75rem; }
.study-shell.study-pages .study-card .mb-6 { margin-bottom: 0.75rem; }
.study-shell.study-pages .study-card h3.mb-4 { margin-bottom: 0.5rem; }
.study-shell.study-pages .study-card p.mb-8 { margin-bottom: 1rem; }
.study-shell.study-pages .study-card .pt-6 { padding-top: 0.75rem; }
.study-shell.study-pages .study-card__link { padding-top: 0.75rem; padding-bottom: 0.75rem; border-radius: 0.625rem; }
.study-shell.study-pages .study-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--sp-radius); }
.study-shell.study-pages .study-card__link:focus-visible { outline: none; }
.study-shell.study-pages .study-card__link:focus-visible::after { outline: 2px solid var(--sp-navy); outline-offset: -2px; }
.study-shell.study-pages .study-card:active { transform: scale(0.99); }

/* Study detail: a session row is a compact card; a long title wraps to two
   lines instead of being cut off after a few letters on a phone. */
.study-shell.study-pages a.bg-white.p-6 { padding: 1rem; gap: 1rem; }
.study-shell.study-pages a.bg-white .w-14 { width: 2.5rem; height: 2.5rem; font-size: 1.125rem !important; border-radius: 0.5rem; }
.study-shell.study-pages a.bg-white .text-3xl { font-size: 1.5rem !important; }

.study-shell.study-pages h3.truncate {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* ---- Small interactions: every tappable thing answers the tap ---- */

/* A comfortable target for a thumb. */
.study-shell.study-pages button.action-btn,
.study-shell.study-pages a.action-btn,
.study-shell.study-pages button.regenerate-section-btn,
.study-shell.study-pages button.review-save,
.study-shell.study-pages .study-form-cancel { min-height: 2.75rem; }

/* Cancel on a create form: a quiet outline button beside the main button, the
   same pair used in the "Regenerate?" question. It was grey text with an X,
   alone at the far left edge of the form. */
.study-shell.study-pages .study-form-actions { justify-content: flex-end; gap: 0.75rem; }

.study-shell.study-pages .study-form-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 0.625rem;
    background: #ffffff;
    color: var(--sp-navy);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.study-shell.study-pages .study-form-cancel:hover {
    border-color: var(--sp-navy);
    background: var(--brand-navy-subtle-bg, #eef2ff);
}

.study-shell.study-pages .study-form-cancel:active { transform: scale(0.98); }

.study-shell.study-pages .sp-ask button.sp-ask__no { border-color: var(--border-subtle, #e2e8f0); }

.study-shell.study-pages button.action-btn,
.study-shell.study-pages a.action-btn,
.study-shell.study-pages button.regenerate-section-btn,
.study-shell.study-pages button.wizard-submit,
.study-shell.study-pages button.review-save,
.study-shell.study-pages .study-cta,
.study-shell.study-pages .regenerate-btn {
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.study-shell.study-pages button.action-btn:active:not(:disabled),
.study-shell.study-pages a.action-btn:active,
.study-shell.study-pages button.regenerate-section-btn:active:not(:disabled),
.study-shell.study-pages button.wizard-submit:active:not(:disabled),
.study-shell.study-pages button.review-save:active:not(:disabled),
.study-shell.study-pages .study-cta:active:not(:disabled),
.study-shell.study-pages .regenerate-btn:active:not(:disabled),
.study-shell.study-pages a.bg-white:active { transform: scale(0.98); }

.study-shell.study-pages a:focus-visible,
.study-shell.study-pages button:focus-visible,
.study-shell.study-pages summary:focus-visible {
    outline: 2px solid var(--sp-navy);
    outline-offset: 2px;
}

.study-shell.study-pages .study-hero a:focus-visible { outline-color: #ffffff; }

/* A form that has been sent: its button shows it is working and cannot be
   pressed twice (study_pages.js sets aria-busy). */
.study-shell.study-pages button[aria-busy="true"] {
    opacity: 0.75;
    cursor: progress;
}

.study-shell.study-pages button[aria-busy="true"]::after {
    content: "";
    flex: none;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: study-pages-spin 0.7s linear infinite;
}

@keyframes study-pages-spin { to { transform: rotate(360deg); } }

/* Asked in the page, beside the button, instead of in a browser box. */
.study-shell.study-pages .sp-ask,
.study-shell.study-pages .sp-problem {
    flex-basis: 100%;
    width: 100%;
    margin: 0.75rem 0 0;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    font-family: var(--sp-sans);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.45;
    text-align: left;
    text-transform: none;
}

.study-shell.study-pages .sp-ask {
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: var(--brand-navy-subtle-bg, #eef2ff);
    color: var(--sp-ink);
}

.study-shell.study-pages .sp-ask__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.study-shell.study-pages .sp-ask button.sp-ask__yes,
.study-shell.study-pages .sp-ask button.sp-ask__no {
    min-height: 2.75rem;
    margin: 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--sp-navy);
    border-radius: 0.75rem;
    box-shadow: none;
    font-family: var(--sp-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

.study-shell.study-pages .sp-ask button.sp-ask__yes { background: var(--sp-navy); color: #ffffff; }
.study-shell.study-pages .sp-ask button.sp-ask__no { background: #ffffff; color: var(--sp-navy); }

.study-shell.study-pages .sp-problem {
    border: 1px solid var(--status-error-border, rgba(168, 50, 31, 0.35));
    background: var(--status-error-bg, #fdf1ee);
    color: var(--status-error-ink, #a8321f);
    font-weight: 600;
}

/* iPhones zoom the whole page when a box with text under 16px is tapped. */
@media (max-width: 767px) {
    .study-shell.study-pages input[type="text"],
    .study-shell.study-pages input[type="search"],
    .study-shell.study-pages select,
    .study-shell.study-pages textarea { font-size: 1rem !important; }
}

@media (prefers-reduced-motion: reduce) {
    .study-shell.study-pages button,
    .study-shell.study-pages a,
    .study-shell.study-pages .study-card { transition: none; }
    .study-shell.study-pages button:active,
    .study-shell.study-pages a:active,
    .study-shell.study-pages .study-card:active { transform: none !important; }
    .study-shell.study-pages button[aria-busy="true"]::after { animation-duration: 2s; }
}

/* ---- Archived: said at the top of the page, with Restore beside it ---- */
.study-shell.study-pages .sp-archived {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(43, 58, 127, 0.18);
    border-left: 4px solid var(--sp-gold);
    border-radius: 0.75rem;
    background: var(--brand-navy-subtle-bg, #eef2ff);
    color: var(--sp-ink);
    font-size: 0.875rem;
    line-height: 1.45;
}

.study-shell.study-pages .sp-archived .material-icons { font-size: 1.25rem; color: var(--sp-navy); }
.study-shell.study-pages .sp-archived__text { flex: 1 1 14rem; }
.study-shell.study-pages .sp-archived form { margin: 0; }

.study-shell.study-pages button.sp-archived__restore,
.study-home button.sh-archived__restore {
    min-height: 2.75rem;
    margin: 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--brand-navy, #2b3a7f);
    border-radius: 0.625rem;
    background: #ffffff;
    box-shadow: none;
    color: var(--brand-navy, #2b3a7f);
    font-family: var(--study-font-body, 'Inter', sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.study-shell.study-pages button.sp-archived__restore:hover,
.study-home button.sh-archived__restore:hover { background: var(--brand-navy-subtle-bg, #eef2ff); }
.study-shell.study-pages button.sp-archived__restore:active,
.study-home button.sh-archived__restore:active { transform: scale(0.98); }

/* The study home's "Archived" list. It lives here, not in study-home.css, because
   that file is already past the project's 1,000-line limit. */
.study-home .sh-archived { margin-top: 1.5rem; border: 1px solid var(--border-subtle, #e2e8f0); border-radius: 0.875rem; background: #ffffff; }
.study-home .sh-archived__summary {
    display: flex; align-items: center; gap: 0.5rem; min-height: 3rem; padding: 0.5rem 1rem;
    color: var(--brand-navy, #2b3a7f); font-size: 0.9375rem; font-weight: 600; cursor: pointer; list-style: none;
}
.study-home .sh-archived__summary::-webkit-details-marker { display: none; }
.study-home .sh-archived__summary:focus-visible { outline: 2px solid var(--brand-navy, #2b3a7f); outline-offset: 2px; border-radius: 0.875rem; }
.study-home .sh-archived__summary .material-icons { font-size: 1.25rem; }
.study-home .sh-archived__chev { margin-left: auto; transition: transform 0.15s ease; }
.study-home .sh-archived[open] .sh-archived__chev { transform: rotate(180deg); }
.study-home .sh-archived__list { margin: 0; padding: 0 1rem 0.5rem; list-style: none; }
.study-home .sh-archived__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--border-subtle, #e2e8f0); }
.study-home .sh-archived__row form { margin: 0; flex: none; }
.study-home .sh-archived__name { min-width: 0; color: var(--brand-dark, #11192c); font-size: 0.9375rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.study-home .sh-archived__name:hover { color: var(--brand-navy, #2b3a7f); text-decoration: underline; }

/* A section that was just regenerated shows itself for a moment. */
.study-shell.study-pages .sp-fresh { animation: study-pages-fresh 1.6s ease-out; outline: none; }
@keyframes study-pages-fresh {
    from { box-shadow: 0 0 0 3px var(--brand-accent, #fcd34d); }
    to { box-shadow: 0 0 0 3px rgba(252, 211, 77, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .study-shell.study-pages .sp-fresh { animation: none; }
    .study-home .sh-archived__chev { transition: none; }
}

/* ---- Print: a saved lesson or research brief on paper, without the site
   around it or the buttons and forms on it. ---- */
@media print {
    .site-header,
    body > footer,
    #cookie-consent-banner,
    #credit-status-banner,
    #upgrade-prompt-banner,
    .study-shell.study-pages nav,
    .study-shell.study-pages [data-sp-noprint],
    .study-shell.study-pages .tooltip-text,
    .study-shell.study-pages .side-panel:has(form),
    .study-shell.study-pages .research-panel:has(#followup-form),
    .study-shell.study-pages [data-sp-note],
    .study-shell.study-pages button,
    .study-shell.study-pages .material-icons { display: none !important; }

    body { background: #ffffff !important; font-size: 11pt; }

    .study-shell.study-pages { max-width: none; padding: 0 !important; margin: 0 !important; }

    .study-shell.study-pages .lesson-section,
    .study-shell.study-pages .lesson-panel,
    .study-shell.study-pages .research-panel,
    .study-shell.study-pages .side-panel {
        border: 1px solid #cbd5e1;
        box-shadow: none !important;
        break-inside: avoid;
    }

    /* Dark panels would use a great deal of ink and print grey on many printers. */
    .study-shell.study-pages .bg-brand-navy,
    .study-shell.study-pages .highlight-section {
        background: #ffffff !important;
        color: #11192c !important;
    }

    .study-shell.study-pages .bg-brand-navy *,
    .study-shell.study-pages .highlight-section * { color: #11192c !important; }

    /* The numbered step badges print as outlined circles. */
    .study-shell.study-pages .timeline-marker {
        border: 1px solid #11192c;
        background: #ffffff !important;
        color: #11192c !important;
    }

    .study-shell.study-pages h1,
    .study-shell.study-pages h2,
    .study-shell.study-pages h3 { break-after: avoid; }

    .study-shell.study-pages a { color: inherit; text-decoration: none; }
}
