/* Northline server-rendered pages: /vc browse pages, lists, sources and legal
   pages, the 404, claim, fund editing and admin. Built from the base tokens and
   the directory's table (.dt, .dfund), so they read as one site with the app. */
.spage { padding-bottom: 72px; min-height: 60vh; }
.spage .pagehead { padding-top: 28px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--line-2); }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.pmeta b { color: var(--ink); font-weight: 600; }
.pmeta a { color: var(--ink-2); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.pbody { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.pbody > * { min-width: 0; }

/* fund tables (lists, facet pages) */
.vtable .card__b { padding: 0; }
.vtable .dt th:first-child, .vtable .dt td:first-child { padding-left: 18px; }
.vtable .dt th:last-child, .vtable .dt td:last-child { padding-right: 18px; }
.vtable .dt th { height: 38px; }
.vtable .dt tbody tr:last-child td { border-bottom: 0; }
.dt__rank { width: 1%; color: var(--ink-3); font: 400 13px var(--mono); }
.dthesis { display: block; color: var(--ink-3); font-size: 12.5px; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* link lists with counts (the /vc hub, "more lists", explore) */
.lgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; }
.lgrid a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.lgrid a:hover span:first-child { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.lgrid a .num { color: var(--ink-3); font-size: 13px; }
.explore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.explore h3 { font-size: 13px; font-family: var(--sans); font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.explore a { display: flex; min-height: 36px; align-items: center; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.explore a:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* small key/value stats (city pages) */
.kvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kvs h3 { font-size: 13px; font-family: var(--sans); font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv span:first-child { color: var(--ink-2); }
.kv .num { color: var(--ink); }
.kv--text { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 6px 20px; padding: 11px 0; font-size: 14px; }
.kv--text:first-child { border-top: 0; }
.kv--text span:first-child { color: var(--ink); font-weight: 600; }
.kv--text span:last-child { color: var(--ink-2); }
.kvs p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.kvs p a { color: var(--ink); }

/* long-form pages (sources, privacy, terms) */
.prose { max-width: 72ch; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.prose h2 { font-size: 19px; margin: 34px 0 10px; }
.prose h3 { font-size: 15.5px; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 5px; }
.prose a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.prose a:hover { text-decoration-color: var(--ink-3); }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 13px; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.prose td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose code { font: 13px var(--mono); background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
.prose .pupdated { font-size: 13px; color: var(--ink-3); }

/* forms (claim, edit, admin) */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form textarea.input { min-height: 96px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.field__h { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.notice { padding: 12px 14px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); }
.notice--ok { background: var(--today-bg); border-color: transparent; color: var(--today-ink); }
.notice--warn { background: var(--warn-bg); border-color: transparent; color: var(--warn-ink); }
.notice--err { background: var(--sel); border-color: var(--sel-line); color: var(--red-ink); }

@media (max-width: 860px) {
  .explore, .kvs { grid-template-columns: 1fr; gap: 18px; }
  .hide-sm { display: none; }
  .vtable .dt th:first-child, .vtable .dt td:first-child { padding-left: 14px; }
  .dthesis { display: none; }
  .form .row2 { grid-template-columns: 1fr; }
  .kv--text { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- pages carried over from the previous design (claim dashboard,
   new fund, edit and admin) keep their own stylesheet; these map its token
   names onto Northline's, so they follow the palette and dark mode ---------- */
:root {
  --black: var(--ink); --white: var(--card); --paper: var(--page); --paper-2: var(--sunk); --surface: var(--card);
  --live: var(--red); --live-ink: var(--red-ink); --exp: var(--display);
  --gray-100: var(--line); --gray-200: var(--line-2); --gray-300: var(--line-2); --gray-400: var(--ink-3);
  --gray-500: var(--ink-3); --gray-600: var(--ink-2); --gray-700: var(--ink-2); --gray-900: var(--ink);
  --c-moss: var(--bar-2); --c-amber: var(--c-pre);
  --transition: 140ms var(--ease); --shadow-lg: var(--shadow-pop);
}
/* Northline component names the older pages reuse with their own meaning */
.lgx .sec { margin-top: 0; }
.lgx .tag { height: auto; white-space: normal; }
.lgx .tag::before { display: none; }
.lgx h1, .lgx h2, .lgx h3 { letter-spacing: -.015em; }
.lgx .cd-hero h1 { font-weight: 600; letter-spacing: -.018em; }
/* base rules those pages took from the old global stylesheet, in Northline's look */
.lgx .matchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lgx .matchbar input { flex: 1; min-width: 220px; min-height: 46px; font: 15px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; }
.lgx .matchbar input::placeholder { color: var(--ink-3); }
.lgx .matchbar input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.lgx .deal-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--red); color: #fff; font: 600 14.5px var(--sans); cursor: pointer; }
.lgx .deal-btn:hover { background: var(--red-hover); }
.lgx .deal-btn:active { transform: translateY(1px); }
.lgx .claim { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; font-size: clamp(2.2rem, 4.4vw, 3.4rem); color: var(--ink); margin: 0 0 18px; }
.lgx .claim .u { color: var(--red); }
.lgx .lede { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 52ch; margin: 0 0 22px; }
.lgx .lede b { color: var(--ink); font-weight: 600; }
.lgx .auth-sub { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; line-height: 1.5; }
.lgx .auth-note { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
