:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172827;
  background: #f3f7f5;
  --muted: #516560;
  --line: #dce7e2;
  --teal: #075b4f;
  --panel: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #008d74; outline-offset: 3px; }
.wrap { width: min(100% - 3rem, 71rem); margin-inline: auto; }
.masthead { background: #102e29; color: #fff; }
.masthead-inner { min-height: 4.2rem; display: flex; align-items: center; gap: .8rem; font-weight: 650; }
.mark { display: grid; align-content: center; gap: 4px; width: 2rem; height: 2rem; padding-inline: 7px; border-radius: 6px; background: #a6efcf; }
.mark i { height: 2px; border-radius: 2px; background: #123d35; }
.mark i:nth-child(2) { width: 80%; }
.mark i:nth-child(3) { width: 55%; }
main { padding-block: 3rem 3.5rem; }
.intro { margin-bottom: 1.75rem; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.08; letter-spacing: -.055em; font-weight: 710; }
.intro p { margin: .75rem 0 0; color: var(--muted); }
.catalog { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 24px #15362b08; overflow: hidden; }
.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; padding: 1.3rem 1.4rem; }
.filter label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 650; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; width: .5rem; height: .5rem; right: 1.05rem; top: 45%; border: solid var(--teal); border-width: 0 2px 2px 0; transform: translateY(-25%) rotate(45deg); pointer-events: none; }
select { appearance: none; width: 100%; min-width: 17rem; min-height: 2.8rem; padding: .55rem 2.5rem .55rem .8rem; border: 1px solid #aebfb7; border-radius: 8px; background: #fff; color: #172827; }
.count { margin: 0 0 .65rem auto; font-size: .94rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.reset { min-height: 2.8rem; padding: 0 .6rem; border: 0; background: none; color: var(--teal); font-weight: 650; }
table { width: 100%; border-collapse: collapse; }
th { background: #eaf2ee; color: #37534b; font-size: .875rem; font-weight: 670; text-align: left; }
th, td { padding: .8rem 1.4rem; }
td { border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #f9fcfa; }
.lot-number { display: block; margin: 0 0 .18rem; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.lot-title { display: block; font-weight: 670; }
.address { display: block; margin-bottom: .35rem; }
.region-tag { display: inline-block; border-radius: 5px; background: #eaf5ee; color: #225c4b; padding: .2rem .45rem; font-size: .875rem; font-weight: 580; }
.region-tag.unknown { background: #f4eee1; color: #694b23; }
.price { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
td.price { font-weight: 650; }
.action { text-align: right; }
.details, .pagination button { min-height: 2.45rem; border: 1px solid #bdd0c8; border-radius: 7px; background: #fff; color: var(--teal); padding: .42rem .75rem; font-size: .9rem; font-weight: 650; }
.details:hover, .pagination button:not(:disabled):hover, .reset:hover { background: #edf8f3; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .95rem 1.4rem; }
.pagination p, .empty { margin: 0; color: var(--muted); }
.pagination div { display: flex; gap: .5rem; }
.pagination button:disabled { cursor: default; color: #63766f; border-color: #dce7e2; background: #f5f8f6; }
.empty { padding: 1.5rem 1.4rem; }
dialog { width: min(100% - 2rem, 30rem); padding: 1.65rem; border: 1px solid var(--line); border-radius: 16px; color: inherit; box-shadow: 0 20px 60px #102e2940; }
dialog::backdrop { background: #102e2970; }
dialog h2 { margin: 0; font-size: 1.55rem; }
dialog dl { margin-block: 1.2rem 1.5rem; }
dialog dt { margin-bottom: .25rem; color: var(--muted); font-size: .9rem; font-weight: 650; }
dialog dd { margin: 0 0 .9rem; }
.close { border: 0; border-radius: 7px; background: var(--teal); color: #fff; padding: .65rem 1rem; }
.close:hover { background: #104a41; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 49rem) {
  th, td { padding-inline: .8rem; }
  .toolbar, .pagination { padding-inline: 1rem; }
}

@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  main { padding-top: 2rem; }
  .toolbar { gap: .75rem; }
  .filter { flex: 1 1 12rem; }
  select { min-width: 0; }
  .count { flex-basis: 100%; margin: 0; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: 1rem; border-block-start: 1px solid var(--line); }
  td { padding: 0; border: 0; }
  td:first-child, td:nth-child(2) { grid-column: 1 / -1; }
  td.price { text-align: left; }
  .pagination { border-top: 1px solid var(--line); }
}
