.activity-panel {
  grid-column: 1 / -1;
}

.district-panel {
  grid-column: 1 / -1;
}

.district-panel thead {
  display: none;
}

.district-panel table,
.district-panel tbody {
  display: block;
}

.district-panel tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.district-panel tr {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.district-panel tr:nth-child(3n) {
  border-right: 0;
}

.district-panel td {
  padding: 0;
  border: 0;
  text-align: left;
}

.district-panel td:first-child {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-panel td:nth-child(2) {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.district-panel td:nth-child(3) {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.activity-item {
  min-width: 0;
  padding: 17px;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}

.activity-item:last-child {
  border-right: 0;
}

.activity-item span,
.activity-item strong {
  display: block;
}

.activity-item span {
  min-height: 36px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.activity-item strong {
  margin-top: 8px;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

.activity-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.activity-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .activity-panel {
    grid-column: auto;
  }

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

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

  .district-panel tr:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .district-panel tr:nth-child(2n) {
    border-right: 0;
  }

  .activity-item {
    border-bottom: 1px solid var(--line);
  }

  .activity-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .district-panel tbody {
    grid-template-columns: 1fr;
  }

  .district-panel tr,
  .district-panel tr:nth-child(2n),
  .district-panel tr:nth-child(3n) {
    border-right: 0;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .activity-item,
  .activity-item:nth-child(2n) {
    border-right: 0;
  }

  .activity-item:last-child {
    border-bottom: 0;
  }

  .activity-item span {
    min-height: 0;
  }
}

@media (min-width: 1180px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy .inn-form {
    margin-inline: auto;
  }
}

/* Центральный сценарий поиска */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  min-height: 650px;
  isolation: isolate;
}

.hero::before {
  right: 50%;
  top: 46%;
  width: min(58vw, 720px);
  height: min(58vw, 720px);
  max-width: none;
  max-height: none;
  border-color: rgba(23, 224, 138, .17);
  box-shadow:
    0 0 0 76px rgba(23, 224, 138, .018),
    0 0 0 152px rgba(23, 224, 138, .012);
  transform: translate(50%, -50%) rotate(45deg);
  transition: border-color .35s ease, box-shadow .35s ease, transform .55s ease;
}

.hero:has(.search-stage.is-active)::before {
  border-color: rgba(23, 224, 138, .42);
  box-shadow:
    0 0 0 76px rgba(23, 224, 138, .035),
    0 0 0 152px rgba(23, 224, 138, .02);
  transform: translate(50%, -50%) rotate(48deg) scale(1.035);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 650px;
  padding: 72px 0 80px;
}

.hero-copy {
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  text-align: center;
}

.hero-copy > .eyebrow {
  justify-content: center;
  margin-bottom: 18px;
}

.hero-copy > .eyebrow span {
  width: 44px;
}

.hero h1 {
  max-width: 100%;
  margin-inline: auto;
  font-size: clamp(54px, 6.4vw, 92px);
  line-height: .95;
}

.hero h1 > span {
  color: var(--mint);
}

.hero-lead {
  max-width: 650px;
  margin: 26px auto 0;
  color: #d8d7d1;
  font-size: 17px;
}

.search-stage {
  --inn-progress: 0%;
  position: relative;
  width: min(100%, 910px);
  margin: 50px auto 0;
  padding: 18px;
  border: 1px solid #41454c;
  background: rgba(18, 19, 22, .94);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .3);
  text-align: left;
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
}

.search-stage::before,
.search-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-stage::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--mint);
  border-left: 2px solid var(--mint);
}

.search-stage::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--mint);
  border-bottom: 2px solid var(--mint);
}

.search-stage.is-active {
  border-color: #686c73;
  box-shadow: 0 30px 95px rgba(0, 0, 0, .38), 0 0 0 1px rgba(23, 224, 138, .08);
  transform: translateY(-3px);
}

.search-stage.is-complete {
  border-color: var(--mint);
}

.atlas-route {
  position: absolute;
  top: -14px;
  left: 34px;
  right: 34px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.atlas-route::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 1px;
  background: #4a4e55;
}

.atlas-route i {
  position: relative;
  width: 11px;
  height: 11px;
  border: 2px solid #4a4e55;
  background: #121316;
  transform: rotate(45deg);
  transition: border-color .2s ease, background-color .2s ease, transform .25s ease;
}

.atlas-route i.is-passed {
  border-color: var(--mint);
  background: var(--mint);
  transform: rotate(45deg) scale(1.18);
}

.inn-form,
.hero-copy .inn-form {
  width: 100%;
  max-width: none;
  margin: 0;
}

.inn-progress {
  height: 3px;
  overflow: hidden;
  background: #292c31;
}

.inn-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(23, 224, 138, .75);
  transition: width .24s ease;
}

.inn-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 8px;
  border: 1px solid #34373d;
  border-top: 0;
  background: #0e0f11;
  transition: border-color .2s ease, background-color .2s ease;
}

.inn-control:focus-within {
  border-color: #686c73;
  background: #101214;
}

.inn-prefix {
  position: absolute;
  top: 50%;
  left: 28px;
  z-index: 1;
  color: var(--mint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  transform: translateY(-50%);
  pointer-events: none;
}

.inn-control input {
  width: 100%;
  min-height: 76px;
  border: 0;
  padding: 12px 22px;
  color: #f5f4f0;
  background: transparent;
  box-shadow: none;
  caret-color: var(--mint);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: .17em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.inn-control input:hover,
.inn-control input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inn-control input::placeholder {
  color: #777b82;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 450;
  letter-spacing: .01em;
}

.search-stage.is-loading .inn-prefix {
  animation: route-pulse .8s ease-in-out infinite alternate;
}

.inn-journey-copy {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  padding: 13px 5px 0;
  color: #aeb2b9;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
}

.inn-journey-copy p {
  margin: 0 auto 0 0;
}

.inn-journey-copy span {
  flex: 0 0 auto;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.field-status,
.field-error {
  min-height: 18px;
  margin: 7px 4px 0;
  text-align: left;
  font-size: 11px;
}

.field-status {
  color: var(--mint);
}

.field-error {
  color: #ffaaa2;
}

.data-note {
  justify-content: center;
  margin-top: 14px;
  color: #969a9f;
  font-size: 11px;
}

@keyframes route-pulse {
  from { opacity: .4; }
  to { opacity: 1; }
}

@media (max-width: 699px) {
  .hero,
  .hero-inner {
    min-height: 610px;
  }

  .hero-inner {
    padding: 52px 0 62px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 55px);
    line-height: .98;
  }

  .hero-lead {
    max-width: 430px;
    margin-top: 20px;
    font-size: 14px;
  }

  .search-stage {
    margin-top: 36px;
    padding: 10px;
  }

  .atlas-route {
    left: 22px;
    right: 22px;
  }

  .inn-control {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .inn-prefix {
    display: none;
  }

  .inn-control input {
    min-height: 68px;
    padding: 12px 8px;
    font-size: clamp(24px, 8vw, 34px);
  }

  .inn-journey-copy {
    padding-top: 11px;
    font-size: 9px;
  }

  .field-status,
  .field-error {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .search-stage,
  .atlas-route i,
  .inn-progress span {
    transition: none;
  }

  .search-stage.is-loading .inn-prefix {
    animation: none;
  }
}
