/* --- Graphite & Signal: content panel with an outer glow --- */
/* The grid stays the plain page background. The content is a panel with a
   slight transparency, so the grid shows very faintly through it. */
.can-bleed {
  background-image: none;
}

/* The panel is simply the full width of the platform's content column
   (main > max-w-6xl, auto margins), so it follows the default page width. */
.pg-page {
  background-color: var(--color-surface);
  background-color: color-mix(in srgb, var(--color-surface) 85%, transparent);
  background-image: none;
  border-radius: var(--app-radius-2xl, 1.5rem);
  box-shadow: 0 0 6rem 1.5rem var(--color-surface);
  box-shadow: 0 0 6rem 1.5rem color-mix(in srgb, var(--color-surface) 85%, transparent);
  padding-block: 0 2rem;
}

/* Footer: solid surface, no grid behind it */
footer,
.pg-footer {
  background-color: var(--color-surface);
}

/* --- HTML blocks: restore the prose styling markdown blocks get --- */
/* Only applies inside .pg-html (the content of an HTML block). */
.pg-html h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.pg-html p {
  margin: 0 0 0.75rem;
}
.pg-html p:last-child {
  margin-bottom: 0;
}
.pg-html ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 0.75rem;
}
.pg-html li {
  margin: 0 0 0.4rem;
}
.pg-html li:last-child {
  margin-bottom: 0;
}
.pg-html a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pg-html a:hover {
  opacity: 0.85;
}
.pg-html strong {
  font-weight: 600;
}

/* --- Animated hero: bleeds to the viewport edges --- */
/* The panel is always inset from the viewport by the wrapper's padding, so
   the bleed is needed at every width. Only the background stretches; the
   headline inside the block keeps its own content column. */
.pg-page > .pg-block--code,
.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* --- Break between the animated hero and the page --- */
/* Two gradients, so the animation's grid and the page grid never meet:
   1. The animation fades into the page background colour over its last 96px.
   2. Below the hero a band runs from the background colour to transparent,
      so the page grid fades in going down instead of starting at a line.
   The frame is its own document, so its fade is an overlay on the block, not
   CSS inside the frame. Nothing here dims content: the hero copy sits well
   above the fade zone. Dials: the two heights (96px and 130px) and the band's
   top offset (the hero height, 520px, which is the block's height setting). */
.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c {
  position: relative;
}
.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color-surface) 0%, transparent), var(--color-surface));
}

/* The band rides above the page grid and the panel background but below the
   blocks: the panel is made a stacking context and the band sits on z-index
   -1. Scoped to pages that actually start with this hero, so other pages
   keep their normal panel. */
.pg-page:has(.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c) {
  position: relative;
  z-index: 0;
}
.pg-page:has(.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c)::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 520px;
  left: 50%;
  width: 100vw;
  height: 130px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(to bottom, var(--color-surface), color-mix(in srgb, var(--color-surface) 0%, transparent));
}

/* A page that starts with the animated hero gets no space above it, so the
   page grid cannot show above the animation. Matches only such pages. */
main > div:has(.pg-b-309d9929-daf9-4868-86a3-d4e41a18e13c) {
  padding-top: 0;
}

/* 100vw counts the scrollbar on desktop, so clip the few pixels of overflow
   instead of letting a horizontal scrollbar appear. clip does not create a
   scroll container, so sticky elements keep working. */
html {
  overflow-x: clip;
}

/* --- Orange tint on the page grid --- */
/* The platform paints the page grid from --app-bg-image, with a neutral line
   colour (--color-on-surface at 15%). For the grid pattern it ignores the
   theme's effect colour, so the tint is set here instead, by rebuilding the
   image from the theme's primary colour. It follows light and dark mode on
   its own, because --color-primary flips with the mode.
   Dial 1, line strength: the 22% below (26% was the first version).
   Dial 2, greyness: wrap the colour in another mix to grey it, for example
   color-mix(in oklab, var(--color-primary) 86%, var(--color-on-surface)). */
/* The doubled :root is deliberate: theme.css declares the same variable on
   html:root and loads after site.css, so only a higher specificity wins. */
:root:root {
  --app-bg-image:
    linear-gradient(color-mix(in oklab, var(--color-primary) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--color-primary) 22%, transparent) 1px, transparent 1px);
}