/* Head of a documentation page of the pack site: the .crumbs, h1.doc-title, .doc-lead, .meta and .chip rules of the
   Unisson documentation model, selectors moved into the shadow tree, colours read from the --pack-* tokens. The host
   stands in for the model's main column: its type settings. No motion of its own. */
:host {
  display: block;
  color: var(--pack-ink);
  font:
    16px / 1.6 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-feature-settings: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  /* The host carries the page's « #titre » anchor (the outline's « Haut de page »): clear of the sticky header. */
  scroll-margin-block-start: 90px;
}
:host([hidden]) {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
h1,
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--pack-focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[part="crumbs"] {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--pack-mut);
  font:
    600 12.5px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
[part="crumbs"] li + li::before {
  content: "/";
  margin-inline-end: 6px;
  color: var(--pack-line2);
}
/* The base sheet draws every anchor as a 44 px flex box with an offset underline: the model's crumbs are plain text. */
[part="crumb"] {
  display: inline;
  min-block-size: 0;
  color: var(--pack-mut);
  text-decoration: none;
  text-underline-offset: auto;
}
[part="crumb"]:hover {
  color: var(--pack-ink);
  text-decoration: underline;
}
/* The base sheet paints every [aria-current] as a selected control: the model's current crumb is plain text. */
[part="current"] {
  background: none;
}
[part="heading"] {
  margin-block-start: 18px;
  inline-size: fit-content;
  padding-block-end: 0.06em;
  font:
    800 clamp(40px, 5vw, 60px) / 1.05 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.045em;
  background: linear-gradient(100deg, var(--pack-wm1) 5%, var(--pack-wm2) 50%, var(--pack-wm3) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[part="lead"] {
  margin-block-start: 14px;
  /* 62ch as in documentation.html; a layout may set another measure (the catalogue model's is 66ch). */
  max-inline-size: var(--pack-lead-measure, 62ch);
  color: var(--pack-mut);
  font-size: 18px;
}
[part="chips"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 18px;
}
[part~="chip"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 28px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--pack-line2);
  background: var(--pack-panel2);
  color: var(--pack-mut);
  font:
    600 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
[part="dot"] {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--pack-c3);
  box-shadow: 0 0 10px var(--pack-c3);
}
/* The offer chip (« + »): violet ring, ink text and a violet dot, as .chip.pro of the Studio and Gabarits pages. */
[part~="pro"] {
  border-color: var(--pack-c2);
  color: var(--pack-ink);
}
[part~="pro"] [part="dot"] {
  background: var(--pack-c2);
  box-shadow: 0 0 10px var(--pack-c2);
}
/* On a wide page the model's .chip.pro also takes its .pro badge rules: bold ink text, 24 px high, 10 px padding. */
.wide [part~="pro"] {
  min-block-size: 24px;
  padding: 0 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
/* Callouts of the default slot (.head .callouts): two equal columns, one under 1100 px. */
[part="callouts"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-block-start: 6px;
}
/* The wide variant, a page head outside the documentation layout: the model's .container.wide.head. */
.wide {
  inline-size: min(1408px, 100% - 32px);
  margin-inline: auto;
  padding-block-start: 36px;
}
.wide [part="lead"] {
  max-inline-size: 68ch;
}
/* layout="row": title and lead on the left, the chips at the bottom right, as .head-row of the Studio pages. */
[part="row"] {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
}
/* With an aside: the model's Playground .head, texts then the callout aligned on their last line, 460 px at most. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 40px;
  align-items: end;
}
[part="main"] {
  min-inline-size: 0;
}
[part="aside"] {
  max-inline-size: 460px;
  min-inline-size: 0;
}
/* The Playground model's callout has no gap between its heading and its text (read by bythium-pack-callout). */
::slotted([slot="aside"]) {
  --pack-callout-text-gap: 0;
}
@media (max-width: 1099px) {
  [part="callouts"] {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  [part="aside"] {
    max-inline-size: none;
  }
  /* The model's .head .callout has no top margin: the callout's own 22 px goes, the row gap stays. */
  ::slotted([slot="aside"]) {
    margin-block-start: -22px;
  }
}
@media (max-width: 700px) {
  [part="lead"] {
    font-size: 17px;
  }
}

/* Studio variant: the .shead, h1.s-title, .s-tag, .s-lead, .chip.pro, .chip.target and .side-note rules of the
   Unisson agent model. The head is its own centred column of 1200 px, the note beside it. */
.studio {
  inline-size: min(1200px, 100% - 32px);
  margin-inline: auto;
  padding-block-start: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: end;
}
.studio [part="heading"] {
  margin-block-start: 16px;
  padding-block-end: 0.08em;
  font:
    800 clamp(52px, 7vw, 96px) / 1 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.055em;
}
[part="tagline"] {
  margin-block-start: 8px;
  max-inline-size: 34ch;
  font:
    700 clamp(22px, 2.8vw, 30px) / 1.25 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  letter-spacing: -0.02em;
}
[part="accent"] {
  font-style: normal;
  color: var(--pack-link);
}
.studio [part="lead"] {
  margin-block-start: 12px;
  font-size: 17px;
}
[part~="pro-chip"] {
  color: var(--pack-ink);
  border-color: transparent;
  background:
    linear-gradient(var(--pack-bg), var(--pack-bg)) padding-box,
    linear-gradient(120deg, var(--pack-c1), var(--pack-c2), var(--pack-c3)) border-box;
}
[part~="target-chip"] {
  color: var(--pack-ink);
  border: 1px dashed var(--pack-c4);
}
[part="note"] {
  max-inline-size: 340px;
}
@media (max-width: 1099px) {
  .studio {
    grid-template-columns: 1fr;
  }
  [part="note"] {
    max-inline-size: none;
  }
}
@media (max-width: 700px) {
  .studio {
    padding-block-start: 28px;
  }
}

/* Aurora (backdrop="aurora"): the home's three lights and dotted grain, fixed behind the whole page. */
.aurora,
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.aurora {
  overflow: hidden;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.aurora i:nth-child(1) {
  inline-size: 70vmax;
  block-size: 70vmax;
  inset-inline-start: -20vmax;
  inset-block-start: -30vmax;
  background: radial-gradient(closest-side, var(--pack-a1), transparent 70%);
}
.aurora i:nth-child(2) {
  inline-size: 80vmax;
  block-size: 80vmax;
  inset-inline-end: -30vmax;
  inset-block-start: -10vmax;
  background: radial-gradient(closest-side, var(--pack-a2), transparent 70%);
}
.aurora i:nth-child(3) {
  inline-size: 70vmax;
  block-size: 70vmax;
  inset-inline-start: 20vmax;
  inset-block-end: -45vmax;
  background: radial-gradient(closest-side, var(--pack-a3), transparent 70%);
}
.grain {
  opacity: 0.5;
  background-image: radial-gradient(var(--pack-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, var(--pack-ink), transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 20%, var(--pack-ink), transparent 70%);
}
@keyframes drift1 {
  to {
    transform: translate3d(8vmax, 6vmax, 0) scale(1.1);
  }
}
@keyframes drift2 {
  to {
    transform: translate3d(-9vmax, 8vmax, 0) scale(0.92);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .aurora i:nth-child(1) {
    animation: drift1 26s ease-in-out infinite alternate;
  }
  .aurora i:nth-child(2) {
    animation: drift2 32s ease-in-out infinite alternate;
  }
  .aurora i:nth-child(3) {
    animation: drift1 38s ease-in-out infinite alternate-reverse;
  }
}
/* Forced colours: the gradient text would vanish, the heading takes the text colour; the dot keeps a visible fill. */
@media (forced-colors: active) {
  .aurora,
  .grain {
    display: none;
  }
  [part="heading"] {
    background: none;
    color: CanvasText;
  }
  [part="dot"] {
    forced-color-adjust: none;
    background: CanvasText;
    box-shadow: none;
  }
}
