/* Static pages (FAQ, legal, extensions, home, platforms, trending) use the app's left sidebar.
   Desktop: the same rail as the app (library-layout.css). Narrow screens: stacked above the page. */
html.library-layout .static-side-nav a { text-decoration: inherit; }

html.library-layout .static-side-account {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

html.library-layout .static-side-account .landing-btn {
  text-align: center;
}

html.library-layout .static-side-account-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  color: var(--lv7-muted);
  font-weight: 700;
  text-decoration: none;
}

html.library-layout .static-side-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #09111b;
  font-weight: 800;
  flex: none;
}

@media (min-width: 1280px) {
  html.library-layout .static-side-account {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--lv7-border-subtle);
  }
}

@media (max-width: 1279px) {
  html.library-layout .static-side-nav {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--lv7-border-subtle);
    box-shadow: none;
    padding: 12px 16px;
    gap: 10px;
  }

  html.library-layout .static-side-nav .lv7-sidebar-brand img {
    width: 28px;
    height: 28px;
    flex: none;
  }

  html.library-layout .static-side-nav .lv7-desktop-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 14px;
  }

  html.library-layout .static-side-nav .lv7-nav-link {
    min-height: 0;
    padding: 4px 2px;
  }

  html.library-layout .static-side-account {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 6px;
  }

  html.library-layout .static-side-account .landing-btn {
    flex: 1 1 auto;
  }
}

/* Tablets: one header row (brand, links, sign in) instead of the stacked phone block. */
@media (min-width: 641px) and (max-width: 1279px) {
  html.library-layout .static-topbar,
  html.library-layout .static-menu-panel {
    display: none !important;
  }

  html.library-layout .static-side-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 28px;
    padding: 12px 28px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 92%, var(--bg)), var(--bg-elev));
  }

  html.library-layout .static-side-nav .lv7-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    justify-items: initial;
    font-size: 17px;
    letter-spacing: -0.01em;
  }

  html.library-layout .static-side-nav .lv7-sidebar-brand img {
    width: 34px;
    height: 34px;
  }

  html.library-layout .static-side-nav [data-side-nav] {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 2px 4px;
  }

  html.library-layout .static-side-nav .lv7-nav-link {
    padding: 8px 14px;
    border-bottom: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
  }

  html.library-layout .static-side-nav .lv7-nav-link:hover,
  html.library-layout .static-side-nav .lv7-nav-link:focus-visible {
    background: var(--lv7-tab-hover);
  }

  html.library-layout .static-side-account {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 10px;
    margin-top: 0;
  }

  html.library-layout .static-side-account .landing-btn {
    flex: 0 0 auto;
    padding: 9px 18px;
    font-size: 14px;
    white-space: nowrap;
  }

  html.library-layout .static-side-nav .lv7-sidebar-search {
    order: 10;
    flex: 1 0 100%;
    margin: 0;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  html.library-layout .static-side-account {
    order: 1;
  }

  html.library-layout .static-side-nav [data-side-nav] {
    order: 2;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* The Week Ahead pages on a phone: the app's top bar (brand, Sections menu, account) replaces the stacked side nav. */
html.library-layout .static-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--lv7-border-subtle);
  background: var(--lv7-surface);
}

html.library-layout .static-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lv7-text);
  font-weight: 800;
  text-decoration: none;
  font-size: 1rem;
}

html.library-layout .static-topbar-brand img { width: 28px; height: 28px; }
html.library-layout .static-topbar-brand span span { color: var(--lv7-green); }

html.library-layout .static-topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

html.library-layout .static-topbar-account { text-decoration: none; }

html.library-layout .static-topbar-signin {
  color: var(--lv7-muted);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
}

html.library-layout .static-menu-panel {
  position: fixed;
  top: 60px;
  left: 12px;
  right: 12px;
  width: auto;
  z-index: 80;
  display: grid;
  gap: 6px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--lv7-line);
  border-radius: 14px;
  background: var(--lv7-surface-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html.library-layout .static-menu-panel[hidden] { display: none !important; }

@media (min-width: 1280px) {
  html.library-layout .static-topbar,
  html.library-layout .static-menu-panel { display: none !important; }
}

@media (max-width: 640px) {
  html.library-layout.has-static-topbar .static-side-nav .lv7-sidebar-brand,
  html.library-layout.has-static-topbar .static-side-nav [data-side-nav],
  html.library-layout.has-static-topbar .static-side-nav .static-side-account {
    display: none;
  }
}
