/* ==================================================================
   Landing pages — site home and guide sub-home.

   Uses only the shared tokens from brand.css, so it inherits whichever
   design direction is active rather than hard-coding one palette.
   ================================================================== */

/* Landing pages need the full width; option C narrows the measure to
   ~46rem for reading, which is wrong for a card grid. Detected via :has()
   on the hero, so no custom template override is needed. */
.md-content__inner:has(.rs-hero) {
  max-width: 62rem;
  padding-top: 0;
}

/* ------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------ */

.rs-hero {
  position: relative;
  background: var(--rs-navy);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(49, 162, 217, 0.32) 0%, transparent 52%),
    linear-gradient(135deg, var(--rs-navy-deep) 0%, var(--rs-navy) 62%);
  color: #fff;
  padding: 4rem 3rem 3.4rem;
  margin-bottom: 3rem;
  overflow: hidden;
}

/* Site home goes full-bleed. Safe here because the page hides the
   navigation sidebar, so the content column spans the grid. */
.rs-hero:not(.rs-hero--sub) {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(3rem, calc(50vw - 30rem));
  padding-right: max(3rem, calc(50vw - 30rem));
}

/* Sub-landing keeps the sidebar, so it stays a contained panel. */
.rs-hero--sub {
  padding: 3rem 2.6rem 2.6rem;
}

/* faint grid motif, echoing the product's node-and-branch designer */
.rs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
}
.rs-hero > * {
  position: relative;
  z-index: 1;
}

.md-typeset .rs-hero h1 {
  font-family: var(--rs-display-font);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.04;
  color: #fff;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
}
.rs-hero--sub .md-typeset h1,
.md-typeset .rs-hero--sub h1 {
  font-size: 2.3rem;
}

/* the sky rule under the title */
.md-typeset .rs-hero h1::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 4px;
  background: var(--rs-blue);
  margin-top: 1.1rem;
}

.md-typeset .rs-hero__sub {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin: 0 0 2rem;
}
.md-typeset .rs-hero__sub strong {
  color: #fff;
}

/* Each landing page's strapline, which was an H2 in Flare because the carousel
 * sat underneath it. With the carousel gone it introduces nothing, so
 * build_landing demotes it to this. */
.md-typeset .rs-lede {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--rs-grey);
  max-width: 34rem;
  margin: -0.4rem 0 2rem;
}

/* --- search: the primary action on a 589-page site ---------------- */
.rs-hero__search {
  margin-bottom: 1.6rem;
  max-width: 30rem;
}
.rs-hero__searchbtn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.95rem 1.2rem;
  font-family: var(--rs-body-font);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.rs-hero__searchbtn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--rs-blue);
  color: #fff;
  transform: translateY(-1px);
}
.rs-hero__searchicon {
  font-size: 0.95rem;
  filter: grayscale(1) brightness(2.2);
}

.md-typeset .rs-hero__links {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}
.md-typeset .rs-hero__links a {
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(49, 162, 217, 0.55);
  text-decoration: none;
  padding-bottom: 1px;
}
.md-typeset .rs-hero__links a:hover {
  color: var(--rs-blue);
  border-bottom-color: var(--rs-blue);
}

/* ------------------------------------------------------------------
   SECTION HEADINGS on landing pages
   ------------------------------------------------------------------ */

.md-typeset:has(.rs-hero) h2 {
  font-family: var(--rs-body-font);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rs-grey);
  margin: 2.8rem 0 1.1rem;
  padding: 0 0 0.7rem;
  border-top: none;
  border-bottom: 1px solid var(--rs-rule);
}
.md-typeset:has(.rs-hero) h2::before {
  display: none;
}

/* ------------------------------------------------------------------
   CARDS
   ------------------------------------------------------------------ */

/* Three things had to be right here, and none of them were before DOCS-62.
 *
 * On the <div>, not the <ul>: Material sets `.grid.cards > ul` to
 * `display: contents`, so the list is not the grid container and everything
 * set on it is inert — which is why these cards rendered one per row.
 *
 * 13rem, not Material's 16rem: at this theme's 125% root size 16rem is 320px,
 * and two of those never fit the measure. 13rem is 260px, which fits three
 * across the 856px a landing page gets once its table of contents is hidden.
 *
 * auto-fill, not auto-fit: the site home stacks groups of 2, 3, 12 and 4
 * cards, and auto-fit collapses the unused tracks, so the two-card group
 * rendered at 420px per card directly above a twelve-card group at 274px. */
.md-typeset .rs-cards.grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 0.85rem;
  /* Each card is the height of its own content. Grid rows stretch by default,
     so one long blurb in a row left every other card in it padded out with
     100px of nothing. */
  align-items: start;
}

.md-typeset .rs-cards.grid.cards > ul > li {
  border: 1px solid var(--rs-rule);
  border-radius: 0;
  padding: 0.95rem 1.05rem 1rem;
  margin: 0;
  box-shadow: none;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  display: flex;
  flex-direction: column;
  /* anchor for the stretched title link below */
  position: relative;
}

/* A floor, deliberately not `align-items: stretch` on the container. Stretch
 * would make every card in a row as tall as the tallest, which is the 100px of
 * nothing that `align-items: start` above exists to avoid. A min-height lifts
 * the one-line outliers -- "IMan v6.0 New Features" measured 112px against a
 * 226px neighbour -- and leaves anything already taller alone.
 *
 * 9rem is three blurb lines plus the card's chrome. Measured across the six
 * busiest landing pages, cards run 112-249px, and the steps between them are
 * blurb lines of ~22px: a one-line card is 112, three lines 156, four 178.
 *
 * Gated at 45em because below it the grid is a single column, so every card is
 * its own row and a floor buys no alignment -- it would only add empty space to
 * the short ones. 44.9375em is already this file's phone breakpoint. */
@media screen and (min-width: 45em) {
  .md-typeset .rs-cards.grid.cards > ul > li {
    min-height: 9rem;
  }
}

/* The whole card is the link. The title's <a> is stretched over the card with
 * an ::after, which keeps one anchor and one accessible name — a wrapper <a>
 * would read the blurb out as part of the link text too. This replaced a
 * separate "Open" action in the corner: it left most of the card dead to a
 * click, and lining it up across a row forced every card to the height of the
 * tallest, which is where the empty space came from. */
.md-typeset .rs-cards.grid.cards > ul > li > p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.md-typeset .rs-cards.grid.cards > ul > li:hover {
  border-color: var(--rs-blue);
  box-shadow: 0 6px 20px rgba(51, 70, 89, 0.11);
  transform: translateY(-2px);
}

/* icon */
.md-typeset .rs-cards.grid.cards > ul > li > :first-child .twemoji,
.md-typeset .rs-cards.grid.cards > ul > li .twemoji.lg {
  color: var(--rs-blue);
}
.md-typeset .rs-cards.grid.cards > ul > li .twemoji svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--rs-blue);
}

/* title */
.md-typeset .rs-cards.grid.cards > ul > li > p:first-child {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--rs-body-font);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--rs-navy);
  margin: 0 0 0.45rem;
}
.md-typeset .rs-cards.grid.cards > ul > li > p:first-child strong {
  font-weight: 700;
}
.md-typeset .rs-cards.grid.cards > ul > li > p:first-child a {
  color: inherit;
  border-bottom: none;
  text-decoration: none;
}
.md-typeset .rs-cards.grid.cards > ul > li:hover > p:first-child a {
  color: var(--rs-blue);
}

/* the --- rule Material inserts between title and body */
.md-typeset .rs-cards.grid.cards > ul > li hr {
  margin: 0 0 0.55rem;
  border-bottom: 1px solid var(--rs-rule);
}

.md-typeset .rs-cards.grid.cards > ul > li > p {
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--rs-grey);
  margin: 0 0 0.4rem;
}
/* Since DOCS-67 removed the page count, this is the blurb — it is the last
   thing in every card, and its bottom margin would otherwise double up with
   the card's own padding. */
.md-typeset .rs-cards.grid.cards > ul > li > p:last-child {
  margin-bottom: 0;
}


/* Landing-page headings. Direction C gives an h2 2.8rem of air above it, which
   is right for a long read and wrong for a page whose job is to be scanned:
   with it, "In this guide" sat below the fold on every guide. */
.md-typeset:has(.rs-cards) h2 {
  margin-top: 1.6rem;
}
.md-typeset:has(.rs-cards) h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.7rem;
}
.md-typeset .rs-cards.grid {
  margin-bottom: 1.6rem;
}

/* ------------------------------------------------------------------
   VIDEOS
   ------------------------------------------------------------------ */

.rs-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 3rem;
}
.rs-videos iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--rs-rule);
  background: #000;
}

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */

@media screen and (max-width: 76.1875em) {
  .rs-hero:not(.rs-hero--sub) {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media screen and (max-width: 44.9375em) {
  .rs-hero {
    padding: 2.5rem 1.4rem 2.2rem;
  }
  .md-typeset .rs-hero h1 {
    font-size: 2rem;
  }
  .rs-hero--sub .md-typeset h1,
  .md-typeset .rs-hero--sub h1 {
    font-size: 1.7rem;
  }
}


/* ------------------------------------------------------------------
   RELEASE NOTES — the current release's What's New page
   ------------------------------------------------------------------ */

/* The banner holds the page title. It is the marketing site's hero: flat
   navy, square corners and a band of one accent colour along the foot. The
   site's theme has five bands (blue, pink, purple, green and orange) and
   gives each page one. This page takes the pink, as /connect/ does. The site
   has no grid, no glow and no bevel, so the banner has none (DOCS-317).

   overflow: clip, not hidden and not clip-path. hidden makes the box a block
   formatting context, which narrows itself out of the way of the floated Copy
   as Markdown button instead of letting the button sit on it. clip-path cuts
   at the border edge, so the watermark would print across the band. clip
   cuts at the padding edge. isolation keeps the stacking context that the
   old clip-path made, so the banner's z-indexed children stay inside it. */
.md-typeset .rs-release {
  position: relative;
  isolation: isolate;
  overflow: clip;
  margin: 0 0 2.4rem;
  padding: 2.3rem 2.3rem 2rem;
  color: #fff;
  background: linear-gradient(180deg, var(--rs-navy-deep) 0%, var(--rs-navy) 100%);
  border-bottom: 1rem solid var(--rs-pink);
}
.md-typeset .rs-release > :not(.rs-release__mark) {
  position: relative;
  z-index: 1;
}

/* the version number as a watermark, bleeding off the bottom right */
.md-typeset .rs-release__mark {
  position: absolute;
  right: -0.4rem;
  bottom: -3.4rem;
  font-family: var(--rs-display-font);
  font-weight: 700;
  font-size: 12rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.07);
  pointer-events: none;
  user-select: none;
}

.md-typeset .rs-release__kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rs-blue);
  margin: 0 0 0.8rem;
}
.md-typeset .rs-release h1 {
  font-size: 2.4rem;
  line-height: 1.05;
  color: #fff;
  max-width: 28rem;
  margin: 0 0 1.1rem;
}
.md-typeset .rs-release h1::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 4px;
  background: var(--rs-blue);
  margin-top: 1.1rem;
}
.md-typeset .rs-release p,
.md-typeset .rs-release h1 + p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 33rem;
  margin: 0 0 0.8rem;
}
/* the link blue is 3.6:1 on the banner, too low for body text */
.md-typeset .rs-release p:not(.rs-release__nav) a {
  color: #fff;
}
.md-typeset .rs-release .rs-release__sub {
  font-family: var(--rs-display-font);
  font-size: 1.2rem;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 0.9rem;
}

/* jump links, standing in for the table of contents the page hides */
.md-typeset .rs-release .rs-release__nav {
  display: flex;
  max-width: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
}
.md-typeset .rs-release__nav a {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.md-typeset .rs-release__nav a:hover {
  color: #fff;
  background: var(--rs-blue);
  border-color: var(--rs-blue);
}

/* The Copy as Markdown button floats at the top right, which on this page is
   over the banner: lift it above the banner and turn it white. */
.md-content__inner:has(.rs-release) > .md-content__button.rs-copy-markdown {
  position: relative;
  z-index: 2;
  margin: 0.8rem 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.6);
}
.md-content__inner:has(.rs-release) > .md-content__button.rs-copy-markdown:hover,
.md-content__inner:has(.rs-release) > .md-content__button.rs-copy-markdown:focus-visible {
  color: #fff;
}

.md-typeset .rs-pullquote {
  margin: 2.2rem 0;
  padding: 1.3rem 1.5rem 1.3rem 1.6rem;
  border-left: 4px solid var(--rs-blue);
  background: linear-gradient(90deg, rgba(49, 162, 217, 0.1) 0%, rgba(49, 162, 217, 0) 85%);
}
.md-typeset .rs-pullquote p {
  font-family: var(--rs-display-font);
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--rs-navy);
  margin: 0;
}
.md-typeset .rs-pullquote .rs-pullquote__label {
  font-family: var(--rs-body-font);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rs-blue);
  margin: 0 0 0.5rem;
}

/* Chapters: a rule across the column and a running number over each title. */
.md-typeset:has(.rs-release) {
  counter-reset: rs-chapter;
}
.md-typeset h2.rs-chapter {
  counter-increment: rs-chapter;
  font-size: 1.75rem;
  margin: 3.6rem 0 0.6rem;
  padding-top: 2.3rem;
  border-top: 1px solid var(--rs-rule);
}
.md-typeset h2.rs-chapter::before {
  content: counter(rs-chapter, decimal-leading-zero);
  top: 0.9rem;
  width: auto;
  height: auto;
  background: none;
  font-family: var(--rs-body-font);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  color: var(--rs-blue);
}
.md-typeset:has(.rs-release) h3 {
  font-size: 1.05rem;
  margin: 2.4rem 0 0.6rem;
}

/* screenshots lift off the page, and lift further under the pointer */
.md-typeset:has(.rs-release) a.glightbox {
  border-bottom: none;
}
.md-typeset:has(.rs-release) a.glightbox img {
  box-shadow: 0 12px 32px rgba(38, 54, 74, 0.13), 0 2px 6px rgba(38, 54, 74, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.md-typeset:has(.rs-release) a.glightbox:hover img {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(38, 54, 74, 0.18), 0 3px 8px rgba(38, 54, 74, 0.08);
}

/* two screenshots side by side, stacked on a phone */
.md-typeset .rs-duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.2rem;
  align-items: center;
}
.md-typeset .rs-duo > p {
  margin: 0;
}
@media screen and (min-width: 45em) {
  .md-typeset .rs-duo {
    grid-template-columns: 2fr 3fr;
  }
}

.md-typeset a.rs-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: none;
}
.md-typeset a.rs-more::after {
  content: "\2192";
  font-size: 0.85rem;
  letter-spacing: 0;
  transition: transform 0.18s ease;
}
.md-typeset a.rs-more:hover::after {
  transform: translateX(4px);
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .rs-release {
    padding: 1.8rem 1.3rem 1.5rem;
  }
  .md-typeset .rs-release h1 {
    font-size: 1.8rem;
  }
  .md-typeset .rs-release__mark {
    font-size: 7.5rem;
    bottom: -2rem;
  }
  .md-typeset h2.rs-chapter {
    font-size: 1.45rem;
  }
}
