/* Sora is the wordmark face: 800 for the home-page lockup, 500 for inline mentions. Material loads the text and code fonts itself. */
@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;800&display=swap");

/* Slate text from the pyAUSAXS GUI palette (pyausaxs/gui/core/palette.py), with the logo's gold as the single
   accent: links, buttons, headings, rules and list markers. */
:root,
[data-md-color-scheme="default"] {
  --ausaxs-slate: #1f2733;
  --ausaxs-gold: #b07c12;
  --ausaxs-gold-text: #8a600c;               /* darker, for gold text and links on white */
  --ausaxs-gold-hover: #b07c12;
  --ausaxs-gold-line: rgba(176, 124, 18, 0.35);
  --ausaxs-gold-soft: #fbf3e0;
  --ausaxs-code-bg: #eaeef3;
  --ausaxs-code-border: #d3dae3;
  --ausaxs-code-fg: #1f2733;
  --ausaxs-red: #b0524a;                     /* muted red, for "important" callouts */
  --ausaxs-red-soft: rgba(176, 82, 74, 0.1);

  --md-primary-fg-color: var(--ausaxs-slate);
  --md-primary-fg-color--light: #3a4556;
  --md-primary-fg-color--dark: #141a22;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--ausaxs-gold-hover);
  --md-accent-fg-color--transparent: rgba(176, 124, 18, 0.1);
  --md-typeset-a-color: var(--ausaxs-gold-text);
}

[data-md-color-scheme="slate"] {
  --ausaxs-gold: #e3b341;
  --ausaxs-gold-text: #e3b341;
  --ausaxs-gold-hover: #f2cf72;
  --ausaxs-gold-line: rgba(227, 179, 65, 0.35);
  --ausaxs-gold-soft: rgba(227, 179, 65, 0.12);
  --ausaxs-code-bg: #252d3a;
  --ausaxs-code-border: #3a4556;
  --ausaxs-code-fg: #e6edf3;
  --ausaxs-red: #d9776e;
  --ausaxs-red-soft: rgba(217, 119, 110, 0.12);

  --md-primary-fg-color: #161b22;
  --md-primary-fg-color--light: #2a313c;
  --md-primary-fg-color--dark: #0d1117;
  --md-accent-fg-color: var(--ausaxs-gold-hover);
  --md-accent-fg-color--transparent: rgba(227, 179, 65, 0.12);
  --md-typeset-a-color: var(--ausaxs-gold-text);
  --md-default-bg-color: #0f141b;
  --md-code-bg-color: #161c25;
}

/* The tab bar sits in the header colour, so the header and tabs read as one band. */
.md-tabs {
  background-color: var(--md-primary-fg-color);
}

.md-typeset h1 {
  font-weight: 700;
  color: var(--md-default-fg-color);
  letter-spacing: -0.01em;
}

/* A short gold bar under the page title. The home page wordmark is also an h1, so it is left out. */
.md-typeset h1:not(.ausaxs-wordmark)::after {
  content: "";
  display: block;
  width: 3rem;
  height: 0.2rem;
  margin-top: 0.5rem;
  border-radius: 0.1rem;
  background-color: var(--ausaxs-gold);
}

/* A permalink to the top of the page is of no use, and on long titles it wraps and pushes the bar down a line. */
.md-typeset h1 .headerlink {
  display: none;
}

.md-typeset h2 {
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--ausaxs-gold-line);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Headings keep the text colour; gold is reserved for accents (h1 bar, h2 rule) so inline code in a heading
   does not clash with it. */
.md-typeset h3 {
  font-weight: 600;
  color: var(--md-default-fg-color);
}

/* A gold strip along the top edge of the sticky header, drawn as a background so the header keeps its height. */
.md-header {
  background-image: linear-gradient(var(--ausaxs-gold), var(--ausaxs-gold));
  background-size: 100% 0.15rem;
  background-repeat: no-repeat;
}

.md-typeset ul li::marker,
.md-typeset ol li::marker {
  color: var(--ausaxs-gold);
}

.md-typeset ol li::marker {
  font-weight: 700;
}

/* Table headers get a gold wash and a gold rule beneath them. */
.md-typeset table:not([class]) th {
  background-color: var(--ausaxs-gold-soft);
  border-bottom: 2px solid var(--ausaxs-gold-line);
}

.md-typeset blockquote {
  border-left-color: var(--ausaxs-gold);
}

/* Material's "question" admonition is green, and a plain <details> dropdown (e.g. the examples on the rigid-body
   page) is the blue of a note; recolour both gold to match the theme. */
.md-typeset .admonition.question,
.md-typeset details.question,
.md-typeset details:not([class]) {
  border-color: var(--ausaxs-gold);
}

.md-typeset .admonition.question:focus-within,
.md-typeset details.question:focus-within,
.md-typeset details:not([class]):focus-within {
  box-shadow: 0 0 0 0.2rem var(--md-accent-fg-color--transparent);
}

.md-typeset .question > .admonition-title,
.md-typeset .question > summary,
.md-typeset details:not([class]) > summary {
  background-color: var(--ausaxs-gold-soft);
}

.md-typeset .question > .admonition-title::before,
.md-typeset .question > summary::before,
.md-typeset details:not([class]) > summary::before {
  background-color: var(--ausaxs-gold);
}

.md-typeset .question > .admonition-title::after,
.md-typeset .question > summary::after,
.md-typeset details:not([class]) > summary::after {
  color: var(--ausaxs-gold);
}

/* GitHub's "[!IMPORTANT]" callout has no Material type of its own, so it would fall back to the blue of a note.
   Give it a muted red and a circled exclamation mark. */
.md-typeset .admonition.important {
  border-color: var(--ausaxs-red);
}

.md-typeset .important > .admonition-title {
  background-color: var(--ausaxs-red-soft);
}

.md-typeset .important > .admonition-title::before {
  background-color: var(--ausaxs-red);
  -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-1 3h2v7h-2Zm0 9h2v2h-2Z"/></svg>');
          mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-1 3h2v7h-2Zm0 9h2v2h-2Z"/></svg>');
}

/* Inline code: Material's default background is barely distinguishable from the page in either scheme,
   so give it a stronger fill and a hairline outline. Code blocks keep Material's styling. */
.md-typeset :not(pre) > code {
  color: var(--ausaxs-code-fg);
  background-color: var(--ausaxs-code-bg);
  box-shadow: inset 0 0 0 1px var(--ausaxs-code-border);
  border-radius: 0.2rem;
}

/* Inline code inside a link keeps the link colour, so it still reads as clickable. */
.md-typeset a > code {
  color: inherit;
}

/* ---------- Home page ---------- */

.ausaxs-hero {
  margin: 0 0 2.5rem;
  padding: 2.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--ausaxs-gold-line);
}

.ausaxs-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  margin-bottom: 1.4rem;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
}

.ausaxs-lockup .ausaxs-mark {
  width: 1.3em;
  height: auto;
  overflow: visible;
}

/* Logo intro on page load: the beam slides in, strikes the particle, and the wavefronts follow one by one.
   The end state of every keyframe is the static logo, so nothing changes once the animation has run. */
.ausaxs-mark {
  --ausaxs-beam: #1f2733;
  --intro-beam: 0.45s;   /* beam travel time; the particle is struck when it ends */
  --intro-wave: 0.5s;    /* delay between successive wavefronts */
}

[data-md-color-scheme="slate"] .ausaxs-mark {
  --ausaxs-beam: #ffffff;
}

.ausaxs-mark .beam {
  stroke: var(--ausaxs-beam);
}

.ausaxs-mark .wave {
  stroke: var(--ausaxs-gold);
}

/* Transforms are in the SVG's user units, scaled about the particle centre (19, 32). */
.ausaxs-mark .particle,
.ausaxs-mark .wave {
  transform-box: view-box;
  transform-origin: 19px 32px;
}

@media (prefers-reduced-motion: no-preference) {
  .ausaxs-mark .beam {
    animation: ausaxs-beam-in var(--intro-beam) cubic-bezier(0.3, 0, 0.6, 1) both;
  }

  /* One strike per wavefront, each just ahead of its wave. No fill mode: a backwards fill would hold
     the later strikes at rest and mask the earlier ones, and the keyframes start and end at rest anyway. */
  .ausaxs-mark .particle {
    animation:
      ausaxs-strike 0.3s ease-out var(--intro-beam),
      ausaxs-strike 0.3s ease-out calc(var(--intro-beam) + var(--intro-wave)),
      ausaxs-strike 0.3s ease-out calc(var(--intro-beam) + 2 * var(--intro-wave));
  }

  .ausaxs-mark .wave {
    animation: ausaxs-wave-out 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .ausaxs-mark .wave-1 { animation-delay: calc(var(--intro-beam) + 0.1s); }
  .ausaxs-mark .wave-2 { animation-delay: calc(var(--intro-beam) + 0.1s + var(--intro-wave)); }
  .ausaxs-mark .wave-3 { animation-delay: calc(var(--intro-beam) + 0.1s + 2 * var(--intro-wave)); }
}

/* The keyframes leave the final opacity out, so each element settles on its own opacity attribute. */
@keyframes ausaxs-beam-in {
  from { transform: translateX(-9px); opacity: 0; }
}

@keyframes ausaxs-strike {
  40% { transform: scale(1.07); }
}

@keyframes ausaxs-wave-out {
  from { transform: scale(0.8); opacity: 0; }
}

.md-typeset .ausaxs-wordmark {
  margin: 0;
  font-family: "Sora", var(--md-text-font-family), sans-serif;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--md-default-fg-color);
}

.md-typeset .ausaxs-wordmark .au,
.md-typeset .ausaxs-name .au {
  color: var(--ausaxs-gold);
}

/* The wordmark inline in running text, for a few highlighted mentions only:
   <span class="ausaxs-name"><span class="au">AU</span>SAXS</span> */
.md-typeset .ausaxs-name {
  font-family: "Sora", var(--md-text-font-family), sans-serif;
  font-weight: 500;                          /* lighter than the 800 logo, so it doesn't shout in running text */
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.ausaxs-hero .ausaxs-tagline {
  max-width: 38rem;
  margin: 0 auto 1.6rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
}

.ausaxs-hero .md-button {
  margin: 0.3rem 0.25rem;
}

/* The logo's bright gold with a slate label, the same in both schemes; white on gold is too faint to read. */
.md-typeset .md-button--primary {
  color: #1f2733;
  background-color: #e3b341;
  border-color: #e3b341;
}

.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  color: #1f2733;
  background-color: #d09f2a;
  border-color: #d09f2a;
}

/* Material draws outline buttons in the header colour, which vanishes on the dark background. */
.md-typeset .md-button:not(.md-button--primary) {
  color: var(--md-default-fg-color);
  border-color: var(--md-default-fg-color--lighter);
}

.md-typeset .md-button:not(.md-button--primary):hover,
.md-typeset .md-button:not(.md-button--primary):focus {
  color: var(--ausaxs-gold-text);
  background-color: transparent;
  border-color: var(--ausaxs-gold);
}

/* Card grid: a quiet border, lifted on hover. */
.md-typeset .grid.cards > ul > li {
  position: relative;
  border-radius: 0.5rem;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

/* Whole card is clickable: the title link stretches an overlay over the card.
   Other links in the card body are lifted above the overlay so they still work. */
.md-typeset .grid.cards > ul > li > p:first-child a {
  color: inherit;
}

.md-typeset .grid.cards > ul > li > p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.md-typeset .grid.cards > ul > li > p:not(:first-child) a {
  position: relative;
  z-index: 1;
}

.md-typeset .grid.cards > ul > li:has(> p:first-child a):hover > p:first-child a {
  color: var(--ausaxs-gold);
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--ausaxs-gold);
  box-shadow: 0 0.4rem 1.2rem rgba(31, 39, 51, 0.08);
  transform: translateY(-2px);
}

.md-typeset .grid.cards .lg {
  color: var(--ausaxs-gold);
}

.md-typeset .grid.cards hr {
  border-bottom-color: var(--ausaxs-gold-line);
}

.md-typeset .grid.cards code {
  font-size: 0.75em;
}

/* Two-column card grid, for card counts that would leave an orphan in three columns. */
.md-typeset .grid.ausaxs-two-col {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

/* Note callouts in the gold accent instead of Material's default blue. */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--ausaxs-gold);
}

.md-typeset .admonition.note:focus-within,
.md-typeset details.note:focus-within {
  box-shadow: 0 0 0 0.2rem var(--ausaxs-gold-soft);
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: var(--ausaxs-gold-soft);
}

.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: var(--ausaxs-gold);
}

/* ---------- Getting-started banner (overrides/partials/journey.html) ---------- */

/* One segmented bar: square joins between the steps, rounded only at the two ends, and a small gold
   triangle on each divider pointing to the next step. */
.md-typeset .ausaxs-journey {
  margin: 0 0 1.6rem;
}

.md-typeset .ausaxs-journey--bottom {
  margin: 2.5rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ausaxs-gold-line);
}

.md-typeset .ausaxs-journey__label {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ausaxs-gold-text);
}

.md-typeset nav.ausaxs-journey ol {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The step class lifts these above Material's `[dir=ltr] .md-typeset ol li` indent. */
.md-typeset .ausaxs-journey li.ausaxs-journey__step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

/* Neighbouring steps overlap by their border width, so each divider is a single line. */
.md-typeset .ausaxs-journey li.ausaxs-journey__step + li {
  margin-left: -1px;
}

.md-typeset .ausaxs-journey a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0;
  color: var(--md-default-fg-color);
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  transition: border-color 150ms, color 150ms, background-color 150ms;
}

.md-typeset .ausaxs-journey li:first-child a {
  border-radius: 0.5rem 0 0 0.5rem;
}

.md-typeset .ausaxs-journey li:last-child a {
  border-radius: 0 0.5rem 0.5rem 0;
}

/* A gold step border has to sit on top of the grey border of the step next to it. */
.md-typeset .ausaxs-journey .is-current,
.md-typeset .ausaxs-journey li:hover {
  z-index: 1;
}

.md-typeset .ausaxs-journey a:hover,
.md-typeset .ausaxs-journey a:focus-visible {
  border-color: var(--ausaxs-gold);
  color: var(--ausaxs-gold-text);
}

/* The "|>" on the divider after the current step: a small triangle pointing on to the next step. */
.md-typeset .ausaxs-journey li.is-current:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -0.32rem;
  border-top: 0.28rem solid transparent;
  border-bottom: 0.28rem solid transparent;
  border-left: 0.32rem solid var(--ausaxs-gold);
  transform: translateY(-50%);
}

.md-typeset .ausaxs-journey__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  /* The ring is an inset shadow, not a border: the four sides of a border are painted separately, and with a
     translucent colour their overlaps show as darker seams at the top, bottom, left and right. */
  box-shadow: inset 0 0 0 1.5px var(--ausaxs-gold-line);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ausaxs-gold-text);
}

.md-typeset .ausaxs-journey__text {
  display: flex;
  flex-direction: column;
}

.md-typeset .ausaxs-journey__title {
  font-weight: 600;
}

.md-typeset .ausaxs-journey__opt {
  font-size: 0.6rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .ausaxs-journey .is-done .ausaxs-journey__num {
  box-shadow: inset 0 0 0 1.5px var(--ausaxs-gold);
  background-color: var(--ausaxs-gold-soft);
}

/* The current step: gold wash and a filled number, the logo's bright gold with a slate label as on the buttons. */
.md-typeset .ausaxs-journey .is-current a {
  border-color: var(--ausaxs-gold);
  background-color: var(--ausaxs-gold-soft);
}

.md-typeset .ausaxs-journey .is-current .ausaxs-journey__num {
  box-shadow: none;
  background-color: #e3b341;
  color: #1f2733;
}

.md-typeset .ausaxs-journey .is-current .ausaxs-journey__title {
  font-weight: 700;
}

/* On narrow screens four steps do not fit on one line: they go two by two as separate rounded tiles,
   without the triangles, which would point across the wrap. */
@media screen and (max-width: 44.9375em) {
  .md-typeset nav.ausaxs-journey ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .md-typeset .ausaxs-journey li.ausaxs-journey__step + li {
    margin-left: 0;
  }

  .md-typeset .ausaxs-journey li a,
  .md-typeset .ausaxs-journey li:first-child a,
  .md-typeset .ausaxs-journey li:last-child a {
    justify-content: flex-start;
    border-radius: 0.5rem;
  }

  .md-typeset .ausaxs-journey li.is-current::after {
    display: none;
  }
}

/* ---------- Application switcher (second row of overrides/partials/journey.html) ---------- */

/* Pulled up under the banner, so the two read as one unit: the step, then where in the step you are. */
.md-typeset .ausaxs-journey--top:has(+ .ausaxs-appbar) {
  margin-bottom: 0.55rem;
}

.md-typeset .ausaxs-appbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin: 0 0 1.6rem;
  font-size: 0.68rem;
  line-height: 1.3;
}

.md-typeset .ausaxs-appbar__all {
  padding-right: 0.7rem;
  border-right: 1px solid var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color--light);
  font-weight: 600;
  white-space: nowrap;
}

.md-typeset .ausaxs-appbar__all:hover,
.md-typeset .ausaxs-appbar__all:focus-visible {
  color: var(--ausaxs-gold-text);
}

.md-typeset nav.ausaxs-appbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-typeset .ausaxs-appbar ul li {
  margin: 0;
}

.md-typeset .ausaxs-appbar ul a {
  display: block;
  padding: 0.22rem 0.7rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 1rem;
  color: var(--md-default-fg-color--light);
  text-align: center;
  white-space: nowrap;
  transition: border-color 150ms, color 150ms;
}

/* Invisible bold copy of the label: every chip is as wide as its bold (current) state, so highlighting a
   chip never changes its width and cannot reflow the chips between rows. */
.md-typeset .ausaxs-appbar ul a::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.md-typeset .ausaxs-appbar ul a:hover,
.md-typeset .ausaxs-appbar ul a:focus-visible {
  border-color: var(--ausaxs-gold);
  color: var(--ausaxs-gold-text);
}

.md-typeset .ausaxs-appbar ul a.is-current {
  border-color: var(--ausaxs-gold);
  background-color: var(--ausaxs-gold-soft);
  color: var(--md-default-fg-color);
  font-weight: 700;
}

/* ---------- Applications landing page (applications.md) ---------- */

.md-typeset .ausaxs-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

/* Each tile: a quiet frame. On hover a gold bar grows along the top edge and the illustration plays, and the
   whole tile is a link through the title's overlay. */
.md-typeset .ausaxs-app {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 1rem;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.6rem;
  background-color: var(--md-default-bg-color);
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

.md-typeset .ausaxs-app::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.2rem;
  background-color: var(--ausaxs-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 250ms ease-out;
}

.md-typeset .ausaxs-app:hover,
.md-typeset .ausaxs-app:focus-within {
  border-color: var(--ausaxs-gold);
  box-shadow: 0 0.4rem 1.2rem rgba(31, 39, 51, 0.08);
  transform: translateY(-2px);
}

.md-typeset .ausaxs-app:hover::before,
.md-typeset .ausaxs-app:focus-within::before {
  transform: scaleX(1);
}

.md-typeset .ausaxs-app p {
  margin: 0 0 0.6rem;
}

/* The illustration panel at the top of each tile (overrides/.icons/ausaxs-art/*.svg, inlined through the emoji
   extension so CSS reaches inside). Each plays a short animation when its tile is hovered or focused; at rest it
   shows the final frame, and with reduced motion it never moves. */
.md-typeset .ausaxs-app p:has(> .ausaxs-app__art) {
  margin: -0.2rem -0.35rem 0.8rem;
}

.md-typeset .ausaxs-app__art {
  display: block;
  padding: 0.5rem 0.4rem 0.3rem;
  border-radius: 0.45rem;
  background-color: var(--ausaxs-gold-soft);
  box-shadow: inset 0 0 0 1px var(--ausaxs-gold-line);
}

.md-typeset .ausaxs-app__art .twemoji {
  display: block;
  width: 100%;
  height: auto;
}

.md-typeset .ausaxs-app__art svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}

.ausaxs-app__art .ax {
  fill: none;
  stroke: var(--md-default-fg-color--lighter);
  stroke-width: 1;
}

.ausaxs-app__art .ln {
  fill: none;
  stroke: var(--ausaxs-gold);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.ausaxs-app__art .pt {
  fill: var(--md-default-fg-color--light);
}

.ausaxs-app__art .facet {
  stroke: #fff1b8;
  stroke-width: 0.5;
  stroke-linejoin: round;
  stroke-opacity: 0.6;
}

.ausaxs-app__art .beam {
  stroke: var(--ausaxs-beam, #1f2733);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.55;
}

[data-md-color-scheme="slate"] .ausaxs-app__art .beam {
  stroke: #ffffff;
}

.ausaxs-app__art .ray {
  stroke: var(--ausaxs-gold);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.75;
}

.ausaxs-app__art .peak {
  fill: var(--ausaxs-gold);
  stroke: var(--md-default-bg-color);
  stroke-width: 1;
  opacity: 0;
}

.ausaxs-app__art .fan-1 { opacity: 0.6; }
.ausaxs-app__art .fan-2 { opacity: 0.32; }

.ausaxs-app__art .area {
  fill: var(--ausaxs-gold);
  opacity: 0.14;
}

.ausaxs-app__art .link {
  fill: none;
  stroke: var(--md-default-fg-color--light);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.ausaxs-app__art .box {
  stroke: var(--md-default-fg-color--light);
  stroke-width: 1.3;
  stroke-linecap: round;
}

.ausaxs-app__art .box.back {
  stroke: var(--md-default-fg-color--lighter);
  stroke-dasharray: 3 3;
}

.ausaxs-app__art .ghost {
  fill: none;
  stroke: var(--ausaxs-gold);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
}

.ausaxs-app__art .rise,
.ausaxs-app__art .fan,
.ausaxs-app__art .em-blob,
.ausaxs-app__art .rb-all,
.ausaxs-app__art .rb-h1,
.ausaxs-app__art .rb-h2 {
  transform-box: view-box;
}

/* Rigid body: the hinges sit in the middle of the two linkers, and the whole chain sways a little about its centre. */
.ausaxs-app__art .rb-all { transform-origin: 120px 40px; }
.ausaxs-app__art .rb-h1  { transform-origin: 88px 40px; }
.ausaxs-app__art .rb-h2  { transform-origin: 152px 40px; }
.ausaxs-app__art .rise   { transform-origin: 0 68px; }

/* Every illustration moves between a rest pose and a hover pose with transitions, so it plays forward when the
   tile is hovered or focused, plays back when the pointer leaves, and turns round smoothly if it leaves halfway.
     SAXS:           the curve draws in over a faint copy of itself, and undraws on exit.
     Crystals:       a beam strikes the crystal, which lights up and sends diffracted rays to the peaks of its curve;
                     on exit the rays retract before the beam.
     SANS:           the contrast series lie on top of each other at rest and fan out to their own levels.
     Powder:         the peaks grow from a low pattern to their full height.
     Rigid body:     the chain bends at its two linkers and straightens again.
     EM:             the blob shrinks with the rising threshold, leaving a dashed outline of where it started. */
.ausaxs-app__art .ghost-ln {
  opacity: 0.28;
}

.ausaxs-app__art .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.ausaxs-app__art .fan {
  transform: translateY(var(--dy));
}

.ausaxs-app__art .rise {
  transform: scaleY(0.3);
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .draw,
.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .beam,
.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .ray {
  stroke-dashoffset: 0;
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .peak {
  opacity: 1;
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .stone {
  filter: brightness(1.08) drop-shadow(0 0 2.5px rgba(227, 179, 65, 0.85));
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .fan,
.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .rise {
  transform: none;
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .em-blob {
  transform: scale(0.5);
}

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .rb-all { transform: rotate(-3deg); }
.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .rb-h1  { transform: rotate(24deg); }
.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .rb-h2  { transform: rotate(-38deg); }

.ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .ghost {
  opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
  .ausaxs-app__art .draw {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ausaxs-app__art .fan,
  .ausaxs-app__art .rise {
    transition: transform 0.9s cubic-bezier(0.3, 0, 0.2, 1);
  }

  .ausaxs-app__art .fan-2 {
    transition-delay: 0.08s;
  }

  /* Crystals. The delays in the rest state time the exit (rays, then glow, then beam); the delays in the
     hover state time the entry (beam, then glow, then rays, then peaks). */
  .ausaxs-app__art .beam {
    transition: stroke-dashoffset 0.4s ease-in 0.35s;
  }

  .ausaxs-app__art .stone {
    transition: filter 0.4s ease-out 0.25s;
  }

  .ausaxs-app__art .ray {
    transition: stroke-dashoffset 0.35s ease-in;
  }

  .ausaxs-app__art .peak {
    transition: opacity 0.2s;
  }

  .ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .beam {
    transition-delay: 0s;
  }

  .ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .stone {
    transition-delay: 0.35s;
  }

  .ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .ray {
    transition: stroke-dashoffset 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
    transition-delay: calc(0.5s + var(--i) * 0.07s);
  }

  .ausaxs-app:is(:hover, :focus-within) .ausaxs-app__art .peak {
    transition-delay: calc(0.85s + var(--i) * 0.07s);
  }

  .ausaxs-app__art .em-blob {
    transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ausaxs-app__art .ghost {
    transition: opacity 0.4s;
  }

  /* The outer joint swings a little after the inner one, so the chain bends like a chain. */
  .ausaxs-app__art .rb-all,
  .ausaxs-app__art .rb-h1 {
    transition: transform 1.1s cubic-bezier(0.45, 0, 0.25, 1);
  }

  .ausaxs-app__art .rb-h2 {
    transition: transform 1.1s cubic-bezier(0.45, 0, 0.25, 1) 0.12s;
  }
}

/* The title link stretches an overlay over the whole tile. */
.md-typeset a.ausaxs-app__title {
  color: var(--md-default-fg-color);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.md-typeset a.ausaxs-app__title::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.md-typeset .ausaxs-app:hover a.ausaxs-app__title {
  color: var(--ausaxs-gold-text);
}

.md-typeset .ausaxs-app p:has(> .ausaxs-app__title) {
  margin-bottom: 0.3rem;
}

/* On narrow screens the chips wrap below the "All applications" link, so the divider after it is dropped. */
@media screen and (max-width: 44.9375em) {
  .md-typeset .ausaxs-appbar__all {
    flex-basis: 100%;
    padding-right: 0;
    border-right: none;
  }
}

/* One word of inline code, e.g. an argument like --threads, which must not break at its hyphens (hooks/nowrap_code.py). */
.md-typeset .ausaxs-nowrap {
  white-space: nowrap;
}

/* The command list on the documentation overview: a table whose rows are each one large link, with the command in
   gold and a short description. Hovering a row tints it and slides in an arrow. Below 30em the description wraps
   under the command. */
.md-typeset .ausaxs-cmds {
  margin: 1em 0;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.4rem;
  font-size: 0.75rem;
}

.md-typeset .ausaxs-cmds__head,
.md-typeset .ausaxs-cmd {
  display: grid;
  grid-template-columns: 10.5rem 1fr 1.2rem;
  column-gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
}

.md-typeset .ausaxs-cmds__head {
  padding-block: 0.6rem;
  font-size: 0.64rem;
  font-weight: 700;
  background-color: var(--ausaxs-gold-soft);
  border-bottom: 2px solid var(--ausaxs-gold-line);
}

.md-typeset .ausaxs-cmds p {
  margin: 0;
}

.md-typeset .ausaxs-cmds p + p .ausaxs-cmd {
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .ausaxs-cmd {
  color: var(--md-default-fg-color);
  transition: background-color 150ms, box-shadow 150ms;
}

.md-typeset .ausaxs-cmd::after {
  content: "→";
  color: var(--ausaxs-gold);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-0.3rem);
  transition: opacity 150ms, transform 150ms;
}

.md-typeset .ausaxs-cmd:hover,
.md-typeset .ausaxs-cmd:focus-visible {
  color: var(--md-default-fg-color);
  background-color: var(--ausaxs-gold-soft);
  box-shadow: inset 3px 0 0 var(--ausaxs-gold);
}

.md-typeset .ausaxs-cmd:hover::after,
.md-typeset .ausaxs-cmd:focus-visible::after {
  opacity: 1;
  transform: none;
}

.md-typeset .ausaxs-cmd > code {
  justify-self: start;
  padding: 0.15em 0.45em;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ausaxs-gold-text);
}

.md-typeset .ausaxs-cmd__desc code {
  font-size: 0.85em;
}

@media screen and (max-width: 30em) {
  .md-typeset .ausaxs-cmds__head {
    display: none;
  }

  .md-typeset .ausaxs-cmd {
    grid-template-columns: 1fr 1.2rem;
    row-gap: 0.35rem;
  }

  .md-typeset .ausaxs-cmd > code {
    grid-column: 1;
  }

  .md-typeset .ausaxs-cmd__desc {
    grid-column: 1;
    grid-row: 2;
  }

  .md-typeset .ausaxs-cmd::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .ausaxs-cmd,
  .md-typeset .ausaxs-cmd::after {
    transition: none;
  }
}

/* Run buttons for the runnable Python examples (javascripts/run-python.js): a bar attached below the code block, and
   the output of the run below that. */
.md-typeset .highlight.run pre {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* A block that continues from the blocks above it is marked by an icon beside its copy button. It explains itself on
   hover, but is not a button, so it stays dimmer than the buttons and does not light up. */
.md-typeset .md-code__button.ausaxs-run__continues,
.md-typeset :hover > * > .md-code__button.ausaxs-run__continues {
  color: var(--md-default-fg-color--lighter);
  opacity: 0.7;
  cursor: help;
}

.md-typeset .md-code__button.ausaxs-run__continues::after {
  /* Material Design Icons: subdirectory-arrow-right */
  --ausaxs-continues-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/></svg>');
  -webkit-mask-image: var(--ausaxs-continues-icon);
  mask-image: var(--ausaxs-continues-icon);
}

.md-typeset .highlight.run code[contenteditable] {
  outline: none;
}

.md-typeset .highlight.run code[contenteditable]:focus {
  box-shadow: inset 0 0 0 1px var(--ausaxs-gold-line);
}

.md-typeset .ausaxs-run__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.6rem;
  margin-bottom: 1em;
  font-size: 0.7rem;
  background-color: var(--md-code-bg-color);
  border-top: 1px solid var(--ausaxs-code-border);
  border-radius: 0 0 0.1rem 0.1rem;
}

.md-typeset .ausaxs-run__bar:has(+ .ausaxs-run__output:not([hidden])) {
  margin-bottom: 0;
}

.md-typeset .ausaxs-run__button,
.md-typeset .ausaxs-run__reset {
  font: inherit;
  cursor: pointer;
  border-radius: 0.2rem;
  padding: 0.15rem 0.7rem;
  transition: background-color 125ms, color 125ms;
}

.md-typeset .ausaxs-run__button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--md-primary-bg-color);
  background-color: var(--ausaxs-gold);
}

/* A drawn triangle rather than the ▶ glyph, which sits on the baseline and so below the centre of the button */
.md-typeset .ausaxs-run__button::before {
  --ausaxs-play-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 12"><path d="M0 0L10 6L0 12z"/></svg>');
  content: "";
  width: 0.55em;
  height: 0.66em;
  background-color: currentcolor;
  -webkit-mask: var(--ausaxs-play-icon) center / contain no-repeat;
  mask: var(--ausaxs-play-icon) center / contain no-repeat;
}

.md-typeset .ausaxs-run__button:hover:not(:disabled) {
  background-color: var(--ausaxs-gold-hover);
}

.md-typeset .ausaxs-run__button:disabled {
  cursor: progress;
  opacity: 0.6;
}

[data-md-color-scheme="slate"] .md-typeset .ausaxs-run__button {
  color: var(--md-default-bg-color);
}

.md-typeset .ausaxs-run__reset {
  color: var(--md-default-fg-color--light);
  box-shadow: inset 0 0 0 1px var(--ausaxs-code-border);
}

.md-typeset .ausaxs-run__reset:hover {
  color: var(--md-default-fg-color);
}

.md-typeset .ausaxs-run__status {
  color: var(--md-default-fg-color--light);
}

.md-typeset .ausaxs-run__output {
  margin-bottom: 1em;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--ausaxs-code-border);
  border-top: none;
  border-radius: 0 0 0.1rem 0.1rem;
}

.md-typeset .ausaxs-run__output pre {
  margin: 0;
  font-size: 0.75em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 24em; /* long output, such as a settings file, scrolls instead of stretching the page */
  overflow-y: auto;
}

.md-typeset .ausaxs-run__output pre + pre,
.md-typeset .ausaxs-run__output img {
  margin-top: 0.5rem;
}

.md-typeset .ausaxs-run__output img {
  display: block;
  max-width: 100%;
  background: #fff; /* matplotlib figures are drawn on white */
}

.md-typeset .ausaxs-run__log {
  color: var(--md-default-fg-color--light);
}

.md-typeset .ausaxs-run__warn,
.md-typeset .ausaxs-run__error {
  color: var(--ausaxs-red);
}

/* Logos of the funding agencies (footer) and universities (About page). All SVGs are single-colour with transparent
   cut-outs, so `brightness(0) invert(1)` turns them white on dark backgrounds without losing detail. The row's
   font-size sets the logo height; a logo whose text is large for its height sets `--logo-scale` below 1 in its
   style attribute, so that the logos in a row carry the same visual weight. */
.ausaxs-sponsors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.ausaxs-sponsors img {
  display: block;
  width: auto;
}

.ausaxs-sponsors--footer {
  gap: 0.6rem 1.4rem;
  margin: 0.8rem 0 0.6rem;
}

.ausaxs-sponsors--footer img {
  font-size: 2rem;
  height: calc(var(--logo-scale, 1) * 1em);
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 125ms;
}

.ausaxs-sponsors--footer a:hover img,
.ausaxs-sponsors--footer a:focus-visible img {
  opacity: 0.9;
}

.md-footer-meta .ausaxs-sponsors__label {
  color: var(--md-footer-fg-color--lighter);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.md-footer-meta .ausaxs-sponsors__label:hover {
  color: var(--md-footer-fg-color--light);
}

.md-typeset .ausaxs-sponsors--page {
  gap: 1.5rem 3rem;
  margin: 1.2rem 0 1.6rem;
}

.md-typeset .ausaxs-sponsors--page img {
  font-size: 3.2rem;
  height: calc(var(--logo-scale, 1) * 1em);
}

[data-md-color-scheme="slate"] .md-typeset .ausaxs-sponsors--page img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
