:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: #1f2933;
  background: #f5f7f6;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f5f7f6;
  color: #1f2933;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.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;
}

.site-header {
  border-bottom: 1px solid #d9dfdc;
  background: #ffffff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
}

.site-heading {
  margin: 0;
  font: inherit;
}

.site-brand {
  color: #17201c;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.admin-link {
  padding: 7px 10px;
  border-radius: 6px;
  color: #286c49;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.admin-link:hover {
  background: #edf5f0;
}

.site-brand:focus-visible,
.admin-link:focus-visible,
.navigation-card:focus-visible,
.navigation-search__input:focus-visible,
.retry-button:focus-visible {
  outline: 3px solid #286c49;
  outline-offset: 2px;
}

.navigation-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.navigation-search {
  max-width: 560px;
}

.navigation-search__input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #b9c4bf;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2933;
}

.navigation-search__input::placeholder {
  color: #68756f;
}

.navigation-search__input:disabled {
  cursor: wait;
  background: #edf0ee;
}

#navigationStatus {
  min-height: 24px;
  margin: 16px 0 0;
  color: #5e6b65;
  font-size: 14px;
}

#navigationStatus.navigation-status--error {
  color: #b42318;
}

.retry-button {
  min-height: 40px;
  margin-top: 12px;
  padding: 7px 14px;
  border: 1px solid #286c49;
  border-radius: 6px;
  background: #ffffff;
  color: #286c49;
  cursor: pointer;
  font-weight: 600;
}

.retry-button:hover {
  background: #edf5f0;
}

.navigation-sections {
  margin-top: 28px;
}

.navigation-section + .navigation-section {
  margin-top: 36px;
}

.navigation-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.navigation-section__title {
  min-width: 0;
  margin: 0;
  color: #17201c;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.navigation-section__count {
  flex: 0 0 auto;
  color: #68756f;
  font-size: 13px;
}

.navigation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.navigation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 16px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #d9dfdc;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  text-decoration: none;
}

.navigation-card:hover {
  border-color: #88a996;
  box-shadow: 0 2px 8px rgb(31 41 51 / 8%);
}

.navigation-card__title {
  min-width: 0;
  color: #17201c;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.navigation-card__kind {
  grid-column: 1;
  margin-top: 7px;
  color: #5e6b65;
  font-size: 13px;
}

.navigation-card__external {
  display: inline-grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  place-items: center;
  width: 24px;
  height: 24px;
  align-self: center;
  color: #286c49;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 640px) {
  .site-header__inner,
  .navigation-main {
    width: min(100% - 28px, 1120px);
  }

  .navigation-main {
    padding-top: 24px;
  }

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

  .navigation-section__header {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .navigation-card,
  .admin-link,
  .retry-button {
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  }
}
