.brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px 6px;
}

.brand__logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.brand__text {
  text-align: center;
}

.brand__subtitle {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand__subtitle {
  margin-top: 0;
  color: var(--accent-strong);
  font-size: 1.24rem;
  line-height: 1;
}

.sidebar__nav {
  overflow: auto;
  padding-right: 4px;
}

.icon-button--close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-bottom: -8px;
}

.icon-button__close {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--text);
}

.nav-direct {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
}

.nav-direct--tail {
  margin-top: 8px;
  margin-bottom: 0;
}

.nav-section {
  margin-bottom: 3px;
}

.nav-section__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-section__toggle:hover {
  color: var(--text);
  background: linear-gradient(90deg, rgba(214, 61, 44, 0.16), rgba(214, 61, 44, 0.04));
  border-color: var(--border-strong);
  transform: translateX(2px);
}

.nav-section__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-section__icon {
  width: 24px;
  color: var(--accent-strong);
  text-align: center;
  flex: 0 0 24px;
}

.nav-section__title {
  margin: 0;
  color: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.nav-section__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-section[data-expanded="true"] .nav-section__chevron {
  transform: rotate(225deg);
  border-color: var(--accent-strong);
}

.nav-section__toggle:hover .nav-section__chevron,
.nav-section__toggle:focus-visible .nav-section__chevron {
  border-color: var(--accent-strong);
}

.nav-section__body {
  padding-top: 2px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}

.nav-list .nav-link {
  padding-left: 38px;
  font-size: 0.9rem;
}

.nav-list .nav-link__icon {
  width: 18px;
  flex: 0 0 18px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(214, 61, 44, 0.16), rgba(214, 61, 44, 0.04));
  border-color: var(--border-strong);
  transform: translateX(2px);
}

.nav-link--direct {
  font-weight: 700;
}

.nav-link__icon {
  width: 24px;
  color: var(--accent-strong);
  text-align: center;
}

.sidebar__footer {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(214, 61, 44, 0.04));
}

.sidebar__note {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(214, 61, 44, 0.26), rgba(123, 20, 16, 0.26));
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.02);
}

.button--full {
  width: 100%;
}

.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  cursor: pointer;
}

.icon-button.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .icon-button.mobile-only {
    display: inline-flex;
  }
}

.icon-button__line {
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.searchbar {
  position: relative;
  flex: 1;
}

.searchbar__input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(11, 9, 9, 0.95);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.searchbar__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 24;
}

.panel {
  background: linear-gradient(180deg, rgba(12, 10, 10, 0.98), rgba(10, 8, 8, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel__header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.panel__body {
  padding: 18px 20px 20px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a:hover {
  color: var(--accent-strong);
}

.result-list,
.rail-list,
.stat-list,
.related-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-item + .result-item,
.rail-item + .rail-item,
.stat-item + .stat-item,
.related-links li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.result-link,
.rail-link,
.stat-item {
  display: flex;
  gap: 14px;
  padding: 14px 20px;
}

.result-link:hover,
.rail-link:hover {
  background: rgba(214, 61, 44, 0.06);
}

.result-meta,
.rail-meta {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.rail-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-list {
  display: grid;
}

.stat-item {
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: var(--text-soft);
}

.stat-value {
  color: var(--text);
  font-weight: 700;
}

.empty-state,
.error-state {
  padding: 22px;
  color: var(--muted);
}
