/* Sisters of St Joseph of the Apparition — mobile-first classic UI
   Palette and metrics taken from "SJA Mobile.dc.html" (design source). */

:root {
  --sja-900: #004a9b;
  --sja-800: #004aad;
  --sja-600: #046bd2;
  --sja-500: #045cb4;
  --sja-300: #75c2ec;
  --sja-200: #b0d6f7;
  --sja-deep: #00305f;
  --sja-quote: #000062;
  --tint: #f4f9fe;
  --ink: #1e293b;
  --muted: #475569;
  --slate: #334155;
  --page: #eef2f6;
  --serif: 'Inknut Antiqua', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sja-600); }
a:hover { color: var(--sja-500); }

img { max-width: 100%; }

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

/* ── the phone-width column, centred and allowed to grow on wide screens ── */

.screen {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #fafafa 0%, var(--sja-200) 100%);
  box-shadow: 0 24px 60px -18px rgba(0, 49, 95, .45), 0 8px 20px rgba(15, 23, 42, .10);
  overflow: hidden;
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .screen { max-width: 720px; min-height: 0; border-radius: 4px; }
}

/* ── header ── */

.bar {
  background: #ffffff;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 24px -10px rgba(0, 49, 95, .45);
}

.bar__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.bar__logo { flex: 0 0 auto; }

.bar__logo img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.bar__title {
  flex: 1 1 auto;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.35;
  color: var(--sja-900);
}

.burger {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  background: var(--sja-900);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(0, 49, 95, .8);
}

.burger span {
  display: block;
  height: 2px;
  background: #ffffff;
}

.bar__search {
  display: flex;
  align-items: stretch;
  background: var(--tint);
  margin: 0;
}

.bar__field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-width: 0;
}

.bar__field svg { fill: var(--sja-900); flex: 0 0 auto; }

.bar__field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.bar__lang {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.lang-on,
.lang-off {
  display: block;
  padding: 0 12px;
  line-height: 44px;
  font-size: 13px;
  letter-spacing: .06em;
}

.lang-on {
  font-weight: 600;
  color: #ffffff;
  background: var(--sja-900);
}

.lang-off { color: var(--sja-900); opacity: .55; cursor: default; }

/* ── navigation drawer ── */

.drawer {
  background: linear-gradient(180deg, var(--sja-200) 0%, #fafafa 100%);
  box-shadow: 0 16px 30px -16px rgba(0, 49, 95, .5);
}

.drawer[hidden] { display: none; }

.nav-item { margin: 0 0 6px; }

.nav-row {
  display: flex;
  align-items: stretch;
}

.nav-row.is-current { background: var(--sja-200); }

.nav-link,
.nav-label {
  flex: 1 1 auto;
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--sja-900);
  text-decoration: none;
}

.nav-label { color: var(--sja-900); }

.nav-arrow {
  flex: 0 0 auto;
  width: 52px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow svg { fill: var(--sja-900); transition: transform .2s ease; }

.nav-arrow[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-children {
  background: #ffffff;
  box-shadow: inset 0 8px 14px -12px rgba(0, 49, 95, .5);
}

.nav-children[hidden] { display: none; }

.nav-child {
  display: block;
  padding: 13px 16px 13px 34px;
  font-size: 15px;
  color: var(--sja-800);
  text-decoration: none;
}

.nav-child.is-current { font-weight: 600; }

/* pages of the site that have not been built yet */
.is-pending {
  color: var(--muted);
  opacity: .6;
  cursor: default;
}

.drawer__lang {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 14px;
  color: var(--sja-900);
}

.drawer__lang .on {
  padding: 6px 12px;
  background: var(--sja-900);
  color: #ffffff;
}

.drawer__lang .off {
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 6px;
  color: var(--sja-900);
  box-shadow: 0 6px 14px -6px rgba(0, 49, 95, .55);
  opacity: .55;
}

/* ── hero ── */

.hero {
  position: relative;
  margin: 0;
  background: var(--sja-900);
}

.hero img { display: block; width: 100%; height: auto; }

.hero figcaption {
  padding: 10px 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #ffffff;
  background: var(--sja-900);
}

/* ── breadcrumb ── */

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 11px 16px;
  background: var(--tint);
  font-size: 13px;
  color: var(--slate);
}

.crumbs a { color: var(--sja-600); text-decoration: none; }
.crumbs .sep { color: var(--sja-300); }

/* ── generic prose block ── */

.block { padding: 22px 18px 24px; }
.block--tight { padding: 22px 18px 8px; }

h1.title,
h2.title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.4;
  color: var(--sja-800);
}

h1.title { font-size: 23px; }
h2.title { font-size: 19px; }

.rule {
  width: 64px;
  height: 2px;
  background: var(--sja-300);
  margin: 0 0 14px;
}

.block p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
}

blockquote.quote {
  margin: 0 0 20px;
  padding: 2px 0 2px 16px;
  border-left: 5px solid rgba(0, 0, 0, .05);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sja-quote);
}

blockquote.quote p { margin: 0 0 6px; color: inherit; }

blockquote.quote cite {
  font-style: normal;
  font-size: 13px;
  color: var(--slate);
}

.figure { margin: 0 0 20px; }

.figure img,
.photo {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 40px -20px rgba(0, 49, 95, .6);
}

.photo { margin: 0 0 18px; }

.figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
}

.btn {
  display: inline-block;
  margin-top: 18px;
  padding: 13px 26px;
  background: var(--sja-600);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 24px -10px rgba(4, 107, 210, .8);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.btn:hover { color: #ffffff; }

/* ── foundress card ── */

.foundress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 22px 18px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 14px 30px -18px rgba(0, 49, 95, .5);
}

.foundress__frame {
  width: 168px;
  height: 214px;
  padding: 9px;
  border-radius: 50%;
  background: #f6f1e4;
  box-shadow: 0 18px 34px -16px rgba(0, 49, 95, .55),
              inset 0 0 0 6px #ffffff,
              inset 0 0 0 9px var(--sja-200);
}

.foundress__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(0, 49, 95, .35);
}

.foundress__name {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  color: var(--sja-900);
  text-align: center;
}

.foundress__note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.foundress a { font-size: 14px; text-decoration: underline; }

/* ── cards and list rows ── */

.card {
  margin: 0 18px 24px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 34px -18px rgba(0, 49, 95, .5);
}

.card--flush { margin: 0 0 4px; border-radius: 10px; }

.card__head {
  margin: 0;
  padding: 14px 18px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
  background: var(--sja-900);
}

.card__subhead {
  padding: 12px 16px;
  background: var(--tint);
  font-family: var(--serif);
  font-size: 15px;
  color: var(--sja-900);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  text-decoration: none;
  box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35);
}

.row__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.row__title {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--sja-900);
}

.row__note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.row--plain {
  padding: 15px 16px;
  font-size: 15px;
  color: var(--sja-800);
  text-decoration: none;
}

.chev { flex: 0 0 auto; fill: var(--sja-300); transform: rotate(-90deg); }

/* ── news ── */

.news-item {
  padding: 14px 16px;
  margin: 0 0 12px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 26px -16px rgba(0, 49, 95, .5);
}

.news-item__date {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sja-600);
  font-weight: 600;
  margin-bottom: 5px;
}

.news-item__title {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  color: var(--sja-800);
  text-decoration: none;
}

.block > a.more { font-size: 15px; color: var(--sja-600); text-decoration: underline; }

/* ── footer: contact panel on top, name, links and legal beneath ── */

.foot {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(117, 194, 236, .40) 0%, rgba(117, 194, 236, 0) 55%),
    linear-gradient(165deg, var(--sja-800) 0%, var(--sja-deep) 100%);
}

.foot::after {
  content: '';
  position: absolute;
  right: -50px;
  top: 40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}

.foot__contact {
  position: relative;
  padding: 28px 18px 24px;
}

.foot__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sja-200);
}

.foot__title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.35;
  color: #ffffff;
  text-wrap: balance;
}

.foot__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}

.foot__btn {
  margin: 0 0 22px;
  background: #ffffff;
  color: var(--sja-900);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .55);
}

.foot__btn:hover { color: var(--sja-600); }

.foot__details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

.foot__details li { display: flex; align-items: center; gap: 10px; }
.foot__details svg { flex: 0 0 auto; color: var(--sja-300); }
.foot__details a { color: #ffffff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.foot__details a:hover { border-bottom-color: #ffffff; color: #ffffff; }

.foot__bottom {
  position: relative;
  margin: 0 18px;
  padding: 24px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 0 -10px 16px;
}

.foot__links a,
.foot__links span.is-pending {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--sja-200);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.foot__links a:hover,
.foot__links a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, .12);
  outline: none;
}

.foot__links span.is-pending { opacity: .5; }

.foot__legal {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 15px;
  color: var(--sja-200);
}

@media (min-width: 700px) {
  .foot__contact {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    column-gap: 36px;
    align-items: center;
    padding: 34px 28px 30px;
  }
  .foot__btn { margin-bottom: 0; }
  .foot__details { gap: 14px; }
  .foot__bottom { margin: 0 28px; }
}

/* ── interactive map ── */

.map-card {
  position: relative;
  margin: 0 18px 18px;
  /* the search results drop below the map, over the note, so the card cannot
     clip; the frame and the note round their own corners instead */
  overflow: visible;
}

.map-frame {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  /* the page still scrolls over the map, but a pinch zooms the map */
  touch-action: pan-x pan-y;
  border-radius: 10px 10px 0 0;
}

/* search over the map: a round button that opens into a field, with the
   matches listed below it (styled like the site search suggestions) */
.map-search {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  z-index: 8;
  pointer-events: none;
}

.map-search__open,
.map-search__box,
.map-search__list { pointer-events: auto; }

/* on a wide map the open field keeps to the corner the button was in */
.map-search__box,
.map-search .map-search__list { max-width: 420px; margin-left: auto; }

.map-search__open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: var(--sja-900);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 49, 95, .35);
}

.map-search__open svg { fill: currentColor; }
.map-search__open[hidden] { display: none; }

.map-search__open:focus { outline: none; }
.map-search__open:focus-visible { box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--sja-deep); }

.map-search__box {
  display: flex;
  align-items: center;
  height: 44px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0, 49, 95, .35);
}

.map-search__box[hidden] { display: none; }

.map-search__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 4px 0 16px;
  color: var(--sja-900);
}

.map-search__field svg { flex: none; fill: currentColor; }

.map-search__field input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;   /* 16px keeps iOS from zooming the page on focus */
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.map-search__field input::-webkit-search-cancel-button { display: none; }

.map-search__close {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sja-900);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* .suggest is declared later in the sheet, so these overrides need the
   extra class to win */
.map-search .map-search__list {
  left: 0;
  right: 0;
  max-height: min(320px, 60vh);
  overflow-y: auto;
  margin-top: 6px;
}

.map-search__list .suggest__item {
  width: 100%;
  border: 0;
  background: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.map-search__list .suggest__item:hover,
.map-search__list .suggest__item.is-active { background: var(--tint); }

.map-frame.is-zoomed { touch-action: none; cursor: grab; }

/* map key, between the map and the note */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 10px 14px 0;
  list-style: none;
  background: var(--tint);
  border-top: 1px solid rgba(0, 49, 95, .1);
  font-size: 12px;
  color: var(--sja-deep);
}

.map-legend li { display: flex; align-items: center; gap: 6px; }
.map-legend li[hidden] { display: none; }

.map-legend__swatch {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 49, 95, .2);
}

.map-legend__swatch--today { background: #004a9b; }
.map-legend__swatch--earlier { background: #b0d6f7; }

.map-legend__dot {
  width: 9px;
  height: 9px;
  margin: 0 2px;
  border-radius: 50%;
  background: #046bd2;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 4px rgba(0, 49, 95, .45);
}

.map-legend__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #046bd2;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 4px rgba(0, 49, 95, .45);
}

/* zoom buttons, bottom left of the map, over the Pacific: bottom right,
   they would cover Australia's marker */
.map-zoomer {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 49, 95, .35);
}

.map-zoomer__btn {
  width: 40px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sja-900);
  font: 400 24px/1 system-ui, sans-serif;
  cursor: pointer;
}

.map-zoomer__btn:first-child { border-radius: 20px 20px 0 0; border-bottom: 1px solid rgba(0, 49, 95, .15); }
.map-zoomer__btn:last-child { border-radius: 0 0 20px 20px; }
.map-zoomer__btn:disabled { color: rgba(0, 49, 95, .3); cursor: default; }
.map-zoomer__btn:focus { outline: none; }
.map-zoomer__btn:focus-visible { box-shadow: inset 0 0 0 2px var(--sja-deep); }
.map-frame.is-dragging { cursor: grabbing; }

.map-zoom {
  position: relative;
  width: 100%;
  transform-origin: 0 0;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

.map-frame.is-dragging .map-zoom { transition: none; }

.map-zoom img { display: block; width: 100%; height: auto; }

.map-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pin,
.badge {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.pin { z-index: 4; }
.badge { z-index: 3; }

/* the hit box is invisible, so keyboard focus rings the dot or badge itself
   rather than the square hit area */
.pin:focus,
.badge:focus { outline: none; }

.pin__dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #046bd2;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 2px 6px rgba(0, 49, 95, .45);
  transition: all .18s ease;
}

.pin.is-active .pin__dot {
  width: 17px;
  height: 17px;
  background: var(--sja-deep);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .95), 0 2px 6px rgba(0, 49, 95, .45);
}

.pin.is-hollow .pin__dot {
  background: transparent;
  box-shadow: inset 0 0 0 2px #046bd2, 0 0 0 3px rgba(255, 255, 255, .95), 0 2px 6px rgba(0, 49, 95, .45);
}

.pin.is-ring .pin__dot {
  width: 36px;
  height: 36px;
  background: transparent;
  box-shadow: inset 0 0 0 3px var(--sja-deep), 0 0 0 2px rgba(255, 255, 255, .95), 0 2px 6px rgba(0, 49, 95, .35);
}

.pin:focus-visible .pin__dot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 5px var(--sja-deep), 0 2px 6px rgba(0, 49, 95, .45);
}

.pin.is-active:focus-visible .pin__dot {
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .95), 0 0 0 7px var(--sja-deep), 0 2px 6px rgba(0, 49, 95, .45);
}

.badge__count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  /* the same brighter blue as the country markers */
  background: #046bd2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 3px 8px rgba(0, 49, 95, .5);
}

.badge:focus-visible .badge__count {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 5px var(--sja-deep), 0 3px 8px rgba(0, 49, 95, .5);
}

.map-tip {
  position: absolute;
  transform: translate(-50%, -160%);
  background: var(--sja-900);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 20px -6px rgba(0, 49, 95, .6);
  z-index: 5;
}

.map-tip[hidden] { display: none; }

/* a label with a quieter second line: an earlier foundation, or what a group badge counts */
.map-tip--two-line { transform: translate(-50%, calc(-100% - 12px)); text-align: center; }
.map-tip__sub { display: block; font-size: 11px; font-weight: 400; opacity: .8; }
.map-tip.map-tip--below { transform: translate(-50%, 14px); }

/* invisible hit shapes over the pale-blue countries of earlier foundations;
   they move with the artwork and tint the country they are over */
.map-earlier {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-earlier path {
  fill: transparent;
  fill-rule: evenodd;
  pointer-events: visiblePainted;
  transition: fill .15s ease;
}

.map-earlier path.is-on { fill: rgba(0, 48, 95, .16); }

.map-note {
  border-radius: 0 0 10px 10px;
  padding: 10px 14px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--tint);
}

/* map panels */

.panel { margin: 0 18px 18px; }
.panel[hidden] { display: none; }

.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--sja-900);
  color: #ffffff;
}

.panel__titles {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.3;
}

.panel__year { font-size: 14px; color: var(--sja-200); }
.panel__count { font-size: 13px; color: var(--sja-200); }

.panel__reset {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--sja-900);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.panel-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 16px;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35);
}

.panel-row__dot {
  flex: 0 0 auto;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sja-300);
}

.panel-row__name {
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

.panel-row__year { flex: 0 0 auto; font-size: 13px; color: var(--sja-300); }

/* region chips */

.region { padding: 14px 16px 16px; }

.region__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.region__swatch {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sja-900);
}

.region__label {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--sja-900);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--tint);
  color: var(--sja-900);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 14px -8px rgba(0, 49, 95, .6);
}

.chip.is-active { background: var(--sja-900); color: #ffffff; }

/* ── community sheet ── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 32, 64, .55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet[hidden] { display: none; }

.sheet__inner {
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -20px 50px -12px rgba(0, 49, 95, .6);
}

@media (min-width: 700px) {
  .sheet { align-items: center; }
  .sheet__inner { max-width: 520px; border-radius: 16px; }
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: var(--sja-900);
  color: #ffffff;
  border-radius: 16px 16px 0 0;
}

.sheet__titles {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sheet__name {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
}

.sheet__meta { font-size: 13px; color: var(--sja-200); }

.sheet__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.sheet__photo {
  position: relative;
  width: 100%;
  height: 210px;
  background: #dce6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sheet__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet__photo span {
  padding: 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.sheet__body { padding: 20px 18px 26px; }

.sheet__body p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  text-wrap: pretty;
}

.sheet__pending {
  padding: 14px 16px;
  background: var(--tint);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.sheet__body a {
  display: inline-block;
  margin-top: 18px;
  font-size: 15px;
}

body.is-locked { overflow: hidden; }

/* ── desktop ──────────────────────────────────────────────────────────────
   The column widens to 1100px and the sections use that width: the Welcome
   text sits beside the foundress card, Explore becomes two columns and the
   news becomes three. Prose keeps a readable measure regardless, and pages
   that are mostly text centre their content instead of stretching it.
   Everything below 1024px is untouched — the phone layout is as designed. */

@media (min-width: 1024px) {
  body { padding: 32px 0; }
  .screen { max-width: 1100px; }

  /* header */
  .bar__top { padding: 16px 28px; }
  .bar__logo img { width: 64px; height: 64px; }
  .bar__title { font-size: 18px; }
  .bar__field { padding: 0 28px; }
  .bar__field input { height: 52px; font-size: 16px; }
  .lang-on, .lang-off { line-height: 52px; padding: 0 18px; font-size: 14px; }

  /* the drawer list would look adrift at full width */
  .nav-item,
  .drawer__lang { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
  .nav-item { margin-bottom: 6px; }
  .nav-link, .nav-label { padding: 15px 24px; font-size: 16px; }
  .nav-child { padding: 14px 24px 14px 44px; font-size: 16px; }

  /* hero */
  .hero figcaption { padding: 12px 28px; font-size: 14px; }

  /* type and spacing scale */
  h1.title { font-size: 30px; }
  h2.title { font-size: 24px; }
  .rule { margin-bottom: 18px; }
  .block { padding: 34px 28px 36px; }
  .block--tight { padding: 34px 28px 12px; }
  .block p { font-size: 17px; }
  .crumbs { padding: 14px 28px; font-size: 14px; }
  .card__head { padding: 16px 28px; font-size: 20px; }
  .card__subhead { padding: 14px 28px; font-size: 16px; }
  .card { margin: 0 28px 28px; }
  .foot__contact { padding: 44px 44px 36px; column-gap: 48px; }
  .foot__title { font-size: 22px; }
  .foot__bottom {
    margin: 0 44px;
    padding: 20px 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .foot__links { margin: 0 -10px; gap: 4px 2px; }
  .foot__legal { padding: 0; border: 0; white-space: nowrap; }

  /* Home — Welcome text in column one, the foundress card alongside it.
     The source order is unchanged, so phones still show the portrait
     between the quote and the button; only the desktop grid moves it. */
  .block--welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 48px;
    align-items: start;
  }
  .block--welcome > * { grid-column: 1; }
  .block--welcome > .foundress {
    grid-column: 2;
    grid-row: 1 / span 5;
    margin-top: 6px;
  }
  .block--welcome > .btn { justify-self: start; }

  /* Home — Explore in two columns */
  .card--flush { display: grid; grid-template-columns: 1fr 1fr; }
  .card--flush > .card__head { grid-column: 1 / -1; }
  .row { padding: 20px 28px; }
  .row__title { font-size: 16px; }
  .row__note { font-size: 14px; }
  .card--flush > .row:nth-child(odd) {
    box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35),
                inset 12px 0 16px -16px rgba(0, 49, 95, .35);
  }

  /* Home — three news cards abreast */
  .block--news { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 20px; }
  .block--news > h2.title,
  .block--news > .rule,
  .block--news > .more,
  .block--news > .is-pending { grid-column: 1 / -1; }
  .block--news > .news-item { margin: 0 0 18px; }

  /* Where we are — the map takes the full width, the panels stay centred */
  .map-card { margin: 0 28px 22px; max-width: none; }
  .map-legend { padding: 12px 28px 0; font-size: 13px; }
  .map-note { padding: 12px 28px 14px; font-size: 13px; }
  .panel__head { padding: 16px 28px; }
  .panel-row { padding: 15px 28px; }
  .region { padding: 18px 28px 20px; }
  .region__label { font-size: 15px; }

  /* Text-led content centres in the wide column instead of stretching across
     it. 680px holds roughly 72 characters per line at this size, so the text,
     the photographs and the list cards all share one width with no slack. */
  .wrap {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── content pages (ported from the WordPress site by tools/build_pages.py) ── */

.block h2,
.block h3,
.block h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.4;
  color: var(--sja-800);
  text-wrap: balance;
}

.block h2 { margin: 26px 0 10px; font-size: 19px; }
.block h3 { margin: 22px 0 8px; font-size: 16px; }
.block h4 { margin: 20px 0 8px; font-size: 15px; color: var(--sja-600); }

.block > h2:first-of-type,
.block > .rule + h2,
.block > .rule + h3,
.block > .rule + h4 { margin-top: 6px; }

.block ul,
.block ol {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.block li { margin: 0 0 6px; padding-left: 2px; }
.block li::marker { color: var(--sja-300); }

.block p.note,
.block p.empty {
  font-size: 14px;
  color: var(--muted);
}

.block p.empty {
  padding: 16px 18px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 26px -16px rgba(0, 49, 95, .5);
}

.block .btn { margin-top: 4px; }
.block p + p > .btn--doc { margin-top: -4px; }

.btn--doc::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 16px;
  margin: 0 8px -2px 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M2 0h7l5 5v9a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm6 1v5h5L8 1zM3 9h8v1.4H3zm0 3h8v1.4H3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M2 0h7l5 5v9a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm6 1v5h5L8 1zM3 9h8v1.4H3zm0 3h8v1.4H3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* a photograph narrower than the column sits centred at its natural size */
.figure--small img {
  width: auto;
  max-width: min(100%, 320px);
  margin: 0 auto;
}

.figure--video video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 20px 40px -20px rgba(0, 49, 95, .6);
}

/* photo galleries: a swipeable strip on phones, a grid on wide screens */
.gallery {
  display: flex;
  gap: 12px;
  margin: 4px -18px 22px;
  padding: 6px 18px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--sja-300) transparent;
}

.gallery__item {
  flex: 0 0 82%;
  margin: 0;
  scroll-snap-align: start;
}

.gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 16px 34px -18px rgba(0, 49, 95, .6);
}

.gallery__item figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
}

/* tables (the weblinks page) */
.table-scroll {
  margin: 0 0 20px;
  overflow-x: auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 16px 34px -18px rgba(0, 49, 95, .5);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.table td {
  padding: 10px 14px;
  vertical-align: top;
  box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35);
}

.table tr:last-child td { box-shadow: none; }
.table td:first-child { color: var(--sja-900); white-space: nowrap; }
.table a { word-break: break-all; }

/* contact form */
.card__body { padding: 16px 18px 20px; }

.form__field {
  display: block;
  margin: 0 0 14px;
}

.form__field span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--sja-900);
}

.form__field input,
.form__field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--tint);
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 49, 95, .12);
}

.form__field input:focus,
.form__field textarea:focus {
  outline: 2px solid var(--sja-300);
  outline-offset: 1px;
}

.form__field textarea { resize: vertical; min-height: 140px; }

.form__note {
  margin: 4px 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.form .btn { margin-top: 0; cursor: pointer; font-family: inherit; }

.form__sent {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--tint);
  font-size: 14px;
  color: var(--sja-900);
}

.block .contact-line { margin-bottom: 8px; }

@media (min-width: 700px) {
  .gallery {
    margin: 4px 0 22px;
    padding: 6px 0 12px;
  }
  .gallery__item { flex-basis: 48%; }
}

@media (min-width: 1024px) {
  .block h2 { font-size: 22px; }
  .block h3 { font-size: 18px; }
  .block h4 { font-size: 16px; }

  .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    scroll-snap-type: none;
  }
  .gallery__item { flex-basis: auto; }

  .card--form .card__body { padding: 22px 28px 28px; }
  .table { font-size: 15px; }
}

/* a portrait page (bulletin cover, poster) is shown at reading size, centred */
.figure--portrait img {
  width: auto;
  max-width: min(100%, 360px);
  margin: 0 auto;
}

/* rows of web addresses (the weblinks page) */
.linkrows {
  margin: 0 0 18px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 34px -18px rgba(0, 49, 95, .5);
}

.linkrow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35);
}

.linkrow:last-child { box-shadow: none; }

.linkrow__name {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--sja-900);
}

.linkrow__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.linkrow__links a { word-break: break-all; }

@media (min-width: 700px) {
  .linkrow { flex-direction: row; align-items: flex-start; gap: 16px; }
  .linkrow__name { flex: 0 0 42%; }
}

/* ── search suggestions ── */
.bar__search { position: relative; }

.suggest {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 100%;
  z-index: 20;
  margin-top: 4px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 50px -16px rgba(0, 49, 95, .55), 0 2px 8px rgba(0, 49, 95, .12);
}

.suggest[hidden] { display: none; }

.suggest__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: inset 0 -10px 14px -14px rgba(0, 49, 95, .35);
}

.suggest__item:last-child { box-shadow: none; }
.suggest__item:hover,
.suggest__item.is-active { background: var(--tint); }

.suggest__title { font-family: var(--serif); font-size: 14px; color: var(--sja-900); }
.suggest__where { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--sja-600); }
.suggest__text { font-size: 13px; line-height: 1.45; color: var(--muted); }
.suggest mark { background: var(--sja-200); color: inherit; border-radius: 2px; padding: 0 1px; }
.suggest__empty { padding: 12px 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ── lazily loaded page parts ── */
.lazy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
}

.lazy .btn--ghost {
  margin: 0;
  background: #ffffff;
  color: var(--sja-600);
  box-shadow: 0 12px 24px -12px rgba(0, 49, 95, .4);
}

.lazy.is-loading .btn--ghost { opacity: .5; pointer-events: none; }
.lazy__status { font-size: 13px; color: var(--muted); min-height: 1.2em; }

/* ── contact map ── */
.map-embed {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tint);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (min-width: 700px) { .map-embed { aspect-ratio: 16 / 9; } }

/* ── PDF reader ── */
body.has-reader { overflow: hidden; }

.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(0, 30, 60, .92);
}

.reader[hidden] { display: none; }

.reader__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--sja-900);
  color: #ffffff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
  padding-top: max(10px, env(safe-area-inset-top));
}

.reader__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.reader__title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--serif);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader__pages { flex: 0 0 auto; font-size: 12px; color: var(--sja-200); }

.reader__download {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--sja-600);
  color: #ffffff;
  font-size: 13px;
  text-decoration: none;
}

.reader__scroll {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.reader__status {
  padding: 24px;
  text-align: center;
  color: #ffffff;
  font-size: 15px;
}

.reader__status[hidden] { display: none; }

.reader__pageslist {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.reader__page {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.reader__page canvas { display: block; }

/* ── image lightbox ── */
body.has-lightbox { overflow: hidden; }

.figure img,
.gallery__item img,
img.photo,
.hero img { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 20, 45, .94);
  padding: 56px 12px 12px;
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  background: #fff;
}

.lightbox__caption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  justify-content: center;
  max-width: 640px;
  padding: 0 44px;
  text-align: center;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
}

.lightbox__count { flex: 0 0 auto; color: var(--sja-200); font-size: 12px; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 30, 60, .6);
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.lightbox__close:hover, .lightbox__nav:hover { background: var(--sja-600); }

.lightbox__close {
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 28px;
}

.lightbox__nav {
  top: 50%;
  width: 44px;
  height: 64px;
  margin-top: -32px;
  font-size: 40px;
  padding-bottom: 6px;
}

.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }

@media (min-width: 700px) {
  .lightbox { padding: 64px 80px 24px; }
  .lightbox__nav--prev { left: 18px; }
  .lightbox__nav--next { right: 18px; }
  .lightbox__caption { font-size: 14px; padding: 0; }
}

/* ── document cards: a cover that opens the reader, buttons beneath ── */
.doc {
  margin: 0 0 26px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0, 49, 95, .55), 0 2px 6px rgba(0, 49, 95, .08);
}

.doc__cover {
  position: relative;
  display: block;
  padding: 18px 18px 0;
  background: linear-gradient(180deg, var(--tint) 0%, #ffffff 100%);
  text-decoration: none;
}

.doc__cover img {
  display: block;
  width: auto;
  max-width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 0 rgba(0, 49, 95, .06), 0 14px 30px -12px rgba(0, 49, 95, .55);
  transition: transform .25s ease;
}

.doc__cover:hover img { transform: translateY(-3px); }

.doc__badge {
  position: absolute;
  right: 26px;
  top: 26px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sja-900);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px -6px rgba(0, 49, 95, .7);
  pointer-events: none;
}

.doc__body { padding: 16px 18px 18px; }

.doc__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--sja-800);
  text-align: center;
}

.doc__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.doc__actions .btn { margin: 0; flex: 1 1 auto; text-align: center; min-width: 140px; }

.doc__actions .btn--ghost {
  background: #ffffff;
  color: var(--sja-600);
  box-shadow: inset 0 0 0 2px var(--sja-200), 0 10px 22px -12px rgba(0, 49, 95, .4);
}

.doc__actions .btn--ghost:hover { color: var(--sja-900); box-shadow: inset 0 0 0 2px var(--sja-300); }

.doc__download::before,
.doc__read::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0 8px -2px 0;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

.doc__read { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 3.5C3 2.2 5.4 2 8 3.6 10.6 2 13 2.2 15 3.5v10c-2-1.3-4.4-1.5-7-.1-2.6-1.4-5-1.2-7 .1zM2.4 4.6v7.2c1.7-.7 3.5-.6 5 .1V5.4c-1.5-.9-3.3-1.1-5-.8zm11.2 0c-1.7-.3-3.5-.1-5 .8v6.5c1.5-.7 3.3-.8 5-.1z'/%3E%3C/svg%3E"); }
.doc__download { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7.2 1h1.6v7.3l2.6-2.6 1.1 1.1L8 11.3 3.5 6.8l1.1-1.1 2.6 2.6zM2 12h12v1.6H2z'/%3E%3C/svg%3E"); }

.doc--bare .doc__body { padding: 14px 16px; }

@media (min-width: 700px) {
  .doc { display: grid; grid-template-columns: 240px 1fr; align-items: center; }
  .doc--bare { display: block; }
  .doc__cover { padding: 18px 0 18px 18px; height: 100%; display: flex; align-items: center; }
  .doc__cover img { max-width: 100%; border-radius: 4px; }
  .doc__badge { right: 12px; top: 12px; }
  .doc__body { padding: 20px 22px; }
  .doc__title { text-align: left; font-size: 16px; }
  .doc__actions { justify-content: flex-start; }
  .doc__actions .btn { flex: 0 0 auto; }
}

.doc__cover--still { margin: 0; }
.doc__cover--still img { cursor: zoom-in; }
.doc__note { margin: 0; font-size: 13px; color: var(--muted); }
