/* Public chrome is outside Bootstrap's scoped portal. Every override is phone-only;
   the media attribute on the layout provides a second guard for desktop presentation. */
@media(max-width:767.98px){
 /* Home and Mass Times render the same Next Mass card. */
 /* Share the first grid row so the clock and label stay vertically centred. */
 .home-next-mass:not([hidden]){display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:0 12px;margin:0 0 20px;padding:16px;background:#fff;border:1px solid var(--line);border-left:4px solid #b69b62;border-radius:4px;color:var(--navy)}
 .home-next-mass>.icon{grid-column:1;grid-row:1;width:24px;height:24px;color:#947332}
 .home-next-mass-copy{display:contents}
 .home-next-mass-copy>p{grid-column:2;min-width:0;overflow-wrap:anywhere}
 .home-next-mass p{margin:0}
 .home-next-mass .home-next-mass-label{font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#775c27}
 .home-next-mass .home-next-mass-time{margin-top:2px;font-size:1.25rem;font-weight:700;line-height:1.35}
 .home-next-mass .home-next-mass-description{margin-top:5px;font-size:.9rem;line-height:1.5}
 .home-next-mass .home-next-mass-date{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:6px;font-size:.8rem;color:#556070}
 .home-next-mass-date-badge{display:inline-block;padding:2px 8px;border-radius:4px;background:#f2ebd9;color:#6a511f;font-weight:700;line-height:1.5;white-space:nowrap}
 #content .page-banner-content :is(h1,h2){font-size:clamp(1.65rem,6vw,2rem);line-height:1.18}
 #update-notice:not([hidden]){display:flex;align-items:center;gap:12px;padding:12px;text-align:start}
 #update-notice button{flex:none;margin:0}
 .liturgical-section .event-item-desc[lang="ml"]{display:none}
 .readings-section .readings-heading{display:none}
 #content .breadcrumb{display:none}
 #content .page-actions{padding-block:12px;gap:8px}
 #content .page-actions a{min-height:44px;padding:10px 12px;border:1px solid var(--line);background:#fff;border-radius:4px;font-size:.9375rem}
 #content .documents-library-intro{display:none}
 #content .events-opening{gap:12px;margin-bottom:16px}
 #content .events-opening h2{display:none}
 #content .events-opening p{font-size:.875rem;margin:0}
 #content .events-filters{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));padding:16px}
 #content .events-filters .events-search{grid-column:1/-1}
 #content .events-filters input,#content .events-filters select{min-width:0;width:100%;font-size:16px;min-height:44px}
 #content .contact-card-form{padding:20px}
 #content .contact-card-form h2{margin-bottom:8px}
 #content .contact-card-form .section-intro{font-size:.875rem;margin-block:0 12px}
 #content .managed-page-introduction:not(:has(.managed-page-heading)){display:none}
 #content .managed-page-heading>:first-child{margin-top:0}
 #content .event-detail-page>:is(.event-status,.event-past),#content .bulletin-page>:first-child{margin-top:0}
 #content :is(.parish-news-heading,.vatican-heading,.collection-heading,.events-opening)>div:not(:has(*)){display:none}
 #content .parish-news-heading:not(:has(.managed-page-heading,h2)){display:none}
 #content .parish-aside>nav:first-child{margin-top:0}
 #content .faq-intro:not(:has(h2,.managed-page-heading))>.faq-resources{margin-top:0}
 #content .collection-heading:not(:has(h2,.managed-page-heading))>.collection-count{margin-top:0}
 #content .public-mobile-tasks{display:flex;flex-wrap:wrap;gap:8px;padding-block:12px}
 #content .public-mobile-tasks a,#content .public-mobile-recovery :is(a,button){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--navy);font:700 .9375rem/1.3 var(--font-primary);text-decoration:none}
 #content .public-mobile-tasks a:first-child,#content .public-mobile-recovery button{background:var(--navy);border-color:var(--navy);color:#fff}
 #content .public-mobile-tasks :is(a,button):focus-visible,#content .public-mobile-recovery :is(a,button):focus-visible{outline:3px solid #e3a21e;outline-offset:2px}
 #content .public-mobile-prep{margin:0 20px 16px;padding:12px 14px;border:1px solid #e2d7be;border-left:3px solid #947331;border-radius:4px;background:#fffaf0;color:#26304d;font-size:14px;line-height:1.5}
 #content .public-mobile-prep summary{min-height:44px;align-content:center;font-weight:700;cursor:pointer}
 #content .public-mobile-prep p{margin:8px 0}
 #content .public-mobile-prep a{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:700}
 #content .sr-workflow-progress{display:flex;overflow-x:auto;overscroll-behavior-x:contain;gap:4px;padding:4px;scrollbar-width:thin;scroll-snap-type:x proximity}
 #content .sr-workflow-progress li{flex:0 0 88px;scroll-snap-align:center}
 #content .sr-workflow-progress button{flex-direction:column;align-items:center;min-width:44px;min-height:64px;padding:8px 4px;font-size:12px;line-height:1.3;gap:4px}
 #content .sr-workflow-progress .sr-step-marker{width:26px;height:26px}
 #content .sr-workflow-progress .sr-step-label{display:block}
 #content .sr-student-registration .sr-form-heading{padding:18px 20px 12px}
 #content .sr-student-registration .sr-form-heading h2{line-height:1.3}
 #content .sr-student-registration .sr-enrollment-year{display:inline;font-size:1rem;white-space:nowrap;margin-left:6px}
 #content .sr-student-registration .sr-form-heading>p{font-size:14px;line-height:1.5;margin-block:6px}
 #content .sr-student-registration .sr-envelope-help{font-size:14px;margin-top:12px;padding:12px}
 #content.mr-public .sr-layout{margin-block:16px 32px;gap:16px}
 #content.mr-public .sr-guide{position:static;padding:12px 20px}
 #content.mr-public .sr-guide h1{font-size:1.8rem;margin-bottom:12px}
 #content.mr-public .sr-guide>ol{display:none}
 #content.mr-public .sr-guide>.section-eyebrow{display:none}
 #content.mr-public .sr-guide>p{font-size:14px;line-height:1.5;margin-block:8px}
 #content.mr-public .sr-privacy{padding:12px;margin-top:12px;font-size:13px;line-height:1.45}
 #content.mr-public .sr-privacy p{font-size:13px;margin-block:6px}
 #content.mr-public .sr-form-heading{padding:18px 20px 8px}
 #content.mr-public .sr-form-heading h2{display:none}
 #content.mr-public .sr-form-heading p{font-size:13px;margin-bottom:0}
 #content.mr-public .sr-section{padding:20px}
 #content.mr-public .sr-submit-row{gap:12px;flex-wrap:wrap}
 #content.mr-public .sr-submit-row>p{width:100%;margin:0;font-size:13px}
 #content.mr-public .sr-submit-row>.sr-button{flex:1;min-width:0;min-height:48px}
 #content [data-mobile-error]{margin-block:24px;padding:24px;border:1px solid var(--line);border-top:4px solid #a77e36;background:#fff;border-radius:6px}
 #content [data-mobile-error] h1{font-size:1.8rem;line-height:1.25}
 #content [data-mobile-error]>a{display:none}
 #content .public-mobile-recovery{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
 #content .public-mobile-recovery :is(a,button){flex:1 1 120px}
 /* Small public labels stay readable without flattening the heading hierarchy.
    Let badges grow with their text; these pages do not load scoped Bootstrap. */
 #content :is(.ccd-date-month,.ccd-date-weekday,.ccd-kind,.ccd-tentative,
             .faith-avatar,.document-essential-top,.document-format,
             .document-category-label,.vatican-story-meta,.bulletin-kicker,
             .bulletin-badge,.account-eyebrow,.calendar-today-label,.liturgical-today-label,
             .day-count,.event-badge,.agenda-time-end,.agenda-continues),
 #content .faith-grade-heading p,#content .document-categories a>span,
 #content .month-grid thead th,#content .events-shell .agenda-content .event-category {
  font-size:.75rem;line-height:1.5;
 }
 #content :is(.faith-designation,.document-date,.vatican-feed-status,.vatican-read,
             .bulletin-card-day),#content .faith-grade-card footer {
  font-size:.8125rem;line-height:1.5;
 }
 #content .ccd-date-month {letter-spacing:.08em}
 #content :is(.calendar-today-label,.liturgical-today-label) {text-transform:none}
 #content :is(.document-format,.bulletin-badge) {flex-shrink:0}
 #content .faith-designation {padding:.2rem .5rem}

 /* Document library and directory search controls. */
    .mobile-filter-panel details:not([hidden]) {
        display: block;
        margin-bottom: 16px;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 4px;
        background: #fff
    }
    .mobile-filter-panel details > summary {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 48px;
        padding: 12px 16px;
        font-size: 16px;
        font-weight: 700;
        color: var(--navy);
        list-style: none;
        cursor: pointer
    }
    .mobile-filter-panel:has(> .mobile-filter-clear) summary { margin-inline-end: 48px; }
    .mobile-filter-panel details > summary::-webkit-details-marker { display: none; }
    .mobile-filter-panel details > summary .icon:last-child { margin-left: auto; width: 14px; height: 14px; }
    .mobile-filter-panel details[open] > summary .icon:last-child { transform: rotate(90deg); }
    .mobile-filter-panel details > summary:focus-visible { outline: 3px solid #b1843b; outline-offset: 3px; }
    .mobile-filter-fields {
        display: grid;
        gap: 14px;
        padding: 16px;
        border-top: 1px solid var(--line)
    }
    .mobile-filter-fields > div {
        display: grid;
        grid-template-columns: minmax(0,1fr);
        gap: 6px
    }
    .mobile-filter-clear {
        position: absolute;
        inset-block-start: 1px;
        inset-inline-end: 1px;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border-inline-start: 1px solid var(--line);
        color: var(--navy);
    }
    .mobile-filter-clear .icon { width: 1.125rem; height: 1.125rem; }
    .mobile-filter-search > div { position: relative; }
    .mobile-filter-search input[type=search] { padding-inline-start: 50px; }
    /* Keep the submit target inside the input border at the shared public button size. */
    #content .mobile-filter-search button.button {
        position: absolute;
        inset-inline-start: 2px;
        inset-block: 2px;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border: 0;
        color: var(--navy);
        background: transparent;
        box-shadow: none;
        transform: none;
    }
    .mobile-filter-search button span { display: none; }
    #content :is(.mobile-filter-clear, .mobile-filter-search button):focus-visible {
        outline: 2px solid var(--blue);
        outline-offset: -3px;
    }
    .mobile-filter-panel details label {
        color: var(--navy);
        font-size: 14px;
        font-weight: 700
    }
    .mobile-filter-panel details select {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 10px 2.5rem 10px .8rem;
        border: 1px solid #7c8797;
        border-radius: 4px;
        /* Public controls use the same inset chevron as the events filters. */
        appearance: none;
        background-color: #fff;
        background-image: url('/images/select-chevron.svg');
        background-repeat: no-repeat;
        background-position: right .8rem center;
        background-size: 16px 16px;
        color: var(--navy);
        font: inherit;
        font-size: 16px
    }
    @media (forced-colors: active) {
        .mobile-filter-panel details select {
            appearance: auto;
            background-image: none;
        }
    }
    .mobile-filter-panel details select:focus-visible {
        outline: 3px solid var(--blue);
        outline-offset: 3px
    }
}
