/* Pace magazine — Run Brussels schedule widget + page templates */

.ps,
.ps-hero,
.ps-page {
  --ps-ink: #221F20;
  --ps-pink: #F2C4C8;
  --ps-orange: #FA6746;
  --ps-yellow: #F2BE5C;
  --ps-white: #FFFFFF;
  --ps-muted: #3B3637;
  --ps-font: var(--font-family-one, var(--gh-font-heading, system-ui)), sans-serif;  /* the site's heading font (homepage hero) */
  --ps-mono: var(--ps-font);
}

/* ---------- page templates ---------- */

.ps-hero {
  background: var(--ps-pink);
  border-bottom: 2px solid var(--ps-ink);
  color: var(--ps-ink);
  font-family: var(--ps-font);
}
.ps-hero-inner {
  padding-top: clamp(4px, 1.5vw, 20px);
  padding-bottom: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: center;
}
.ps-hero-text { flex: 1 1 420px; min-width: 0; }
.ps-hero-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ps-orange);
  font-size: 0.8rem;
  font-weight: 700;
}
.ps-hero-title {
  margin: 0;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.ps-hero-excerpt {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ps-muted);
}
.ps-hero-image {
  flex: 0 1 440px;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--ps-white);
}
@media (max-width: 767px) {
  .ps-hero-image { flex-basis: 100%; }
}
.ps-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ps-page { padding-top: 32px; padding-bottom: 64px; }
.ps-section-title {
  margin: 48px 0 16px;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ps-ink);
}
.ps-page-content { margin-top: 48px; }
.ps-page-content.post-content { padding-left: 0; padding-right: 0; }

/* ---------- widget ---------- */

.ps {
  color: var(--ps-ink);
  font-family: var(--ps-font);
  font-size: 16px;
  line-height: 1.45;
}
.ps *, .ps *::before, .ps *::after { box-sizing: border-box; }
.ps svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ps button, .ps select { font: inherit; color: inherit; }
.ps :focus-visible { outline: 3px solid var(--ps-orange); outline-offset: 2px; }

/* toolbar */
.ps-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.ps-week {
  display: flex; align-items: center;
  border: 2px solid var(--ps-ink); border-radius: 999px;
  background: var(--ps-white);
}
.ps-week-label { min-width: 132px; padding: 0 6px; text-align: center; font-weight: 700; font-size: 15px; }
.ps-iconbtn {
  width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.ps-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 2px solid var(--ps-ink); border-radius: 999px;
  background: var(--ps-white); color: var(--ps-ink);
  font-weight: 700; font-size: 15px; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.ps .ps-btn--dark { background: var(--ps-ink); color: var(--ps-white); }
.ps a.ps-btn--dark, .ps a.ps-btn--dark:hover { color: var(--ps-white); }
.ps-btn--sm { height: 40px; padding: 0 14px; font-size: 14px; }
.ps-btn--sm svg { width: 16px; height: 16px; }

/* filters */
.ps-filters {
  display: flex; flex-wrap: wrap; gap: 14px 24px;
  justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.ps-chips, .ps-selects, .ps-types { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-type {
  height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  background: var(--ps-white); border: 2px solid var(--ps-ink); color: var(--ps-ink);
}
.ps-type--all[aria-pressed="true"] { background: var(--ps-ink); border-color: var(--ps-ink); color: var(--ps-white); }
.ps-type--social[aria-pressed="true"] { background: var(--ps-pink); border-color: var(--ps-pink); }
.ps-type--intervals[aria-pressed="true"] { background: var(--ps-orange); border-color: var(--ps-orange); }
.ps-type--long[aria-pressed="true"] { background: var(--ps-yellow); border-color: var(--ps-yellow); }
.ps-type[aria-pressed="false"] { background: transparent; border: 1.5px dashed var(--ps-ink); color: var(--ps-muted); }
.ps-none { font-size: 14px; color: var(--ps-muted); }
.ps-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ps-popup .leaflet-popup-content-wrapper { border: 2px solid var(--ps-ink); border-radius: 12px; box-shadow: none; }
.ps-popup .leaflet-popup-content { margin: 10px 14px; font-family: var(--ps-font); color: var(--ps-ink); }
.ps-popup .leaflet-popup-content p { margin: 0; }
.ps-pop-when { font-size: 12px; font-weight: 700; }
.ps-pop-title { font-size: 15px; font-weight: 700; margin: 2px 0 !important; }
.ps-pop-meta { font-size: 13px; color: var(--ps-muted); }
.ps-label { font-size: 13px; font-weight: 700; margin-right: 2px; white-space: nowrap; }
.ps-selects .ps-label:not(:first-child) { margin-left: 8px; }
.ps-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 6px;
  border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  background: var(--ps-white); border: 2px solid var(--ps-ink);
}
.ps-chip[aria-pressed="false"] { background: transparent; border: 1.5px dashed var(--ps-ink); color: var(--ps-muted); }
.ps-mono {
  min-width: 26px; height: 26px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ps-ink); color: var(--ps-white);
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
}
.ps-chip[aria-pressed="false"] .ps-mono { background: transparent; color: var(--ps-ink); border: 1.5px solid var(--ps-ink); }
.ps-select {
  height: 44px; padding: 0 12px;
  border: 2px solid var(--ps-ink); border-radius: 10px;
  background: var(--ps-white); font-size: 14px;
}
.ps-summary { margin: 6px 0 22px; font-size: 15px; color: var(--ps-muted); min-height: 1em; }

/* layout */
.ps-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 32px; align-items: start; }
.ps--nomap .ps-body, .ps--crew .ps-body { grid-template-columns: minmax(0, 1fr); }
.ps--crew .ps-mapcol { display: none; }
.ps--nomap .ps-viewtoggle, .ps--crew .ps-viewtoggle { display: none !important; }
.ps-list { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ps-msg {
  margin: 0; padding: 18px 20px;
  border: 1.5px dashed var(--ps-ink); border-radius: 14px;
  font-size: 15px;
}

/* days */
.ps-day { display: flex; flex-direction: column; gap: 16px; }
.ps-day-head {
  display: flex; align-items: baseline; gap: 10px; margin: 0;
  font-family: var(--ps-font); font-size: 22px; font-weight: 700; line-height: 1.2;
}
.ps-day-date { font-size: 14px; font-weight: 400; color: var(--ps-muted); }
.ps-today {
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--ps-ink); color: var(--ps-white); align-self: center;
}
.ps-day.is-empty { gap: 0; }
.ps-day.is-empty .ps-day-head { font-size: 17px; color: var(--ps-muted); }
.ps-day-none { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--ps-muted); }
.ps-empty {
  margin: 0; padding: 14px 18px;
  border: 1.5px dashed var(--ps-ink); border-radius: 14px;
  font-size: 14px; color: var(--ps-muted);
}

/* run card */
.ps-run {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px;
  align-items: start;
  padding: 16px 18px;
  background: var(--ps-white);
  border: 2px solid var(--ps-ink); border-radius: 16px;
  cursor: pointer;
  --ps-shadow: var(--ps-ink);
  box-shadow: 6px 6px 0 var(--ps-shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ps-run--social { --ps-shadow: var(--ps-pink); }
.ps-run--intervals { --ps-shadow: var(--ps-orange); }
.ps-run--long { --ps-shadow: var(--ps-yellow); }
.ps-run.is-selected { box-shadow: 10px 10px 0 var(--ps-shadow); transform: translate(-2px, -2px); }
.ps-run.is-cancelled { box-shadow: none; transform: none; }
.ps-time { font-family: var(--ps-mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 24px; line-height: 1.1; }
.ps-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ps-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps-cat {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--ps-white); color: var(--ps-ink); border: 1.5px solid var(--ps-ink);
}
.ps-cat--social { background: var(--ps-pink); border-color: var(--ps-pink); }
.ps-cat--intervals { background: var(--ps-orange); border-color: var(--ps-orange); }
.ps-cat--long { background: var(--ps-yellow); border-color: var(--ps-yellow); }
.ps-crew { font-size: 13px; font-weight: 700; color: var(--ps-ink); }
.ps a.ps-crew, .ps .ps-crew a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ps-crew .ps-x { font-weight: 400; margin: 0 2px; }
.ps-new {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--ps-yellow); color: var(--ps-ink);
}
.ps-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ps-status--tbc { background: var(--ps-white); border: 1.5px dashed var(--ps-ink); }
.ps-status--cancelled { background: var(--ps-ink); color: var(--ps-white); border: 1.5px solid var(--ps-ink); }
.ps-title { margin: 0; font-family: var(--ps-font); font-size: 19px; font-weight: 700; line-height: 1.25; }
.ps-title button { all: unset; cursor: pointer; }
.ps-title button:focus-visible { outline: 3px solid var(--ps-orange); outline-offset: 2px; }
.ps-meta { margin: 0; font-size: 14px; color: var(--ps-muted); }
.ps-place { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 14px; }
.ps-place svg { width: 16px; height: 16px; margin-top: 2px; }
.ps-place strong { font-weight: 700; }
.ps-strava { margin: 6px 0 0; font-size: 14px; }
.ps-strava a { color: var(--ps-ink); font-weight: 700; text-decoration: underline; text-decoration-color: #FC4C02; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ps-strava a::after { content: " \2197"; }
.ps-strava a:hover { color: #FC4C02; }
.ps-run-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ps-run.is-cancelled .ps-title, .ps-run.is-cancelled .ps-time { text-decoration: line-through; color: #6E6869; }

/* map */
.ps-mapcol { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ps-map-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 500; margin: 0; padding: 10px 16px;
  background: var(--ps-white); border: 2px solid var(--ps-ink); border-radius: 999px;
  font-size: 14px; font-weight: 700; white-space: nowrap; pointer-events: none;
}
.ps-map-empty[hidden] { display: none; }
.ps-map {
  height: 560px;
  border: 2px solid var(--ps-ink); border-radius: 18px; overflow: hidden;
  background: var(--ps-pink);
  z-index: 0;
}
.ps-map .leaflet-tile-pane { filter: grayscale(1) contrast(1.05) brightness(1.04); }
.ps-map .leaflet-control-attribution { font-size: 10px; }
.ps-pin {
  display: flex !important; padding: 0; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--ps-ink); color: var(--ps-white);
  border: 2px solid var(--ps-white);
  font-family: var(--ps-font); font-weight: 700; font-size: 9.5px;
  line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
}
.ps-pin span { white-space: nowrap; }
.ps-pin.is-selected { box-shadow: 0 0 0 4px var(--ps-ink); font-size: 11px; }
.ps-pin--social.is-selected { box-shadow: 0 0 0 4px var(--ps-pink); }
.ps-pin--intervals.is-selected { box-shadow: 0 0 0 4px var(--ps-orange); }
.ps-pin--long.is-selected { box-shadow: 0 0 0 4px var(--ps-yellow); }
.ps-pin.is-cancelled { opacity: 0.35; }

/* list / map toggle (small screens) */
.ps-viewtoggle {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; margin-bottom: 18px;
  border: 2px solid var(--ps-ink); border-radius: 12px;
}
.ps-viewtoggle button {
  height: 40px; border: 0; border-radius: 9px;
  background: transparent; font-weight: 700; font-size: 14px; cursor: pointer;
}
.ps-viewtoggle button[aria-pressed="true"] { background: var(--ps-ink); color: var(--ps-white); }

@media (max-width: 899px) {
  .ps-body { grid-template-columns: minmax(0, 1fr); }
  .ps-viewtoggle { display: grid; }
  .ps-body--list .ps-mapcol { display: none; }
  .ps-body--map .ps-list { display: none; }
  .ps-mapcol { position: relative; top: auto; }
  .ps-map { height: 60vh; min-height: 360px; }
}

@media (max-width: 599px) {
  .ps-types { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--margin-wrap-left-right, 16px)); padding: 2px var(--margin-wrap-left-right, 16px) 6px; }
  .ps-type { flex: none; }
  .ps-toolbar { flex-direction: column; align-items: stretch; }
  .ps-week { justify-content: space-between; }
  .ps-toolbar-actions .ps-btn { flex: 1 1 auto; justify-content: center; }
  .ps-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--margin-wrap-left-right, 16px)); padding: 2px var(--margin-wrap-left-right, 16px) 6px; }
  .ps-chip { flex: none; }
  .ps-run { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; }
  .ps-run-actions { flex-direction: row; }
  .ps-run-actions > * { flex: 1 1 0; justify-content: center; }
  .ps-time { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-run { transition: none; }
  .ps-run.is-selected { transform: none; }
}

/* Basho dark mode: keep the widget legible on dark backgrounds */
.dark-mode .ps-run, .dark-mode .ps-week,
.dark-mode .ps-btn:not(.ps-btn--dark), .dark-mode .ps-select { color: var(--ps-ink); }

/* ---------- crew signup page ---------- */
.ps-signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px); gap: 48px; align-items: start; }
.ps-signup--solo { grid-template-columns: minmax(0, 760px); justify-content: center; }
.ps-signup .ps-page-content { margin-top: 0; }
.ps-form { display: flex; flex-direction: column; gap: 12px; }
.ps-form-frame {
  display: block; width: 100%; height: 1500px;
  border: 2px solid var(--ps-ink); border-radius: 18px;
  background: var(--ps-white);
  box-shadow: 6px 6px 0 var(--ps-pink);
}
.ps-form-fallback { margin: 0; font-family: var(--ps-font); font-size: 14px; color: var(--ps-muted); }
.ps-form-fallback a { color: var(--ps-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) {
  .ps-signup { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ps-form-frame { height: 1900px; }
}

/* Crew submission form (custom-crew-signup.hbs) */
.cf[hidden], .cf-series-body[hidden] { display: none; }
.cf { display: flex; flex-direction: column; gap: 28px; font-family: var(--ps-font); color: var(--ps-ink); }
.cf *, .cf *::before, .cf *::after { box-sizing: border-box; }
.cf-step { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; border-bottom: 2px solid var(--ps-ink); }
.cf-step-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 700; }
.cf-step-title span {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 999px; background: var(--ps-pink); border: 2px solid var(--ps-ink); font-size: 15px;
}
.cf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cf-label > label:first-child { font-weight: 700; font-size: 15px; }
.cf-keep { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ps-muted); cursor: pointer; white-space: nowrap; user-select: none; }
.cf .cf-keep input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--ps-ink); }
.cf-keep:has(input:checked) { color: var(--ps-ink); font-weight: 700; }
.cf-hint { margin: 0; font-size: 14px; color: var(--ps-muted); }
.cf em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--ps-muted); margin-left: 4px; }
.cf-step-title em { font-size: 14px; }
.cf-field small, .cf-actions small { font-size: 13px; line-height: 1.4; color: var(--ps-muted); }
.cf-field small a { color: var(--ps-ink); }
.cf input, .cf select, .cf textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 2px solid var(--ps-ink); border-radius: 12px;
  background: var(--ps-white); color: var(--ps-ink); font: inherit; font-size: 16px;
}
.cf input::placeholder, .cf textarea::placeholder { color: #A39C9E; font-style: italic; opacity: 1; }
.cf input:focus-visible, .cf select:focus-visible, .cf textarea:focus-visible { outline: 3px solid var(--ps-orange); outline-offset: 2px; }
.cf [aria-invalid="true"] { border-color: var(--ps-orange); background: #FFF3F0; }
.cf select:disabled { opacity: 1; color: var(--ps-ink); background: #F6F4F4; cursor: default; }
.cf-series { padding: 14px 16px; border: 2px dashed var(--ps-ink); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.cf-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.cf .cf-switch input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; accent-color: var(--ps-orange); }
.cf-series-body { display: flex; flex-direction: column; gap: 10px; }
.cf-series-summary { margin: 0; font-size: 14px; font-weight: 700; }
.cf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cf-btn-dark { background: var(--ps-ink); color: var(--ps-white); }
.cf-btn-dark:hover { background: var(--ps-orange); border-color: var(--ps-orange); color: var(--ps-ink); }
.cf-msg { margin: 0 0 16px; transition: background .3s; padding: 12px 16px; border: 2px solid var(--ps-ink); border-radius: 12px; font-family: var(--ps-font); background: var(--ps-white); }
.cf-msg:empty { display: none; }
.cf-msg--ok { background: var(--ps-yellow); }
.cf-msg--error { background: var(--ps-pink); }
.cf .cf-msg { margin: 0; }
