/* ZipCodeRentGuide — shared styles (system fonts only; works under a strict CSP) */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #4338ca;
  --brand-dark: #312e81;
  --brand-2: #6d28d9;
  --brand-soft: #eef2ff;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-soft: #ecfdf5;
  --amber: #fcd34d;
  --link: #3730a3;
  --link-visit: #6b21a8;
  --notice: #7c2d12;
  --notice-bg: #fff7ed;
  --notice-line: #f97316;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .08), 0 18px 40px rgba(49, 46, 129, .16);
  --max: 74rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 50;
  background: var(--surface); color: var(--ink);
  padding: .6rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.skip:focus { left: .75rem; top: .75rem; }

/* ---------- Header ---------- */
header.site {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
header.site .bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem 1.25rem; padding: .7rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--brand-dark); text-decoration: none;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
}
.brand:visited { color: var(--brand-dark); }
.brand:hover .brand-name { text-decoration: underline; }
.brand-mark { flex: none; display: block; }
header.site nav ul {
  display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0;
}
header.site nav a {
  display: inline-block; padding: .35rem .75rem; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
}
header.site nav a:hover { background: var(--brand-soft); color: var(--brand); }
header.site nav a[aria-current="page"] { background: var(--brand); color: #fff; }

/* ---------- ZIP lookup (header) ---------- */
.zip-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.zip-lookup label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.zip-lookup input[type="text"] {
  width: 7.5rem; padding: .45rem .75rem;
  border: 1.5px solid #cbd5e1; border-radius: 999px;
  font: inherit; color: var(--ink); background: var(--surface);
}
.zip-lookup input[type="text"]:hover { border-color: #94a3b8; }
.zip-lookup button, .btn {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 999px; padding: .45rem 1rem;
  transition: background-color .15s ease, transform .15s ease;
}
.zip-lookup button:hover, .btn:hover { background: var(--brand-dark); }
.zip-lookup button:active { transform: translateY(1px); }
.zip-error { color: #b91c1c; font-size: .85rem; width: 100%; margin: 0; font-weight: 600; }
.zip-error:empty { display: none; }

/* ---------- Breadcrumbs ---------- */
nav.crumbs { background: var(--brand-dark); color: #c7d2fe; font-size: .88rem; padding: .55rem 0 0; }
nav.crumbs ol { display: flex; flex-wrap: wrap; gap: .1rem .2rem; list-style: none; margin: 0; padding: 0; }
nav.crumbs a { color: #e0e7ff; }
nav.crumbs a:visited { color: #e0e7ff; }
nav.crumbs li:not(:last-child)::after { content: "›"; margin: 0 .45rem; color: #a5b4fc; }
nav.crumbs li[aria-current="page"] { color: #fff; font-weight: 600; }

/* ---------- Page head band ---------- */
main { flex: 1; padding: 0 0 3rem; }
.page-head {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 55%, var(--brand-2) 100%);
  color: #eef2ff;
  padding: 1.6rem 0 2.1rem;
  margin-bottom: 1.75rem;
}
.page-head h1 {
  color: #fff; font-size: clamp(1.7rem, 4.2vw, 2.5rem); line-height: 1.15;
  letter-spacing: -.02em; margin: 0 0 .6rem; font-weight: 800;
}
.page-head .meta-line { color: #c7d2fe; font-size: .9rem; margin: 0; max-width: 60rem; }
.page-head a { color: #fff; text-decoration-color: rgba(255, 255, 255, .6); }
.page-head a:visited { color: #fff; }
.page-head a:focus-visible, nav.crumbs a:focus-visible, footer.site a:focus-visible { outline-color: var(--amber); }

/* Home hero */
.page-head.hero { padding: 3rem 0 3.4rem; text-align: center; }
.page-head.hero .wrap { max-width: 50rem; }
.page-head.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.page-head.hero .lede { color: #e0e7ff; font-size: clamp(1.05rem, 2.2vw, 1.25rem); margin: 0 auto 1.6rem; max-width: 42rem; }
.page-head.hero .meta-line { margin: 1.5rem auto 0; }
.hero-lookup {
  width: 100%; justify-content: center; flex-direction: column; align-items: stretch;
  max-width: 34rem; margin: 0 auto; gap: .5rem;
}
.hero-lookup label { color: #e0e7ff; font-size: .95rem; text-align: left; }
.hero-field {
  display: flex; width: 100%; min-width: 0; align-items: center; gap: .5rem;
  background: #fff; border-radius: 999px; padding: .4rem .4rem .4rem 1rem;
  box-shadow: var(--shadow-lg);
}
.hero-field .icon { color: var(--brand); flex: none; }
.hero-lookup input[type="text"] {
  flex: 1 1 auto; width: 1px; min-width: 0; border: 0; padding: .6rem .25rem;
  font-size: 1.25rem; font-weight: 600; letter-spacing: .06em; border-radius: 999px;
}
.hero-lookup input[type="text"]:focus { outline: none; }
.hero-field:focus-within { outline: 3px solid var(--amber); outline-offset: 3px; }
.hero-lookup button { padding: .75rem 1.5rem; font-size: 1.05rem; background: var(--teal); }
.hero-lookup button:hover { background: #115e59; }
.hero-lookup .zip-error { color: #fff; background: rgba(185, 28, 28, .85); border-radius: var(--radius-sm); padding: .4rem .75rem; text-align: left; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.25; color: var(--ink); font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 2.2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.3rem 0 .4rem; }
p { margin: 0 0 .9rem; }
.content > p, .content > section > p { max-width: 48rem; }
a { color: var(--link); text-underline-offset: .15em; }
a:visited { color: var(--link-visit); }
a:hover { color: var(--brand-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}
.lede { font-size: 1.1rem; }
.meta-line, .fine { color: var(--muted); font-size: .92rem; }

/* ---------- Cards & notices ---------- */
.box, .explainer, .reeval-notice, .callout {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem 1.3rem; margin: 0 0 1.5rem;
}
.explainer { border-top: 4px solid var(--teal-bright); }
.explainer p { max-width: 52rem; }
.reeval-notice { background: var(--notice-bg); color: var(--notice); border: 1px solid #fed7aa; border-left: 6px solid var(--notice-line); }
.reeval-notice a { color: #9a3412; }
.reeval-notice h2, .explainer h2, .box h2 { margin-top: 0; font-size: 1.15rem; }

/* ---------- Rent cards (the five unit sizes) ---------- */
.rent-cards-wrap { overflow: visible; margin: 0 0 1.75rem; }
table.rent-cards { display: block; background: transparent; border: 0; width: 100%; }
table.rent-cards caption { display: block; text-align: left; font-weight: 750; font-size: 1.1rem; color: var(--ink); margin: 0 0 .75rem; }
table.rent-cards thead {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
table.rent-cards tbody {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
table.rent-cards tr {
  display: flex; flex-direction: column; justify-content: space-between; gap: .35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem 1.1rem; position: relative; overflow: hidden;
}
table.rent-cards tr::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: #c7d2fe;
}
table.rent-cards th, table.rent-cards td { border: 0; padding: 0; background: none; text-align: left; }
table.rent-cards th { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
table.rent-cards td { font-size: clamp(1.45rem, 3.6vw, 1.9rem); font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
table.rent-cards tr.br-2 { background: linear-gradient(160deg, #f0fdfa 0%, #ffffff 70%); border-color: #5eead4; box-shadow: 0 0 0 2px #99f6e4, var(--shadow); }
table.rent-cards tr.br-2::before { background: var(--teal-bright); height: 6px; }
table.rent-cards tr.br-2 td { color: var(--teal); }
table.rent-cards tr.br-0::before { background: #a5b4fc; }
table.rent-cards tr.br-1::before { background: #818cf8; }
table.rent-cards tr.br-3::before { background: #8b5cf6; }
table.rent-cards tr.br-4::before { background: #6d28d9; }
@media (min-width: 40rem) { table.rent-cards tbody { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 62rem) { table.rent-cards tbody { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Data tables ---------- */
.table-wrap {
  overflow-x: auto; margin: 0 0 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.table-wrap.rent-cards-wrap { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.table-wrap > table:not(.rent-cards) caption {
  text-align: left; font-weight: 750; color: var(--ink); padding: .9rem 1rem .5rem; caption-side: top;
}
th, td { border-bottom: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
thead th { background: var(--brand-soft); color: var(--brand-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fafbff; }
tbody tr:hover { background: #f1f5ff; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.flagged, tbody tr.flagged:nth-child(even) { background: var(--notice-bg); }

/* ---------- State grid (home) ---------- */
.grid-states, .card-list, .plain-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.grid-states {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
}
.grid-states a {
  display: flex; align-items: center; gap: .7rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .55rem .8rem; text-decoration: none; color: var(--ink); font-weight: 650;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.grid-states a:visited { color: var(--ink); }
.grid-states a:hover { border-color: #a5b4fc; box-shadow: var(--shadow); transform: translateY(-1px); color: var(--brand); }
.st-abbr {
  flex: none; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: .85rem; letter-spacing: .04em;
}
.grid-states a:hover .st-abbr { background: var(--brand); color: #fff; }

/* ---------- Lists & filter ---------- */
.card-list li, .plain-list li { margin: 0 0 .3rem; }
.columns-2 {
  columns: 17rem 3; column-gap: 1.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow);
}
.columns-2 li { break-inside: avoid; padding: .1rem 0; }
.filter-bar {
  margin: 1.25rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center;
  background: var(--brand-soft); border-radius: var(--radius); padding: .8rem 1rem;
  position: sticky; top: 4.25rem; z-index: 5;
}
.filter-bar label { font-weight: 700; color: var(--brand-dark); }
.filter-bar input[type="search"] {
  font: inherit; padding: .5rem .9rem; border: 1.5px solid #c7d2fe; border-radius: 999px;
  min-width: min(100%, 20rem); flex: 1; max-width: 28rem; background: #fff;
}

/* ---------- Footer ---------- */
footer.site { background: #0f172a; color: #cbd5e1; padding: 2rem 0 2.4rem; font-size: .9rem; }
footer.site a { color: #5eead4; }
footer.site a:visited { color: #5eead4; }
footer.site p { margin: 0 0 .5rem; max-width: 60rem; }
.disclaimer { font-weight: 700; color: #f1f5f9; }

/* ---------- Small screens ---------- */
@media (max-width: 44rem) {
  header.site { position: static; }
  header.site .bar { padding: .6rem 0 .75rem; }
  header.site nav { order: 3; width: 100%; }
  header.site nav ul { gap: .15rem; }
  header.site nav a { padding: .3rem .6rem; font-size: .9rem; }
  header.site .bar > .zip-lookup { order: 2; }
  header.site .bar > .zip-lookup label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .filter-bar { top: 0; }
  .page-head { padding: 1.25rem 0 1.6rem; }
  .page-head.hero { padding: 2.2rem 0 2.5rem; }
  .hero-lookup button { padding: .7rem 1.1rem; }
  .columns-2 { padding: .85rem 1rem; }
}
@media print {
  header.site, .filter-bar, .zip-lookup { display: none; }
  .page-head { background: none; color: var(--ink); }
  .page-head h1, .page-head .meta-line, .page-head a { color: var(--ink); }
}
