/* Public-page refinements to the copied WordPress theme (corkins.css stays verbatim) */

/* Filter bar (Directory, Books): the chevron keeps clear of the label, and the label never wraps */
.filters-wrapper { container-type: inline-size; }
.btn-filter-toggle { padding-right: 2.6rem; white-space: nowrap; }
/* Where the column is too narrow for the label at full tracking, tighten it instead of crossing the chevron, and
   only if it still does not fit (320 wide with 200% text) let it wrap between its words: "EXCHANGE YEAR" ran 9 px
   past the screen and the Directory and Books scrolled sideways. The room kept for the chevron is the chevron's own
   30 px and a gap, so it no longer grows with the text and "EXCHANGE" fits a line (army round 7, N3) */
@container (max-width: 15.9rem) { .btn-filter-toggle { letter-spacing: 0.1rem; white-space: normal; padding-right: calc(30px + 0.6rem); } }
@media (min-width: 64em) {
  /* Give each list column the room its label needs; at wide windows 25% is already more */
  .page-filters > .row > div:has(> .filters-wrapper) { flex: 0 0 auto; max-width: none; width: max(25%, 16rem); }
  .page-filters > .row > div:has(> .filters-wrapper) ~ div:last-child { flex: 1 1 0; max-width: none; margin-left: 0; }
}

/* A word longer than its line breaks instead of pushing the page sideways (army round 7, N3). At 320 with 200% text
   the pink note's "UPCOMING" and a long word in a page's statement ran past the screen; a phone
   widens its layout to fit, and the header's menu button, fixed to that edge, was all anyone saw out there.
   break-word splits only a word that cannot fit a line of its own, and leaves how columns size alone. */
body { overflow-wrap: break-word; }

/* LARGE TEXT ON A PHONE: AN ORDINARY WORD STAYS WHOLE (army round 8, G8 finding 2). break-word above stopped the
   sideways scroll, and then split any word wider than its column: Jim's pink note read UPCO / MING at 320 and
   UPCOMI / NG at 390 with 150-200% text, and half-width cards split "Community", "Philadelphia," and book titles.
   The columns were the problem, not the words, so the columns give way; a word longer than the whole line still breaks.
   Each switch compares the room to the text size (rem), so at 100% text nothing here applies and the look is unchanged. */

/* The pink note: when its strip is narrower than 19 times the text size (any phone at 150% or more, never at 100%),
   the arrow moves under the words, the sides tighten and the tracking eases from 0.25rem to 0.1em, so "UPCOMING"
   and "EXCHANGE?" fit a line of their own. */
.callout-section .container-bleed { container-type: inline-size; }
@container (max-width: 19rem) {
  .callout-box { padding: 1.75rem 1.25rem calc(1.875rem + 23px + 1rem); }
  .callout-box::after { top: auto; bottom: 1.875rem; transform: none; }
  .callout-box .label-sm, .callout-box .label-sm p { letter-spacing: 0.1em; }
}

/* Half-width cards (the Directory, Books, Past Events): when the row is narrower than 16 times the text size, one
   card to a row. 16rem - 100% is negative while the row is wide enough for two, so the clamp keeps 50%; on a narrow
   row with large text it is positive, and the card takes the row. */
@media (max-width: 47.9375em) {
  .grid-people .row > .col-xs-6, .grid-books .row > .col-xs-6, .past-events .row > .col-xs-6 {
    flex-basis: clamp(50%, (16rem - 100%) * 999, 100%);
    max-width: clamp(50%, (16rem - 100%) * 999, 100%);
  }
}

/* A linked title on a list (an alumni event, a name, a book) carries its underline 0.625rem past each side of
   its words. With large text on a phone that is 40px of a 290px line, enough to split "Community", "Constance" or
   "Bartholomew"; there the underline keeps to the words. 100vw - 19rem is positive on any phone at 100% text. */
.grid .item-content-wrapper .h1-style:has(a), .grid .item-content-wrapper .h2-style:has(a) {
  padding-left: clamp(0px, (100vw - 19rem) * 999, 0.625rem);
  padding-right: clamp(0px, (100vw - 19rem) * 999, 0.625rem);
}

/* "Back to Directory" on a card stays on one line where it fits (T22) and wraps between its words where it does
   not: at 320 with 200% text it was 407px wide and the card scrolled 114px sideways. As a block the arrow's padding
   holds for both lines, so a second line sits beside the arrow, never under it (as "Back to Alumni Activity", M12). */
@media (max-width: 47.9375em) {
  .single-people .label-sm.back-link { display: inline-block; max-width: 100%; box-sizing: border-box; min-width: 0; white-space: normal; }
}

/* Keyboard focus: a 2px black ring, only when the keyboard is driving; it reads on photos and on pink */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}
a:focus:not(:focus-visible) { outline: 0; }
/* A field you type in shows it is active by its caret; no box around it (Kate, 2026-10-08) */
input:not([type=submit], [type=button], [type=checkbox], [type=radio], [type=file]):focus-visible, textarea:focus-visible { outline: 0; }
/* An option in an open filter list sits inside a clipped box: draw its ring inside the option so no side is shaved */
.btn-filter:focus-visible { outline-offset: -6px; }
/* The chosen option, order and display icons say so by more than colour */
.btn-filter.active { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; }
.view-filter.active { box-shadow: 0 6px 0 -1px #000; }

/* Our Story: whatever photo is uploaded fits the frame instead of stretching */
.page-hero:not(.surprise-hero) .hero-wrapper img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.content-blocks .container-image img { width: 100%; height: auto; aspect-ratio: 2880 / 1752; object-fit: cover; }

/* The footer's EMAIL US circle is 10rem, so at 320 wide with text at 200% it
   grew to 320px and every page scrolled 25px sideways. Capped at the screen
   less the footer's 25px gutters, both ways so it stays round. (army round 4, M4) */
.site-footer .email-link { max-width: calc(100vw - 50px); max-height: calc(100vw - 50px); }
