:root {
  color-scheme: light;
  --ink: #14263b;
  --muted: #58697a;
  --navy: #092f55;
  --blue: #1466a3;
  --blue-dark: #0b4b7d;
  --aqua: #08a3a3;
  --ice: #eef7fb;
  --line: #cfdae4;
  --surface: #ffffff;
  --success: #147a55;
  --warning: #8a5a12;
  --danger: #a23636;
  --shadow: 0 16px 40px rgba(9, 47, 85, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f7fafc; line-height: 1.55; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: white; padding: .75rem 1rem; border-radius: .5rem; box-shadow: var(--shadow); }
.skip-link:focus { top: 1rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; gap: .75rem; align-items: center; text-decoration: none; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--navy), var(--aqua)); font-weight: 800; letter-spacing: -.03em; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .78rem; }
nav { display: flex; gap: 1rem; align-items: center; }
nav a { font-weight: 650; text-decoration: none; }

.hero { background: radial-gradient(circle at 90% 15%, rgba(8, 163, 163, .22), transparent 35%), linear-gradient(135deg, #082f55, #0c4d7d); color: white; padding: clamp(3rem, 7vw, 6rem) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.eyebrow { margin: 0 0 .7rem; text-transform: uppercase; letter-spacing: .13em; color: #a7eced; font-size: .78rem; font-weight: 800; }
h1 { margin: 0; font-size: clamp(2.3rem, 6vw, 4.7rem); line-height: .98; max-width: 12ch; letter-spacing: -.045em; }
.lead { max-width: 690px; font-size: clamp(1.05rem, 2vw, 1.28rem); color: #e4f0f8; margin: 1.35rem 0 0; }
.source-card { background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .28); border-radius: 18px; padding: 1.4rem; backdrop-filter: blur(12px); }
.source-card strong { font-size: 1.1rem; }
.source-card p { margin-bottom: 0; color: #e6f3f8; }

.search-section { margin-top: -2rem; position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--ice); border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 1rem; color: var(--muted); font-weight: 750; border-bottom: 3px solid transparent; }
.tab.is-active { color: var(--navy); background: white; border-bottom-color: var(--aqua); }
.panel { padding: clamp(1rem, 3vw, 2rem); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
label { display: grid; gap: .42rem; color: var(--navy); font-weight: 700; }
label span { font-size: .86rem; }
input, select { width: 100%; min-height: 48px; border: 1px solid #aebdca; border-radius: 10px; padding: .68rem .8rem; color: var(--ink); background: white; }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(8, 163, 163, .35); outline-offset: 2px; border-color: var(--aqua); }
.span-2 { grid-column: span 2; }
.radius-options { margin-top: 1.25rem; background: var(--ice); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.radius-options summary { color: var(--navy); font-weight: 800; cursor: pointer; }
.radius-grid { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 580px; }
.field-note { color: var(--muted); font-size: .86rem; margin: .75rem 0 0; font-weight: 500; }
.form-actions { display: flex; gap: .8rem; align-items: center; margin-top: 1.35rem; }
.primary-button { min-height: 48px; border: 0; border-radius: 10px; padding: .7rem 1.2rem; background: var(--blue); color: white; font-weight: 800; box-shadow: 0 8px 18px rgba(20, 102, 163, .22); }
.primary-button:hover { background: var(--blue-dark); }
.text-button, .copy-button { border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); padding: .58rem .8rem; font-weight: 700; }
.npi-form { display: grid; grid-template-columns: minmax(240px, 420px) max-content; align-items: end; gap: 1rem; }
.npi-form .field-note { grid-column: 1 / -1; }

.results-section { padding-block: 2rem; }
.status, .results-summary, .empty-state { border-radius: 12px; padding: 1rem 1.2rem; }
.status.loading { background: var(--ice); border: 1px solid var(--line); }
.status.error { background: #fff0f0; border: 1px solid #e4b5b5; color: var(--danger); font-weight: 700; }
.results-summary { background: white; border: 1px solid var(--line); font-weight: 800; margin-bottom: 1rem; }
.results { display: grid; gap: 1rem; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 3vw, 1.45rem); box-shadow: 0 7px 22px rgba(9, 47, 85, .06); }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.record-kind { margin: 0 0 .25rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .73rem; font-weight: 800; }
.result-card h3 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.55rem); color: var(--navy); }
.status-badge { flex: 0 0 auto; border-radius: 999px; padding: .38rem .65rem; font-size: .78rem; font-weight: 800; }
.status-badge.active { background: #e4f7ef; color: var(--success); }
.status-badge.deactivated { background: #fff1e2; color: var(--warning); }
.status-badge.unknown { background: #edf0f3; color: var(--muted); }
.result-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.5rem; margin: 1rem 0; }
.result-facts div { min-width: 0; }
.result-facts dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.result-facts dd { margin: .16rem 0 0; overflow-wrap: anywhere; }
.result-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.result-actions a { font-weight: 750; }
.reported-details { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.reported-details summary { cursor: pointer; font-weight: 750; color: var(--blue-dark); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; color: var(--muted); font-size: .9rem; }
.result-notice { margin: 1rem 0 0; color: var(--muted); font-size: .8rem; }
.empty-state { background: white; border: 1px dashed #9fb1c1; color: var(--muted); }

.guidance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-bottom: 3rem; }
.guidance-grid article { background: var(--ice); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.guidance-grid h2 { font-size: 1rem; margin-top: 0; color: var(--navy); }
.guidance-grid p { margin-bottom: 0; color: var(--muted); }
.site-footer { background: var(--navy); color: #e7f0f6; padding: 1.8rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.footer-inner p { max-width: 760px; margin: 0; }
.footer-inner div { display: flex; gap: 1rem; }
.site-footer a { color: white; }

@media (max-width: 850px) {
  .hero-grid, .guidance-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-bottom: 4rem; }
  .source-card { max-width: 620px; }
}
@media (max-width: 580px) {
  .shell { width: min(100% - 1rem, 1160px); }
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; padding-block: .75rem; }
  nav { width: 100%; justify-content: space-between; }
  .form-grid, .radius-grid, .npi-form, .result-facts, .details-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .npi-form .field-note { grid-column: auto; }
  .result-header { flex-direction: column; }
  .tabs { grid-template-columns: 1fr; }
  h1 { font-size: 2.45rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
