/* =====================================================================
   Page2 / PageExample prototype styles
   Namespace: .ovp- (Overlay Page)
   Loaded only by views that opt in via <link href="/css/prototype/page-prototype.css">
   ===================================================================== */

/* The hero supplies the page title; the layout's secondary nav would duplicate it.
   Not for .ovp-in-legacy pages: those keep the legacy layout's title band and hide the hero instead. */
body:not(:has(.ovp-in-legacy)) #thirdNav { display: none !important; }

/* Bootstrap 3 sets border-box on most elements, but native <button> inherits content-box,
   which makes `width: 100%` + padding overflow the parent on the mobile TOC toggle. */
.ovp-page,
.ovp-page *,
.ovp-page *::before,
.ovp-page *::after { box-sizing: border-box; }

/* theme.css sets `#loading-overlay { overflow: hidden }`, which creates a containing
   block that breaks `position: sticky` for everything below it (including our TOC).
   The layout's startup JS resets height/position but leaves overflow alone — clear it. */
#loading-overlay { overflow: visible !important; }

/* theme.css has a global `aside { padding:50px 0; color:#fff; background:#48484a }`
   that paints the TOC dark gray and shifts it down. Reset it for our TOC aside. */
.ovp-page aside.ovp-toc {
    padding: 0;
    color: inherit;
    background: transparent;
}

/* ---------- Tokens ---------- */
.ovp-page {
    --ovp-blue: #13294b;
    --ovp-blue-soft: #1f3a6b;
    --ovp-orange: #FF5F05;          /* Brand orange — DECORATIVE ONLY on white (3.4:1, fails AA). */
    --ovp-orange-soft: #ffd9c2;
    /* Link colors: brand Altgeld passes AA on white (~4.6:1) where brand Orange
       does not. Use --ovp-link for any interactive text drawn on a light bg;
       reserve --ovp-orange for accents (hero stripe, list markers, badges,
       borders, dim-light fills). Fallbacks hand-pick the brand values for
       environments where illinois.css's :root tokens haven't loaded yet. */
    --ovp-link: var(--il-altgeld, #C84113);
    --ovp-link-hover: var(--il-altgeld-darker-1, #A0340F);
    --ovp-ink: #1d1f23;
    --ovp-ink-soft: #4a4f57;
    --ovp-muted: #6b7280;
    --ovp-rule: #e5e7eb;
    --ovp-bg: #fafbfc;
    --ovp-card: #ffffff;
    --ovp-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);

    background: var(--ovp-bg);
    color: var(--ovp-ink);
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    padding-bottom: 48px;
}

/* When a sticky action bar is the last child of .ovp-page, drop the 48px
   bottom padding so the bar's in-flow position sits flush against the end
   of .ovp-page (and therefore flush against the layout <footer> below).
   Pages without a sticky bar keep the 48px breathing room above the footer.
   :has() — modern evergreen browsers only. */
.ovp-page:has(> .ovi-footer-bar),
.ovp-page:has(> .ovs-footer-bar) {
    padding-bottom: 0;
}

/* ---------- Hero ---------- */
.ovp-page .ovp-hero {
    position: relative;
    background: var(--ovp-blue);
    color: #fff;
    /* Top padding is intentionally tight — a sticky .ovs-breadcrumb-band sits
       above this hero and the two share the blue background, so they read as
       a single banner at rest. The breadcrumb itself supplies the top air.
       Bottom padding matches Index2/Save2 (32px) so plain .ovp-hero pages
       (Page2) line up with the index/save heroes. */
    padding: 16px 2.1vw 32px;
    overflow: hidden;
}
.ovp-page .ovp-hero::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 5px;
    background: var(--ovp-orange);
}
.ovp-page .ovp-hero-inner {
    position: relative;
    max-width: var(--ovp-shell-max, 1800px);
    margin: 0 auto;
}
.ovp-page .ovp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}
.ovp-page .ovp-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 120ms ease, color 120ms ease;
}
.ovp-page .ovp-breadcrumb a:hover { color: #fff; border-bottom-color: var(--ovp-orange); }
.ovp-page .ovp-breadcrumb-sep { font-size: 0.65em; opacity: 0.6; }
.ovp-page .ovp-breadcrumb-current { color: #fff; font-weight: 600; }
.ovp-page .ovp-hero-title {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    line-height: 1.18;
    margin: 0;
    letter-spacing: -0.01em;
}
.ovp-page .ovp-hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 70ch;
    margin: 12px 0 0;
}

/* ---------- Sticky breadcrumb band ----------
   Sits ABOVE the hero in source order. Shares the blue background so the two
   read as a single banner at rest. Stickies below the fixed main nav while
   the hero+title scroll past. Once the hero title has scrolled behind the
   band, JS toggles `is-title-stuck` on the .ovp-page root and the trailing
   page-title segment fades in. Used by Page2, PageExample, and Save2.

   Top:56 — NOT 63 (--ovm-bar-h). The bar's visible bottom isn't at the nav
   element's border-box edge (vp 63); it's at the bottom of the white fill +
   gray border that lives on #mainNav::before. In fully-condensed state the
   ::before shrinks to 48.5px tall (8px orange + 48.5px white = vp 56.5), so
   we stick to vp 56 to land flush with the gray border. See the height math
   in overlay-menu-prototype.css around the ::before declaration; if any of
   pair-top/unit-offset/bg-buffer (condensed values) change there, recompute
   `vp_bg_bottom = 8 + 24 + pair-top + unit-offset + bg-buffer` and update
   this `top:` and the TOC offsets below in lockstep. */
.ovp-page .ovs-breadcrumb-band {
    position: sticky;
    top: 56px; /* visible nav bottom in condensed state (NOT --ovm-bar-h=63) */
    z-index: 25;
    background: var(--ovp-blue);
    padding: 0 2.1vw;
    transition: box-shadow 200ms ease;
}
/* Once the hero scrolls away, the breadcrumb is the only blue band left —
   a subtle shadow detaches it from the white content below. */
.ovp-page.is-title-stuck .ovs-breadcrumb-band {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.ovp-page .ovs-breadcrumb-inner {
    max-width: var(--ovp-shell-max, 1800px);
    margin: 0 auto;
    padding: 10px 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    min-height: 38px;
}
.ovp-page .ovs-bc-link {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 500;
    transition: color 120ms ease;
}
.ovp-page .ovs-bc-link:hover { color: var(--ovp-orange); }
.ovp-page .ovs-bc-sep {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.65rem;
}
/* Title segment (separator + current text): hidden on desktop until stuck. */
.ovp-page .ovs-bc-sep--title,
.ovp-page .ovs-bc-current {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 200ms ease, transform 200ms ease;
}
.ovp-page.is-title-stuck .ovs-bc-sep--title,
.ovp-page.is-title-stuck .ovs-bc-current {
    opacity: 1;
    transform: translateX(0);
}
.ovp-page .ovs-bc-current {
    color: #fff;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ---------- Admin bar (lives inside the article card, top edge) ---------- */
/* Uses the established admin-purple #6f42c1 (matches overlay-menu admin tab/action). */
/* Selectors are scoped through .ovp-article so they outrank the article's own
   `strong { color: var(--ovp-ink) }` and `a { color: var(--ovp-blue) }` rules. */
.ovp-page .ovp-article > .ovp-admin-bar {
    /* Pull the bar flush to the card edges so its top corners ride the card's radius */
    margin: -40px clamp(-56px, -4vw, -20px) 28px;
    background: #6f42c1;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    color: #fff;
}
.ovp-page .ovp-article > .ovp-admin-bar,
.ovp-page .ovp-article > .ovp-admin-bar * {
    color: #fff;
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-inner {
    padding: 12px clamp(20px, 4vw, 56px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    line-height: 1.3;
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-action:hover,
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-action:hover * {
    background: #fff;
    border-color: #fff;
    color: #5a32a3;
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-divider {
    width: 1px; height: 20px; background: rgba(255, 255, 255, 0.4);
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-meta i { color: rgba(255, 255, 255, 0.9); }
.ovp-page .ovp-article > .ovp-admin-bar .ovp-admin-meta strong { font-weight: 700; }

/* ---------- Body layout ---------- */
.ovp-page .ovp-body {
    padding: 36px 2.1vw 0;
}
.ovp-page .ovp-body-inner {
    max-width: var(--ovp-shell-max, 1800px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.ovp-page[data-has-toc="false"] .ovp-body-inner {
    grid-template-columns: minmax(0, 1fr);
}

/* ---------- TOC ---------- */
.ovp-page .ovp-toc {
    position: sticky;
    /* Clears 56px condensed-nav visible bottom + ~40px sticky breadcrumb band
       + 36px breathing room = 132. The 36px matches .ovp-body's top padding
       so the gap between the breadcrumb-band's bottom edge and the TOC's top
       while sticky-pinned is identical to the pre-scroll gap between the
       hero and the TOC. The 56 is the visible (::before) bottom of the
       collapsed main nav — see the breadcrumb-band block above for the math
       and what to update if overlay-menu-prototype.css changes. */
    top: 132px;
    align-self: start;
}
.ovp-page .ovp-toc-toggle {
    display: none;
    width: 100%;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--ovp-rule);
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 600;
    color: var(--ovp-ink);
    box-shadow: var(--ovp-shadow);
    cursor: pointer;
}
.ovp-page .ovp-toc-toggle-chevron { margin-left: auto; transition: transform 200ms ease; }
.ovp-page .ovp-toc.is-open .ovp-toc-toggle-chevron { transform: rotate(180deg); }
.ovp-page .ovp-toc-sticky {
    background: var(--ovp-card);
    border: 1px solid var(--ovp-rule);
    border-radius: 8px;
    padding: 0;
    box-shadow: var(--ovp-shadow);
    max-height: calc(100vh - 152px); /* sticky top (132) + bottom gutter (20) */
    overflow: hidden; /* clip the sliding panes */
    display: flex;
    flex-direction: column;
}

/* ---------- Tab switcher (This page | Related pages) ---------- */
.ovp-page .ovp-toc-tabs {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--ovp-rule);
    background: var(--ovp-card);
}
.ovp-page .ovp-toc-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 4px 2px 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ovp-muted);
    cursor: pointer;
    position: relative;
    transition: color 140ms ease;
}
.ovp-page .ovp-toc-tab::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--ovp-orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ovp-page .ovp-toc-tab:hover { color: var(--ovp-ink); }
.ovp-page .ovp-toc-tab.is-active { color: var(--ovp-blue); }
.ovp-page .ovp-toc-tab.is-active::after { transform: scaleX(1); }
.ovp-page .ovp-toc-tab-sep {
    color: var(--ovp-rule);
    font-weight: 400;
    user-select: none;
}

/* ---------- Sliding panes ---------- */
.ovp-page .ovp-toc-panes {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template: 1fr / 1fr;
    overflow: hidden;
}
.ovp-page .ovp-toc-pane {
    grid-area: 1 / 1;
    min-width: 0;
    padding: 12px 10px 14px;
    overflow-y: auto;
    transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
    will-change: transform;
}
.ovp-page .ovp-toc-pane:not(.is-active) {
    pointer-events: none;
    opacity: 0;
}
.ovp-page .ovp-toc-sticky[data-toc-active="this"] .ovp-toc-pane[data-toc-pane="this"] { transform: translateX(0); opacity: 1; }
.ovp-page .ovp-toc-sticky[data-toc-active="this"] .ovp-toc-pane[data-toc-pane="related"] { transform: translateX(100%); }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-pane[data-toc-pane="this"] { transform: translateX(-100%); }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-pane[data-toc-pane="related"] { transform: translateX(0); opacity: 1; }

/* ---------- This-page list ---------- */
.ovp-page .ovp-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ovp-page .ovp-toc-list li { margin: 0; padding: 0; }
.ovp-page .ovp-toc-link {
    display: block;
    padding: 7px 12px;
    border-left: 3px solid transparent;
    color: var(--ovp-ink-soft);
    font-size: 0.92rem;
    line-height: 1.35;
    text-decoration: none;
    border-radius: 0 4px 4px 0;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ovp-page .ovp-toc-link:hover {
    color: var(--ovp-blue);
    background: rgba(19, 41, 75, 0.04);
    border-left-color: rgba(19, 41, 75, 0.2);
}
.ovp-page .ovp-toc-link.is-active {
    color: var(--ovp-blue);
    background: rgba(255, 95, 5, 0.08);
    border-left-color: var(--ovp-orange);
    font-weight: 600;
}

/* ---------- Related pages pane (dark) ---------- */
.ovp-page .ovp-toc-pane[data-toc-pane="related"] {
    background: #2b2e34;
    color: #e8eaee;
    padding: 12px 12px 14px;
}
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-tabs {
    background: #2b2e34;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    transition: background 280ms ease, border-color 280ms ease;
}
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-tab { color: rgba(255, 255, 255, 0.55); }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-tab:hover { color: #fff; }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-tab.is-active { color: #fff; }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] .ovp-toc-tab-sep { color: rgba(255, 255, 255, 0.18); }
.ovp-page .ovp-toc-sticky { transition: background 280ms ease; }
.ovp-page .ovp-toc-sticky[data-toc-active="related"] { background: #2b2e34; border-color: #1f2227; }

.ovp-page .ovp-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ovp-page .ovp-related-link {
    display: block;
    padding: 8px 12px;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    color: #e8eaee;
    font-size: 0.92rem;
    line-height: 1.35;
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.ovp-page .ovp-related-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--ovp-orange);
    color: #fff;
}

/* ---------- Article ---------- */
.ovp-page .ovp-article {
    background: var(--ovp-card);
    border: 1px solid var(--ovp-rule);
    border-radius: 10px;
    padding: 40px clamp(20px, 4vw, 56px) 32px;
    box-shadow: var(--ovp-shadow);
    min-width: 0; /* prevent overflow inside grid */
}
.ovp-page .ovp-article--full { max-width: 920px; margin: 0 auto; }

/* Reset legacy bootstrap row/col leakage from inserted CMS HTML */
.ovp-page .ovp-article > .row { margin: 0; }
.ovp-page .ovp-article > .row > [class*="col-"] { padding: 0; }

/* Typography */
.ovp-page .ovp-article h2,
.ovp-page .ovp-article h3,
.ovp-page .ovp-article h4 {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    color: var(--ovp-blue);
    line-height: 1.25;
    letter-spacing: -0.005em;
    scroll-margin-top: 130px; /* anchor offset clear of main nav (69) + breadcrumb (~40) + breathing room */
}
.ovp-page .ovp-article h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 2.2em 0 0.6em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--ovp-rule);
    position: relative;
}
.ovp-page .ovp-article h2::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 56px; height: 2px;
    background: var(--ovp-orange);
}
.ovp-page .ovp-article h2:first-child { margin-top: 0; }
.ovp-page .ovp-article h3 { font-size: 1.32rem; font-weight: 700; margin: 1.8em 0 0.5em; }
.ovp-page .ovp-article h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5em 0 0.4em; }

.ovp-page .ovp-article p { margin: 0 0 1.1em; font-size: 1.02rem; }
.ovp-page .ovp-article .ovp-lead {
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--ovp-ink-soft);
    margin-bottom: 1.4em;
}

/* Body links — Altgeld for AA contrast on white (was brand Orange at ~3.4:1).
   Underline thickens 1px → 2px on hover; using `border-bottom` (not
   `text-decoration`) so the underline color can match the text-color
   transition independently and stay below descenders on Source Sans. The
   1px bump is absorbed by the line-box (inline borders don't push block
   layout) so there's no reflow. */
.ovp-page .ovp-article a {
    color: var(--ovp-link);
    text-decoration: none;
    border-bottom: 1px solid rgba(200, 65, 19, 0.45);   /* Altgeld @ 45% — same hue as link text */
    transition: color 120ms ease, border-color 120ms ease, border-bottom-width 120ms ease;
}
.ovp-page .ovp-article a:hover,
.ovp-page .ovp-article a:focus-visible {
    color: var(--ovp-link-hover);
    border-bottom: 2px solid var(--ovp-link-hover);
}

.ovp-page .ovp-article strong { color: var(--ovp-ink); font-weight: 700; }
.ovp-page .ovp-article em { color: var(--ovp-ink-soft); }
.ovp-page .ovp-article mark {
    background: rgba(255, 95, 5, 0.28);
    padding: 0 2px;
    color: inherit;
}
.ovp-page .ovp-article q { font-style: italic; color: var(--ovp-ink-soft); }
.ovp-page .ovp-article code {
    font-family: 'Source Code Pro', Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.9em;
    background: #f1f3f5;
    border: 1px solid #e3e6ea;
    color: #b22f5d;
    padding: 1px 6px;
    border-radius: 4px;
}
.ovp-page .ovp-article pre {
    background: #0f1722;
    color: #e6eaf2;
    border-radius: 8px;
    padding: 18px 20px;
    overflow-x: auto;
    line-height: 1.55;
    font-size: 0.92rem;
    margin: 1.4em 0;
}
.ovp-page .ovp-article pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.ovp-page .ovp-article kbd {
    font-family: 'Source Code Pro', Consolas, monospace;
    font-size: 0.82em;
    background: #fff;
    border: 1px solid #d0d4db;
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--ovp-ink);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* Lists */
.ovp-page .ovp-article ul,
.ovp-page .ovp-article ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}
.ovp-page .ovp-article li { margin-bottom: 0.4em; }
.ovp-page .ovp-article ul > li::marker { color: var(--ovp-orange); }
.ovp-page .ovp-article ol > li::marker { color: var(--ovp-blue); font-weight: 700; }

/* Definition lists */
.ovp-page .ovp-article .ovp-dl {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 8px 24px;
    margin: 1.2em 0 1.4em;
    padding: 18px 22px;
    background: rgba(19, 41, 75, 0.03);
    border-left: 3px solid var(--ovp-blue);
    border-radius: 0 6px 6px 0;
}
.ovp-page .ovp-article .ovp-dl dt {
    font-weight: 700;
    color: var(--ovp-blue);
}
.ovp-page .ovp-article .ovp-dl dd { margin: 0; color: var(--ovp-ink-soft); }

/* Blockquote */
.ovp-page .ovp-article blockquote {
    margin: 1.6em 0;
    padding: 18px 24px 18px 28px;
    border-left: 4px solid var(--ovp-orange);
    background: linear-gradient(90deg, rgba(255, 95, 5, 0.06), rgba(255, 95, 5, 0));
    border-radius: 0 6px 6px 0;
    color: var(--ovp-ink-soft);
    font-style: italic;
    font-size: 1.08rem;
}
.ovp-page .ovp-article blockquote p:last-child { margin-bottom: 0.4em; }
.ovp-page .ovp-article blockquote cite {
    display: block;
    font-style: normal;
    font-size: 0.88rem;
    color: var(--ovp-muted);
    margin-top: 6px;
}

/* Tables */
.ovp-page .ovp-article table,
.ovp-page .ovp-article .ovp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.96rem;
    background: #fff;
    border: 1px solid var(--ovp-rule);
    border-radius: 8px;
    overflow: hidden;
}
.ovp-page .ovp-article thead th {
    background: var(--ovp-blue);
    color: #fff;
    text-align: left;
    font-weight: 700;
    padding: 12px 14px;
    border: none;
    letter-spacing: 0.01em;
}
.ovp-page .ovp-article tbody td {
    padding: 11px 14px;
    border-top: 1px solid var(--ovp-rule);
    vertical-align: top;
}
.ovp-page .ovp-article tbody tr:nth-child(odd) td { background: #fafbfc; }
.ovp-page .ovp-article tbody tr:hover td { background: rgba(255, 95, 5, 0.05); }

/* main.css has a global `img { padding: 0 0 15px 0 }` (legacy). On prototype
   pages that 15px shows as the figure's white background between an image and
   its caption (and as stray space under any other image). Null it out here so
   prototype images sit flush; spacing comes from the figure/article rules. */
.ovp-page img { padding: 0; }

/* Figures */
.ovp-page .ovp-article .ovp-figure,
.ovp-page .ovp-article figure {
    margin: 1.6em 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--ovp-rule);
    border-radius: 8px;
    overflow: hidden;
}
.ovp-page .ovp-article figure img { display: block; width: 100%; height: auto; }
.ovp-page .ovp-article figcaption {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--ovp-muted);
    background: #fafbfc;
    border-top: 1px solid var(--ovp-rule);
}

/* Newspaper-style floated figures — text wraps alongside them. Width modifiers
   set the figure's share of the column; the float side decides which way the
   text flows. A floated figure caps its caption font down a touch since it sits
   in a narrower box. Floats are cleared by the next <h2> (see the clear rule). */
.ovp-page .ovp-article .ovp-figure--left,
.ovp-page .ovp-article .ovp-figure--right {
    max-width: 100%;
}
.ovp-page .ovp-article .ovp-figure--left {
    float: left;
    margin: 0.4em 1.6em 1.1em 0;
}
.ovp-page .ovp-article .ovp-figure--right {
    float: right;
    margin: 0.4em 0 1.1em 1.6em;
}
.ovp-page .ovp-article .ovp-figure--25 { width: 25%; }
.ovp-page .ovp-article .ovp-figure--50 { width: 50%; }
.ovp-page .ovp-article .ovp-figure--75 { width: 75%; }
.ovp-page .ovp-article .ovp-figure--left figcaption,
.ovp-page .ovp-article .ovp-figure--right figcaption {
    font-size: 0.82rem;
    padding: 8px 12px;
}
/* Headings start a clean line below any floated figure so a short paragraph
   doesn't leave the next section indented around a still-floating image. */
.ovp-page .ovp-article h2 { clear: both; }

/* On narrow viewports the float collapses to a centered full-width block —
   wrapping text around a 25% image on a phone is unreadable. */
@media (max-width: 640px) {
    .ovp-page .ovp-article .ovp-figure--left,
    .ovp-page .ovp-article .ovp-figure--right {
        float: none;
        width: auto;
        margin: 1.6em 0;
    }
}

/* Generic article images get a soft frame */
.ovp-page .ovp-article > img,
.ovp-page .ovp-article p > img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Callouts */
.ovp-page .ovp-article .ovp-callout {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 14px;
    align-items: start;
    margin: 1.4em 0;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--ovp-rule);
    background: #fff;
    line-height: 1.55;
}
/* Icon is the callout's first child. Authored markup uses <i>, but the Kendo
   editor rewrites empty <i> to <em> on save, so match both. */
.ovp-page .ovp-article .ovp-callout > i,
.ovp-page .ovp-article .ovp-callout > em {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-top: 2px;
}
.ovp-page .ovp-article .ovp-callout strong { display: block; margin-bottom: 2px; }
.ovp-page .ovp-article .ovp-callout--info {
    border-left: 4px solid #1D58A7; background: #eff5fc;
}
.ovp-page .ovp-article .ovp-callout--info > i,
.ovp-page .ovp-article .ovp-callout--info > em { color: #1D58A7; }
.ovp-page .ovp-article .ovp-callout--note {
    border-left: 4px solid #2f8d6e; background: #eef7f3;
}
.ovp-page .ovp-article .ovp-callout--note > i,
.ovp-page .ovp-article .ovp-callout--note > em { color: #2f8d6e; }
.ovp-page .ovp-article .ovp-callout--warning {
    border-left: 4px solid #c97a17; background: #fdf3e3;
}
.ovp-page .ovp-article .ovp-callout--warning > i,
.ovp-page .ovp-article .ovp-callout--warning > em { color: #c97a17; }
.ovp-page .ovp-article .ovp-callout--danger {
    border-left: 4px solid #b3261e; background: #fbeaea;
}
.ovp-page .ovp-article .ovp-callout--danger > i,
.ovp-page .ovp-article .ovp-callout--danger > em { color: #b3261e; }

/* Buttons */
.ovp-page .ovp-article .ovp-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.4em 0;
}
/* Buttons follow the Index2 CTA pattern ("Read the newsletter" / "More featured
   labs"): a stable 2px border and a translateX(2px) slide on hover. The slide is
   a transform, so it never reflows siblings — the button visually nudges right
   without pushing the content under it. The 2px border is load-bearing: the CMS
   link rule (`.ovp-article a`) tries to add a 1px→2px border-bottom on hover; by
   starting at 2px the hover width never changes (no vertical bump), and each
   variant's :hover (specificity 0,4,0) re-sets border-color to beat
   `.ovp-article a:hover` (0,3,1) so the bottom edge keeps the variant color. */
.ovp-page .ovp-article .ovp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 150ms ease;
}
.ovp-page .ovp-article .ovp-btn:active { transform: translateX(1px); }

/* Solid blue — "More featured labs" */
.ovp-page .ovp-article .ovp-btn--primary {
    background: var(--ovp-blue);
    color: #fff;
    border-color: var(--ovp-blue);
}
.ovp-page .ovp-article .ovp-btn--primary:hover,
.ovp-page .ovp-article .ovp-btn--primary:focus-visible {
    background: var(--il-industrial-darker-2, #1F3D7B);
    color: #fff;
    border-color: var(--il-industrial-darker-2, #1F3D7B);
    transform: translateX(2px);
}

/* Solid Altgeld orange — passes AA on white (~5:1) where brand orange (#FF5F05)
   would only hit 3.4:1. Uses the same Altgeld token as body links. */
.ovp-page .ovp-article .ovp-btn--secondary {
    background: var(--ovp-link);
    color: #fff;
    border-color: var(--ovp-link);
}
.ovp-page .ovp-article .ovp-btn--secondary:hover,
.ovp-page .ovp-article .ovp-btn--secondary:focus-visible {
    background: var(--ovp-link-hover);
    color: #fff;
    border-color: var(--ovp-link-hover);
    transform: translateX(2px);
}

/* Orange-outline on white — "Read the newsletter". Altgeld label + border for AA. */
.ovp-page .ovp-article .ovp-btn--outline-orange {
    background: #fff;
    color: var(--ovp-link);
    border-color: var(--ovp-link);
}
.ovp-page .ovp-article .ovp-btn--outline-orange:hover,
.ovp-page .ovp-article .ovp-btn--outline-orange:focus-visible {
    background: #FFE6D5;          /* derived pale Altgeld wash; label/border stay ~5.7:1 */
    color: var(--ovp-link);
    border-color: var(--ovp-link);
    transform: translateX(2px);
}

/* Blue-outline on white — same shape as the orange-outline, brand blue. */
.ovp-page .ovp-article .ovp-btn--outline-blue {
    background: #fff;
    color: var(--ovp-blue);
    border-color: var(--ovp-blue);
}
.ovp-page .ovp-article .ovp-btn--outline-blue:hover,
.ovp-page .ovp-article .ovp-btn--outline-blue:focus-visible {
    background: rgba(19, 41, 75, 0.06);
    color: var(--ovp-blue);
    border-color: var(--ovp-blue);
    transform: translateX(2px);
}

/* Legacy ghost alias → blue outline, so existing markup keeps working. */
.ovp-page .ovp-article .ovp-btn--ghost {
    background: #fff;
    color: var(--ovp-blue);
    border-color: var(--ovp-blue);
}
.ovp-page .ovp-article .ovp-btn--ghost:hover,
.ovp-page .ovp-article .ovp-btn--ghost:focus-visible {
    background: rgba(19, 41, 75, 0.06);
    color: var(--ovp-blue);
    border-color: var(--ovp-blue);
    transform: translateX(2px);
}

/* Article footer */
.ovp-page .ovp-article-footer {
    margin-top: 2.4em;
    padding-top: 1em;
    border-top: 1px dashed var(--ovp-rule);
    color: var(--ovp-muted);
    font-size: 0.9rem;
}
.ovp-page .ovp-updated-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(19, 41, 75, 0.06);
    color: var(--ovp-ink-soft);
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
    .ovp-page .ovp-hero { padding: 12px 5vw 32px; }
    .ovp-page .ovs-breadcrumb-band { padding: 0 5vw; }
    .ovp-page .ovs-breadcrumb-inner { padding: 10px 0 6px; font-size: 0.82rem; }
    /* Collapse the trail to just the immediate parent (the last <a>.ovs-bc-trail).
       Earlier crumbs and their separator chevrons are dropped so a deep URL
       can't push past the viewport. The surviving link gets a left-chevron
       prefix to read like a back affordance: "‹ Parent > Title". */
    .ovp-page .ovs-breadcrumb-inner > .ovs-bc-trail { display: none; }
    .ovp-page .ovs-breadcrumb-inner > a.ovs-bc-trail:last-of-type {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .ovp-page .ovs-breadcrumb-inner > a.ovs-bc-trail:last-of-type::before {
        content: "\f053"; /* fa-chevron-left */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 0.7em;
        opacity: 0.6;
    }
    .ovp-page .ovp-body { padding: 24px 5vw 0; }
    .ovp-page .ovp-body-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .ovp-page .ovp-toc {
        position: static;
        top: auto;
    }
    .ovp-page .ovp-toc-toggle { display: flex; }
    .ovp-page .ovp-toc-sticky {
        display: none;
        max-height: 60vh;
        margin-top: 8px;
    }
    .ovp-page .ovp-toc.is-open .ovp-toc-sticky { display: flex; }
    .ovp-page .ovp-article { padding: 24px 18px 22px; border-radius: 8px; }
    .ovp-page .ovp-article .ovp-dl {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .ovp-page .ovp-article .ovp-dl dd { margin-bottom: 8px; }
    .ovp-page .ovp-article > .ovp-admin-bar {
        margin: -24px -18px 20px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .ovp-page .ovp-admin-inner {
        padding: 10px 14px;
        gap: 10px 14px;
        font-size: 0.82rem;
    }
    .ovp-page .ovp-admin-divider { display: none; }
}

/* ===========================================================================
   Page tag row — surfaced at the top of the article body (below the admin
   bar). Mirrors the Pages CRUD index display: small rounded-square color
   swatch followed by plain body-sized text. Inline-flowed so tags sit
   horizontally on one or more wrap lines.
   =========================================================================== */
.ovp-page .ovp-page-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 16px;
    line-height: 1.5;
}

.ovp-page .ovp-page-tag {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ovp-page .ovp-page-tag-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* ===========================================================================
   Clickable tags → slide-in "pages with this tag" view
   The tag <button>s reuse the .ovp-page-tag pill look; clicking one slides the
   article body out and a results list in (see the .ovp-article-viewport below).
   A Back button sits to the LEFT of the tag row while a tag view is active.
   =========================================================================== */
.ovp-page button.ovp-page-tag--btn {
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 2px 9px 2px 5px;
    border-radius: 999px;
    transition: background 140ms ease, color 140ms ease;
}
.ovp-page button.ovp-page-tag--btn:hover,
.ovp-page button.ovp-page-tag--btn:focus-visible {
    background: rgba(19, 41, 75, 0.07);
}
.ovp-page button.ovp-page-tag--btn.is-active {
    background: rgba(255, 95, 5, 0.12);
    color: var(--ovp-blue, #13294B);
    font-weight: 600;
}

.ovp-page .ovp-tag-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: var(--ovp-blue, #13294B);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 0.86rem;
    /* 2px vertical padding (matching the tag pills) keeps the Back button no
       taller than them, so showing/hiding it can't grow the tags row and nudge
       the content below up/down. align-items:center on the row vertically
       centers it within the tag-pill height. */
    padding: 2px 13px;
    border-radius: 999px;
    margin-right: 6px;
    transition: background 140ms ease;
}
.ovp-page .ovp-tag-back:hover,
.ovp-page .ovp-tag-back:focus-visible { background: var(--il-industrial-darker-2, #1F3D7B); }
.ovp-page .ovp-tag-back i { font-size: 0.8em; }
.ovp-page .ovp-tag-back[hidden] { display: none; }

/* Viewport clips the horizontal slide; overflow-x:clip (not hidden) avoids
   creating a scroll container so tall article content still flows normally and
   any sticky descendants keep working. */
.ovp-page .ovp-article-viewport {
    position: relative;
    overflow-x: clip;
}
.ovp-page .ovp-article-pane { will-change: transform, opacity; }
/* During a slide both panes overlap in one grid cell so they can translate the
   full viewport width simultaneously (TOC-style), then the outgoing pane is
   hidden and the viewport reverts to normal flow at the incoming pane's height. */
.ovp-page .ovp-article-viewport.is-sliding {
    display: grid;
    grid-template-columns: 1fr;
}
.ovp-page .ovp-article-viewport.is-sliding > .ovp-article-pane {
    grid-row: 1;
    grid-column: 1;
    min-width: 0;
}

/* ---- Tag results list ---- */
.ovp-page .ovp-tag-results { min-height: 220px; }
.ovp-page .ovp-tag-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(19, 41, 75, 0.1);
}
.ovp-page .ovp-tag-results-title {
    display: inline-flex;
    align-items: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ovp-blue, #13294B);
    line-height: 1.2;
}
.ovp-page .ovp-tag-results-title .ovp-page-tag-dot { width: 13px; height: 13px; margin-right: 9px; }
.ovp-page .ovp-tag-results-count {
    color: var(--ovp-ink-soft, #5b6470);
    font-size: 0.9rem;
    white-space: nowrap;
}
.ovp-page .ovp-tag-results-list { display: flex; flex-direction: column; }
/* The extra .ovp-tag-results class out-specifies ".ovp-page .ovp-article a"
   (0,3,0 > 0,2,1) so these block <a> rows don't inherit the CMS inline-link
   underline, whose 1px→2px hover thickening would push block layout (a vertical
   "puff"). Constant light-orange separator (#FFDFC9, already used on the program
   cards); hover changes background only — no geometry shift. */
.ovp-page .ovp-tag-results .ovp-tag-result {
    display: block;
    text-decoration: none;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #FFDFC9;
    border-radius: 0;
    color: inherit;
    transition: background 140ms ease;
}
.ovp-page .ovp-tag-results .ovp-tag-result:last-child { border-bottom: 0; }
.ovp-page .ovp-tag-results .ovp-tag-result:hover,
.ovp-page .ovp-tag-results .ovp-tag-result:focus-visible {
    background: rgba(19, 41, 75, 0.03);
    /* Full border-bottom (width included) so this beats ".ovp-article a:hover",
       which would otherwise bump it to 2px and re-introduce the vertical puff. */
    border-bottom: 1px solid #FFDFC9;
    color: inherit;
}
.ovp-page .ovp-tag-result-title {
    display: block;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ovp-blue, #13294B);
    margin-bottom: 4px;
}
.ovp-page .ovp-tag-result:hover .ovp-tag-result-title,
.ovp-page .ovp-tag-result:focus-visible .ovp-tag-result-title { text-decoration: underline; }
.ovp-page .ovp-tag-result-meta {
    display: block;
    color: var(--ovp-ink-soft, #5b6470);
    font-size: 0.95rem;
    line-height: 1.5;
}
.ovp-page .ovp-tag-results-empty {
    color: var(--ovp-ink-soft, #5b6470);
    font-size: 1rem;
    padding: 20px 0;
}

/* ---------- Prototype content inside the legacy _Layout (.ovp-in-legacy) ----------
   Lets a page adopt the prototype markup before it moves to _LayoutOverlayMenu:
     <div class="ovp-page ovp-index ovp-in-legacy"> ...same markup as an overlay-layout page... </div>
   The legacy layout keeps its own chrome (#thirdNav supplies the title, see the top of this file), so the
   overlay-only pieces are hidden here rather than left out of the markup. Moving the page to the new layout is
   then: set Layout = "_LayoutOverlayMenu" and delete the ovp-in-legacy class.
   Legacy CSS still reaches inside the wrapper. Known bare-element rules in site.min.css: section { padding:100px 0 },
   header { red overlay background }, aside { dark gray band }, h1-h6 { Montserrat }, p { margin-bottom:20px },
   label { display:block }, a { color }. Use <div>s for wrappers and give headings an explicit font-family. */
.ovp-page.ovp-in-legacy > .ovs-breadcrumb-band,
.ovp-page.ovp-in-legacy > .ovp-hero { display: none; }
/* The legacy page body has no side gutter of its own; match its container-fluid (15px). */
.ovp-page.ovp-in-legacy .ovp-body { padding-left: 15px; padding-right: 15px; }
