/* Project styles layered on top of Pico. Self-hosted font only (no external CDN, CSP-clean).
   Visual system ported from the M3.1 design template
   (f719847144_..._Liste_final_mit_Wort_Umbruch_Fix.html): night header, paper body, white cards,
   two accents (night blue + gold) over neutral greys. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-400.f1f8a8210104.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-700.13a58e05dfd2.woff2") format("woff2");
}

:root {
  /* Fonts as in the design template: system sans for reading text, Georgia serif for wordmark and
     titles. (Atkinson Hyperlegible stays self-hosted below but currently unreferenced — the
     accessibility-font question is still open.) */
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pico-font-family: var(--sans);

  /* Two accents over neutral greys. */
  --night: #14203a;
  --night-2: #1e2a4a;
  --paper: #f4f6fa;
  --surface: #ffffff;
  --ink: #14203a;
  --blue: #23345c;
  --muted: #6b7794;
  --gold-dk: #b07f26;
  --wd-gray: #375990;   /* weekdays */
  --sun-gold: #a87c26;  /* Sundays */
  --line: #e0e4ee;

  --measure: 640px;     /* reading column width */
}

body {
  background: var(--paper);
  color: var(--ink);
}

/* --- Header: full-bleed night bar, content held to the reading column ------------------------ */

.site-header {
  background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  color: #eef1f7;
  padding: 0;
  margin: 0;
}

.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 auto;
}

.brand__name {
  font-family: var(--serif);
  font-size: 18px;
}

.brand__name b {
  color: #d9a94a;
  font-weight: 400;
}

/* Language switcher sitting on the dark bar. */
.site-header .lang-switch {
  margin: 0;
}

.site-header .lang-switch select {
  margin: 0;
  font-size: 12px;
  color: #9fb0cf;
  background: transparent;
  border: 1px solid rgba(159, 176, 207, .35);
  padding: 4px 26px 4px 10px;
  width: auto;
}

.site-header .lang-switch select option {
  color: var(--ink);
}

/* --- Main reading column -------------------------------------------------------------------- */

main.container {
  max-width: var(--measure);
  padding-top: 22px;
  padding-bottom: 40px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 4px;
}

.page-title span {
  display: inline-block;
  border-bottom: 3px solid #c99a3b;
  padding-bottom: 6px;
}

/* Result count line. */
#results > p:first-child {
  color: var(--muted);
  font-size: 13px;
  margin: 9px 0 16px;
}

/* --- Occurrence cards ----------------------------------------------------------------------- */

.card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  margin-bottom: 9px;
}

.card__time {
  font-weight: 700;
  font-size: 23px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.card__day {
  font-size: 12px;
  margin-top: 6px;
  white-space: nowrap;
  color: var(--muted);
}

.card__day b {
  font-weight: 600;
  color: var(--wd-gray);
}

.card--sun .card__day b {
  color: var(--sun-gold);
}

.card__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-width: 0;
}

.card__info {
  min-width: 0;
}

.card__title {
  font-size: 15.5px;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover {
  text-decoration: underline;
}

.card__where {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap: break-word;
}

/* Recurrence badge — gold pill echoing the sun's rings. */
.recur {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--gold-dk);
  border: 1px solid #ecd9ac;
  background: #fbf5e7;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.recur svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* On narrow screens the badge drops under the venue instead of squeezing the title. */
@media (max-width: 540px) {
  .card__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* --- Search: the page's primary action ------------------------------------------------------ */

.search {
  margin: 16px 0 24px;
}

/* One tall bar: magnifier-marked field on the left, night-blue submit welded to the right. */
.search__bar {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 32, 58, .06);
}

.search__bar:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(35, 52, 92, .16);
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 15px 16px 15px 50px;
  font-size: 17px;
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7794' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 18px center;
  background-size: 20px 20px;
}

.search__input:focus {
  outline: 0;
  box-shadow: none;  /* the whole bar carries the focus ring instead */
}

.search__submit {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 24px;
  cursor: pointer;
}

.search__submit:hover {
  background: #2b3f6e;
}

/* Secondary filters, collapsed under "Weitere Filter" so they never compete with the search. */
.search__more {
  margin-top: 12px;
}

.search__more > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
}

.search__more > summary::-webkit-details-marker {
  display: none;
}

/* Chevron that rotates open. */
.search__more > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .15s ease;
}

.search__more[open] > summary::before {
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  .search__more > summary::before {
    transition: none;
  }
}

/* The revealed fields: a single vertical column — each filter on its own row, stacked cleanly
   between the search and the results. Scoped to [open] because setting `display` on a closed
   <details>'s content can defeat the native collapse in some engines. */
.search__more[open] .search__filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.search__filters label {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.search__filters input,
.search__filters select {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
}

.search__filters input:focus,
.search__filters select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(35, 52, 92, .15);
}

.search__reset {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

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

footer.container {
  max-width: var(--measure);
  color: var(--muted);
}
