.root-function-nav {
  display: grid;
  gap: 22px;
  color: var(--app-text);
}

.root-function-nav [hidden] {
  display: none;
}

#root-dashboard-navigation {
  background: var(--app-canvas-subtle);
}

.root-function-nav__toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.root-function-nav__search {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--app-border-strong);
  border-radius: 10px;
  background: var(--app-surface);
}

.root-function-nav__search > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--app-text-muted);
}

.root-function-nav__search:focus-within {
  border-color: var(--app-text-muted);
  box-shadow: 0 0 0 3px var(--app-border-soft);
}

.root-function-nav__search input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--app-text);
  font: inherit;
  font-size: 14px;
}

.root-function-nav__search input::placeholder {
  color: var(--app-text-subtle);
}

.root-function-nav__search button,
.root-function-nav__empty button {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--app-surface-muted);
  color: var(--app-text);
  font-size: 13px;
  cursor: pointer;
}

.root-function-nav__count {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.root-function-nav__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.root-function-nav__filters button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--app-text-muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.root-function-nav__filters button:hover {
  background: var(--app-surface-muted);
  color: var(--app-text);
}

.root-function-nav__filters button[aria-pressed="true"] {
  border-color: var(--app-border-strong);
  background: var(--app-text);
  color: var(--app-surface);
}

.root-function-nav__filters button span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: .75;
}

.root-function-nav__groups {
  display: grid;
  gap: 30px;
}

.root-function-nav__group {
  --nav-icon-background: #f2ede5;
  --nav-icon-color: #8b6948;
}

.root-function-nav__group--content {
  --nav-icon-background: #f0ebf6;
  --nav-icon-color: #7b6796;
}

.root-function-nav__group--members {
  --nav-icon-background: #f8edef;
  --nav-icon-color: #9b6570;
}

.root-function-nav__group--reviews {
  --nav-icon-background: #faf0df;
  --nav-icon-color: #99753c;
}

.root-function-nav__group--data {
  --nav-icon-background: #e9f2ed;
  --nav-icon-color: #547562;
}

.root-function-nav__group--organization {
  --nav-icon-background: #edf0f3;
  --nav-icon-color: #65727e;
}

.root-function-nav__group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.root-function-nav__group-icon,
.root-function-nav__icon {
  --nav-ink: var(--nav-icon-color);
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--nav-icon-background);
  color: var(--nav-icon-color);
}

.root-function-nav__group-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.root-function-nav__group-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.root-function-nav__group-heading p {
  margin: 2px 0 0;
  color: var(--app-text-muted);
  font-size: 12px;
}

.root-function-nav__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.root-function-nav__card {
  display: flex;
  min-width: 0;
  min-height: 94px;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border: 1px solid var(--app-border-soft);
  border-radius: 12px;
  background: var(--app-surface);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.root-function-nav__card:hover {
  border-color: var(--app-border-strong);
  box-shadow: 0 3px 12px var(--app-shadow);
}

.root-function-nav__text {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.root-function-nav__text strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.root-function-nav__description {
  --nav-ink: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.root-function-nav__arrow {
  --nav-ink: var(--app-text-subtle);
  flex: 0 0 auto;
}

.root-function-nav svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.root-function-nav__group-icon svg,
.root-function-nav__arrow svg {
  width: 16px;
  height: 16px;
}

.root-function-nav :is(a, button):focus-visible {
  outline: 2px solid var(--app-text-muted);
  outline-offset: 3px;
}

.root-function-nav__empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--app-text-muted);
  text-align: center;
}

.root-function-nav__empty p {
  margin: 0;
  font-size: 14px;
}

.root-function-nav__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.root-dashboard-page .root-dashboard-tab[aria-selected="true"] {
  border-bottom-color: var(--app-text);
  color: var(--app-text);
}

/* This navigation intentionally uses neutral labels rather than content-link blue. */
@layer app-links {
  main .root-function-nav a.root-function-nav__card:any-link,
  main .root-function-nav a.root-function-nav__card:any-link :where(*) {
    color: var(--nav-ink, var(--app-text)) !important;
  }
}

html[data-theme="dark"] .root-function-nav__group {
  --nav-icon-background: var(--app-surface-muted);
  --nav-icon-color: var(--app-text-subtle);
}

@media (min-width: 1280px) {
  .root-function-nav__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .root-function-nav__toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .root-function-nav__search {
    flex-basis: 100%;
  }

  .root-function-nav__search input {
    font-size: 13px;
  }

  .root-function-nav__filters {
    gap: 6px;
  }

  .root-function-nav__filters button {
    padding: 6px 10px;
    font-size: 12px;
  }

  .root-function-nav__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .root-function-nav__card {
    min-height: 86px;
    padding: 14px;
  }
}
