:root {
  --bg: #eef5ff;
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(22, 75, 168, 0.14);
  --ink: #12306a;
  --muted: #5e6f90;
  --accent: #164ba8;
  --accent-strong: #0f3d8f;
  --shadow: 0 30px 80px rgba(36, 88, 176, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(72, 163, 255, 0.22), transparent 24rem),
    radial-gradient(circle at top right, rgba(45, 194, 220, 0.16), transparent 24rem),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 42%, #e4efff 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.92), transparent 18rem),
    radial-gradient(circle at 80% 0%, rgba(167, 214, 255, 0.3), transparent 20rem);
}

a {
  color: inherit;
}

.shell {
  width: min(86rem, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  padding: 0.3rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 14px 36px rgba(30, 91, 183, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(31, 86, 172, 0.08);
}

nav a[data-active="true"] {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
}

.footer {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding: 1.25rem clamp(1.2rem, 3vw, 1.8rem) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 700;
}

.content {
  padding: clamp(1.5rem, 5vw, 3rem);
}

.search-stage {
  padding: 0 0 1.5rem;
}

.search-stage-centered {
  padding-bottom: clamp(1.5rem, 5vw, 3rem);
}

.page-intro {
  padding: 0 clamp(1.5rem, 5vw, 3rem) 1.5rem;
}

.page-copy {
  width: 100%;
}

.content-stack {
  display: grid;
  gap: 2rem;
}

.page-flow {
  display: grid;
}

.search-results-stack {
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  margin-bottom: 0.85rem;
  letter-spacing: -0.04em;
}

p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.muted {
  color: var(--muted);
}

.lead {
  max-width: 40rem;
  font-size: 1.08rem;
}

.search-banner {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.search-banner.banner-mobile-visible {
  display: block;
}

.home-search-shell {
  position: relative;
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
}

.home-search-shell .search-banner {
  margin-bottom: 0;
}

.search-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.55rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(22, 75, 168, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(35, 96, 185, 0.12);
}

.search-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.search-form-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(22, 75, 168, 0.08);
}

.search-form-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
  justify-self: end;
}

.state-filter-inline-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-form-overlay {
  position: absolute;
  left: 25%;
  top: 49%;
  width: 50.4%;
}

.search-form-banner {
  margin-top: 0;
  padding: 0.4rem;
  gap: 0.4rem;
  border-radius: 1.35rem;
  border-color: rgba(28, 88, 178, 0.08);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 50px rgba(37, 96, 186, 0.16);
}

.search-form-banner input {
  padding: clamp(0.6rem, 1.3vw, 1rem) clamp(0.75rem, 1.4vw, 1.15rem);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
}

.search-form-banner button {
  padding: clamp(0.68rem, 1.2vw, 0.98rem) clamp(0.9rem, 1.5vw, 1.45rem);
  font-size: clamp(0.72rem, 1.1vw, 0.98rem);
}

.search-form input {
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
}

.search-form input:focus {
  outline: none;
  border-color: rgba(22, 75, 168, 0.16);
  background: rgba(238, 246, 255, 0.8);
}

.search-form button,
.button {
  padding: 1rem 1.45rem;
  border-radius: 1rem;
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  font: inherit;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 32px rgba(17, 61, 143, 0.24);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(22, 75, 168, 0.08);
}

.state-filter {
  position: relative;
  min-width: 0;
}

.state-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 8.25rem;
  justify-content: space-between;
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 75, 168, 0.14);
  background: rgba(246, 250, 255, 0.96);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(34, 92, 180, 0.08);
}

.state-filter-toggle::-webkit-details-marker {
  display: none;
}

.state-filter-toggle::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.78rem;
}

.state-filter[open] .state-filter-toggle {
  border-color: rgba(22, 75, 168, 0.24);
  background: white;
}

.state-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 10;
  display: grid;
  gap: 0.2rem;
  min-width: 14rem;
  max-height: 16rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid rgba(22, 75, 168, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 50px rgba(25, 78, 162, 0.18);
  color: var(--ink);
}

.state-filter-option {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.2rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.8rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink);
}

.state-filter-option:hover {
  background: rgba(22, 75, 168, 0.06);
}

.state-filter-option input {
  margin: 0;
  accent-color: var(--accent);
  inline-size: 1rem;
  block-size: 1rem;
  justify-self: center;
  align-self: center;
}

.state-filter-option span,
[data-state-filter-option-label] {
  display: block;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
  margin-top: 0.3rem;
}

.search-meta {
  width: min(82rem, 100%);
  margin: 0.85rem auto 0;
  padding: 0 0.35rem;
}

.search-count-summary {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
  min-width: 0;
}

.feature-strip,
.section-grid,
.results,
.stats-grid,
.state-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.feature-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.feature-card,
.info-card,
.stat-card,
.result,
.empty-state,
.guide-step {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  box-shadow: 0 16px 34px rgba(40, 100, 188, 0.08);
}

.feature-card,
.info-card,
.stat-card,
.empty-state {
  padding: 1.15rem 1.2rem;
}

.feature-card strong,
.stat-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.feature-card p,
.info-card p,
.stat-card p,
.empty-state p {
  margin-bottom: 0;
}

.section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-grid h2,
.content h2 {
  margin-bottom: 0.65rem;
}

.guide-steps {
  counter-reset: guide;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.guide-step {
  position: relative;
  padding: 1.2rem 1.2rem 1.2rem 4.2rem;
}

.guide-step::before {
  counter-increment: guide;
  content: counter(guide);
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  font-weight: 800;
}

.link-card {
  display: block;
  text-decoration: none;
}

.link-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.cta-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  text-decoration: none;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.results {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 1.5rem;
  align-items: stretch;
}

.search-results-stack .results {
  margin-top: 0;
}

.state-grid {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.result {
  position: relative;
  display: grid;
  gap: 1rem;
  min-height: 100%;
  padding: 1.3rem;
  overflow: hidden;
}

.result::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 0.3rem;
  background: linear-gradient(90deg, rgba(22, 75, 168, 0.92), rgba(45, 194, 220, 0.8));
}

.result strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0;
}

.result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.result-name-block {
  display: grid;
  gap: 0.35rem;
}

.result-name {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  background: rgba(45, 194, 220, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.pill[data-state="inactive"] {
  background: rgba(22, 75, 168, 0.1);
  color: var(--muted);
}

.result-field {
  display: grid;
  gap: 0.45rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 75, 168, 0.1);
}

.result-grid,
.detail-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-label {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.result-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.result-value {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 0.95rem;
  background: rgba(22, 75, 168, 0.06);
  border: 1px solid rgba(22, 75, 168, 0.08);
  font-size: 1rem;
  font-weight: 700;
  word-break: break-word;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.detail-card {
  display: grid;
  gap: 1.1rem;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  box-shadow: 0 18px 36px rgba(40, 100, 188, 0.09);
}

.code-block {
  overflow-x: auto;
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: #0f234a;
  color: #eef5ff;
  font: 0.92rem/1.6 "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.copy-ruc-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.copy-ruc-button:hover {
  border-color: rgba(45, 194, 220, 0.45);
  background: rgba(45, 194, 220, 0.1);
}

.copy-ruc-button:active {
  transform: translateY(1px);
}

.state-card {
  padding: 1.15rem 1.2rem;
}

.state-value {
  display: block;
  margin-bottom: 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
}

.stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.stats-list-compact {
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.stats-list-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.stats-list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.stats-list-label {
  min-width: 0;
  color: var(--ink);
  word-break: break-word;
}

.stats-list-value {
  flex: none;
  color: var(--accent-strong);
  font-weight: 800;
}

.mono {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-flow.mobile-search-first .search-stage,
  .page-flow.mobile-search-first .search-stage-centered {
    order: 1;
  }

  .page-flow.mobile-search-first .page-intro {
    order: 2;
  }

  .feature-strip,
  .section-grid,
  .stats-grid,
  .result-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .search-form-row {
    grid-template-columns: 1fr;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-stage,
  .search-stage-centered,
  .page-intro {
    padding-bottom: 1rem;
  }

  .search-form-overlay {
    position: static;
    width: 100%;
    margin-top: 1rem;
  }

  .search-form-banner {
    margin-top: 0;
    padding: 0.55rem;
    gap: 0.45rem;
    border-radius: 1.15rem;
  }

  .search-form-banner input {
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    font-size: 0.92rem;
  }

  .search-form-banner button {
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.92rem;
  }

  .search-count-summary {
    width: 100%;
  }

  .search-form-meta {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .search-form-filter-bar {
    justify-content: flex-start;
    justify-self: start;
  }

  .state-filter-toggle {
    min-width: 7.4rem;
  }

  .state-filter-menu {
    left: 0;
    right: auto;
    width: min(18rem, calc(100vw - 3rem));
    min-width: 0;
    max-width: calc(100vw - 3rem);
  }

  .search-banner {
    display: none;
  }

  .search-banner.banner-mobile-visible {
    display: block;
  }
}
