/* =====================================================================
   Neighborhood Table — components
   Drop-in, framework-agnostic. Requires tokens.css (the :root vars).
   Every class is prefixed `nt-` to avoid collisions. Colors reference the
   CSS variables, so re-skinning tokens.css re-skins these automatically.
   ===================================================================== */

/* ---- Buttons ---------------------------------------------------------- */
.nt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0.5rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 60ms var(--ease);
}
.nt-btn:focus-visible { outline: 2px solid var(--brand-action); outline-offset: 2px; }
.nt-btn:disabled { opacity: 0.45; pointer-events: none; }

.nt-btn--primary { background: var(--brand-action); color: #fff; box-shadow: var(--shadow-card); }
.nt-btn--primary:hover { background: var(--brand-deep); }
.nt-btn--primary:active { background: var(--brand-800); }

.nt-btn--secondary { background: #fff; color: var(--body); border-color: var(--border); box-shadow: var(--shadow-card); }
.nt-btn--secondary:hover { border-color: var(--border-hover); background: var(--surface); }

.nt-btn--ghost { background: transparent; color: var(--muted); }
.nt-btn--ghost:hover { background: var(--hover-surface); }

/* Destructive but not alarming — outline, never solid red */
.nt-btn--danger { background: #fff; color: var(--danger); border-color: var(--danger-tint); box-shadow: var(--shadow-card); }
.nt-btn--danger:hover { border-color: #fca5a5; background: #fef2f2; }

/* ---- Pills / badges --------------------------------------------------- */
.nt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--radius-full);
  padding: 0.125rem 0.625rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.nt-pill--brand  { background: var(--brand-action); color: #fff; }
.nt-pill--green  { background: var(--brand-100); color: var(--brand-deep); }
.nt-pill--amber  { background: var(--amber-tint); color: #92400e; }
.nt-pill--danger { background: var(--danger-tint); color: #991b1b; }
.nt-pill--neutral{ background: var(--hover-surface); color: var(--muted); }

/* Signature: score pill with tabular numerals + optional emoji tier */
.nt-score { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Referral chip — amber, ringed */
.nt-ref {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border-radius: var(--radius-full); padding: 0.125rem 0.5rem;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  color: var(--amber); background: #fffbeb;
  box-shadow: inset 0 0 0 1px rgb(253 230 138 / 0.7);
}

/* ---- Inputs ----------------------------------------------------------- */
.nt-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--body);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nt-input::placeholder { color: var(--faint); }
.nt-input:hover { border-color: var(--border-hover); }
.nt-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(65 163 77 / 0.15); }

.nt-label {
  display: block;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint);
}

/* ---- Card ------------------------------------------------------------- */
.nt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.nt-card__title { margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.nt-card__body { margin: 0; font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.6; color: var(--muted); }

/* ---- Tabs (underline) ------------------------------------------------- */
.nt-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); }
.nt-tab {
  border: none; background: none; margin-bottom: -1px;
  border-bottom: 2px solid transparent; padding: 0.5rem 0.875rem;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; color: var(--faint); cursor: pointer;
  transition: color var(--dur), background-color var(--dur);
}
.nt-tab:hover { color: #44403c; background: var(--hover-surface); }
.nt-tab[aria-selected="true"] { color: var(--brand-deep); border-bottom-color: var(--brand-action); }

/* ---- Headings / body -------------------------------------------------- */
.nt-h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.01em; color: var(--ink); text-wrap: balance; }
.nt-prose { font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.6; color: var(--body); max-width: 68ch; text-wrap: pretty; }
