@font-face {
  font-display: swap;
  font-family: "Sora";
  font-style: normal;
  font-weight: 500;
  src: url("fonts/sora-medium.ttf") format("truetype");
}

:root {
  --geojax-brand-green: #079896;
  --pst-color-primary: #0f766e;
  --pst-color-secondary: #b45309;
  --pst-color-link: #0f766e;
  --pst-color-link-hover: #115e59;
  --geojax-rule: #d8dee4;
  --geojax-panel: #ffffff;
  --geojax-preview: #f5f7f8;
}

html[data-theme="dark"] {
  --pst-color-primary: #5eead4;
  --pst-color-secondary: #fbbf24;
  --pst-color-link: #5eead4;
  --pst-color-link-hover: #99f6e4;
  --geojax-rule: #38414a;
  --geojax-panel: #171b20;
  --geojax-preview: #20262c;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.navbar-brand.logo {
  align-items: center;
  gap: 0.45rem;
}

.navbar-brand.logo .logo__image {
  height: 2rem;
  max-width: 2rem;
  width: 2rem;
}

.navbar-brand.logo .logo__title {
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.navbar-brand.logo .logo__title::after {
  color: var(--geojax-brand-green);
  content: "JAX";
}

.bd-main .bd-content .bd-article-container {
  max-width: 980px;
}

.bd-article h1 {
  font-size: 2.25rem;
  font-weight: 680;
  line-height: 1.15;
}

.bd-article h2 {
  border-bottom: 1px solid var(--geojax-rule);
  font-size: 1.45rem;
  font-weight: 650;
  padding-bottom: 0.35rem;
}

.bd-article h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

div[class*="highlight-"] {
  border-radius: 6px;
}

dl.py > dt.sig {
  border-left: 3px solid var(--pst-color-primary);
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
}

.cell_output {
  border-left: 2px solid var(--geojax-rule);
  margin-left: 0.35rem;
  padding-left: 0.9rem;
}

.bd-article img {
  border-radius: 4px;
}

table.autosummary {
  width: 100%;
}

.math {
  overflow-x: auto;
}

.tutorial-gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2rem 0 1rem;
}

.tutorial-card {
  background: var(--geojax-panel);
  border: 1px solid var(--geojax-rule);
  border-radius: 6px;
  color: var(--pst-color-text-base) !important;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-decoration: none !important;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.tutorial-card:hover {
  border-color: var(--pst-color-primary);
  box-shadow: 0 7px 20px rgb(15 23 42 / 10%);
  transform: translateY(-2px);
}

.tutorial-card:focus-visible {
  outline: 3px solid var(--pst-color-primary);
  outline-offset: 3px;
}

.tutorial-card-media {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: var(--geojax-preview);
  border-bottom: 1px solid var(--geojax-rule);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.bd-article .tutorial-card-media img {
  border-radius: 0;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.tutorial-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.tutorial-card-body .tutorial-card-meta {
  color: var(--pst-color-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.bd-article .tutorial-card-body h2 {
  border: 0;
  color: var(--pst-color-text-base);
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0;
  padding: 0;
}

.tutorial-card-body > p:last-child {
  color: var(--pst-color-text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0.6rem 0 0;
}

.landing-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2rem 0;
}

.landing-card {
  align-items: center;
  background: var(--geojax-panel);
  border: 1px solid var(--geojax-rule);
  border-radius: 6px;
  color: var(--pst-color-text-base) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none !important;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.landing-card:hover {
  border-color: var(--pst-color-primary);
  box-shadow: 0 7px 20px rgb(15 23 42 / 10%);
  transform: translateY(-2px);
}

.landing-card:focus-visible {
  outline: 3px solid var(--pst-color-primary);
  outline-offset: 3px;
}

.landing-card-icon {
  align-items: center;
  color: var(--pst-color-primary);
  display: flex;
  font-size: 2rem;
  height: 3.5rem;
  justify-content: center;
  margin-bottom: 0.7rem;
  width: 3.5rem;
}

.bd-article .landing-card h2 {
  border: 0;
  font-size: 1.15rem;
  margin: 0;
  padding: 0;
}

.landing-card p {
  color: var(--pst-color-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.65rem 0 0;
  max-width: 28rem;
}

@media (max-width: 768px) {
  .bd-sidebar-secondary,
  .secondary-toggle {
    display: none !important;
  }

  dl.py > dt.sig,
  dl.py > dt.sig .sig-name,
  dl.py > dt.sig .sig-prename,
  dl.py > dt.sig .sig-param {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  dl.py > dt.sig .sig-name,
  dl.py > dt.sig .sig-prename {
    word-break: break-all;
  }

  dl.py > dt.sig .pre {
    white-space: normal;
  }

  .tutorial-gallery {
    grid-template-columns: 1fr;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .landing-card {
    min-height: 190px;
  }
}
