/* =============================================================================
 * The Lupaxa Project Portal
 * Base Typography and Links
 * ============================================================================= */

.md-typeset a {
  color: var(--lupaxa-light-blue);
  text-decoration: none;
}

.md-typeset a:hover,
.md-typeset a:focus,
.md-typeset a:active {
  color: var(--lupaxa-blue);
  text-decoration: none;
}

.md-typeset .page-logo {
  display: block;
  width: min(100%, 256px);
  height: auto;
  margin: 0 auto var(--lupaxa-spacing-lg);
}

.md-typeset h1:not(.lupaxa-hero-title) {
  margin-top: var(--lupaxa-spacing-md);
  margin-bottom: var(--lupaxa-spacing-md);
  padding-left: 0.85rem;
  color: var(--md-default-fg-color);
  font-size: clamp(1.65rem, 2.2vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.03em;
  border-left: 3px solid var(--lupaxa-light-blue);
}

.md-typeset h2 {
  margin-top: var(--lupaxa-spacing-lg);
  margin-bottom: var(--lupaxa-spacing-md);
  padding-left: 0.85rem;
  color: var(--md-default-fg-color);
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  border-left: 3px solid var(--lupaxa-light-blue);
}

.md-typeset h2:first-of-type {
  margin-top: var(--lupaxa-spacing-md);
}

.md-typeset ol li,
.md-typeset ul li {
  margin-bottom: 0.15em;
}

.md-typeset h3 {
  margin-top: var(--lupaxa-spacing-lg);
  margin-bottom: 0.6rem;
  color: var(--md-default-fg-color);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Inline code and fenced blocks. Same blue family as the page cards. */

.md-typeset code {
  color: var(--md-code-fg-color);
  background-color: var(--lupaxa-card-bg);
  border: 1px solid color-mix(in srgb, var(--lupaxa-light-blue) 28%, transparent);
  border-radius: var(--lupaxa-radius-sm);
  box-shadow: none;
}

.md-typeset pre > code {
  padding: 20px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* One frame per block. A numbered fence is a table inside .highlight, so the
   frame goes on that wrapper. Inner pres stay flat or the gutter becomes a
   second rounded box. Radius matches the hero buttons. */
.md-typeset .highlight > pre,
.md-typeset .highlight:has(> .highlighttable) {
  background-color: var(--lupaxa-card-bg);
  border: 1px solid color-mix(in srgb, var(--lupaxa-light-blue) 28%, transparent);
  border-radius: var(--lupaxa-radius-button);
  box-shadow: var(--lupaxa-shadow-panel);
}

.md-typeset .highlight:has(> .highlighttable) {
  overflow: hidden;
}

/* The table's own margin would sit inside the frame and stack on the code padding. */
.md-typeset .highlight:has(> .highlighttable) > .highlighttable {
  margin: 0;
}

.md-typeset .highlighttable pre {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.md-typeset .md-code__nav,
.md-typeset :hover > .md-code__nav {
  background-color: var(--lupaxa-card-bg);
  box-shadow: none;
}

.md-typeset .highlighttable .linenos {
  padding-top: 20px;
  padding-bottom: 20px;
  background-color: var(--lupaxa-card-bg);
  border-radius: 0;
  box-shadow: none;
}

.md-typeset .highlighttable .linenodiv {
  box-shadow: inset -1px 0 color-mix(in srgb, var(--lupaxa-light-blue) 28%, transparent);
}

.md-typeset .highlighttable td.code pre > code {
  padding-left: 12px;
}
