/*
 * Fact Lease tokens. Human pages only.
 *
 * Brand hue is --ledger only (#1e4d7b). Links, focus, the stamp rule,
 * the current nav item, and the derived underline use that blue.
 *
 * Forbidden on any human page, including accents:
 *   terracotta / rust  #9a3412  (live link color in layout(); replace it)
 *   gold               #d4af37 #c9a227 #b8860b #f5c518
 * --status-stale is the word "Not re-read in 7+ days". It is not a gold brand accent.
 * There is no --gold token and there must not be one.
 *
 * Public Sans and Source Serif 4 are self-hosted from /fonts/.
 * Latin woff2, weights 400 and 600, font-display: swap, ≤120 KB total.
 * Do not request a third-party font host.
 *
 * Forbidden brand fills, in addition to terracotta:
 *   #183B56
 * Ledger #1e4d7b is the only brand hue.
 *
 * Primary nav (.nav-primary) is human pages only: Search, Browse, Rents,
 * Buildings, Methodology, About. JSON, llms.txt, ai.txt, feed, and sitemap
 * belong in the footer group For machines, never in .nav-primary.
 */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/public-sans-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-600.woff2") format("woff2");
}

:root {
  --paper: #f6f5f2;
  --ink: #172033;
  --ledger: #1e4d7b;
  --status-current: #1b5e3b;
  --status-stale: #7a4b10;
  --status-muted: #4e5966;

  --font-ui: "Public Sans", sans-serif;
  --font-reading: "Source Serif 4", serif;

  --text-sm: 0.8rem; /* 13.6px at the 17px root */
  --text-md: 1rem; /* 17px */
  --text-lg: 1.25rem; /* 21.25px — stamp date */
  --text-xl: 1.5625rem; /* 26.5625px */
  --text-2xl: 1.953125rem; /* 33.203125px — page title */

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;

  --measure: 72ch;
  --register: 1200px;
  --rule: color-mix(in srgb, var(--ink) 16%, var(--paper));

  --leading-ui: 1.45;
  --leading-reading: 1.55;
}

html {
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--leading-ui);
  background: var(--paper);
  color: var(--ink);
}

a {
  color: var(--ledger);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--ledger);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ledger);
  outline-offset: 2px;
}

.prose {
  max-width: var(--measure);
  font-family: var(--font-reading);
  font-size: var(--text-md);
  line-height: var(--leading-reading);
}

.register {
  max-width: var(--register);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.num,
.stamp-date,
td.rent,
td.area {
  font-variant-numeric: tabular-nums;
}

.masthead {
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.wordmark a {
  color: var(--ink);
  text-decoration: none;
}

.descriptor {
  margin: var(--space-1) 0 0;
  max-width: var(--measure);
  font-family: var(--font-reading);
  font-size: var(--text-md);
  line-height: var(--leading-reading);
}

.nav-primary {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding-bottom: var(--space-1);
  overflow-x: auto;
  white-space: nowrap;
}

.nav-primary a {
  color: var(--ink);
  text-decoration: none;
}

.nav-primary a[aria-current="page"] {
  color: var(--ledger);
  text-decoration: underline;
}

.search {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.search input,
.search select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ledger);
  border-radius: 0;
  padding: 8px;
  min-width: 12rem;
}

.search button {
  font: inherit;
  font-weight: 600;
  color: var(--paper);
  background: var(--ledger);
  border: 1px solid var(--ledger);
  border-radius: 0;
  padding: 8px var(--space-2);
}

.stamp {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--ledger);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.stamp-date {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
}

.stamp-record p {
  margin: 0;
}

.status {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 600;
}

.status-current {
  color: var(--status-current);
}

.status-stale {
  color: var(--status-stale);
}

.status-muted,
.legend {
  color: var(--status-muted);
}

/* Underline only. The word "derived" sits in the HTML. This class does not invent a unit. */
.badge-derived {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ledger);
}

.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
}

.site-footer .groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 1fr));
  gap: var(--space-3);
  max-width: var(--register);
}

.site-footer h2 {
  margin: 0 0 var(--space-1);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0 0 var(--space-1);
}

.site-footer nav {
  display: block;
}

.disambiguation {
  margin: var(--space-3) 0 0;
  max-width: var(--measure);
  color: var(--status-muted);
}

main {
  padding: var(--space-3);
  max-width: var(--register);
}

main p {
  max-width: var(--measure);
}

main nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}

main nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

main dt {
  font-weight: 600;
  margin-top: var(--space-2);
}

main dd {
  margin: 0.15rem 0 0;
}

main li {
  margin: 0.35rem 0;
}

form.browse {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
  margin: var(--space-2) 0;
}

form.browse label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

form.browse input,
form.browse select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ledger);
  border-radius: 0;
  padding: 8px;
}

form.browse input {
  min-width: 12rem;
}

form.browse button {
  font: inherit;
  font-weight: 600;
  color: var(--paper);
  background: var(--ledger);
  border: 1px solid var(--ledger);
  border-radius: 0;
  padding: 8px var(--space-2);
}

p.sort a[aria-current="true"] {
  color: var(--ledger);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

table.results {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

table.results th,
table.results td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--rule);
}

ol.results {
  margin: 0;
  padding-left: var(--space-3);
}

ol.results li {
  margin: var(--space-2) 0;
}

h1 {
  font-family: var(--font-ui);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 var(--space-2);
}

h2 {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  margin: var(--space-4) 0 var(--space-2);
}

main p {
  margin: 0 0 var(--space-2);
}

.lede {
  font-size: var(--text-lg);
}

.hero {
  margin: var(--space-3) 0 var(--space-2);
  max-width: var(--register);
}

.hero h2 {
  margin-top: 0;
  font-size: var(--text-xl);
}

.hero-figure {
  margin: var(--space-2) 0;
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.hero-unit {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--status-muted);
}

.census {
  font-family: var(--font-reading);
}

nav.paths {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
  max-width: var(--register);
}

a.path {
  display: block;
  padding: var(--space-2);
  border: 1px solid var(--ledger);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
}

a.path strong {
  display: block;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ledger);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a.path span {
  display: block;
  margin-top: var(--space-1);
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.4;
}

nav.product-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--rule);
}

nav.product-nav a {
  font-weight: 600;
}

nav.product-nav a[aria-current="page"] {
  color: var(--ledger);
  text-decoration: underline;
}

details.quiet {
  margin: var(--space-4) 0;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-2);
}

details.quiet summary {
  font-weight: 600;
  color: var(--ledger);
  cursor: pointer;
}

details.quiet summary:focus-visible {
  outline: 2px solid var(--ledger);
  outline-offset: 2px;
}

.reading p,
.byline {
  font-family: var(--font-reading);
  line-height: var(--leading-reading);
}

.reading table,
.reading th,
.reading td,
article.report table,
article.report th,
article.report td {
  font-family: var(--font-ui);
}

main table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--space-2) 0;
  font-variant-numeric: tabular-nums;
}

main th,
main td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--rule);
}

main caption {
  text-align: left;
  color: var(--status-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

main td.num,
main th.num {
  text-align: right;
}

.chart {
  margin: var(--space-3) 0;
  max-width: var(--register);
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

ul.uses {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--register);
}

ul.uses li {
  margin: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
}

p.empty,
.empty {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  max-width: var(--measure);
  border: 1px solid var(--rule);
  background: var(--paper);
}

main dl.record {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr);
  max-width: var(--register);
  margin: var(--space-3) 0;
  border-top: 1px solid var(--rule);
}

main dl.record dt,
main dl.record dd {
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--rule);
}

main dl.record dt {
  font-weight: 600;
}

.site-footer .groups {
  align-items: start;
}

@media (min-width: 60rem) {
  .masthead-lead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .masthead-lead .search {
    margin-top: 0;
  }
}

@media (min-width: 40rem) {
  nav.paths {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 60rem) {
  nav.paths {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

@media (max-width: 40rem) {
  .masthead,
  main {
    padding: var(--space-2);
  }

  .search {
    width: 100%;
  }

  .search input {
    flex: 1 1 10rem;
    min-width: 0;
    width: 100%;
  }

  .site-footer {
    padding: var(--space-3) var(--space-2);
  }

  .site-footer .groups {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }

  .hero-figure {
    font-size: var(--text-lg);
  }

  main dl.record {
    grid-template-columns: 1fr;
  }

  main dl.record dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 24rem) {
  .site-footer .groups {
    grid-template-columns: 1fr;
  }
}
