@font-face {
  font-family: Literata;
  src: url("/fonts/literata-cyr-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-04FF;
}
@font-face {
  font-family: Literata;
  src: url("/fonts/literata-lat-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Literata;
  src: url("/fonts/literata-cyr-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-04FF;
}
@font-face {
  font-family: Literata;
  src: url("/fonts/literata-lat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-cyr-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-04FF;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-lat-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-cyr-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-04FF;
}
@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope-lat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  --ink: #1b1714;
  --mute: #5e564c;
  --copper: #c24b24;
  --sky: #1d6d86;
  --paper: #fffdf8;
  --line: #eadfd0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-x: clip;
  background: #4e565c url("/images/roofs.jpg") center 28% / cover fixed;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--paper);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.loft {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px 20px 16px;
}
.mast, .floors {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  background: rgba(255, 253, 248, 0.94);
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: 0 18px 40px rgba(48, 28, 12, 0.18);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}
.mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--copper);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  flex: 0 0 auto;
}
.where, .name { display: block; }
.where { color: var(--copper); font-size: 14px; }
.name {
  font-family: Literata, Palatino, serif;
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.86;
  letter-spacing: -0.03em;
}
.find { display: flex; gap: 8px; align-items: end; flex: 1 1 260px; max-width: 420px; min-width: 0; }
.find label { display: grid; gap: 4px; font-size: 13px; color: var(--mute); flex: 1; min-width: 0; }
.find input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 8px 0;
}
.find button, .read {
  background: var(--sky);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.find button:hover, .read:hover { background: #15586c; }
.floors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.floors a {
  text-decoration: none;
  background: rgba(255, 253, 248, 0.92);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.floors a[aria-current="page"] { background: var(--copper); color: #fff; }

.sheet, .note {
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 36px;
  background: rgba(255, 253, 248, 0.94);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(48, 28, 12, 0.16);
}
.sheet-head { display: grid; gap: 10px; margin-bottom: 16px; }
.count { margin: 0; color: var(--mute); }
.districts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  mask-image: linear-gradient(to right, #000 0 92%, transparent);
}
.districts a {
  flex: 0 0 auto;
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.lead {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.lead-photo, .card-photo, .note-photo { display: block; background: #d7e4ea; overflow: hidden; }
.lead-photo { aspect-ratio: 3 / 2; }
.lead-photo img, .card-photo img, .note-photo img, .glass {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.glass { background: url("/images/attic.jpg") center 30% / cover; min-height: 180px; }
.lead-copy { padding: 28px 28px 24px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.lead h1, .note h1, .card h2, .empty h1 {
  font-family: Literata, Palatino, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.lead h1 { margin: 0; font-size: clamp(28px, 2.6vw, 40px); }
.lead h1 a, .card h2 { text-decoration: none; }
.lead h1 a:hover, .card h2:hover { color: var(--copper); }
.lead p, .card p, .note .deck { margin: 0; max-width: 62ch; }
.lead p, .card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lead p { -webkit-line-clamp: 4; }
.card p { -webkit-line-clamp: 3; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; color: var(--mute); font-size: 14px; }
.meta span { color: var(--copper); font-weight: 700; }
.read { margin-top: 10px; align-self: flex-start; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.card { background: #fff; border-radius: 16px; overflow: hidden; }
.card a { display: block; text-decoration: none; height: 100%; }
.card-photo { aspect-ratio: 16 / 10; overflow: hidden; }
.card-photo img, .card-photo .glass { height: 100%; min-height: 0; }
.card-copy { padding: 14px 14px 16px; display: grid; gap: 6px; }
.card h2 {
  margin: 0;
  font-size: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.glass { min-height: 0; }
.pager { display: flex; gap: 16px; align-items: center; padding-top: 18px; }
.pager a { color: var(--sky); font-weight: 700; }
.note h1 { margin: 8px 0 16px; font-size: clamp(34px, 4vw, 56px); }
.note-photo { border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.note-photo img { aspect-ratio: 16 / 8; min-height: 0; }
.back { color: var(--sky); font-weight: 700; }
.source-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  justify-items: start;
}
.empty h1 { font-size: 40px; margin-bottom: 8px; }
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  background: rgba(27, 23, 20, 0.82);
  color: #fff8ee;
  border-radius: 20px;
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}
footer a { color: #fff8ee; }
footer nav, .sources { display: flex; flex-wrap: wrap; gap: 8px 16px; }
footer p { margin: 0; max-width: 68ch; }

@media (max-width: 900px) {
  .loft { min-height: 42vh; padding: 16px; }
  .mast { flex-direction: column; align-items: stretch; border-radius: 18px; }
  .find input { width: 100%; min-width: 0; }
  .lead { grid-template-columns: 1fr; min-height: 0; }
  .lead-photo { aspect-ratio: 16 / 10; }
  .lead-photo img { height: 100%; }
  .cards { grid-template-columns: 1fr; }
  .sheet, .note, footer { width: min(1180px, calc(100% - 20px)); }
  .name { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
