/* ==========================================================================
   Registry Lookup — stylesheet
   A strict, high-contrast public-service aesthetic. Light theme only,
   generous hit areas, visible focus states, no decoration for its own sake.
   ========================================================================== */

:root {
  --black: #0b0c0c;
  --white: #ffffff;
  --link: #1d70b8;
  --link-visited: #4c2c92;
  --link-hover: #003078;
  --green: #00703c;
  --green-dark: #005a30;
  --green-shadow: #002d18;
  --red: #d4351c;
  --grey-border: #b1b4b6;
  --grey-light: #f3f2f1;
  --grey-mid: #dee0e2;
  --grey-text: #505a5f;
  --focus: #ffdd00;
  --brand-blue: #1d70b8;
  --blue-tint: #d2e2f1;
  --red-tint: #f6d7d2;
  --green-tint: #cce2d8;
  --yellow-tint: #fff7bf;
  --orange-tint: #fcd6c3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--white);
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 641px) {
  body { font-size: 16px; }
}

/* --- Links & focus ------------------------------------------------------ */

a {
  color: var(--link);
  text-underline-offset: 0.1em;
  text-decoration-thickness: 1px;
}
a:visited { color: var(--link-visited); }
a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 3px;
}
a:focus,
button:focus,
input:focus,
summary:focus {
  outline: 3px solid transparent;
  background-color: var(--focus);
  box-shadow: 0 -2px var(--focus), 0 4px var(--black);
  color: var(--black) !important;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  padding: 10px 15px;
  background: var(--focus);
  color: var(--black);
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
  top: 0;
  z-index: 100;
}

/* --- Layout ------------------------------------------------------------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 641px) {
  .container { padding: 0 30px; }
}

main {
  display: block;
  padding: 12px 0 35px;
}

.grid {
  display: grid;
  gap: 30px;
}
@media (min-width: 769px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-main { grid-template-columns: 2fr 1fr; gap: 50px; }
}

.prose { max-width: 44em; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  background: var(--brand-blue);
  border-bottom: 10px solid var(--black);
  color: var(--white);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header a { color: var(--white); }
.site-header a:visited { color: var(--white); }
.site-header a:hover { color: var(--white); text-decoration-thickness: 3px; }

.brand {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: underline; }

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 16px;
}

/* --- Phase banner ------------------------------------------------------- */

.phase-banner {
  border-bottom: 1px solid var(--grey-border);
  padding: 10px 0;
  font-size: 16px;
}
.phase-banner .container {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--link);
  color: var(--white);
  white-space: nowrap;
}
.tag-green { background: var(--green-tint); color: #005a30; }
.tag-red { background: var(--red-tint); color: #942514; }
.tag-grey { background: var(--grey-mid); color: #383f43; }
.tag-yellow { background: var(--yellow-tint); color: #594d00; }
.tag-orange { background: var(--orange-tint); color: #6e3619; }
.tag-blue { background: var(--blue-tint); color: #0c2d4a; }

/* --- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  margin: 0 0 20px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: 23px; margin-bottom: 14px; }
h2 { font-size: 18px; margin-top: 26px; }
h3 { font-size: 16px; margin-top: 20px; margin-bottom: 8px; }

@media (min-width: 641px) {
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }
}

h1:first-child, h2:first-child { margin-top: 0; }

p { margin: 0 0 12px; }

.lead {
  font-size: 16px;
  color: var(--black);
}
@media (min-width: 641px) {
  .lead { font-size: 17px; }
}

.caption {
  display: block;
  font-size: 15px;
  color: var(--grey-text);
  font-weight: 400;
  margin-bottom: 5px;
}
@media (min-width: 641px) {
  .caption { font-size: 15px; }
}

.hint {
  color: var(--grey-text);
  font-size: 16px;
  margin-bottom: 10px;
}

.secondary { color: var(--grey-text); }

.small { font-size: 16px; }

ul, ol { margin: 0 0 20px; padding-left: 20px; }
li { margin-bottom: 5px; }

.list-plain { list-style: none; padding: 0; }

.list-spaced li { margin-bottom: 15px; }

hr {
  border: 0;
  border-top: 1px solid var(--grey-border);
  margin: 30px 0;
}

.section-break {
  border: 0;
  border-top: 2px solid var(--grey-light);
  margin: 26px 0;
}

/* --- Breadcrumbs -------------------------------------------------------- */

.breadcrumbs {
  font-size: 16px;
  margin: 15px 0 10px;
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 12px 1px 6px;
  border: solid var(--grey-text);
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}

/* --- Forms -------------------------------------------------------------- */

label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
}

.label-lg {
  font-size: 24px;
  line-height: 1.2;
}
@media (min-width: 641px) {
  .label-lg { font-size: 32px; }
}

input[type="text"],
input[type="search"],
input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.4;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 0;
  appearance: none;
  min-height: 44px;
}

input:focus {
  border-color: var(--black);
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px;
  background: var(--white);
}

.search-group {
  display: flex;
  max-width: 34em;
}
.search-group input { border-right: 0; }
.search-group .btn { flex: none; margin: 0; }

@media (max-width: 480px) {
  .search-group { flex-direction: column; }
  .search-group input { border-right: 2px solid var(--black); }
  .search-group .btn { margin-top: 10px; }
}

.btn {
  display: inline-block;
  padding: 8px 15px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.4;
  min-height: 44px;
  color: var(--white);
  background: var(--green);
  border: 2px solid transparent;
  box-shadow: 0 2px 0 var(--green-shadow);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn:active { top: 2px; box-shadow: none; }
.btn:focus {
  background: var(--focus);
  color: var(--black) !important;
  box-shadow: 0 2px 0 var(--black);
  outline: 3px solid transparent;
}
.btn:visited { color: var(--white); }

.btn-secondary {
  background: var(--grey-light);
  color: var(--black);
  box-shadow: 0 2px 0 #929191;
}
.btn-secondary:hover { background: #dbdad9; color: var(--black); }
.btn-secondary:visited { color: var(--black); }

/* --- Panels & notices --------------------------------------------------- */

.inset {
  border-left: 10px solid var(--grey-border);
  padding: 8px 0 8px 14px;
  margin: 16px 0;
}
.inset > :last-child { margin-bottom: 0; }

.panel-notice {
  border: 5px solid var(--black);
  padding: 20px;
  margin: 25px 0;
}
.panel-notice > :last-child { margin-bottom: 0; }
.panel-notice h2, .panel-notice h3 { margin-top: 0; }

.error-summary {
  border: 5px solid var(--red);
  padding: 15px 20px;
  margin: 0 0 30px;
}
.error-summary h2 {
  margin: 0 0 10px;
  font-size: 22px;
}
.error-summary > :last-child { margin-bottom: 0; }

.warning {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 25px 0;
  font-weight: 700;
}
.warning-icon {
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 24px;
  line-height: 33px;
  text-align: center;
  font-weight: 700;
}

/* --- Summary list ------------------------------------------------------- */

.summary-list {
  margin: 0 0 20px;
  font-size: 15px;
  border-collapse: collapse;
  width: 100%;
}
@media (min-width: 641px) {
  .summary-list { font-size: 15px; }
}

.summary-list .row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--grey-mid);
  padding: 6px 0;
}
@media (min-width: 641px) {
  .summary-list .row { flex-direction: row; }
  .summary-list .key { width: 40%; padding-right: 20px; }
  .summary-list .val { width: 60%; }
}
.summary-list .key { font-weight: 700; }
.summary-list .val { color: var(--black); }
.summary-list .val > :last-child { margin-bottom: 0; }
.summary-list .row:last-child { border-bottom: 0; }

/* --- Cards / result items ----------------------------------------------- */

.result {
  border-bottom: 1px solid var(--grey-mid);
  padding: 20px 0;
}
.result:first-of-type { border-top: 1px solid var(--grey-mid); }
.result h3 { margin: 0 0 5px; font-size: 19px; }
@media (min-width: 641px) {
  .result h3 { font-size: 24px; }
}
.result .meta {
  font-size: 16px;
  color: var(--grey-text);
  margin: 0 0 5px;
}
.result .address {
  font-size: 16px;
  margin: 0;
}

.card {
  border: 1px solid var(--grey-mid);
  border-top: 3px solid var(--black);
  padding: 12px 14px;
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* --- Tabs --------------------------------------------------------------- */

.tabs { margin: 20px 0; }

.tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--grey-border);
  display: flex;
  flex-wrap: wrap;
  font-size: 16px;
}
.tab-list li { margin: 0 5px -1px 0; }

.tab-btn {
  display: block;
  padding: 6px 12px;
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-bottom-color: var(--grey-border);
  color: var(--link);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.tab-btn:hover { color: var(--link-hover); background: #dbdad9; }
.tab-btn[aria-selected="true"] {
  background: var(--white);
  border-bottom-color: var(--white);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  padding-top: 14px;
  margin-top: -2px;
}

.tab-panel { padding: 18px 0 0; }
.tab-panel[hidden] { display: none; }

/* --- Tables ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin-bottom: 30px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
@media (min-width: 641px) {
  table { font-size: 15px; }
}

caption {
  text-align: left;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 5px 14px 5px 0;
  border-bottom: 1px solid var(--grey-mid);
}
thead th { border-bottom: 2px solid var(--black); }
td:last-child, th:last-child { padding-right: 0; }
.numeric { text-align: right; }
.nowrap { white-space: nowrap; }

/* --- Details ------------------------------------------------------------ */

details { margin-bottom: 20px; font-size: 16px; }
summary {
  color: var(--link);
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 5px;
  display: list-item;
}
summary:hover { color: var(--link-hover); }
.details-body {
  border-left: 5px solid var(--grey-border);
  padding: 15px 0 5px 20px;
}
.details-body > :last-child { margin-bottom: 0; }

/* --- Pagination --------------------------------------------------------- */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--grey-mid);
  font-size: 16px;
}
.pagination .page-count {
  color: var(--grey-text);
  text-align: center;
  flex: 1;
}

/* --- Status / loading --------------------------------------------------- */

.loading {
  padding: 30px 0;
  color: var(--grey-text);
  font-size: 19px;
}

.empty-state {
  padding: 25px 0;
  border-top: 1px solid var(--grey-mid);
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: 10px solid var(--black);
  background: var(--grey-light);
  padding: 25px 0;
  font-size: 16px;
  margin-top: 40px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer li { margin: 0; }
.site-footer p { margin-bottom: 10px; color: #383f43; }
.site-footer p:last-child { margin-bottom: 0; }

/* --- Sample-data banner (preview page only) ----------------------------- */

.demo-banner {
  background: var(--yellow-tint);
  border-top: 4px solid #594d00;
  border-bottom: 4px solid #594d00;
  padding: 15px 0;
}
/* Full-bleed strip on the preview page; .demo-banner-inner is the inline
   variant used inside a rendered company record. */
.demo-banner .container,
.demo-banner-inner {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.demo-banner-inner { padding: 0 20px; }
.demo-banner p { margin: 0; font-size: 16px; }
.demo-banner strong { display: block; font-size: 19px; margin-bottom: 4px; }

/* --- Stat tiles --------------------------------------------------------- */

/* Tiles carry their own border rather than letting a wrapper background show
   through the gaps — otherwise a part-filled last row leaves a grey phantom
   tile where the grid has no item. */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  margin: 0 0 20px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--grey-border);
  padding: 10px 12px;
}

.stat-label {
  font-size: 14px;
  color: var(--grey-text);
  margin: 0 0 4px;
}

/* Proportional figures: tabular-nums makes display-size numbers look loose. */
.stat-value {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

.stat-delta {
  font-size: 13px;
  color: var(--grey-text);
  margin: 4px 0 0;
}
/* Direction is carried by the arrow glyph and the "vs" label, not by hue alone. */
.stat-delta .up { color: #005a30; font-weight: 700; }
.stat-delta .down { color: #942514; font-weight: 700; }
.stat-delta .flat { color: #383f43; font-weight: 700; }

/* --- Data-source annotation --------------------------------------------- */

.source-note {
  font-size: 15px;
  color: var(--grey-text);
  margin: -12px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

/* Columns of figures do align, so these get tabular figures. */
.figures td, .figures th { font-variant-numeric: tabular-nums; }
.figures td.numeric, .figures th.numeric { text-align: right; }

/* --- Utilities ---------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

[hidden] { display: none !important; }

@media print {
  .site-header, .site-footer, .phase-banner, .breadcrumbs, .tab-list, form { display: none; }
  .tab-panel[hidden] { display: block !important; }
  a { color: var(--black); }
}
