/* escrowatlas.com — the home for the escrow industry's public records.
   Near-monochrome OKLCH, Inter + IBM Plex Mono, hairline-first. */

:root {
  /* Near-monochrome OKLCH palette (cool-270, chroma <= 0.02) */
  --ink: oklch(0.18 0.005 270);
  --ink-2: oklch(0.27 0.008 270);
  --muted: oklch(0.48 0.012 270);
  --faint: oklch(0.65 0.012 270);
  --paper: oklch(0.96 0.008 270);
  --paper-deep: oklch(0.94 0.012 270);
  --card: oklch(0.99 0.006 270);
  --rule: oklch(0.89 0.015 270);
  --rule-2: oklch(0.82 0.020 270);
  --accent: oklch(0.30 0.020 270);
  --accent-h: oklch(0.22 0.020 270);

  /* Status colors — only on dots/pills, never decoration */
  --ok: oklch(0.55 0.12 155);
  --warn: oklch(0.6 0.12 60);

  --max: 1120px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-h);
}

[data-mono],
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 560px) {
  .wrap {
    width: min(var(--max), calc(100% - 32px));
  }
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 9999;
  transform: translateY(calc(-100% - 18px));
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 160ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: oklch(0.96 0.008 270 / 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-height: 44px;
  padding: 4px 0;
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 0.72rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
}

/* ---------- section headings ---------- */
.section-heading {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1.15;
}
.section-sub {
  margin: 0 0 28px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- hero ---------- */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.lead {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}
.steward {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px solid var(--rule-2);
}
.steward a {
  color: var(--ink-2);
  display: inline-block;
  padding: 12px 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.hero-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats .stat b {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.hero-stats .stat span {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- search ---------- */
.search-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  padding: 4px 14px;
  max-width: 680px;
}
.search-box:focus-within {
  border-color: var(--ink-2);
}
.search-icon {
  color: var(--faint);
  flex: none;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 14px 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.search-box input::placeholder {
  color: var(--faint);
}
.search-clear {
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.search-clear:hover {
  color: var(--ink);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.search-tags button {
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.search-tags button:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}

.search-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ---------- chapters ---------- */
.chapters {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.chapter-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease;
}
.chapter-card:hover {
  border-color: var(--rule-2);
}
.chapter-card.staged {
  opacity: 0.62;
}
.chapter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.chapter-head b {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.chapter-domain {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.chapter-tag {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}
.chapter-desc {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.chapter-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chapter-topics span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px 7px;
}
.chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.chapter-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent-h);
}
.chapter-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 12px;
  font-family: var(--mono);
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
}
.chapter-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.no-results {
  margin-top: 24px;
  padding: 24px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--paper-deep);
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

/* ---------- freshness ---------- */
.freshness {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.freshness-table {
  overflow-x: auto;
  max-width: 100%;
}
.freshness-table table {
  width: 100%;
  border-collapse: collapse;
}
.freshness-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule-2);
}
.freshness-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.freshness-table tbody tr:hover td {
  background: var(--paper-deep);
}
.freshness-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  text-transform: capitalize;
}
.freshness-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.freshness-status.current .dot {
  background: var(--ok);
}
.freshness-status.stale .dot {
  background: var(--warn);
}
.freshness-status.staged .dot {
  background: var(--faint);
}

/* ---------- charter ---------- */
.charter {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.charter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.charter-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px;
}
.charter-card h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 10px;
}
.charter-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- corrections ---------- */
.corrections {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.corrections p {
  margin: 0 0 12px;
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}
.textlink {
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
}

/* ---------- boundary ---------- */
.boundary {
  padding: 40px 0 56px;
}
.boundary .wrap {
  max-width: 720px;
}
.boundary-line {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--ink);
}
.boundary p {
  margin: 0;
  max-width: 64ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.boundary p + p {
  margin-top: 10px;
}
.attribution {
  font-size: 13px !important;
  opacity: 0.85;
}
.attribution a {
  color: var(--ink-2);
  display: inline-block;
  padding: 12px 0;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: oklch(0.82 0.008 270);
  padding: 28px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-brand strong {
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
}
.footer-brand span {
  font-size: 13px;
  color: oklch(0.65 0.008 270);
}
.footer-legal {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-legal p {
  margin: 0;
  font-size: 13px;
}
.footer-legal .boundary-line {
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  border: 0;
  padding: 0;
}
.footer-legal .attribution {
  opacity: 1;
}
.footer-legal .attribution a {
  color: var(--paper);
  text-decoration: underline;
  display: inline-block;
  padding: 12px 0;
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .site-nav {
    gap: 1rem;
  }
  .brand-text small {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 44px 0 36px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .section-heading {
    font-size: 24px;
  }
  .hero-stats {
    gap: 24px;
  }
  .hero-stats .stat b {
    font-size: 24px;
  }
  .site-header .wrap {
    min-height: 56px;
  }
  .site-nav {
    display: none;
  }
  .site-footer .wrap {
    flex-direction: column;
  }
  .footer-legal {
    text-align: left;
  }
  .freshness-table th,
  .freshness-table td {
    padding: 8px 8px;
    font-size: 13px;
  }
  .freshness-table td.mono {
    font-size: 12px;
  }
  .chapter-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- print ---------- */
@media print {
  .site-header,
  .site-footer,
  .search-section,
  .search-tags {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
