/* =====================================================
   PATMA KNOWLEDGE HUB STYLESHEET
   GLOBAL STYLES, TYPOGRAPHY AND CONTENT BASICS
   ===================================================== */


/* =====================================================
   THEME COMPATIBILITY (MkDocs / Bootstrap)
   ===================================================== */


.source-links {
    float: right;
}

hr {
    border-top: 1px solid #aaa;
}

.modal-dialog {
    margin-top: 60px;
}

@media print {
    #sidebar-holder {
        display: none;
    }
}


/* =====================================================
   GLOBAL FOUNDATION
   ===================================================== */

body {


    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    background: #f8fafc;
    color: #1f1f1f;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

p,
li {
    line-height: 1.7;
    color: #4d5560;
}

p {
    margin-bottom: 1rem;
}

/* Headings — keep existing sizes/weights, modernise colours */

h1 {
    font-size: 2.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;

    font-weight: 600;
    color: #1f1f1f;

    border-bottom: 1px solid #e8edf2;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.7rem;

    font-weight: 600;
    color: #1f1f1f;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;

    font-weight: 600;
    color: #1f1f1f;
}

h4 {
    font-size: 1.1rem;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;

    font-weight: 600;
    color: #1f1f1f;
}

h5,
h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #1f1f1f;
}

/* Header anchor links */

.headerlink {
    font-family: FontAwesome;
    font-size: 14px;
    display: none;
    padding-left: 0.5em;
}

h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink,
h5:hover .headerlink,
h6:hover .headerlink {
    display: inline-block;
}


/* =====================================================
   SECTION SPACING
   ===================================================== */

section {
    margin-bottom: 4rem;
}


/* =====================================================
   ADMONITIONS / ALERT BOXES
   ===================================================== */

.admonition {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: left;
}

.admonition-title {
    font-weight: bold;
    text-align: left;
}

.admonition.note {
    color: #3a87ad;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.admonition.warning {
    color: #c09853;
    background-color: #fcf8e3;
    border-color: #fbeed5;
}

.admonition.danger {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

/* =====================================================
   SIDEBAR, NAVIGATION, LINKS AND CODE FORMATTING
   ===================================================== */


/* =====================================================
   SIDEBAR / NAVIGATION
   ===================================================== */

.bs-sidebar {
    font-size: 0.95rem;
    max-width: 255px;
    margin-top: 1.8rem;
}

.bs-sidebar.affix {
    position: sticky;
    top: 110px;
}

.bs-sidebar.card {
    padding: 0;
    padding-right: 0;
    max-height: 90%;
    overflow-y: auto;
}

/* Sidebar collapse behaviour */
.bs-sidebar .navbar-toggler span {
    transform: scale(1, -1);
}

.bs-sidebar .navbar-toggler.collapsed span {
    transform: scale(1, 1);
}

/* Navigation container */
.bs-sidebar > .navbar-collapse > .nav {
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 5px;
    width: 100%;
}

/* All navigation links */
.bs-sidebar .nav > li > a {
    display: block;
    padding: 5px 20px;
    z-index: 1;

    font-weight: bold;
    color: #4a4f55;
}

/* Nested navigation */
.bs-sidebar .nav .nav > li > a {
    font-weight: normal;
    color: #55697d;
}

.bs-sidebar .nav .nav .nav > li > a {
    margin-left: 1em;
    color: #6b7d90;
}

/* Hover */
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
    text-decoration: none;
    background: #f7f7f7;
    color: #1f1f1f;
    border-right: 2px solid #dddddd;
}

/* Active page */
.bs-sidebar .nav > li > a.active,
.bs-sidebar .nav > li > a.active:hover,
.bs-sidebar .nav > li > a.active:focus {
    font-weight: bold;
    color: #1f1f1f;
    background: #fafafa;
    border-right: 2px solid #c62828;
}


/* =====================================================
   LINKS
   ===================================================== */

/* Default links inherit parent colour so nav/sidebar/etc
   keep their own styling */
a,
a:visited {
    color: inherit;
    text-decoration-color: #d7dde5;

    transition:
        color 0.18s ease,
        text-decoration-color 0.18s ease;
}

/* Global hover accent */
a:hover,
a:focus {
    color: #c62828;
    text-decoration-color: #dca3a3;
}

/* Inline content links inside article body */
#main-content p a,
#main-content li a,
#main-content td a {
    color: #2f3742;
}

#main-content p a:hover,
#main-content li a:hover,
#main-content td a:hover {
    color: #c62828;
}

/* Preserve code colouring inside links */
a code {
    color: inherit;
}

a:hover code,
a:focus code {
    color: inherit;
}

/* =====================================================
   SEARCH BUTTON
   ===================================================== */

.search-btn {
    margin-top: 0.1rem;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}


/* =====================================================
   CODE BLOCKS
   ===================================================== */

pre,
.rst-content tt {
    max-width: 100%;
    background: #fff;
    border: 1px solid #e1e4e5;
    color: #333;
    overflow-x: auto;
}

code {
    padding: 2px 5px;
    background: #fff;
    border: 1px solid #e1e4e5;
    color: #333;

    font-size: 0.95em;

    white-space: pre-wrap;
    word-wrap: break-word;
}

code.code-large,
.rst-content tt.code-large {
    font-size: 90%;
}

pre code {
    display: block;
    background: transparent;
    border: none;

    white-space: pre;
    word-wrap: normal;

    font-family:
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: 13px;
    line-height: 1.5;
}

kbd {
    padding: 2px 4px;
    font-size: 90%;
    color: #fff;
    background-color: #333;
    border-radius: 3px;

    box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}


/* =====================================================
   DROPDOWN MENUS (Bootstrap compatibility)
   ===================================================== */

.dropdown-item.open {
    color: #fff;
    background-color: #2FA4E7;
}

.dropdown-submenu > .dropdown-menu {
    margin: 0 0 0 1.5rem;
    padding: 0;
    border-width: 0;
}

.dropdown-submenu > a::after {
    display: block;
    content: " ";
    float: right;

    width: 0;
    height: 0;

    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;

    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover > a::after {
    border-left-color: #fff;
}

@media (min-width: 992px) {
    .dropdown-menu {
        overflow-y: auto;
        max-height: calc(100vh - 3.5rem);
    }

    .dropdown-submenu {
        position: relative;
    }

    .dropdown-submenu > .dropdown-menu {
        position: fixed !important;
        margin-top: -9px;
        margin-left: -2px;
        border-width: 1px;
        padding: 0.5rem 0;
    }

    .dropdown-submenu.pull-left > .dropdown-menu {
        left: -100%;
        margin-left: 10px;
    }
}


/* =====================================================
   TABLES, DROPDOWNS, IMAGES AND EXPANDABLE CONTENT
   ===================================================== */


/* =====================================================
   SHARED CARD SHADOW SYSTEM
   ===================================================== */

:root {
    --kb-card-shadow:
        0 1px 2px rgba(15,23,42,0.02),
        0 6px 18px rgba(15,23,42,0.035);
}

.kb-product-card,
.kb-whats-new-card,
.kb-video-banner,
details {
    will-change: box-shadow;
}


/* =====================================================
   TABLES (STANDALONE DATA TABLES)
   ===================================================== */

table {
    width: 100%;
    border-collapse: collapse;

    margin-top: 0.8rem;
    margin-bottom: 2rem;

    font-size: 0.95rem;
    background: #ffffff;

    border: 1px solid #e8edf2;
    border-radius: 16px;

    overflow: hidden;
    box-shadow: var(--kb-card-shadow);
}

/* Header row */
thead {
    background: #fafbfd;
}

th {
    text-align: left;
    padding: 10px 14px;

    font-weight: 600;
    color: #1f1f1f;

    border-bottom: 1px solid #e8edf2;
}

/* Cells */
td {
    padding: 9px 14px;
    vertical-align: top;

    color: #444c56;
    border-bottom: 1px solid #f1f4f7;
}

/* Zebra striping for real tables only */
table:not(details table) tbody tr:nth-child(even) {
    background-color: #fcfdff;
}

table:not(details table) tbody tr:hover {
    background-color: #f8fafc;
}

tbody tr:last-child td {
    border-bottom: none;
}


details table {
    margin: 0 !important;
    margin-bottom: 0 !important;
    width: 100%;

    border: none;
    border-radius: 0 0 16px 16px !important;
    overflow: hidden;

    background: #ffffff;
    box-shadow: none !important;
}

/* Remove zebra striping inside dropdowns */
details tr,
details tbody tr {
    background: #ffffff !important;
}

/* Dropdown rows */
details td {
    padding: 12px 16px;
    vertical-align: middle;

    color: #444c56;
    border-bottom: 1px solid #eef2f6;
}

/* First column (guide links / menu labels) */
details td:first-child {
    width: 280px;
}

/* First-column links */
details td:first-child a,
details td:first-child a:visited {
    color: #1f1f1f !important;
    font-weight: 500;
    text-decoration: none;
}

/* Hover state */
details tr:hover {
    background: #f8fafc !important;
}

details td:first-child a:hover {
    color: #c62828 !important;
}

/* Remove bottom border on last row */
details tr:last-child td {
    border-bottom: none;
}

/* Prevent rounded corner glitches */
details table tr:first-child td,
details table tr:first-child th {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* =====================================================
   IMAGES
   ===================================================== */

#main-content img {
    max-width: 95%;
    height: auto;

    display: block;
    margin: 1rem auto;
    padding: 0;

    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;

    box-shadow: var(--kb-card-shadow);
}

/* =====================================================
   CLEAN REFACTOR — PART 4
   Dropdowns / Details
   ===================================================== */


/* =====================================================
   DETAILS CONTAINER
   ===================================================== */

details {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0 !important;

    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--kb-card-shadow);
}


/* =====================================================
   SUMMARY (CLICKABLE HEADER)
   ===================================================== */

details summary {
    cursor: pointer;
    list-style: none;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 22px;

    font-weight: 300;
    color: #1f1f1f;

    background: linear-gradient(to bottom, #ffffff, #fbfcfd);

    border: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

/* Remove default browser arrow */
details summary::-webkit-details-marker {
    display: none;
}


/* =====================================================
   CUSTOM ARROW
   ===================================================== */

details summary::after {
    content: "▸";

    font-size: 1.15rem;
    font-weight: 300;
    color: #7a828a;

    transition: transform 0.2s ease;
}


/* =====================================================
   SUMMARY HOVER
   ===================================================== */

details summary:hover {
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}


/* =====================================================
   OPEN STATE
   ===================================================== */

details[open] summary {
    border-bottom: 1px solid #e8edf2;
}

details[open] summary::after {
    transform: rotate(90deg);
}


/* =====================================================
   DROPDOWN CONTENT
   ===================================================== */

details table,
details p {
    margin-top: 0;
    margin-bottom: 0;
}

details[open] > *:not(summary) {
    background: #ffffff;
}

/* =====================================================
   PRODUCT CARDS AND CHANGELOG GRID
   ===================================================== */


/* =====================================================
   PRODUCT CARDS
   ===================================================== */

.kb-product-card {
    display: flex;
    flex-direction: column;

    padding: 1.45rem;

    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;

    text-decoration: none !important;
    box-shadow: var(--kb-card-shadow);

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.kb-product-card strong {
    color: #1f1f1f;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.kb-product-card span {
    color: #4d5560;
    font-size: 0.9rem;
    line-height: 1.4;
}

.kb-product-card:hover {
    border-color: #dde5ec;

    box-shadow:
        0 0 0 1px rgba(198,40,40,0.06),
        0 8px 24px rgba(0,0,0,0.05);
}


/* =====================================================
   CHANGELOG GRID
   ===================================================== */

.kb-changelog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}


/* =====================================================
   GRID RESPONSIVENESS
   ===================================================== */


/* =====================================================
   WHAT'S NEW CARDS, BADGES AND VIDEO BANNERS
   ===================================================== */


/* =====================================================
   LATEST GUIDES / WHAT'S NEW
   ===================================================== */

.kb-whats-new-intro {
    margin-bottom: 1rem;
    color: #4d5560;
}

.kb-whats-new-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kb-whats-new-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    padding: 1.4rem;

    background: #ffffff;

    border: 1px solid #e8edf2;
    border-left: 4px solid #c62828;
    border-radius: 16px;

    text-decoration: none !important;
    box-shadow: var(--kb-card-shadow);

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.kb-whats-new-card:hover {
    border-left-color: #d32f2f;

    box-shadow:
        0 0 0 1px rgba(198,40,40,0.08),
        0 8px 24px rgba(0,0,0,0.05);
}

.kb-whats-new-card strong {
    color: #1f1f1f;
}

.kb-whats-new-card span:not(.kb-update-badge) {
    color: #4d5560;
    line-height: 1.5;
}

/* =====================================================
   BADGES
   ===================================================== */

.kb-update-badge {
    display: inline-block;
    width: fit-content;

    padding: 0.25rem 0.5rem;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;

    border-radius: 999px;
}

/* Badge variants */
.kb-update-badge.updated {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.kb-update-badge.new {
    background: #fff3f3;
    color: #c62828;
    border: 1px solid #f4d4d4;
}

.kb-update-badge.video {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}


/* =====================================================
   VIDEO BANNER
   ===================================================== */

.kb-video-banner {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;

    margin-top: 1.25rem;
    padding: 1.25rem 1.75rem;

    background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);

    border: 1px solid #e8edf2;
    border-left: 4px solid #c62828;
    border-radius: 16px;

    text-decoration: none !important;
    box-shadow: var(--kb-card-shadow);

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.kb-video-banner:hover {
    box-shadow:
        0 0 0 1px rgba(198,40,40,0.08),
        0 8px 24px rgba(0,0,0,0.05);
}

.kb-video-banner strong {
    display: block;
    margin: 0;

    color: #1f1f1f;
    line-height: 1.2;
}

.kb-video-banner span:not(.kb-update-badge) {
    color: #4d5560;
    line-height: 1.5;
}


/* =====================================================
   GLOBAL RESPONSIVE
   ===================================================== */


/* =====================================================
   PA TMA SITE HEADER AND DOCUMENTATION LAYOUT
   Consolidated responsive layout, navigation and drawers
   ===================================================== */

:root {
    --patma-accent: #ed1c24;
    --patma-accent-soft: #fff1f1;
    --patma-text: #1f1f1f;
    --patma-muted: #4d5560;
    --patma-border: #e5e7eb;
    --patma-surface: #ffffff;
    --patma-nav-height: 68px;
}

html {
    scroll-padding-top: 118px;
}

/* Header stacking and layering */
.patma-header {
    z-index: 1030;
}

/* Utility header and product navigation containers */
.patma-header-container {
    width: calc(100% - 64px);
    max-width: none;
    height: 54px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.patma-product-nav-container {
    width: calc(100% - 24px);
    max-width: none;
    height: var(--patma-nav-height);
    margin: 0 auto;
    display: flex;
    align-items: stretch;
}

.patma-global-nav {
    height: 54px;
    background: #ffffff;
    border-bottom: 1px solid var(--patma-border);
}

.patma-logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.patma-logo img {
    display: block;
    width: auto;
    max-height: 40px;
}

.patma-utility-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.patma-utility-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 100%;
    color: #343840;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.patma-utility-link:hover,
.patma-utility-link:focus {
    color: #111318;
    text-decoration: none;
}

.patma-search-link i {
    font-size: 0.95rem;
}

/* Product navigation links and dropdowns */
.patma-product-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--patma-nav-height);
    background: #1a1a1a;
    background: linear-gradient(to bottom, #1a1a1a 0%, #1a1a1a 100%);
}

.patma-product-links {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.patma-product-link,
.patma-whats-new {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 1.45rem;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.patma-product-link:hover,
.patma-product-link:focus,
.patma-whats-new:hover,
.patma-whats-new:focus {
    color: var(--patma-accent) !important;
    background: transparent;
    text-decoration: none !important;
}

.patma-product-link.active::after,
.patma-whats-new.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--patma-accent);
}

.patma-whats-new {
    margin-left: auto;
}

.patma-whats-new::before {
    content: "";
    width: 1px;
    height: 32px;
    margin-right: 1.45rem;
    background: rgba(255, 255, 255, 0.2);
}

/* Keep the black product bar at the top after the white utility bar scrolls away. */
@media (min-width: 768px) {
    .patma-header {
        position: sticky;
        top: -54px;
        z-index: 1030;
    }

    .patma-product-nav {
        position: relative;
        top: auto;
    }
}

/* Main documentation layout and sidebar columns */
.patma-content-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
}

.patma-content-container > .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
}

.patma-sidebar-holder {
    position: sticky;
    top: 0;
    align-self: flex-start;
    flex: 0 0 280px;
    width: 280px;
    min-width: 0;
    height: 100vh;
    margin: 0;
    padding: 32px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid var(--patma-border);
}

.patma-sidebar-holder .bs-sidebar,
.patma-sidebar-holder .bs-sidebar.card {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.patma-sidebar-holder #toc-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible;
}

.patma-sidebar-holder #toc-collapse > ul {
    width: 100%;
    margin: 0;
    padding: 0;
}

.patma-sidebar-holder .bs-sidebar .nav > li > a {
    display: block;
    padding: 9px 0;
    border: none;
    background: transparent;
    color: var(--patma-muted);
    font-weight: 500;
    text-decoration: none;
}

.patma-sidebar-holder .bs-sidebar .nav > li > a:hover,
.patma-sidebar-holder .bs-sidebar .nav > li > a:focus {
    color: var(--patma-accent);
    background: transparent;
}

.patma-sidebar-holder .bs-sidebar .nav > li > a.active {
    color: #1a1a1a;
    font-weight: 700;
    background: transparent;
}

#main-content {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 24px 48px;
    transition: padding 0.25s ease;
}

/* Desktop sidebar collapse control and state */
.patma-sidebar-toggle {
    position: absolute;
    top: 16px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--patma-border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--patma-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.patma-sidebar-toggle:hover {
    color: var(--patma-accent);
    border-color: var(--patma-accent);
}

body.patma-sidebar-collapsed .patma-sidebar-holder {
    flex-basis: 56px;
    width: 56px;
    padding: 32px 8px;
}

body.patma-sidebar-collapsed .patma-sidebar-holder .bs-sidebar {
    display: none;
}

body.patma-sidebar-collapsed .patma-sidebar-toggle-icon {
    display: inline-block;
    transform: rotate(180deg);
}

/* Responsive sidebar controls */
.patma-mobile-contents-bar,
.patma-mobile-contents-close,
.patma-mobile-sidebar-overlay,
.patma-mobile-products-toggle,
.patma-mobile-products-overlay,
.patma-mobile-products-drawer {
    display: none;
}

/* Grouped documentation dropdown grid and links */
.kb-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
    margin: 1rem 0 2rem;
}

.kb-details-grid-item {
    min-width: 0;
}

.kb-details-grid-item h2 {
    margin-top: 0;
}

.kb-details-grid-item details {
    width: 100%;
    max-width: none;
    margin: 0 0 1.5rem;
}

/* Desktop documentation content width */
@media (min-width: 768px) {
    #main-content > * {
        width: 80%;
        max-width: 1500px;
    }
}

/* Mobile and tablet layout */


@media (prefers-reduced-motion: reduce) {
    .patma-sidebar-holder,
    .patma-mobile-sidebar-overlay,
    .patma-mobile-products-overlay,
    .patma-mobile-products-drawer {
        transition: none;
    }
}

/* =====================================================
   STANDARDISED KNOWLEDGE CENTRE FONT SIZES
   Font sizes only. Layout and spacing remain unchanged.
   ===================================================== */

/* Base content typography */
body {
    font-size: 16px;
}

/* Standard heading hierarchy */
#main-content h1 {
    font-size: 2rem;
}

#main-content h2 {
    font-size: 1.4375rem;
}

#main-content h3 {
    font-size: 1.1875rem;
}

#main-content h4 {
    font-size: 1.0625rem;
}

#main-content h5 {
    font-size: 1rem;
}

#main-content h6 {
    font-size: 0.9375rem;
}

/* Paragraphs and standard article content */
#main-content p,
#main-content li,
#main-content td,
#main-content th,
#main-content summary,
#main-content label {
    font-size: 1rem;
}

/* Standard table typography and spacing */
#main-content table {
    font-size: 0.875rem;
}

#main-content caption,
#main-content small,
#main-content .text-muted {
    font-size: 0.8125rem;
}

/* Mobile heading sizes */


/* =====================================================
   CENTRE MAIN DOCUMENTATION CONTENT
   ===================================================== */

@media (min-width: 768px) {
    #main-content > * {
        margin-left: auto;
        margin-right: auto;
    }
}


/* =====================================================
   HOMEPAGE PRODUCT GRID AND GETTING STARTED NAVIGATION
   ===================================================== */

.kb-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 3rem;
    align-items: stretch;
}

.kb-product-grid .kb-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1.75rem;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    box-shadow: var(--kb-card-shadow);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.2s ease;
}

.kb-product-grid .kb-product-card:hover {
    border-color: #ed1c24;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.kb-product-grid .kb-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    background: #fff1f1;
    border-radius: 12px;
    font-size: 1.4rem;
}

.kb-product-grid .kb-product-card > strong {
    margin-bottom: 0.5rem;
    color: #1f1f1f;
    font-size: 1.15rem;
    line-height: 1.35;
}

.kb-product-grid .kb-product-card > span {
    margin-bottom: 1.25rem;
    color: #4d5560;
    font-size: 0.95rem;
    line-height: 1.6;
}

.kb-product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    align-items: center;
    margin-top: auto;
    padding-top: 0.25rem;
}

.kb-product-links a {
    color: #c91c24;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.kb-product-links a:hover {
    color: #a9151c;
    text-decoration: underline;
}

.kb-product-links a:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 4px;
    border-radius: 2px;
}

.kb-product-links .kb-coming-soon {
    color: #68717c;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Tablet and mobile layout adjustments */


@media (prefers-reduced-motion: reduce) {
    .kb-product-grid .kb-product-card {
        transition: none;
    }

    .kb-product-grid .kb-product-card:hover {
        transform: none;
    }
}


/* =====================================================
   HOMEPAGE SEARCH CONTROL
   ===================================================== */

.kb-home-search {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    min-height: 64px;
    margin: 1.5rem 0 2.5rem;
    padding: 0.9rem 1.1rem;
    color: #68717c;
    background: #fff;
    border: 1px solid #dfe5eb;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kb-home-search:hover {
    border-color: #ed1c24;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.kb-home-search:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 3px;
}

.kb-home-search-icon {
    flex: 0 0 auto;
    color: #ed1c24;
    font-size: 1.8rem;
    line-height: 1;
}

.kb-home-search-placeholder {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
}

.kb-home-search-hint {
    flex: 0 0 auto;
    padding: 0.3rem 0.6rem;
    color: #68717c;
    background: #f4f6f8;
    border: 1px solid #e8edf2;
    border-radius: 6px;
    font-size: 0.8rem;
}


/* =====================================================
   GETTING STARTED CARDS AND GRID
   ===================================================== */

.kb-getting-started-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
    align-items: stretch;
}

.kb-getting-started-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    box-shadow: var(--kb-card-shadow);
    color: inherit;
    text-decoration: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.2s ease;
}

.kb-getting-started-card:hover {
    border-color: #ed1c24;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    color: inherit;
    transform: translateY(-2px);
}

.kb-getting-started-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    background: #fff1f1;
    border-radius: 12px;
    font-size: 1.3rem;
}

.kb-getting-started-card > strong {
    margin-bottom: 0.6rem;
    color: #1f1f1f;
    font-size: 1.05rem;
    line-height: 1.4;
}

.kb-getting-started-card > span:not(.kb-getting-started-icon):not(.kb-getting-started-link) {
    margin-bottom: 1.25rem;
    color: #4d5560;
    font-size: 0.9rem;
    line-height: 1.6;
}

.kb-getting-started-link {
    margin-top: auto;
    color: #c91c24;
    font-size: 0.9rem;
    font-weight: 600;
}

.kb-getting-started-card:hover .kb-getting-started-link {
    color: #a9151c;
    text-decoration: underline;
}

.kb-getting-started-card:focus-visible {
    outline: 2px solid #ed1c24;
    outline-offset: 3px;
}


@media (prefers-reduced-motion: reduce) {
    .kb-getting-started-card {
        transition: none;
    }

    .kb-getting-started-card:hover {
        transform: none;
    }
}


/* =====================================================
   GETTING STARTED CARD REFINEMENTS
   ===================================================== */

.kb-getting-started-grid {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.kb-getting-started-card {
    background: #fff;
    border-color: #e5e9ef;
    box-shadow: none;
}

.kb-getting-started-card:hover {
    background: #fff;
    border-color: #ed1c24;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.045);
}

.kb-getting-started-card > strong {
    font-size: 1.05rem;
}

.kb-getting-started-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.5rem;
}


/* =====================================================
   HOMEPAGE LIVE SEARCH INPUT AND RESULTS
   ===================================================== */

.kb-home-search {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 1.5rem 0 2.5rem;
    padding: 0;
    color: #1f1f1f;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    font: inherit;
    cursor: default;
}

.kb-home-search:hover {
    border-color: transparent;
    box-shadow: none;
}

.kb-home-search > label {
    display: block;
    margin: 0 0 0.65rem;
    color: #343840;
    font-size: 0.9rem;
    font-weight: 600;
}

#kb-home-search {
    display: block;
    width: 100%;
    min-height: 60px;
    padding: 1rem 1.25rem;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #dfe5eb;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#kb-home-search::placeholder {
    color: #8a929d;
}

#kb-home-search:hover {
    border-color: #cbd3dc;
}

#kb-home-search:focus {
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.09);
}

#kb-home-search-hint {
    margin: 0.6rem 0 0;
    color: #68717c;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Live results dropdown */

#kb-home-search-results {
    position: absolute;
    top: calc(100% - 0.1rem);
    right: 0;
    left: 0;
    z-index: 100;
    max-height: 420px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

#kb-home-search-results[hidden] {
    display: none !important;
}

.kb-home-search-list {
    margin: 0 !important;
    padding: 0.4rem !important;
    list-style: none !important;
}

.kb-home-search-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border-bottom: 1px solid #eef1f4;
}

.kb-home-search-list li:last-child {
    border-bottom: none;
}

.kb-home-search-list li::marker {
    content: "";
}

.kb-home-search-list a {
    display: block;
    padding: 0.85rem 1rem 0.25rem;
    color: #252b33;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.kb-home-search-list a:hover,
.kb-home-search-list a:focus {
    color: #c62828;
    text-decoration: none;
}

.kb-home-search-list li:hover {
    background: #fafbfc;
    border-radius: 7px;
}

.kb-home-search-list li p {
    margin: 0;
    padding: 0 1rem 0.85rem;
    color: #68717c;
    font-size: 0.84rem;
    line-height: 1.5;
}

.kb-home-search-message {
    margin: 0 !important;
    padding: 1rem 1.1rem;
    color: #68717c;
    font-size: 0.9rem;
}

/* Mobile adjustments */


/* Homepage live search refinements */

#kb-home-search-hint[hidden] {
    display: none !important;
}

#kb-home-search-results {
    padding: 0.35rem;
}

.kb-home-search-list li {
    border-bottom: 1px solid #eef1f4;
    border-radius: 7px;
}

.kb-home-search-list li:hover {
    background: #f8fafc;
}

.kb-home-search-list a,
.kb-home-search-list a:visited {
    padding: 0.7rem 0.85rem 0.2rem;
    color: #252b33;
    font-weight: 600;
}

.kb-home-search-list a:hover,
.kb-home-search-list a:focus {
    color: #c62828;
}

.kb-home-search-list li p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    padding: 0 0.85rem 0.7rem;
    font-size: 0.84rem;
    line-height: 1.5;
}

.kb-home-search-list li:last-child {
    border-bottom: none;
}


/* =====================================================
   HOMEPAGE HERO AND FULL-WIDTH SEARCH
   ===================================================== */

.kb-home-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 4rem 2rem 3.5rem;
    background: #ed1c24;
    color: #ffffff;
    text-align: center;
}

.kb-home-hero-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

#main-content .kb-home-hero h1 {
    margin: 0 0 0.75rem;
    padding: 0;
    border: none;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
}

.kb-home-hero-intro {
    margin: 0 0 2rem;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.6;
}

.kb-home-hero .kb-home-search {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: left;
}

.kb-home-hero .kb-home-search > label {
    display: none;
}

.kb-home-hero #kb-home-search {
    box-sizing: border-box;
    width: 100%;
    min-height: 76px;
    padding: 1.25rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #ffffff;
    color: #252b33;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.kb-home-hero #kb-home-search::placeholder {
    color: #858b94;
}

.kb-home-hero #kb-home-search:focus {
    border-color: #252b33;
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.kb-home-hero #kb-home-search-hint {
    margin: 1.1rem 0 0;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.kb-home-hero #kb-home-search-hint[hidden] {
    display: none !important;
}

.kb-home-hero #kb-home-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    z-index: 100;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.35rem;
    background: #ffffff;
    color: #252b33;
    border: 1px solid #e5e9ef;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    text-align: left;
}

.kb-home-hero #kb-home-search-results[hidden] {
    display: none !important;
}


/* Homepage hero: full bleed, no surrounding gaps */

#main-content:has(.kb-home-hero) {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

#main-content:has(.kb-home-hero) > .kb-home-hero {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Remove the top spacing inherited from the content layout */
#main-content:has(.kb-home-hero) > .kb-home-hero:first-child {
    margin-top: 0;
}

/* Keep the hero content comfortably inset */
.kb-home-hero {
    box-sizing: border-box;
}


/* Homepage only: hide the contents sidebar */

body:has(.kb-home-hero) .patma-sidebar-holder {
    display: none !important;
}

body:has(.kb-home-hero) .patma-content-container > .row {
    flex-wrap: nowrap;
}

body:has(.kb-home-hero) #main-content {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
}


/* Homepage only: more compact hero */

.kb-home-hero {
    padding-top: 2.75rem;
    padding-bottom: 2.5rem;
}

#main-content .kb-home-hero h1 {
    margin-bottom: 0.5rem;
}

.kb-home-hero-intro {
    margin-bottom: 1.5rem;
}

.kb-home-hero #kb-home-search {
    min-height: 68px;
}

.kb-home-hero #kb-home-search-hint {
    margin-top: 0.85rem;
}


.kb-home-hero {
    background: #d71920;
}


/* Product card icon sizing and alignment */

.kb-product-card {
    align-items: center;
    text-align: center;
}

.kb-product-card .kb-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    background: #fff1f1;
    border-radius: 18px;
    color: #292929;
}

.kb-product-card .kb-product-icon svg {
    width: 38px;
    height: 38px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.kb-product-card > strong {
    text-align: center;
}

.kb-product-card > span {
    text-align: center;
}

.kb-product-card .kb-product-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    width: 100%;
    margin-top: 1rem;
}


/* Product card monochrome outline icon treatment */

.kb-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.kb-product-card .kb-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    margin: 0 auto 1.25rem;
    padding: 0;
    background: #fff1f1;
    border-radius: 18px;
    color: #292929;
    font-size: initial;
    line-height: 1;
}

.kb-product-card .kb-product-icon svg {
    display: block;
    width: 38px;
    height: 38px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.kb-product-card > strong {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: center;
}

.kb-product-card > span {
    display: block;
    width: 100%;
    text-align: center;
}

.kb-product-card .kb-product-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    width: 100%;
    margin-top: 1.25rem;
    text-align: center;
}

.kb-product-card .kb-product-links a,
.kb-product-card .kb-product-links .kb-coming-soon {
    margin: 0;
}


/* Final product card icon refinements */

.kb-product-card .kb-product-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    margin: 0 auto 1rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #292929;
}

.kb-product-card .kb-product-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
}


/* Product card action buttons and hover states */

.kb-product-card .kb-product-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    margin-top: auto;
    padding-top: 1.5rem;
}

.kb-product-card a.kb-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 125px;
    padding: 0.7rem 1.15rem;
    border: 1px solid #d71920;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

.kb-product-card a.kb-product-button-primary {
    color: #ffffff;
    background: #d71920;
}

.kb-product-card a.kb-product-button-primary:hover {
    color: #ffffff;
    background: #b9151b;
    border-color: #b9151b;
}

.kb-product-card a.kb-product-button-secondary {
    color: #d71920;
    background: #ffffff;
}

.kb-product-card a.kb-product-button-secondary:hover {
    color: #ffffff;
    background: #d71920;
}

.kb-product-card a.kb-product-button:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.3);
    outline-offset: 3px;
}


/* Watch and Learn video section */
.kb-watch-learn-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0 32px;
}

.kb-watch-learn-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kb-watch-learn-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.kb-watch-learn-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.kb-watch-learn-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
}

.kb-watch-learn-content strong {
    font-size: 1rem;
    line-height: 1.4;
}

.kb-watch-learn-content > span:not(.kb-watch-learn-link) {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.kb-watch-learn-link {
    margin-top: auto;
    padding-top: 6px;
    color: #d71920;
    font-size: 0.9rem;
    font-weight: 600;
}


/* YouTube channel promotional banner */
.kb-youtube-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 28px 0 36px;
    padding: 28px 32px;
    background: #d71920;
    color: #fff;
    border-radius: 12px;
}

.kb-youtube-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-youtube-banner-content strong {
    font-size: 1.25rem;
}

.kb-youtube-banner-content span {
    line-height: 1.5;
}

.kb-youtube-banner a {
    flex-shrink: 0;
    padding: 12px 18px;
    background: #fff;
    color: #d71920 !important;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.kb-youtube-banner a:hover {
    background: #f3f3f3;
}


/* Homepage search result description truncation */
#kb-home-search-results .kb-home-search-list li p {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2;
    overflow: hidden !important;
    max-height: 3.2em;
    line-height: 1.6em;
    margin-bottom: 12px;
}


/* Property Manager Getting Started journey layout */
.kb-journey-intro,
.kb-journey-finish {
    padding: 22px 26px;
    margin: 24px 0;
    background: #f7f7f7;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
}

.kb-journey-intro strong,
.kb-journey-finish strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.kb-journey-intro p,
.kb-journey-finish p {
    margin: 0;
    line-height: 1.65;
}

.kb-journey {
    display: grid;
    gap: 24px;
    margin: 28px 0;
}

.kb-journey-card {
    padding: 26px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
}

.kb-journey-heading {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.kb-journey-number {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d71920;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.kb-journey-heading h2 {
    margin: 2px 0 8px;
    font-size: 1.35rem;
}

.kb-journey-heading p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.kb-journey-links {
    display: grid;
    gap: 10px;
}

.kb-journey-links a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 42px 15px 17px;
    border: 1px solid #ededed;
    border-radius: 8px;
    color: inherit;
    text-decoration: none !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.kb-journey-links a:hover {
    border-color: #d71920;
    background: #fffafa;
}

.kb-journey-links a strong {
    font-size: 0.98rem;
    line-height: 1.4;
}

.kb-journey-links a > span:not(.kb-journey-arrow) {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.kb-journey-arrow {
    position: absolute;
    top: 50%;
    right: 17px;
    color: #d71920;
    font-size: 1.2rem;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.kb-journey-links a:hover .kb-journey-arrow {
    transform: translate(3px, -50%);
}

.kb-journey-finish {
    margin-top: 30px;
    border-color: #f0d0d1;
}


/* Hide the sidebar on the Property Manager getting-started page */
body:has(.kb-getting-started-page) .bs-sidebar {
    display: none !important;
}

/* Let the main content use the available width */
body:has(.kb-getting-started-page) #content {
    width: 100%;
    max-width: 100%;
}


/* Hide the entire sidebar on the getting-started page */
body:has(.kb-getting-started-page) .bs-sidebar,
body:has(.kb-getting-started-page) #toc-collapse,
body:has(.kb-getting-started-page) nav[aria-label="Table of contents"] {
    display: none !important;
}


/* Hide the sidebar on the Property Manager getting-started page */
body.kb-no-sidebar #sidebar-holder {
    display: none !important;
}

/* Allow the main content to occupy the full row */
body.kb-no-sidebar #main-content {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
}
.kb-journey-finish-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    margin-top: 12px;
    background-color: #d71920;
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.kb-journey-finish-link:hover {
    background-color: #b9151b;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.kb-journey-finish {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.kb-journey-finish-link {
    align-self: center;
}


/* Property Manager hub: Getting Started button */

.kb-manager-getting-started {
    margin: 1.25rem 0 2rem;
}

.kb-manager-getting-started .kb-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #d71920;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kb-manager-getting-started .kb-product-button-primary {
    color: #ffffff !important;
    background: #d71920;
}

.kb-manager-getting-started .kb-product-button-primary:hover {
    color: #ffffff !important;
    background: #b9151b;
    border-color: #b9151b;
}

.kb-manager-getting-started .kb-product-button:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.3);
    outline-offset: 3px;
}

   Original media-query rules moved here without edits
/*===================================================== */



/* =====================================================
   PROPERTY MANAGER INDEX: CATEGORY AND GUIDE CARDS
   Scoped to the Manager index only.
   ===================================================== */

#main-content .kb-manager-index-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem;
    width: 80%;
    max-width: 1500px;
    margin: 1.5rem auto 2.5rem;
}

#main-content .kb-manager-category {
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#main-content .kb-manager-category:hover {
    border-color: #d3dbe4;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.055);
}

#main-content .kb-manager-category > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 1rem;
    align-items: start;
    min-height: 112px;
    padding: 1.25rem 1.35rem;
    background: #ffffff;
    cursor: pointer;
}

#main-content .kb-manager-category > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    content: "＋";
    color: #d71920;
    font-size: 1.35rem;
    font-weight: 400;
    transition: transform 0.18s ease;
}

#main-content .kb-manager-category[open] > summary {
    background: #fffafa;
    border-bottom: 1px solid #f0d8d9;
}

#main-content .kb-manager-category[open] > summary::after {
    content: "−";
    transform: none;
}

#main-content .kb-manager-category-heading {
    display: block;
    grid-column: 1;
    color: #20242a;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
}

#main-content .kb-manager-category-description {
    display: block;
    grid-column: 1;
    color: #68717c;
    font-size: 0.9rem;
    line-height: 1.5;
}

#main-content .kb-manager-category > summary:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.28);
    outline-offset: -3px;
}

#main-content .kb-manager-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
}

#main-content a.kb-manager-guide-card,
#main-content a.kb-manager-guide-card:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    min-height: 124px;
    padding: 1rem 2.15rem 1rem 1rem;
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e6ebf0;
    border-radius: 9px;
    transition: border-color 0.18s ease, background-color 0.18s ease,
                box-shadow 0.18s ease;
}

#main-content a.kb-manager-guide-card:hover,
#main-content a.kb-manager-guide-card:focus-visible {
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border-color: #d71920;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.045);
}

#main-content a.kb-manager-guide-card:focus-visible {
    outline: 2px solid #d71920;
    outline-offset: 2px;
}

#main-content .kb-manager-guide-card > strong {
    color: #252a31;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;
}

#main-content .kb-manager-guide-card > span:not(.kb-manager-guide-arrow) {
    color: #68717c;
    font-size: 0.84rem;
    line-height: 1.5;
}

#main-content .kb-manager-guide-arrow {
    position: absolute;
    top: 1rem;
    right: 0.85rem;
    color: #d71920;
    font-size: 1rem;
    line-height: 1.2;
    transition: transform 0.18s ease;
}

#main-content .kb-manager-guide-card:hover .kb-manager-guide-arrow {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    #main-content .kb-manager-category,
    #main-content .kb-manager-guide-card,
    #main-content .kb-manager-guide-arrow {
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse.show {
        overflow-y: auto;
        max-height: calc(100vh - 3.5rem);
    }
}

@media (max-width: 992px) {
    .kb-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kb-changelog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .kb-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    #main-content {
        max-width: 100%;
    }

    .bs-sidebar {
        max-width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px 10px;
    }

    .kb-video-banner {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 767.98px) {
    html {
        scroll-padding-top: 114px;
    }

    .patma-header {
        position: sticky;
        top: -56px;
        z-index: 1030;
    }

    .patma-header-container,
    .patma-product-nav-container {
        width: calc(100% - 32px);
    }

    .patma-global-nav,
    .patma-header-container {
        height: 56px;
    }

    .patma-logo img {
        max-height: 36px;
    }

    .patma-utility-nav {
        gap: 1rem;
    }

    .patma-utility-link {
        font-size: 0.85rem;
    }

    .patma-utility-link span {
        display: none;
    }

    .patma-product-nav {
        position: relative;
        top: auto;
        height: 58px;
    }

    .patma-product-nav-container {
        height: 58px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        overflow-x: hidden;
    }

    .patma-product-links {
        display: none !important;
    }

    .patma-mobile-products-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        gap: 10px;
        min-height: 40px;
        padding: 8px 10px;
        border: 1px solid transparent;
        border-radius: 4px;
        background: transparent;
        color: #ffffff;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: none;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .patma-mobile-products-toggle:hover,
    .patma-mobile-products-toggle:focus-visible {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.18);
        color: #ffffff;
    }

    .patma-mobile-products-toggle:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
    }

    .patma-product-nav .patma-whats-new {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        margin-left: auto;
        padding: 0;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .patma-product-nav .patma-whats-new::before {
        display: none;
    }

    /* Inline Contents control above the article */
    .patma-mobile-contents-bar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        min-height: 0;
        margin: 0 0 1rem;
        padding: 0;
        background: transparent;
        border: none;
    }

    .patma-mobile-contents-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 5px 0;
        border: 1px solid transparent;
        border-radius: 4px;
        background: transparent;
        color: var(--kb-color-text-secondary, #4d5560);
        font: inherit;
        font-size: 0.88rem;
        font-weight: 500;
        cursor: pointer;
    }

    .patma-mobile-contents-toggle:hover,
    .patma-mobile-contents-toggle:focus-visible {
        background: transparent;
        border-color: transparent;
        color: var(--kb-color-brand-accent, #ed1c24);
    }

    .patma-mobile-contents-toggle:focus-visible {
        outline: 2px solid var(--kb-color-brand-accent, #ed1c24);
        outline-offset: 3px;
    }

    #main-content > .patma-mobile-contents-bar + h1 {
        margin-top: 0;
    }

    .patma-content-container > .row {
        flex-wrap: wrap;
    }

    .patma-sidebar-holder,
    body.patma-sidebar-collapsed .patma-sidebar-holder {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        display: block;
        flex: none;
        width: min(320px, 85vw);
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        margin: 0;
        padding: 56px 20px 24px;
        overflow-x: hidden;
        overflow-y: auto;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border: none;
        border-right: 1px solid var(--patma-border);
        box-shadow: 8px 0 28px rgba(0, 0, 0, 0.12);
        transform: translateX(-105%);
        visibility: hidden;
        opacity: 1;
        isolation: isolate;
        transition: transform 0.25s ease, visibility 0.25s ease;
    }

    body.patma-mobile-sidebar-open .patma-sidebar-holder {
        transform: translateX(0);
        visibility: visible;
    }

    .patma-sidebar-holder .patma-sidebar-toggle {
        display: none;
    }

    .patma-mobile-contents-close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 3;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid var(--patma-border);
        border-radius: 6px;
        background: #ffffff;
        color: var(--patma-text);
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
    }

    .patma-mobile-contents-close:hover,
    .patma-mobile-contents-close:focus-visible {
        border-color: var(--patma-accent);
        color: var(--patma-accent);
    }

    .patma-sidebar-holder .bs-sidebar,
    body.patma-sidebar-collapsed .patma-sidebar-holder .bs-sidebar,
    .patma-sidebar-holder .navbar-collapse,
    .patma-sidebar-holder #toc-collapse {
        display: block !important;
        width: 100%;
        max-width: none;
        height: auto !important;
        margin: 0;
        padding: 0;
        overflow: visible;
        background: #ffffff !important;
        opacity: 1 !important;
    }

    .patma-mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    body.patma-mobile-sidebar-open .patma-mobile-sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.patma-mobile-sidebar-open {
        overflow: hidden;
    }

    #main-content,
    body.patma-sidebar-collapsed #main-content {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 20px 16px;
    }

    #main-content > * {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .kb-details-grid {
        grid-template-columns: 1fr;
    }

    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    .bs-sidebar {
        max-width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px 10px;
    }

    .kb-video-banner {
        padding: 1rem 1.25rem;
    }

    /* Products drawer */
    .patma-mobile-products-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1060;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .patma-mobile-products-drawer {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1070;
        width: min(320px, 85vw);
        max-width: 85vw;
        padding: 20px;
        overflow-y: auto;
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: var(--patma-text);
        opacity: 1 !important;
        isolation: isolate;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: 8px 0 28px rgba(0, 0, 0, 0.18);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.25s ease, visibility 0.25s ease;
    }

    .patma-mobile-products-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 18px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--patma-border);
        background: #ffffff;
    }

    .patma-mobile-products-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--patma-border);
        border-radius: 6px;
        background: transparent;
        color: inherit;
        font-size: 1.1rem;
        cursor: pointer;
    }

    .patma-mobile-product-link {
        display: block;
        padding: 13px 12px;
        margin: 3px 0;
        border-left: 3px solid transparent;
        border-radius: 0 6px 6px 0;
        background: #ffffff;
        color: inherit;
        text-decoration: none;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .patma-mobile-product-link:hover,
    .patma-mobile-product-link:focus-visible {
        background: #f5f5f5;
    }

    .patma-mobile-product-link.active {
        border-left-color: var(--kb-color-brand-accent, #ed1c24);
        background: #fff1f1;
        color: var(--kb-color-accent-deep, #a3151a);
        font-weight: 700;
    }

    body.patma-mobile-products-open .patma-mobile-products-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.patma-mobile-products-open .patma-mobile-products-drawer {
        transform: translateX(0);
        visibility: visible;
    }

    body.patma-mobile-products-open {
        overflow: hidden;
    }
}

@media (max-width: 900px) {
    .kb-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .kb-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .kb-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kb-changelog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    #main-content h1 {
        font-size: 1.8125rem;
    }

    #main-content h2 {
        font-size: 1.3125rem;
    }

    #main-content h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 767.98px) {
    #main-content > * {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 767.98px) {
    .kb-product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0 2rem;
    }

    .kb-product-grid .kb-product-card {
        padding: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .kb-home-search {
        gap: 0.6rem;
        min-height: 58px;
        padding: 0.8rem;
    }

    .kb-home-search-placeholder {
        font-size: 0.85rem;
    }

    .kb-home-search-hint {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .kb-getting-started-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .kb-getting-started-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .kb-getting-started-card {
        padding: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .kb-home-search {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    #kb-home-search {
        min-height: 54px;
        padding: 0.85rem 1rem;
    }

    #kb-home-search-results {
        max-height: 350px;
    }
}

@media (max-width: 767.98px) {
    .kb-home-hero {
        padding: 3rem 1.25rem 2.75rem;
    }

    .kb-home-hero-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .kb-home-hero #kb-home-search {
        min-height: 62px;
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .kb-home-hero {
        padding-top: 2.25rem;
        padding-bottom: 2rem;
    }

    .kb-home-hero #kb-home-search {
        min-height: 58px;
    }
}

@media (max-width: 575.98px) {
    .kb-product-card .kb-product-icon {
        width: 68px;
        height: 68px;
    }

    .kb-product-card .kb-product-icon svg {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 575.98px) {
    .kb-product-card .kb-product-icon {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
    }

    .kb-product-card .kb-product-icon svg {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 575.98px) {
    .kb-product-card .kb-product-links {
        gap: 0.6rem;
    }

    .kb-product-card a.kb-product-button {
        min-width: 0;
        flex: 1 1 120px;
        padding: 0.7rem 0.8rem;
    }
}

@media (max-width: 800px) {
    .kb-watch-learn-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    .kb-watch-learn-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .kb-youtube-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .kb-journey-card {
        padding: 19px;
    }

    .kb-journey-heading {
        gap: 13px;
    }

    .kb-journey-number {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .kb-journey-heading h2 {
        font-size: 1.2rem;
    }

    .kb-journey-intro,
    .kb-journey-finish {
        padding: 19px;
    }
}



/* Browser Extension index: Plus feature cards */

#main-content .kb-extension-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 1rem 0 1.5rem;
}

#main-content .kb-extension-feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e6ebf0;
    border-radius: 9px;
}

#main-content .kb-extension-feature-card > strong {
    color: #252a31;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;
}

#main-content .kb-extension-feature-card > span {
    color: #68717c;
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    #main-content .kb-extension-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Browser Extension index: feature grid respects the content width */

#main-content .kb-extension-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 1rem 0 1.5rem;
}

#main-content .kb-extension-feature-grid > .kb-extension-feature-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 575.98px) {
    #main-content .kb-extension-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Browser Extension index: constrain feature section to the content width */

@media (min-width: 768px) {
    #main-content > .kb-extension-feature-grid,
    #main-content > p:has(+ .kb-extension-feature-grid) {
        width: 80%;
        max-width: 1500px;
        margin-left: auto;
        margin-right: auto;
    }
}

#main-content .kb-extension-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    box-sizing: border-box;
    min-width: 0;
}

#main-content .kb-extension-feature-grid > .kb-extension-feature-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767.98px) {
    #main-content .kb-extension-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Browser Extension index: access and subscription cards */

#main-content .kb-extension-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 80%;
    max-width: 1500px;
    margin: 1rem auto 1.5rem;
    box-sizing: border-box;
}

#main-content .kb-extension-access-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e1e7ef;
    border-radius: 9px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#main-content .kb-extension-access-card:hover {
    border-color: #c5ceda;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

#main-content .kb-extension-access-card > strong {
    color: #252a31;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

#main-content .kb-extension-access-label {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    background: #f1f4f8;
    border-radius: 4px;
    color: #424b57;
    font-size: 0.8rem;
    font-weight: 600;
}

#main-content .kb-extension-access-card > span:not(.kb-extension-access-label):not(.kb-extension-access-link) {
    color: #68717c;
    font-size: 0.875rem;
    line-height: 1.55;
}

#main-content .kb-extension-access-link {
    margin-top: auto;
    padding-top: 0.35rem;
    color: #252a31;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 900px) {
    #main-content .kb-extension-access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 80%;
    }
}

@media (max-width: 575.98px) {
    #main-content .kb-extension-access-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }
}


/* Browser Extension: access card buttons */

#main-content .kb-extension-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

#main-content .kb-extension-access-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1.25rem;
    border: 1px solid #d30b2e;
    border-radius: 8px;
    background: #d30b2e;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.2s ease,
                border-color 0.2s ease;
}

#main-content .kb-extension-access-button:hover {
    background: #b90827;
    border-color: #b90827;
    color: #ffffff;
    text-decoration: none;
}

#main-content .kb-extension-access-button:focus-visible {
    outline: 2px solid #252a31;
    outline-offset: 3px;
}


/* Knowledge base index pages: independent accordion columns */

#main-content .kb-manager-index-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
    width: 80%;
    max-width: 1500px;
    margin: 1.5rem auto 2.5rem;
}

#main-content .kb-manager-index-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    min-width: 0;
}

#main-content .kb-manager-index-column > .kb-manager-category {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Keep section headings with their related accordion cards */
#main-content .kb-manager-index-column > h2 {
    margin: 0;
}

@media (max-width: 767.98px) {
    #main-content .kb-manager-index-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }
}

/* Hide the heading sidebar on all product index pages */
body:has(#main-content .kb-manager-index-grid) #sidebar-holder,
body:has(#main-content .kb-manager-index-grid) .patma-sidebar-holder,
body:has(#main-content .kb-extension-access-grid) #sidebar-holder,
body:has(#main-content .kb-extension-access-grid) .patma-sidebar-holder {
    display: none !important;
}

/* Let index pages use the full layout row while preserving the 80% content width */
body:has(#main-content .kb-manager-index-grid) #main-content,
body:has(#main-content .kb-extension-access-grid) #main-content {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
}

/* Hide both the sidebar drawer and its mobile Contents dropdown on pages
   that are designed without documentation sidebar navigation. */
body:has(.kb-home-hero) .patma-mobile-contents-bar,
body.kb-no-sidebar .patma-mobile-contents-bar,
body:has(#main-content .kb-manager-index-grid) .patma-mobile-contents-bar,
body:has(#main-content .kb-extension-access-grid) .patma-mobile-contents-bar {
    display: none !important;
}

/* Prevent the mobile sidebar drawer from opening on these pages. */
body:has(.kb-home-hero) .patma-sidebar-holder,
body.kb-no-sidebar .patma-sidebar-holder,
body:has(#main-content .kb-manager-index-grid) .patma-sidebar-holder,
body:has(#main-content .kb-extension-access-grid) .patma-sidebar-holder {
    display: none !important;
}


/* Product index pages: restore comfortable mobile gutters for text content. */
@media (max-width: 575.98px) {
    body:has(#main-content .kb-extension-access-grid) #main-content > p,
    body:has(#main-content .kb-extension-access-grid) #main-content > h1,
    body:has(#main-content .kb-extension-access-grid) #main-content > h2,
    body:has(#main-content .kb-extension-access-grid) #main-content > h3,
    body:has(#main-content .kb-manager-index-grid) #main-content > p,
    body:has(#main-content .kb-manager-index-grid) #main-content > h1,
    body:has(#main-content .kb-manager-index-grid) #main-content > h2,
    body:has(#main-content .kb-manager-index-grid) #main-content > h3 {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
}


/* Homepage: keep sections below the full-width hero inset on mobile. */
@media (max-width: 767.98px) {
    #main-content:has(.kb-home-hero) > :not(.kb-home-hero) {
        box-sizing: border-box;
        padding-left: 16px;
        padding-right: 16px;
    }
}
