/* EZRA docs (docs/templates/docs/base_ezra.html: /ezra/docs/ and /ezra/docs/<slug>/ only). EZRA is a tool in
 * EZPZ Trading, so the docs sit under the EZPZ site header and the EZRA sub-nav (partials/_site_header.html), in
 * the EZPZ brand, full width and dark only. Loaded after partials/_site_assets.html (the site CSS, the EZRA v10
 * stack and ezra-brand.css). Prefix ezd-.
 * Colour: tokens only. On .ezp-page they resolve to the EZPZ brand values (ezra-brand.css); inside .ezp-app-frame
 * (each recorded example, <ezra-example>) they go back to EZRA's own, so the app looks like the app. --sweep, the
 * brand gradient, marks the eyebrow and the hero line (else --p). Nothing here uses market green / red.
 * Sticky: --ezp-sticky-top (ezra-brand.css) is the site header + sub-nav height, with its own phone value. The
 * left nav, "On this page" and the docs bar stick there; anchor jumps and focus land below it (WCAG 2.4.11).
 * Width: a 1600px column with clamp(16px, 4vw, 64px) gutters; the nav (280px) and "On this page" (240px) sit at
 * its edges and the article keeps a ~760px reading line, centred in the middle column.
 * Host isolation (ezra.css): headings take --ez-h, links --ez-a / --ez-a-hover, tables --ez-tfs.
 * The prose rules hang off the body's top-level blocks (.ezd-prose > p ...) so they never reach inside a
 * recorded example, which keeps EZRA's own answer styles.
 * Breakpoints: 720 (phone), 1100 (three columns from here; a nav drawer and a compact "On this page" below) and
 * 1600 (wider side columns). Replaces learn-ezra.css on EZRA pages (the old Learn-themed EZRA styles). */

/* <html> sits outside .ezp-page, so the px fallback (site header + sub-nav) covers a --ezp-sticky-top that is
   only set on .ezp-page. Below 1100 the docs bar (40px control + 16px + 1px border) sticks under it too. */
html.ezd-html { scroll-padding-top: calc(var(--ezp-sticky-top, 125px) + 16px); }
@media (max-width: 1099.98px) { html.ezd-html { scroll-padding-top: calc(var(--ezp-sticky-top, 125px) + 57px + 16px); } }

.ezd-page {
  --ezd-sticky: var(--ezp-sticky-top, 125px);
  --ezd-bar: calc(var(--ctl-h-lg) + var(--sp-4) + 1px);
  --ezd-max: 1600px;
  --ezd-gutter: clamp(16px, 4vw, 64px);
  --ezd-gap: clamp(var(--sp-6), 3vw, calc(var(--sp-8) * 2));
  --ezd-nav-w: 280px;
  --ezd-toc-w: 240px;
  --ezd-read: 760px;                              /* the reading line */
  --ezd-accent: var(--sweep, var(--p));
}
.ezd-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Layout: full width, nav and "On this page" at the edges, the article centred ── */
.ezd-col {
  box-sizing: border-box; width: 100%; max-width: var(--ezd-max); margin-inline: auto; padding-inline: var(--ezd-gutter);
}
.ezd-layout {
  flex: 1; display: grid; align-items: start; gap: 0 var(--ezd-gap);
  grid-template-columns: var(--ezd-nav-w) minmax(0, 1fr) var(--ezd-toc-w);
}
.ezd-layout.is-home { grid-template-columns: var(--ezd-nav-w) minmax(0, 1fr); }
.ezd-main { min-width: 0; padding: calc(var(--sp-8) + var(--sp-2)) 0 calc(var(--sp-8) * 2); }
.ezd-main:focus { outline: none; }
.ezd-article { max-width: var(--ezd-read); margin-inline: auto; }

/* ── Left nav ── */
.ezd-nav {
  position: sticky; top: var(--ezd-sticky); max-height: calc(100vh - var(--ezd-sticky)); max-height: calc(100dvh - var(--ezd-sticky));
  overflow: auto; overscroll-behavior: contain;
  padding: var(--sp-8) var(--sp-4) var(--sp-8) 0; border-right: 1px solid var(--border);
}
.ezd-search-btn {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%;
  height: calc(var(--ctl-h) + var(--sp-1)); padding: 0 10px; margin-bottom: var(--sp-5);
  border: 1px solid var(--border2); border-radius: var(--r-sm); background: var(--bg2); color: var(--faint);
  font-size: var(--fs-13); text-align: left;
}
.ezd-search-btn:hover { border-color: var(--p3); color: var(--muted); }
.ezd-search-btn .ez-kbd { margin-left: auto; }
.ezd-nav-home, .ezd-nav-link {
  display: block; padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--fs-14); line-height: var(--lh-snug);
  --ez-a: var(--muted); --ez-a-hover: var(--bright);
}
.ezd-nav-home { margin-bottom: var(--sp-4); font-weight: 500; }
.ezd-nav-home:hover, .ezd-nav-link:hover { background: var(--bg3); }
.ezd-nav-home[aria-current="page"], .ezd-nav-link[aria-current="page"] {
  --ez-a: var(--p-text); --ez-a-hover: var(--p-text); background: var(--p1); font-weight: 600;
}
.ezd-group { margin-bottom: var(--sp-5); }
.ezd-group-title { margin: 0 0 var(--sp-2); padding: 0 10px; font-size: var(--fs-12); font-weight: 600; line-height: 1; color: var(--bright); }
.ezd-group-list { margin: 0; padding: 0; list-style: none; }
.ezd-group-list li + li { margin-top: 2px; }
.ezd-nav-back {
  display: inline-block; margin-top: var(--sp-2); padding: 6px 10px; font-size: var(--fs-12);
  --ez-a: var(--faint); --ez-a-hover: var(--muted);
}

/* ── Right "On this page" ── */
.ezd-toc-col {
  position: sticky; top: var(--ezd-sticky); max-height: calc(100vh - var(--ezd-sticky)); max-height: calc(100dvh - var(--ezd-sticky));
  overflow: auto; padding: calc(var(--sp-8) + var(--sp-2)) 0 var(--sp-8);
}
.ezd-toc-title { margin: 0 0 10px; font-size: var(--fs-12); font-weight: 600; line-height: 1; color: var(--bright); }
.ezd-toc-list { margin: 0; padding: 0; list-style: none; }
.ezd-toc-link {
  display: block; padding: 5px 0 5px var(--sp-3); border-left: 1px solid var(--border);
  font-size: var(--fs-13); line-height: var(--lh-snug); --ez-a: var(--faint); --ez-a-hover: var(--bright);
}
.ezd-toc-link.is-h3 { padding-left: var(--sp-6); }
.ezd-toc-link[aria-current="true"] { border-left-color: var(--p); --ez-a: var(--p-text); --ez-a-hover: var(--p-text); font-weight: 500; }
.ezd-toc-compact { display: none; }

/* ── Tablet / phone docs bar (the nav drawer button + search) ── */
.ezd-bar { display: none; }

/* ── Article head ── */
.ezd-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font-size: var(--fs-13); color: var(--faint); }
.ezd-crumbs li + li::before { content: "/"; margin: 0 var(--sp-2); color: var(--faint); }
.ezd-crumbs a { --ez-a: var(--muted); --ez-a-hover: var(--bright); }
.ezd-title {
  margin: var(--sp-3) 0 0; font-size: clamp(var(--fs-28), 3.4vw, calc(var(--fs-28) * 1.36)); font-weight: 700;
  line-height: var(--lh-tight); letter-spacing: -.03em; --ez-h: var(--bright); text-wrap: balance;
}
.ezd-lede { margin: var(--sp-3) 0 0; font-size: var(--fs-17); line-height: var(--lh-normal); color: var(--muted); }
.ezd-head { margin-bottom: var(--sp-6); }

/* ── Prose (the git-tracked body, docs/bodies/<slug>.html) ── */
.ezd-prose { font-size: var(--fs-prose); line-height: var(--lh-prose); color: var(--text); }
.ezd-prose > :first-child { margin-top: 0; }
.ezd-prose > p { margin: 0 0 var(--sp-4); }
.ezd-prose > h2 {
  position: relative; margin: calc(var(--sp-8) * 1.375) 0 var(--sp-3); font-size: calc(var(--fs-20) * 1.2); font-weight: 700;
  line-height: var(--lh-tight); letter-spacing: -.02em; --ez-h: var(--bright);
}
.ezd-prose > h3 { position: relative; margin: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-17); font-weight: 600; line-height: var(--lh-snug); --ez-h: var(--bright); }
.ezd-prose > :is(h2, h3) .lc-anchor {
  margin-left: var(--sp-2); font-weight: 500; text-decoration: none; opacity: 0;
  --ez-a: var(--faint); --ez-a-hover: var(--p-text);
}
.ezd-prose > :is(h2, h3):hover .lc-anchor, .ezd-prose .lc-anchor:focus-visible, .ezd-prose .lc-anchor.is-copied { opacity: 1; }
.ezd-prose .lc-anchor.is-copied { --ez-a: var(--p-text); }
@media (hover: none) { .ezd-prose > :is(h2, h3) .lc-anchor { opacity: .6; } }

.ezd-prose > :is(p, ul, ol, blockquote, table, .lc-table-scroll, figure, .lc-callout) a {
  --ez-a: var(--p-text); --ez-a-hover: var(--p-text);
  text-decoration: underline; text-decoration-color: var(--p3); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.ezd-prose > :is(p, ul, ol, blockquote, table, .lc-table-scroll, figure, .lc-callout) a:hover { text-decoration-color: currentColor; }
.ezd-prose > :is(p, ul, ol, blockquote, .lc-table-scroll, .lc-callout) strong { font-weight: 600; color: var(--bright); }
.ezd-prose > :is(p, ul, ol, blockquote, .lc-table-scroll, .lc-callout) :is(kbd, code) {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--border2); border-radius: var(--r-xs);
  background: var(--bg3); color: var(--bright); font: 500 .85em/1.4 var(--mono); white-space: nowrap;
}
.ezd-prose > :is(p, ul, ol, blockquote, .lc-table-scroll, .lc-callout) kbd { box-shadow: inset 0 -1px 0 var(--border2); }
.ezd-prose > pre {
  margin: var(--sp-5) 0; padding: var(--sp-4); overflow: auto; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg2); color: var(--text); font: 400 var(--fs-13)/var(--lh-normal) var(--mono);
}

/* lists: bullets in --faint; a top-level <ol> is a numbered step list (mockup .dsteps) */
.ezd-prose > ul { margin: 0 0 var(--sp-5); padding-left: var(--sp-6); }
.ezd-prose > ul > li, .ezd-prose > ul ul > li { margin: var(--sp-1) 0; padding-left: var(--sp-1); }
.ezd-prose > ul li::marker { color: var(--faint); }
.ezd-prose > ul ul { margin: var(--sp-1) 0; padding-left: var(--sp-5); }
.ezd-prose > ol {
  counter-reset: ezd-step; margin: var(--sp-5) 0 var(--sp-6) calc(var(--sp-3) + 1px); padding: 0; list-style: none;
  border-left: 1px solid var(--border2);
}
.ezd-prose > ol > li { counter-increment: ezd-step; position: relative; padding: 2px 0 var(--sp-5) calc(var(--sp-6) + var(--sp-1)); }
.ezd-prose > ol > li:last-child { padding-bottom: var(--sp-1); }
.ezd-prose > ol > li::before {
  content: counter(ezd-step); position: absolute; left: calc(-1 * (var(--sp-3) + 1px)); top: 2px;
  display: grid; place-items: center; width: calc(var(--sp-6) + 2px); height: calc(var(--sp-6) + 2px); border-radius: var(--r-full);
  background: var(--bg3); border: 1px solid var(--border2); color: var(--bright); font-size: var(--fs-12); font-weight: 700; line-height: 1;
}
.ezd-prose > ol ul, .ezd-prose > ol ol { margin: var(--sp-2) 0 0; padding-left: var(--sp-5); }
.ezd-prose > ul.lc-ezra-more { columns: 2; column-gap: var(--sp-8); }
.ezd-prose > ul.lc-ezra-more li { break-inside: avoid; }

/* callouts: <blockquote> or a Learn callout block (mockup .call) */
.ezd-prose > :is(blockquote, .lc-callout) {
  margin: var(--sp-5) 0; padding: 14px var(--sp-4); border: 1px solid var(--p3); border-radius: var(--r);
  background: var(--p1); color: var(--text); font-size: var(--fs-15);
}
.ezd-prose > :is(blockquote, .lc-callout) > :first-child { margin-top: 0; }
.ezd-prose > :is(blockquote, .lc-callout) > :last-child { margin-bottom: 0; }

/* tables (learn-prose.js wraps each in a focusable .lc-table-scroll region) */
.ezd-prose > :is(.lc-table-scroll, table) { margin: var(--sp-5) 0 var(--sp-6); }
.ezd-prose > .lc-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.ezd-prose > :is(.lc-table-scroll, table) { --ez-tfs: var(--fs-14); }
.ezd-prose > .lc-table-scroll > table, .ezd-prose > table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table :is(th, td) { padding: 10px 14px; text-align: left; vertical-align: top; line-height: var(--lh-snug); }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table th { background: var(--bg2); color: var(--bright); font-weight: 600; border-bottom: 1px solid var(--border2); }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table td { border-top: 1px solid var(--border); }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table tr:first-child td { border-top: 0; }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table :is(th, td):first-child { padding-left: var(--sp-4); }
:is(.ezd-prose, .ezd-prose > .lc-table-scroll) > table :is(strong, a) { font-weight: 600; }

/* images, figures and screenshot galleries */
.ezd-prose > :is(p, figure) img, .ezd-prose .lc-screenshot img {
  display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r);
}
.ezd-prose > figure, .ezd-prose .lc-screenshot { margin: var(--sp-5) 0; }
.ezd-prose > figure figcaption, .ezd-prose .lc-screenshot figcaption { margin-top: var(--sp-2); font-size: var(--fs-13); color: var(--faint); }
.ezd-prose > hr { margin: var(--sp-8) 0; border: 0; border-top: 1px solid var(--border); }

/* tabs (learn-prose.js) */
.ezd-prose .lc-tablist { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.ezd-prose .lc-tab-btn {
  margin-bottom: -1px; padding: var(--sp-2) var(--sp-3); border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font-size: var(--fs-14); font-weight: 500;
}
.ezd-prose .lc-tab-btn[aria-selected="true"] { border-bottom-color: var(--p); color: var(--bright); }

/* ── Recorded examples (<ezra-example>, ezra_v10/public/example-embed.js) in an app-window frame. The view marks
   each one .ezp-app-frame (docs.ezra.mark_app_frames), so these tokens are EZRA's own, not the page brand. ── */
.ezd-prose ezra-example { display: block; margin: var(--sp-6) 0 var(--sp-8); }
.ezd-prose ezra-example:empty { display: none; }
.ezd-prose .lc-ezra-example {
  margin: 0; overflow: hidden; border: 1px solid var(--border2); border-radius: var(--r-lg); background: var(--bg);
  box-shadow: var(--shadow-pop), 0 0 0 1px var(--p1);
}
.ezd-prose .lc-ezra-example::before {   /* the window bar: three quiet dots */
  content: ""; display: block; height: calc(var(--sp-8) + var(--sp-1)); border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 18px 50%, var(--border2) 0 5px, transparent 5.5px),
    radial-gradient(circle at 34px 50%, var(--border2) 0 5px, transparent 5.5px),
    radial-gradient(circle at 50px 50%, var(--border2) 0 5px, transparent 5.5px),
    var(--bg2);
}
.ezd-prose .lc-ezra-example-body { padding: var(--sp-4); max-height: calc(var(--sp-8) * 16); overflow: auto; }
.ezd-prose .lc-ezra-example-body:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }   /* keyboard-scrollable region */
.ezd-prose .lc-ezra-example-cap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4);
  padding: 10px var(--sp-4); border-top: 1px solid var(--border); background: var(--bg2);
  font-size: var(--fs-12); line-height: var(--lh-snug); color: var(--faint);
}
.ezd-prose .lc-ezra-example-cap a { font-weight: 600; --ez-a: var(--p-text); --ez-a-hover: var(--p-text); }
.ezd-prose ezra-example .ezp-poster-frame { width: auto; transform: none; padding: 0; }
.ezd-prose ezra-example figure { margin: 0; }

/* ── "See it in EZRA" at the end of a guide (docs/ezra_page.html, docs.ezra.EZRA_SEE_IT) ── */
.ezd-seeit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-8); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg2);
}
.ezd-seeit-title { margin: 0; font-size: var(--fs-12); font-weight: 600; line-height: var(--lh-snug); letter-spacing: var(--track-caps); text-transform: uppercase; --ez-h: var(--faint); }
.ezd-seeit-link {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--ctl-h); font-size: var(--fs-15); font-weight: 600;
  line-height: var(--lh-snug); --ez-a: var(--p-text); --ez-a-hover: var(--p-text);
}
.ezd-seeit-link span { text-decoration: underline; text-decoration-color: var(--p3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ezd-seeit-link:hover span { text-decoration-color: currentColor; }
.ezd-seeit-link svg { flex-shrink: 0; }

/* ── FAQ (docs/includes/faq.html) ── */
.ezd-article .lc-section { margin-top: calc(var(--sp-8) * 1.375); }
.ezd-article .lc-section > h2 {
  margin: 0 0 var(--sp-3); font-size: calc(var(--fs-20) * 1.2); font-weight: 700; line-height: var(--lh-tight);
  letter-spacing: -.02em; --ez-h: var(--bright);
}
.ezd-article .lc-faq-item { border-bottom: 1px solid var(--border); }
.ezd-article .lc-faq-item:first-of-type { border-top: 1px solid var(--border); }
.ezd-article .lc-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 14px 0; cursor: pointer; list-style: none; font-size: var(--fs-15); font-weight: 600; color: var(--bright);
}
.ezd-article .lc-faq-q::-webkit-details-marker { display: none; }
.ezd-article .lc-faq-q .plus { flex-shrink: 0; color: var(--faint); font-size: var(--fs-17); font-weight: 400; line-height: 1; }
.ezd-article .lc-faq-item[open] .lc-faq-q .plus { transform: rotate(45deg); color: var(--p-text); }
.ezd-article .lc-faq-a { padding: 0 0 var(--sp-4); font-size: var(--fs-15); line-height: var(--lh-prose); color: var(--text); }

/* ── Try it, Was this helpful?, Last updated (docs/includes/ezra_footer.html) ── */
.ezd-try {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-6); flex-wrap: wrap;
  margin-top: var(--sp-8); padding: var(--sp-5); border: 1px solid var(--p3); border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--p1), transparent 60%), var(--card);
}
.ezd-try-copy { flex: 1 1 calc(var(--sp-8) * 9); }
.ezd-try-title { margin: 0; font-size: var(--fs-17); font-weight: 600; line-height: var(--lh-snug); --ez-h: var(--bright); }
.ezd-try p { margin: var(--sp-1) 0 0; font-size: var(--fs-14); line-height: var(--lh-normal); color: var(--muted); }
.ezd-help {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--border); font-size: var(--fs-13); color: var(--muted);
}
.ezd-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.ezd-helpful-q { font-weight: 600; color: var(--text); }
.ezd-help .lc-ezra-vote { min-width: calc(var(--sp-8) + var(--sp-3)); }
.ezd-help .lc-ezra-vote[aria-pressed="true"] { border-color: var(--p); color: var(--p-text); background: var(--p1); }
.ezd-help .lc-ezra-vote:disabled[aria-pressed="true"] { opacity: 1; }
.ezd-helpful-done:empty { display: none; }
.ezd-updated { margin: 0; font-size: var(--fs-12); color: var(--faint); }

/* the "Link copied" toast (learn-ezra.js puts it inside #ezp-root) */
.lc-ezra-copied {
  position: fixed; left: 50%; bottom: var(--sp-6); transform: translateX(-50%); z-index: var(--z-toast);
  padding: var(--sp-2) 14px; border-radius: var(--r-sm); border: 1px solid var(--border2);
  background: var(--card-2); color: var(--bright); font-size: var(--fs-13); font-weight: 600; box-shadow: var(--shadow-pop);
}
.lc-ezra-copied[hidden] { display: none; }

/* ── Previous / Next ── */
.ezd-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-6); }
.ezd-pager-link {
  display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4) 18px; border: 1px solid var(--border); border-radius: var(--r);
  --ez-a: var(--bright); --ez-a-hover: var(--bright);
}
.ezd-pager-link:hover { border-color: var(--p3); background: var(--bg2); }
.ezd-pager-link.is-next { grid-column: 2; text-align: right; align-items: flex-end; }
.ezd-pager-dir { font-size: var(--fs-12); color: var(--faint); }
.ezd-pager-title { font-size: var(--fs-15); font-weight: 600; line-height: var(--lh-snug); }

/* ── Docs home (/ezra/docs/): the hero with the big search, the numbered "Start here" path, the group cards
   with counts, then the Examples / Tours band ── */
.ezd-hero { position: relative; padding: var(--sp-4) 0 calc(var(--sp-8) + var(--sp-2)); margin-bottom: calc(var(--sp-8) + var(--sp-2)); }
.ezd-hero::after {                              /* the brand sweep under the hero */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--ezd-accent); opacity: .8;
}
/* the eyebrow's sweep dash comes from ezra-brand.css (.ezp-page .ez-eyebrow) */
.ezd-hero .ezd-eyebrow { color: var(--p-text); --ez-h: var(--p-text); }
.ezd-hero .ezd-title { margin-top: var(--sp-3); font-size: clamp(var(--fs-28), 4vw, calc(var(--fs-28) * 1.7)); }
.ezd-hero .ezd-lede { max-width: var(--ezd-read); }
.ezd-bigsearch {                                /* opens the Cmd/Ctrl+K dialog (data-ezd-search-open) */
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; max-width: calc(var(--ezd-read) - var(--sp-8) * 3);
  min-height: calc(var(--ctl-h-lg) + var(--sp-3)); margin-top: var(--sp-6); padding: 0 var(--sp-4);
  border: 1px solid var(--border2); border-radius: var(--r-lg); background: var(--bg2); color: var(--faint);
  font: 400 var(--fs-16)/var(--lh-snug) var(--sans); text-align: left; cursor: pointer;
}
.ezd-bigsearch:hover { border-color: var(--p3); color: var(--muted); }
.ezd-bigsearch-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ezd-bigsearch .ez-kbd { flex-shrink: 0; }

.ezd-home-section { margin-bottom: calc(var(--sp-8) + var(--sp-4)); }
.ezd-section-title {
  margin: 0 0 var(--sp-4); font-size: calc(var(--fs-20) * 1.2); font-weight: 700; line-height: var(--lh-tight);
  letter-spacing: -.02em; --ez-h: var(--bright);
}

/* Start here: five numbered steps (an <ol>; the number is drawn, the list order is the semantics) */
.ezd-path { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.ezd-path-item { display: flex; min-width: 0; }
.ezd-path-link {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto;
  column-gap: var(--sp-3); flex: 1; min-width: 0; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--card); --ez-a: var(--bright); --ez-a-hover: var(--bright);
}
.ezd-path-link:hover { border-color: var(--p3); background: var(--bg2); }
.ezd-path-num {
  grid-row: 1 / span 3; display: grid; place-items: center; width: calc(var(--sp-6) + 2px); height: calc(var(--sp-6) + 2px);
  border-radius: var(--r-full); background: var(--p); color: var(--on-p); font-size: var(--fs-12); font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ezd-path-title { font-size: var(--fs-15); font-weight: 600; line-height: var(--lh-snug); }
.ezd-path-outcome { margin-top: var(--sp-1); font-size: var(--fs-13); line-height: var(--lh-snug); color: var(--muted); }
.ezd-path-time { margin-top: var(--sp-2); font-size: var(--fs-12); line-height: 1; color: var(--faint); font-variant-numeric: tabular-nums; }

/* group cards: the title with its guide count */
.ezd-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.ezd-card-count { flex-shrink: 0; font-size: var(--fs-12); color: var(--faint); font-variant-numeric: tabular-nums; }

/* See it working: the band to the real Examples and Tours */
.ezd-see {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-6); border: 1px solid var(--p3); border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--p1), transparent 60%), var(--card);
}
.ezd-see-copy { flex: 1 1 calc(var(--sp-8) * 9); }
.ezd-see-title { margin: 0; font-size: var(--fs-20); font-weight: 700; line-height: var(--lh-snug); --ez-h: var(--bright); }
.ezd-see p { margin: var(--sp-1) 0 0; font-size: var(--fs-14); line-height: var(--lh-normal); color: var(--muted); }
.ezd-see-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.ezd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.ezd-card {
  position: relative; overflow: hidden; padding: var(--sp-5); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--card);
}
.ezd-card::before {                             /* the sweep along the top edge on hover / keyboard focus */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ezd-accent); opacity: 0;
}
.ezd-card:is(:hover, :focus-within) { border-color: var(--border2); }
.ezd-card:is(:hover, :focus-within)::before { opacity: 1; }
.ezd-card-title { margin: 0; font-size: var(--fs-15); font-weight: 600; line-height: var(--lh-snug); --ez-h: var(--bright); }
.ezd-card-list { margin: 0 calc(-1 * var(--sp-3)); padding: 0; list-style: none; }
.ezd-card-link { display: block; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); --ez-a: var(--bright); --ez-a-hover: var(--bright); }
.ezd-card-link:hover { background: var(--bg3); }
.ezd-card-link-title { display: block; font-size: var(--fs-14); font-weight: 600; line-height: var(--lh-snug); }
.ezd-card-link-tag { display: block; margin-top: 2px; font-size: var(--fs-13); line-height: var(--lh-snug); color: var(--muted); }
.ezd-empty { padding: var(--sp-6); border: 1px dashed var(--border2); border-radius: var(--r); color: var(--muted); font-size: var(--fs-14); }

/* ── Search dialog (Cmd/Ctrl+K) ── */
.ezd-page dialog.ezd-search {
  width: min(calc(var(--sp-8) * 20), calc(100vw - var(--sp-8))); max-height: min(calc(var(--sp-8) * 18), 76vh);
  margin: 12vh auto auto;
}
.ezd-search-head {
  display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-4);
  border-bottom: 1px solid var(--border); color: var(--faint);
}
.ezd-search-head:focus-within { box-shadow: inset 0 -2px 0 var(--p); }
.ezd-search-input {
  flex: 1; min-width: 0; height: calc(var(--ctl-h-lg) + var(--sp-3)); padding: 0; border: 0; outline: none; background: transparent;
  color: var(--bright); font: 400 var(--fs-16)/1 var(--sans);
}
.ezd-search-input::placeholder { color: var(--faint); }
.ezd-search-list { flex: 1; min-height: 0; margin: 0; padding: var(--sp-2); overflow: auto; list-style: none; }
.ezd-search-list:empty { display: none; }
.ezd-search-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--sp-3); padding: 10px var(--sp-3);
  border-radius: var(--r-sm); cursor: pointer;
}
.ezd-search-item[aria-selected="true"] { background: var(--p1); box-shadow: inset 2px 0 0 var(--p); }
.ezd-search-item-title { font-size: var(--fs-14); font-weight: 600; line-height: var(--lh-snug); color: var(--bright); }
.ezd-search-item[aria-selected="true"] .ezd-search-item-title { color: var(--p-text); }
.ezd-search-item-sep, .ezd-search-item-section { font-weight: 500; color: var(--muted); }
.ezd-search-item-group {
  align-self: center; font-size: var(--fs-11); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--faint);
}
.ezd-search-item-tag {
  grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--fs-13); line-height: var(--lh-snug); color: var(--muted);
}
.ezd-search-empty { margin: 0; padding: var(--sp-6) var(--sp-4); text-align: center; font-size: var(--fs-14); color: var(--muted); }
.ezd-search-foot {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border); font-size: var(--fs-12); color: var(--faint);
}

/* ── Motion (only when the reader allows it) ── */
@media (prefers-reduced-motion: no-preference) {
  .ezd-nav-home, .ezd-nav-link, .ezd-toc-link, .ezd-search-btn, .ezd-pager-link, .ezd-card-link, .ezd-bar-caret,
  .ezd-prose .lc-anchor, .ezd-article .lc-faq-q .plus, .ezd-card, .ezd-card::before, .ezd-bigsearch, .ezd-path-link {
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
      border-color var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
}

/* ── Tablet and phone: nav drawer + compact "On this page" ── */
@media (max-width: 1099.98px) {
  .ezd-layout, .ezd-layout.is-home { grid-template-columns: minmax(0, 1fr); }
  .ezd-toc-col { display: none; }
  .ezd-main { padding-top: var(--sp-6); }

  .ezd-bar {
    display: block; position: sticky; top: var(--ezd-sticky); z-index: calc(var(--z-shell) - 1);
    background: var(--overlay); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  }
  .ezd-bar-inner { display: flex; align-items: center; gap: var(--sp-2); min-height: calc(var(--ctl-h-lg) + var(--sp-4)); }
  .ezd-bar-menu {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); height: var(--ctl-h-lg); padding: 0 var(--sp-3);
    border: 1px solid var(--border2); border-radius: var(--r-sm); background: var(--bg2); color: var(--muted);
    font-size: var(--fs-14); text-align: left;
  }
  .ezd-bar-menu:hover { border-color: var(--p3); }
  .ezd-bar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ezd-bar-group { color: var(--faint); }
  .ezd-bar-group::after { content: "/"; margin: 0 var(--sp-2); }
  .ezd-bar-title { color: var(--bright); font-weight: 600; }
  .ezd-bar-menu[aria-expanded="true"] .ezd-bar-caret { transform: rotate(180deg); }
  .ezd-bar-search { flex-shrink: 0; width: var(--ctl-h-lg); height: var(--ctl-h-lg); }

  .ezd-nav {
    display: none; position: fixed; top: var(--ezd-drawer-top, calc(var(--ezd-sticky) + var(--ezd-bar))); left: 0; right: 0;
    z-index: var(--z-menu); max-height: calc(100vh - var(--ezd-drawer-top, calc(var(--ezd-sticky) + var(--ezd-bar))));
    max-height: calc(100dvh - var(--ezd-drawer-top, calc(var(--ezd-sticky) + var(--ezd-bar))));
    padding: var(--sp-4) var(--ezd-gutter) var(--sp-6); border-right: 0; border-bottom: 1px solid var(--border);
    background: var(--bg); box-shadow: var(--shadow-pop);
  }
  .ezd-nav.is-open { display: block; }
  .ezd-nav .ezd-search-btn { display: none; }
  .ezd-nav-home, .ezd-nav-link { padding-block: var(--sp-2); font-size: var(--fs-15); }

  .ezd-toc-compact {
    display: block; margin: 0 0 var(--sp-6); border: 1px solid var(--border); border-radius: var(--r); background: var(--bg2);
  }
  .ezd-toc-compact > summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
    min-height: var(--ctl-h-lg); padding: 0 var(--sp-4); cursor: pointer; list-style: none;
    font-size: var(--fs-14); font-weight: 600; color: var(--bright);
  }
  .ezd-toc-compact > summary::-webkit-details-marker { display: none; }
  .ezd-toc-compact > summary::after {
    content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
  }
  .ezd-toc-compact[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .ezd-toc-compact nav { padding: 0 var(--sp-4) var(--sp-3); }
  .ezd-toc-compact .ezd-toc-link { padding-block: var(--sp-2); font-size: var(--fs-14); }
}

/* Home cards: two across on tablet (an odd last card takes the row); a bento from 1100px, three across and
   the rest of the last row shared (five groups: 3 + 2). */
@media (min-width: 720.02px) and (max-width: 1099.98px) {
  .ezd-card:nth-child(odd):last-child { grid-column: 1 / -1; }
  .ezd-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ezd-path-item:nth-child(odd):last-child { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .ezd-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-5); }
  .ezd-card { grid-column: span 2; }
  .ezd-card:nth-child(3n+1):nth-last-child(2), .ezd-card:nth-child(3n+2):last-child { grid-column: span 3; }
  .ezd-card:nth-child(3n+1):last-child { grid-column: 1 / -1; }
  /* Start here: stacked cards (number on top), three then two, like the group cards */
  .ezd-path { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ezd-path-item { grid-column: span 2; }
  .ezd-path-item:nth-child(3n+1):nth-last-child(2), .ezd-path-item:nth-child(3n+2):last-child { grid-column: span 3; }
  .ezd-path-item:nth-child(3n+1):last-child { grid-column: 1 / -1; }
  .ezd-path-link { display: flex; flex-direction: column; align-items: flex-start; }
  .ezd-path-num { margin-bottom: var(--sp-3); }
  .ezd-path-outcome { flex: 1; }
}
@media (min-width: 1600px) {
  .ezd-page { --ezd-nav-w: 300px; --ezd-toc-w: 260px; }
  .ezd-path { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ezd-path .ezd-path-item:nth-child(n) { grid-column: auto; }      /* five across; beats the 3 + 2 spans */
}

@media (max-width: 720px) {
  .ezd-title { font-size: var(--fs-28); }
  .ezd-lede { font-size: var(--fs-15); }
  .ezd-prose > h2, .ezd-article .lc-section > h2 { font-size: var(--fs-20); }
  .ezd-prose > ul.lc-ezra-more { columns: 1; }
  .ezd-cards { grid-template-columns: minmax(0, 1fr); }
  .ezd-pager { grid-template-columns: minmax(0, 1fr); }
  .ezd-pager-link.is-next { grid-column: 1; }
  .ezd-try .ez-btn, .ezd-see-actions .ez-btn { width: 100%; justify-content: center; }
  .ezd-see { padding: var(--sp-5); }
  .ezd-section-title { font-size: var(--fs-20); }
  .ezd-bigsearch .ez-kbd { display: none; }
  .ezd-prose .lc-ezra-example-body { padding: var(--sp-3); max-height: calc(var(--sp-8) * 14); }
  .ezd-page dialog.ezd-search {
    width: calc(100% - var(--sp-4)); max-width: none; max-height: 80vh; max-height: 80dvh;
    margin: var(--sp-2) auto auto; border-radius: var(--r-lg); padding-bottom: 0;
  }
  .ezd-search-foot { display: none; }
}
