
#fn-examples-root {
  --bg: #ffffff;
  --surface: #ffffff;
  --term: #f5f7fa;
  --fg: #18202b;
  --muted: #566173;
  --out: #3b4759;
  --line: #d5dbe4;
  --accent: #4472c4;
  --accent-soft: #edf3fc;
  --note: #7a5a12;
  --scrim: rgba(17, 21, 27, .45);
  --sans: Arial, "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, monospace;
  --head-h: 56px;
  --rail-w: 318px;
}
#fn-examples-root * { box-sizing: border-box; }
#fn-examples-root { scroll-padding-top: calc(var(--head-h) + 16px); }
#fn-examples-root { background: var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); }
#fn-examples-root a { color: inherit; }
#fn-examples-root button { font: inherit; color: inherit; }
#fn-examples-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#fn-examples-root code { font-family: var(--mono); font-size: .92em; }
#fn-examples-root .top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  height: var(--head-h); display: flex; align-items: center; gap: 14px;
  padding-inline: 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
#fn-examples-root .brand { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; min-width: 0; margin: 0; }
#fn-examples-root .brand b { font-weight: 600; font-size: 16px; letter-spacing: -.005em; white-space: nowrap; }
#fn-examples-root .brand span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#fn-examples-root .shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); align-items: start; }
#fn-examples-root .side {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head-h));
  height: calc(100vh - var(--head-h) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--head-h) - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
#fn-examples-root .find { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
#fn-examples-root .find label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
#fn-examples-root .find input {
  width: 100%; font: 14px var(--sans); color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
#fn-examples-root .find p { margin: 0; font-size: 12px; color: var(--muted); min-height: 1.4em; }
#fn-examples-root .tree { overflow-y: auto; padding: 8px 8px 28px; flex: 1; min-height: 0; overscroll-behavior: contain; }
#fn-examples-root .chap { border-bottom: 1px solid var(--line); }
#fn-examples-root .chap:last-child { border-bottom: 0; }
#fn-examples-root .chap > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 9px 8px; font-weight: 600; font-size: 13.5px; border-radius: 6px;
}
#fn-examples-root .chap > summary::-webkit-details-marker { display: none; }
#fn-examples-root .chap > summary::before {
  content: ""; width: 6px; height: 6px; flex: none; margin-inline: 2px 2px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s;
}
#fn-examples-root .chap[open] > summary::before { transform: rotate(45deg); }
#fn-examples-root .chap > summary .t { flex: 1; min-width: 0; }
#fn-examples-root .n {
  flex: none; font: 500 11px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 2.2em; text-align: right;
}
#fn-examples-root .tag { flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
#fn-examples-root .secs, #fn-examples-root .exs { list-style: none; margin: 0; padding: 0; }
#fn-examples-root .secs { padding-bottom: 8px; }
#fn-examples-root .sec-i > a, #fn-examples-root .sec-i > span.row {
  display: flex; align-items: baseline; gap: 8px; padding: 5px 8px 5px 22px; border-radius: 6px;
  text-decoration: none; font: 12.5px/1.4 var(--mono); overflow-wrap: anywhere;
}
#fn-examples-root .sec-i > a .t, #fn-examples-root .sec-i > span.row .t { flex: 1; min-width: 0; }
#fn-examples-root .sec-i > a:hover { background: var(--bg); }
#fn-examples-root .sec-i.cur > a { background: var(--accent-soft); color: var(--fg); font-weight: 500; }
#fn-examples-root .sec-i.cur > a .n { color: var(--accent); }
#fn-examples-root .chap.todo > summary .t, #fn-examples-root .sec-i.todo > span.row { color: var(--muted); }
#fn-examples-root .exs { display: none; margin: 2px 0 6px 22px; border-left: 1px solid var(--line); }
#fn-examples-root .sec-i.cur > .exs, #fn-examples-root .tree.searching .sec-i > .exs { display: block; }
#fn-examples-root .exs a {
  display: block; padding: 4px 8px 4px 12px; margin-left: -1px; border-left: 2px solid transparent;
  text-decoration: none; font-size: 12.5px; line-height: 1.4; color: var(--muted);
}
#fn-examples-root .exs a:hover { color: var(--fg); }
#fn-examples-root .exs a.cur { color: var(--fg); border-left-color: var(--accent); }
#fn-examples-root .main { min-width: 0; padding: 28px clamp(16px, 4vw, 56px) 96px; }
#fn-examples-root .col { max-width: 840px; display: flex; flex-direction: column; gap: 28px; }
#fn-examples-root .sample {
  margin: 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 6px;
  font-size: 13.5px; color: var(--muted); background: var(--surface);
}
#fn-examples-root .sample b { color: var(--fg); font-weight: 600; }
#fn-examples-root .chapter-head { display: grid; gap: 8px; }
#fn-examples-root .col > .chapter-head { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
#fn-examples-root .page-intro { display: grid; gap: 14px; }
#fn-examples-root .page-intro p { margin: 0; max-width: 68ch; font-size: 16px; }
#fn-examples-root .page-intro code { background: var(--term); border-radius: 3px; padding: 1px 4px; overflow-wrap: anywhere; }
#fn-examples-root h2.plain { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
#fn-examples-root .how { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; max-width: 70ch; }
#fn-examples-root .top-link { display: block; padding: 9px 8px 9px 24px; font-weight: 600; font-size: 13.5px; text-decoration: none; border-radius: 6px; border-bottom: 1px solid var(--line); }
#fn-examples-root .top-link:hover { background: var(--bg); }
#fn-examples-root .top-link.cur { color: var(--accent); }
#fn-examples-root .eyebrow { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
#fn-examples-root h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
#fn-examples-root .lead { margin: 0; max-width: 66ch; color: var(--muted); font-size: 16px; }
#fn-examples-root .sec { display: flex; flex-direction: column; gap: 20px; padding-top: 28px; border-top: 2px solid var(--fg); }
#fn-examples-root .sec-head { display: grid; gap: 8px; }
#fn-examples-root h2 { margin: 0; font: 600 19px/1.3 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
#fn-examples-root .intro { margin: 0; max-width: 68ch; }
#fn-examples-root .count { margin: 0; font-size: 12.5px; color: var(--muted); }
#fn-examples-root .ex { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); min-width: 0; }
#fn-examples-root .sec-head + .ex { border-top: 0; padding-top: 0; }
#fn-examples-root .ex-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
#fn-examples-root h3 { margin: 0; font-size: 16.5px; line-height: 1.35; font-weight: 600; text-wrap: balance; }
#fn-examples-root .eid {
  font: 11.5px var(--mono); color: var(--muted); text-decoration: none; white-space: nowrap;
  border: 1px dashed var(--line); border-radius: 3px; padding: 1px 6px;
}
#fn-examples-root .eid:hover { color: var(--accent); border-color: var(--accent); }
#fn-examples-root .why { margin: 0; max-width: 68ch; }
#fn-examples-root .why code, #fn-examples-root .intro code, #fn-examples-root .lead code { background: var(--term); border-radius: 3px; padding: 1px 4px; overflow-wrap: anywhere; }
#fn-examples-root .shots { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
#fn-examples-root .shots figure { margin: 0; display: grid; gap: 6px; min-width: 0; max-width: 100%; }
#fn-examples-root .shot {
  display: block; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  cursor: zoom-in; overflow: hidden; line-height: 0; max-width: 100%;
}
#fn-examples-root .shot { justify-self: start; width: fit-content; }
#fn-examples-root .shot img { display: block; width: auto; height: auto; max-width: 100%; max-height: 340px; }
#fn-examples-root .shots figcaption { font-size: 12.5px; color: var(--muted); max-width: 44ch; }
#fn-examples-root .term {
  background: var(--term); border-radius: 6px; padding: 12px 14px; min-width: 0;
  font: 13px/1.6 var(--mono); display: grid; gap: 1px;
}
#fn-examples-root .ln { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; column-gap: 6px; align-items: start; }
#fn-examples-root .ln code { font-size: inherit; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
#fn-examples-root .ln .pm { color: var(--accent); font-weight: 600; user-select: none; }
#fn-examples-root .ln.in code { color: var(--fg); font-weight: 500; }
#fn-examples-root .ln.out code { color: var(--out); }
#fn-examples-root .ln.note code { color: var(--note); font-style: italic; }
#fn-examples-root .ln.in:not(:first-child), #fn-examples-root .ln.note:not(:first-child) { margin-top: 8px; }
#fn-examples-root .ln.note + .ln.in { margin-top: 0; }
#fn-examples-root .cp {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 4px;
  font: 500 11px var(--sans); padding: 2px 8px; cursor: pointer; line-height: 1.5;
}
#fn-examples-root .cp:hover { color: var(--fg); border-color: var(--muted); }
#fn-examples-root .cp.ok { color: var(--accent); border-color: var(--accent); }
#fn-examples-root .empty { margin: 0; color: var(--muted); }
#fn-examples-root dialog#lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
#fn-examples-root dialog#lb::backdrop { background: var(--scrim); }
#fn-examples-root #lb form { margin: 0; display: grid; gap: 10px; justify-items: center; }
#fn-examples-root #lb img { display: block; max-width: 94vw; max-height: 82vh; width: auto; height: auto; border-radius: 4px; background: var(--surface); }
#fn-examples-root #lb p { margin: 0; color: #fff; font-size: 13.5px; text-align: center; max-width: 70ch; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
#fn-examples-root #lb button { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
#fn-examples-root .scrim { display: none; }

@media (max-width: 860px) {
#fn-examples-root .top { padding-inline: 16px; }

#fn-examples-root .brand span { display: none; }
#fn-examples-root .shell { display: block; }
#fn-examples-root .side {
    position: fixed; left: 0; bottom: 0; z-index: 25; width: min(88vw, 340px);
    transform: translateX(-104%); transition: transform .18s ease; visibility: hidden;
  }
#fn-examples-root .side.open { transform: none; visibility: visible; }
#fn-examples-root .scrim.open { display: block; position: fixed; inset: 0; z-index: 20; background: var(--scrim); border: 0; padding: 0; width: 100%; }
#fn-examples-root .main { padding: 20px 16px 72px; }
#fn-examples-root h1 { font-size: 25px; }
#fn-examples-root h2 { font-size: 16.5px; }
#fn-examples-root .term { padding: 10px 10px; font-size: 12.5px; }
#fn-examples-root .ln { grid-template-columns: 1.7em minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
#fn-examples-root .side, #fn-examples-root .chap > summary::before { transition: none; } }

/* Integration with the existing Total Control documentation grid. */
#fn-examples-root { --head-h: 10px; color: #333; font-size: 16px; line-height: 1.7; }
#fn-examples-root .side { position: sticky; top: 10px; height: calc(100dvh - 30px); border: 1px solid #e5e5e5; border-radius: 4px; width: 100%; transform: none; visibility: visible; z-index: 1; }
#fn-examples-root .main { padding: 0 0 60px; }
#fn-examples-root .col { max-width: none; }
#fn-examples-root .chapter-head h1 { font: bold 26px/1.4 Arial, sans-serif; color: #4472c4; }
#fn-examples-root h2 { font-size: 20px; color: #333; }
#fn-examples-root h3 { font-size: 17px; }
#fn-examples-root .sec { border-top: 1px solid #ddd; }
#fn-examples-root .tree ul { list-style: none; margin: 0; }
#fn-examples-root .tree li::before { content: none !important; }
#fn-examples-root [hidden] { display: none !important; }
#fn-examples-root .term { border: 1px solid #e1e5eb; font-size: 13px; }
#fn-examples-root .fn-toolbar { margin-bottom: 18px; color: #666; font-size: 13px; }
#fn-examples-root .fn-toolbar a { color: #4472c4; }
#fn-examples-root .cp { min-height: 28px; }
@media (max-width: 767px) {
 #fn-examples-root .side { position: relative; top: 0; height: auto; max-height: 45vh; margin-bottom: 24px; }
 #fn-examples-root .main { padding: 0 0 40px; }
}

/* Keep inline code free of the website's default pink highlight. */
#fn-examples-root code,
#fn-examples-root .page-intro code,
#fn-examples-root .why code,
#fn-examples-root .intro code,
#fn-examples-root .lead code {
    background: transparent;
    color: inherit;
    box-shadow: none;
}

/* Let the index grow naturally without a panel background or outer border. */
#fn-examples-root .side {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

#fn-examples-root .tree {
    flex: none;
    height: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
}

/* Shared navigation appearance and visible current-item state. */
#fn-examples-root .top-link,
#fn-examples-root .tree a,
#fn-examples-root .tab-pane .ul-list .menu a {
    color: #333;
    text-decoration: none;
}

#fn-examples-root .top-link.cur,
#fn-examples-root .sec-i.cur > a,
#fn-examples-root .exs a.cur,
#fn-examples-root .tab-pane .ul-list .menu a.fn-current {
    color: #4472c4;
    background: #edf3fc;
    box-shadow: inset 3px 0 0 #4472c4;
    font-weight: 600;
}

#fn-examples-root .top-link:hover,
#fn-examples-root .tree a:hover,
#fn-examples-root .tab-pane .ul-list .menu a:hover {
    background: #f5f7fa;
}

#fn-examples-root .tab-pane .ul-list {
    padding: 14px 8px 28px;
    background: transparent;
    border: 0;
    height: auto;
    max-height: none;
    overflow: visible;
}

#fn-examples-root .tab-pane .ul-list .menu,
#fn-examples-root .tab-pane .ul-list .menu ul {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

#fn-examples-root .tab-pane .ul-list .menu li {
    margin: 0;
    padding: 0;
    border: 0;
}

#fn-examples-root .tab-pane .ul-list .menu li::before {
    content: none !important;
}

#fn-examples-root .tab-pane .ul-list .menu .m-node-label {
    display: block;
    padding: 0;
}

#fn-examples-root .tab-pane .ul-list .menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    font: 13.5px/1.5 Arial, "Helvetica Neue", sans-serif;
}

#fn-examples-root .tab-pane .ul-list .menu ul a {
    padding-left: 24px;
    font-size: 12.5px;
}

#fn-examples-root .tab-pane .m-search-input {
    height: auto;
    padding: 7px 28px 7px 10px;
    border: 1px solid #d5dbe4;
    border-radius: 6px;
    background: transparent;
    color: #333;
    box-shadow: none;
    font-size: 14px;
}

#fn-examples-root .tab-pane.m-active-filter .ul-list .menu li:not(.m-filter-match) {
    display: none;
}

/* A straight vertical line marks the current navigation item. */
#fn-examples-root .top-link.cur,
#fn-examples-root .sec-i.cur > a,
#fn-examples-root .exs a.cur,
#fn-examples-root .tab-pane .ul-list .menu a.fn-current {
    position: relative;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-left: 0;
    color: #333;
    font-weight: inherit;
}

#fn-examples-root .top-link.cur::before,
#fn-examples-root .sec-i.cur > a::before,
#fn-examples-root .exs a.cur::before,
#fn-examples-root .tab-pane .ul-list .menu a.fn-current::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #4472c4;
    border: 0;
    border-radius: 0;
    transform: none;
}

/* Increase only third-level text indentation; retain its aligned guide line. */
#fn-examples-root .exs {
    margin-left: 22px;
    border-left: 1px solid #d5dbe4;
}

#fn-examples-root .exs a {
    position: relative;
    margin-left: -1px;
    padding-left: 16px;
    border-left: 2px solid transparent;
    border-radius: 0;
}

#fn-examples-root .exs a:hover {
    border-left-color: #4472c4;
}

#fn-examples-root .exs a.cur,
#fn-examples-root .exs a.cur:hover {
    border-left: 2px solid #4472c4;
}

#fn-examples-root .exs a.cur::before {
    content: none;
}

#fn-examples-root .tab-pane .ul-list .menu > li > ul > li > ul > li > .m-node-label > a {
    padding-left: 44px;
}

/* Keep the whole index column visible while the article scrolls. */
@media (min-width: 768px) {
    #fn-examples-root .row {
        display: flex;
        align-items: stretch;
    }

    #fn-examples-root .row > .col-sm-4 {
        position: sticky;
        top: 10px;
        align-self: flex-start;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
    }

    #fn-examples-root .row > .col-sm-8 {
        min-width: 0;
    }

    #fn-examples-root .row > .col-sm-4 .side {
        position: relative;
        top: 0;
        height: auto;
        max-height: none;
    }

    #fn-examples-root > .side {
        position: sticky;
        top: 10px;
        height: auto;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
    }
}

@media (max-width: 767px) {
    #fn-examples-root .side {
        position: relative;
        top: 0;
        max-height: 45vh;
        max-height: 45dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Fit four tabs in one row even when the sidebar scrollbar is visible. */
#fn-examples-root .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    padding-left: 0;
}

#fn-examples-root .nav-tabs::before,
#fn-examples-root .nav-tabs::after {
    display: none;
}

#fn-examples-root .nav-tabs > li {
    float: none;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

#fn-examples-root .nav-tabs > li > a {
    margin-right: 0;
    padding: 10px 3px;
    white-space: nowrap;
    font-size: 12px;
}

/* Override the general .tree ul reset for the third-level list. */
#fn-examples-root .tree .sec-i > ul.exs {
    margin: 2px 0 6px 22px;
    padding: 0;
    border-left: 1px solid #d5dbe4;
}

#fn-examples-root .tree .sec-i > ul.exs > li > a {
    position: relative;
    margin-left: -1px;
    padding: 4px 8px 4px 16px;
    border-left: 2px solid transparent;
    border-radius: 0;
}

#fn-examples-root .tree .sec-i > ul.exs > li > a:hover,
#fn-examples-root .tree .sec-i > ul.exs > li > a.cur,
#fn-examples-root .tree .sec-i > ul.exs > li > a.cur:hover {
    border-left-color: #4472c4;
}
