.services { padding: 0 6.15% 6vw; }
.services h2 { margin: 0 0 4.7vw; text-align: center; color: #ad781e; font: italic bold clamp(1.65rem, 3.35vw, 3.8rem)/1.2 Novarese, Georgia, serif; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85vw .7vw; }
.service-tile {
  display: flex; align-items: center; justify-content: space-between; gap: .75em;
  min-height: max(3.5rem, 6.6vw); padding: .7em 7% .7em 17%;
  border: 1px solid #6e9fdf; border-radius: .85em; background: white;
  color: #302b29; font: 400 clamp(.95rem, 1.48vw, 1.65rem)/1.2 Novarese, Georgia, serif;
  text-decoration: none;
}
.service-tile::after { content: ""; width: 1.2em; aspect-ratio: 1; flex: none; background: url("../assets/services/check.svg") center / contain no-repeat; }
.service-tile:focus-visible { outline: 2px solid #202d77; outline-offset: 2px; background: #fff8e9; }
@media (hover: hover) {
  .service-tile:hover { background: #fff8e9; border-color: #cc9a36; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-tile { transition: transform .18s ease-out, background-color .18s, border-color .18s; }
  .service-tile:hover { transform: translateY(-2px); }
}
@media (max-width: 55rem) {
  .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .service-tile { padding-inline: .8rem; }
}
@media (max-width: 23rem) { .service-grid { grid-template-columns: 1fr; } }
.service-directory { max-width: 54rem; margin: auto; padding: 2rem 6% 5rem; color: #302b29; font: 1.05rem/1.5 Georgia, serif; }
.service-directory section { padding: 1.25rem 0; border-bottom: 1px solid #e0d5c5; }
.service-directory h2 { font-size: 1.35rem; color: #202d77; }
.service-directory section:target { border-bottom-color: #cc9a36; }

.service-tile { cursor: pointer; text-align: left; }
.service-popup {
  box-sizing: border-box;
  width: min(28rem, calc(100% - 2rem));
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid #d8bd88;
  border-radius: 1rem;
  background: #fffbf5;
  color: #302b29;
  font: 1.05rem/1.5 Novarese, Georgia, serif;
}
.service-popup::backdrop { background: rgb(34 29 25 / 48%); }
.service-popup h3 { margin: 0; color: #805818; font-size: 1.5rem; }
.service-popup form { text-align: right; }
.service-popup button { padding: .45em 1em; border: 0; border-radius: .45rem; background: #805818; color: white; cursor: pointer; font: inherit; }

:is(#service-help-desk, #service-emergency, #service-resident-doctors) {
  width: min(27rem, calc(100% - 2rem));
  padding: clamp(1.25rem, 3vw, 1.65rem);
  border: 1px solid #dedfe6;
  box-shadow: 0 .75rem 3rem #101e3233;
}
:is(#service-help-desk, #service-emergency, #service-resident-doctors) h3 { color: #ad781e; font-size: 1.65rem; }
.helpdesk-contacts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .65rem 1.2rem;
  margin: 1.2rem 0;
  font: 1rem/1.5 Novarese, Georgia, serif;
}
.helpdesk-contacts dt { font-weight: 700; color: #484c59; }
.helpdesk-contacts dd { margin: 0; }
.helpdesk-contacts a { display: inline-block; color: #202d77; text-decoration: none; }
.helpdesk-contacts a:hover { color: #805818; }
:is(#service-help-desk, #service-emergency, #service-resident-doctors) button { border-radius: 2rem; background: #dfba78; color: #192d46; padding-inline: 1.4em; }
:is(#service-help-desk, #service-emergency, #service-resident-doctors) :focus-visible { outline: 2px solid #202d77; outline-offset: 3px; }
@media (max-width: 24rem) {
  .helpdesk-contacts { grid-template-columns: 1fr; gap: 0; }
  .helpdesk-contacts dd + dt { margin-top: .6rem; }
}

#car-pass-form { text-align: left; }
#car-pass-form input {
  box-sizing: border-box;
  width: 8ch;
  max-width: 100%;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
#car-pass-form input[type=date], #car-pass-form input[name=registration] { width: 14ch; }
#car-pass-form .permit-actions { text-align: right; }
.permit-status:empty { display: none; }

#service-new-resident {
  width: min(46rem, calc(100% - 1rem));
  padding: clamp(.75rem, 2.5vw, 1.75rem);
  font-size: clamp(.875rem, 1.5vw, 1rem);
  line-height: 1.35;
}
#service-new-resident h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
#service-new-resident :is(p, ol) { margin: .5em 0; }
#service-new-resident :is(ol, ul) { padding-left: 1.4em; }
#service-new-resident ul { margin: .25em 0 0; }
#service-new-resident ol > li + li { margin-top: .4em; }
#service-new-resident p:last-of-type { float: left; }

#service-resident-doctors { width: min(34rem, calc(100% - 1rem)); }
#service-resident-doctors { --directory-inset: clamp(.5rem, 1.5vw, 1rem); }
#title-resident-doctors { margin-inline-start: var(--directory-inset); }
.doctor-directory {
  width: calc(100% - var(--directory-inset));
  border-collapse: collapse;
  margin-block: 1rem;
  margin-inline-start: var(--directory-inset);
  font-size: clamp(.875rem, 1.5vw, 1rem);
}
.doctor-directory caption { text-align: left; font-weight: bold; color: #202d77; margin-bottom: .6rem; }
.doctor-directory :is(th, td) { padding: .4em .35em; border-bottom: 1px solid #e5dac6; text-align: left; }
.doctor-directory th { color: #484c59; }
