:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #17314a;
  background: #f8f6f0;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #8b5b0b; outline-offset: 4px; }
.skip-link { position: absolute; inset: .75rem auto auto .75rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; background: #fff; padding: .75rem; }
.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 2rem;
  padding: .8rem max(1rem, calc((100% - 66rem) / 2));
  background: #fffdf7;
  border-bottom: 1px solid #d6d0c2;
}
.wordmark {
  font: bold 1.5rem Georgia, serif;
  text-decoration: none;
}
.wordmark span { color: #895c1d; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding-right: 52px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
main { width: min(100% - 2rem, 66rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) 0; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: Georgia, serif; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
p { line-height: 1.55; }
.intro { margin: .85rem 0 2rem; max-width: 48rem; font-size: 1.1rem; }
.workbooks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: 1rem;
}
article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 1.6rem);
  border: 1px solid #c5cdd1;
  border-radius: .5rem;
  background: #fff;
}
.workbook-heading { display: flex; gap: .875rem; align-items: center; }
.sheet-icon {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 3rem;
  height: 2.75rem;
  padding: .2rem;
  border: 1px solid #40735d;
  border-radius: .25rem;
  color: #1b5940;
  background: #edf6ee;
  font-size: .875rem;
  font-weight: 750;
}
.coverage { margin-top: .25rem; color: #455966; font-size: .95rem; }
.workbook-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: auto;
  padding: .65rem 1rem;
  border-radius: .25rem;
  color: #142b47;
  background: #f7d678;
  font-weight: 750;
}
.workbook-link:hover { background: #ffe59c; }
.access-note { margin-top: 1.25rem; max-width: 52rem; color: #455966; }

.map-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: .75rem;
}
.map-filters label { display: grid; gap: .32rem; font-weight: 680; }
.map-filters select, .map-filters input, main button {
  min-height: 44px;
  border: 1px solid #8597a3;
  border-radius: .35rem;
  background: #fff;
  color: #17314a;
  padding: .45rem .65rem;
  font: inherit;
}
main button { cursor: pointer; font-weight: 650; }
main :is(button, input, select):focus-visible { outline: 3px solid #8b5b0b; outline-offset: 2px; }
#transaction-status { margin-bottom: .5rem; }
#transaction-map {
  height: max(360px, 80svh);
  border: 1px solid #93a7b3;
  border-radius: .5rem;
  background: #e6e4d9;
  font-family: system-ui, sans-serif;
  isolation: isolate;
}
.map-note { margin-top: .55rem; color: #455966; }
.sale-pin {
  display: grid;
  place-items: center;
  color: #fff;
  background: #a13b28;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px #17314a8c;
  font-weight: 800;
}
.sale-pin-single { font-size: 13px; line-height: 1; }
.sale-pin-group { color: #142b47; background: #f7d678; }
.sale-county-label {
  background: #fffdf3e8;
  color: #17314a;
  border-color: #acb5b5;
  font-weight: 750;
  font-size: 13px;
}
.sale-popup { width: min(25rem, 65vw); }
.sale-popup h3 { margin: 0 0 .35rem; font-size: 1.04rem; }
.sale-popup p { margin: .35rem 0; }
.sale-popup dl { display: grid; grid-template-columns: max-content 1fr; column-gap: .75rem; margin: .45rem 0; }
.sale-popup dt { font-weight: 750; }
.sale-popup dd { margin: 0; overflow-wrap: anywhere; }
.sale-popup select { width: 100%; padding: .4rem; font: inherit; }
.transaction-register { margin-top: .8rem; }
.transaction-register summary { cursor: pointer; font-weight: 700; }
#transaction-list { list-style: none; padding: 0; }
#transaction-list li { border-bottom: 1px solid #c5cdd1; padding: .65rem 0; }
#transaction-list button { margin-top: .4rem; }
#transaction-list small { display: block; color: #455966; font-size: .92rem; }
.workbook-title { margin: 2.25rem 0 .8rem; }
@media (max-width: 39rem) {
  .map-filters label { flex: 1 1 12rem; }
  .map-filters input, .map-filters select { width: 100%; }
}

.sale-pin-single { font-size: 15px; }
.sale-pin-single.county-storey { background: #00577e; }
.sale-pin-single.county-washoe { background: #6036a1; }
.sale-pin-single.county-lyon { background: #93440c; }
.sale-pin-single.county-churchill { background: #32653e; }
.sale-pin-single.county-elko { background: #973d50; }
.transaction-expanded { position: fixed; z-index: 22000; inset: 0; background: #e6e4d9; }
.transaction-expanded #transaction-map { height: 100%; border: 0; border-radius: 0; }
#transaction-exit { position: absolute; z-index: 1000; top: max(.75rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); }

.gn-land-sales { width: calc(100% - clamp(.75rem, 2vw, 2rem)); padding-block: clamp(1rem, 3vw, 2.5rem); }
.gn-sales-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.gn-sales-title h1 { font-size: clamp(1.85rem, 4vw, 3rem); }
.gn-sales-title p { margin-top: .5rem; }
.gn-sales-title .workbook-link { text-decoration: none; }
.gn-sales-grid { overflow: auto; max-height: 78svh; border: 1px solid #9eb1c0; border-radius: 6px; background: white; }
.gn-sales-grid table { border-spacing: 0; width: 100%; min-width: 1120px; font-variant-numeric: tabular-nums; }
.gn-sales-grid :is(th, td) { padding: .65rem .65rem; text-align: left; vertical-align: top; border-bottom: 1px solid #cdd8df; border-right: 1px solid #dce4e9; font-size: .9375rem; }
.gn-sales-grid th { position: sticky; top: 0; z-index: 1; background: #142b47; color: #fff; white-space: nowrap; }
.gn-sales-grid th button { min-height: 34px; padding: 0; border: 0; background: transparent; color: inherit; white-space: nowrap; }
.gn-sales-grid th[aria-sort="ascending"] button::after { content: " ▲"; }
.gn-sales-grid th[aria-sort="descending"] button::after { content: " ▼"; }
.gn-sales-grid tr:nth-child(even) { background: #edf3f6; }
.gn-sales-grid tr:focus-within, .gn-sales-grid tr:hover { background: #fff1cb; }
.gn-sales-grid .gn-sales-number { text-align: right; }
.gn-sales-grid th:first-child { width: 91px; }
.gn-sales-grid th:nth-child(2) { width: 110px; }
.gn-sales-grid th:nth-child(3) { width: 126px; }
.gn-sales-grid td:nth-child(2), .gn-sales-price { white-space: nowrap; }
.gn-sales-price, .gn-sales-grid td:first-child strong { font-weight: 800; }
.gn-sales-grid td small { display: block; margin-top: .22em; color: #455966; font-size: .75rem; }
.gn-sales-grid td button { min-height: 32px; padding: .2rem .5rem; }
.gn-sales-map, .gn-sales-sources { margin-top: .75rem; }
.gn-sales-map summary, .gn-sales-sources summary { cursor: pointer; font-weight: 750; }
.gn-sales-map[open] summary, .gn-sales-sources[open] summary { margin-bottom: .65rem; }
#transaction-expand, #transaction-expand-table { margin-bottom: .5rem; }
.gn-sales-sources p { max-width: 80ch; margin: .45rem 0; }

.gn-sale-report { margin: 1.5rem 0; }
.gn-sale-report h2 { margin: 0 0 .75rem; }
.gn-sale-report p { margin: .6rem 0; }

#transaction-table-dialog[open] {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: .55rem;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right))
    max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left));
  border: 0;
  background: #f8f6f0;
}
#transaction-dialog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .35rem .75rem;
}
#transaction-dialog-toolbar .map-filters { flex: 1 1 auto; margin: 0; }
#transaction-dialog-toolbar #transaction-status { margin: 0; }
#transaction-close-table { margin-inline-start: auto; }
@media (max-width: 640px) {
  #transaction-dialog-toolbar .map-filters { flex-basis: 100%; }
}
#transaction-table-dialog #transaction-table-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#transaction-table-dialog .gn-sales-grid { flex: 1; max-height: none; }

.gn-land-sales { padding-top: clamp(.85rem, 2vw, 1.25rem); }
.gn-sales-title { margin-bottom: .75rem; }
.gn-sales-title h1 { font-size: clamp(1.65rem, 3.3vw, 2.7rem); }
.gn-sales-title p { margin-top: .2rem; }
.gn-land-sales .map-filters { gap: .4rem .75rem; margin-bottom: .4rem; }
.gn-land-sales .map-filters label { gap: .2rem; }
.sales-toolbar, .sales-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
}
.sales-toolbar { justify-content: space-between; margin-bottom: .35rem; }
.sales-actions { gap: .25rem .8rem; }
#transaction-status, #transaction-expand-table { margin: 0; }
#transaction-expand-table { min-height: 34px; padding: .25rem .5rem; }
.gn-sales-list table { min-width: 0; table-layout: fixed; }
.gn-sales-list :is(th, td) {
  padding: .3rem .55rem;
  vertical-align: middle;
  font-size: .875rem;
  line-height: 1.3;
}
.gn-sales-list th:first-child { width: 8.5rem; }
.gn-sales-list th:nth-child(2) { width: 9rem; }
.gn-sales-list th:nth-child(3) { width: 7rem; }
.gn-sales-list td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.gn-sales-list td:nth-child(n+4) span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.gn-sales-list button.sale-date {
  display: block;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #173d64;
  background: transparent;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .12em;
}
#transaction-sale-dialog,
#transaction-party-dialog {
  width: min(34rem, calc(100% - 1.5rem));
  max-height: min(48rem, 90svh);
  padding: 1rem;
  border: 1px solid #9eb1c0;
  border-radius: .5rem;
  background: #fffdf7;
  color: #17314a;
}
#transaction-sale-dialog::backdrop,
#transaction-party-dialog::backdrop { background: #162b41a6; }
.sale-dialog-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
#transaction-sale-details .sale-popup,
#transaction-party-details { width: auto; }
#transaction-party-title { overflow-wrap: anywhere; }
#transaction-party-details ul { padding-inline-start: 1.25rem; }
#transaction-party-details li { margin-block: .35rem; }
#transaction-sale-details .sale-popup button { display: block; margin-top: .65rem; }
.gn-sale-report summary { cursor: pointer; font-weight: 750; }
.gn-sale-report[open] summary { margin-bottom: .65rem; }

@media (max-width: 44rem) {
  .gn-land-sales .map-filters label { flex: 1 1 8rem; min-width: 0; }
  .gn-land-sales .map-filters :is(select,input) { width: 100%; }
  .gn-sales-list :is(th,td) { padding: .27rem .23rem; font-size: .8125rem; }
  .gn-sales-list th:first-child { width: 17%; }
  .gn-sales-list th:nth-child(2) { width: 24%; }
  .gn-sales-list th:nth-child(3) { width: 13%; }
  .gn-sales-list th button { white-space: normal; line-height: 1.2; }
  .gn-sales-list td:nth-child(n+4) span { -webkit-line-clamp: 3; }
  .gn-sales-list td:nth-child(3) { overflow-wrap: anywhere; }
}

.gn-sales-title .sales-price-threshold {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.25;
}
.sales-price-threshold strong { font-weight: 800; }
