/* The site's additions to the Furo theme (docs/conf.py). */
pre.mermaid {
  background: none;
  border: none;
  text-align: center;
  overflow-x: auto;
}
pre.mermaid > svg {
  max-width: 100%;
  height: auto;
}
video.doc-video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
}
p.doc-video-caption {
  margin-top: 0.3em;
  font-size: 0.9em;
  color: var(--color-foreground-secondary);
}
td video.doc-video {
  min-width: 220px;
}
/* Pictures in a table (the home page's gallery) fill their cells evenly. */
td img {
  width: 100%;
  height: auto;
}

/* --- The home page (docs/index.md): hero, gallery, cards ------------------------------- */
/* The page's own title, as the hero's headline. */
section#lagrange > h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.2em;
  background: linear-gradient(90deg, var(--color-brand-primary), #f5b041);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lg-hero {
  margin: 0 0 2.5rem;
}
.lg-hero .lg-tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  font-weight: 600;
  color: var(--color-foreground-primary);
  margin: 0 0 0.6rem;
}
.lg-hero .lg-sub {
  color: var(--color-foreground-secondary);
  margin: 0 0 1.2rem;
}
.lg-hero img {
  width: 100%;
  border-radius: 12px;
  margin-top: 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.lg-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
a.lg-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--color-background-border);
  color: var(--color-foreground-primary);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s;
}
a.lg-btn:hover {
  border-color: var(--color-brand-primary);
  transform: translateY(-1px);
}
a.lg-btn.lg-btn-primary {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #170a01;
}
/* Six pictures, each with a line of what it shows. */
.lg-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
  margin: 1rem 0 2.5rem;
}
div.lg-shot.container {
  border: 1px solid var(--color-background-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-background-secondary);
}
.lg-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.lg-shot p {
  margin: 0.7rem 0.9rem 0.9rem;
  font-size: 0.92em;
  line-height: 1.45;
}
/* The domains, small cards that link to their physics page. */
.lg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 2.5rem;
}
div.lg-card.container {
  border: 1px solid var(--color-background-border);
  border-left: 3px solid var(--color-brand-primary);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  background: var(--color-background-secondary);
}
.lg-card p {
  margin: 0.25rem 0;
  font-size: 0.92em;
}
.lg-card p:first-child a {
  text-decoration: none;
  font-size: 1.05em;
}
/* Why: four points, two by two on a wide screen. */
.lg-why {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem 1.6rem;
  margin: 1rem 0 2.5rem;
}
.lg-point p {
  margin: 0;
  line-height: 1.55;
}

/* --- The home page's first screen: what is new, the feature wall, the numbers ---------- */
.lg-new {
  margin: 0 0 1rem;
}
.lg-new a {
  display: inline-block;
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  border: 1px solid var(--color-background-border);
  border-radius: 999px;
  font-size: 0.9em;
  color: var(--color-foreground-primary);
  text-decoration: none;
}
.lg-new a:hover {
  border-color: var(--color-brand-primary);
}
.lg-new span {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--color-brand-primary);
  color: #170a01;
  font-weight: 700;
}
.lg-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0 0 1.8rem;
}
figure.lg-tile {
  margin: 0;
  border: 1px solid var(--color-background-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-background-secondary);
  display: flex;
  flex-direction: column;
}
.lg-tile video,
.lg-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
}
.lg-tile figcaption {
  padding: 0.65rem 0.85rem 0.8rem;
  font-size: 0.9em;
  line-height: 1.45;
}
.lg-tile figcaption a {
  white-space: nowrap;
}
/* Three across on a wide screen, as the content column allows. */
@media (min-width: 900px) {
  .lg-wall {
    grid-template-columns: repeat(3, 1fr);
  }
}
.lg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
  margin: 0 0 0.6rem;
}
.lg-stats > div {
  border-top: 3px solid var(--color-brand-primary);
  padding: 0.6rem 0.2rem 0;
}
.lg-stats b {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
}
.lg-stats span {
  font-size: 0.88em;
  color: var(--color-foreground-secondary);
}
.lg-stats sup a {
  text-decoration: none;
}
p.lg-footnote {
  font-size: 0.8em;
  color: var(--color-foreground-secondary);
  margin: 0 0 2.5rem;
}
