/*
 * b'nerd Cloud Docs — Design Language overrides
 *
 * Base: Lean Minimal (white surfaces, hairline borders, generous whitespace,
 *       single indigo accent, data is the hero)
 * Accent layer: Terminal-Nerd (monospace technical data, precise status language,
 *               restrained density, code-block character)
 *
 * Tokens mirror decisions/2026-06-02-design-language.md §3.
 * --accent #6366f1 indigo-500  (= Material 'indigo' primary)
 * --text-primary  #111827 gray-900
 * --text-secondary #6b7280 gray-500
 * --border  #e5e7eb gray-200
 * --surface #ffffff
 * --bg      #f9fafb gray-50
 */

/* ── Typography ──────────────────────────────────────────────────────────── */

/*
 * Design language §3.2: system-ui sans for prose, ui-monospace stack for
 * technical data. We override Material's Google Fonts import with the system
 * stack — no external font request, matches the dashboard identity.
 */
:root {
  --md-text-font: ui-sans-serif, system-ui, -apple-system, sans-serif;
  --md-code-font: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Body copy: tighten slightly to match dashboard 13–14 px density */
.md-typeset {
  font-size: 0.85rem;         /* ≈ 13.6 px at 16 px root */
  line-height: 1.65;
}

/* Headings: tight letter-spacing per §3.2 page-title rule */
.md-typeset h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
}

/* P2-B: tighter heading rhythm — more breathing room above, less below */
.md-typeset h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.35em;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.md-typeset h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

/* Links: indigo accent, no underline at rest */
.md-typeset a {
  color: #6366f1;
  text-decoration: none;
}

.md-typeset a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* P1-C: hr — solid hairline instead of Material's 12% opacity fade */
.md-typeset hr {
  border-bottom: 1px solid #e5e7eb;
  margin: 1.75em 0;
}

/* P1-D: blockquote — indigo left-stripe, quiet text, faint bg; §2.1 stripe pattern */
.md-typeset blockquote {
  border-left: 4px solid #6366f1;
  background: #fafafa;
  color: #6b7280;
  border-radius: 0 4px 4px 0;
  padding: 0.5em 1em;
  margin: 1em 0;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */

/* Sidebar nav — match dashboard sidebar density (§6.5.1) */
.md-nav__link {
  font-size: 0.8rem;          /* 12.8 px ≈ dashboard 13 px nav */
  font-weight: 500;
}

.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: #6366f1;
}

/* Active nav item: indigo text + indigo-50 bg pill, matches §6.5.1 */
.md-nav__item--active > .md-nav__link {
  color: #6366f1;
  font-weight: 600;
  background: #eef2ff;        /* P2-A: indigo-50 bg pill */
  border-radius: 4px;
}

/* Nav section titles: quiet uppercase label style (§3.2 label/meta) */
.md-nav__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;             /* gray-400 = --text-tertiary */
}

/* P3-A: ToC secondary active link — indigo + semibold for current-section signal */
.md-nav--secondary .md-nav__link--active {
  color: #6366f1;
  font-weight: 600;
}

/* ── Header / topbar ─────────────────────────────────────────────────────── */

/* Keep Material's primary indigo but ensure exact brand token */
[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #6366f1;
  --md-primary-fg-color--light: #818cf8;
  --md-primary-fg-color--dark:  #4f46e5;
  --md-accent-fg-color:         #6366f1;
  /* R3: Material's --transparent ships the stock indigo (#526cfe1a), not our
   * brand token. It backs search-result hover + the tab-indicator wash, so
   * re-point it to a #6366f1 (indigo-500) 10% tint. */
  --md-accent-fg-color--transparent: rgba(99, 102, 241, 0.1);
}

/* Header: white with hairline bottom border — matches dashboard topbar (§6.5.2)
 *
 * color: Material sets this to var(--md-primary-bg-color) = #fff for indigo,
 * expecting the header to have an indigo background. We override to white bg,
 * so we must also override color to dark text — otherwise all SVG icon buttons
 * (burger, search, color-toggle) inherit #fff and become invisible (white on white).
 */
.md-header {
  background-color: #ffffff;
  color: #111827;              /* --text-primary: dark icons on white header */
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

/* P0-A: suppress scroll-triggered shadow — .md-header--shadow has higher specificity
 * (0,2,0) than .md-header (0,1,0) so Material's shadow re-appears on scroll without this. */
.md-header--shadow {
  box-shadow: none;
}

/* Header title / site name: dark text on white */
.md-header__title {
  color: #111827;
  font-weight: 600;
}

/* Logo: constrain height in the topbar; black fill works on white header */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 28px;
  width: auto;
}

/* Logo: invert in dark mode so black fill reads on dark header */
[data-md-color-scheme="slate"] .md-header__button.md-logo img,
[data-md-color-scheme="slate"] .md-header__button.md-logo svg {
  filter: invert(1);
}

/* Search bar: lean input style matching §7 UiInput */
.md-search__input {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.8rem;
}

.md-search__input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* R3: Search-result dropdown — align highlight + hover to the indigo token.
 * Material highlights matched terms with --md-accent-fg-color (already #6366f1)
 * and washes the hovered row with --md-accent-fg-color--transparent (re-pointed
 * to our indigo tint above). We also drop the underline on the highlight mark
 * for the cleaner Lean-Minimal read and tint the active term semibold. */
.md-search-result mark {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

.md-search-result__link:focus,
.md-search-result__link:hover {
  background-color: rgba(99, 102, 241, 0.08);
}

/* "Search deeper" / more-results summary hover → indigo, matching nav. */
.md-search-result__more > summary:focus > div,
.md-search-result__more > summary:hover > div {
  color: #6366f1;
  background-color: rgba(99, 102, 241, 0.08);
}

/* R3: Header source (repo) link — inherits the dark header fg (#111827); the
 * default opacity:.7 hover is fine. Pin colour explicitly so it never falls
 * back to Material's primary-bg white when the header bg is white. */
.md-header__source,
.md-source {
  color: #111827;
}

[data-md-color-scheme="slate"] .md-header__source,
[data-md-color-scheme="slate"] .md-source {
  color: var(--md-default-fg-color);
}

/* R3: Copy-to-clipboard toast — §3.4 radius; leave bg/text/shadow to Material. */
.md-dialog {
  border-radius: 4px;
}

/* R3: header scroll-shadow suppression — verified to cover the inner-page
 * .md-header--lifted variant too. Material applies the shadow ONLY via
 * .md-header--shadow (suppressed above); --lifted carries no box-shadow of its
 * own and there is no combined .md-header--lifted.md-header--shadow rule, so
 * the existing suppression wins on inner pages. No extra rule needed. */

/* ── Code blocks — Terminal-Nerd accent layer ────────────────────────────── */

/*
 * This is where the "nerd" character comes through: dark terminal-style
 * code blocks against the white page, with the indigo accent on the
 * language label / copy button. Matches the TUI dark-bg (ANSI 234 ≈ #0d1117).
 */

/* Code block container — P2-F: radius 6→4px for sharper Terminal-Nerd feel */
.md-typeset pre {
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #0d1117;        /* near-black terminal bg — TUI ColorBg 234 */
}

.md-typeset pre > code {
  background: transparent;
  color: #e6edf3;             /* off-white terminal text */
  font-size: 0.8rem;          /* 12.8 px — matches §4 monospace 11–13 px range */
  line-height: 1.6;
}

/* Language label tab above the code block */
.md-typeset .highlight .filename,
.md-typeset [class^="language-"] + .md-clipboard ~ .md-typeset .filename {
  background: #161b22;
  color: #6366f1;             /* indigo accent on the label */
  font-size: 0.72rem;
  font-weight: 600;
  border-bottom: 1px solid #30363d;
}

/* Inline code: subtle indigo-tinted bg, monospace, no heavy box */
.md-typeset code:not(pre code) {
  background: #eef2ff;        /* indigo-50 — accent-light */
  color: #4f46e5;             /* indigo-700 for contrast */
  border: 1px solid #e0e7ff; /* indigo-100 */
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-size: 0.82em;
}

/* Copy-to-clipboard button: indigo accent on hover */
.md-clipboard {
  color: #6b7280;
}

.md-clipboard:hover {
  color: #6366f1;
}

/* Line numbers (when enabled) */
.md-typeset .linenums {
  color: #484f58;             /* muted terminal gutter */
}

/* ── Tabbed content (pymdownx.tabbed) ────────────────────────────────────── */

/* P1-A: active indicator — indigo sliding underline via ::before pseudo-element */
.md-typeset .tabbed-labels::before {
  background: var(--md-accent-fg-color);  /* indigo-500 sliding indicator */
}

.md-typeset .tabbed-labels > label:hover {
  color: #6366f1;
}

/* ── Admonitions — Terminal-Nerd accent layer ────────────────────────────── */

/*
 * Admonitions use hairline left-accent stripes (4 px) — matches §2.1
 * Deviation 4 payment-bar pattern: thin colored stripe, no heavy fill box.
 * §10 anti-pattern: no heavy bg-blue-50/bg-yellow-50 blocks.
 */

.md-typeset .admonition,
.md-typeset details {
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  border-left-width: 4px;
  box-shadow: none;
  background: #ffffff;
  font-size: 0.82rem;
}

/* note / info — indigo */
.md-typeset .admonition.note,
.md-typeset .admonition.info,
.md-typeset details.note,
.md-typeset details.info {
  border-left-color: #6366f1;
}

.md-typeset .note > .admonition-title,
.md-typeset .info > .admonition-title,
.md-typeset .note > summary,
.md-typeset .info > summary {
  background: #eef2ff;        /* indigo-50 */
  color: #4338ca;
}

.md-typeset .note > .admonition-title::before,
.md-typeset .info > .admonition-title::before,
.md-typeset .note > summary::before,
.md-typeset .info > summary::before {
  background-color: #6366f1;
}

/* tip — green (active/success — §5 status language) */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: #16a34a;
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background: #f0fdf4;
  color: #166534;
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: #16a34a;
}

/* warning — amber (build/warning — §5 status language) */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: #ca8a04;
}

.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  background: #fefce8;
  color: #854d0e;
}

.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
  background-color: #ca8a04;
}

/* danger — red (error/failed — §5 status language) */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left-color: #dc2626;
}

.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
  background: #fef2f2;
  color: #991b1b;
}

.md-typeset .danger > .admonition-title::before,
.md-typeset .danger > summary::before {
  background-color: #dc2626;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

/*
 * §6.5.6 table rules: full-width, uppercase column headers, hairline borders,
 * row hover bg-gray-50, monospace for technical data cells.
 * P2-E: outer border + radius + overflow hidden so the table renders as a card.
 */

.md-typeset table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  border: 1px solid #e5e7eb;  /* P2-E: outer border */
  border-radius: 4px;          /* P2-E: rounded corners */
  overflow: hidden;             /* P2-E: clip corners cleanly */
}

.md-typeset table th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;             /* --text-tertiary */
  background: #f9fafb;        /* --bg gray-50 */
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
}

/* P2-C: table inline code — absolute size avoids double-shrink (0.8rem × 0.82em ≈ 10.5 px) */
.md-typeset table code:not(pre code) {
  font-size: 0.75rem;
}

.md-typeset table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 0.75rem;
  vertical-align: top;
}

.md-typeset table tr:hover td {
  background: #f9fafb;
}

/* ── Content area ────────────────────────────────────────────────────────── */

/* Page background: gray-50 per §6.5.3 and §3.1 --bg token */
.md-main {
  background: #f9fafb;
}

/* Content card: white surface, hairline border — §3.5 section card treatment
 * P0-C: remove !important from padding so Material's breakpoint padding can apply */
.md-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0;
}

/* P0-B: remove margin:0 — it collapses Material's responsive sidebar spacing.
 * Keep padding. Mobile override below handles the narrow-viewport case. */
.md-content__inner {
  padding: 1.5rem 1.75rem;
}

/* Sidebar: white surface, hairline right border — §6.5.1 */
.md-sidebar {
  background: #ffffff;
}

.md-sidebar--primary {
  border-right: 1px solid #e5e7eb;
}

.md-sidebar--secondary {
  border-left: 1px solid #e5e7eb;
}

/* ── Tabs (top navigation tabs) ──────────────────────────────────────────── */

/* §7 UiTabs: border-bottom strip, active = indigo underline.
 *
 * BUG-FIX: Material 9.7 puts the active class on the LIST ITEM, not the
 * link: <li class="md-tabs__item md-tabs__item--active"><a class="md-tabs__link">.
 * Material's own rule `.md-tabs__item--active .md-tabs__link { color: inherit }`
 * wins over anything on .md-tabs__link--active (which never appears in the DOM).
 * We must target .md-tabs__item--active .md-tabs__link, and we need an explicit
 * color on .md-tabs itself so that "inherit" lands on gray, not Material's
 * default white. */
.md-tabs {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;               /* baseline — active link inherits from here */
}

.md-tabs__link {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
}

/* hover: correct selector, no change needed */
.md-tabs__link:hover {
  color: #6366f1;
}

/* active: must target the item, not the link — see BUG-FIX above */
.md-tabs__item--active .md-tabs__link {
  color: #6366f1;
  border-bottom: 2px solid #6366f1;
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

/* P1-E: prev/next nav — white surface with hairline border + hover indigo;
 * replaces heavy indigo block buttons that were too dominant.
 *
 * BUG-FIX: Material's footer templates consume --md-footer-fg-color* CSS
 * variables for all text, icons, and direction labels — the class-level
 * `color` property does NOT reach those slots. Override the variables here
 * so the white footer background does not produce white-on-white text.
 */
.md-footer {
  /* variable overrides — must live on the element that the template targets */
  --md-footer-fg-color:         #111827;  /* gray-900 — page titles, icons */
  --md-footer-fg-color--light:  #6b7280;  /* gray-500 — direction labels     */
  --md-footer-fg-color--lighter:#9ca3af;  /* gray-400 — secondary chrome     */
  --md-footer-bg-color:         #ffffff;
  --md-footer-bg-color--dark:   #ffffff;

  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  color: #111827;
}

.md-footer__link {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}

.md-footer__link:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.md-footer__title {
  color: #9ca3af;             /* quiet label — direction text (PREVIOUS / NEXT) */
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.md-footer__direction {
  color: #9ca3af;
  font-size: 0.7rem;
}

/* P2-G: footer-meta — white surface, unified with footer; no gray-50 band break */
.md-footer-meta {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

/* ── Dark mode — slate scheme ────────────────────────────────────────────── */

/*
 * Dark mode is secondary (§2: "dark theme is NOT the default"). Keep Material's
 * slate scheme but align accent to the same indigo token.
 * The Terminal-Nerd code blocks already look native in dark mode (dark bg
 * vs dark page = we brighten the border and lighten prose text).
 */

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #818cf8;  /* indigo-400 — lighter for dark bg */
  --md-primary-fg-color--light: #a5b4fc;
  --md-primary-fg-color--dark:  #6366f1;
  --md-accent-fg-color:         #818cf8;
  --md-default-bg-color:        #0f1117;  /* near TUI dark bg */
  --md-default-fg-color:        #e6edf3;
}

[data-md-color-scheme="slate"] .md-typeset pre {
  background: #161b22;
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset code:not(pre code) {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
}

[data-md-color-scheme="slate"] .md-content {
  background: #161b22;
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset table {
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset table th {
  background: #0d1117;
  color: #6b7280;
  border-bottom-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset table td {
  border-bottom-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset table tr:hover td {
  background: #1c2128;
}

[data-md-color-scheme="slate"] .md-header {
  background: #0d1117;
  color: #e6edf3;              /* off-white icons on dark header */
  border-bottom-color: #30363d;
}

[data-md-color-scheme="slate"] .md-header--shadow {
  box-shadow: none;
}

[data-md-color-scheme="slate"] .md-header__title {
  color: #e6edf3;
}

[data-md-color-scheme="slate"] .md-tabs {
  background: #0d1117;
  border-bottom-color: #30363d;
  color: #9ca3af;               /* baseline for active inherit — dark counterpart */
}

/* active tab — dark scheme: item-based selector matches real Material 9.7 markup */
[data-md-color-scheme="slate"] .md-tabs__item--active .md-tabs__link {
  color: #818cf8;               /* indigo-400 — lighter for dark bg */
  border-bottom-color: #818cf8;
}

[data-md-color-scheme="slate"] .md-sidebar {
  background: #0d1117;
}

[data-md-color-scheme="slate"] .md-sidebar--primary {
  border-right-color: #30363d;
}

[data-md-color-scheme="slate"] .md-sidebar--secondary {
  border-left-color: #30363d;
}

/* P1-E dark: footer — near-black surface, hairline borders, hover indigo.
 * Same variable-override fix as the light scheme above. */
[data-md-color-scheme="slate"] .md-footer {
  --md-footer-fg-color:         #e6edf3;  /* off-white — page titles, icons */
  --md-footer-fg-color--light:  #9ca3af;  /* gray-400 — direction labels    */
  --md-footer-fg-color--lighter:#6b7280;  /* gray-500 — secondary chrome    */
  --md-footer-bg-color:         #0d1117;
  --md-footer-bg-color--dark:   #0d1117;

  background: #0d1117;
  border-top-color: #30363d;
  color: #e6edf3;
}

[data-md-color-scheme="slate"] .md-footer__link {
  background: #161b22;
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .md-footer__link:hover {
  border-color: #818cf8;
  color: #818cf8;
}

[data-md-color-scheme="slate"] .md-footer__title {
  color: #6b7280;
}

/* P2-G dark: footer-meta — unified dark surface */
[data-md-color-scheme="slate"] .md-footer-meta {
  background: #0d1117;
  border-top-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  border-bottom-color: #30363d;
}

/* P1-C dark: hr */
[data-md-color-scheme="slate"] .md-typeset hr {
  border-bottom-color: #30363d;
}

/* P1-D dark: blockquote — indigo-400 stripe, muted text, near-black tint bg */
[data-md-color-scheme="slate"] .md-typeset blockquote {
  border-left-color: #818cf8;
  background: rgba(99, 102, 241, 0.06);
  color: #9ca3af;
}

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background: #161b22;
  border-color: #30363d;
}

[data-md-color-scheme="slate"] .md-typeset .note > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .info > .admonition-title {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

/* P1-B dark: tip / warning / danger admonition titles — brand-token tints */
[data-md-color-scheme="slate"] .md-typeset .tip > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .tip > summary {
  background: rgba(22, 163, 74, 0.12);
  color: #4ade80;
}

[data-md-color-scheme="slate"] .md-typeset .warning > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .warning > summary {
  background: rgba(202, 138, 4, 0.12);
  color: #fbbf24;
}

[data-md-color-scheme="slate"] .md-typeset .danger > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .danger > summary {
  background: rgba(220, 38, 38, 0.12);
  color: #f87171;
}

/* ── Mobile polish (@media max-width: 76.1875em = Material's tablet breakpoint) */

/*
 * At narrow viewports (phone/tablet):
 * - Code blocks: long lines scroll WITHIN the block, never overflow the page.
 * - Tables: horizontal scroll inside a wrapper; page never scrolls sideways.
 * - Content card: drop the border/radius treatment so the card fills the
 *   viewport edge-to-edge (a bordered card on a 390 px phone looks cramped).
 * - Inner padding: tighter (1rem) so text doesn't feel squeezed by 1.75 rem
 *   margins on a narrow screen.
 * - Admonitions: tighten horizontal padding.
 */

@media screen and (max-width: 76.1875em) {
  /* Code blocks — scroll within; never push the page */
  .md-typeset pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .md-typeset pre > code {
    white-space: pre;             /* keep lines unbroken; let the block scroll */
    word-break: normal;
    overflow-wrap: normal;
  }

  /* Tables — horizontal scroll within the block */
  .md-typeset table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Content card — fill viewport edge-to-edge on phone; no border/radius clutter */
  .md-content {
    border: none;
    border-radius: 0;
  }

  .md-content__inner {
    padding: 1rem 1rem;
  }

  /* Admonitions — tighter horizontal padding on phone */
  .md-typeset .admonition,
  .md-typeset details {
    padding-left: 0;              /* left-border handles the accent; no extra indent */
  }
}

@media screen and (max-width: 44.9375em) {
  /* Narrow phone (≤ 719 px) — even tighter prose padding */
  .md-content__inner {
    padding: 0.75rem 0.75rem;
  }

  /* Bump body font up slightly on very small screens (min 14 px readable) */
  .md-typeset {
    font-size: 0.875rem;          /* 14 px — avoids sub-13 px at 390 px width */
  }

  /* Code: 0.75 rem on phone so long inline snippets don't force wrap */
  .md-typeset pre > code {
    font-size: 0.75rem;
  }
}
