/* 509 Valuations — Netflix-style real estate dashboard
   Brand palette: midnight blue #0B1426 + cyan #00E5FF (per GWD)
   Adds horizontal-scrolling carousels for sub-market rows */

:root {
  --bg-deep:    #07090f;
  --bg-base:    #0b1426;
  --bg-card:    #131c33;
  --bg-card-2:  #0f1a35;
  --line:       rgba(255,255,255,0.07);
  --line-strong:rgba(255,255,255,0.14);
  --ink:        #e8edf7;
  --ink-dim:    #a8b2c5;
  --ink-faint:  #6c7691;
  --accent:     #00e5ff;
  --accent-dim: #00b3cc;
  --warn:       #f59e0b;
  --ok:         #22c55e;
  --high:       #ef4444;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(11,20,38,0.96), rgba(11,20,38,0.85));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.topbar .row {
  max-width: 1600px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}
.topbar .brand { font-weight: 800; font-size: 22px; color: #fff; letter-spacing: -0.02em; }
.topbar .brand .accent { color: var(--accent); }
.topbar nav { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar nav a { color: var(--ink-dim); font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: #fff; text-decoration: none; }
.topbar nav a.active { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar .meta { color: var(--ink-faint); font-size: 12px; }

/* HERO */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(0,229,255,0.18), transparent 70%),
    radial-gradient(ellipse 70% 70% at 0% 100%, rgba(0,229,255,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-base));
  border-bottom: 1px solid var(--line);
  padding: 64px 0 40px;
}
.hero .wrap { max-width: 1600px; margin: 0 auto; padding: 0 28px; }
.hero .breadcrumb { color: var(--ink-faint); font-size: 13px; margin-bottom: 14px; }
.hero .breadcrumb a { color: var(--ink-dim); }
.hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  margin: 0 0 14px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
}
.hero h1 .accent { color: var(--accent); }
.hero p.subtitle {
  color: var(--ink-dim); font-size: 19px; max-width: 760px; margin: 0 0 18px;
}
.hero p.hero-line {
  color: var(--ink); font-size: 17px; max-width: 760px; margin: 0;
  border-left: 3px solid var(--accent); padding-left: 16px;
}

/* KPI ROW */
.kpi-row {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1600px; margin: 24px auto 0; padding: 0 28px;
}
.kpi {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px;
}
.kpi .label { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.kpi .value { color: #fff; font-size: 30px; font-weight: 800; line-height: 1.1; }
.kpi .delta { color: var(--accent); font-size: 12px; margin-top: 8px; }
.kpi .src { color: var(--ink-faint); font-size: 11px; margin-top: 6px; }

/* MAIN */
main { max-width: 1600px; margin: 0 auto; padding: 30px 0 60px; }

h2.row-title {
  color: #fff; font-size: 22px; margin: 36px 28px 14px;
  display: flex; align-items: center; gap: 14px; font-weight: 700;
}
h2.row-title .tag { font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
h2.row-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), transparent);
}

/* ROW CONTAINER */
.row-strip {
  position: relative; margin-bottom: 14px;
}
.row-strip .scroller {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 28px 16px;
  scrollbar-width: thin; scrollbar-color: var(--accent-dim) transparent;
}
.row-strip .scroller::-webkit-scrollbar { height: 6px; }
.row-strip .scroller::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }
.row-strip .scroller::-webkit-scrollbar-track { background: transparent; }
.row-strip .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.6); border: 1px solid var(--line-strong);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; z-index: 5; transition: opacity 0.15s, background 0.15s;
}
.row-strip .arrow:hover { background: var(--accent); color: var(--bg-base); }
.row-strip .arrow.l { left: 8px; }
.row-strip .arrow.r { right: 8px; }
.row-strip .arrow.hidden { opacity: 0; pointer-events: none; }

/* CARDS */
.card {
  background: linear-gradient(160deg, #0f1a35 0%, #0b1426 100%);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px;
  min-width: 280px; max-width: 320px; flex: 0 0 auto;
}
.card.wide { min-width: 480px; max-width: 560px; }
.card .tag { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.card h3 { margin: 4px 0 8px; font-size: 17px; color: #fff; line-height: 1.25; }
.card p.profile { color: var(--ink-dim); font-size: 13px; margin: 0 0 10px; }
.card .range { color: var(--accent); font-size: 16px; font-weight: 700; margin: 6px 0; }
.card .meta-row { display: flex; gap: 10px; font-size: 12px; color: var(--ink-faint); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.card .meta-row b { color: var(--ink); margin-right: 4px; }
.card .src { color: var(--ink-faint); font-size: 11px; margin-top: 8px; }

/* KERNEL CARD (the data center / OGWRP "fact" tiles) */
.k-card {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-base) 100%);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; min-width: 280px; max-width: 320px; flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 8px;
}
.k-card .glyph { font-size: 48px; font-weight: 900; color: var(--accent); line-height: 1; letter-spacing: -0.04em; }
.k-card .label { color: var(--ink-dim); font-size: 13px; }
.k-card .detail { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }

/* MARKET METRICS TABLE (3-column comparison) */
.market-table {
  width: calc(100% - 56px); margin: 0 28px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.market-table table { width: 100%; border-collapse: collapse; }
.market-table th, .market-table td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 14px; vertical-align: middle;
}
.market-table thead th {
  background: var(--bg-card-2); color: var(--accent); font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
}
.market-table tbody td.metric { color: var(--ink); font-weight: 600; }
.market-table tbody td.moses { color: #fff; }
.market-table tbody td.quincy { color: var(--accent); }
.market-table tbody td.county { color: var(--ink-dim); }
.market-table tbody tr:last-child td { border-bottom: 0; }
.market-table-note {
  margin: 8px 28px 0; color: var(--ink-faint); font-size: 12px; line-height: 1.55;
}

/* CMA vs BPO comparison table */
.cma-table {
  width: calc(100% - 56px); margin: 0 28px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.cma-table table { width: 100%; border-collapse: collapse; }
.cma-table th, .cma-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 13px; vertical-align: top;
}
.cma-table thead th {
  background: var(--bg-card-2); color: var(--accent); font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
}
.cma-table tbody td.feature { color: var(--ink); font-weight: 600; width: 22%; }
.cma-table tbody td.cma, .cma-table tbody td.bpo { color: var(--ink-dim); width: 39%; }
.cma-table tbody tr:last-child td { border-bottom: 0; }

/* STATUTORY NOTE CALLOUT */
.callout {
  margin: 16px 28px 0; padding: 18px 22px;
  background: rgba(0,229,255,0.06); border: 1px solid rgba(0,229,255,0.18);
  border-radius: 10px;
}
.callout h3 { color: var(--accent); font-size: 14px; margin: 0 0 8px; font-weight: 700; }
.callout p { color: var(--ink-dim); font-size: 13px; line-height: 1.65; margin: 0; }

/* METHODOLOGY GRID (6 phase tiles) */
.method-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: 0 28px;
}
.method-card {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px;
  position: relative;
}
.method-card .phase-num {
  position: absolute; top: 14px; right: 18px;
  font-size: 36px; font-weight: 900; color: var(--accent); line-height: 1;
  opacity: 0.55;
}
.method-card h3 { color: #fff; font-size: 16px; margin: 0 0 8px; padding-right: 50px; }
.method-card p { color: var(--ink-dim); font-size: 13px; line-height: 1.55; margin: 0; }

/* CITATIONS */
.citations {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px 22px; margin: 16px 28px 0;
}
.citations h3 { color: var(--accent); font-size: 14px; margin: 0 0 12px; }
.citations ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 30px; }
.citations li { color: var(--ink-dim); font-size: 12px; padding: 4px 0; break-inside: avoid; }
.citations li b { color: var(--ink); margin-right: 6px; }

/* FOOTER */
.site-footer {
  background: var(--bg-deep); border-top: 1px solid var(--line);
  padding: 36px 0 24px; color: var(--ink-faint); font-size: 13px; margin-top: 40px;
}
.site-footer .wrap { max-width: 1600px; margin: 0 auto; padding: 0 28px; }
.site-footer .grid {
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
}
.site-footer h4 { color: var(--ink); font-size: 14px; margin: 0 0 10px; }
.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy {
  border-top: 1px solid var(--line); padding-top: 14px; color: var(--ink-faint); font-size: 12px;
}

@media (max-width: 720px) {
  .topbar .row { padding: 12px 18px; gap: 14px; flex-wrap: wrap; }
  .topbar nav { gap: 14px; }
  .hero .wrap, .kpi-row { padding-left: 18px; padding-right: 18px; }
  h2.row-title { margin-left: 18px; margin-right: 18px; }
  .row-strip .scroller, .method-grid, .market-table, .cma-table, .callout, .citations { margin-left: 18px; margin-right: 18px; }
  .row-strip .scroller { padding-left: 0; padding-right: 0; }
  .market-table, .cma-table { width: calc(100% - 36px); }
  .citations ul { columns: 1; }
}