:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  color: #182b37;
  background: #f5f1e8;
}

* { box-sizing: border-box; }

body { margin: 0; }

main {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 1rem;
}

a { color: #124d70; }

button, .icon-link {
  font: inherit;
  cursor: pointer;
}

.townland-list, .household-table {
  width: 100%;
  border-collapse: collapse;
}

.townland-list li { margin: .6rem 0; }

.household-table th, .household-table td {
  padding: .65rem;
  border-bottom: 1px solid #c9c1b5;
  text-align: left;
}

.household-table th { background: #e9e1d4; }

.viewer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
}

.year-strip { display: flex; gap: .5rem; margin: 1rem 0; }

.year-strip button {
  border: 1px solid #527182;
  border-radius: .3rem;
  background: #fff;
  padding: .35rem .7rem;
}

.year-strip button[aria-current="true"] {
  background: #174d6b;
  color: #fff;
}

.year-strip button:disabled { opacity: .45; cursor: not-allowed; }

.image-viewer {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #697984;
  background: #242b30;
}

.census-image {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  cursor: zoom-in;
}

.image-control {
  position: absolute;
  z-index: 1;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 88%);
  color: #173f55;
  font-size: 1.65rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}

.image-control:hover { background: #fff; }
.image-control:disabled { display: none; }
.control-left { left: .8rem; top: 50%; transform: translateY(-50%); }
.control-right { right: .8rem; top: 50%; transform: translateY(-50%); }
.control-up { top: .8rem; left: 50%; transform: translateX(-50%); }
.control-down { bottom: .8rem; left: 50%; transform: translateX(-50%); }
.control-index { top: .8rem; left: .8rem; font-size: 1.25rem; }

.source, .missing-return {
  margin: .9rem 0 0;
}

.missing-return {
  max-width: 30rem;
  padding: 1.4rem;
  text-align: center;
  color: #fff;
}

.note { margin-top: .7rem; color: #4c4133; }

@media (max-width: 600px) {
  main { padding: .7rem; }
  h1 { font-size: 1.7rem; }
  .image-viewer { min-height: 40vh; }
  .image-control { width: 2.35rem; height: 2.35rem; font-size: 1.3rem; }
  .household-table { font-size: .88rem; }
  .household-table th, .household-table td { padding: .4rem .25rem; }
}
