/* User Provided Stylesheet */

/* Site stylesheet, loaded by the book-theme via site.options.style in myst.yml
   (the theme takes a single CSS file). */

/* Landing-page tiles (docs/intro.md): rounded, lifted cards with an icon. */
.trace-tiles .myst-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(13, 148, 136, 0.25);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  padding: 0.5rem 0.5rem 0.75rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
}
.trace-tiles .myst-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  border-color: rgba(13, 148, 136, 0.6);
}
.trace-tiles .myst-card p {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}
.trace-tiles .myst-card strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}
.trace-tiles img.trace-tile-icon,
.trace-tiles .trace-tile-icon img {
  width: 3rem;
  height: 3rem;
  margin: 0.5rem auto 0.25rem;
  padding: 0.65rem;
  border-radius: 9999px;
  background: rgba(13, 148, 136, 0.1);
  box-sizing: content-box;
}
html.dark .trace-tiles .myst-card {
  border-color: rgba(45, 212, 191, 0.25);
}
html.dark .trace-tiles img.trace-tile-icon,
html.dark .trace-tiles .trace-tile-icon img {
  background: rgba(45, 212, 191, 0.15);
}

/* ---------------------------------------------------------------------------
   Landing page (docs/intro.md): compact vertical rhythm.
   The theme pads each block with py-6 and each centered/justified block with
   py-20 sm:py-28 (5-7rem); tighten so the page reads as one flow.
   --------------------------------------------------------------------------- */
.myst-landing-block {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}
.myst-landing-centered-inner,
.myst-landing-justified {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
.myst-landing-split-img-content-wrapper {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}
.myst-landing-centered-heading,
.myst-landing-justified-heading {
  font-size: 2.25rem !important;
  line-height: 1.2 !important;
}
.myst-landing-centered-body,
.myst-landing-justified-body {
  margin-top: 0.75rem !important;
}
/* Blocks without buttons still render an empty links row with mt-8. */
.myst-landing-centered-links:empty,
.myst-landing-justified-links:empty,
.myst-landing-split-img-links:empty {
  display: none !important;
}
/* The tiles grid (my-5) ends the "Explore" block; let "Papers" follow closely. */
.trace-tiles .myst-grid {
  margin-bottom: 0 !important;
}
.myst-landing-centered-inner {
  padding-bottom: 0.5rem !important;
}
.myst-landing-justified {
  padding-top: 0.5rem !important;
  row-gap: 0 !important;
}
/* Cards carry my-5 each; the grid gap already separates them. */
.trace-tiles .myst-card {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Landing page (docs/intro.md): keep the page title as the page's <h1> for
   screen readers and document outline (WCAG 1.3.1, 2.4.6), but hide it
   visually; the hero carries the visible heading. The title block's other
   controls (edit link, downloads, authors) are removed outright so that no
   invisible element can take keyboard focus. Scoped with :has() to the page
   that contains the hero, since the theme gives pages no per-page class. */
article:has(.trace-hero) .myst-fm-block-header,
article:has(.trace-hero) .myst-fm-authors-affiliations {
  display: none !important;
}
article:has(.trace-hero) .myst-fm-block {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
article:has(.trace-hero) .myst-fm-block-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Hero (first block): the TRACE org homepage's header photo behind the
   tagline. The photo is an <img> in the block, stretched behind the text,
   since a url() in this stylesheet would not resolve to a built asset.
   The overlay keeps white text readable in light and dark mode alike. */
.trace-hero .myst-landing-centered {
  border-radius: 1rem;
  overflow: hidden;
  background-color: #04161a;
  isolation: isolate;
}
.trace-hero img.trace-hero-bg,
.trace-hero .trace-hero-bg img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
  z-index: -2;
}
.trace-hero .myst-landing-centered::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Dark enough that the smallest white text (16px eyebrow) keeps at least
     4.5:1 against the brightest parts of the photo (WCAG 1.4.3). */
  background: linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.66));
  z-index: -1;
}
.trace-hero .myst-landing-centered-inner {
  padding: 4rem 1.5rem 2.25rem !important;
}
.trace-hero .myst-landing-centered,
.trace-hero .myst-landing-centered p,
.trace-hero .myst-landing-centered h2,
.trace-hero .myst-landing-centered .myst-landing-link {
  color: #fff !important;
}
.trace-hero .myst-landing-centered-subtitle {
  color: #5eead4 !important;
  letter-spacing: 0.08em;
}
.trace-hero .myst-landing-centered-heading {
  font-size: 2.75rem !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.trace-hero .myst-landing-centered-body p {
  font-size: 1.2rem;
  margin: 0;
}
.trace-hero .myst-landing-centered-links {
  margin-top: 1.5rem !important;
}
.trace-hero .trace-hero-credit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.4rem;
  font-size: 0.7rem;
}
.trace-hero .trace-hero-credit p {
  font-size: 0.7rem !important;
  margin: 0;
}
.trace-hero .trace-hero-credit a {
  color: #fff !important;
}
@media (max-width: 640px) {
  .trace-hero .myst-landing-centered-heading {
    font-size: 2rem !important;
  }
}

/* Buttons ({button} role): the theme's primary blue (#3b82f6) gives white
   16px bold text only 3.7:1; use darker blues for at least 4.5:1 (WCAG 1.4.3). */
a.button,
button.button,
cite.button a,
span.button {
  background-color: #2563eb !important;
}
:is(a.button, button.button, cite.button a, span.button):hover {
  background-color: #1d4ed8 !important;
}

/* Intro with the workflow diagram, right after the hero. */
.myst-landing-split-img img {
  border-radius: 1rem;
}
/* Show the whole workflow diagram instead of cropping it to fill the panel. */
.myst-landing-split-img-image img {
  object-fit: contain !important;
  background: #fff;
}
.trace-intro .myst-landing-split-img-body {
  margin-top: 0 !important;
}
/* Stacked (phone) layout: let the diagram take its natural height instead of
   the theme's fixed h-80 panel, and drop the extra padding around the text. */
@media (max-width: 767px) {
  .trace-intro .myst-landing-split-img-image {
    height: auto !important;
  }
  .trace-intro .myst-landing-split-img-content-wrapper {
    padding-top: 0.5rem !important;
    padding-bottom: 0 !important;
  }
}

/* Footer, after the org homepage's footer: partner wordmarks and the NSF
   acknowledgement. Wordmarks at 7rem (~112px) wide, about 2/3 of the org page (~165px). */
.trace-footer {
  margin-top: 1rem;
  padding: 1.5rem 1rem 1rem;
  border-top: 1px solid rgba(13, 148, 136, 0.25);
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.85;
}
.trace-footer p {
  margin: 0.25rem auto;
  max-width: 48rem;
}
.trace-footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1rem;
}
.trace-footer-logos img {
  width: 7rem;
  height: auto;
  margin: 0 !important;
}
html.dark .trace-footer {
  border-top-color: rgba(45, 212, 191, 0.25);
}
/* The wordmarks are dark on transparent: give them a light chip in dark mode. */
html.dark .trace-footer-logos img {
  background: #f8f8f8;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  box-sizing: content-box;
}
