/* Miami Recovery Project — shared styles.
   The look copies the Squarespace site it replaces (mrprco.org, November 2026):
   same colours, fonts, sizes and block positions on wide screens and on phones. */

@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-variable.woff2") format("woff2-variations"), url("fonts/montserrat-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-variable.woff2") format("woff2-variations"), url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-variable-italic.woff2") format("woff2-variations"), url("fonts/montserrat-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-variable-italic.woff2") format("woff2-variations"), url("fonts/montserrat-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Amiko"; src: url("fonts/amiko-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Amiko"; src: url("fonts/amiko-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Colours, fonts and the measurements everything else is built from ---------- */

:root {
  --ink: #1f2937;      /* text */
  --magenta: #a20769;  /* buttons, links, some titles */
  --blue: #0b4699;     /* some headings */
  --pink: #ffe6ec;     /* pink sections, footer, button text */
  --cream: #faf8f4;    /* cream sections, header */
  --card: rgba(11, 70, 153, 0.63); /* Mission and Vision cards */
  --draft: #b4266a;    /* draft notes only: delete before launch */
  --heading: "Amiko", "Trebuchet MS", system-ui, sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --button: "Poppins", "Montserrat", system-ui, sans-serif;

  --gutter: 3vw;       /* space at the sides of the page */
  --gap: 11px;         /* space between grid columns and rows */
  --content: 94vw;     /* width of the content area (never more than 1200px, see below) */
  --row: calc(var(--content) * 0.0215); /* height of one grid row */
  --hs: 1.2vw;         /* headings grow a little with the screen (up to a limit, see below) */
  --header-h: calc(105px + 0.2vw);
}
@media (min-width: 1277px) { :root { --content: 1200px; } }
@media (min-width: 83.334em) { :root { --hs: 1rem; } }
@media (max-width: 799px) { :root { --header-h: calc(105px + 2vw); } }
@media (max-width: 767px) { :root { --header-h: calc(74px + 2vw); --gutter: 6vw; --content: 88vw; --row: 24px; --hs: 1.2vh; } }
@media (max-width: 767px) and (min-height: 900px) { :root { --hs: 10.8px; } }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
@media (min-width: 800px) { html.menu-open { overflow: visible; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7em; /* "em", not a bare number: browsers round the two differently, and the live site uses em */
  letter-spacing: 0.04em;
  /* A word too long for its column (in a narrow column, or a long Spanish word on a small phone)
     is broken onto the next line instead of sticking out of the page. */
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--ink);
  background: var(--pink);
}

img { max-width: 100%; height: auto; }

a { color: var(--magenta); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
:target { scroll-margin-top: calc(var(--header-h) + 16px); }

h1, h2, h3, h4 { font-family: var(--heading); font-weight: 400; letter-spacing: -0.02em; margin: 2rem 0; }
h1 { font-size: calc(2 * var(--hs) + 1rem); line-height: 1.104em; }
h2 { font-size: calc(1 * var(--hs) + 1rem); line-height: 1.152em; }
h3 { font-size: calc(0.5 * var(--hs) + 1rem); line-height: 1.176em; }
h4 { font-size: calc(0.6 * var(--hs) + 1rem); line-height: 1.171em; }
p { margin: 1rem 0; }
p, li { line-height: 1.7em; }
ul, ol { margin: 1rem 0; padding: 0 0 0 2.5rem; }
li { margin: 0.5rem 0; }
li.spaced { margin-top: 1rem; } /* a little more room above this point in a list */
strong { font-weight: 700; }

/* Headings that look one size but are another level underneath (for screen readers). */
.h2, .h3, .h4 { font-family: var(--heading); font-weight: 400; letter-spacing: -0.02em; }
.h2 { font-size: calc(1 * var(--hs) + 1rem); line-height: 1.152em; }
.h3 { font-size: calc(0.5 * var(--hs) + 1rem); line-height: 1.176em; }
.h4 { font-size: calc(0.6 * var(--hs) + 1rem); line-height: 1.171em; }
/* A small bold heading that reads like a line of text. */
.sub { margin: 1rem 0; font-family: var(--body); font-size: 1rem; font-weight: 700; line-height: 1.7em; letter-spacing: 0.04em; }
.u { text-decoration: underline; }
.caps { text-transform: uppercase; }

.magenta { color: var(--magenta); }
.blue { color: var(--blue); }
.tc { text-align: center; }
.tr { text-align: right; }
.plain-link { color: inherit; text-decoration: none; }
.plain-list { padding: 0; list-style: none; }
.plain-list li { margin: 1rem 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--button);
  font-size: 1rem;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  color: var(--pink);
  background: var(--magenta);
  border: 0;
  border-radius: 10px;
  padding: 16px 20.8px;
  cursor: pointer;
}
.btn:hover { opacity: 0.8; }
/* A button that fills the block it sits in. */
.btn.fill { display: flex; align-items: center; justify-content: center; padding: 0 20.8px; }

/* ---------- Header ---------- */

.site-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 20; background: var(--cream); box-shadow: 0 12px 12px rgba(31, 41, 55, 0.15); }
/* On screens from 800 to about 1080 pixels wide the old site keeps two thirds of the width for the logo and the
   menu and lets the icons, the language switch and Donate run past the right margin. This does the same, but
   stops 8 pixels short of the edge of the screen (the old site cuts Donate off there): the empty box after the
   header's last item is the rest of the margin, and it is the first thing to give way. */
.header-inner { display: flex; align-items: center; height: var(--header-h); padding: 0.1vw 8px 0.1vw 3vw; }
.header-inner::after { content: ""; flex: 0 100000 calc(3vw - 8px); }
.logo { flex: none; display: block; line-height: 0; }
.logo img { display: block; height: 105px; width: auto; }

.nav { flex: 1 1 calc(62.98vw - 145.83px); min-width: 0; display: flex; flex-wrap: wrap; align-items: center; }
.nav > a, .nav > .folder { margin-left: 1.6vw; }
.nav a, .folder-title {
  display: block;
  padding: 0.1em 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
/* The thin line under the page you are on. */
.nav a[aria-current], .folder.is-current > .folder-title {
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.1em) / 1px 1px repeat-x;
}
.folder { position: relative; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1em;
  z-index: 2;
  box-sizing: content-box;
  min-width: 200px;
  margin: 0;
  padding: 0.5em 1em;
  list-style: none;
  line-height: 1.3;
  white-space: nowrap;
  background: var(--cream);
}
.submenu li { margin: 0; }
.submenu a { display: inline-block; }
.folder:hover > .submenu { display: block; }
.folder:focus-within > .submenu { display: block; }
.folder.open > .submenu { display: block; }

.header-actions { flex: none; display: flex; align-items: center; }
.header-actions .social, .header-actions .btn, .header-actions .lang { margin-left: 1.6vw; }
.social { display: block; width: 26px; height: 26px; color: inherit; }
.social svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* The language switch: a globe, the name of the page's language and a small arrow. A click opens the list. */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; }
.lang summary::-webkit-details-marker { display: none; }
.lang-now { display: flex; align-items: center; }
.globe, .lang-arrow { flex: none; fill: none; stroke: currentColor; stroke-width: 1px; }
.globe { width: 20px; height: 20px; margin-right: 8px; stroke-width: 2px; }
.lang-arrow { width: 16px; height: 16px; margin-left: 5.6px; }
.lang-list { position: absolute; top: 100%; left: -16px; z-index: 2; box-sizing: border-box; min-width: 110px; margin: 0; padding: 8px 16px; list-style: none; background: var(--cream); }
.lang-list li { margin: 0; }
.lang-list a { display: block; padding: 1.6px 0; font-size: 16px; line-height: 20.8px; color: inherit; text-decoration: none; }

/* Phones: the two-line button opens a full-screen pink menu. */
.mnav { display: none; }
@media (max-width: 799px) {
  .nav, .header-actions, .header-inner::after { display: none; }
  .header-inner { justify-content: center; padding: 0 6vw; }
  .mnav { display: block; }
}
@media (max-width: 767px) { .logo img { height: 74px; } }
.mnav summary { list-style: none; cursor: pointer; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav > summary { position: absolute; top: calc((var(--header-h) - 37px) / 2); right: 6vw; z-index: 1; width: 47px; height: 37px; }
.burger::before, .burger::after {
  content: "";
  position: absolute;
  left: 6px;
  width: 35px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s, top 0.25s;
}
.burger::before { top: 8.5px; }
.burger::after { top: 27.5px; }
.mnav[open] .burger::before { top: 18px; transform: rotate(45deg) scaleX(0.8); }
.mnav[open] .burger::after { top: 18px; transform: rotate(-45deg) scaleX(0.8); }

/* The panel sits behind the logo and the X (z-index -1 inside the header), so the whole screen turns pink. */
.mnav-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--pink);
}
/* The names are large on a phone and a little smaller, for the width, on a small tablet. */
.mnav-panel { --menu-size: 8.5vmin; }
@media (min-width: 576px) { .mnav-panel { --menu-size: 6.6vmin; } }
@media (min-width: 768px) { .mnav-panel { --menu-size: 6vmin; } }
.mnav-links { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.mnav-links a, .mfolder > summary, .mfolder-links a {
  display: block;
  padding: 3vw 8vw;
  font-size: var(--menu-size);
  line-height: 1;
  letter-spacing: 0.768px;
  color: inherit;
  text-decoration: none;
}
/* A folder's name with its arrow, and the "Back" line of an opened folder. */
.mfolder-name > *, .mfolder-back > * { display: inline-block; vertical-align: top; }
/* The name itself stays ordinary text, so a long one can run onto a second line and keep its arrow. */
.mfolder-name > .mfolder-title { display: inline; }
.marrow { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 0.5px; stroke-linecap: square; }
.mfolder-name .marrow { margin-left: 0.15em; transform: rotate(-90deg); }
.mfolder-back .marrow { margin-right: 0.15em; transform: rotate(90deg); }
/* The folder holding the page you are on is underlined. (Pages themselves are not, as on the old site.) */
.mfolder.is-current .mfolder-title { background: linear-gradient(currentColor, currentColor) repeat-x 0 calc(100% - 0.098em); background-size: 1px 1px; }
.mfolder-back { display: none; padding: 0 10px; letter-spacing: 0.6528px; opacity: 0.5; }
.mfolder[open] .mfolder-back { display: inline-block; }
.mfolder[open] .mfolder-name { display: none; }
/* An opened folder covers the list with its own pages and a Back line. */
.mfolder[open] {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  background: var(--pink);
}
.mfolder[open] > summary { padding-bottom: calc(3vw + 10px); }
.mnav-social { display: flex; justify-content: center; padding: 15px 0; }
.mnav-social .social { width: 25px; height: 25px; margin: 0 7.5px; }
/* The language switch in the phone menu opens like a folder. */
.mlang { margin: 6vw 0; text-align: center; }
.mlang:not([open]) > summary { padding: 0 20px; line-height: 1.7; letter-spacing: 0.04em; }
.mlang .mfolder-name { display: flex; align-items: center; justify-content: center; }
.mlang .globe { width: 28px; height: 28px; margin: 0 16px 0 8px; }
.mlang .mfolder-links a + a { padding-top: 0; }
.mnav-cta { padding: 4vw 6vw 6vw; text-align: center; }
.mnav-cta .btn { width: 210px; font-size: 1.2rem; }

/* ---------- Page sections and the layout grid ----------
   Every band across a page is a "section" (.sec) holding one grid (.fe).
   The grid copies Squarespace's: 24 columns between the side margins on wide screens,
   8 on phones, and short rows that stretch when the words need more room.
   Each block says where it sits with two settings, written further down, one page at a time:
     --d  on wide screens     --m  on phones
   as  first row / first column line / row after the last / column line after the last.
   Column line 1 is the left edge of the screen; line 2 is where the content starts. */

.sec {
  --pad: calc(var(--sh, 0) * 0.1vmax);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(var(--sh, 0) * 1vh);
  padding-top: var(--pt, var(--pad));
  padding-bottom: var(--pb, var(--pad));
}
.sec-0 { --sh: 0; }
.sec-10 { --sh: 10; }
.sec-s { --sh: 33; }
.sec-40 { --sh: 40; }
.sec-45 { --sh: 45; }
.sec-m { --sh: 66; }
.cream { background: var(--cream); }
.pink { background: var(--pink); }
.gap-0 { --gap: 0px; }

/* The first band of a page starts underneath the header, as on the old site. */
main > .sec:first-child { margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + var(--pt, var(--pad))); }

/* The wavy magenta line at the bottom of a page's first band. */
.sec.has-wave { padding-bottom: calc(var(--pb, var(--pad)) + 4vw); }
.sec.has-wave::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  height: 4vw;
  background: url("/images/wave.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}
@media (max-width: 767px) { .sec.has-wave::after { background-image: url("/images/wave-phone.svg"); } }

/* A first band with a photo behind it. */
.banner { background: var(--ink); }
.banner-img { position: absolute; top: 0; left: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; background: rgba(31, 41, 55, 0.15); }
.banner.bottom { --pt: 6.6vmax; --pb: 3vw; justify-content: flex-end; }
.banner-peer .banner-img { object-position: 49.67% 28.8%; }
.banner-outreach .banner-img { object-position: 49.7% 28%; }
.banner-narcan .banner-img { object-position: 58% 79.2%; }
.banner-items .banner-img { object-position: 7.64% 56%; }
.banner-resources .banner-img { object-position: 49.29% 32.8%; }
.banner-request .banner-img { object-position: 45.56% 19.2%; }
.banner-donate .banner-img { object-position: 42.24% 29.6%; }

.fe {
  display: grid;
  grid-template-columns:
    minmax(calc(var(--gutter) - var(--gap)), 1fr)
    repeat(24, minmax(0, calc((1200px - 23 * var(--gap)) / 24)))
    minmax(calc(var(--gutter) - var(--gap)), 1fr);
  grid-template-rows: repeat(var(--dr, 1), minmax(var(--row), auto));
  grid-column-gap: var(--gap);
  grid-row-gap: var(--gap);
  column-gap: var(--gap);
  row-gap: var(--gap);
}
.fe > * { grid-area: var(--d, auto / 2 / auto / 26); min-width: 0; margin: 0; }
.fe > div > :first-child { margin-top: 0; }
.fe > div > :last-child { margin-bottom: 0; }
.vc { align-self: center; }
.ve { align-self: end; }
@media (max-width: 767px) {
  .fe {
    grid-template-columns: calc(var(--gutter) - var(--gap)) repeat(8, minmax(0, 1fr)) calc(var(--gutter) - var(--gap));
    grid-template-rows: repeat(var(--mr, 1), minmax(var(--row), auto));
  }
  .fe > * { grid-area: var(--m, auto / 2 / auto / 10); }
}

/* A round photo that fills the smaller side of its block and sits in the middle of the other side. */
.round { position: relative; }
.fe > .round > img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; border-radius: 50%; }

/* ---------- Where each block sits, page by page ---------- */

/* Home */
.home-intro { --dr: 31; --mr: 41; }
.home-intro .i1 { --d: 1 / 2 / 3 / 26; --m: 1 / 1 / 5 / 11; }
.home-intro .i2 { --d: 4 / 2 / 10 / 26; --m: 5 / 2 / 17 / 10; }
.home-intro .i3 { --d: 10 / 2 / 19 / 26; --m: 17 / 2 / 28 / 10; }
.home-intro .i4 { --d: 19 / 10 / 22 / 18; --m: 28 / 3 / 30 / 9; transform: translateY(6px); }
.home-intro .i5 { --d: 23 / 5 / 32 / 13; --m: 30 / 2 / 40 / 10; }
.home-intro .i6 { --d: 23 / 15 / 32 / 23; --m: 40 / 2 / 42 / 10; }
.home-peer { --dr: 13; --mr: 19; }
.home-peer .photo { --d: 1 / 12 / 12 / 27; --m: 1 / 2 / 7 / 10; }
.home-peer .text { --d: 3 / 2 / 10 / 12; --m: 8 / 2 / 17 / 10; }
.home-peer .btn { --d: 10 / 4 / 12 / 10; --m: 17 / 4 / 19 / 8; }
.home-outreach { --dr: 12; --mr: 19; }
.home-outreach .photo { --d: 1 / 1 / 12 / 16; --m: 1 / 2 / 7 / 10; }
.home-outreach .text { --d: 2 / 17 / 10 / 25; --m: 8 / 2 / 17 / 10; }
.home-outreach .btn { --d: 10 / 18 / 12 / 24; --m: 17 / 4 / 20 / 8; }
.home-groups { --dr: 13; --mr: 18; }
.home-groups .photo { --d: 1 / 15 / 13 / 25; --m: 1 / 2 / 7 / 10; }
.home-groups .text { --d: 2 / 2 / 10 / 12; --m: 8 / 2 / 17 / 10; }
.home-groups .btn { --d: 10 / 5 / 12 / 9; --m: 17 / 4 / 19 / 8; }
.home-subscribe { --dr: 7; --mr: 10; }
.home-subscribe .newsletter { --d: 1 / 5 / 8 / 23; --m: 1 / 2 / 11 / 10; }

/* Footer (every page) */
.site-footer { --dr: 11; --mr: 20; }
.footer-contact { --d: 1 / 10 / 5 / 18; --m: 2 / 2 / 7 / 10; }
.footer-privacy { --d: 2 / 4 / 4 / 9; --m: 7 / 2 / 10 / 6; }
.footer-equal { --d: 2 / 19 / 4 / 24; --m: 7 / 6 / 10 / 10; }
.sponsor-thriving { --d: 5 / 11 / 9 / 17; --m: 11 / 3 / 15 / 9; }
.sponsor-dcf { --d: 6 / 4 / 8 / 10; --m: 14 / 2 / 18 / 6; }
.sponsor-trust { --d: 6 / 18 / 8 / 24; --m: 14 / 6 / 18 / 10; }
.footer-sponsors { --d: 9 / 2 / 12 / 26; --m: 16 / 2 / 21 / 10; }

/* Page titles on a plain pink band */
.title-band { --dr: 3; --mr: 2; }
.title-band h1 { --d: 1 / 2 / 3 / 26; --m: 1 / 2 / 3 / 10; }
.about-head { --mr: 6; }
.about-head h1 { --m: 1 / 1 / 6 / 11; }
.calendar-head { --mr: 4; }
.calendar-head h1 { --d: 1 / 2 / 4 / 26; --m: 1 / 2 / 5 / 10; }
.team-head h1 { --d: 1 / 10 / 4 / 18; }
.board-head h1 { --d: 1 / 8 / 4 / 20; }

/* About */
.about-body { --dr: 93; --mr: 174; }
.about-body .who { --d: 1 / 2 / 25 / 26; --m: 2 / 3 / 75 / 9; }
.about-body .journey { --d: 27 / 12 / 29 / 16; --m: 76 / 2 / 78 / 10; }
.about-body .timeline { --d: 30 / 12 / 73 / 16; --m: 84 / 4 / 130 / 8; }
.about-body .y2020 { --d: 30 / 6 / 38 / 13; --m: 79 / 1 / 96 / 5; }
.about-body .y2021 { --d: 37 / 15 / 45 / 22; --m: 86 / 7 / 100 / 11; }
.about-body .y2022 { --d: 44 / 6 / 52 / 13; --m: 97 / 1 / 114 / 5; }
.about-body .y2023 { --d: 50 / 15 / 58 / 22; --m: 100 / 7 / 117 / 11; }
.about-body .y2025 { --d: 60 / 6 / 67 / 13; --m: 114 / 1 / 131 / 5; }
.about-body .y2026 { --d: 67 / 15 / 75 / 22; --m: 120 / 7 / 136 / 11; }
.about-body .what { --d: 74 / 2 / 94 / 26; --m: 137 / 2 / 175 / 10; }

/* Community Calendar */
.calendar-body { --dr: 45; --mr: 28; }
.calendar-body .intro { --d: 3 / 5 / 7 / 23; --m: 3 / 2 / 13 / 10; }
.calendar-body .cal { --d: 8 / 2 / 46 / 26; --m: 13 / 2 / 29 / 10; }

/* Pages with a photo across the top */
.banner { --dr: 3; --mr: 1; }
.banner-peer { --dr: 6; }
.banner-outreach { --dr: 18; --mr: 12; }
.peer-body { --dr: 75; --mr: 2; }
.peer-body .text { --d: 1 / 2 / 76 / 26; --m: 1 / 2 / 3 / 10; }
.outreach-body { --dr: 43; --mr: 12; }
.outreach-body .text { --d: 1 / 2 / 44 / 26; --m: 2 / 2 / 13 / 10; }
.narcan-body { --dr: 22; --mr: 19; }
.narcan-body h1 { --d: 2 / 7 / 6 / 21; --m: 2 / 2 / 4 / 10; }
.narcan-body .form-block { --d: 4 / 2 / 23 / 26; --m: 4 / 2 / 20 / 10; padding: 6%; }
.strip { height: var(--row); }
.items-body { --dr: 18; --mr: 8; }
.items-body .text { --d: 3 / 5 / 17 / 24; --m: 2 / 2 / 8 / 10; }
.resources-body { --dr: 16; --mr: 15; }
.resources-body h1 { --d: 1 / 9 / 3 / 19; --m: 1 / 2 / 3 / 10; }
.resources-body .tabs { --d: 3 / 2 / 16 / 26; --m: 3 / 2 / 16 / 10; }
.request-body { --dr: 8; --mr: 29; }
.request-body h1 { --d: 2 / 2 / 4 / 26; --m: 2 / 2 / 5 / 10; }
.request-body .intro { --d: 4 / 2 / 7 / 26; --m: 5 / 2 / 12 / 10; }
.request-body .form-block { --d: 7 / 5 / 8 / 23; --m: 12 / 2 / 30 / 10; }
.donate-body { --dr: 15; --mr: 27; }
.donate-body h1 { --d: 1 / 2 / 3 / 26; --m: 15 / 3 / 17 / 9; }
.donate-body .blurb { --d: 3 / 2 / 6 / 26; --m: 2 / 2 / 15 / 10; }
.donate-body .give { --d: 5 / 5 / 16 / 23; --m: 18 / 3 / 28 / 9; padding: 3%; }

/* The eight provider pages */
.provider-head { --dr: 8; --mr: 7; }
.provider-head h1 { --d: 1 / 5 / 5 / 23; --m: 2 / 2 / 4 / 10; }
.provider-head .intro { --d: 5 / 3 / 9 / 26; --m: 4 / 2 / 8 / 10; }
.provider-head.rows-7 { --dr: 7; }
.provider-head.rows-7 .intro { --d: 5 / 3 / 8 / 26; }
.provider-head.rows-9 { --dr: 9; }
.provider-head.rows-9 .intro { --d: 5 / 3 / 10 / 26; }
.provider-head.title-wide h1 { --d: 1 / 2 / 5 / 26; }
.provider-head.title-mid h1 { --d: 1 / 8 / 5 / 20; }
.provider-head.title-short h1 { --d: 1 / 10 / 4 / 18; }
.provider-head.title-short .intro { --d: 4 / 3 / 9 / 26; }
.provider-head h1 { align-self: center; }
@media (max-width: 767px) { .provider-head h1 { align-self: start; } }
.provider-body { --pb: calc(6.6vmax + 8vw); }
.provider-body .providers { --d: 1 / 3 / 2 / 25; --m: 1 / 2 / 2 / 10; }

/* Policies, thank-you pages and the like: one column of text on pink */
.policy { --dr: 11; --mr: 43; }
.policy .text { --d: 1 / 8 / 12 / 20; --m: 2 / 2 / 43 / 10; }
.policy h1 { font-size: calc(1 * var(--hs) + 1rem); line-height: 1.152em; }
.note-body { --dr: 8; --mr: 8; }
.note-body .text { --d: 2 / 5 / 8 / 23; --m: 2 / 2 / 8 / 10; }

/* Room for longer words. On the old site a few blocks had a box that ran on underneath the block after
   them, so on a narrow phone (or in Spanish, where the wording is longer) the words slid under a button
   or into the next block. Above, each of those boxes now ends where the next block begins (home: "i3" and
   the Peer Services text; Request Services: the title and the introduction). The margins below let the
   words reach as far as they did before without running into what comes next, so nothing moves at the
   sizes the pages were matched at. Only words that would have collided push the next block down.
   (In English the title of the Narcan training page keeps the old site's rows: on a small tablet its third
   line stands level with the form's first label, well to the right of it.) */
@media (max-width: 767px) {
  .home-peer .text { margin-bottom: -5px; } /* the words stop 6px above the button */
  .request-body .intro { margin-bottom: calc(-1 * var(--gap)); } /* the words may reach the form, not enter it */
  html[lang="es"] .request-body .intro { margin-bottom: -5px; } /* in Spanish they stop 6px above it */
}
@media (min-width: 768px) {
  /* The "Get Support" button sits in the middle of three rows, 6px low. As on the old site, the words above
     may run over the first of those rows: on a small tablet their last line just reaches the button... */
  .home-intro .i3 { margin-bottom: calc(-1 * (var(--gap) + var(--row))); }
  /* ...and in Spanish, where there are more words, they stop 6px above it. */
  html[lang="es"] .home-intro .i3 { margin-bottom: calc(28.5px - 2 * var(--gap) - 1.5 * var(--row)); }
  /* The title of the Narcan training page has more words in Spanish, and on a small tablet its last line would
     stand right against the form's first label. So in Spanish the title's box ends where the form begins, and
     the title stops 16px above the form's first line, which starts below the form block's own padding (6% of
     its width). */
  html[lang="es"] .narcan-body h1 { --d: 2 / 7 / 4 / 21; margin-bottom: calc(16px - var(--gap) - 0.06 * var(--content)); }
}
/* A heading in a narrow box, whose longest word is wider than the box, spreads evenly to both sides. */
.about-body .journey, .donate-body h1 { justify-self: center; width: -webkit-min-content; width: min-content; min-width: 100%; }

/* ---------- Home ---------- */

.slideshow { position: relative; height: 92vh; overflow: hidden; background: var(--cream); }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
/* With JavaScript the pictures slide across by themselves and the arrows appear. */
.slideshow.is-live .slides { display: block; position: relative; overflow: hidden; }
.slideshow.is-live .slide { position: absolute; top: 0; left: 0; visibility: hidden; }
.slideshow.is-live .slide.is-current, .slideshow.is-live .slide.is-entering, .slideshow.is-live .slide.is-leaving { visibility: visible; }
.slideshow.is-live .slide.at-left { transform: translateX(-100%); }
.slideshow.is-live .slide.at-right { transform: translateX(100%); }
.slideshow.is-moving .slide { transition: transform 0.6s ease; }
@media (prefers-reduced-motion: reduce) { .slideshow.is-moving .slide { transition: none; } }
.slide-arrow {
  position: absolute;
  top: 50%;
  margin-top: -16px;
  padding: 8px 10px 8px 8px;
  line-height: 0;
  color: var(--ink);
  background: none;
  border: 0;
  opacity: 0.75;
  cursor: pointer;
}
.slide-arrow svg { width: 9px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1; }
.slide-prev { left: 20px; }
.slide-next { right: 20px; padding: 8px 8px 8px 10px; }

.card { padding: 8% 9%; border-radius: 45px; color: #fff; text-align: center; background: var(--card); }
.card.wide-pad { padding: 8% 10%; }

/* The sign-up box. The field and the button stand side by side where both fit on one line (from about 484
   pixels wide), and the button goes under the field where they do not, as on the old site. */
.newsletter { text-align: center; }
.newsletter-head { width: 85%; margin: 0 auto; }
.newsletter-head h2 { font-size: calc(0.5 * var(--hs) + 1rem); line-height: 1.2em; margin: 0 0 1rem; }
.newsletter-head p { margin: 0 0 calc(2rem + 27.2px); }
.newsletter-row { padding: 0 0 16px; }
.newsletter input[type="email"] {
  display: inline-block;
  vertical-align: middle;
  width: 280px;
  max-width: calc(100% - 8px);
  margin: 24px 4px 8px;
  font: inherit;
  line-height: 1.2;
  letter-spacing: inherit;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
  padding: 22.4px 32px;
}
.newsletter .btn { vertical-align: middle; margin: 24px 4px 8px; line-height: 1.2em; padding: 22.4px 32px; }
/* The narrowest phones (under 364 pixels wide): a bigger title, lines closer together, and a field as wide
   as the box with the button under it. */
@media (max-width: 363px) {
  .newsletter-head { width: 100%; }
  .newsletter-head h2 { font-size: 27px; margin-bottom: 14px; }
  .newsletter-head p { line-height: normal; margin-bottom: 47.5px; }
  .newsletter-row { padding: 21px 0 6px; }
  .newsletter input[type="email"] { display: block; width: 100%; max-width: none; margin: 0 0 5px; }
  .newsletter .btn { margin: 11px 0 5px; }
}

/* ---------- Footer ---------- */

.footer-contact { text-align: center; }
.sponsor { position: relative; }
.sponsor img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.footer-sponsors { padding-top: 2.7rem; text-align: center; }
@media (max-width: 767px) { .footer-contact { align-self: start; } }
/* On the narrowest phones the word "Opportunity" needs 2 pixels more than its button has. The old site lets
   the button grow by that much, a pixel on each side, and so does this. */
html[lang="en"] .footer-equal { justify-self: center; width: 100%; min-width: min-content; }

/* ---------- About: the timeline ---------- */

.timeline { position: relative; height: 1100px; }
.timeline::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 100%; margin-left: -1px; background: #000; }
.timeline i { position: absolute; left: 50%; }
.timeline .dot { width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--magenta); }
.timeline .tick { width: 25px; height: 2px; background: #000; }
.timeline .tick.l { margin-left: -35px; }
.timeline .tick.r { margin-left: 10px; }
.timeline .p1 { top: 50px; }
.timeline .k1 { top: 60px; }
.timeline .p2 { top: 240px; }
.timeline .k2 { top: 250px; }
.timeline .p3 { top: 400px; }
.timeline .k3 { top: 410px; }
.timeline .p4 { top: 575px; }
.timeline .k4 { top: 585px; }
.timeline .p5 { top: 800px; }
.timeline .k5 { top: 810px; }
.timeline .p6 { top: 1000px; }
.timeline .k6 { top: 1010px; }
/* On the smallest phones the columns beside the line are too narrow for a few long Spanish words. Those words
   carry a hidden hyphenation point (&shy; in the page file), which is used only there. */
.about-body [class^="y20"] p { -webkit-hyphens: none; hyphens: none; }
@media (max-width: 359px) { .about-body [class^="y20"] p { -webkit-hyphens: manual; hyphens: manual; } }

/* The dots above are one fixed drawing, placed for the English wording at the sizes copied from the old site.
   On small tablets, and in Spanish on phones (longer wording), the entries end up elsewhere and the dots would
   point at nothing. There, each entry carries its own dot and tick beside its second line, and the line runs
   from the first entry to a little past the last dot. "--mark" switches this on; without it nothing is drawn. */
.about-body [class^="y20"] { position: relative; --col: calc(var(--content) / 24); --tick: min(25px, calc(var(--col) - 16px)); }
.about-body [class^="y20"]::before, .about-body [class^="y20"]::after { content: var(--mark); position: absolute; }
.about-body [class^="y20"]::before { top: 31px; left: calc(-1 * var(--col) - 10px); width: 20px; height: 20px; border-radius: 50%; background: var(--magenta); }
.about-body [class^="y20"]::after { top: 41px; left: calc(10px - var(--col)); width: var(--tick); height: 2px; background: #000; }
.about-body .tr[class^="y20"]::before { left: auto; right: calc(-1 * var(--col) - 10px); }
.about-body .tr[class^="y20"]::after { left: auto; right: calc(10px - var(--col)); }
@media (min-width: 768px) and (max-width: 1023px) {
  .about-body .timeline { --d: 30 / 12 / 67 / 16; height: auto; margin-bottom: -131px; }
  .about-body .timeline i { display: none; }
  .about-body [class^="y20"] { --mark: ""; }
}
@media (max-width: 767px) {
  .about-body [class^="y20"] { --col: calc(var(--content) / 8); }
  html[lang="es"] .about-body .timeline { --m: 79 / 4 / 120 / 8; height: auto; margin-bottom: -131px; }
  html[lang="es"] .about-body .timeline i { display: none; }
  html[lang="es"] .about-body [class^="y20"] { --mark: ""; }
}

/* ---------- Team and board ---------- */

.people-sec { padding: 6.6vmax 0; }
.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 100px;
  gap: 100px;
  max-width: calc(1200px + 6vw);
  margin: 0 auto;
  padding: 0 3vw;
  list-style: none;
}
.people li { margin: 0; }
.portrait { position: relative; box-sizing: content-box; height: 1px; padding-top: 133.333%; margin-bottom: 4%; overflow: hidden; }
.portrait img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.people h2 { font-size: calc(0.2 * var(--hs) + 1rem); line-height: 1.152em; margin: 0; }
/* The words under a name are a little smaller than other text. As on the old site, they get smaller still as a
   phone gets taller, keep one size from 768 to 1200 pixels wide, and from there shrink slowly with the width. */
.person-text { margin-top: 1%; font-size: calc(-0.1 * var(--hs) + 1rem); letter-spacing: normal; }
@media (min-width: 768px) { .person-text { font-size: calc(1rem - 1.44px); } }
@media (min-width: 1200px) { .person-text { font-size: calc(1rem - 0.12vw); } }
.person-text p { margin: 1rem 0; }
.person-text > :first-child { margin-top: 0; }
.person-text > :last-child { margin-bottom: 0; }
/* Words the old site kept together on one line ("tieWords" in scripts/build.mjs). The longest of these groups
   are wider than one of three columns on a small tablet, so there they wrap between words like other text. */
.tie { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 829px) { .tie.long { white-space: normal; } }
.people-board .role { text-transform: uppercase; }
/* Three people to a row, two on a large phone or a small tablet held upright, one on a phone. */
@media (max-width: 767px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .people { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Forms ---------- */

.form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.form legend { display: block; padding: 0 0 4px; }
/* A group of fields whose title is hidden still keeps the 4px that lie under a title, as on the old site. */
.form legend.visually-hidden + * { margin-top: 4px; }
.field { margin: 0 0 20px; }
.field > label { display: block; padding-bottom: 4px; }
/* "(required)" stands 8.4px after the words of its label: the space between them and a little more. */
.req { margin-left: 3.6px; opacity: 0.7; white-space: nowrap; }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: transparent;
  border: 2px solid rgba(31, 41, 55, 0.55);
  border-radius: 28px;
  padding: 10px 20px;
}
.field textarea { height: 100px; resize: vertical; }
.name-row { display: flex; }
.name-row .field { flex: 1 1 0%; min-width: 0; }
.name-row .field + .field { margin-left: 10px; }
.name-row .field > label { display: flex; flex-wrap: wrap; align-items: baseline; padding: 4px 0 2px; }
.name-row .field > label > span:first-child { margin-right: 8.4px; }
.name-row .req { margin-left: 0; line-height: 16px; }
.form-actions { text-align: center; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 0 0 20px; text-align: center; }
.form-status { margin: 16px 0 0; text-align: center; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.err { color: #8a1c1c; }
.form-status:focus { outline: none; }
.safety { margin: 0 0 20px; text-align: center; }

/* ---------- Donate ---------- */

.give { text-align: left; }
.give fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
/* The amounts sit side by side and drop to the next row when they run out of room, 16px apart. */
.amounts { display: flex; flex-wrap: wrap; margin: 4px -16px -16px 0; }
.amounts label { position: relative; margin: 4px 16px 16px 0; padding-right: 4px; cursor: pointer; }
.amounts input[type="radio"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.amounts span { position: relative; display: block; padding: 15px 30px; text-align: center; background: rgba(250, 248, 244, 0.8); border: 2px solid transparent; border-radius: 33px; transition: background-color 0.15s; }
.amounts span::before { content: ""; position: absolute; top: -2px; right: -2px; bottom: -2px; left: -2px; border: 2px solid rgba(31, 41, 55, 0.55); border-radius: 33px; }
.amounts input:checked + span { color: var(--cream); background: var(--ink); }
.amounts input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.custom-amount { display: none; }
.give.custom .custom-amount { display: block; }
.select-wrap { position: relative; }
.select-wrap select { padding: 10px 42px 10px 20px; white-space: nowrap; text-overflow: ellipsis; -webkit-appearance: none; appearance: none; cursor: pointer; }
.select-arrow { position: absolute; right: 22px; bottom: 19.6px; pointer-events: none; }
.total { display: flex; justify-content: space-between; margin: 0 0 20px; font-weight: 700; line-height: normal; }

/* ---------- Community Resources: the two tabs ---------- */

.resources-body h1 { font-size: calc(var(--content) * 0.03863 - 0.6px); line-height: 1; }
.tabs { width: 100%; max-width: 1100px; margin: 40px auto; }
.tab-links { display: flex; justify-content: center; max-width: 600px; margin: 0 auto 30px; padding: 0; list-style: none; }
/* Both tabs are as tall as the taller one, and each name starts at the top of its tab, as on the old site. */
.tab-links li { flex: 1 1 0%; display: flex; margin: 0; }
.tab-links li + li { margin-left: 15px; }
.tab-btn {
  flex: 1 1 auto;
  display: block;
  padding: 12px 28px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: #1f6fb2;
  background: #f2f5f8;
  border: 1px solid #d7e2ef;
  border-radius: 30px;
  transition: 0.25s;
}
.tab-btn.active { color: #fff; background: #1f6fb2; }
.tab-panel > h2 { text-align: center; }
.js-tabs .tab-panel { display: none; }
.js-tabs .tab-panel.active { display: block; }
.js-tabs .tab-panel > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tab-grid { display: flex; flex-wrap: wrap; justify-content: center; margin: -10px; }
.tab-card {
  flex: 0 0 338px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 148px;
  margin: 10px;
  padding: 18px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: #1f6fb2;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  transition: 0.25s;
}
.tab-card:hover { transform: translateY(-3px); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.07); }
.tab-card span { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.7rem; color: #666; }
@media (max-width: 767px) { .resources-body h1 { font-size: 8.16vw; } }
/* On phones the live cards are a little wider than the column they sit in. */
@media (max-width: 700px) { .tab-card { flex: 0 0 calc(100% + 18px); } }

/* ---------- Provider pages ---------- */

/* The cards come from content/providers.json (see the note above renderProviders in scripts/build.mjs).
   On a phone they stand one under another. From 768 pixels up they copy the old site's hand-placed grid:
   three cards to a row, and all the cards of a page share one set of grid rows. One card is 13 rows tall: the
   logo's box is rows 0 to 10, the name lies over the last two of those, then the phone number and the
   button (2 rows). A name that needs more room than its rows have makes those rows taller, for the cards
   beside it too, so the names, numbers and buttons of a row of cards always line up. */
.providers {
  --unit: calc(var(--row) + var(--gap)); /* one grid row plus the space under it */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-row-gap: var(--gap);
  row-gap: var(--gap);
  padding: 0;
  list-style: none;
  text-align: center;
}
.provider { margin: 0; }
.provider-logo { position: relative; }
/* The logo is made as big as fits in its box, keeping its shape, and sits in the middle of it. */
.provider-logo img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; border-radius: 20px; }
.provider-name { margin: 0; font-size: calc(0.6 * var(--hs) + 1rem); line-height: 1.171em; }
.provider-phone { margin: 0; }
@media (min-width: 768px) {
  /* A card is 6 of the page's 24 columns wide, and 2 columns lie between two cards. */
  .providers { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column-gap: calc(100% / 11 + 12px); column-gap: calc(100% / 11 + 12px); padding-bottom: calc(var(--tail, 0) * var(--unit)); }
  /* Set by the words on a page's "include: providers" line. */
  .lead-1 { --lead: 1; } .lead-2 { --lead: 2; } .lead-3 { --lead: 3; } .lead-4 { --lead: 4; } .lead-5 { --lead: 5; } .lead-6 { --lead: 6; }
  .tail-1 { --tail: 1; } .tail-2 { --tail: 2; } .tail-3 { --tail: 3; } .tail-4 { --tail: 4; } .tail-5 { --tail: 5; } .tail-6 { --tail: 6; }
  .drop-1 { --drop: 1; } .drop-2 { --drop: 2; } .drop-3 { --drop: 3; } .drop-4 { --drop: 4; } .drop-5 { --drop: 5; } .drop-6 { --drop: 6; }
  .ls-m2 { --ls: -2; } .ls-m1 { --ls: -1; } .ls-1 { --ls: 1; } .ls-2 { --ls: 2; }
  .le-8 { --le: 8; } .le-9 { --le: 9; } .le-11 { --le: 11; } .le-12 { --le: 12; }
  .providers.tight { --pitch: 12; } /* each row of cards starts one grid row early, over the foot of the row before */
}
@supports (display: contents) and (grid-row-start: calc(1 + 1)) {
  @media (min-width: 768px) {
    .providers { grid-auto-rows: minmax(var(--row), auto); }
    /* The parts of every card are placed straight onto the list's own grid. */
    .provider, .provider-top { display: contents; }
    .provider:nth-child(3n + 1) { --c: 1; }
    .provider:nth-child(3n + 2) { --c: 2; }
    .provider:nth-child(3n) { --c: 3; }
    /* "--cr" counts the rows of cards above a card; "--top" is the grid row its card starts on. */
    .provider { --top: calc(1 + var(--lead, 0) + var(--drop, 0) + var(--cr, 0) * var(--pitch, 13)); }
    .provider:nth-child(n + 4) { --cr: 1; } .provider:nth-child(n + 7) { --cr: 2; } .provider:nth-child(n + 10) { --cr: 3; } .provider:nth-child(n + 13) { --cr: 4; } .provider:nth-child(n + 16) { --cr: 5; } .provider:nth-child(n + 19) { --cr: 6; } .provider:nth-child(n + 22) { --cr: 7; } .provider:nth-child(n + 25) { --cr: 8; } .provider:nth-child(n + 28) { --cr: 9; }
    .provider-logo, .provider-name, .provider-phone, .provider .btn { grid-column: var(--c); }
    /* A logo's box may reach under the name and the number, and over the foot of the card above: the words and
       the buttons stay on top, and a click goes through the box to them. */
    .provider-logo { grid-row: calc(var(--top) + var(--ls, 0)) / calc(var(--top) + var(--le, 10)); pointer-events: none; }
    .provider-name, .provider-phone, .provider .btn { position: relative; z-index: 1; }
    .provider-name { grid-row: calc(var(--top) + var(--ns, 8)) / calc(var(--top) + var(--ne, 10)); align-self: end; }
    .provider-name.top { align-self: start; }
    .provider-name.tall { --ns: 7; }
    .provider.up .provider-name { --ns: 7; --ne: 9; align-self: center; }
    /* One line of a phone number is taller than a grid row on most screens and runs on into the gap under it,
       which the margin allows for. A number that needs a second line (one with an extension, on a small
       tablet) makes its row taller instead, so the button moves down and never covers it. */
    .provider-phone { grid-row: calc(var(--top) + var(--ps, 10)); align-self: start; margin-bottom: calc(var(--row) - 1.7em); }
    .provider.up .provider-phone { --ps: 9; }
    .provider .btn { grid-row: calc(var(--top) + 11) / calc(var(--top) + 13); }
  }
}
/* A browser too old for the grid above (before 2018) shows plain cards instead: logo, name, number, button. */
@supports not ((display: contents) and (grid-row-start: calc(1 + 1))) {
  @media (min-width: 768px) {
    .providers { grid-row-gap: calc(2 * var(--unit)); row-gap: calc(2 * var(--unit)); padding-top: calc(var(--lead, 0) * var(--unit)); }
    .provider, .provider-top { display: flex; flex-direction: column; }
    .provider-top { flex: 1 0 auto; }
    .provider-logo { flex: 1 0 auto; min-height: calc(7 * var(--unit)); }
    .provider-name, .provider-phone, .provider .btn { margin-top: var(--gap); }
    .provider-phone { min-height: 1.7em; }
    .provider .btn { min-height: 52px; }
  }
}
@media (max-width: 767px) {
  .provider-logo { height: 374px; }
  .provider-name { display: flex; align-items: center; justify-content: center; min-height: 59px; margin: var(--gap) 0 0; }
  .provider-name.top { align-items: flex-start; }
  .provider-phone { height: 59px; margin-top: var(--gap); }
  .provider .btn { height: 59px; margin-top: var(--gap); }
  /* A page's "phones:" order and "name.short" (see the note above renderProviders in scripts/build.mjs). */
  .ph-1 { order: 1; } .ph-2 { order: 2; } .ph-3 { order: 3; } .ph-4 { order: 4; } .ph-5 { order: 5; } .ph-6 { order: 6; } .ph-7 { order: 7; } .ph-8 { order: 8; } .ph-9 { order: 9; } .ph-10 { order: 10; } .ph-11 { order: 11; } .ph-12 { order: 12; } .ph-13 { order: 13; } .ph-14 { order: 14; } .ph-15 { order: 15; } .ph-16 { order: 16; } .ph-17 { order: 17; } .ph-18 { order: 18; } .ph-19 { order: 19; } .ph-20 { order: 20; } .ph-21 { order: 21; } .ph-22 { order: 22; } .ph-23 { order: 23; } .ph-24 { order: 24; } .ph-25 { order: 25; } .ph-26 { order: 26; } .ph-27 { order: 27; } .ph-28 { order: 28; } .ph-29 { order: 29; } .ph-30 { order: 30; }
  .provider-logo.ph-short { height: 199px; }
}

/* ---------- Community Calendar ----------
   The calendar has four looks, chosen by its own width (calendar.js measures it and names the look):
     wide                 more than 770 pixels across
     .small               770 or less: smaller words
     .compact             600 or less: each day is a small square; a tap opens its details under or over it
     .tiny                300 or less: the details show the names only
   calendar.js also sets the width of the month (every day is a whole number of pixels wide) and --day,
   the height of a day. */

.cal { align-self: start; }
.cal-head { display: flex; margin-bottom: 34px; }
.cal-label { flex: none; width: 72%; margin: 0; font-family: var(--heading); font-size: 28px; font-weight: 400; line-height: 36px; letter-spacing: normal; text-align: center; }
.cal-nav { flex: none; display: flex; align-items: center; width: 14%; height: 36px; padding: 0 0 0 4px; font-size: 18px; color: inherit; background: none; border: 0; border-radius: 0; cursor: pointer; }
.cal-nav.next { justify-content: flex-end; padding: 0 4px 0 0; }
.cal-nav svg { display: block; width: 1em; height: 1em; overflow: visible; fill: none; stroke: currentColor; stroke-width: 6.36; }
.cal-table { width: 100%; margin: 0 auto calc(var(--spare, 0) * 4px); border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal-table th { padding: 1px 1px 10px; font-size: 12px; font-weight: 400; line-height: 12px; letter-spacing: 0.5px; text-align: center; text-transform: uppercase; opacity: 0.7; }
.cal-table td { position: relative; height: 166px; height: var(--day, 166px); padding: 1px; vertical-align: top; background: rgba(110, 110, 110, 0.05); }
.cal-table td.today { background: rgba(110, 110, 110, 0.1); }
.daynum { position: absolute; top: 5px; right: 5px; min-width: 30px; height: 30px; font-size: 12px; line-height: 30px; text-align: center; }
.daynum span { opacity: 0.7; }
.day-events { margin: 0; padding: 35px 0 8px; list-style: none; }
.day-events li { margin: 0 10px 7px; font-size: 12px; line-height: 14px; }
.day-events a { display: inline-block; color: inherit; text-decoration: none; }
.day-events a:hover { opacity: 0.7; }
.day-events .when { display: block; font-weight: 700; }
.cal-note { margin: 24px 0 0; text-align: center; }
.cal-preview { margin: 0 0 24px; padding: 10px 16px; text-align: center; color: var(--ink); background: #fff; border: 2px dashed var(--draft); }

/* The grey box of details beside a day */
.flyout {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 5;
  width: calc(200% + 8px); /* as wide as two days... */
  min-height: 100%;
  height: calc(200% + 4px); /* ...and as tall as two rows of them... */
  height: var(--fly-h, calc(200% + 4px)); /* ...(calendar.js works out the exact height) */
  padding: 17px;
  overflow-x: hidden;
  overflow-y: scroll;
  text-align: left;
  background: #eee;
  background-clip: padding-box;
  border: 0 solid transparent;
  border-left-width: 4px; /* a small gap between the day and its box */
}
.cal-table td:nth-child(n+6) .flyout { left: auto; right: 100%; border-width: 0 4px 0 0; }
.cal-table tr:nth-child(n+4) .flyout { top: auto; bottom: 0; }
.cal-table td:hover .flyout { display: block; }
.cal-table td:focus-within .flyout { display: block; }
/* Touch screens have no hover: a tap opens the box and a second tap closes it (see calendar.js). */
@media (hover: none) {
  .cal-table td:hover .flyout { display: none; }
  .cal-table td.selected .flyout { display: block; }
  .cal-table td:focus-within .flyout { display: block; }
}
.fly-item { margin: 0 0 17px; }
.fly-item + .fly-item { padding-top: 17px; border-top: 1px solid rgba(110, 110, 110, 0.1); }
.cal .fly-item:last-child { margin-bottom: 0; }
.fly-title { display: block; font-family: var(--heading); font-size: 16px; line-height: 18px; letter-spacing: normal; color: #333; text-decoration: none; }
.fly-arrow { font-size: 10px; line-height: 15px; }
.fly-item p { margin: 0; font-size: 12px; line-height: 15px; color: #333; }
.fly-item .fly-time, .fly-item .fly-place, .fly-item .fly-text { margin-top: 11.33px; }
.fly-item .fly-place, .fly-item .fly-text { white-space: pre-line; }

/* Small: 770 pixels or less */
.small .cal-label { font-size: 24px; line-height: 32px; }
.small .cal-nav { height: 32px; font-size: 16px; }
.small .daynum { min-width: 20px; height: 20px; font-size: 11px; line-height: 20px; }
.small .day-events { padding: 28px 0 6px; }
.small .day-events li { margin: 0 8px 7px; }
.small .day-events a { font-size: 11px; line-height: 13px; }
.small .flyout { padding: 15px; }
.small .fly-item { margin-bottom: 15px; }
.small .fly-item + .fly-item { padding-top: 15px; }
.small .fly-item .fly-time, .small .fly-item .fly-place, .small .fly-item .fly-text { margin-top: 10px; }

/* Compact: 600 pixels or less. The days are small squares with only their number; a day with something on
   is darker, and its details hang under it (over it, in the lower half of the month) with a small arrow. */
.compact .cal-label { font-size: 20px; line-height: 26px; }
.compact .cal-nav { height: 27.8px; padding: 1.8px 0 0 10px; font-size: 15px; }
.compact .cal-nav.next { padding: 1.8px 10px 0; }
.compact .cal-table { margin-bottom: calc(var(--spare, 0) * 8px); border-spacing: 8px; }
.compact .cal-table th { letter-spacing: 1px; }
.compact .cal-table td { vertical-align: middle; text-align: center; background: none; }
.compact .cal-table td.today { background: none; border: 1px solid rgba(110, 110, 110, 0.2); }
.compact .cal-table td.has-events { background: rgba(110, 110, 110, 0.1); cursor: pointer; }
.compact .daynum { position: static; display: inline-block; height: auto; font-size: 16px; line-height: 27.2px; }
.compact .daynum span { font-size: 11px; line-height: 11px; opacity: 1; }
.compact .day-events { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }
.compact .cal-table td .flyout {
  top: 100%;
  bottom: auto;
  left: 50%;
  right: auto;
  width: 450%;
  min-height: 0;
  height: auto;
  margin-left: -225%;
  overflow: visible;
  background-color: #ddd;
  border-width: 8px 0 0;
}
.compact .flyout::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: solid transparent; border-width: 0 6px 6px; border-bottom-color: #ddd; }
/* Sunday, Monday, Friday and Saturday keep their box on the screen. */
.compact .cal-table td:nth-child(-n+2) .flyout { left: 0; margin-left: 0; }
.compact .cal-table td:nth-child(-n+2) .flyout::before { left: 7%; margin-left: 0; }
.compact .cal-table td:nth-child(n+6) .flyout { left: auto; right: 0; margin-left: 0; }
.compact .cal-table td:nth-child(n+6) .flyout::before { left: auto; right: 7%; margin-left: 0; }
.compact .cal-table tr:nth-child(n+4) td .flyout { top: auto; bottom: 100%; border-width: 0 0 8px; }
.compact .cal-table tr:nth-child(n+4) .flyout::before { top: auto; bottom: -6px; border-width: 6px 6px 0; border-color: #ddd transparent transparent; }

/* Tiny: 300 pixels or less. The details always open over the day, and show only the names. */
.tiny .cal-head { margin-bottom: 10px; }
.tiny .cal-label { font-family: inherit; font-size: 16px; line-height: 20px; }
.tiny .cal-nav { height: 27.2px; padding: 0 0 0 6px; font-size: 11px; }
.tiny .cal-nav.next { padding: 0 6px; }
.tiny .cal-table { margin-bottom: calc(var(--spare, 0) * 4px); border-spacing: 4px; }
.tiny .cal-table th { padding-bottom: 5px; font-size: 10px; line-height: 10px; }
.tiny .cal-table td .flyout { top: auto; bottom: 100%; padding: 12px; border-bottom-width: 4px; }
.tiny .cal-table td .flyout::before { top: auto; bottom: -6px; border-width: 6px 6px 0; border-color: #ddd transparent transparent; }
.tiny .fly-item { margin-bottom: 12px; }
.tiny .fly-item + .fly-item { padding-top: 12px; }
.tiny .fly-title { font-size: 12px; line-height: normal; }
.tiny .fly-item p { display: none; }

/* ---------- Event list and single event (magenta pages) ---------- */

/* The list is at least a third of a screen tall below the header, however few events there are. */
.events-sec { min-height: calc(33vh + var(--header-h)); padding: 3.3vw 3vw; color: var(--pink); background: var(--magenta); }
main > .events-sec:first-child { margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + 3.3vw); }
.events-sec a { color: inherit; }
.ev { position: relative; display: flex; margin: 0; }
.ev + .ev { margin-top: 68px; }
.ev-date { position: relative; flex: none; width: 70px; height: 70px; padding-top: 9px; color: #333; text-align: center; letter-spacing: normal; background: #e8ecec; }
.ev-month { display: block; margin: 6px 0 3px; font-size: 14px; line-height: 14px; text-transform: uppercase; }
.ev-day { display: block; font-size: 26px; line-height: 26px; }
.ev-info { flex: 1 1 0%; min-width: 0; padding-left: 34px; }
.ev-title { margin: 0 0 17px; font-size: 28px; line-height: 33.6px; }
.ev-title a { text-decoration: none; }
.ev-meta { margin: 0 0 17px; padding: 0; list-style: none; }
.ev-meta li { margin: 0; }
.ev-meta a { text-decoration: none; }
.events-sec .ev-btn { display: inline-block; margin: 5.67px 0 25.5px; padding: 16px 20.8px; font-family: var(--button); line-height: normal; letter-spacing: 0; text-decoration: none; color: var(--magenta); background: var(--pink); border-radius: 10px; }
.ev-btn:hover { opacity: 0.8; }
.ev-rule { height: 0; margin: 34px 0; border: 0; border-top: 1px solid rgba(230, 230, 230, 0.8); }
.ev.past .ev-month, .ev.past .ev-day { opacity: 0.3; }
/* A thin line struck through the date of an event that is over. */
.ev.past .ev-date::after { content: ""; position: absolute; top: 0; left: 35px; width: 1px; height: 85px; background: #000; transform: rotate(38deg); }
.ev-status { margin: 0; }
.events-sec .cal-preview { margin-bottom: 34px; }
@media (max-width: 767px) {
  .events-sec { padding: 3.3vw 6vw; }
  main > .events-sec:first-child { padding-top: calc(var(--header-h) + 3.3vw); }
  .ev, .ev + .ev { display: block; margin-top: 34px; }
  .ev-info { padding: 25.5px 0 0; }
}

/* One event. The page is at least a screen tall below the header, as on the old site. */
.event-page { min-height: calc(100vh + var(--header-h) + 20vw); padding-bottom: 10vw; }
main > .event-page:first-child { padding-top: calc(var(--header-h) + 10vw); }
/* The arrow in front of "Back to All Events" is drawn here, in a box of its own, so that the words start at
   the same place whatever arrow the visitor's device has. */
.event-back { display: inline-block; margin: 0 0 51px; text-decoration: none; }
.event-back::before { content: "\2190  "; display: inline-block; width: 16px; margin-right: 4px; }
.event-cols { display: flex; }
.event-meta { flex: 0 0 30%; min-width: 0; }
.event-meta h1 { margin: 0 0 34px; font-size: 28px; line-height: 33.6px; }
.event-meta ul { margin: 0 0 17px; padding: 0; list-style: none; font-size: 14.4px; line-height: 1.6em; }
.event-meta li { margin: 0; line-height: 1.6em; }
.event-meta a { text-decoration: none; }
.event-place { display: block; }
/* The description is a pile of blocks: words, a button, the flyer. */
.event-text { flex: 1 1 0%; min-width: 0; padding: 0 0 17px 34px; }
.event-block { margin: 0; }
.event-block + .event-block { margin-top: 34px; }
.event-block:last-child:not(:first-child) { margin-bottom: 17px; }
.event-words > * { margin: 16px 0; }
.event-words > h2 { margin: 32px 0; }
.event-words > :first-child { margin-top: 0; }
.event-words > :last-child { margin-bottom: 0; }
.event-words p, .event-words li, .event-words h2 { white-space: pre-wrap; }
.event-button { text-align: center; }
.events-sec .event-button .ev-btn { margin: 0; vertical-align: top; }
.event-flyer img { display: block; width: 100%; height: auto; margin: 0 auto; }
/* The links to the earlier and the later event, as on the old site: each has half of the width, an arrow, and 25px
   between the arrow and the words. */
.event-pager { display: flex; padding: 3vw; }
.event-pager:empty { display: none; }
.event-pager a { display: flex; align-items: center; max-width: 50%; text-decoration: none; }
.event-pager .next { margin-left: auto; text-align: right; }
.event-pager svg { flex: none; width: 18px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1; }
.event-pager .prev svg { margin-right: 25px; }
.event-pager .next svg { margin-left: 25px; }
/* On a phone one word of a name ("Fellowship", "Prevention") can be wider than its half, and on the old site the
   two names then ran into each other. Where that would happen, calendar.js (fitPager) marks the links "tight",
   and the later event goes under the earlier one, each with the whole width. So two names never touch. No word
   is cut in two, unless a single word is wider than the whole screen. Wherever the old site's layout works,
   nothing differs from it. */
.event-pager.tight { flex-wrap: wrap; }
.event-pager.tight a { flex: 0 0 100%; max-width: 100%; }
.event-pager.tight a > span { min-width: 0; }
.event-pager.tight .next { justify-content: flex-end; }
.event-pager.tight .prev + .next { margin-top: 24px; }
.event-pager small { display: block; margin-bottom: 16px; font: 16px/24px Arial, Helvetica, sans-serif; letter-spacing: normal; }
.event-pager b { display: block; font-family: var(--heading); font-size: calc(0.5 * var(--hs) + 1rem); font-weight: 400; line-height: 1; letter-spacing: -0.02em; }
@media (max-width: 767px) {
  .event-cols { display: block; }
  .event-meta { margin-bottom: 34px; }
  .event-meta h1 { margin-bottom: 17px; }
  .event-text { padding: 17px 0 34px; }
  .event-pager { padding: 3vw 6vw; }
}

/* ---------- Draft notes: delete each one when the real content goes in ---------- */

.draft-note, .draft-slot {
  margin: 0 0 24px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 2px dashed var(--draft);
}

.draft-wrap { padding: 0 3vw 24px; }
.draft-wrap .draft-note { max-width: 900px; margin: 0 auto; }

@media print {
  .site-header { position: static; box-shadow: none; }
  .nav, .header-actions, .mnav, .slideshow { display: none; }
}
