/* 7-segment display font for keypad text (span.guilabel), e.g. fault
   codes like "InLoSS". The browser tries each source in turn:
   1. Invertek's own 7-segment font (the space in its name is written
      as %20 so the address is valid). Browsers only accept a font from
      another website if that website allows it, which is the most
      likely reason it wasn't showing.
   2. DSEG7 Classic Bold, a free 7-segment font (SIL Open Font Licence)
      served by jsDelivr, which allows use from any website. */
@font-face {
    font-family: 'SegmentFont';
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url('https://www.invertekdrives.com/fonts/7%20Segment.ttf') format('truetype'),
         url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic/DSEG7Classic-Bold.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic/DSEG7Classic-Bold.woff') format('woff');
}
@font-face {
    font-family: 'FA6 Solid';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/webfonts/fa-solid-900.woff2') format('woff2');
}
span.guilabel,
span.guilabel * {
    font-family: 'SegmentFont', 'Courier New', monospace !important;
    font-weight: normal !important;
    font-style: normal !important;
    letter-spacing: 0.05em;
}
.portal-header::after {
    filter: none;
}
.portal-header .logo {
    height: 60px;
    margin-bottom: 0;
}
.portal-header h1 {
    margin-top: 4.4em;
    position: relative;
}
/* Optidrive E4 logo above "How can we help you today?", about as wide
   as that heading */
.portal-header h1::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.4em);
    transform: translateX(-50%);
    background: url('https://www.invertekdrives.com/img/common/logos/optidrive-e4-white.svg') center bottom / contain no-repeat;
    width: min(12.5em, 90vw);
    height: 3.4em;
}
@media (min-width: 768px) {
    .portal-header h1 {
        margin-top: 4.4em;
    }
    .portal-header .logo {
        margin-bottom:0;
        height: 80px
    }
}
@media (min-width: 992px) {
    main article {
        margin-left: 5%;
    }
}
p, pre {
    margin: 0 0 0.75em;
}
.topic-content table td, .topic-content table th {
    padding: 0.5em;
}
.site-sidebar .logo {
    height: 100px;
}
a,.text-primary,.btn-primary .badge,.btn-link,.pagination>li>a,.pagination>li>span,.nav-site-sidebar .active>a,.portal-single-publication .publication-icon i,.portal-single-publication .publication-icon .fa,.publication-contents a:hover,.publication-contents h4 a,.titlepage h1.title,.titlepage h2.title,.titlepage h3.title {
    color: #535486;
}

.bg-primary,.btn-primary,.publications-condensed .portal-single-publication a,.toolbar,.tool-search-form .search-field,.pager li>a:hover,.pager li>span:hover,.colored-top .site-sidebar-header {
    background-color: #535486;
}

.btn-primary,.nav .open>a,.nav .open>a:hover,.nav .open>a:focus,.colored-top .site-sidebar-header {
    border-color: #535486;
}

a:hover,a:focus,a.text-primary:hover,a.text-primary:focus,.btn-link:hover,.btn-link:focus,.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus {
    color: #593696;
}

a.bg-primary:hover,a.bg-primary:focus,.btn-primary:hover,.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus,.portal-header .portal-search button:hover {
    background-color: #593696;
}

.nav-site-sidebar li a:focus{
    background-color: transparent;
}

.btn-primary:hover,.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus {
    border-color: #593696;
}

.portal-header .portal-search button {
    background-color:#535486;
}

.publication-contents h4 span {
    background-color: transparent;
}

.portal-footer {
    background: #535486;
    color: #fff;
}

[class*="cat-panel-"]:before {
    font-family: 'FA6 Solid' !important;
    font-weight: 900 !important;
    font-size: 48px !important; /* icon size */
    line-height: 1 !important;
}
/* Tile size */
.portal-publications .inner {
    max-width: 1000px; /* overall width of the tile grid - lower = narrower tiles */
    margin-left: auto;
    margin-right: auto;
}
.portal-single-publication > a {
    padding-top: 1.75em !important;    /* space above icon */
    padding-bottom: 1.5em !important;  /* space below label */
    min-height: 0 !important;
}
.cat-panel-1:before {
    content: "\f46c";
}
.cat-panel-2:before {
    content: "\f085";
}
.cat-panel-3:before {
    content: "\f6ff";
}
.cat-panel-4:before {
    content: "\f3ed";
}
@media (min-width: 992px) {
    .portal-single-publication .publication-icon {
        width: 80px;
    }
}
.cat-panel-5:before {
    content: "\f7d9";
}
.cat-panel-6:before {
    content: "\f00b";
}
.cat-panel-7:before {
    content: "\f1de";
}
.cat-panel-8:before {
    content: "\f15c";
}

.portal-publications .inner .portal-single-publication {
    display: block !important;
}
.portal-publications .show-all-categories {
    display: none;
}
.featured-content.portal-contents, .featured-content-label {
    display: none;
}
main {
    display: grid;
}
main .titlepage {
    position: sticky;
    top: var(--toolbar-h, 64px); /* set by scripts.js, falls back to 64px */
    z-index: 10;
    background: #fff;
    padding: 0.5em 0;
}
main section .section.accordion {
    position: relative;
    z-index: 9;
}
main hr {
    border-bottom: 1px solid #ccc;
}
.panel-heading.active + .panel-body {
    display: block !important;
    height: auto !important;
}
main .informaltable th {
    background: rgba(83, 84, 134, 0.1);
}
.content-wrapper .topic-content .section-toc {
    display: none;
}
.fixed-toolbar .toolbar, .paligo-preview .toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 11;
}
/* ------------------------------------------------------------------
   STICKY TABLE HEADERS
   Switched on in the layout: Table styles > Extra responsive table
   features (3 = every table with 3 or more columns).
   Paligo's responsive table script floats a copy of the header row
   (.sticky-table-header) at the top of the screen once the real header
   scrolls out of view, and adds .fixed-solution to the table wrapper.
   Tables scroll with the page as normal.
   - top: --toolbar-h is set by scripts.js from the real toolbar height
     (falls back to 64px), so the floating header sits directly under
     the fixed toolbar.
   - z-index sits above the sticky title bar (10) and the accordion
     sections (9), so the table header is never hidden behind them.
   - Solid background stops table rows showing through the header.
     #eeeef3 is the header tint rgba(83, 84, 134, 0.1) on white.
   ------------------------------------------------------------------ */
.fixed-solution .sticky-table-header {
    top: var(--toolbar-h, 64px) !important;
    z-index: 12 !important;
}
.fixed-solution .sticky-table-header th,
.fixed-solution .sticky-table-header td {
    background: #eeeef3;
}
/* ------------------------------------------------------------------
   COMPACT TABLE HEADER ROW
   The floating sticky header is a copy of the real header row, so
   making the real header smaller also shrinks the sticky one.
   - Removes the 0.75em bottom margin that the global p rule adds
     inside each header cell (Paligo wraps header text in <p>).
   - Tighter padding and line-height than the default table cells.
   Only thead is targeted, so table body rows keep normal spacing.
   ------------------------------------------------------------------ */
.topic-content .informaltable thead th,
.fixed-solution .sticky-table-header th {
    padding: 0.3em 0.5em;
    line-height: 1.25;
    vertical-align: middle;
}
.topic-content .informaltable thead th p,
.fixed-solution .sticky-table-header th p {
    margin: 0;
}
/* ------------------------------------------------------------------
   ADVANCED SEARCH PAGE HEADER
   Makes the Algolia advanced search page banner match the landing
   page. Only applies to pages with body.search-page.
   - Photo: the landing page image (css/image/portal-bg.jpg). The path
     is relative to this CSS file, which sits in the css folder. If the
     banner shows no photo, change it to ../css/image/portal-bg.jpg.
     The existing .portal-header::after rule (filter: none) keeps it
     unfiltered, as on the landing page.
   - Height: 350px, the same as the landing page header.
   - Logo: the Optidrive E4 logo, drawn above the search box. The
     landing page attaches it to the h1, which the search page does
     not have, so here it sits on the search box container instead.
   ------------------------------------------------------------------ */
body.search-page .portal-header::after {
    background: url('image/portal-bg.jpg') no-repeat center center !important;
    background-size: cover !important;
}
body.search-page .portal-header {
    height: 350px;
}
body.search-page .portal-header .portal-search::before {
    content: '';
    display: block;
    width: 200px;
    height: 91px; /* 200px x the logo's 0.4534 aspect ratio */
    margin: 0 auto 1.5em;
    background: url('https://www.invertekdrives.com/img/common/logos/optidrive-e4-white.svg') center center / contain no-repeat;
}
@media (min-width: 768px) {
    body.search-page .portal-header .portal-search {
        margin-top: 2em;
    }
}
/* ------------------------------------------------------------------
   PARAMETER GROUP HEADINGS
   Makes group headings such as "Group 5.2 - Motor Brake Control -
   Motor Brake Monitoring" stand out from the parameter entries below.
   - Targets only the titles of sections nested inside a topic that are
     not accordions, so it skips the main page title and the collapsible
     parameter entries (section.accordion).
   - Paligo wraps the heading as div.title > h4.title, so the selector
     uses div.title > .title to style only the heading itself, not the
     wrapper as well.
   - Slim tinted band in the table header colour (#eeeef3) so the
     heading and its table read as one block.
   ------------------------------------------------------------------ */
.topic-content > section.section > section.section:not(.accordion) > .titlepage div.title > .title {
    background: #eeeef3;
    border-radius: 3px;
    color: #535486;
    font-weight: 600;
    font-size: 1.3em;
    padding: 0.5em 0.85em;
    margin: 0;
}
/* ------------------------------------------------------------------
   PARAMETER PAGE LAYOUT TIDY-UP
   ------------------------------------------------------------------ */

/* 1. Accordion entries (P7-01 etc.)
   Removes the large gaps above and below each collapsed parameter so
   each group stays compact. */
.topic-content section.section.accordion {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.topic-content section.section.accordion .panel-heading,
.topic-content section.section.accordion > .titlepage {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0.6em;
    padding-bottom: 0.6em;
}
.topic-content section.section.accordion .panel-heading .title,
.topic-content section.section.accordion > .titlepage .title {
    margin: 0;
}

/* Accordion titles: sentence case and lighter, so the group heading
   bands lead. Shows the title as written in Paligo. */
.topic-content section.section.accordion .title {
    text-transform: none;
    font-weight: 500;
    letter-spacing: normal;
}

/* 2. Multi-value table cells
   Paligo puts each option ("0: 230V UPS", "1: 400V UPS"...) in its own
   paragraph, which picks up the global p bottom margin. Keep a small
   gap between options and none after the last one. */
.topic-content table td p {
    margin: 0 0 0.3em;
}
.topic-content table td p:last-child {
    margin-bottom: 0;
}

/* 4. Full-width tables
   Every table fills the content column, so each group's table lines
   up with its heading band. */
.topic-content .informaltable table,
.topic-content .table-responsive table {
    width: 100% !important;
}

/* 5. Row striping: removed. It goes by row number, so in tables with
   merged cells it fell out of step; tables now use purple grid lines
   instead (see ALL TABLES below). */

/* ------------------------------------------------------------------
   STICKY GROUP HEADINGS
   While scrolling through a group, its heading band sticks under the
   toolbar and the floating table header sits directly below it, so
   you always know which group the table belongs to.
   - Sticky only works inside its own section, so each heading scrolls
     away when its group ends and the next one takes over.
   - z-index 11: above the main page title (10) and accordions (9),
     below the floating table header (12).
   - White background so rows scrolling underneath don't show through.
   - The space above each group is on the wrapper (margin), not the
     heading, so it doesn't stick as empty space.
   - Accordion titles (P7-01 etc.) are not sticky.
   ------------------------------------------------------------------ */
/* Every nested title stops being sticky (overrides main .titlepage),
   including sub-headings inside parameter entries such as
   "Macro Tables" or "Motor Contactor Sequence"... */
main section.section section.section > .titlepage {
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    padding: 0;
}
/* ...except the group headings: sections directly inside the topic. */
.topic-content > section.section > section.section:not(.accordion) > .titlepage {
    position: sticky;
    top: var(--toolbar-h, 64px);
    z-index: 11;
    background: #fff;
    padding: 0.25em 0 0; /* no padding below, so no gap above the table header */
    margin: 1.5em 0 0.5em;
}
/* Phones and small tablets: group headings scroll normally. On a narrow
   screen the toolbar is taller and wide tables scroll sideways, so
   Paligo positions their header differently and it slid behind the
   stuck heading. Here the table header sits directly under the toolbar. */
@media (max-width: 767px) {
    .topic-content > section.section > section.section:not(.accordion) > .titlepage {
        position: static;
        background: transparent;
        padding: 0;
    }
    /* The page title (e.g. "Group 2 Parameter Descriptions") also scrolls
       normally on phones. When sticky it covered the top of the floating
       table header, which Paligo places directly under the toolbar. */
    main .titlepage {
        position: static;
    }
}
/* Toolbar above everything that sticks or floats, so a heading or
   table header scrolling up slides behind it, not over it. */
.fixed-toolbar .toolbar, .paligo-preview .toolbar {
    z-index: 20;
}
/* Floating table header: below the stuck group heading.
   --group-h is the height of the heading currently stuck, set by
   scripts.js (0px when none is stuck). */
.fixed-solution .sticky-table-header {
    top: calc(var(--toolbar-h, 64px) + var(--group-h, 0px)) !important;
}

/* ------------------------------------------------------------------
   SEARCH FILTERS: TWO COLUMNS
   Lays out the checkbox options under each filter heading (Motor
   Type, Supply Type...) in two columns on the advanced search page.
   Uses Algolia's standard filter list class. Long labels wrap within
   their column. Falls back to one column on phones.
   ------------------------------------------------------------------ */
body.search-page .ais-RefinementList-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1em;
    row-gap: 0.4em;
}
body.search-page .ais-RefinementList-item {
    margin: 0;
}
@media (max-width: 480px) {
    body.search-page .ais-RefinementList-list {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------
   SEARCH FILTERS: CLOSE UP THE GAPS
   Less space between filter groups (Motor Type, Supply Type...) on
   the advanced search page.
   - Group headings are h4.refinement-title inside .filters-panel; the
     options for each group are in the div that follows (e.g.
     #motor_type-refinement).
   - Checkbox kept beside its label, so wrapped labels like
     "Rollback/Starting" don't drop under the checkbox.
   ------------------------------------------------------------------ */
body.search-page .filters-panel .refinement-title {
    margin: 1em 0 0.4em;
    padding-bottom: 0.3em;
}
body.search-page .filters-panel .refinement-title + div,
body.search-page .filters-panel [id$="-refinement"] {
    margin: 0;
    padding: 0;
}
body.search-page .filters-panel .ais-RefinementList,
body.search-page .filters-panel .ais-RefinementList-list {
    margin: 0;
    padding: 0;
}
body.search-page .ais-RefinementList-list {
    row-gap: 0.25em;
}
body.search-page .ais-RefinementList-label {
    display: flex;
    align-items: flex-start;
    gap: 0.35em;
    margin: 0;
    line-height: 1.25;
}
body.search-page .ais-RefinementList-checkbox {
    margin: 0.15em 0 0;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   SEARCH FILTERS: HIDE COUNTS
   The numbers beside each filter option count Algolia records (one
   per topic section), not topics, so they look inflated. Hidden to
   avoid confusion; the filters work the same without them.
   ------------------------------------------------------------------ */
body.search-page .ais-RefinementList-count {
    display: none;
}

/* ------------------------------------------------------------------
   SECTION PAGE TILES
   Pages that list the topics inside them (e.g. P2 > Fault Codes, PM
   Motor Guide) show them in .footer-content > .section-toc-after. This
   lays them out as solid brand-purple tiles with the name centred in
   bold white; on hover a tile grows slightly and turns a lighter
   purple. The "In this section" heading is hidden.
   - Tiles are 190 x 120px; as many as fit per row. Slightly narrower
     on phones.
   - Paligo sets display: block inline on the list, so the grid needs
     !important.
   - The icon uses the FA6 Solid font loaded at the top of this file.
   ------------------------------------------------------------------ */

/* Close the gap between the page title and the tiles: only on pages
   that have this list, so normal topics keep their spacing. */
.topic-content:has(.section-toc-after) > section.section {
    padding-bottom: 0;
    margin-bottom: 0;
}
.topic-content .footer-content:has(.section-toc-after) {
    margin-top: 0;
    padding-top: 0;
}
.topic-content .footer-content .section-toc-after {
    margin-top: 0.5em;
}
.topic-content .footer-content .section-toc-after .section-toc-title {
    display: none !important;
}
.topic-content .footer-content .section-toc-after > ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, 190px);
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 8px 4px;
}
.topic-content .footer-content .section-toc-after > ul > li {
    margin: 0;
    padding: 0;
}
.topic-content .footer-content .section-toc-after > ul > li > a.topic-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 120px;
    padding: 16px;
    box-sizing: border-box;
    background: #535486;
    border: 0;
    border-radius: 2px;
    box-shadow: 0 1px 6px rgba(83, 84, 134, 0.25);
    color: #fff !important;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* No icon: just the name, centred */
.topic-content .footer-content .section-toc-after > ul > li > a.topic-link::before,
.topic-content .footer-content .section-toc-after > ul > li > a.topic-link::after {
    content: none !important;
    display: none !important;
}
/* Grow on hover or keyboard focus, as on the home page */
.topic-content .footer-content .section-toc-after > ul > li > a.topic-link:hover,
.topic-content .footer-content .section-toc-after > ul > li > a.topic-link:focus {
    transform: scale(1.05);
    background: #6a6ba3;
    box-shadow: 0 8px 22px rgba(83, 84, 134, 0.35);
    color: #fff !important;
    position: relative;
    z-index: 2;
}
@media (max-width: 480px) {
    .topic-content .footer-content .section-toc-after > ul {
        grid-template-columns: repeat(auto-fit, 150px);
        gap: 16px;
        justify-content: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .topic-content .footer-content .section-toc-after > ul > li > a.topic-link {
        transition: none;
    }
    .topic-content .footer-content .section-toc-after > ul > li > a.topic-link:hover,
    .topic-content .footer-content .section-toc-after > ul > li > a.topic-link:focus {
        transform: none;
    }
}

/* ------------------------------------------------------------------
   STICKY HEADERS FOR TABLES WITH NESTED TABLES
   Paligo's sticky header plugin can't handle a table that has another
   table inside a cell (e.g. the 0 : Ramp to stop / 1 : Coast to stop
   option lists), so scripts.js skips those. For them, the header cells
   of the outer table stick under the toolbar using CSS instead.
   - Desktop/tablet only: on phones these tables need to scroll
     sideways, which stops CSS sticky from working.
   - The table's wrapper normally clips overflow; it's made visible
     here so the header can stick to the page.
   - Only the outer table's header sticks, not the nested tables'.
   ------------------------------------------------------------------ */
@media (min-width: 768px) {
    .topic-content .table-responsive:has(table table) {
        overflow: visible !important;
    }
    .topic-content .table-responsive:has(table table) > table > thead > tr > th {
        position: sticky;
        top: var(--toolbar-h, 64px);
        z-index: 12;
        background: #eeeef3;
        box-shadow: inset 0 -1px 0 #d9d9e3;
    }
}

/* ------------------------------------------------------------------
   TABLE HEADER ALIGNMENT
   Some header cells were showing left-aligned even though they are
   set to centre in Paligo, so they didn't line up with the centred
   numbers below. Header cells now follow the alignment set in Paligo
   (the align attribute), in the table and in the floating sticky copy.
   ------------------------------------------------------------------ */
.topic-content table th[align="center"],
.topic-content table th[align="center"] p,
.sticky-table-header th[align="center"],
.sticky-table-header th[align="center"] p {
    text-align: center !important;
}
.topic-content table th[align="left"],
.topic-content table th[align="left"] p,
.sticky-table-header th[align="left"],
.sticky-table-header th[align="left"] p {
    text-align: left !important;
}
.topic-content table th[align="right"],
.topic-content table th[align="right"] p,
.sticky-table-header th[align="right"],
.sticky-table-header th[align="right"] p {
    text-align: right !important;
}

/* ------------------------------------------------------------------
   PARAMETER TABLES (tables shaded with bg1 / bg2 in Paligo)
   In Paligo, table cells are shaded for the PDF with
   background-color:bg1 (light) and bg2 (darker). In the HTML5 output
   these become the classes .bg1 and .bg2, which are styled here so the
   web tables match the PDF, with a stronger web look:
   - Header row: brand purple with white text (also on the floating
     sticky header).
   - bg2 (parameter number column): medium purple-grey, bold.
   - bg1 (name, minimum, maximum, default, units): light purple-grey.
   - Purple horizontal lines between rows, with a stronger purple
     line across the whole table where each new parameter starts, so
     it's clear where one parameter ends and the next begins. The
     header row has white lines between its headings.
   - Cells are aligned to the top, as in the PDF; cells Paligo hasn't
     given an alignment are centred.
   - No alternate-row striping; unshaded cells are white.
   ------------------------------------------------------------------ */
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td {
    background: #fff;
    vertical-align: top;
    border: 1px solid #e3e3ec;
}
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td:not([align]),
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td:not([align]) > p {
    text-align: center;
}

/* Header row: purple with white text */
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th,
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th {
    background: #535486 !important;
    color: #fff !important;
    /* Lines are drawn with box-shadow rather than borders: in a
       collapsed table, borders don't move with a header that sticks to
       the top of the screen, which made them look faded or missing. */
    border: 0 !important;
    background-clip: padding-box;
    box-shadow: none !important;      /* no outline: just the header colour */
    font-weight: 600;
    font-size: 12px !important;   /* smaller so long headings fit on fewer lines */
    line-height: 1.25;
    padding: 0.45em 0.35em !important;
    hyphens: manual;
}
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th *,
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th * {
    color: #fff !important;
}

/* Thin white line between headings only (drawn on the left of each
   heading after the first, so nothing extra shows at either end of the
   row, even when the Filter has hidden columns) */
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th + th,
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th + th {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.6) !important;
}

/* The heading text sits in <p> and <span> elements, which the theme
   gives their own font size, so make them use the header's size */
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th *,
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th * {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Parameter names (the left-aligned bg1 cells, e.g. "Acceleration Ramp
   Time") stay on one line; the Description column widens to fit them.
   On narrow screens the table scrolls sideways instead of wrapping. */
/* Only in parameter tables (the ones with communication register
   columns, marked by scripts.js). In other tables, such as the fault
   message tables, text wraps normally so they fit the page. */
.topic-content table.parameter-table td.bg1[align="left"] {
    white-space: nowrap;
}

/* Header cells Paligo hasn't given an alignment (the web-only columns,
   which lose theirs because of outputformat="html5") are centred */
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th:not([align]),
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th:not([align]) p,
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th:not([align]),
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th:not([align]) p {
    text-align: center !important;
}

/* Parameter number column */
.topic-content table td.bg2 {
    background: #d4d4e5 !important;
    color: #2f3060;
    font-weight: 700;
    white-space: nowrap; /* keep numbers like P-03.0 on one line */
}

/* Name and value cells */
.topic-content table td.bg1 {
    background: #f1f1f7 !important;
}

/* Purple horizontal lines between all rows. The table is collapsed
   with no spacing, so no white gaps show between rows. */
.topic-content table:has(td.bg1, td.bg2) {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td {
    border-top: 2px solid #b8b8d4 !important;
    border-bottom: 2px solid #b8b8d4 !important;
    border-left: 2px solid #b8b8d4 !important;   /* vertical lines between */
    border-right: 2px solid #b8b8d4 !important;  /* columns, same purple   */
}

/* Stronger purple line where each new parameter starts */
.topic-content table:has(td.bg1, td.bg2) > tbody > tr:has(> td.bg2) > td {
    border-top: 3px solid #8586b3 !important;
}

/* TEMPORARY: Paligo currently drops the bg1 setting from cells marked
   outputformat="html5" (the web-only columns: Access, Change During
   Run, registers...), so they would show white. Until Paligo fixes
   this, shade the rest of any row that has bg1 cells with bg1 too.
   Remove this rule once Paligo keeps the setting on those cells. */
.topic-content table > tbody > tr:has(> td.bg1) > td:not(.bg2) {
    background: #f1f1f7 !important;
}

/* ------------------------------------------------------------------
   CELL ALIGNMENT FROM PALIGO
   Body cells follow the horizontal (align) and vertical (valign)
   alignment set on them in Paligo, in every table.
   ------------------------------------------------------------------ */
.topic-content table td[align="left"],
.topic-content table td[align="left"] > p {
    text-align: left !important;
}
.topic-content table td[align="center"],
.topic-content table td[align="center"] > p {
    text-align: center !important;
}
.topic-content table td[align="right"],
.topic-content table td[align="right"] > p {
    text-align: right !important;
}
.topic-content table td[valign="top"] {
    vertical-align: top !important;
}
.topic-content table td[valign="middle"] {
    vertical-align: middle !important;
}
.topic-content table td[valign="bottom"] {
    vertical-align: bottom !important;
}

/* ------------------------------------------------------------------
   PARAMETER TABLES: HEADER SIZES AND DESCRIPTION ROWS
   - The first six headings (Par., Description, Minimum, Maximum,
     Default, Units) are larger than the web-only register headings.
   - Merged description rows (e.g. "Speed at which the drive switches
     from...") are left-aligned, with the option lines below them.
   ------------------------------------------------------------------ */
.topic-content table:has(td.bg1, td.bg2) > thead > tr > th:nth-child(-n+6),
.topic-content .table-responsive:has(td.bg1, td.bg2) .sticky-table-header th:nth-child(-n+6) {
    font-size: 14px !important;
}
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td[colspan],
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td[colspan] > p {
    text-align: left !important;
}
.topic-content table:has(td.bg1, td.bg2) > tbody > tr > td[colspan] {
    padding-left: 0.75em;
}

/* ------------------------------------------------------------------
   PAGE TITLE
   The main title at the top of each topic (e.g. "PI Operation") is a
   full-width brand-purple band with bold white text, so it clearly
   heads the page above the grey section bands. It scrolls away with
   the page rather than sticking, so it never shows behind a section
   heading or table header that sticks to the top of the screen.
   ------------------------------------------------------------------ */
.topic-content > section > .titlepage {
    position: static !important;
    padding: 0 !important;
    background: transparent !important;
}
.topic-content > section > .titlepage :is(h1, h2, h3, h4).title {
    display: block;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.25;
    color: #fff !important;
    background: #535486;
    padding: 0.5em 0.75em !important;
    margin: 0.3em 0 0.8em !important;
    border-radius: 2px;
    text-align: center;
}
@media (max-width: 767px) {
    .topic-content > section > .titlepage :is(h1, h2, h3, h4).title {
        font-size: 22px !important;
    }
}

/* ------------------------------------------------------------------
   PARAMETER PAGES: TITLE DOESN'T STICK
   On pages with parameter tables, the table header row sticks to the
   top of the screen while scrolling. The page title also stuck there,
   and since it is now taller than the header row, a white strip of it
   showed below the header and cut through the rows scrolling
   underneath. On these pages the title scrolls away instead, so only
   the table header stays at the top.
   ------------------------------------------------------------------ */
main:has(td.bg1, td.bg2) .titlepage {
    position: static !important;
}

/* ------------------------------------------------------------------
   SECTION TILES ONLY ON EMPTY CHAPTER PAGES
   Paligo adds the list of sub-topics (shown as purple tiles) to the
   bottom of every page that has sub-topics. On a page that has its own
   content, such as PI Operation, those sections are already on the
   page and in "On this page", so the tiles are repeated information
   and are hidden. A page counts as having content when it has text,
   lists, tables, images, notes or sections of its own. They still show on chapter pages with no content of
   their own (e.g. Installation & Commissioning), where they are the
   way into the chapter.
   ------------------------------------------------------------------ */
.topic-content:has(> section.section > :is(p:not(:empty), ul, ol, dl, table, .informaltable, .table, figure, .figure, .informalfigure, .mediaobject, pre, .note, .caution, .warning, .important, .tip, .admonition, section)) .footer-content .section-toc-after {
    display: none !important;
}

/* ------------------------------------------------------------------
   ACCORDIONS (e.g. PI Related Parameters, Troubleshooting & FAQ)
   Paligo's markup: section.accordion > .accordion-icon (the triangle)
   + .panel > .panel-heading (the clickable heading) + .panel-body.
   Closed: pale purple-grey band with a purple bar on the left and bold
   purple text; hovering darkens it. Open: brand purple with white
   text, and the content sits in a light outline below with the purple
   bar carried down.
   ------------------------------------------------------------------ */
.topic-content section.section.accordion {
    position: relative;
    margin: 0 0 6px !important;
    border: 0 !important;
}
.topic-content section.section.accordion > .panel {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
}
.topic-content section.section.accordion .panel-heading {
    background: #eeeef3 !important;
    border: 0 !important;
    border-left: 5px solid #535486 !important;
    border-radius: 2px;
    padding: 0.6em 1em 0.6em 2.2em !important;
    color: #535486 !important;
    transition: background 0.2s ease, color 0.2s ease;
}
.topic-content section.section.accordion .panel-heading a,
.topic-content section.section.accordion .panel-heading .title {
    color: inherit !important;
    font-weight: 700 !important;
    font-size: 1.05em !important;
    text-decoration: none !important;
    border: 0 !important;
}
.topic-content section.section.accordion .panel-heading:hover {
    background: #e2e2ee !important;
}
/* The heading's inner title block normally has the sticky white
   title background; clear it so the band colour shows through */
.topic-content section.section.accordion .panel-heading .titlepage,
.topic-content section.section.accordion .panel-heading .titlepage > *,
.topic-content section.section.accordion .panel-heading a > div,
.topic-content section.section.accordion .panel-heading div.title {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    box-shadow: none !important;
}
/* Open */
.topic-content section.section.accordion .panel-heading.active,
.topic-content section.section.accordion .panel-heading:has(a[aria-expanded="true"]) {
    background: #535486 !important;
    color: #fff !important;
}
/* The triangle: purple on the pale band, white on the open band */
.topic-content section.section.accordion > .accordion-icon {
    color: #535486 !important;
    z-index: 2;
}
.topic-content section.section.accordion:has(.panel-heading.active) > .accordion-icon,
.topic-content section.section.accordion:has(a[aria-expanded="true"]) > .accordion-icon {
    color: #fff !important;
}
.topic-content section.section.accordion > .accordion-icon::before,
.topic-content section.section.accordion > .accordion-icon::after {
    color: inherit !important;
    border-left-color: currentColor;
}
/* Open content */
.topic-content section.section.accordion .panel-body {
    padding: 0.8em 1em !important;
    border: 1px solid #e3e3ec !important;
    border-top: 0 !important;
    border-left: 5px solid #535486 !important;
}

/* ------------------------------------------------------------------
   SIDEBAR LOGO ON PURPLE
   The layout's Logotype is a white logo, which disappeared on the white
   sidebar. The logo area at the top of the sidebar is brand purple, so
   the white logo shows, matching the purple toolbar beside it.
   ------------------------------------------------------------------ */
.site-sidebar .site-sidebar-header {
    background-color: #535486 !important;
    border-bottom: 0 !important;
    /* same height as the purple toolbar beside it */
    height: var(--toolbar-h, 64px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 16px !important;
    overflow: hidden;
}
.site-sidebar .site-sidebar-header a {
    display: flex;
    align-items: center;
    height: 100%;
}
.site-sidebar .site-sidebar-header .logo {
    height: calc(var(--toolbar-h, 64px) - 20px) !important;
    max-width: 100% !important;
    width: auto;
    padding: 0 !important;
    margin: 0 !important;
}

/* Section tiles centred under the page title */
.topic-content .footer-content,
.topic-content .footer-content .section-toc-after {
    width: 100%;
}
.topic-content .footer-content .section-toc-after > ul {
    width: 100%;
    justify-content: center;
}

/* ------------------------------------------------------------------
   SIDEBAR MENU HOVER
   Menu items in the left-hand sidebar turn brand purple with white
   text (and a white arrow) when the mouse is over them or they have
   keyboard focus.
   ------------------------------------------------------------------ */
.nav-site-sidebar li > a {
    transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-site-sidebar li > a:hover,
.nav-site-sidebar li > a:focus-visible {
    background-color: #535486 !important;
    color: #fff !important;
}
.nav-site-sidebar li > a:hover *,
.nav-site-sidebar li > a:focus-visible *,
.nav-site-sidebar li > a:hover::before,
.nav-site-sidebar li > a:hover::after {
    color: #fff !important;
}

/* ------------------------------------------------------------------
   PARAMETER TABLE FILTER NOTE
   Note added above parameter tables by scripts.js ("Parameter tables:
   open with the main columns only"), telling readers to use Filter to
   show the communication register columns.
   ------------------------------------------------------------------ */
.parameter-filter-note {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin: 0 0 0.6em;
    padding: 0.6em 0.9em;
    background: #eeeef3;
    border-left: 5px solid #535486;
    border-radius: 2px;
    color: #2f3060;
    font-size: 0.95em;
    line-height: 1.4;
}
.parameter-filter-note::before {
    content: "\f0b0"; /* filter icon */
    font-family: 'FA6 Solid';
    font-weight: 900;
    color: #535486;
    flex-shrink: 0;
}

/* Empty cells at the end of description rows in parameter tables
   (marked by scripts.js) are hidden, so no thin strip shows after the
   Units column */
.topic-content table td.parameter-empty-cell {
    display: none !important;
}

/* Fixed header height for parameter tables (the tables with
   communication register columns, marked by scripts.js): tall enough for the longest
   communication headings (e.g. "Modbus-RTU Register - Legacy" on four
   lines), so the header stays the same size whether the Filter shows
   the main columns only or all of them. Text sits in the middle. */
.topic-content table.parameter-table > thead > tr > th,
.table-responsive:has(table.parameter-table) .sticky-table-header th {
    height: 72px !important;
    box-sizing: border-box;
    vertical-align: middle !important;
}
.topic-content table.parameter-table > thead > tr,
.table-responsive:has(table.parameter-table) .sticky-table-header tr {
    height: 72px !important;
}

/* ------------------------------------------------------------------
   FILTER NOTE AND BUTTON AS ONE BAR
   The note above parameter tables and the Filter button sit side by
   side in one pale purple bar: note on the left, a purple Filter
   button on the right, the same height.
   ------------------------------------------------------------------ */
.table-wrapper:has(> .parameter-filter-note) {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.table-wrapper:has(> .parameter-filter-note) > .parameter-filter-note {
    flex: 1 1 0;
    margin: 0 0 0.75em !important;
    border-radius: 2px 0 0 2px;
}
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    float: none !important;
    margin: 0 0 0.75em !important;
    padding: 0 0.6em;
    background: #eeeef3;
    border-radius: 0 2px 2px 0;
}
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .btn,
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .dropdown-toggle {
    background: #535486 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 2px;
    padding: 0.35em 0.9em !important;
    font-weight: 600;
}
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .btn:hover,
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .dropdown-toggle:hover {
    background: #6a6ba3 !important;
}
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .btn *,
.table-wrapper:has(> .parameter-filter-note) > .btn-toolbar .dropdown-toggle * {
    color: #fff !important;
}
.table-wrapper:has(> .parameter-filter-note) > :not(.parameter-filter-note):not(.btn-toolbar) {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ------------------------------------------------------------------
   ALL TABLES
   Every table in a topic gets the same look as the parameter tables:
   - Header rows: brand purple with bold white text and thin white
     lines between headings (also on the floating sticky header).
   - Body: white cells with purple-grey grid lines; no row striping,
     so merged cells don't look patchy.
   - Headings down the side (th cells in the body): light purple-grey,
     bold purple, like the Par. column.
   Small tables inside a table cell keep a lighter style so they don't
   look like part of the main grid. Parameter tables keep their own
   bg1/bg2 shading on top of this.
   ------------------------------------------------------------------ */
.topic-content table:not(td table, th table) > thead > tr > th,
.topic-content .sticky-table-header th {
    background: #535486 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-bottom: 2px solid #535486 !important;
    font-weight: 600;
    vertical-align: middle !important;
}
.topic-content table:not(td table, th table) > thead > tr > th *,
.topic-content .sticky-table-header th * {
    color: #fff !important;
}
.topic-content table:not(td table, th table) > thead > tr > th:not([align]),
.topic-content table:not(td table, th table) > thead > tr > th:not([align]) p {
    text-align: center;
}
.topic-content table:not(td table, th table) > tbody > tr > td {
    background-color: #fff;
    border: 1px solid #b8b8d4 !important;
}
.topic-content table:not(td table, th table) > tbody > tr > th {
    background: #e4e4ef !important;
    color: #2f3060 !important;
    border: 1px solid #b8b8d4 !important;
    font-weight: 700;
}
.topic-content table:not(td table, th table) {
    border-collapse: collapse !important;
    border: 1px solid #b8b8d4 !important;
}
/* Tables inside cells: light lines only */
.topic-content td table td,
.topic-content td table th {
    border: 1px solid #e3e3ec !important;
    background: transparent !important;
    color: inherit !important;
}

/* ------------------------------------------------------------------
   FILTER BUTTON ON PARAMETER TABLES ONLY
   Paligo adds a Filter button to every responsive table. It's hidden
   on all tables except parameter tables (the ones with communication
   register columns), which scripts.js marks .parameter-table-wrapper.
   ------------------------------------------------------------------ */
.table-wrapper > .btn-toolbar {
    display: none !important;
}
/* (Parameter tables now use their own Filter, see PARAMETER TABLE
   FILTER below, so Paligo's button is hidden on every table.) */

/* ------------------------------------------------------------------
   ALL OTHER TABLES (not parameter tables)
   bg1/bg2 shading set in Paligo only shows in parameter tables (the
   tables with communication register columns, marked .parameter-table
   by scripts.js). Every other table looks the same, like the FAQ
   tables: purple header with white text, white cells, thin purple-grey
   grid lines, normal text that wraps. Rules use #topic-content so they
   override the parameter-table styling.
   ------------------------------------------------------------------ */
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td,
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td.bg1,
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td.bg2 {
    background: #fff !important;
    color: inherit !important;
    font-weight: inherit !important;
    white-space: normal !important;
    border: 1px solid #b8b8d4 !important;
}
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td:not([valign]) {
    vertical-align: middle !important;
}
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td:not([align]),
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td:not([align]) > p {
    text-align: left !important;
}
#topic-content table:not(.parameter-table, td table, th table) > thead > tr > th,
#topic-content .table-responsive:not(:has(table.parameter-table)) .sticky-table-header th {
    font-size: inherit !important;
    height: auto !important;
    padding: 0.5em 0.6em !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-bottom: 2px solid #535486 !important;
}

/* ------------------------------------------------------------------
   PARAMETER TABLE FILTER
   The bar above every parameter table (added by scripts.js, "Parameter
   tables: our own column Filter"): note on the left, purple Filter
   button on the right; the button opens a list of columns to tick.
   Hidden columns use .kb-col-hidden.
   ------------------------------------------------------------------ */
.kb-col-hidden {
    display: none !important;
}
.kb-param-filter {
    display: flex;
    align-items: stretch;
    margin: 0 0 0.75em;
    background: #eeeef3;
    border-left: 5px solid #535486;
    border-radius: 2px;
}
.kb-param-filter__note {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.6em 0.9em;
    color: #2f3060;
    font-size: 0.95em;
    line-height: 1.4;
}
.kb-param-filter__note::before {
    content: "\f0b0"; /* filter icon */
    font-family: 'FA6 Solid';
    font-weight: 900;
    color: #535486;
    flex-shrink: 0;
}
.kb-param-filter__holder {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 0.6em;
}
.kb-param-filter__btn {
    background: #535486;
    color: #fff;
    border: 0;
    border-radius: 2px;
    padding: 0.4em 1em;
    font-weight: 600;
    cursor: pointer;
}
.kb-param-filter__btn::after {
    content: " \f0d7"; /* caret */
    font-family: 'FA6 Solid';
    font-weight: 900;
}
.kb-param-filter__btn:hover,
.kb-param-filter__btn:focus-visible {
    background: #6a6ba3;
}
.kb-param-filter__menu {
    display: none;
    position: absolute;
    right: 0.6em;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 240px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5em 0.75em;
    background: #fff;
    border: 1px solid #d4d4e5;
    border-radius: 3px;
    box-shadow: 0 8px 22px rgba(83, 84, 134, 0.25);
}
.kb-param-filter__holder.open .kb-param-filter__menu {
    display: block;
}
.kb-param-filter__menu label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin: 0;
    padding: 0.25em 0;
    font-weight: 400;
    font-size: 0.95em;
    cursor: pointer;
    white-space: nowrap;
}
.kb-param-filter__menu input[type="checkbox"] {
    accent-color: #535486;
    margin: 0;
}
.kb-param-filter__actions {
    display: flex;
    gap: 0.5em;
    padding-bottom: 0.5em;
    margin-bottom: 0.4em;
    border-bottom: 1px solid #e3e3ec;
}
.kb-param-filter__actions button {
    flex: 1;
    background: #eeeef3;
    color: #535486;
    border: 0;
    border-radius: 2px;
    padding: 0.3em 0.5em;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
}
.kb-param-filter__actions button:hover {
    background: #e2e2ee;
}
@media (max-width: 600px) {
    .kb-param-filter {
        flex-direction: column;
    }
    .kb-param-filter__holder {
        padding: 0 0.9em 0.6em;
    }
}

/* ------------------------------------------------------------------
   SOLID TABLE HEADERS WHEN SCROLLING
   The lines between headings were partly see-through, and in tables
   where the header sticks to the top of the screen the borders don't
   move with it, so rows scrolling underneath showed through the
   header. Header lines are now solid and drawn so they move with the
   header, the floating header has a solid purple background, and it
   sits tight under the toolbar with no gap.
   ------------------------------------------------------------------ */
#topic-content table:not(td table, th table) > thead > tr > th,
#topic-content .sticky-table-header th {
    border: 0 !important;
    background-clip: border-box !important;
    box-shadow: inset 1px 0 0 #ffffff, inset 0 -2px 0 #535486 !important;
}
#topic-content table:not(td table, th table) > thead > tr > th:first-child,
#topic-content .sticky-table-header th:first-child {
    box-shadow: inset 0 -2px 0 #535486 !important;
}
#topic-content .sticky-table-header,
#topic-content .sticky-table-header table {
    background: #535486 !important;
    border: 0 !important;
}
.fixed-solution .sticky-table-header {
    top: calc(var(--toolbar-h, 64px) + var(--group-h, 0px) - 2px) !important;
}
@media (min-width: 768px) {
    .topic-content .table-responsive:has(table table) > table > thead > tr > th {
        top: calc(var(--toolbar-h, 64px) - 2px) !important;
    }
}

/* ------------------------------------------------------------------
   COMPACT CHECKLISTS INSIDE TABLES
   Paligo checklists in table cells (e.g. the troubleshooting tables).
   Paligo sizes its tick circles from the item's 18px text size, so the
   items keep that size and only the wording inside is made smaller,
   matching the table text. Padding and gaps are reduced, the x (remove
   item) button is hidden, and the reset button becomes a small icon in
   the top-right corner of the list. The tick circles themselves are
   left exactly as Paligo draws them. Checklists outside tables are
   unchanged.
   ------------------------------------------------------------------ */
.topic-content td div.itemizedlist.checklist {
    position: relative;
    margin: 0 0 0.5em !important;
    padding: 0 24px 0 0 !important;
}
.topic-content td div.itemizedlist.checklist:last-child {
    margin-bottom: 0 !important;
}
.topic-content td .checklist-reset-wrapper {
    position: absolute !important;
    top: 4px;
    right: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    opacity: 0.5;
    z-index: 1;
}
.topic-content td .checklist-reset-wrapper:hover {
    opacity: 1;
}
.topic-content td ul.checklist {
    margin: 0 !important;
    padding: 0 !important;
}
.topic-content td ul.checklist > li {
    margin: 0 0 4px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    min-height: 42px;
}
.topic-content td ul.checklist > li:last-child {
    margin-bottom: 0 !important;
}
.topic-content td ul.checklist > li .check-item-content,
.topic-content td ul.checklist > li .check-item-content p {
    font-size: 0.75em !important;   /* 18px x 0.75 = about the table text size */
    line-height: 1.45 !important;
    margin: 0 !important;
}
.topic-content td ul.checklist > li .check-item-content p {
    font-size: 1em !important;
}
.topic-content td ul.checklist > li .check-item-content p + p {
    margin-top: 0.15em !important;
}
.topic-content td ul.checklist > li .close {
    display: none !important;
}

/* ------------------------------------------------------------------
   CHECKLIST TICKS
   Paligo draws each checklist circle as the label after the checkbox
   (28px, border-radius 50%) and turns the border green (#2ab27b) when
   ticked. The tick is redrawn here so it sits exactly in the middle of
   the circle, and both the tick and the circle's border are brand
   purple when ticked. Applies to all checklists.
   ------------------------------------------------------------------ */
.checklist-checkbox-wrapper label::before {
    display: none !important;
}
.checklist-checkbox-wrapper label::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 13px !important;
    height: 7px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-left: 2px solid #535486 !important;
    border-bottom: 2px solid #535486 !important;
    background: transparent !important;
    transform: translate(-50%, -70%) rotate(-45deg) !important;
    opacity: 0 !important;
    margin: 0 !important;
}
.checklist-checkbox-wrapper input[type="checkbox"]:checked + label {
    border-color: #535486 !important;
}
.checklist-checkbox-wrapper input[type="checkbox"]:checked + label::after {
    opacity: 1 !important;
}

/* ------------------------------------------------------------------
   FILTER BAR SCROLLS WITH THE PAGE
   The Filter bar above parameter tables no longer sticks to the top of
   the screen. It scrolls away with the page, and the table's floating
   header row sits on top of it, so the header is never hidden.
   ------------------------------------------------------------------ */
#topic-content .kb-param-filter,
.topic-content .kb-param-filter {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    z-index: 1 !important;
}
/* While the Filter menu is open, lift the bar so its menu shows over the table */
#topic-content .kb-param-filter:has(.kb-param-filter__holder.open),
.topic-content .kb-param-filter:has(.kb-param-filter__holder.open) {
    z-index: 13 !important;
}

/* ------------------------------------------------------------------
   PHONES IN LANDSCAPE
   When a phone is turned sideways the left-hand menu is hidden so the
   page (and wide tables) can use the full width. scripts.js removes
   any space the theme keeps for the menu ("Phones turned sideways").
   Tablets and computers are not affected (they are taller than 500px).
   Turn the phone upright to use the menu.
   ------------------------------------------------------------------ */
@media (orientation: landscape) and (max-height: 500px) {
    .site-sidebar {
        display: none !important;
    }
}

/* Floating table header: scrolls sideways with the table on phones
   (see "Floating table header follows sideways scrolling" in scripts.js) */
.sticky-table-header::-webkit-scrollbar {
    display: none;
}
.sticky-table-header {
    scrollbar-width: none;
}

/* ------------------------------------------------------------------
   SHADING FROM PALIGO IN ALL TABLES
   Cell shading set in Paligo (bg1 / bg2) now shows in every table, not
   just the parameter tables, so you decide in Paligo which cells are
   shaded (e.g. the empty cells in the Terminal Control Macros table).
   The same two shades as the parameter tables are used:
   - bg1: light purple-grey (#f1f1f7)
   - bg2: darker purple-grey (#d4d4e5)
   The writing stays as normal (not bold) in these tables. Cells with
   no shading set in Paligo stay white.
   ------------------------------------------------------------------ */
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td.bg1 {
    background: #f1f1f7 !important;
}
#topic-content table:not(.parameter-table, td table, th table) > tbody > tr > td.bg2 {
    background: #d4d4e5 !important;
}

/* ------------------------------------------------------------------
   LINKS TO A PLACE ON THE PAGE: NOT HIDDEN UNDER STICKY BARS
   When a link jumps to a row or heading further down (e.g. "Macro 1
   Summary"), the toolbar, a stuck group heading and the table's
   floating header row sit over the top of the page. scripts.js ("Links
   to a place on the page") moves the page so the target starts
   directly below whatever is stuck. These rules are
   a back-up for the browser's own jump: they leave room for the
   toolbar and stuck heading, plus the table header row for targets
   inside a table.
   ------------------------------------------------------------------ */
#topic-content [id] {
    scroll-margin-top: calc(var(--toolbar-h, 64px) + var(--group-h, 0px) + 12px);
}
#topic-content table [id],
#topic-content tr[id] {
    scroll-margin-top: calc(var(--toolbar-h, 64px) + var(--group-h, 0px) + 90px);
}
/* (Brief highlight no longer used from version 67) */
.kb-jump-flash {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    background: rgba(83, 84, 134, 0.18);
    outline: 2px solid rgba(83, 84, 134, 0.6);
    border-radius: 2px;
    animation: kb-jump-flash 1.8s ease-out forwards;
}
@keyframes kb-jump-flash {
    0%, 40% { opacity: 1; }
    100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .kb-jump-flash {
        animation-duration: 2.5s;
    }
}

/* ------------------------------------------------------------------
   PUBLISHED DATE ON THE HOME PAGE
   The date and time the help desk was last published, shown in the
   purple banner at the bottom of the home page after the copyright
   line, e.g. "© 2026 Invertek Drives Limited · Published 4 November
   2026, 14:23". Added by scripts.js ("Published date on the home
   page").
   ------------------------------------------------------------------ */
.kb-published {
    display: inline-block;
    margin-left: 0.6em;
    padding-left: 0.6em;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    opacity: 0.85;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .kb-published {
        display: block;
        margin: 0.3em 0 0;
        padding: 0;
        border: 0;
    }
}

/* ------------------------------------------------------------------
   "VIEW ›" BUTTONS IN TABLES
   Links in a table that just say "View ›" (e.g. the Wiring & Examples
   column of Selecting a Terminal Macro) are shown as small purple
   buttons, so it's clear they can be clicked. scripts.js ("View
   buttons in tables") marks them .kb-view-btn; links given the role
   "macro-view" in Paligo get the style too.
   ------------------------------------------------------------------ */
#topic-content a.kb-view-btn,
#topic-content a.macro-view {
    display: inline-block;
    padding: 0.25em 0.9em;
    background: #535486;
    color: #fff !important;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.4;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}
#topic-content a.kb-view-btn:hover,
#topic-content a.kb-view-btn:focus-visible,
#topic-content a.macro-view:hover,
#topic-content a.macro-view:focus-visible {
    background: #6a6ba3;
    color: #fff !important;
}
/* Centre the button in its cell */
#topic-content td:has(> p > a.kb-view-btn:only-child),
#topic-content td:has(> p > a.kb-view-btn:only-child) > p,
#topic-content td:has(> p > a.macro-view:only-child),
#topic-content td:has(> p > a.macro-view:only-child) > p {
    text-align: center !important;
    vertical-align: middle !important;
}

/* ------------------------------------------------------------------
   SELECTED ROW
   The table row you jump to (e.g. with a "View ›" button) gets a thick
   brand-purple border round it, so it's clear which macro you picked.
   It stays until you jump to another row. scripts.js ("Links to a
   place on the page") adds .kb-jump-target to the row.
   To change the thickness, change 3px below.
   ------------------------------------------------------------------ */
#topic-content table tr.kb-jump-target > td,
#topic-content table tr.kb-jump-target > th {
    box-shadow: inset 0 3px 0 #535486, inset 0 -3px 0 #535486 !important;
}
#topic-content table tr.kb-jump-target > :first-child {
    box-shadow: inset 3px 0 0 #535486, inset 0 3px 0 #535486, inset 0 -3px 0 #535486 !important;
}
#topic-content table tr.kb-jump-target > :last-child {
    box-shadow: inset -3px 0 0 #535486, inset 0 3px 0 #535486, inset 0 -3px 0 #535486 !important;
}
#topic-content table tr.kb-jump-target > :first-child:last-child {
    box-shadow: inset 0 0 0 3px #535486 !important;
}
