/* B-Line Capital location pages.
   One family (Archivo, variable width) carries the type. The market panel
   is the one bold element: a survey-sheet grid holding the local numbers.
   Everything else stays white, left-aligned, and quiet. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #15293a;
  --text: #2f4356;
  --muted: #5b6e80;
  --paper: #ffffff;
  --field: #f1f5f2;
  --grid: #dfe7e1;
  --rule: #d3dcd6;
  --go: #1c6a4f;
  --go-dark: #134d39;
  --mark: #c48612;
  --focus: #2b6cb0;
  --wrap: 1140px;
  --measure: 68ch;
  --r: 6px;
  font-family: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 106.25%; /* 17px */
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--go); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--go-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { color: var(--ink); font-stretch: 112%; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 720; letter-spacing: -0.02em; max-width: 20ch; }
h2 { font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem); font-weight: 680; margin-top: 2.6rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.08rem; font-weight: 650; font-stretch: 105%; }
p { margin: 0 0 1em; }
.small { font-size: 0.86rem; color: var(--muted); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.header-row { display: flex; align-items: center; gap: 1.2rem; min-height: 72px; }
.logo img { display: block; width: auto; height: 38px; }
.menu { margin-left: auto; position: relative; }
.menu summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); padding: 0.4rem 0.2rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: 2.4rem; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); padding: 0.6rem 0; min-width: 240px; z-index: 5; box-shadow: 0 8px 24px rgba(21, 41, 58, 0.12); }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 0.45rem 1.1rem; color: var(--ink); text-decoration: none; }
.menu a:hover { background: var(--field); }

/* Buttons */
.btn { display: inline-block; background: var(--go); color: #fff; font-weight: 620; text-decoration: none; padding: 0.82rem 1.3rem; border-radius: var(--r); border: 2px solid var(--go); line-height: 1.2; }
.btn:hover { background: var(--go-dark); border-color: var(--go-dark); color: #fff; text-decoration: none; }
.btn-quiet { background: transparent; color: var(--go); }
.btn-quiet:hover { background: var(--field); color: var(--go-dark); }
.btn-small { padding: 0.5rem 0.9rem; font-size: 0.92rem; }
.btn-block { display: block; text-align: center; }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 0; padding: 0; margin: 1.2rem auto 0; font-size: 0.88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 0.55rem; color: var(--rule); }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: 1.6rem 2.6rem; align-items: start; }
.hero-single { grid-template-columns: minmax(0, 1fr); }
.hero-copy h1 { margin-top: 0.4rem; }
.lede { font-size: 1.16rem; line-height: 1.55; color: var(--ink); max-width: 60ch; margin-top: 1.1rem; }
.byline { font-size: 0.9rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }

.glance { border: 1px solid var(--rule); border-top: 4px solid var(--go); border-radius: var(--r); padding: 1.2rem 1.3rem 0.6rem; }
.glance h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.glance dl { margin: 0; }
.glance dl > div { padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.glance dt { font-size: 0.84rem; color: var(--muted); }
.glance dd { margin: 0.1rem 0 0; font-weight: 620; color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fn { font-size: 0.66em; margin-left: 0.15em; }
.fn a { text-decoration: none; color: var(--muted); }
.import-notice { border: 1px dashed var(--mark); background: #fdf7ea; padding: 0.8rem; border-radius: var(--r); font-size: 0.9rem; color: var(--ink); }

/* Market panel: the signature element */
.market {
  background-color: var(--field);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  border-block: 1px solid var(--rule);
  padding-block: 2.2rem 2.6rem;
}
.market h2 { margin-top: 0; }
.market-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
.market > .wrap > .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { padding: 1rem 1.1rem 1.1rem; border-bottom: 1px solid var(--rule); position: relative; }
.metric:nth-child(odd) { border-right: 1px solid var(--rule); }
.market > .wrap > .metrics .metric { border-right: 1px solid var(--rule); }
.metric dt { font-size: 0.86rem; color: var(--muted); }
.metric dd { margin: 0.15rem 0 0; display: flex; flex-direction: column; }
.metric .val { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem); font-weight: 680; font-stretch: 116%; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.015em; line-height: 1.15; }
.metric .note { font-size: 0.84rem; color: var(--muted); }
.metric .src { position: absolute; top: 0.85rem; right: 0.9rem; font-size: 0.7rem; color: var(--muted); text-decoration: none; border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.3rem; }

.chart-fig { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem 1rem 0.8rem; }
.chart { display: block; width: 100%; font-family: inherit; }
.chart text { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .lab { fill: var(--ink); font-weight: 650; }
.chart .axis { stroke: var(--rule); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.25; }
.chart .area { fill: var(--field); }
.chart .dots circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.chart .dots circle:last-child { fill: var(--mark); stroke: var(--mark); }
.chart .s1 { fill: #a9bdb0; }
.chart .s2 { fill: var(--mark); }
.chart .s5 { fill: var(--ink); }
.chart .me { fill: var(--mark); }
.chart .ref { fill: #a9bdb0; }
.chart.compare text { font-size: 13px; }
.chart .gt { fill: var(--ink); font-weight: 650; font-size: 13px; }
.chart .legend text { font-size: 12px; }
figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 0.4rem; }
.chart-data summary { cursor: pointer; font-size: 0.84rem; color: var(--go); margin-top: 0.3rem; }
.chart-data table { font-size: 0.86rem; margin-top: 0.5rem; }

/* Body */
.body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 5vw, 4rem); padding-block: 0.6rem 2rem; }
.prose { max-width: var(--measure); }
.prose > p { font-size: 1.02rem; }
.note-block { border-left: 4px solid var(--mark); padding: 0.2rem 0 0.2rem 1.1rem; margin: 1.8rem 0; }
.note-block h3 { margin-bottom: 0.4rem; }
.uw { color: var(--ink); }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.62rem 0.8rem 0.62rem 0; border-bottom: 1px solid var(--rule); }
.terms th { width: 38%; font-weight: 600; color: var(--ink); }
thead th { font-size: 0.86rem; color: var(--muted); font-weight: 600; }

.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: 0.7rem; padding-left: 0.3rem; }
.steps li::marker { font-weight: 700; color: var(--go); }

.faq details { border-bottom: 1px solid var(--rule); padding: 0.2rem 0; }
.faq summary { cursor: pointer; list-style: none; padding: 0.8rem 2rem 0.8rem 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.65rem; font-size: 1.3rem; color: var(--go); }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { display: inline; font-size: 1.02rem; }
.faq details p { margin-top: 0; }

/* Calculator */
.calc { margin-top: 2.6rem; border: 1px solid var(--rule); border-radius: var(--r); padding: 0.2rem 1.3rem 1rem; }
.calc h2 { margin-top: 1rem; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem 1rem; }
.calc label { display: flex; flex-direction: column; font-size: 0.86rem; color: var(--muted); gap: 0.25rem; }
.calc input { font: inherit; font-size: 1rem; color: var(--ink); padding: 0.55rem 0.65rem; border: 1px solid #b9c6bd; border-radius: 4px; font-variant-numeric: tabular-nums; }
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; margin: 1.1rem 0 0.6rem; }
.calc-out div { background: var(--field); border-radius: 4px; padding: 0.7rem 0.8rem; }
.calc-out span { display: block; font-size: 0.8rem; color: var(--muted); }
.calc-out strong { font-size: 1.25rem; font-stretch: 112%; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-out .verdict { grid-column: 1 / -1; background: none; padding: 0; color: var(--ink); }

/* Rail */
.rail { padding-top: 2.6rem; }
.rail-card { position: sticky; top: 1.2rem; border: 1px solid var(--rule); border-radius: var(--r); padding: 1.1rem 1.2rem 1.3rem; background: var(--paper); }
.rail-card h2, .rail-links h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.rail-links { margin-top: 2rem; }
.rail-links h2 { margin-top: 1.6rem; }
.rail-links ul { list-style: none; padding: 0; margin: 0; }
.rail-links li { border-top: 1px solid var(--rule); }
.rail-links a { display: block; padding: 0.5rem 0; }

/* Sources and author */
.sources { border-top: 1px solid var(--rule); padding-block: 0.4rem 1rem; font-size: 0.9rem; }
.sources ul { padding-left: 1.1rem; max-width: 90ch; }
.author { display: flex; gap: 1.2rem; align-items: flex-start; border-top: 1px solid var(--rule); padding-block: 1.8rem 2.4rem; }
.author img { border-radius: 50%; flex: none; }
.author h2 { margin: 0; font-size: 1.15rem; }
.author p { max-width: 70ch; }
.links { display: flex; gap: 1.2rem; }

/* Hubs and directory */
.product-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.product-list li { border-bottom: 1px solid var(--rule); }
.product-list a { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1rem 1.1rem 0; text-decoration: none; color: var(--text); }
.product-list strong { color: var(--go); font-size: 1.1rem; font-stretch: 108%; }
.product-list a:hover strong { text-decoration: underline; }
.city-table .loan-links a { display: inline-block; margin: 0 0.8rem 0.2rem 0; font-size: 0.9rem; white-space: nowrap; }
.filter { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88rem; color: var(--muted); max-width: 420px; margin-top: 1.4rem; }
.filter input { font: inherit; font-size: 1.05rem; padding: 0.7rem 0.8rem; border: 1px solid #b9c6bd; border-radius: var(--r); color: var(--ink); }
.state-index { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding: 1rem 0 1.4rem; border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.state-block { padding-block: 0.6rem 1.2rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.state-block h2 { margin-top: 1.4rem; }
.state-block h2 a { color: var(--ink); text-decoration: none; }
.dir-cities { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem 2rem; }
.dir-cities h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.dir-cities h3 a { color: var(--ink); }
.dir-cities ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; line-height: 1.75; }
[hidden] { display: none !important; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d4dc; margin-top: 1rem; font-size: 0.9rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding-block: 2.4rem 1.2rem; }
.footer-grid img { height: 34px; width: auto; margin-bottom: 0.8rem; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 1rem 1.6rem; }
.footer-base a { margin-left: 1rem; color: #c9d4dc; }

@media (max-width: 960px) {
  .hero, .body-grid, .market-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { padding-top: 0; }
  .rail-card { position: static; }
  .market > .wrap > .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .metrics, .market > .wrap > .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 0.8rem 0.75rem 0.9rem; }
  .metric .val { font-size: 1.3rem; }
  .metric .src { display: none; }
  .market > .wrap > .metrics .metric:nth-child(even) { border-right: 0; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-small { display: none; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .site-header, .rail, .calc, .site-footer, .actions { display: none; } .market { background: none; } }
.logo { text-decoration: none; }
