/* ─────────────────────────────────────────────────────────────────────────────
   Typography — reading comfort for notes: headings, paragraphs, tables, callouts,
   code, diagrams, header and tabs. (Colours/tokens live in brand.css.)
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reading width & rhythm ───────────────────────────── */
.md-typeset { font-size: 0.79rem; line-height: 1.75; }
.md-typeset p, .md-typeset ul, .md-typeset ol { color: var(--md-default-fg-color--light); }
.md-typeset strong { color: var(--md-default-fg-color); }
.md-content__inner { max-width: 46rem; }
.md-main__inner .md-content__inner:has(.lx-hero) { max-width: none; }        /* home page uses full width */

/* ── Headings ─────────────────────────────────────────── */
.md-typeset h1 { font-size: 2.1em; line-height: 1.2; margin-bottom: 0.6em; }
.md-typeset h2 {
  font-size: 1.45em; margin-top: 2.2em; padding-top: 0.2em;
  display: flex; align-items: center; gap: 0.55rem;
}
.md-typeset h2::before {                       /* small accent bar before each section */
  content: ''; width: 0.28rem; height: 1.05em; border-radius: 2px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--lx-sky-light), var(--lx-sky-dark));
}
.md-typeset h3 { font-size: 1.12em; font-weight: 700; margin-top: 1.8em; }
.md-typeset .lx-section-title { margin-top: 2.6em; }

/* ── Links ────────────────────────────────────────────── */
.md-typeset a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s, color 0.15s; }
.md-typeset p a:hover, .md-typeset li a:hover, .md-typeset td a:hover { border-bottom-color: currentColor; }

/* ── Tables ───────────────────────────────────────────── */
.md-typeset table:not([class]) {
  border: 1px solid var(--lx-card-border); border-radius: var(--lx-radius); overflow: hidden;
  font-size: 0.74rem; box-shadow: none;
}
.md-typeset table:not([class]) th {
  background: var(--lx-card-bg); color: var(--md-default-fg-color);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.66rem;
}
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th { padding: 0.75em 1em; }
.md-typeset table:not([class]) tbody tr:hover { background: rgba(56, 189, 248, 0.05); }

/* ── Callouts (admonitions & collapsible Q&A) ─────────── */
.md-typeset .admonition, .md-typeset details {
  border-width: 1px; border-radius: var(--lx-radius); font-size: 0.76rem;
  border-color: var(--lx-card-border); background: var(--lx-card-bg); box-shadow: none;
}
.md-typeset .admonition-title, .md-typeset summary { font-weight: 700; border-radius: var(--lx-radius) var(--lx-radius) 0 0; }
.md-typeset .tip { border-left: 3px solid var(--lx-sky); }
.md-typeset .tip > .admonition-title, .md-typeset .tip > summary { background: rgba(56, 189, 248, 0.09); }
.md-typeset .tip > .admonition-title::before, .md-typeset .tip > summary::before { background-color: var(--lx-sky); }
.md-typeset .question { border-left: 3px solid #A78BFA; }
.md-typeset .question > summary { background: rgba(167, 139, 250, 0.08); }
.md-typeset details[open] > summary { border-bottom: 1px solid var(--lx-card-border); }
.md-typeset details + details { margin-top: 0.7rem; }

/* ── Code ─────────────────────────────────────────────── */
.md-typeset code { border-radius: 6px; font-size: 0.82em; }
.md-typeset pre { margin: 1.2em 0; }
.md-typeset .highlight { border: 1px solid var(--lx-card-border); }
.md-typeset .highlight span.filename {
  background: var(--lx-card-bg); border-bottom: 1px solid var(--lx-card-border);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
}

/* ── Content tabs ─────────────────────────────────────── */
.md-typeset .tabbed-set {
  border: 1px solid var(--lx-card-border); border-radius: var(--lx-radius); padding: 0 1rem 0.4rem;
}
.md-typeset .tabbed-labels > label { font-weight: 600; }

/* ── Diagrams ─────────────────────────────────────────── */
.md-typeset .mermaid {
  background: var(--lx-card-bg); border: 1px solid var(--lx-card-border); border-radius: var(--lx-radius);
  padding: 1rem; margin: 1.4em 0; text-align: center;
}

/* ── Header, tabs & sidebar ───────────────────────────── */
[data-md-color-scheme="slate"] .md-header {
  background: rgba(10, 10, 12, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
[data-md-color-scheme="slate"] .md-tabs { background: rgba(10, 10, 12, 0.82); }
.md-tabs__link { font-weight: 600; opacity: 0.75; }
.md-tabs__link--active, .md-tabs__link:hover { opacity: 1; }
.md-tabs__item--active .md-tabs__link { color: var(--lx-sky); }
.md-nav__link--active { font-weight: 700; }
.md-search__form { border-radius: 10px; }

/* Tags at the top of a note */
.md-typeset .md-tag { border-radius: 999px; font-weight: 600; font-size: 0.62rem; }

/* ── Footer ───────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-footer, [data-md-color-scheme="slate"] .md-footer-meta {
  background: #0F0F12;
}
.md-footer-meta { border-top: 1px solid var(--lx-card-border); }

/* Tip boxes in brand sky-blue (Material's default tip colour is teal) */
.md-typeset .admonition.tip, .md-typeset details.tip { border-color: rgba(56, 189, 248, 0.4); border-left-color: var(--lx-sky); }

/* Phones: let long tab rows (e.g. "Windows · Command Prompt | Windows · PowerShell | macOS / Linux")
   wrap onto two lines instead of pushing the page wider than the screen */
@media screen and (max-width: 44.9375em) {
  .md-typeset .tabbed-set { padding: 0 0.6rem 0.4rem; }
  .md-typeset .tabbed-labels { flex-wrap: wrap; overflow: visible; max-width: 100%; }
  .md-typeset .tabbed-labels > label { padding-left: 0.6em; padding-right: 0.6em; }
}
