/* ==========================================================================
   site.css - project-authored chrome + directory-navigation styles.
   Loaded by base.html AFTER theme.min.css so overrides win on equal
   specificity. Scope: the Poppins faces, header/footer chrome, flash alerts, signup CTA,
   search typeahead, grid toolbar, sticky left rail, mobile offcanvas,
   back-to-top. Safe global tokens only - page bodies outside the redesign
   keep vendor defaults. Bump the ?v= query in base.html when editing.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Poppins, the site typeface, served from /static/vendor/poppins/ so that
   base.html can preload the two weights that every page uses and the first
   paint already has them (the Google Fonts link that this replaced was found
   only after layout, so the text painted in the fallback face and then moved).
   One rule for each weight and each script subset, with the unicode-range of
   the stylesheet that Google served, so a script that Poppins covers still gets
   Poppins; a later subset wins a code point that two cover. The files never
   change under their names (a new release is a new set of names), which is why
   routes.py may keep them for a year.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-300-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-400-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-500-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-600-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-800-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-900-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-900-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../vendor/poppins/poppins-v24-900-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Global tokens (conservative: rhythm + link polish only)
   -------------------------------------------------------------------------- */

:root {
  /* Shared horizontal padding for the full-width shell; the mobile sticky
     toolbar mirrors it with negative bleed margins. */
  --shell-pad: clamp(1rem, 2.5vw, 2.5rem);
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Full-width shell (YouTube-style): spans the viewport up to a 1920px cap.
   Used by the header, footer, and both directory grid pages instead of the
   vendor .container (which caps at 1140px).
   -------------------------------------------------------------------------- */

.site-shell {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

/* --------------------------------------------------------------------------
   Directory layout: fixed-width sticky rail + fluid card area.
   Replaces the old row/col-lg-3/col-lg-9 percentage split, which produced
   absurd rail widths on wide screens.
   -------------------------------------------------------------------------- */

/* Default stretch alignment is load-bearing: the rail column must be as
   tall as the card area so the sticky .app-rail inside it can travel. */
.app-layout {
  display: flex;
}

.app-layout-rail {
  flex: 0 0 260px;
  min-width: 0;
}

.app-layout-main {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 992px) {
  .app-layout-main {
    border-left: 1px solid rgba(33, 50, 91, 0.1);
    padding-left: 1.5rem;
    margin-left: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

#header .navbar-nav {
  align-items: center;
}

#header .nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
}

/* Nav labels must never wrap ("Log In" / "Start for Free" broke onto
   multiple lines at narrow xl widths). With nowrap the nav column's
   min-content width wins and the grid shrinks the minmax(0, 34rem)
   search column instead. */
#header .navbar-nav .nav-link,
#header .navbar-nav .btn {
  white-space: nowrap;
}

/* The link of the section the visitor is in (today only Docs: its pages set `nav_active`, see base.html). Weight and an
   underline mark it, so the state does not rest on colour alone (WCAG 1.4.1): the dark theme forces one colour on
   every header link with !important, which leaves weight and underline as the only cue there. */
#header .navbar-nav .nav-link.active {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* The header and footer logos state the size of their files (580 x 120) so that the browser reserves their box before
   the file arrives. Those attributes act as a fixed height unless the stylesheet says otherwise, so the height follows
   the width that the theme sets (`.navbar-brand-logo`, `.brand`) and the logo keeps its ratio at every width. */
.navbar-brand-logo,
.brand {
  height: auto;
}

/* The two icons of the menu button keep a 1em square whatever the icon font has delivered: until it arrives the glyph
   is a 7.3 x 23.5 px fallback box, so the button (and everything under the header) moved when the font landed, one
   layout shift on every page below the lg breakpoint. */
.navbar-toggler-default i,
.navbar-toggler-toggled i {
  width: 1em;
  height: 1em;
}

/* Header search (>=1200px): logo left, search center, nav right. The bar
   becomes a symmetric 3-column grid (1fr | search | 1fr) so the search
   column is centered on the viewport — matching the centered hero heading
   below it — instead of drifting into the flex gap. Below xl the slot is
   display:none (d-none d-xl-flex) and the grid pages fall back to their
   in-body search bar. */
@media (min-width: 1200px) {
  #header .navbar-nav-wrap {
    display: grid;
    grid-template-columns: 1fr minmax(0, 34rem) 1fr;
    align-items: center;
    column-gap: 1.5rem;
  }

  #header .navbar-brand {
    justify-self: start;
  }

  #header .navbar-collapse {
    justify-self: end;
  }
}

.site-header-search {
  justify-content: center;
  min-width: 0;
}

.site-header-search .app-search {
  width: 100%;
  max-width: 34rem;
}

/* On the homepage the search bar lives in the hero, not the header. */
.homepage .site-header-search { display: none !important; }

/* Without the search column the header grid degrades to logo + nav;
   use a simple two-column layout so nav stays right-aligned. */
@media (min-width: 1200px) {
  .homepage #header .navbar-nav-wrap {
    grid-template-columns: auto 1fr;
  }
}

/* Compact treatment for the header instance: the boxed .input-card look is
   for in-page heroes; in the chrome it reads as a plain rounded field. */
.site-header-search .input-card {
  padding: 0.125rem 0.125rem 0.125rem 0.75rem;
  box-shadow: none;
  border-radius: 2rem;
}

.site-header-search .input-card .form-control {
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  font-size: 0.9375rem;
}

.site-header-search .input-card .btn {
  border-radius: 50%;
  width: 2.375rem;
  height: 2.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Hero (browse page)
   -------------------------------------------------------------------------- */

/* Full-bleed tinted band behind the hero; the .site-shell inside keeps the
   content on the 1920px cap. AppSumo-style vertical wash: strongest brand
   tint at the very top, dissolving into the white page — no hard bottom
   edge. */
/* AppSumo-style wash: white right under the header, deepening steadily
   toward the band's bottom edge. The peak stays pastel-light so the edge
   against the white page reads as a soft horizon, not a hard rule. */
.app-hero-section {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg,
    #ffffff 0%,
    #f8f9fe 45%,
    #eff2fd 100%);
  padding-block: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.app-hero {
  max-width: 56rem;
}

.app-hero-heading {
  letter-spacing: -0.02em;
  font-size: calc(1.3rem + 1.05vw);
}

@media (min-width: 1200px) {
  .app-hero-heading {
    font-size: 2.125rem;
  }
}

.app-hero-tagline {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  color: #677788;
  font-size: 0.9375rem;
}

/* Stats row: quick-scan value props separated by dot dividers. */
.app-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0;
  margin: 0.875rem 0 0;
  color: #677788;
  font-size: 0.875rem;
}

.app-hero-stat strong {
  color: #1e2022;
}

.app-hero-stat + .app-hero-stat::before {
  content: "\00B7";
  margin-inline: 0.875rem;
  color: rgba(33, 50, 91, 0.35);
}

/* Popular-category chips: quick entry points under the stats. */
.app-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.app-hero-chips .app-hero-chip {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

@media (max-width: 575.98px) {
  .app-hero-section {
    padding-block: 1.5rem 1.25rem;
  }
}

/* ---------- Prototype: video hero ---------- */
.homepage #header {
  background: transparent !important;
}

.app-hero-video-section {
  position: relative;
  z-index: 20;
  background: #fff;
}

.app-hero-video-bg {
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.app-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.app-hero-video-content {
  position: relative;
  z-index: 20;
}

/* In-body search (grid pages, <992px only): never spans the full shell. */
.app-body-search {
  position: relative;
  z-index: 25;
  max-width: 44rem;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Search + typeahead
   -------------------------------------------------------------------------- */

.app-search {
  position: relative;
  z-index: 30;
}

.app-search-suggest {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid rgba(33, 50, 91, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 2.5rem rgba(33, 50, 91, 0.18);
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.375rem;
}

.app-search-suggest[hidden] {
  display: none;
}

.app-search-suggest-group {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8c98a4;
  padding: 0.5rem 0.75rem 0.25rem;
}

.app-search-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #1e2022;
  font-size: 0.9375rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-search-suggest-item i {
  color: #8c98a4;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.app-search-suggest-logo {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.app-search-suggest-item mark {
  background: transparent;
  color: inherit;
  font-weight: 600;
  padding: 0;
}

.app-search-suggest-item:hover,
.app-search-suggest-item.is-active {
  background: rgba(55, 125, 255, 0.08);
  color: #377dff;
}

.app-search-suggest-item.is-active i,
.app-search-suggest-item:hover i {
  color: #377dff;
}

.app-search-suggest-empty {
  padding: 0.625rem 0.75rem;
  color: #8c98a4;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Grid toolbar (count + chip + sort). Sticky compact bar on mobile.
   -------------------------------------------------------------------------- */

.app-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  min-height: 2.375rem;
}

.app-toolbar-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.app-toolbar-count {
  font-size: 0.9375rem;
  color: #677788;
  white-space: nowrap;
}

.app-toolbar-count strong {
  color: #1e2022;
  font-weight: 600;
}

/* The chip's text is #1d4ed8: 6.1:1 on its tint and 5.5:1 hovered, where the brand blue #377dff it had read 3.45:1 and
   3.14:1. The dark theme's link colour takes over in the dark theme (dark-mode.css), as it always did. */
.app-toolbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 16rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(55, 125, 255, 0.35);
  border-radius: 2rem;
  background: rgba(55, 125, 255, 0.08);
  color: #1d4ed8;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.app-toolbar-chip:hover,
.app-toolbar-chip:focus {
  background: rgba(55, 125, 255, 0.16);
  border-color: #377dff;
  color: #1d4ed8;
}

.app-toolbar-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-toolbar-chip i {
  font-size: 0.625rem;
  flex-shrink: 0;
}

/* The two buttons keep each label on one line: a button is as wide as its label, and when the row is too narrow for
   both (a 320 px phone with the longest sort value) the Categories button goes under the sort button instead of
   squeezing a label onto two lines. */
.app-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-toolbar-sort,
.app-toolbar-filters {
  border: 1px solid rgba(33, 50, 91, 0.15);
  white-space: nowrap;
}

/* "Sort:" is #677788 (4.6:1 on white; the .text-muted it was read 2.9:1). The inter-word space collapses inside the
   button, so the margin stands for it. Below 576 px the word is clipped to one pixel, not removed: it stays in the
   accessible name of the button, and the button is about 34 px narrower, which is what lets the two buttons share a
   row at 360 px. */
.app-toolbar-sort-prefix {
  margin-right: 0.3em;
  color: #677788;
}

@media (max-width: 575.98px) {
  .app-toolbar-sort-prefix {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 991.98px) {
  .app-toolbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    /* Bleed across the shell padding so the sticky bar spans edge to edge. */
    margin-left: calc(-1 * var(--shell-pad));
    margin-right: calc(-1 * var(--shell-pad));
    padding: 0.5rem var(--shell-pad);
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(33, 50, 91, 0.08);
  }
}

/* --------------------------------------------------------------------------
   Sticky left rail
   -------------------------------------------------------------------------- */

.app-rail {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.75rem;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 50, 91, 0.2) transparent;
}

.app-rail::-webkit-scrollbar {
  width: 5px;
}

.app-rail::-webkit-scrollbar-thumb {
  background: rgba(33, 50, 91, 0.2);
  border-radius: 3px;
}

.app-rail::-webkit-scrollbar-track {
  background: transparent;
}

.app-rail-group {
  margin-bottom: 1.75rem;
}

.app-rail-group:last-child {
  margin-bottom: 0;
}

/* A group title of the rail is a level-two heading (the page's own heading, when it has one, is the h1) dressed by this
   class alone, so the level never changes the look. #566579 reads 5.9:1 on white; the earlier #8c98a4 read 2.9:1. */
.app-rail-heading {
  display: block;
  margin-top: 0;
  margin-bottom: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #566579;
}

/* Explore rows: 6 px above and below the label. The theme's .nav-sm.nav-pills .nav-link (0,3,0) gives 8 px; this
   selector out-ranks it (0,4,0) without !important. The nav is a wrapping column flex container, whose one line is as
   wide as its widest row, so a row too long for the rail would widen the line past the rail instead of cutting its
   label: max-width keeps every row inside the rail. */
.app-rail-nav .nav-sm.nav-pills .nav-link {
  max-width: 100%;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

/* The theme sets `.badge { line-height: normal }`, which is 1.7 in Poppins: the count of All Apps (and the "New!" of
   Platforms) made its row 37 px, 4 px taller than the rows of a label alone. The stock `line-height: 1` of Bootstrap
   keeps every row at the 33 px of its 21 px label (6 px above and below), in any font. */
.app-rail-nav .nav-link .badge {
  line-height: 1;
}

/* The label of a row never wraps; if a width or a font size that was not measured ever leaves it too little room, it is
   cut with an ellipsis and the badge beside it keeps its place. */
.app-rail-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The "New!" badge of Platforms: #0a6c7c reads 6.1:1 on white and 5.5:1 on a hovered row; the theme's info cyan
   #09a5be it had (the .text-info class, which is !important) read 2.94:1 and 2.66:1. The dark theme has its own
   (dark-mode.css). */
.app-rail-nav .app-rail-new {
  color: #0a6c7c;
}

/* The thin line between the movement lists and the totals. */
.app-rail-divider {
  margin: 0.25rem 0.75rem 0.5rem;
  border: 0;
  border-top: 1px solid rgba(33, 50, 91, 0.12);
  opacity: 1;
}

.app-rail-nav .js-rail-filter::placeholder {
  color: #5f6b7a;
  opacity: 1;
}

.app-rail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.app-rail-tags .app-rail-tag {
  margin: 0; /* flex gap owns the spacing between tags */
}

/* Chips. The theme's soft-secondary chip is #71869d on a tint of itself (3.4:1) and turns white on #71869d when
   hovered (3.8:1); the rail's chips use #566579 (5.3:1 at rest; white on it, hovered, 5.9:1). The chip of the
   category in force is violet on a violet tint (6.5:1) and bold, so it is told apart without colour; the dark theme
   has its own pair. */
.app-rail-nav .app-rail-tag {
  color: #566579;
}

.app-rail-nav .app-rail-tag:hover,
.app-rail-nav .app-rail-tag:focus {
  color: #fff;
  background-color: #566579;
}

.app-rail-nav .app-rail-tag.active {
  color: #3f00ff;
  font-weight: 600;
  background-color: rgba(63, 0, 255, 0.1);
  border-color: rgba(63, 0, 255, 0.35);
}

.app-rail-nav .app-rail-tag.active:hover,
.app-rail-nav .app-rail-tag.active:focus {
  color: #3f00ff;
  background-color: rgba(63, 0, 255, 0.16);
  border-color: rgba(63, 0, 255, 0.5);
}

.js-rail-show-all,
.app-rail-index-link {
  font-size: 0.8125rem;
  text-decoration: none;
  margin-top: 0.5rem;
}

.app-rail-empty {
  font-size: 0.8125rem;
  color: #566579;
}

/* --------------------------------------------------------------------------
   Mobile offcanvas drawer
   -------------------------------------------------------------------------- */

/* 20 rem wide, or the whole viewport when that is less: with a larger root font on a narrow screen the drawer must not
   push its right edge, and its close button, out of the page. The first declaration is the fallback of a browser that
   does not know min(). */
.app-rail-offcanvas {
  max-width: 20rem;
  max-width: min(20rem, 100%);
}

/* The theme pads the header and the body of an offcanvas 2.5 rem on each side. With a larger root font that leaves a
   narrow screen too little room for a row: at 320 px and a 150% root font five of the ten labels were cut. The padding
   is 2.5 rem, or an eighth of the viewport when that is less: 40 px at the default root size on every screen of 320 px
   and more, as before. It sits in @supports because a custom property that holds a function the browser does not know
   blanks the padding that uses it instead of keeping the theme's value. */
@supports (width: min(1px, 2px)) {
  .app-rail-offcanvas {
    --bs-offcanvas-padding-x: min(2.5rem, 12.5vw);
  }
}

/* The title is a level-two heading with the look of a level-five one (class h5), set here by class alone. */
.app-rail-offcanvas .offcanvas-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.app-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 50, 91, 0.1);
  border-radius: 50%;
  background: #fff;
  color: #377dff;
  box-shadow: 0 0.375rem 1.5rem rgba(33, 50, 91, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  cursor: pointer;
}

.app-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(33, 50, 91, 0.08);
}

.site-footer-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c98a4;
  margin-bottom: 0.75rem;
}

.site-footer .list-unstyled {
  padding-top: 0.25rem;
}

.site-footer .link-sm {
  transition: color 0.15s ease;
}

.site-footer .link-sm:hover {
  color: #377dff !important;
}

.site-footer-tagline {
  max-width: 14rem;
}

/* --------------------------------------------------------------------------
   Signup CTA
   -------------------------------------------------------------------------- */

.site-cta {
  border: 1px solid rgba(33, 50, 91, 0.08);
  box-shadow: 0 0.375rem 1.5rem rgba(33, 50, 91, 0.06);
}

.site-cta-heading {
  letter-spacing: -0.01em;
}

.site-cta-copy {
  color: #677788;
}

.site-cta-note {
  color: #8c98a4;
}

/* --------------------------------------------------------------------------
   Pricing page (/pricing)
   -------------------------------------------------------------------------- */

.pricing-hero-sub {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e2022;
}

.pricing-hero-copy {
  color: #677788;
}

.pricing-tiers {
  max-width: 56rem;
}

.pricing-tier {
  border: 1px solid rgba(33, 50, 91, 0.12);
  border-radius: 0.5rem;
  background: #fff;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pricing-tier:hover {
  border-color: rgba(55, 125, 255, 0.4);
  box-shadow: 0 0.375rem 1.5rem rgba(33, 50, 91, 0.08);
}

.pricing-tier-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: #1e2022;
  cursor: pointer;
}

.pricing-tier-toggle:focus-visible {
  outline: 2px solid #377dff;
  outline-offset: -2px;
  border-radius: 0.5rem;
}

.pricing-tier-specs {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.pricing-tier-sep {
  color: #cbd3dd;
  margin: 0 0.25rem;
}

.pricing-tier-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pricing-tier-monthly {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e2022;
}

.pricing-tier-hourly {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #677788;
}

.pricing-tier-chevron {
  flex-shrink: 0;
  color: #8c98a4;
  transition: transform 0.2s ease;
}

.pricing-tier-toggle[aria-expanded="true"] .pricing-tier-chevron {
  transform: rotate(180deg);
}

.pricing-compare {
  padding: 0.25rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(33, 50, 91, 0.08);
  background: #f8fafd;
}

.pricing-compare-heading {
  margin: 1rem 0 0.5rem;
  color: #1e2022;
}

.pricing-compare-table {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.pricing-compare-table th,
.pricing-compare-table td {
  padding: 0.45rem 0.75rem;
  vertical-align: middle;
}

.pricing-compare-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8c98a4;
  border-bottom-width: 1px;
}

.pricing-compare-table tbody th[scope="row"] {
  font-weight: 500;
  color: #1e2022;
}

.pricing-plan-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #8c98a4;
}

.pricing-price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pricing-compare-us {
  background: rgba(55, 125, 255, 0.06);
}

.pricing-compare-us th[scope="row"],
.pricing-compare-us .pricing-price {
  font-weight: 700;
  color: #377dff;
}

.pricing-footnote {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  text-align: center;
}

@media (max-width: 575.98px) {
  .pricing-tier-toggle {
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding: 0.875rem 1rem;
  }

  .pricing-tier-specs {
    flex-basis: calc(100% - 2rem);
  }

  .pricing-tier-prices {
    flex-direction: row;
    align-items: baseline;
    gap: 0.75rem;
  }

  .pricing-compare {
    padding: 0.25rem 0.75rem 1rem;
  }
}

/* Dynamic-scaling graph (labels positioned by js/dynamic-scaling.js) */

.scaling-graph-section {
  padding-left: 50px;
}

.instance-labels {
  /* display overrides the legacy theme.min.css rule that hid the RAM labels
     below 768px; labels are now JS-positioned and correct at every width. */
  display: block;
  left: 0;
  top: 0;
}

.scaling-graph-label {
  position: absolute;
  left: 0;
  font-size: 0.6875rem;
  color: #8c98a4;
  white-space: nowrap;
}

.graph-container {
  width: 100%;
  overflow: hidden;
}

.scaling-cell {
  background-color: #e7eaf3;
}

.scaling-cell.is-active {
  background-color: #6c8aea;
}

.scaling-graph-axis {
  margin: 8px 0 24px 0;
  width: 100%;
  font-size: 0.6875rem;
}

.scaling-graph-axis div {
  flex: 1;
  text-align: left;
}

/* ------------------------------------------------------------------
 * Favorite toggle (heart) — shared state rules for the grid-card chip
 * (positioned in app-grid.css) and the app-details page button.
 * State class `is-favorited` is toggled by the favorites module in
 * site.js; the two <i> icons swap via display so no JS class juggling
 * of icon names is needed.
 * ------------------------------------------------------------------ */
.app-favorite-toggle .app-favorite-icon-filled {
  display: none;
}

.app-favorite-toggle.is-favorited .app-favorite-icon-filled {
  display: inline-block;
  color: #ed4c78;
}

.app-favorite-toggle.is-favorited .app-favorite-icon-outline {
  display: none;
}

/* Details-page favorite button (sits under the Deploy Now CTA). */
.app-favorite-detail-btn .app-favorite-icon-filled,
.app-favorite-detail-btn .app-favorite-icon-outline {
  margin-right: 0.375rem;
}

/* ------------------------------------------------------------------
 * Dashboard tab bar (templates/headers.html) — included by every
 * logged-in dashboard page, hence styled here rather than in the
 * page-scoped dashboard.css.
 *
 * Wide (>= 992px): tabs and balance share one row, space-between.
 * Narrow (< 992px): balance moves to its own right-aligned row above
 * the tabs, and the tab list gets the full container width.  If the
 * tabs still overflow (very small phones), they scroll horizontally
 * behind a fade-out gradient on the trailing edge.
 *
 * OVERLAP MARGIN: theme.min.css gives `.page-header-tabs` (the tab list)
 * `margin-bottom: -2rem`, which pulls the tab underline onto the page-header
 * border.  On the tab LIST - a flex item - that margin shrank the bar to 32px
 * and `align-items: center` then centred the Balance link in 32px instead of
 * in the 64px tab strip (it sat ~16px too high).  The overlap therefore
 * lives on the flex CONTAINER, whose own height is the strip's, and the
 * list zeroes the theme margin (two classes, so it wins regardless of
 * stylesheet order).  The page header ends up exactly as tall as before.
 * ------------------------------------------------------------------ */
.dashboard-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: -2rem;
}

.dashboard-tabs {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dashboard-tabs-bar .dashboard-tabs {
  margin-bottom: 0;
}

.dashboard-tabs::-webkit-scrollbar {
  display: none;
}

.dashboard-tabs .nav-link {
  white-space: nowrap;
}

.dashboard-balance {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.9375rem;
}

/* --- Narrow-viewport stack (< 992px) ----------------------------- */
@media (max-width: 991.98px) {
  .dashboard-tabs-bar {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .dashboard-balance {
    order: -1;
    width: 100%;
    text-align: right;
    padding-bottom: 0.15rem;
    font-size: 0.875rem;
  }

  .dashboard-tabs {
    width: 100%;
    flex: 0 0 100%;
    position: relative;
  }
}

/* Tablet (768px to 991.98px): the strip has its full container width, 696px
   at 768px.  The eight tabs of an affiliate need 762px at the theme's 1rem of
   tab padding (in Poppins, the site's typeface), so the eighth (Team) was
   clipped to a stub; at 0.625rem a side they need 666px.  The seven tabs of
   everyone else fit either way.  tests/test_dashboard_tab_strip_browser.py
   reads both in Chromium. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .dashboard-tabs .nav-link {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
}

/* Below 768px: compact tabs and a scroll-fade indicator.  A subtle gradient
   on the right edge of the tab strip signals that more tabs are available
   off-screen.  Only renders when the tab list actually overflows (JS-free:
   the mask always applies, but where nothing is clipped the tabs end before
   the fade starts, the 2rem of right padding keeps them clear of it, so the
   fade is invisible over whitespace).  static/js/dashboard-tabs.js scrolls
   the strip so that the active tab is in view on arrival and again when the
   typeface has loaded. */
@media (max-width: 767.98px) {
  .dashboard-tabs {
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    padding-right: 2rem;
  }

  .dashboard-tabs .nav-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.8125rem;
  }
}

/* ── App-details logo: never enlarge past natural size ─────────── */
.app-detail-logo-wrap {
  width: 7.5rem;
  height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.app-detail-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ── Similar apps carousel controls: pixel-perfect centering ───── */
.similar-apps-arrow-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.875rem !important;
  line-height: 1 !important;
  border-radius: 50% !important;
}

.similar-apps-arrow-btn i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1em !important;
  height: 1em !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.similar-apps-arrow-btn i::before {
  display: block !important;
  line-height: 1 !important;
  vertical-align: 0 !important;
}

