/* CureAdvantage — Medicare Ordering & Referring Eligibility Check
   Scoped to .npi-page and #npi. No global styles. v2 visual system. */

.npi-page {
  --npi-navy: #001347;
  --npi-navy-2: #001d66;
  --npi-navy-3: #0a2585;
  --npi-ink: #16203a;
  --npi-muted: #5b6577;
  --npi-line: #e2e8f2;
  --npi-line-2: #cbd5e6;
  --npi-paper: #f6f8fc;
  --npi-white: #fff;
  --npi-blue: #1d4ed8;
  --npi-blue-soft: #eef2ff;
  --npi-teal: #0f6b63;
  --npi-teal-soft: #e7f3f1;
  --npi-amber: #92620a;
  --npi-amber-soft: #fdf4e3;
  --npi-red: #9b2226;
  --npi-red-soft: #fdeceb;
  --npi-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(0, 19, 71, .18);
  --npi-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 16px -10px rgba(0, 19, 71, .22);
  color: var(--npi-ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.npi-page h2,
.npi-page h3 { scroll-margin-top: 90px; }

/* ---------- hero ---------- */
.npi-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 88% -10%, rgba(29, 78, 216, .55) 0%, rgba(29, 78, 216, 0) 55%),
    linear-gradient(135deg, var(--npi-navy) 0%, var(--npi-navy-2) 52%, var(--npi-navy-3) 100%);
  border-radius: 20px;
  padding: 42px 40px 34px;
  margin: 8px 0 22px;
  color: #fff;
  box-shadow: 0 20px 44px -24px rgba(0, 19, 71, .55);
}

.npi-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.npi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #dbe6ff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 18px;
}

.npi-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dd3c4;
  box-shadow: 0 0 0 3px rgba(125, 211, 196, .25);
}

.npi-page .npi-hero h1 {
  color: #fff;
  font-size: 2.45rem;
  line-height: 1.16;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  font-weight: 800;
  max-width: 21ch;
}

.npi-page .npi-hero .npi-lede {
  color: rgba(255, 255, 255, .88);
  font-size: 1.06rem;
  line-height: 1.68;
  margin: 0 0 24px;
  max-width: 66ch;
}

.npi-page .npi-hero .npi-lede strong { color: #fff; }

.npi-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.npi-stats li {
  flex: 1 1 150px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.npi-stats li b {
  display: block;
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.npi-stats li span {
  display: block;
  color: rgba(255, 255, 255, .72);
  font-size: .78rem;
  line-height: 1.45;
}

.npi-page .npi-meta {
  font-size: .86rem;
  line-height: 1.7;
  color: var(--npi-muted);
  background: var(--npi-paper);
  border: 1px solid var(--npi-line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 26px;
}

/* ---------- tool shell ---------- */
#npi {
  background: var(--npi-white);
  border: 1px solid var(--npi-line);
  border-radius: 18px;
  padding: 26px 26px 28px;
  box-shadow: var(--npi-shadow);
  margin: 0 0 30px;
}

.npi-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--npi-muted);
  margin: 0 0 9px;
}

.npi-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.npi-input {
  flex: 1 1 260px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.22rem;
  letter-spacing: .12em;
  color: var(--npi-ink);
  background: var(--npi-white);
  border: 1.5px solid var(--npi-line-2);
  border-radius: 12px;
  padding: 13px 16px;
  box-sizing: border-box;
}

.npi-input:focus {
  outline: none;
  border-color: var(--npi-blue);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .13);
}

.npi-input::placeholder {
  letter-spacing: .04em;
  color: #9aa6ba;
  font-family: Inter, sans-serif;
  font-size: 1rem;
}

.npi-btn {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--npi-navy-2) 0%, var(--npi-blue) 100%);
  border: 0;
  border-radius: 12px;
  padding: 13px 30px;
  cursor: pointer;
  box-shadow: var(--npi-shadow-sm);
}

.npi-btn:hover { filter: brightness(1.08); }
.npi-btn:focus-visible { outline: 3px solid rgba(29, 78, 216, .45); outline-offset: 2px; }

.npi-page .npi-hint {
  font-size: .83rem;
  line-height: 1.6;
  color: var(--npi-muted);
  margin: 11px 0 0;
}

/* ---------- results ---------- */
.npi-out:empty { display: none; }
.npi-out { margin-top: 22px; }

.npi-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--npi-line);
  margin-bottom: 16px;
}

.npi-head-npi {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--npi-ink);
}

.npi-head-src { font-size: .78rem; color: var(--npi-muted); }

.npi-card {
  border: 1px solid var(--npi-line);
  border-left: 4px solid var(--npi-line-2);
  border-radius: 14px;
  background: var(--npi-white);
  padding: 18px 20px;
  margin: 0 0 14px;
}

.npi-ok      { border-left-color: var(--npi-teal);  background: var(--npi-teal-soft); }
.npi-stop    { border-left-color: var(--npi-red);   background: var(--npi-red-soft); }
.npi-watch   { border-left-color: var(--npi-amber); background: var(--npi-amber-soft); }
.npi-neutral { border-left-color: var(--npi-line-2); background: var(--npi-paper); }

.npi-page .npi-card-h {
  font-size: 1.04rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--npi-ink);
  letter-spacing: -.01em;
}

.npi-page .npi-card-p {
  font-size: .93rem;
  line-height: 1.68;
  margin: 0 0 10px;
  color: var(--npi-ink);
}

.npi-page .npi-card-p:last-child { margin-bottom: 0; }
.npi-page .npi-warn { color: var(--npi-red); }
.npi-page .npi-small { font-size: .82rem; color: var(--npi-muted); }

/* benefit tiles */
.npi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.npi-tile {
  border: 1px solid var(--npi-line);
  border-radius: 12px;
  padding: 12px 13px;
  background: var(--npi-white);
  min-width: 0;
}

.npi-tile-flag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 7px;
}

.npi-tile-y { border-color: rgba(15, 107, 99, .3); }
.npi-tile-n { border-color: rgba(155, 34, 38, .3); }
.npi-tile-y .npi-tile-flag { color: #fff; background: var(--npi-teal); }
.npi-tile-n .npi-tile-flag { color: #fff; background: var(--npi-red); }

.npi-tile-label {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--npi-ink);
  margin-bottom: 3px;
}

.npi-tile-note {
  display: block;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--npi-muted);
}

/* enrollment table */
.npi-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 4px;
  font-size: .88rem;
  table-layout: fixed;
}

.npi-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--npi-muted);
  border-bottom: 1px solid var(--npi-line-2);
  padding: 0 10px 8px 0;
}

.npi-table td {
  vertical-align: top;
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid var(--npi-line);
  color: var(--npi-ink);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.npi-table tr:last-child td { border-bottom: 0; }
.npi-table td:last-child, .npi-table th:last-child { padding-right: 0; }

.npi-when {
  display: block;
  font-size: .76rem;
  color: var(--npi-muted);
  margin-top: 2px;
}

.npi-td-past { color: var(--npi-red); font-weight: 600; }
.npi-td-past .npi-when { color: var(--npi-red); }
.npi-td-soon { color: var(--npi-amber); font-weight: 600; }
.npi-td-soon .npi-when { color: var(--npi-amber); }
.npi-tbd { color: var(--npi-muted); }

/* ---------- narrow ---------- */
@media (max-width: 782px) {
  .npi-hero { padding: 30px 22px 26px; border-radius: 16px; }
  .npi-page .npi-hero h1 { font-size: 1.82rem; }
  .npi-page .npi-hero .npi-lede { font-size: 1rem; }
  .npi-stats li { flex: 1 1 100%; }
  #npi { padding: 20px 16px 22px; border-radius: 14px; }
  .npi-btn { flex: 1 1 100%; }
  .npi-card { padding: 15px 15px; }
  .npi-table { font-size: .84rem; }
  .npi-table th:nth-child(3), .npi-table td:nth-child(3) { display: none; }
}
