/* /sources/ (site/build_sources.py). Stands alone (not info.css, which only follows the OS setting): same tokens and the same
   data-theme rules as the calendar (templates/index.html), so the page matches whichever theme the visitor chose there. */
:root {
  color-scheme: light dark;
  --surface: #fcfcfb; --page: #f9f9f7; --ink: #0b0b0b; --ink-secondary: #52514e; --ink-muted: #696863;
  --field: #898781; --hairline: #e1e0d9; --hover: #f2f1ed; --link: #0b57d0; --on: #0a6b2d; --on-bg: #e4f3e8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1a1a19; --page: #0d0d0d; --ink: #ffffff; --ink-secondary: #c3c2b7; --ink-muted: #9a9890;
    --field: #75746e; --hairline: #2c2c2a; --hover: #242422; --link: #8ab4f8; --on: #6dd58c; --on-bg: #14291b;
  }
}
:root[data-theme="dark"] {
  --surface: #1a1a19; --page: #0d0d0d; --ink: #ffffff; --ink-secondary: #c3c2b7; --ink-muted: #9a9890;
  --field: #75746e; --hairline: #2c2c2a; --hover: #242422; --link: #8ab4f8; --on: #6dd58c; --on-bg: #14291b;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; line-height: 1.5; color: var(--ink); background: var(--page); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
a { color: var(--link); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-muted); font-weight: 400; }

.src-wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* Top bar: the way back, and the same light/dark button as the calendar. */
.src-top { border-bottom: 1px solid var(--hairline); background: var(--surface); }
.src-top .src-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; }
.src-back { color: var(--ink-secondary); text-decoration: none; font-size: 0.92rem; font-weight: 600; padding: 0.5rem 0; }
.src-back:hover { color: var(--ink); text-decoration: underline; }
.src-theme { font: inherit; font-size: 1.05rem; line-height: 1; width: 2.75rem; height: 2.75rem; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--ink-secondary); cursor: pointer; }
.src-theme:hover { background: var(--hover); color: var(--ink); }
.src-theme[hidden] { display: none; }

/* Heading */
.src-hero { padding: 2.25rem 0 0.5rem; }
.src-hero h1 { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; }
.src-lead { margin: 0.75rem 0 0; max-width: 44rem; font-size: 1.05rem; color: var(--ink-secondary); }

/* Filters: one search box, the covered / not covered choice as round buttons (the solid one is selected), the rest as drop-downs. */
.src-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.9rem 1.25rem; margin: 1.5rem 0 0; }
.src-controls[hidden] { display: none; }
.src-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.src-lbl { font-size: 0.8rem; font-weight: 600; color: var(--ink-secondary); }
.src-search { flex: 1 1 12rem; }
.src-controls input[type="search"], .src-controls select { font: inherit; font-size: 0.92rem; min-height: 2.5rem; padding: 0 0.8rem; border-radius: 0.6rem; border: 1px solid var(--field); background: var(--surface); color: var(--ink); max-width: 100%; }
.src-controls input[type="search"] { width: 100%; }
.src-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.src-controls button, .src-clear { font: inherit; font-size: 0.88rem; min-height: 2.5rem; padding: 0 0.9rem; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); cursor: pointer; }
.src-controls button:hover:not([aria-pressed="true"]), .src-clear:hover { background: var(--hover); }
.src-controls button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); font-weight: 600; }
.src-pill-n { margin-inline-start: 0.35em; font-size: 0.82em; font-weight: 400; opacity: 0.8; }
.src-clear { margin-inline-start: 0.4rem; }
@media (pointer: coarse) { .src-controls button, .src-clear, .src-controls input[type="search"], .src-controls select { min-height: 2.75rem; } }

/* Jump links to each group */
.src-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.35rem; margin: 1.25rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--hairline); font-size: 0.88rem; }
.src-nav a { display: inline-flex; align-items: center; min-height: 2rem; padding: 0 0.6rem; border-radius: 0.5rem; color: var(--ink-secondary); text-decoration: none; }
.src-nav a:hover { background: var(--hover); color: var(--ink); text-decoration: underline; }
.src-nav .muted { margin-inline-start: 0.35em; }
#src-count { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--ink-muted); min-height: 1.3em; }

/* Each kind's colour: a small tile by its heading. Decoration only; the words carry the meaning. */
[data-kind] { --k: light-dark(#52514e, #c3c2b7); }
[data-kind="library"] { --k: light-dark(#1d4ed8, #93c5fd); }
[data-kind="museum"] { --k: light-dark(#7c3aed, #c4b5fd); }
[data-kind="government"] { --k: light-dark(#15803d, #86efac); }
[data-kind="venue"] { --k: light-dark(#be123c, #fda4af); }
[data-kind="festival"] { --k: light-dark(#b45309, #fcd34d); }
[data-kind="attraction"] { --k: light-dark(#0f766e, #5eead4); }
[data-kind="business"] { --k: light-dark(#c2410c, #fdba74); }
[data-kind="community"] { --k: light-dark(#4338ca, #a5b4fc); }
[data-kind="university"] { --k: light-dark(#0369a1, #7dd3fc); }

/* Groups and cards */
/* content-visibility: browsers skip laying out groups far off screen, which keeps a long list quick to open and re-sort. */
.src-group { margin-top: 2rem; scroll-margin-top: 1rem; content-visibility: auto; contain-intrinsic-size: auto 22rem; }
.src-group h2 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.8rem; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; }
.src-group h2 .muted { font-size: 0.9rem; }
.src-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 0.6rem; color: var(--k); background: var(--hover); background: color-mix(in srgb, var(--k) 13%, transparent); }
.src-ico svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.src { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0.95rem 1rem; border: 1px solid var(--hairline); border-radius: 0.9rem; background: var(--surface); transition: border-color 0.12s, background-color 0.12s; }
.src[data-state="connected"] { border-color: color-mix(in srgb, var(--on) 40%, var(--hairline)); }
.src:hover { border-color: var(--field); background: var(--hover); }
/* The whole card opens the site: the name's link is stretched over it. "See them here" sits above that layer. */
.src-name { font-weight: 650; font-size: 1.02rem; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.src-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.src-name:focus-visible { outline: none; }
.src-name:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 2px; }
.src:hover .src-name { text-decoration: underline; }
.src-arrow { color: var(--ink-muted); font-weight: 400; margin-inline-start: 0.2em; }
.src-host { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--ink-muted); overflow-wrap: anywhere; }
.src-blurb { margin: 0.5rem 0 0.8rem; font-size: 0.92rem; line-height: 1.45; color: var(--ink-secondary); }
.src-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; min-height: 1.6rem; margin-top: auto; font-size: 0.8rem; color: var(--ink-muted); }
.src-on { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--on-bg); color: var(--on); font-weight: 600; }
.src-off { display: inline-block; padding: 0.1rem 0.55rem; border: 1px dashed var(--field); border-radius: 999px; color: var(--ink-secondary); }
.src-see { position: relative; z-index: 1; color: var(--link); font-weight: 600; }
.src-tag { margin-inline-start: auto; padding: 0.05rem 0.5rem; border: 1px solid var(--hairline); border-radius: 999px; white-space: nowrap; color: var(--ink-secondary); }
.src-kindname { display: none; }
.src-az .src-kindname { display: block; flex-basis: 100%; }  /* A to Z loses the kind headings, so each card names its own */
.src-none { margin: 2rem 0; padding: 1.5rem; border: 1px dashed var(--field); border-radius: 0.9rem; color: var(--ink-secondary); text-align: center; }

/* Footnote */
.src-about { margin: 3rem 0; padding: 1.15rem 1.25rem; border-radius: 0.9rem; background: var(--hover); font-size: 0.9rem; color: var(--ink-secondary); }
.src-about h2 { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--ink); }
.src-about p { margin: 0.35rem 0 0; max-width: 46rem; }

@media (max-width: 30rem) {
  .src-hero { padding-top: 1.5rem; }
  .src-lead { font-size: 0.98rem; }
  .src-controls { gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) { .src { transition: none; } }
