:root {
  --bg: #f7fbff;
  --ink: #071331;
  --muted: #637089;
  --line: #d8e3f5;
  --brand: #1677ff;
  --brand-strong: #0759d6;
  --accent: #6c35ff;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg) 44%, #ffffff 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 34px 0 2px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.logo-link {
  display: inline-flex;
  justify-content: center;
}

.logo-link img {
  display: block;
  width: min(360px, 68vw);
  height: auto;
}

nav {
  display: flex;
  gap: 18px;
}

.home-search {
  min-height: auto;
  display: block;
  text-align: center;
  padding: 64px 0 34px;
}

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

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

.search-box,
.compact-search {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 6px 0;
}

.daily-gospel-player {
  width: min(680px, 100%);
  margin: 78px auto 0;
  text-align: left;
}

.daily-gospel-player p {
  margin: 0 0 8px;
  color: rgba(99, 112, 137, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
}

.daily-gospel-player iframe {
  display: block;
  border: 0;
  box-shadow: 0 14px 36px rgba(7, 19, 49, 0.08);
}

label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-row,
.compact-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search .search-row {
  grid-template-columns: 1fr;
}

.search-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(22, 119, 255, 0.08);
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.14);
  outline: 0;
}

button,
.button-link,
.result-actions a {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover,
.result-actions a:hover {
  background: var(--brand-strong);
}

.geo-button {
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.seo-copy,
.city-hero,
.results-page,
.church-page,
.internal-links {
  margin: 42px 0;
}

.seo-copy {
  max-width: 820px;
}

.quick-links,
.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.internal-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.results-list {
  display: grid;
  gap: 12px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.radius-filter {
  width: min(920px, 100%);
  margin: 0 auto 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(7, 19, 49, 0.06);
}

.radius-filter label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.radius-filter-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 800;
}

.radius-filter output {
  color: var(--brand-strong);
}

.radius-filter input[type="range"] {
  min-height: 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--brand);
}

.radius-filter button {
  width: 100%;
  margin-top: 14px;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(110px, 0.24fr) 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(7, 19, 49, 0.06);
}

.result-card h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.result-card p {
  margin: 4px 0;
}

.next-mass {
  color: var(--brand-strong);
  font-weight: 800;
}

.mass-time {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.1;
}

.mass-date {
  margin: 2px 0 0;
  color: var(--brand-strong);
  font-weight: 800;
}

.mass-distance {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.92rem;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.result-place {
  min-width: 0;
}

.result-actions {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 150px;
}

.details {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.details div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 750;
}

dd {
  margin: 0;
}

.source {
  color: var(--muted);
}

.site-footer {
  margin-top: 68px;
  padding: 24px 0 30px;
  border-top: 1px solid rgba(102, 112, 133, 0.16);
  color: rgba(102, 112, 133, 0.78);
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.empty {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

@media (max-width: 720px) {
  .site-header,
  .result-card,
  .search-row,
  .compact-search,
  .details div {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
    gap: 12px;
  }

  nav {
    overflow-x: auto;
  }
}
