/* Gallery chrome. Never ships. Light and quiet, like a store page, so the
   component is the only thing with any character. */

:root {
  /* White page, white cards: a card's edge is a hairline (--g-edge). Small
     boxes of text sit on --g-soft instead. The detail view's panels lie in a
     grey tray. Greys have no hue, so nothing reads as cream. */
  --g-page: oklch(1 0 0);
  --g-card: oklch(1 0 0);
  --g-soft: oklch(0.972 0 0);
  --g-tray: oklch(0.958 0 0);
  --g-edge: oklch(0 0 0 / 0.08);
  --g-ink: oklch(0.18 0 0);
  --g-muted: oklch(0.51 0 0);
  --g-line: oklch(0 0 0 / 0.08);
  --g-fill: oklch(0 0 0 / 0.045);
  --g-fill-strong: oklch(0 0 0 / 0.08);
  --g-ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--g-ink);
  background: var(--g-page);
  -webkit-font-smoothing: antialiased;
}

/* Dark mode: the gallery's own colours, plus the variables a dark Dawn
   colour scheme sets, so components switch exactly as they would inside a
   dark store (through ec-theme-bridge.css). Their text colour is inherited
   from the card. */
:root[data-g-scheme='dark'] {
  --g-page: oklch(0.16 0.004 85);
  --g-card: rgb(25 25 23); /* = --color-background below, so components sit on the card */
  --g-soft: var(--g-card);
  --g-tray: var(--g-page);
  --g-edge: transparent; /* the card is lighter than the page already */
  --g-ink: oklch(0.94 0.004 85);
  --g-muted: oklch(0.7 0.008 85);
  --g-line: oklch(0.94 0.01 85 / 0.1);
  --g-fill: oklch(0.94 0.01 85 / 0.07);
  --g-fill-strong: oklch(0.94 0.01 85 / 0.12);
  color-scheme: dark;
  /* Dawn's names, as RGB triplets: background, button, button text */
  --color-background: 25, 25, 23;
  --color-button: 238, 237, 234;
  --color-button-text: 25, 25, 23;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
}
button {
  font: inherit;
  color: inherit;
}
:where(.g-head, .g-hero, .g-bar, .g-grid, .g-empty, .g-agent, .g-faq, .g-foot, .g-pricing, .d, .dev) :focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- head */

/* Brand left, search dead centre, icons right */
.g-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 16px 16px;
}
.g-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: inherit;
  text-decoration: none;
}
.g-brand__mark {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
}
.g-tabs {
  flex: none;
  position: relative;
}
/* One pill that slides to the selected tab (app.js measures it). Until the
   script has placed it, the selected button keeps its own background. */
.g-tabs[data-thumb]::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--g-thumb-width);
  translate: var(--g-thumb-x) 0;
  border-radius: 999px;
  background: var(--g-card);
  box-shadow: 0 0 0 1px var(--g-line);
  pointer-events: none;
}
.g-tabs[data-thumb='ready']::before {
  transition:
    translate 280ms cubic-bezier(0.32, 0.72, 0, 1),
    width 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.g-tabs[data-thumb] button {
  position: relative;
}
.g-tabs[data-thumb] button[aria-selected='true'] {
  background: transparent;
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .g-tabs[data-thumb='ready']::before {
    transition: none;
  }
}
.g-filters {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.g-chip {
  border: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--g-fill);
  font-size: 13.5px;
  color: var(--g-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.g-chip[aria-pressed='true'] {
  background: var(--g-ink);
  color: var(--g-card);
}
/* The same sliding pill as the tabs, behind the chosen category. It lives
   inside the row, so it scrolls with the chips. */
.g-filters[data-thumb] {
  position: relative;
}
.g-filters[data-thumb]::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--g-thumb-width);
  translate: var(--g-thumb-x) 0;
  border-radius: 999px;
  background: var(--g-ink);
  pointer-events: none;
}
.g-filters[data-thumb='ready']::before {
  transition:
    translate 280ms cubic-bezier(0.32, 0.72, 0, 1),
    width 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.g-filters[data-thumb] .g-chip {
  position: relative;
  /* The label changes colour as the pill reaches it, not before. */
  transition:
    background-color 150ms ease,
    color 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
/* The chip it leaves gets its own fill back only once the pill has gone. */
.g-filters[data-thumb] .g-chip[aria-pressed='true'] {
  background: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .g-filters[data-thumb='ready']::before {
    transition: none;
  }
}
@media (hover: hover) and (pointer: fine) {
  .g-chip:not([aria-pressed='true']):hover {
    background: var(--g-fill-strong);
    color: var(--g-ink);
  }
}

/* Light / dark toggle, at the end of the header */
.g-scheme {
  flex: none;
  position: relative;
  width: 36px;
  height: 36px;
  color: var(--g-ink);
}
.g-scheme svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  transition:
    opacity 200ms var(--g-ease),
    rotate 300ms var(--g-ease),
    scale 300ms var(--g-ease);
}
.g-scheme [data-icon='sun'] {
  opacity: 0;
  rotate: -45deg;
  scale: 0.6;
}
:root[data-g-scheme='dark'] .g-scheme [data-icon='sun'] {
  opacity: 1;
  rotate: 0deg;
  scale: 1;
}
:root[data-g-scheme='dark'] .g-scheme [data-icon='moon'] {
  opacity: 0;
  rotate: 45deg;
  scale: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .g-scheme svg {
    transition: none;
  }
}

/* ---------------------------------------------------------------- hero */

.g-head > .g-brand {
  justify-self: start;
}
.g-head__end {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ------------------------------------------------------------- search */

.g-search {
  position: relative;
  display: grid;
  align-items: center;
  margin: 0;
}
.g-search__open {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 38px;
  padding: 0 10px 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--g-fill);
  color: var(--g-muted);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: text;
  transition: background-color 150ms ease;
}
.g-search__open svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.g-search__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Showing the library's search: the words in ink, with room for the clear button */
.g-search[data-query] .g-search__label {
  color: var(--g-ink);
}
.g-search[data-query] .g-search__open {
  padding-right: 40px;
}
.g-search[data-query] kbd {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .g-search__open:hover {
    background: var(--g-fill-strong);
  }
}
.g-search__open:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}
.g-search kbd {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--g-line);
  color: var(--g-muted);
  font: inherit;
  font-size: 11.5px;
}
.g-search__clear {
  position: absolute;
  right: 3px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--g-muted);
  cursor: pointer;
}
.g-search__clear[hidden] {
  display: none;
}
.g-search__clear svg {
  width: 16px;
  height: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .g-search__clear:hover {
    color: var(--g-ink);
    background: var(--g-fill);
  }
}
/* Phones: search gets its own row under the brand */
@media (max-width: 640px) {
  .g-head {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 12px;
  }
  .g-search {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .g-search kbd {
    display: none;
  }
}

/* No results */
.g-empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 72px 16px 120px;
  text-align: center;
}
.g-empty[hidden] {
  display: none;
}
.g-empty__text {
  margin: 0;
  font-size: 15px;
  color: var(--g-muted);
}
.g-empty__text strong {
  font-weight: 500;
  color: var(--g-ink);
}
.g-empty .g-empty__other {
  width: auto;
  padding-inline: 18px;
  background: var(--g-fill);
}
.g-empty__other[hidden] {
  display: none;
}
.g-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) 16px clamp(48px, 7vw, 80px);
  text-align: center;
}
/* Small and quiet: recognition, not a second headline */
.g-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0 0 4px;
  padding: 6px 14px 6px 10px; /* the mark side sits tighter, by eye */
  border-radius: 999px;
  background: var(--g-soft);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--g-muted);
}
.g-hero__shopify {
  flex: none;
  width: 18px;
  height: 18px;
  background: oklch(0.71 0.135 133); /* Shopify green, #7AB55C */
  mask: url(/playground/brand/shopify.svg) center / contain no-repeat;
}
.g-hero__title {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.g-hero__text {
  max-width: 560px;
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--g-muted);
  text-wrap: pretty;
}
.g-hero .g-hero__action {
  margin-top: 14px;
}
/* The one call to action: bigger than every other button on the page */
.g-btn.g-btn--lg {
  width: auto;
  min-height: 52px;
  padding: 15px 32px;
  font-size: 16px;
}
a.g-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

/* Tabs and filters, between the hero and the grid */
.g-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px 16px;
}

/* ---------------------------------------------------------------- grid */

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 12px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Sections are page-wide, so one per row; the blocks after them pack into
   columns like components. */
.g-card[data-tab='sections']:not([data-group]) {
  grid-column: 1 / -1;
}
.g-card[hidden],
.g-wall[hidden],
.g-divider[hidden] {
  display: none;
}
/* Masonry (app.js lays it out): every card is as tall as its component plus
   the canvas padding, packed into the shortest column. Without the script
   the plain grid above still works. */
.g-grid[data-masonry] {
  display: block;
  position: relative;
}
.g-grid[data-masonry] > :is(.g-card, .g-divider, .g-wall) {
  position: absolute;
}
.g-grid[data-masonry] .g-canvas {
  min-height: 240px;
  padding: 56px 32px;
}

/* Where the free ones end: a quiet label across the grid */
.g-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 4px 4px;
  border-top: 1px solid var(--g-line);
  font-size: 13.5px;
}
.g-divider__label {
  color: var(--g-muted);
}
.g-divider__label strong {
  font-weight: 500;
  color: var(--g-ink);
}
.g-divider a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
}

/* Locked: one box per tab, the full width of the grid. The locked tiles
   drift behind at their real size, filling the box, and the words sit on a
   frosted card in front. Components and blocks run in three columns, as wide
   as the grid's own tiles; sections in one, since they're built for a full
   page and fold into their narrow layout if squeezed. */
.g-wall {
  --g-wall-height: 760px;
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  margin-top: 28px;
  padding: 12px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--g-line);
  overflow: hidden;
  cursor: pointer;
}
.g-wall__view {
  --g-wall-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--g-wall-columns), minmax(0, 1fr));
  gap: 12px;
  height: var(--g-wall-height);
  overflow: hidden;
  opacity: 0.7;
  -webkit-mask: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.g-wall[data-tab='sections'] .g-wall__view {
  --g-wall-columns: 1;
}
.g-wall__col {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  height: max-content;
  animation: g-wall-drift 240s linear infinite alternate paused;
}
/* Neighbouring columns run opposite ways, so no two move in step */
.g-wall__col:nth-child(even) {
  animation-direction: alternate-reverse;
}
.g-wall[data-moving] .g-wall__col {
  animation-play-state: running;
}
.g-wall__col > .g-card {
  flex: 1 1 100%;
  min-width: 0;
  box-shadow: inset 0 0 0 1px var(--g-edge); /* the window would clip it outside */
}
/* Up by its own height less the window's, and back. A column shorter than
   the window stays where it is. */
@keyframes g-wall-drift {
  to {
    transform: translateY(min(0px, calc(-100% + var(--g-wall-height))));
  }
}
@container (width >= 760px) {
  .g-wall .g-wall__panel {
    padding: 36px 32px 32px;
    border-radius: 20px;
    background: color-mix(in oklch, var(--g-card) 78%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow:
      0 0 0 1px var(--g-line),
      0 1px 3px oklch(0 0 0 / 0.08),
      0 18px 40px -12px oklch(0 0 0 / 0.25);
  }
}
/* Too narrow for three tiles side by side: two */
@container (width < 1000px) {
  .g-wall:not([data-tab='sections']) .g-wall__view {
    --g-wall-columns: 2;
  }
  .g-wall__col:nth-child(3) {
    display: none;
  }
}
/* Phones: the words on top, one column of tiles below */
@container (width < 760px) {
  .g-wall .g-wall__view {
    --g-wall-height: 440px;
    --g-wall-columns: 1;
  }
  .g-wall__col:nth-child(n + 2) {
    display: none;
  }
  .g-wall .g-wall__panel {
    position: static;
    order: -1;
    translate: none;
    width: auto;
    padding: 36px 8px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-wall__col {
    animation: none;
  }
}
/* In the wall a tile is a picture of itself: its name stays, its controls go */
.g-card[data-locked] .g-card-actions {
  display: none;
}
.g-card[data-locked] .g-card-meta {
  opacity: 1;
  translate: 0 0;
}
.g-wall__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(460px, calc(100% - 48px));
  padding: 0 8px;
  text-align: center;
  cursor: auto;
}
.g-wall__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--g-fill);
  color: var(--g-muted);
  font-size: 12.5px;
  font-weight: 500;
}
.g-wall__badge svg {
  width: 12px;
  height: 12px;
}
.g-wall__title {
  margin: 8px 0 0;
  font-size: clamp(30px, 3.2cqw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  font-variant-numeric: tabular-nums;
}
.g-wall__text {
  margin: 0;
  max-width: 30ch;
  color: var(--g-muted);
  font-size: 17px;
  line-height: 1.5;
  text-wrap: balance;
}
.g-wall__action {
  width: auto;
  margin-top: 14px;
  text-decoration: none;
}

/* ------------------------------------------------------------ side menu */

/* Narrow screens: no sidebar, the page is as it always was. */
.g-side {
  display: none;
}
@media (min-width: 1100px) {
  .g-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
  .g-shell__main {
    min-width: 0;
  }
  /* The brand lives in the sidebar; switching and filtering are there too */
  .g-head > .g-brand,
  .g-bar {
    display: none;
  }
  .g-head > .g-search {
    grid-column: 2;
  }
  .g-side {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100dvh;
    padding: 20px 14px 16px;
    border-right: 1px solid var(--g-line);
  }
}
.g-side__brand {
  align-self: start;
  margin: 4px 0 4px 8px;
}
/* The two parts of the library: small labels, not controls to find. The
   part on screen in the grid is the darker one. */
.g-side__part + .g-side__part {
  margin-top: 22px;
}
.g-side__head {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  min-height: 30px;
  margin-bottom: 2px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: start;
  color: var(--g-muted);
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.g-side__head[aria-current='true'] {
  color: var(--g-ink);
}
.g-side__head .g-side__count {
  letter-spacing: 0;
}
/* The list scrolls on its own; the brand and the foot stay put */
.g-side__nav {
  flex: 1;
  min-height: 0;
  margin: 0 -6px;
  padding: 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.g-side__group summary,
.g-side__item,
.g-side__link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13.5px;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.g-side__group summary {
  font-weight: 500;
  color: var(--g-ink);
  list-style: none;
}
.g-side__group summary::-webkit-details-marker {
  display: none;
}
/* Chevron first, so names line up under the category's name */
.g-side__group summary::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 4px 0 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: -45deg;
  opacity: 0.5;
  transition: rotate 150ms ease-out;
}
.g-side__group[open] summary::before {
  rotate: 45deg;
}
.g-side__count {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--g-muted);
  font-variant-numeric: tabular-nums;
}
.g-side__list {
  margin: 0 0 8px 15px;
  padding: 0 0 0 8px;
  border-left: 1px solid var(--g-line);
  list-style: none;
}
.g-side__item {
  justify-content: space-between;
  min-height: 30px;
  color: var(--g-muted);
}
/* The card at the top of the grid: in ink on the fill, with the line beside
   the list drawn in ink next to it */
.g-side__item[aria-current='location'] {
  position: relative;
  background: var(--g-fill);
  color: var(--g-ink);
}
.g-side__item[aria-current='location']::before {
  content: '';
  position: absolute;
  inset-block: 6px;
  inset-inline-start: -9px;
  width: 1px;
  background: var(--g-ink);
}
/* Locked: a label you can read, not a row you can press */
.g-side__item[data-locked] {
  cursor: default;
  color: color-mix(in oklch, var(--g-muted) 75%, transparent);
}
.g-side__lock {
  flex: none;
  display: inline-flex;
  opacity: 0.5;
}
.g-side__lock svg {
  width: 10px;
  height: 10px;
}
.g-side__none {
  margin: 8px 10px;
  font-size: 13.5px;
  color: var(--g-muted);
}
.g-side__foot {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--g-line);
}
.g-side__link {
  color: var(--g-muted);
}
.g-side .g-side__cta {
  margin-top: 10px;
}
@media (hover: hover) and (pointer: fine) {
  .g-side__head:hover,
  .g-side__group summary:hover,
  .g-side__item:not([data-locked]):hover,
  .g-side__link:hover {
    background: var(--g-fill);
    color: var(--g-ink);
  }
}
.g-side :focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: -2px;
}
/* Where a name in the sidebar leads: marked for a moment, then fades */
.g-card,
.g-wall {
  scroll-margin-top: 24px;
  outline: 2px solid transparent;
  outline-offset: 4px;
  transition: outline-color 600ms ease-out;
}
.g-card[data-flash],
.g-wall[data-flash] {
  outline-color: var(--g-ink);
  transition-duration: 150ms;
}
@media (prefers-reduced-motion: reduce) {
  .g-side__head,
  .g-side__group summary,
  .g-side__group summary::before,
  .g-side__item,
  .g-side__link,
  .g-card,
  .g-wall {
    transition: none;
  }
}

/* ----------------------------------------------------------- your brand */

.g-brandkit {
  display: grid;
  gap: 10px;
}
.g-side .g-brandkit {
  padding: 14px 10px 4px;
  border-top: 1px solid var(--g-line);
}
.g-side .g-brandkit + .g-side__foot {
  border-top: 0;
  padding-top: 6px;
}
/* Narrow screens: one row above the grid, no sidebar to sit in */
.g-brandkit--row {
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  max-width: 1480px;
  margin: 0 auto;
  /* The same edge as the tabs and chips above it */
  padding: 0 16px 16px;
}
.g-brandkit--row .g-brandkit__corners {
  justify-self: end;
  width: min(220px, 100%);
}
@media (min-width: 1100px) {
  .g-brandkit--row {
    display: none;
  }
}
/* Phones: one column, everything on the same left edge. The title, then
   the colours right under it, then the corners slider across the width. */
@media (max-width: 640px) {
  .g-brandkit--row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-top: 4px;
  }
  .g-brandkit--row .g-brandkit__corners {
    justify-self: stretch;
    width: auto;
  }
}
/* Touch: bigger dots, each tap area meeting the next one's */
@media (pointer: coarse) {
  .g-brandkit--row .g-brandkit__swatches {
    gap: 12px;
  }
  .g-brandkit--row .g-swatch {
    width: 32px;
    height: 32px;
  }
  .g-brandkit--row .g-swatch::before {
    inset: -6px;
  }
}
.g-brandkit__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.g-brandkit__title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g-muted);
}
.g-brandkit__reset {
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12.5px;
  color: var(--g-muted);
  cursor: pointer;
}
.g-brandkit__swatches {
  display: flex;
  gap: 8px;
}
.g-swatch {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch, transparent);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.12);
  cursor: pointer;
}
/* A bigger target than the dot, without touching its neighbours */
.g-swatch::before {
  content: '';
  position: absolute;
  inset: -4px;
}
/* Chosen: a ring in the page's ink, clear of the colour */
.g-swatch[aria-pressed='true'] {
  box-shadow:
    0 0 0 2px var(--g-page),
    0 0 0 3.5px var(--g-ink);
}
.g-side .g-swatch[aria-pressed='true'] {
  box-shadow:
    0 0 0 2px var(--g-page),
    0 0 0 3.5px var(--g-ink);
}
/* Any colour: a colour wheel until one is picked */
.g-swatch--custom:not([aria-pressed='true']) {
  background: conic-gradient(from 90deg, #e5484d, #f5a524, #46a758, #3e63dd, #8e4ec6, #e5484d);
}
/* ---- the picker */
.g-brandkit {
  position: relative;
}
/* Opens above its swatch: the sidebar's kit sits at the bottom of the screen */
.g-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 12px;
  width: 232px;
  padding: 10px;
  border-radius: 18px;
  background: var(--g-card);
  box-shadow:
    0 0 0 1px var(--g-line),
    0 2px 4px oklch(0 0 0 / 0.04),
    0 12px 32px -8px oklch(0 0 0 / 0.18);
  transform-origin: bottom left;
  animation: g-picker-in 180ms cubic-bezier(0.32, 0.72, 0, 1);
}
.g-brandkit--row .g-picker {
  left: 20px;
}
.g-picker[hidden] {
  display: none;
}
@keyframes g-picker-in {
  from {
    opacity: 0;
    scale: 0.96;
  }
}
.g-picker__area {
  position: relative;
  height: 148px;
  border-radius: 8px; /* 18 − 10 */
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--hue, 220) 100% 50%));
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.08);
  cursor: crosshair;
  touch-action: none;
}
.g-picker__thumb {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--colour);
  box-shadow:
    0 0 0 2.5px #fff,
    0 0 0 3.5px oklch(0 0 0 / 0.25),
    0 2px 6px oklch(0 0 0 / 0.25);
  translate: -50% -50%;
  pointer-events: none;
}
.g-picker__area:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}
.g-picker__hue {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.08);
  cursor: pointer;
}
.g-picker__hue::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: hsl(var(--hue, 220) 100% 50%);
  box-shadow:
    0 0 0 2.5px #fff,
    0 0 0 3.5px oklch(0 0 0 / 0.25),
    0 2px 6px oklch(0 0 0 / 0.25);
}
.g-picker__hue::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: hsl(var(--hue, 220) 100% 50%);
  box-shadow:
    0 0 0 2.5px #fff,
    0 0 0 3.5px oklch(0 0 0 / 0.25),
    0 2px 6px oklch(0 0 0 / 0.25);
}
.g-picker__hue:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 3px;
}
.g-picker__hex {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--g-fill);
  font: 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--g-muted);
  cursor: text;
}
/* The colour itself, as a small chip at the start of the field */
.g-picker__hex::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 5px;
  background: var(--colour);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.12);
}
.g-picker__hex input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--g-ink);
  text-transform: uppercase;
  outline: none;
}
.g-picker__hex:has(input:focus-visible) {
  box-shadow: inset 0 0 0 1.5px var(--g-ink);
}
@media (pointer: coarse) {
  .g-picker__hex {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-picker {
    animation: none;
  }
}
.g-brandkit__corners {
  display: grid;
  gap: 8px;
}
.g-radius__top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--g-muted);
}
.g-radius__top output {
  color: var(--g-ink);
  font-variant-numeric: tabular-nums;
}
/* The slider: the track fills in ink up to the handle, and the handle is a
   small square whose own corners follow the value, square to circle. */
.g-radius {
  --fill: calc(var(--v) * 1%);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.g-radius::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--g-ink) var(--fill), var(--g-fill-strong) var(--fill));
}
.g-radius::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--g-ink) var(--fill), var(--g-fill-strong) var(--fill));
}
.g-radius::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 0;
  border-radius: calc(var(--v) * 0.1px);
  background: var(--g-card);
  box-shadow:
    inset 0 0 0 2px var(--g-ink),
    0 1px 3px oklch(0 0 0 / 0.15);
  transition: scale 150ms ease-out;
}
.g-radius::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: calc(var(--v) * 0.1px);
  background: var(--g-card);
  box-shadow:
    inset 0 0 0 2px var(--g-ink),
    0 1px 3px oklch(0 0 0 / 0.15);
}
.g-radius:active::-webkit-slider-thumb {
  scale: 1.1;
}
.g-radius:focus-visible {
  outline: none;
}
.g-radius:focus-visible::-webkit-slider-thumb {
  box-shadow:
    inset 0 0 0 2px var(--g-ink),
    0 0 0 3px var(--g-page),
    0 0 0 5px var(--g-ink);
}
.g-radius:focus-visible::-moz-range-thumb {
  box-shadow:
    inset 0 0 0 2px var(--g-ink),
    0 0 0 3px var(--g-page),
    0 0 0 5px var(--g-ink);
}
@media (hover: hover) and (pointer: fine) {
  .g-brandkit__reset:hover {
    color: var(--g-ink);
  }
}
@media (pointer: coarse) {
  .g-swatch {
    width: 32px;
    height: 32px;
  }
  .g-radius {
    height: 36px;
  }
}
.g-brandkit :focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .g-radius::-webkit-slider-thumb {
    transition: none;
  }
}

/* ------------------------------------------------- agent and questions */

.g-section-title {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.g-section-text {
  max-width: 46ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}

.g-agent {
  display: grid;
  justify-items: center;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) 16px clamp(48px, 7vw, 88px);
  text-align: center;
}
.g-agent__intro {
  display: grid;
  justify-items: center;
  gap: 14px;
}

/* The agents: a row of logo chips. Choosing one names the window below. */
.g-agents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.g-agents button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--g-card);
  box-shadow: inset 0 0 0 1px var(--g-edge);
  color: var(--g-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease, box-shadow 150ms ease;
}
.g-agents button[aria-checked='true'] {
  color: var(--g-ink);
  box-shadow: inset 0 0 0 1.5px var(--g-ink);
}
@media (hover: hover) and (pointer: fine) {
  .g-agents button:hover {
    color: var(--g-ink);
  }
}
/* Each logo is a single shape, filled with its brand's colour. Brands whose
   mark is black or white (Cursor, OpenAI, GitHub Copilot, Windsurf) take the
   text colour, so they stay visible in light and dark mode. */
.g-agents__logo {
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--logo-color, currentColor);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
:is([data-logo='claude'] .g-agents__logo, .g-agents__logo[data-brand='claude']) {
  --logo-color: #d97757;
}
:is([data-logo='googlegemini'] .g-agents__logo, .g-agents__logo[data-brand='googlegemini']) {
  --logo-color: linear-gradient(135deg, #4285f4, #9b72cb 55%, #d96570);
}
.g-agents__logo:not([style*='--logo']) {
  display: none;
}

/* The window: what it looks like when the agent does the work */
.g-win {
  display: grid;
  width: 100%;
  margin: 0;
  border-radius: 22px;
  background: var(--g-card);
  box-shadow: 0 0 0 1px var(--g-edge);
  text-align: left;
  overflow: hidden;
}
.g-win__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--g-line);
  font-size: 13px;
}
.g-win__who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.g-win__path {
  color: var(--g-muted);
  font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.g-win__body {
  display: grid;
  gap: 22px;
  padding: 24px 20px 8px;
}
.g-win__you {
  justify-self: end;
  display: grid;
  gap: 8px;
  max-width: min(100%, 520px);
  padding: 12px 16px;
  border-radius: 18px 18px 6px 18px;
  background: var(--g-fill);
}
.g-win__ask {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.g-win__full summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  font-size: 13px;
  color: var(--g-muted);
  cursor: pointer;
  list-style: none;
}
.g-win__full summary::-webkit-details-marker {
  display: none;
}
.g-win__full summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  transition: rotate 200ms var(--g-ease), margin 200ms var(--g-ease);
}
.g-win__full[open] summary::after {
  rotate: -135deg;
  margin-top: 3px;
}
.g-win__full pre {
  max-height: 16lh;
  margin: 6px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--g-card);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
  overscroll-behavior: contain;
}
.g-win__steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.5;
}
.g-win__steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.g-win__steps code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--g-fill);
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
}
.g-win__dim {
  color: var(--g-muted);
}
.g-win__tick {
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--g-ink);
}
.g-win__tick::after {
  content: '';
  position: absolute;
  left: 6.5px;
  top: 4px;
  width: 4px;
  height: 8px;
  border-right: 1.5px solid var(--g-card);
  border-bottom: 1.5px solid var(--g-card);
  rotate: 45deg;
}
.g-win__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 14px 14px 14px;
}
.g-agent .g-agent__copy {
  width: auto;
  padding-inline: 18px;
}

.g-faq {
  display: grid;
  justify-items: center;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 16px clamp(64px, 8vw, 104px);
}
.g-faq__list {
  display: grid;
  gap: 6px;
  width: 100%;
}
.g-faq__item {
  border-radius: 16px;
  background: var(--g-soft);
}
.g-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.g-faq__item summary::-webkit-details-marker {
  display: none;
}
.g-faq__item summary::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  opacity: 0.55;
  transition: rotate 200ms var(--g-ease), margin 200ms var(--g-ease);
}
.g-faq__item[open] summary::after {
  rotate: -135deg;
  margin-top: 3px;
}
.g-faq__item p {
  max-width: 62ch;
  margin: 0;
  padding: 0 20px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--g-muted);
  text-wrap: pretty;
}
.g-faq__item code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--g-fill);
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--g-ink);
}
.g-faq__action {
  margin-top: 8px;
}

/* --------------------------------------------------------------- footer */

.g-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px max(28px, env(safe-area-inset-bottom));
}
.g-foot__top {
  display: flex;
  justify-content: space-between;
  gap: 40px 64px;
  flex-wrap: wrap;
  padding: 40px 0 48px;
  border-top: 1px solid var(--g-line);
}
.g-foot__about {
  display: grid;
  align-content: start;
  gap: 12px;
  max-width: 34ch;
}
.g-foot__about p,
.g-foot__base p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}
.g-foot__nav {
  display: flex;
  gap: 32px 72px;
  flex-wrap: wrap;
}
.g-foot__col h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--g-ink);
}
.g-foot__col ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.g-foot__col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--g-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .g-foot__col a:hover {
    color: var(--g-ink);
  }
}
@media (pointer: coarse) {
  .g-foot__col a {
    min-height: 44px;
  }
}
.g-foot__base {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--g-line);
}
.g-foot__base p {
  font-size: 13px;
}
:where(#agent, #questions) {
  scroll-margin-top: 24px;
}
@media (prefers-reduced-motion: reduce) {
  .g-foot__col a {
    transition: none;
  }
}
@media (max-width: 560px) {
  .g-win__path {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-faq__item summary::after,
  .g-win__full summary::after {
    transition: none;
  }
}

/* ---------------------------------------------------------------- legal */

/* Licence, refund policy and contact: one readable column, read from
   legal/*.md by playground/legal.js. */
.g-legal {
  max-width: calc(68ch + 32px);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) 16px 96px;
}
.g-legal__title {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.g-legal__lede {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--g-ink);
  text-wrap: pretty;
}
.g-legal__updated {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--g-muted);
}
.g-legal__body {
  margin-top: 40px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--g-muted);
}
.g-legal__body h2 {
  margin: 40px 0 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--g-ink);
  text-wrap: balance;
}
.g-legal__body :is(p, ul, dl, .g-legal__table) {
  margin: 12px 0 0;
}
.g-legal__body ul {
  padding-left: 1.25em;
}
.g-legal__body li + li {
  margin-top: 6px;
}
.g-legal__body :is(strong, dt, th) {
  font-weight: 500;
  color: var(--g-ink);
}
.g-legal__body dd {
  margin: 2px 0 0;
}
.g-legal__body a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
}
.g-legal__body code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--g-fill);
  color: var(--g-ink);
}
.g-legal__table {
  overflow-x: auto;
}
.g-legal__table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14px;
}
.g-legal__table :is(th, td) {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--g-line);
}
.g-legal__table thead th {
  font-size: 13px;
  color: var(--g-muted);
}
.g-foot__col a[aria-current='page'] {
  color: var(--g-ink);
}

/* -------------------------------------------------------------- account */

.g-head__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--g-muted);
  text-decoration: none;
  transition: color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .g-head__link:hover {
    color: var(--g-ink);
  }
}
@media (pointer: coarse) {
  .g-head__link {
    min-height: 44px;
  }
}
.g-account__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 36px 0 0;
}
.g-account__facts dt {
  font-size: 13px;
  color: var(--g-muted);
}
.g-account__facts dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--g-ink);
  overflow-wrap: anywhere;
}
.g-account__key {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}
.g-account__key label {
  font-size: 14px;
  font-weight: 500;
  color: var(--g-ink);
}
.g-account__help {
  margin: 0;
  font-size: 14px;
  color: var(--g-muted);
}
.g-account__keyrow {
  display: flex;
  gap: 8px;
}
.g-account__keyrow input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--g-line);
  border-radius: 999px;
  background: var(--g-soft);
  color: var(--g-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  transition: border-color 150ms ease;
}
.g-account__keyrow input::placeholder {
  color: var(--g-muted);
  opacity: 1;
}
/* Keys are read character by character */
.g-account__keyrow input:is(#g-key) {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (pointer: fine) {
  .g-account__keyrow input {
    font-size: 15px;
  }
  .g-account__keyrow input:is(#g-key) {
    font-size: 13px;
  }
  .g-account__keyrow input:not([readonly]):hover {
    border-color: var(--g-muted);
  }
}
.g-account__keyrow input:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}
.g-account__keyrow input[aria-invalid='true'] {
  border-color: oklch(0.6 0.2 25);
}
.g-account__keyrow .g-btn {
  width: auto;
  flex: none;
  height: 44px;
  padding: 0 20px;
}
.g-account__error {
  margin: 0;
  font-size: 14px;
  color: oklch(0.6 0.2 25);
}
.g-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.g-account__actions .g-btn {
  width: auto;
  text-decoration: none;
}
.g-account__keyrow .g-account__code {
  max-width: 220px;
  font: 500 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
.g-account__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 16px;
}
.g-account__text {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--g-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
  cursor: pointer;
}
.g-account__text:disabled {
  color: var(--g-muted);
  text-decoration: none;
  cursor: default;
  font-variant-numeric: tabular-nums;
}
.g-account__text:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 4px;
  border-radius: 4px;
}
.g-account__dev {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--g-fill);
  font-size: 14px;
  color: var(--g-muted);
}
.g-account__dev code {
  color: var(--g-ink);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.g-account__fallback {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--g-line);
}
.g-account__fallback summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--g-muted);
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease;
}
.g-account__fallback summary::-webkit-details-marker {
  display: none;
}
/* A chevron that turns down when open */
.g-account__fallback summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: -45deg;
  translate: 0 -1px;
  transition: rotate 200ms var(--g-ease), translate 200ms var(--g-ease);
}
.g-account__fallback[open] summary::before {
  rotate: 45deg;
  translate: 0 -3px;
}
.g-account__fallback summary:hover,
.g-account__fallback[open] summary {
  color: var(--g-ink);
}
.g-account__fallback summary:focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 4px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .g-account__fallback summary::before {
    transition: none;
  }
}
.g-account__fallback .g-account__key {
  margin-top: 8px;
}
.g-account__error a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.g-account__note {
  margin: 32px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--g-muted);
}
.g-account__note a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
}

/* ------------------------------------------------------- search modal */

/* The page keeps its scrollbar's space while the modal locks it, so nothing
   behind slides sideways. Browsers without scrollbar-gutter get the same
   space as padding (search.js sets --g-k-gap). */
html {
  scrollbar-gutter: stable;
}
html.g-k-open {
  overflow: hidden;
  padding-right: var(--g-k-gap, 0px);
}
.g-k {
  width: min(720px, calc(var(--g-k-room, 100vw) - 48px));
  max-width: none;
  translate: var(--g-k-shift, 0px) 0;
  max-height: none;
  margin: max(16px, 8vh) auto auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--g-ink);
  overflow: visible;
}
.g-k::backdrop {
  background: oklch(0.1 0 0 / 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.g-k__panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(560px, calc(100dvh - max(16px, 8vh) - 16px));
  border-radius: 24px;
  background: var(--g-card);
  box-shadow:
    0 0 0 1px var(--g-line),
    0 24px 64px -16px oklch(0 0 0 / 0.35);
  overflow: hidden;
  /* It drops from just under the header's search */
  transform-origin: 50% 0;
}

/* The field */
.g-k__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 22px;
  min-height: 68px;
}
.g-k__glass {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--g-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.g-k__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: none;
  color: var(--g-ink);
  font: inherit;
  font-size: 19px;
  letter-spacing: -0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.g-k__input::placeholder {
  color: var(--g-muted);
}
.g-k__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.g-k__close {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
}
.g-k__close span {
  display: none;
}
.g-k kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--g-line);
  color: var(--g-muted);
  font: inherit;
  font-size: 11.5px;
}

/* Popular searches */
.g-k__chips {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.g-k__chips::-webkit-scrollbar {
  display: none;
}
.g-k__chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--g-fill);
  color: var(--g-ink);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 150ms ease;
}

/* Results */
.g-k__main {
  min-height: 0;
  padding: 4px 16px 20px;
  border-top: 1px solid var(--g-line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding: 12px;
}
.g-k__heading {
  margin: 16px 4px 8px;
  font-size: 13px;
  color: var(--g-muted);
}
.g-k__heading span {
  font-variant-numeric: tabular-nums;
}

/* Tiles: popular picks and categories */
.g-k__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
}
.g-k__tile {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border-radius: 16px;
  background: var(--g-fill);
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}
.g-k__tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.g-k__eyebrow {
  font-size: 12px;
  color: var(--g-muted);
}
.g-k__tile-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--g-ink);
}
.g-k__tile-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  color: var(--g-muted);
}

/* Rows: lists and results */
.g-k__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 100ms ease;
}
.g-k__row-text {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.g-k__row-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--g-ink);
}
.g-k__row-desc {
  overflow: hidden;
  font-size: 13px;
  color: var(--g-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-k__row-meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--g-muted);
}
.g-k mark {
  border-radius: 3px;
  background: var(--g-fill-strong);
  color: inherit;
  box-shadow: 0 0 0 1px var(--g-fill-strong);
}
.g-k__row[aria-selected='true'],
.g-k__tile[aria-selected='true'] {
  background: var(--g-fill-strong);
}
.g-k__tile[aria-selected='true'] {
  box-shadow: inset 0 0 0 1px var(--g-line);
}
.g-k__free {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--g-fill);
  color: var(--g-ink);
  font-size: 11.5px;
  font-weight: 500;
}
.g-k__lock {
  display: grid;
  color: var(--g-muted);
}
.g-k__lock svg {
  width: 14px;
  height: 14px;
}
.g-k__empty {
  padding: 48px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--g-muted);
}
.g-k__empty p {
  margin: 0 0 4px;
}
.g-k__empty p:first-child {
  color: var(--g-ink);
}

/* Footer */
.g-k__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 0 16px 0 20px;
  border-top: 1px solid var(--g-line);
  font-size: 12.5px;
  color: var(--g-muted);
}
.g-k__keys,
.g-k__keys span {
  display: flex;
  align-items: center;
}
.g-k__keys {
  gap: 16px;
}
.g-k__keys span {
  gap: 6px;
}
.g-k__keys kbd + kbd {
  margin-left: -2px;
}
.g-k__all {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--g-fill);
  color: var(--g-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .g-k__chip:hover,
  .g-k__all:hover {
    background: var(--g-fill-strong);
  }
  .g-k__close:hover kbd {
    color: var(--g-ink);
  }
}
.g-k :is(button, [role='option']):focus-visible {
  outline: 2px solid var(--g-ink);
  outline-offset: 2px;
}

/* Phones: a full sheet, the rail turns into a row of tabs */
@media (max-width: 640px) {
  .g-k {
    width: 100vw;
    margin: 0;
    translate: none;
  }
  .g-k__panel {
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .g-k__top {
    min-height: 60px;
    padding: 0 6px 0 16px;
  }
  .g-k__input {
    font-size: 17px;
  }
  .g-k__close {
    padding: 0 10px;
    color: var(--g-ink);
    font: inherit;
    font-size: 15px;
  }
  .g-k__close kbd {
    display: none;
  }
  .g-k__close span {
    display: inline;
  }
  .g-k__chips {
    padding: 0 16px 12px;
  }
  .g-k__main {
    padding: 0 8px 20px;
  }
  .g-k__tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .g-k__tile {
    min-height: 0;
  }
  .g-k__row-meta {
    display: none;
  }
  .g-k__keys {
    display: none;
  }
  .g-k__foot {
    justify-content: center;
  }
  .g-k__foot:has(.g-k__all[hidden]) {
    display: none;
  }
}

/* -------------------------------------------------------------- pricing */

.g-pricing {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 104px) 16px 96px;
  text-align: center;
}
.g-pricing__note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--g-muted);
}
.g-pricing__note a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
}
.g-pricing__title {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.g-pricing__text {
  max-width: 520px;
  margin: 0;
  text-wrap: balance;
  font-size: 17px;
  line-height: 1.5;
  color: var(--g-muted);
}
.g-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  margin-top: 26px;
  text-align: left;
}
.g-plan {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 4px;
  padding: 24px;
  border-radius: 22px;
  background: var(--g-card);
  box-shadow: 0 0 0 1px var(--g-line);
}
.g-plan[data-primary] {
  box-shadow: 0 0 0 1.5px var(--g-ink);
}
.g-plan__name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.g-plan__name span {
  margin-left: 8px;
  font-weight: 400;
  color: var(--g-muted);
}
.g-plan__later {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--g-muted);
}
.g-plan__price {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.g-plan__price span {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--g-muted);
}
.g-plan ul {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0 0 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--g-line);
  list-style: none;
  font-size: 14px;
  color: var(--g-muted);
}
/* A tick in ink before each point, so the list reads as a list */
.g-plan li {
  display: flex;
  gap: 10px;
}
.g-plan li::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: var(--g-ink);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.g-plan .g-btn:not(.g-btn--primary) {
  background: var(--g-fill);
  color: var(--g-ink);
}
/* Three across only when each card fits its points on one line; the
   sidebar takes width too, so this follows the space, not the screen. */
.g-pricing {
  container-type: inline-size;
}
@container (width < 640px) {
  .g-plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
  }
}
@media (max-width: 640px) {
  .g-bar {
    flex-wrap: wrap;
  }
  .g-bar .g-filters {
    flex-basis: 100%;
  }
}

.g-card {
  position: relative;
  /* Cards in a row share the tallest card's height; the canvas fills it so
     every preview is centred in the whole card, not just its own height. */
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 22px;
  background: var(--pg-stage-bg, var(--g-card));
  box-shadow: 0 0 0 1px var(--g-edge);
  color: var(--pg-stage-fg, var(--g-ink));
  overflow: hidden;
}
/* A card whose preview has something open that should overlap its neighbours */
.g-card--spill {
  overflow: visible;
  z-index: 5;
}
.g-canvas {
  display: grid;
  place-items: center;
  min-height: 400px;
  padding: 56px 28px;
}
/* Components fill the frame, as they would fill a theme's column. Things
   with a natural width (the stepper, the stand-in cart icon, the image) are
   centred instead. */
.g-frame {
  position: relative;
  display: grid;
  justify-items: stretch;
  max-width: 100%;
}
.g-frame > :is(ec-quantity-stepper, ec-wishlist-button, ec-size-guide, .g-cart, .g-media) {
  justify-self: center;
}
/* Country selector: its list floats out of the card when open, as a
   dropdown would on a page, above the next card. */
.g-frame .ec-loc-section {
  padding: 0;
}
.g-card:has(ec-localization) {
  overflow: visible;
}
/* Section nav: the frame stands in for a long page, scrolling inside the card */
.g-frame--scroll {
  display: block;
  height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  border-radius: 10px;
}
/* Scroll story needs a taller window to scroll in */
.g-frame--tall {
  height: 600px;
}
.g-filler {
  display: grid;
  gap: 10px;
  padding: 22px 0 26px;
  font-size: 15px;
}
.g-filler span {
  height: 10px;
  border-radius: 999px;
  background: var(--g-fill-strong);
}
.g-filler span:nth-child(3) {
  width: 86%;
}
.g-filler span:nth-child(5) {
  width: 62%;
}

/* Mega menu: the bar sits at the top of the card with room for its panel */
.g-card:has(ec-mega-menu) .g-canvas {
  place-items: start center;
  min-height: 500px;
}
.g-card:has(ec-localization[open]) {
  z-index: 5;
}

/* Stand-in for a theme's cart icon (cart drawer card) */
.g-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--g-line);
  border-radius: 999px;
  background: var(--g-card);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, scale 150ms var(--g-ease);
}
.g-cart svg {
  width: 18px;
  height: 18px;
}
.g-cart:active {
  scale: 0.96;
}
@media (hover: hover) and (pointer: fine) {
  .g-cart:hover {
    background: var(--g-fill);
  }
}
.g-cart__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--g-ink);
  color: var(--g-card);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Product image for components that swap it (data-ec-media). Images stack
   in one cell so a crossfade never changes the frame's size. */
.g-media {
  display: grid;
  width: 168px;
  aspect-ratio: 4 / 5;
  margin-bottom: var(--ec-space-5, 24px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--g-fill);
}
.g-media--card {
  position: relative;
  width: 220px;
  margin-bottom: 0;
}
.g-media img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.g-frame ec-variant-picker {
  position: relative;
}

/* In the gallery a control stays centred while its note opens: the note
   hangs below instead of pushing the control up. In a theme it flows. It
   still starts at the control's own left edge, as it would in a theme. */
.g-frame ec-quantity-stepper,
.g-frame ec-add-to-cart,
.g-frame ec-variant-picker {
  position: relative;
}
.g-frame .ec-note {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: max(100%, min(320px, 90vw));
}
/* Product options has a note per field, and Form controls stacks several
   controls: hung from the frame they'd all land on one spot, so here they
   open under their own fields, as in a theme. */
.g-frame .ec-po .ec-note,
.g-frame:has(> ec-segmented ~ ec-date-picker) .ec-note {
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
}

.g-card-meta {
  position: absolute;
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  translate: 0 4px;
  transition:
    opacity 160ms ease,
    translate 220ms var(--g-ease);
}
.g-card-meta > * {
  pointer-events: auto;
}
.g-card:is(:hover, :focus-within) .g-card-meta {
  opacity: 1;
  translate: 0 0;
}
/* Touch has no hover: keep the controls visible. */
@media (hover: none) {
  .g-card-meta {
    opacity: 1;
    translate: 0 0;
  }
}

.g-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--g-fill);
  font-size: 12.5px;
  font-weight: 500;
}
.g-card-actions {
  display: flex;
  gap: 6px;
}

.g-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--g-fill);
  cursor: pointer;
  transition:
    background-color 150ms ease,
    scale 150ms var(--g-ease);
}
.g-icon svg {
  width: 15px;
  height: 15px;
}
.g-icon:active {
  scale: 0.96;
}
.g-icon--quiet {
  background: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .g-icon:hover {
    background: var(--g-fill-strong);
  }
}

.g-error {
  color: oklch(0.62 0.19 27);
  white-space: pre-wrap;
  font-size: 12px;
}

/* -------------------------------------------------------------- segmented */

.g-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--g-fill);
}
.g-seg--wrap {
  flex-wrap: wrap;
  border-radius: 14px;
}
.g-seg button {
  border: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--g-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}
.g-seg button:is([aria-selected='true'], [aria-pressed='true']) {
  background: var(--g-card);
  color: var(--g-ink);
  box-shadow: 0 0 0 1px var(--g-line);
}

.g-btn {
  width: 100%;
  border: 0;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: scale 150ms var(--g-ease), opacity 150ms ease;
}
.g-btn:active {
  scale: 0.98;
}
.g-btn--primary {
  background: var(--g-ink);
  color: var(--g-card);
}

/* -------------------------------------------------------------- detail */

.d {
  width: min(1180px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 8px;
  border: 0;
  border-radius: 28px;
  background: var(--g-tray);
  color: var(--g-ink);
  overflow: hidden;
}
.d[open] {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 8px;
}
.d::backdrop {
  background: oklch(0 0 0 / 0.4);
  backdrop-filter: blur(2px);
  transition: opacity 160ms ease;
  animation: g-fade 220ms ease;
}
.d.is-closing::backdrop {
  opacity: 0;
}
@keyframes g-fade {
  from {
    opacity: 0;
  }
}

.d-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: 22px;
  background: var(--pg-stage-bg, var(--g-card));
  color: var(--pg-stage-fg, var(--g-ink));
  overflow: hidden;
}
.d-top {
  display: flex;
  justify-content: space-between;
  padding: 14px;
}
.d-block {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.d-block[hidden],
.d-code[hidden] {
  display: none;
}
.d-canvas {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}
.d-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
}
.d-bottom [data-d-replay] {
  position: absolute;
  right: 14px;
  bottom: 14px;
}
/* A long row of states scrolls, clear of the replay button */
.d-bottom [data-d-states] {
  max-width: calc(100% - 96px);
  overflow-x: auto;
  scrollbar-width: none;
}
.d-bottom [data-d-states] button {
  flex: none;
}

.d-side {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background: var(--g-card);
}
.d-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.d-side h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.d-desc {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--g-muted);
  text-wrap: pretty;
}
.d-side-foot {
  margin-top: auto;
}

/* ---------------------------------------------------------------- code */

.d-code {
  flex: 1;
  overflow: auto;
  padding: 0 14px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
}
.c-sec {
  min-width: 0;
  border-radius: 14px;
  background: var(--g-fill);
}
.c-sec summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.c-sec summary::-webkit-details-marker {
  display: none;
}
.c-chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: -45deg;
  opacity: 0.55;
  transition: rotate 200ms var(--g-ease);
}
.c-sec[open] .c-chev {
  rotate: 45deg;
}
.c-copy {
  margin-left: auto;
}
.c-body {
  padding: 0 14px 14px;
}
.c-body pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--g-card);
  box-shadow: 0 0 0 1px var(--g-line);
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: auto;
  tab-size: 2;
}
.c-file {
  max-height: 420px;
}
.c-note {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--g-muted);
}
.c-note a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: var(--g-line);
  text-underline-offset: 4px;
}
.c-note strong {
  color: var(--g-ink);
  font-weight: 500;
}
.c-path {
  margin: 10px 0 8px;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--g-muted);
}
.c-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
}
.c-list li + li {
  margin-top: 6px;
}

/* --------------------------------------------------------------- toast */

.g-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--g-ink);
  color: var(--g-card);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    translate 220ms var(--g-ease);
  z-index: 10;
}
.g-toast[data-show] {
  opacity: 1;
  translate: -50% 0;
}

/* -------------------------------------------------------- dev (?dev only) */

.dev {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  width: 240px;
  padding: 6px;
  border-radius: 16px;
  background: oklch(0.2 0.01 85);
  color: oklch(0.95 0 0);
  font-size: 12.5px;
}
.dev-toggle {
  border: 0;
  background: none;
  padding: 4px 8px;
  font-weight: 600;
  cursor: pointer;
}
.dev[data-collapsed] {
  width: auto;
}
.dev[data-collapsed] .dev-body {
  display: none;
}
.dev-body {
  display: grid;
  gap: 8px;
  padding: 4px 8px 8px;
}
.dev-body label {
  display: grid;
  gap: 3px;
  opacity: 0.85;
}
.dev-body select,
.dev-body button {
  font: inherit;
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid oklch(1 0 0 / 0.15);
  background: oklch(0.27 0.01 85);
  color: inherit;
}
.dev-body input[type='range'] {
  width: 100%;
}
.dev-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
}
.dev-body p {
  margin: 0;
}

/* Theme variables (dev only), with each theme's real variable names so the
   bridge is exercised as it would be inside the theme. */
body[data-pg-theme='dawn'] {
  --color-background: 255, 255, 255;
  --color-button: 18, 18, 18;
  --color-button-text: 255, 255, 255;
  --buttons-radius: 0px;
}
body[data-pg-theme='dawn-dark'] {
  --color-background: 18, 18, 18;
  --color-button: 255, 255, 255;
  --color-button-text: 18, 18, 18;
  --buttons-radius: 0px;
  --pg-stage-bg: rgb(18 18 18);
  --pg-stage-fg: rgb(255 255 255 / 0.9);
}
body[data-pg-theme='horizon'] {
  --color-background-rgb: 250 249 246;
  --color-primary-button-background: rgb(33 33 33);
  --color-primary-button-text: rgb(255 255 255);
  --style-border-radius-buttons-primary: 14px;
  --pg-stage-bg: rgb(250 249 246);
}
/* An off-white store that has opted into white cards */
body[data-pg-theme='cream-white-cards'] {
  --color-background: 244, 240, 232;
  --color-button: 33, 31, 28;
  --color-button-text: 255, 255, 255;
  --buttons-radius: 8px;
  --pg-stage-bg: rgb(244 240 232);
  --ec-surface-override: #fff;
}

/* -------------------------------------------------------------- narrow */

@media (max-width: 760px) {
  .d {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .d[open] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .d-side-foot {
    margin-top: 14px;
  }
  .g-canvas {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-card-meta,
  .g-toast,
  .c-chev {
    transition: none;
  }
  .d::backdrop {
    animation: none;
  }
}

/* Stand-in for Shopify's <model-viewer> (see render.js): the preview picture and a line saying so. */
.pg-model {
  display: grid;
  place-items: start center;
  width: 100%;
  height: 100%;
}
.pg-model span {
  margin-top: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
  font-size: 12px;
}


/* The page you're on, in the sidebar's foot */
.g-side__link[aria-current='page'] {
  color: var(--g-ink);
  font-weight: 500;
}
