:root {
  --bg: #f5f1e8; --paper: #f5f1e8; --ink: #1c1f1a; --muted: #5c5a50;
  --line: #d9d1bf; --green: #1f3d2b; --green-soft: #e4dccb; --gold: #b8925f;
  font-family: 'Newsreader', Georgia, serif;
}
body { background: var(--paper); font-size: 18px; }
* { letter-spacing: 0; }
.brand, h1, h2, .eyebrow, .scan-card, .refresh-label, .pill, nav, .map-legend {
  font-family: inherit;
}
button, input, select { font-family: inherit; }
.content-width { width: min(1200px, calc(100% - 64px)); }
.site-header {
  height: auto; min-height: 78px; padding: 18px 32px; gap: 24px;
  background: var(--paper); border-bottom: 1px solid var(--ink);
  box-shadow: none; backdrop-filter: none; flex-wrap: wrap;
}
.brand { font-size: 24px; font-weight: 600; gap: 10px; min-width: 0; }
/* Display the supplied artwork's top monogram without changing the source image. */
.brand-mark { position: relative; display: inline-block; width: 44px; height: 44px; flex: 0 0 auto; overflow: hidden; border-radius: 6px; }
.brand-mark img { position: absolute; width: 318.672%; height: auto; max-width: none; left: -109.336%; top: -27.593%; }
.footer-bottom .brand-mark { width: 32px; height: 32px; border-radius: 5px; }
.site-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.site-brand .brand { white-space: normal; }
.beta-label {
  display: inline-block; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--green-soft); color: var(--green); font: 600 11px/1.2 system-ui, sans-serif;
  white-space: nowrap;
}
nav { gap: 28px; height: auto; flex-wrap: wrap; }
nav a { font-size: 16px; font-weight: 400; border: 0; color: var(--ink); }
nav a:hover, nav a[aria-current] { color: var(--green); text-decoration: underline; text-underline-offset: 6px; }
.refresh-label { font-size: 15px; font-style: italic; }
.explore-section, .globe-stage { background: var(--paper); }
.section-intro {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px 48px; align-items: start;
  padding: 48px 0 28px; border: 0; border-bottom: 1px solid var(--line);
}
h1 { font-size: 76px; line-height: 1.02; font-weight: 500; text-wrap: balance; }
.intro-copy > p { font-size: 19px; line-height: 1.5; color: #3d3f37; text-wrap: pretty; }
.scan-card { margin-top: 20px; align-items: baseline; gap: 12px; }
.scan-card > span { font-size: 34px; font-weight: 500; color: var(--green); }
.scan-card small { max-width: none; font-size: 16px; }
.globe-stage { height: 560px; min-height: 0; max-width: 1240px; margin: auto; border: 0; }
#map-status { left: 32px; font-size: 16px; background: var(--paper); }
.map-legend { left: 32px; font-size: 15px; font-style: italic; }
.map-legend i { background: var(--green); }
.map-legend i.selected { background: var(--gold); }
#legend-selected { display: inline-flex; align-items: center; gap: 8px; }
#legend-selected i.selected { margin-left: 0; }
.selection-strip { border-top: 1px solid var(--line); padding-block: 24px; }
.detail-card h2 { font-size: 19px; font-weight: 600; }
.detail-card > p { font-size: 17px; }
.detail-card .eyebrow { font-size: 14px; color: var(--muted); }
.detail-meta { gap: 8px; }
.pill, .pill:nth-child(2) { font-size: 14px; font-weight: 500; background: #e6d6bf; color: #3a2414; border-radius: 4px; }
.section-link { font-size: 16px; }
.programs-section { padding-block: 56px 72px; }
h2 { font-size: 32px; font-weight: 500; }
.eyebrow { font-size: 14px; font-weight: 500; color: #3a2414; }
.section-heading { margin-bottom: 16px; align-items: end; }
.section-heading .eyebrow { display: none; }
#reset-filters { font-size: 16px; color: var(--green); }
.search-toolbar { padding: 18px 0; margin: 0; border-top: 0; border-bottom: 2px solid var(--ink); gap: 16px; }
label > span { font-size: 15px; font-weight: 400; }
input, select { font-size: 16px; border-radius: 4px; padding: 11px 12px; background: #fffdf9; }
input::placeholder { color: #6d6b62; }
/* Shared fractional tracks keep long opening notes from changing individual row widths. */
.list-head, .program-row {
  display: grid;
  grid-template-columns: minmax(0,2.6fr) minmax(0,1.8fr) minmax(0,1.1fr) minmax(0,1.3fr) minmax(0,1.6fr);
  gap: 16px; align-items: start;
}
.list-head { padding: 15px 14px; color: var(--ink); font-size: 14px; font-weight: 600; background: var(--green-soft); border-bottom: 1px solid var(--line); }
.list-head > span { min-width: 0; }
.list-head > span:first-child { padding-left: 18px; }
.list-head > span:not(:last-child) { border-right: 1px solid var(--line); padding-right: 16px; }
.list-head > :last-child { text-align: left; }
.results-list { display: block; }
.result, .result.active, .result:hover {
  display: block; padding: 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent; box-shadow: none; transform: none;
}
.result::before { display: none; }
.program-row { list-style: none; cursor: pointer; padding: 22px 14px; min-height: 92px; }
.program-row::-webkit-details-marker { display: none; }
.program-row:hover, .program-disclosure[open] > summary { background: #ede6d6; }
.result.active .program-row { box-shadow: inset 3px 0 var(--green); }
.result h3 { font-size: 19px; line-height: 1.35; font-weight: 600; }
.program-row h3 { position: relative; padding-left: 18px; }
.program-row h3::before { content: '+'; position: absolute; left: 0; top: 0; width: 18px; color: var(--green); }
.program-disclosure[open] h3::before { content: '-'; }
.program-row > * { min-width: 0; overflow-wrap: anywhere; }
.program-row > span { line-height: 1.45; }
.row-organisation, .row-location { font-size: 17px; color: #4f544c; }
.program-row .pill { justify-self: start; max-width: 100%; padding: 5px 10px; white-space: normal; line-height: 1.3; }
.closing-soon {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px;
  background: #f4e1c1; color: #6a3b12; font-size: 12px; font-weight: 600;
  line-height: 1.4; vertical-align: middle; letter-spacing: 0.01em;
}
.detail-meta .closing-soon { margin-left: 0; }
.row-reviewed { text-align: left; font-size: 15px; line-height: 1.4; color: var(--muted); }
.program-body { padding: 28px; max-width: 980px; }
.result p { font-size: 18px; line-height: 1.6; color: #3d3f37; }
.opportunity-facts { margin-block: 22px; gap: 20px 36px; }
.opportunity-facts dt, .application-detail h4 { font-size: 15px; font-weight: 500; color: #3a2414; }
.opportunity-facts dd { font-size: 18px; }
.application-detail { margin-block: 22px; }
.opportunity-actions { justify-content: flex-start; gap: 20px; }
.opportunity-actions a, .opportunity-actions small { font-size: 15px; }
.newsletter { background: var(--green); color: var(--paper); }
.newsletter-heading-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.newsletter-heading-row .brand-mark { width: 54px; height: 54px; }
.newsletter-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; padding-block: 28px;
}
.newsletter-copy {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0; max-width: none; min-width: 0; color: inherit;
}
.newsletter-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: #d5b486; line-height: 1;
}
.newsletter h2 { font-size: 28px; font-weight: 500; line-height: 1.15; color: var(--paper); }
.newsletter p { margin: 0; max-width: 68ch; font-size: 17px; line-height: 1.45; color: #d8dccf; }
.newsletter-cta {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 4px; background: var(--paper); color: var(--green);
  font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none;
}
.newsletter-cta:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.newsletter-cta:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
footer { padding-block: 28px; }
footer .brand { font-size: 18px; }
footer > span, footer > a:last-child { font-size: 16px; }
footer > span { font-style: italic; }
summary:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.catalog-tabs {
  display: flex; align-items: stretch; gap: 28px;
  margin: 22px 0 8px; border-bottom: 1px solid var(--line);
}
.catalog-tabs [role="tab"] {
  flex: 1 1 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; margin: 0; padding: 12px 2px 14px;
  border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1.25; text-align: left; cursor: pointer;
}
.catalog-tabs [role="tab"][aria-selected="true"] {
  color: var(--ink); border-bottom-color: var(--green); font-weight: 600;
}
.catalog-tabs [role="tab"]:hover { color: var(--green); }
.catalog-tabs [role="tab"]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.tab-label { text-wrap: balance; }
.tab-count {
  flex: none; min-width: 1.6em; color: var(--green); font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.opening-panel { padding-top: 8px; }
.opening-intro { max-width: 720px; margin: 12px 0 18px; color: #3d3f37; font-size: 18px; line-height: 1.5; }
.opening-empty { margin: 0; padding: 22px 14px; border-bottom: 1px solid var(--line); color: #3d3f37; font-size: 18px; line-height: 1.55; }
.opens-date { color: var(--green); font-weight: 600; }
.maplibregl-popup-content { background: var(--paper); border: 1px solid var(--line); box-shadow: none; }
/* OpenFreeMap branding is optional; retain the map data's required credits. */
.maplibregl-ctrl-attrib a[href="https://openfreemap.org"],
.maplibregl-ctrl-attrib a[href="https://openfreemap.org/"] { display: none; }
@media (max-width: 1000px) {
  h1 { font-size: 58px; }
  .section-intro { gap: 32px; }
  .refresh-label { display: none; }
  .search-toolbar { grid-template-columns: 1fr; }
  .program-row, .list-head,
  .opening-panel .program-row, .opening-panel .list-head { grid-template-columns: minmax(0,2fr) minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr); }
  .row-reviewed { grid-column: 1 / -1; text-align: left; }
  .row-reviewed::before { content: 'Reviewed: '; font-weight: 600; }
  .opening-panel .row-reviewed::before { content: ''; }
  .list-head > :last-child { display: none; }
}
@media (max-width: 760px) {
  .content-width { width: calc(100% - 40px); }
  .site-header { padding: 16px 20px; gap: 14px; }
  .brand { font-size: 24px; }
  nav { gap: 22px; width: auto; }
  nav a { font-size: 16px; }
  h1 { font-size: 44px; }
  .section-intro { grid-template-columns: 1fr; padding-top: 36px; gap: 24px; }
  .intro-copy > p { font-size: 18px; }
  .scan-card { flex-direction: row; align-items: baseline; }
  .scan-card > span { font-size: 34px; }
  .scan-card small { font-size: 16px; }
  .globe-stage { height: 400px; }
  #map-status, .map-legend { left: 20px; }
  .selection-strip { flex-direction: column; align-items: stretch; gap: 16px; }
  .catalog-tabs { flex-direction: column; gap: 0; margin-top: 16px; }
  .catalog-tabs [role="tab"] { min-height: 48px; padding: 14px 2px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .catalog-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 var(--green); }
  .list-head { display: none; }
  .program-row, .opening-panel .program-row { grid-template-columns: minmax(0,1fr); gap: 10px 16px; padding: 22px 12px; }
  .program-row h3, .row-organisation { grid-column: 1 / -1; }
  .row-location { text-align: left; }
  .row-organisation::before { content: 'Organisation: '; font-weight: 600; }
  .row-location::before { content: 'Location: '; font-weight: 600; }
  .program-body { padding: 20px 12px; }
  .newsletter-bar { flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 22px; }
  .newsletter h2 { font-size: 26px; }
  .newsletter-cta { min-height: 48px; }
  .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section-link { white-space: normal; }
}
@media (max-width: 380px) {
  h1 { font-size: 38px; }
  nav { gap: 16px; }
  .opportunity-facts { grid-template-columns: 1fr; }
}

.community-footer { display: block; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.share-opportunity { display: inline-flex; align-items: center; min-height: 44px; }
.share-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
/* Community actions use the site's colours and wrap on narrow screens. */
.footer-community { width: 100%; text-align: left; }
.footer-community h2 { margin: 0 0 12px; font-size: 26px; }
.footer-community h3 { margin: 0 0 10px; font-size: 18px; }
.footer-community > p { margin: 0 0 24px; }
.footer-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.footer-action-card { border-top: 1px solid currentColor; padding-top: 16px; overflow-wrap: anywhere; }
.footer-action-card a, .hero-linkedin {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; max-width: 100%; margin-top: 12px; padding: 12px 18px;
  border: 1px solid var(--green); border-radius: 4px;
  background: var(--green); color: var(--paper);
  font-size: 17px; font-weight: 600; line-height: 1.35;
  text-align: center; text-decoration: none; white-space: normal;
}
.footer-action-card a:hover, .hero-linkedin:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.footer-action-card a:focus-visible, .hero-linkedin:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.hero-linkedin {
  min-height: 44px; padding: 8px 12px;
  background: transparent; color: var(--green);
  font-size: 15px; font-weight: 400;
}
.hero-linkedin:hover { background: var(--green-soft); border-color: var(--green); color: var(--green); }
@media (max-width: 760px) { .hero-linkedin { min-height: 48px; } }
.footer-action-card p { margin: 0; }
.shared-notice { padding: 16px; border: 1px solid currentColor; border-radius: 4px; }
[hidden] { display: none !important; }
@media (max-width: 600px) { .footer-action-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Compact phone layout; keep form text at 16px and primary touch targets at 44px. */
@media (max-width: 620px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 140px; }
  .content-width { width: calc(100% - 32px); }
  .site-header { min-height: 0; padding: 10px 16px 4px; gap: 4px; }
  .site-brand { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .site-brand .brand { flex: 1; min-height: 44px; font-size: 18px; gap: 8px; line-height: 1.2; }
  .brand-mark { width: 32px; height: 32px; }
  .beta-label { padding: 3px 5px; font-size: 10px; }
  nav { width: 100%; gap: 4px; justify-content: space-between; }
  nav a { min-height: 44px; font-size: 14px; }
  h1 { font-size: 36px; line-height: 1.06; }
  h2 { font-size: 27px; }
  .section-intro { padding-block: 24px 20px; gap: 18px; }
  .intro-copy > p { font-size: 16px; line-height: 1.5; }
  .scan-card { margin-top: 12px; gap: 8px; }
  .scan-card > span { font-size: 28px; }
  .scan-card small { font-size: 14px; }
  .hero-linkedin { min-height: 44px; margin-top: 10px; padding: 8px 12px; font-size: 14px; }
  .globe-stage { height: 320px; }
  #map-status, .map-legend { left: 16px; font-size: 14px; }
  .selection-strip { padding-block: 16px; gap: 12px; }
  .detail-card h2 { font-size: 17px; }
  .detail-card > p { font-size: 16px; }
  .detail-card .eyebrow { font-size: 13px; }
  .section-link { min-height: 44px; font-size: 15px; }
  .programs-section { padding-block: 32px 40px; }
  .section-heading { margin-bottom: 12px; gap: 12px; }
  #reset-filters { min-height: 44px; font-size: 14px; }
  .search-toolbar { padding-block: 12px; gap: 12px; }
  label { gap: 6px; }
  label > span { font-size: 14px; }
  input, select { min-height: 44px; padding: 9px 10px; }
  .filter-grid { gap: 10px; }
  .catalog-tabs { margin-top: 12px; }
  .catalog-tabs [role="tab"] { min-height: 44px; padding: 10px 8px; font-size: 16px; }
  .tab-count { font-size: 16px; }
  .program-row, .opening-panel .program-row { padding: 16px 8px; gap: 7px; min-height: 44px; }
  .result h3 { font-size: 17px; }
  .row-organisation, .row-location { font-size: 15px; }
  .row-reviewed { font-size: 13px; }
  .pill, .pill:nth-child(2) { font-size: 13px; }
  .program-row .pill { padding: 4px 8px; }
  .program-body { padding: 16px 8px; }
  .result p, .opportunity-facts dd { font-size: 16px; line-height: 1.5; }
  .opportunity-facts { margin-block: 16px; padding-block: 14px; gap: 14px 18px; }
  .opportunity-facts dt, .application-detail h4 { font-size: 14px; }
  .application-detail { margin-block: 16px; }
  .opportunity-actions { gap: 8px 16px; padding-top: 0; }
  .opportunity-actions a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
  .opportunity-actions small { font-size: 13px; }
  .opening-intro, .opening-empty { font-size: 16px; }
  .newsletter-bar { padding-block: 18px; gap: 12px; }
  .newsletter-heading-row { gap: 10px; margin-bottom: 4px; }
  .newsletter-heading-row .brand-mark { width: 40px; height: 40px; }
  .newsletter h2 { font-size: 24px; }
  .newsletter-kicker { font-size: 11px; }
  .newsletter p { font-size: 15px; }
  .newsletter-cta { min-height: 44px; max-width: 100%; padding: 10px 14px; font-size: 15px; line-height: 1.3; }
  .community-footer { padding-block: 20px; }
  .footer-community h2 { font-size: 23px; }
  .footer-community h3 { font-size: 17px; margin-bottom: 8px; }
  .footer-community > p { margin-bottom: 16px; line-height: 1.5; }
  .footer-action-grid { margin-block: 16px; gap: 16px; }
  .footer-action-card { padding-top: 12px; }
  .footer-action-card a { min-height: 44px; margin-top: 8px; padding: 10px 14px; font-size: 15px; }
  .footer-bottom { margin-top: 24px; gap: 12px; }
  .footer-bottom .brand { font-size: 16px; white-space: normal; }
  .footer-bottom > a:last-child { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 380px) {
  h1 { font-size: 32px; }
}
