/* One Browse drawer, used by the landing and the app.
   The app's older sidebar styles are overridden here; the landing uses the
   same classes. */

.sidebar,
.site-drawer {
  --sb-line: var(--line-strong, var(--line, #222));
  --sb-line-soft: var(--line-soft, var(--line, #181818));
  --sb-text: var(--text, #f5f5f5);
  --sb-muted: var(--text-subber, var(--text-3, #a0a0a0));
  --sb-faint: var(--text-subberer, var(--text-4, #808080));
  --sb-accent: var(--accent, #a9e8ff);
  --sb-mono: var(--mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 300px;
  overflow: hidden;
  background: #000;
  border-right: 1px solid var(--sb-line);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.8);
  transform: translateX(-100%);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.nav-open .sidebar,
.site-drawer.is-open {
  transform: none;
}

.backdrop,
.site-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.72);
}

.backdrop {
  display: none;
}

body.nav-open .backdrop {
  display: block;
}

.site-drawer-backdrop:not([hidden]) {
  display: block;
}

body.drawer-open {
  overflow: hidden;
}

.side-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 64px;
  padding: 0 16px;
  background: #000;
  border-bottom: 1px solid var(--sb-line);
}

.side-head-title {
  color: var(--sb-muted);
  font: 700 11px/1 var(--sb-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-head .icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--sb-line);
  background: transparent;
  color: var(--sb-muted);
  cursor: pointer;
}

.side-head .icon-btn:hover {
  border-color: var(--sb-accent);
  color: var(--sb-text);
}

.side-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  flex: none;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--sb-line);
}

.side-modes a {
  padding: 7px 0;
  color: var(--sb-muted);
  font: 700 11px/1.2 var(--sans, "Wanted Sans Variable", sans-serif);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.side-modes a:hover {
  color: var(--sb-accent);
}

.side-continue {
  margin: 8px 16px 12px;
}

.side-continue a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--sb-line);
  background: #050505;
  color: var(--sb-text);
  text-decoration: none;
}

.side-continue a:hover {
  border-color: var(--sb-accent);
}

.side-continue .icn {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--sb-accent);
  color: var(--sb-accent);
  font-size: 12px;
}

.side-continue .body {
  min-width: 0;
}

.side-continue b {
  display: block;
  color: var(--sb-accent);
  font: 700 10px/1 var(--sb-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.side-continue span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--sb-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-continue em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--sb-faint);
  font: 11px/1.4 var(--sb-mono);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jump-slot {
  margin: 0 16px 10px;
}

.jump-slot .jump {
  max-width: none;
}

.jump-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--sb-line);
  background: #000;
  color: var(--sb-text);
  font: 12px/1 var(--sb-mono);
  outline: none;
}

.jump-input:focus {
  border-color: var(--sb-accent);
}

.side-filter {
  padding: 8px 16px;
  border-bottom: 1px solid var(--sb-line);
}

.side-filter input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--sb-line);
  background: #000;
  color: var(--sb-text);
  font: 12px/1 var(--sans, "Wanted Sans Variable", sans-serif);
}

.side-filter input::placeholder {
  color: var(--sb-faint);
}

.side-filter input:focus {
  border-color: var(--sb-accent);
  outline: none;
}

.side-nav {
  flex: 1;
  min-height: 0;
  padding: 2px 0 18px;
  overflow-y: auto;
}

.nav-group {
  border-bottom: 1px solid var(--sb-line-soft);
  padding: 0 0 4px;
}

.nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  color: var(--sb-muted);
  font: 700 12px/1.2 var(--sans, "Wanted Sans Variable", sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.nav-group > summary::-webkit-details-marker {
  display: none;
}

.nav-group > summary::after {
  content: "+";
  color: var(--sb-faint);
  font: 400 14px/1 var(--sb-mono);
}

.nav-group[open] > summary::after {
  content: "−";
}

.nav-group > summary .count {
  margin-left: auto;
  color: var(--sb-faint);
  font: 400 12px/1 var(--sb-mono);
  letter-spacing: 0;
}

.nav-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 5px 16px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: var(--sb-muted);
  font: 400 12px/1.3 var(--sans, "Wanted Sans Variable", sans-serif);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover {
  background: #080808;
  color: var(--sb-text);
}

.nav-item.active {
  border-left-color: var(--sb-accent);
  background: color-mix(in srgb, var(--sb-accent) 6%, transparent);
  color: var(--sb-accent);
}

.nav-item .num {
  flex: none;
  width: 48px;
  color: var(--sb-faint);
  font: 400 11px/1 var(--sb-mono);
}

.nav-item .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-foot {
  display: block;
  flex: none;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--sb-line);
  color: var(--sb-faint);
  font: 11px/1.5 var(--sb-mono);
  text-decoration: none;
}

.side-foot:hover {
  color: var(--sb-accent);
}

@media (max-width: 900px) {
  .sidebar,
  .site-drawer {
    width: min(330px, 88vw);
  }
}

/* Groups use the shared +/- disclosure, not the app's old tiny caret. */
.nav-group > summary::before {
  content: none !important;
  display: none !important;
}

/* ---------------------------------------------------------------------------
   One topbar, shared by the landing and the app. The search and filters are a
   surface tool row, not a second navigation bar; the nav lives in the drawer.
   --------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: auto;
  min-height: 64px;
  border-bottom: 1px solid var(--line, var(--dark, #1f1f1f));
  background: color-mix(in srgb, #000 88%, transparent);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  max-width: 74rem;
  min-height: 64px;
  height: auto;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.32rem;
  color: var(--text, #f5f5f5);
  text-decoration: none;
}

.topbar .brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.28rem;
  color: var(--accent, #a9e8ff);
}

.topbar .brand b,
.topbar .brand .brand-ass {
  color: var(--text, #f5f5f5);
  font: 400 1.02rem/1 var(--brand, var(--sans, sans-serif));
  letter-spacing: normal;
}

.topbar .brand .brand-slash {
  color: var(--accent, #a9e8ff);
  font: 400 1.02rem/1 var(--brand, var(--sans, sans-serif));
  letter-spacing: normal;
}

.topbar .brand .brand-ass {
  color: var(--text-subber, var(--text-3, #a0a0a0));
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.top-actions .orders {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line, #1f1f1f);
}

.top-actions .order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 1.9rem;
  height: 2.15rem;
  padding: 0 0.38rem;
  border: 1px solid transparent;
  background: none;
  color: var(--text-subber, var(--text-3, #a0a0a0));
  cursor: pointer;
}

.top-actions .order-btn i {
  display: block;
  width: 0.48rem;
  height: 0.48rem;
  background: var(--swatch, var(--text-3, #a0a0a0));
}

.top-actions .order-btn[data-order="ash"] { --swatch: #c63a28; }
.top-actions .order-btn[data-order="halo"] { --swatch: #eeb044; }
.top-actions .order-btn[data-order="void"] { --swatch: #a9e8ff; }

.top-actions .order-btn:hover {
  color: var(--text, #f5f5f5);
}

.top-actions .order-btn[aria-pressed="true"] {
  border-color: var(--line-strong, #303030);
  background: var(--surface-1, #050505);
  color: var(--text, #f5f5f5);
}

.top-actions .langs {
  display: inline-flex;
  border: 1px solid var(--line, #1f1f1f);
}

.top-actions .langs button {
  min-height: 2.1rem;
  padding: 0 0.45rem;
  border: 0;
  border-right: 1px solid var(--line, #1f1f1f);
  background: none;
  color: var(--text-subber, var(--text-3, #a0a0a0));
  font: 700 var(--t-2xs, 0.75rem)/1 var(--sans, sans-serif);
  letter-spacing: normal;
  cursor: pointer;
}

.top-actions .langs button:last-child {
  border-right: 0;
}

.top-actions .langs button:hover {
  color: var(--text, #f5f5f5);
}

.top-actions .langs button[aria-pressed="true"] {
  background: var(--surface-2, #0a0a0a);
  color: var(--text, #f5f5f5);
}

.top-actions .icon-btn {
  color: var(--text-subber, var(--text-3, #a0a0a0));
  background: none;
  border-color: var(--line, #1f1f1f);
}

.top-actions .icon-btn:hover {
  color: var(--accent, #a9e8ff);
  border-color: var(--accent, #a9e8ff);
}

/* Page tools sit under the one topbar. This is search + filters, not a nav. */
.surface-bar {
  position: sticky;
  top: 64px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line, #1f1f1f);
  background: color-mix(in srgb, #000 88%, transparent);
  backdrop-filter: blur(16px);
}

.surface-bar .searchbar {
  flex: 1;
  max-width: 640px;
}

.surface-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 900px) {
  .topbar-inner {
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
  }

  .topbar .brand {
    margin-right: auto;
  }

  .topbar .brand-mark {
    width: 1.4rem;
    height: 1.4rem;
  }

  .top-actions {
    gap: 4px;
  }

  .surface-bar {
    top: 56px;
    padding: 8px 12px;
  }

  .surface-bar .searchbar {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar .brand b,
  .topbar .brand .brand-slash,
  .topbar .brand .brand-ass {
    font-size: 0.95rem;
  }

  .top-actions .orders {
    padding-left: 0.35rem;
  }

  .top-actions .order-btn {
    min-width: 1.55rem;
    padding: 0 0.25rem;
  }

  .surface-bar {
    flex-wrap: wrap;
  }

  .surface-bar .searchbar {
    flex: 1 0 100%;
  }

  .surface-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* The app keeps the landing's colour control on the beta host only; the
   public app has one committed accent. */
.top-actions .app-orders {
  display: none;
}

:root[data-theme="ice"] .top-actions .app-orders {
  display: flex;
}

/* ---------------------------------------------------------------------------
   Tool surfaces: the same left chrome as the landing and the app.
   Page actions stay on the right; navigation stays in the one drawer.
   --------------------------------------------------------------------------- */

.surface-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line, #1f1f1f);
  background: #000;
  flex: none;
}

.surface-topbar .site-brand {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.32rem;
  color: var(--text, #f5f5f5);
  text-decoration: none;
}

.surface-topbar .site-brand .brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.28rem;
  color: var(--accent, #a9e8ff);
}

.surface-topbar .site-brand b,
.surface-topbar .site-brand .brand-ass {
  color: var(--text, #f5f5f5);
  font: 400 1.02rem/1 var(--brand, var(--sans, sans-serif));
  letter-spacing: normal;
}

.surface-topbar .site-brand .brand-slash {
  color: var(--accent, #a9e8ff);
  font: 400 1.02rem/1 var(--brand, var(--sans, sans-serif));
  letter-spacing: normal;
}

.surface-topbar .site-brand .brand-ass {
  color: var(--text-subber, var(--text-3, #a0a0a0));
}

.surface-topbar .site-menu-btn {
  flex: none;
}

.surface-topbar .site-menu-btn:hover {
  color: var(--accent, #a9e8ff);
  border-color: var(--accent, #a9e8ff);
}

.surface-topbar > .surface-heading {
  margin: 0;
  font-family: "Azonix", "Wanted Sans Variable", sans-serif;
  font-size: clamp(19px, 3vw, 24px);
  letter-spacing: 0.14em;
  color: var(--text, #f5f5f5);
}

@media (max-width: 640px) {
  .surface-topbar {
    gap: 8px;
    padding: 0 12px;
  }

  .surface-topbar .site-brand b,
  .surface-topbar .site-brand .brand-slash,
  .surface-topbar .site-brand .brand-ass {
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) {
  .top-actions .orders,
  .top-actions .langs {
    display: none;
  }
}

@media (max-width: 640px) {
  .surface-topbar .ask-top-inner,
  .surface-topbar .wc-top-inner {
    gap: 8px;
    padding: 0;
  }

  .surface-topbar .ask-heading,
  .surface-topbar .wc-heading {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .surface-topbar .wc-top-inner {
    flex-wrap: nowrap;
  }
}

@media (max-width: 640px) {
  .surface-topbar .site-brand b,
  .surface-topbar .site-brand .brand-slash,
  .surface-topbar .site-brand .brand-ass {
    display: none;
  }

  .surface-topbar .site-brand .brand-mark {
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .surface-topbar .jukebox-status,
  .surface-topbar .board-status {
    display: none;
  }
}

.surface-topbar {
  background: color-mix(in srgb, #000 88%, transparent);
  backdrop-filter: blur(16px);
}
