/* Larger type and controls for the register; mobile results become cards. */
:root { --muted: #53614e; }
body { font-size: 17px; }
.header nav { font-size: 16px; gap: 28px; }
.header nav a { min-height: 44px; display: inline-flex; align-items: center; }
.brand { font-size: 21px; }
.brand small { font-size: 13px; color: #53614e; letter-spacing: .4px; white-space: normal; }
.header { display: flex; flex-wrap: wrap; height: auto; min-height: 132px; padding-top: 22px; padding-bottom: 22px; gap: 26px; }
.header .brand { font-size: clamp(28px, 2.6vw, 34px); gap: 18px; white-space: normal; }
.header .brand > span:last-child { min-width: 0; }
.header .brand-cross { flex: 0 0 auto; font-size: 64px; }
.header .brand small { font-size: 18px; line-height: 1.5; margin-top: 6px; letter-spacing: .2px; }
.header nav { margin-left: auto; }
.search-section { border-top: 0; padding-top: 26px; }
.demo-pill { font-size: 13px; color: #53614e; }
.eyebrow, .hero .eyebrow { font-size: 12px; color: #53614e; }
.hero-description { font-size: 18px; line-height: 1.8; }
.text-link { font-size: 17px; min-height: 44px; }
h2 { font-size: 32px; }
.subtle { font-size: 14px; color: #53614e; }
.memorial-stats span { font-size: 14px; color: #53614e; }
.memorial-stats strong { font-size: 30px; }
.memorial-card { min-height: 0; width: 100%; max-width: 430px; justify-self: end; padding: 28px; border-radius: 12px; }
.memorial-stats { margin-top: 18px; padding-top: 20px; gap: 36px; }
.memorial-card .eyebrow { text-align: center; }
.church-hero { min-width: 0; }
.church-artwork { display: block; width: 100%; height: clamp(240px, 27vw, 340px); object-fit: contain; margin: -20px 0 16px; }
.church-hero .hero-description { font-size: 17px; }
.field { min-width: 0; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name action" "filters filters"; gap: 8px 14px; align-items: end; padding: 18px; }
.search-main { display: contents; }
.search-form .search-main .name-field { grid-area: name; }
.search-form .search-submit { grid-area: action; justify-self: end; min-height: 54px; height: 54px; padding: 0 18px; border: 1px solid #a8baa0; border-radius: 6px; background: #edf3e8; color: #294d3e; font-size: 16px; font-weight: 600; }
.search-form .search-submit:hover { background: #dfead7; border-color: #7c946c; }
.advanced-filters { grid-area: filters; min-width: 0; margin-top: 0; }
.advanced-filters summary { display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-height: 44px; padding: 5px 0; list-style: none; cursor: pointer; font-size: 16px; color: #385435; }
.advanced-filters summary::-webkit-details-marker { display: none; }
.advanced-filters summary:focus-visible { outline: 3px solid #ba944e; outline-offset: 4px; }
.filters-chevron { font-size: 23px; line-height: 1; }
.advanced-filters[open] .filters-chevron { transform: rotate(180deg); }
.filters-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 8px; padding-top: 20px; border-top: 1px solid #dce3d4; }
.filters-grid > .field { grid-area: auto; }
.filter-status { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 12px; background: #e5eddd; font-size: 14px; color: #385435; }
.field label { font-size: 16px; margin-bottom: 9px; }
.field input, .field select { font-size: 18px; height: 54px; border-color: #a8b49e; }
.field input::placeholder { color: #64705e; opacity: 1; }
.input-icon > span { top: 7px; color: #53614e; }
.primary { font-size: 18px; min-height: 54px; height: auto; white-space: nowrap; }
.secondary { font-size: 16px; min-height: 48px; border-color: #a8b49e; padding: 10px 18px; }
.clear-filters { font-size: 16px; min-height: 48px; color: #294d3e; }
.results-toolbar { font-size: 17px; color: #53614e; }
.results-layout { grid-template-columns: minmax(0, 1fr); }
.help-card { display: none; }
.results-panel { border-color: #cbd4c1; border-radius: 10px; }
th { font-size: 13px; letter-spacing: .3px; font-weight: 600; color: #4c5d43; padding: 18px 20px; }
td { font-size: 18px; line-height: 1.6; padding: 19px 20px; color: #35432f; border-top-color: #dce3d4; }
td:first-child { font-family: 'DM Sans', sans-serif; font-size: 20px; font-weight: 600; min-width: 200px; }
td:last-child { padding: 12px 18px 12px 8px; }
td button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 14px; font-size: 16px; font-weight: 600; border: 1px solid #b7c7ac; border-radius: 6px; background: #f1f5ed; }
td button:hover { background: #e3ecda; text-decoration: none; }
tbody tr:nth-child(even) { background: #fafcf7; }
.location-tag { font-size: 16px; padding: 5px 10px; color: #354c2b; background: #edf2e5; }
.separate-label { font-size: 13px; color: #675d38; }
.results-bottom { font-size: 14px; color: #53614e; padding: 16px 20px; gap: 16px; flex-wrap: wrap; }
.pagination { padding: 18px 20px; }
.pagination > span { font-size: 16px; color: #53614e; }
.pagination button { font-size: 16px; min-height: 48px; padding: 10px 18px; }
.data-notice { font-size: 15px; color: #53614e; }
.empty p { font-size: 17px; }
.information p { font-size: 16px; color: #53614e; }
.information h2 { font-size: 28px; }
.info-item h3 { font-size: 18px; }
footer > span, footer p { font-size: 14px; color: #53614e; }
footer .brand { font-size: 17px; }
footer .brand small { font-size: 10px; }

/* One spacious memorial card, with a close control that stays visible. */
dialog { width: min(760px, calc(100% - 40px)); max-height: min(90vh, 1100px); max-height: min(90dvh, 1100px); padding: 0; border-radius: 16px; border-color: #c5d1ba; background: #fffefa; overscroll-behavior: contain; }
dialog::backdrop { background: #172c24a6; }
.close { position: sticky; top: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; width: max-content; min-height: 46px; margin: 14px 18px -60px auto; padding: 8px 14px; border: 1px solid #bdcbb1; border-radius: 7px; background: #fffefa; color: #294d3e; font: 600 16px 'DM Sans', sans-serif; }
.close > span { font-size: 27px; line-height: 1; font-weight: 400; }
.detail-header { padding: 52px 40px 32px; background: #edf2e6; border-bottom: 1px solid #d9e2ce; text-align: center; }
.detail-cross { display: block; font-size: 40px; color: #627957; margin: 6px 0 16px; }
.detail-name { font-size: 36px; line-height: 1.3; margin: 14px 0 0; overflow-wrap: anywhere; color: #294d3e; }
.detail-body { padding: 30px 40px 36px; }
.detail-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 30px; }
.detail-dates > div { border-left: 3px solid #c6d4b8; padding-left: 17px; }
.detail-dates dt { font-size: 16px; color: #53614e; }
.detail-dates dd { margin: 5px 0 0; font-size: 25px; font-weight: 500; color: #293a32; font-variant-numeric: tabular-nums; }
.burial-section h3, .grave-companions h3 { font: 600 21px/1.4 'DM Sans', sans-serif; margin: 0 0 16px; }
.detail-location { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; padding: 0; background: none; }
.detail-location > div { padding: 17px 14px; text-align: center; background: #f2f5ec; border: 1px solid #c7d5ba; border-radius: 8px; }
.detail-location dt { font-size: 16px; color: #53614e; }
.detail-location dd { margin: 6px 0 0; font: 600 32px/1.3 'DM Sans', sans-serif; color: #294d3e; overflow-wrap: anywhere; }
.source-label { margin: 0 0 24px; font-size: 15px; color: #53614e; }
.grave-companions { margin-top: 28px; padding-top: 25px; }
.grave-companions ul { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.grave-companions li { display: block; border: 0; padding: 0; }
.grave-companions button { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; gap: 4px 14px; padding: 15px 18px; border: 1px solid #d2dcc8; border-radius: 8px; background: #fff; color: #294d3e; font-size: 18px; text-align: left; text-decoration: none; }
.grave-companions button:hover { background: #f0f5e9; border-color: #829b70; }
.grave-companions button > span:first-child { font-weight: 600; grid-column: 1; }
.grave-companions button small { grid-column: 1; font-size: 15px; color: #53614e; }
.grave-companions button .companion-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 25px; }
.grave-companions > p { font-size: 17px; color: #53614e; }
.record-notice { font-size: 16px; line-height: 1.7; padding: 18px; margin-top: 22px; color: #61532a; border-color: #d6c99f; }
.detail-note { font-size: 15px; line-height: 1.7; color: #53614e; margin-top: 26px; }
.detail-back { display: block; width: 100%; margin-top: 25px; font-size: 18px; min-height: 52px; }

@media (max-width: 1100px) {
  th, td { padding-left: 14px; padding-right: 14px; }
  .field input, .field select { font-size: 17px; }
}
@media (max-width: 850px) {
  .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-grid .year-field { grid-column: 1 / -1; }
  .hero { grid-template-columns: 1fr; }
  .church-artwork { height: 300px; max-width: 560px; margin: -12px auto 16px; }
  .hero-description br { display: none; }
  .memorial-card { min-height: 0; max-width: none; }
  .header nav { font-size: 15px; }
}
@media (max-width: 950px) {
  .table-wrap { overflow: visible; }
  table { min-width: 0; white-space: normal; display: block; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody { display: block; }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 22px 20px; border-bottom: 1px solid #cbd4c1; }
  tbody tr:last-child { border-bottom: 0; }
  td, td:last-child { display: block; min-width: 0; padding: 0; border: 0; font-size: 18px; }
  td:first-child { grid-column: 1 / -1; font-size: 21px; min-width: 0; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: 14px; color: #53614e; margin-bottom: 4px; }
  td:last-child { display: flex; align-items: end; justify-content: end; }
  td button { min-height: 48px; padding: 10px 12px; font-size: 16px; }
  .location-tag { font-size: 17px; padding: 4px 8px; }
  .results-bottom { padding: 14px 20px; }
}
@media (max-width: 600px) {
  .search-section { padding-top: 16px; }
  .search-form { grid-template-areas: "name name" "filters action"; gap: 6px 10px; padding: 14px; }
  .search-form.filters-expanded { grid-template-areas: "name name" "filters filters" ". action"; }
  .search-form .search-submit { min-height: 44px; height: 44px; padding: 0 12px; }
  .search-form .field label { margin-bottom: 6px; }
  .search-form .field input, .search-form .field select { height: 50px; }
  .advanced-filters summary { font-size: 15px; gap: 8px; }
  .advanced-filters summary > span:first-child { min-width: 0; }
  .filters-chevron { font-size: 20px; }
  .filter-status { margin-left: 4px; padding: 0 6px; }
  .filters-grid { grid-template-columns: minmax(0, 1fr); }
  .filters-grid .year-field { grid-column: auto; }
  main { padding: 0 18px; }
  .header { padding: 20px 18px; min-height: 0; gap: 14px; }
  .header .brand { flex-basis: 100%; font-size: 28px; gap: 14px; }
  .header .brand-cross { font-size: 58px; }
  .header .brand small { font-size: 17px; }
  .header nav { margin-left: 0; }
  .header nav { gap: 22px; font-size: 16px; }
  .hero .eyebrow { font-size: 11px; }
  .hero-description { font-size: 17px; }
  .church-artwork { height: 260px; margin-top: -10px; }
  .hero .text-link { font-size: 17px; }
  h2 { font-size: 29px; }
  .search-form .primary { font-size: 16px; padding: 0 10px; }
  .field input, .field select { font-size: 17px; }
  .results-toolbar { font-size: 16px; gap: 10px; margin: 10px 0 8px; }
  .clear-filters { font-size: 15px; }
  .pagination { padding: 16px 12px; display: grid; grid-template-columns: 1fr 1fr; }
  .pagination > span { grid-column: 1 / -1; grid-row: 1; text-align: center; font-size: 16px; }
  .pagination button { font-size: 15px; padding: 10px; }
  .information p { font-size: 16px; }
  .info-item h3 { font-size: 18px; }
  footer > span { font-size: 12px; }
  footer { flex-wrap: wrap; }
  dialog { width: calc(100% - 20px); max-height: 94vh; max-height: 94dvh; border-radius: 12px; }
  .close { margin-right: 12px; }
  .detail-header { padding: 60px 22px 28px; }
  .detail-name { font-size: 30px; }
  .detail-body { padding: 24px 20px 28px; }
  .detail-dates { gap: 14px; }
  .detail-dates > div { padding-left: 12px; }
  .detail-dates dt { font-size: 15px; }
  .detail-dates dd { font-size: 21px; }
  .detail-location { gap: 8px; }
  .detail-location > div { padding: 14px 6px; }
  .detail-location dt { font-size: 14px; min-height: 3.2em; line-height: 1.6; display: flex; align-items: center; justify-content: center; }
  .detail-location dd { font-size: 28px; }
  .grave-companions button { padding: 14px; font-size: 18px; }
}
@media (max-width: 380px) {
  .detail-dates { grid-template-columns: minmax(0, 1fr); }
  .detail-location { grid-template-columns: minmax(0, 1fr); }
  .detail-location > div { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .detail-location dt { min-height: 0; }
  .detail-location dd { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Informacja o przykładowych danych projektu Kozy. */
.demo-notice { margin: 0 0 24px; padding: 16px 20px; border: 1px solid #d8c7a7; border-radius: 10px; background: #faf5e9; color: #4d4639; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
