/*
 * AsmSdk site theme for DocFX's modern template (docs/template/public/main.css).
 *
 * Colors: the NumSharp documentation site's scheme (https://scisharp.github.io/NumSharp/, the
 * "numsharp" template of SciSharp/NumSharp), with the AsmFoundation logo in place of NumSharp's
 * purple:
 *   - Three roles come from the logo, as NumSharp's plum, lavender and cyan do. Depth is the
 *     wordmark's deep teal (the primary button), face is the lower blocks' teal (step numbers,
 *     hover borders, keywords) and edge is the upper blocks' mint (focus rings, marks on night).
 *   - Grounds are neutral: white, and Bootstrap's own charcoal in the dark theme. The brand is an
 *     accent rather than the page, so the night band stands out in both themes.
 *   - Night is a deep teal ground with a soft glow and a 10 x 20 px dot grid, the same in both
 *     themes. The landing page's band and the build card ("dotnet build") use it.
 *   - Paper is the code surface: a faint mint in the light theme, a neutral grey in the dark
 *     one. Code tokens take the same roles: teal keywords, mint-green strings, amber numbers.
 * Type: Archivo (a grotesk with a width axis; headings are set wide) and Martian Mono for code and
 * bytes. Both fonts are self-hosted from ./fonts (SIL Open Font License 1.1, texts beside them),
 * so the site makes no third-party requests.
 *
 * The modern template is Bootstrap 5: colors are set through Bootstrap's CSS variables for the
 * light and dark themes, and the landing page (docs/index.md) uses the asm-* classes.
 */

/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/martian-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/martian-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- palette */
/* Fixed colors: the logo is one image in both themes, and night is night in both themes (as
   NumSharp's band is), so none of these follow the theme switch. */
:root {
  --asm-logo-ink: #062f2e;     /* the wordmark: depth */
  --asm-logo-teal: #06706d;    /* the lower blocks: face */
  --asm-logo-mint: #3eea8c;    /* the upper blocks: edge */
  --asm-logo-pale: #b8f7d4;    /* the mint, paled: bytes on teal, the dark theme's primary button */

  --asm-night: #041716;        /* the band's ground */
  --asm-night-deep: #020e0d;   /* panels on the ground: code blocks and cards */
  --asm-night-glow: rgba(10, 74, 69, 0.9);   /* the band's center glow */
  --asm-night-cell: #0f3c39;   /* the dot grid and the panels' rules */
  --asm-mist: #e3f6f0;         /* headings and code on night */
  --asm-mist-muted: #a1c6c0;   /* prose on night */
}

/* Light theme roles. The grounds and body text stay Bootstrap's (white, #212529), as NumSharp's
   do; only the roles below carry the brand. */
:root,
[data-bs-theme="light"] {
  --asm-heading: var(--asm-logo-ink);  /* headings: the wordmark's color */
  --asm-face: var(--asm-logo-teal);    /* step numbers, hover borders */
  --asm-depth: var(--asm-logo-ink);    /* the primary button */
  --asm-depth-hover: #0c4b48;
  --asm-on-depth: #ffffff;
  --asm-paper: #f4f9f7;                /* code surfaces, and a band's ground unless it is night */
  --asm-paper-line: #d9e7e3;

  /* Code tokens (highlight.js classes, see "code tokens" below). Every one reaches WCAG AA (4.5:1)
     on paper, comments included: NumSharp dims its comments to 3.35:1, but this site's comments
     explain the code (the NASM guide annotates line by line), so they stay readable. */
  --asm-code: #14201f;
  --asm-tok-keyword: #06706d;
  --asm-tok-type: #0f5f84;
  --asm-tok-string: #0b7a45;
  --asm-tok-number: #a35708;
  --asm-tok-comment: #647573;
  --asm-tok-punct: #5f6f6d;
  --asm-tok-attr: #2d5c58;
  /* Callout edges (see "callouts"): notes and tips take the face; warnings the number tokens'
     amber; important and caution this red, the one color the logo cannot give a warning sign. */
  --asm-danger: #b42318;

  /* Bootstrap's own variables, pointed at the roles above, so the chrome DocFX builds from
     Bootstrap (the navigation, "In this article", tables, the footer) speaks the theme too.
     Each -rgb twin must match its color: Bootstrap 5.3 paints links, .link-* and .text-*
     utilities from the rgb form, not the hex one. */
  --bs-link-color: #06706d;            /* the face */
  --bs-link-color-rgb: 6, 112, 109;
  --bs-link-hover-color: #054f4d;
  --bs-link-hover-color-rgb: 5, 79, 77;
  --bs-code-color: var(--asm-code);    /* inline code is code-colored, on a paper chip */
  --bs-emphasis-color: #062f2e;        /* Bootstrap's emphasis (#000): active navigation, the
                                          "In this article" H2 entries; now the heading color */
  --bs-emphasis-color-rgb: 6, 47, 46;
  --bs-secondary-rgb: 89, 92, 95;      /* .text-secondary/.link-secondary (the footer, the
                                          H3 entries): --bs-secondary-color on white, as the
                                          lede and captions are, instead of a fixed #6c757d */
  --bs-primary: #06706d;
  --bs-primary-rgb: 6, 112, 109;
}

/* Dark theme roles. The ground is Bootstrap's charcoal (#212529, not overridden), as on NumSharp's
   site: a brand-tinted page would swallow the night band, which is the same deep teal. */
[data-bs-theme="dark"] {
  --asm-heading: #f1f8f6;
  --asm-face: #6fd8c6;
  --asm-depth: var(--asm-logo-pale);   /* NumSharp's dark primary is its pale lavender */
  --asm-depth-hover: #d7fae8;
  --asm-on-depth: var(--asm-logo-ink);
  --asm-paper: #1b1f24;                /* NumSharp's dark paper: neutral, a step below the page */
  --asm-paper-line: #343a40;

  --asm-code: #e9ecef;
  --asm-tok-keyword: #5fd6c3;
  --asm-tok-type: #7cc7ec;
  --asm-tok-string: #7ee8b0;
  --asm-tok-number: #f2c46d;
  --asm-tok-comment: #8c9b99;
  --asm-tok-punct: #a8b6b4;
  --asm-tok-attr: #a9dcd3;
  --asm-danger: #f97066;

  --bs-link-color: #6fd8c6;            /* the face */
  --bs-link-color-rgb: 111, 216, 198;
  --bs-link-hover-color: #b8f7d4;      /* the logo's pale mint */
  --bs-link-hover-color-rgb: 184, 247, 212;
  --bs-code-color: var(--asm-code);
  --bs-emphasis-color: #f1f8f6;        /* the heading color, where Bootstrap has #fff */
  --bs-emphasis-color-rgb: 241, 248, 246;
  --bs-secondary-rgb: 175, 179, 183;   /* --bs-secondary-color on charcoal: Bootstrap keeps
                                          #6c757d here, 3.6:1, under WCAG AA */
}

/* ---------------------------------------------------------------- base type */
body {
  --bs-body-font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-font-monospace: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: var(--bs-body-font-family);
  font-size: 16.5px;
  line-height: 1.6;
}

code, kbd, pre, samp, .hljs {
  font-family: var(--bs-font-monospace);
  font-size: 0.86em;
}

article h1, article h2, article h3, article h4 {
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 112%;
  color: var(--asm-heading);
  letter-spacing: -0.01em;
}
article h1 { font-weight: 720; }
article h2 { font-weight: 680; margin-top: 2.2rem; }
article h3 { font-weight: 650; }

/* Readable measure for prose; tables and code may use the full column. */
article > p, article > ul, article > ol, article > blockquote { max-width: 46rem; }

/* Wide tables (command columns, long property names) scroll inside their own box instead of
   being clipped by the content column; code in cells may wrap at spaces like any text. */
article table { font-size: 0.95em; display: block; max-width: 100%; overflow-x: auto; }

/* Code blocks sit on paper, NumSharp's code surface. The attribute selector outranks the
   template's own [data-bs-theme=dark] .hljs background, which would otherwise paint #1e1e1e. */
pre {
  background: var(--asm-paper);
  border: 1px solid var(--asm-paper-line);
  border-radius: 8px;
}
[data-bs-theme] pre code.hljs { background: transparent; }

/* Inline code: the code blocks' own text color on a paper chip, the code blocks' surface. Before,
   inline code kept the old theme's teal (#0b5c59; mint #8ff0c0 in the dark theme), a near twin of
   the link color, so every property name in a sentence or a table cell read as a link. The chip
   marks code by its surface instead of a color; box-decoration-break gives a chip that wraps
   across lines its edges on each line. In a link, code keeps the link's color, so the link still
   reads as one; in a heading it is the heading's text, without a chip. */
:not(pre) > code {
  color: var(--asm-code);
  background: var(--asm-paper);
  border: 1px solid var(--asm-paper-line);
  border-radius: 5px;
  padding: 0.08em 0.32em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
a > code { color: inherit; }
h1 > code, h2 > code, h3 > code, h4 > code, h5 > code, h6 > code {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}

/* ---------------------------------------------------------------- tables */
/* Bootstrap colors table text with the emphasis color, a step off the prose around it (pure
   black or white before this theme); cells take the body's text color, like every paragraph. */
.table { --bs-table-color: var(--bs-body-color); }

/* ---------------------------------------------------------------- callouts */
/* DocFX turns > [!NOTE] and > [!TIP] into Bootstrap's alert-info (cyan), > [!WARNING] into
   alert-warning (yellow) and > [!IMPORTANT] / > [!CAUTION] into alert-danger (red): none of them
   the theme's. Every callout is paper with the body's text, like NumSharp's feature notes, and
   only its 4 px left edge and its title carry a role color. Chips inside take the page's ground,
   since paper on paper would hide them. */
.alert-info, .alert-warning, .alert-danger {
  --bs-alert-color: var(--bs-body-color);
  --bs-alert-bg: var(--asm-paper);
  --bs-alert-border-color: var(--asm-paper-line);
  --bs-alert-link-color: var(--bs-link-color);
  border-left: 4px solid var(--asm-callout);
}
.alert-info { --asm-callout: var(--asm-face); }
.alert-warning { --asm-callout: var(--asm-tok-number); }
.alert-danger { --asm-callout: var(--asm-danger); }
.alert > h5 { color: var(--asm-callout); }
.alert :not(pre) > code { background: var(--bs-body-bg); }

/* ---------------------------------------------------------------- code tokens */
/* DocFX colors highlight.js with Visual Studio's theme (light: blue keywords, red strings) and VS
   2015's (dark). These rules give every token group a role variable instead, so code follows the
   scheme in both themes and inside the night band, which only re-points the variables.
   Specificity: [data-bs-theme] .hljs-x equals the template's [data-bs-theme=dark] .hljs-x and
   main.css loads after docfx.min.css, so these win; the two .hljs-meta descendants repeat the
   template's own three-part selectors for the same reason. Italic comments are dropped: Martian
   Mono has no italic, and the browser would slant it synthetically. */
[data-bs-theme] .hljs { color: var(--asm-code); }
[data-bs-theme] .hljs-keyword,
[data-bs-theme] .hljs-selector-tag,
[data-bs-theme] .hljs-name,
[data-bs-theme] .hljs-literal,
[data-bs-theme] .hljs-link { color: var(--asm-tok-keyword); }
[data-bs-theme] .hljs-built_in,
[data-bs-theme] .hljs-type,
[data-bs-theme] .hljs-class,
[data-bs-theme] .hljs-meta,
[data-bs-theme] .hljs-meta .hljs-keyword { color: var(--asm-tok-type); }
[data-bs-theme] .hljs-string,
[data-bs-theme] .hljs-regexp,
[data-bs-theme] .hljs-template-tag,
[data-bs-theme] .hljs-template-variable,
[data-bs-theme] .hljs-meta .hljs-string { color: var(--asm-tok-string); }
[data-bs-theme] .hljs-number,
[data-bs-theme] .hljs-symbol,
[data-bs-theme] .hljs-bullet { color: var(--asm-tok-number); }
[data-bs-theme] .hljs-comment,
[data-bs-theme] .hljs-quote,
[data-bs-theme] .hljs-doctag { color: var(--asm-tok-comment); font-style: normal; }
[data-bs-theme] .hljs-tag { color: var(--asm-tok-punct); }
[data-bs-theme] .hljs-attr,
[data-bs-theme] .hljs-attribute,
[data-bs-theme] .hljs-variable,
[data-bs-theme] .hljs-selector-id,
[data-bs-theme] .hljs-selector-class,
[data-bs-theme] .hljs-selector-attr,
[data-bs-theme] .hljs-selector-pseudo { color: var(--asm-tok-attr); }
[data-bs-theme] .hljs-title,
[data-bs-theme] .hljs-section,
[data-bs-theme] .hljs-function,
[data-bs-theme] .hljs-params,
[data-bs-theme] .hljs-subst,
[data-bs-theme] .hljs-formula { color: var(--asm-code); }

/* ---------------------------------------------------------------- chrome */
/* Breathing room at the page edges; the header and the content share one inset. */
.container-xxl { padding-inline: clamp(1rem, 3vw, 2.5rem); }

/* The navbar: logo plus a wide-set product name, like the landing page headline. */
.navbar-brand {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-stretch: 112%;
  color: var(--asm-heading);
}
.navbar-brand #logo { width: 26px; height: 26px; margin-right: 0.5rem; }

/* "In this article": sentence case like every other label on the site. */
.affix h5 {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--asm-heading);
}

/* "In this article" lists H2 entries as .link-body-emphasis and H3 entries as .link-secondary.
   Bootstrap hovers .link-secondary to a fixed dark grey (#565e64) that all but vanishes on the
   dark theme's charcoal; hover it to the emphasis color, as the H2 entries are drawn. Bootstrap's
   rule is !important, so this one must be too. */
.link-secondary:hover, .link-secondary:focus { color: rgba(var(--bs-emphasis-color-rgb), 1) !important; }

/* Focus rings are the logo's edge color, as NumSharp's are its cyan. */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--asm-logo-mint);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- landing page */
.asm-landing h1, .asm-landing h2, .asm-landing h3 { color: var(--asm-heading); font-family: "Archivo", system-ui, sans-serif; }
.asm-landing code { font-family: var(--bs-font-monospace); }

.asm-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4.5rem 0 4rem;
}
.asm-hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.45rem);
  line-height: 1.06;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
}
.asm-lede { font-size: 1.2rem; max-width: 32em; margin: 0 0 2rem; color: var(--bs-secondary-color); }
.asm-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Buttons, as NumSharp's: the primary is the depth color (deep teal; pale mint in the dark
   theme), the secondary an outline on the page whose border takes the face color on hover. */
.asm-btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.asm-btn-primary { border-color: var(--asm-depth); background: var(--asm-depth); color: var(--asm-on-depth); }
.asm-btn-primary:hover { border-color: var(--asm-depth-hover); background: var(--asm-depth-hover); color: var(--asm-on-depth); }
.asm-btn-secondary { border-color: var(--asm-paper-line); color: var(--asm-heading); }
.asm-btn-secondary:hover { border-color: var(--asm-face); color: var(--asm-heading); }

/* The byte A: the one bold element. Brand colors stay the same in both themes. */
.asm-byte-a { margin: 0; }
.asm-byte-a svg { display: block; width: 100%; max-width: 470px; margin: 0 auto; }
.asm-byte-a text {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 46px;
  dominant-baseline: central;
  text-anchor: middle;
}
.asm-byte-mint rect { fill: var(--asm-logo-mint); }
.asm-byte-mint text { fill: var(--asm-logo-ink); }
.asm-byte-teal rect { fill: var(--asm-logo-teal); }
.asm-byte-teal text { fill: var(--asm-logo-pale); }
/* The caption's code (hello_add, lea eax, [rdi + rsi], 8D 04 37) is plain inline code: the code
   color on a paper chip, like every sentence on the site. */
.asm-byte-a figcaption { font-size: 0.9rem; color: var(--bs-secondary-color); max-width: 470px; margin: 1.1rem auto 0; }

/* Sections. */
.asm-section { padding: 3.5rem 0; }
.asm-section h2 { font-size: 1.9rem; font-weight: 700; font-stretch: 112%; margin: 0 0 1.6rem; }
.asm-section h2 a { color: inherit; text-decoration: none; }
.asm-section h2 a:hover { text-decoration: underline; }

/* Bands span the full width. A band's ground is a layer behind it that reaches 100vmax past
   both sides: paper by default, night with .asm-night. A layer rather than a box-shadow spread
   (this file's earlier way), because the night ground is three images (glow, dot grid, color)
   and a shadow can only spread one color. isolation keeps the layer's z-index: -1 inside the
   band, behind its content but above anything under it.
   The reach is real layout overflow, unlike a shadow: DocFX's overflow-x: hidden on <html> stops
   desktop browsers from scrolling sideways, but a phone's browser widened its layout viewport
   to the layer (measured: 1218 px instead of 390, the page zoomed out). clip on <body> cuts the
   overflow before the viewport sees it; it is not a scroll container, so the sticky header and
   the fixed table-of-contents drawer behave as before. */
body[data-layout="landing"] { overflow-x: clip; }
.asm-band { position: relative; isolation: isolate; }
.asm-band::before {
  content: "";
  position: absolute;
  inset: 0 -100vmax;
  z-index: -1;
  background: var(--asm-paper);
}

/* Night, NumSharp's band ("Three files to a shared library"): the ground continues past the
   content with a glow in the middle and a dot grid, the same in both themes. The glow is sized
   in viewport units because the layer is far wider than the band; a percentage would spread it
   over the whole layer. Same specificity as .asm-band::before and later, so it replaces paper. */
.asm-night::before {
  background:
    radial-gradient(ellipse 46vw 62% at 50% 56%, var(--asm-night-glow), transparent 72%),
    radial-gradient(circle, var(--asm-night-cell) 0.75px, transparent 1.25px) 0 0 / 10px 20px,
    var(--asm-night);
}
.asm-night {
  color: var(--asm-mist-muted);
  /* Code on night always uses the dark token set, whatever the page's theme. */
  --asm-code: var(--asm-mist);
  --asm-tok-keyword: #5fd6c3;
  --asm-tok-type: #7cc7ec;
  --asm-tok-string: #7ee8b0;
  --asm-tok-number: #f2c46d;
  --asm-tok-comment: #7f9c97;
  --asm-tok-punct: #9fb9b4;
  --asm-tok-attr: #a9dcd3;
  /* Bootstrap's code color must be re-pointed here, not inherited: a custom property inherits
     the color it resolved to on <html> (the page theme's code color), not its var() reference. */
  --bs-code-color: var(--asm-mist);
}
.asm-landing .asm-night h2,
.asm-landing .asm-night h3 { color: var(--asm-mist); }
/* Inline code in the band's prose sits on a night chip, as code blocks sit on night panels; a
   paper chip would be a white blot on night. Headings' code stays chipless (the base rule). */
.asm-night :is(p, li, dd, td) > code { background: var(--asm-night-deep); border-color: var(--asm-night-cell); }
/* NumSharp's band title glows faintly in its neon; here the neon is the logo's mint. */
.asm-landing .asm-night h2 { text-shadow: 0 0 28px rgba(62, 234, 140, 0.35); }
.asm-night a { color: var(--asm-logo-pale); }
.asm-night a:hover { color: #ffffff; }
.asm-night pre { background: var(--asm-night-deep); border-color: var(--asm-night-cell); }
.asm-night .asm-steps h3::before { color: var(--asm-logo-mint); }

/* Three steps: a real sequence, so it is numbered. */
.asm-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; counter-reset: step; }
.asm-steps > li { counter-increment: step; }
.asm-steps h3 { font-size: 1.05rem; font-weight: 650; margin: 0 0 0.8rem; }
.asm-steps h3::before {
  content: counter(step);
  display: block;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--asm-face);
  margin-bottom: 0.2rem;
}
.asm-steps pre { margin: 0 0 0.8rem; font-size: 0.8rem; }
/* On the paper band the code cards are the page's own ground, so they stand off the band. */
.asm-band:not(.asm-night) .asm-steps pre { background: var(--bs-body-bg); }
.asm-steps p { font-size: 0.95rem; margin: 0; }

/* The build map. */
.asm-map {
  display: grid;
  grid-template-columns: 1fr 28px 1.25fr 28px 1fr 28px 1fr;
  align-items: center;
}
.asm-map-col h3 { font-size: 0.95rem; font-weight: 650; color: var(--bs-secondary-color); margin: 0 0 0.6rem; }
.asm-map-item {
  background: var(--bs-body-bg);
  border: 1px solid var(--asm-paper-line);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
}
/* A map item's code is the card's title (*.asm, hello.dll), so it stays plain: no chip inside a
   card that is already a paper-lined box. */
.asm-map-item code { color: var(--asm-heading); background: none; border: 0; padding: 0; }
.asm-map-item span { display: block; color: var(--bs-secondary-color); }
.asm-map-arrow { height: 2px; background: var(--asm-face); position: relative; }
.asm-map-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  border: 6px solid transparent;
  border-left: 8px solid var(--asm-face);
}
/* The build itself is a machine at work, so it is a night panel in both themes, like NumSharp's
   output strip under its editor; its stages are marked with the logo's mint edge. */
.asm-map-sdk {
  background: var(--asm-night);
  border: 1px solid var(--asm-night-cell);
  color: var(--asm-mist-muted);
  border-radius: 10px;
  padding: 1.1rem 1.1rem 0.4rem;
}
.asm-map-sdk-title { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--asm-mist); margin-bottom: 0.8rem; }
.asm-map-stage { border-left: 3px solid var(--asm-logo-mint); padding: 0.2rem 0 0.2rem 0.75rem; margin-bottom: 0.75rem; }
.asm-map-stage b { display: block; color: var(--asm-mist); font-weight: 600; }
.asm-map-stage span { font-size: 0.88rem; color: var(--asm-mist-muted); }

/* Ecosystem and toolchain, side by side. */
.asm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; border-top: 1px solid var(--bs-border-color); }
.asm-list { display: grid; grid-template-columns: 11rem 1fr; row-gap: 0.8rem; column-gap: 1.2rem; margin: 0; }
.asm-list dt { font-weight: 650; color: var(--asm-heading); }
.asm-list dd { margin: 0; }

/* Grid children default to min-width: auto, so one long code line would widen the page past
   a phone's screen; letting them shrink keeps overflow inside the code block's own scroller. */
.asm-hero > *, .asm-steps > li, .asm-map > *, .asm-two > * { min-width: 0; }
.asm-landing pre { max-width: 100%; overflow-x: auto; }

@media (max-width: 992px) {
  .asm-hero, .asm-two { grid-template-columns: 1fr; gap: 2.5rem; }
  .asm-steps { grid-template-columns: 1fr; }
  .asm-map { grid-template-columns: 1fr; }
  .asm-map-arrow { display: none; }
  .asm-map-sdk { margin-bottom: 1rem; }
}

/* On phones, a name column would squeeze the descriptions into a few words per line. */
@media (max-width: 576px) {
  .asm-list { grid-template-columns: 1fr; row-gap: 0.15rem; }
  .asm-list dd { margin-bottom: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
