/* ==========================================================================
   Guides — knowledge-base styles (help-centre layout)
   Used by includes/templates/guides.php for the public /guides/ section.
   ========================================================================== */

/* Override Keepr's marketing-page bottom padding reset so the guides layout owns the page */
.page-content-wrapper .page-content.gm-content { margin-left: 0; padding-top: 0; padding-bottom: 0; }

/* Smooth anchor scrolling. Scoped by virtue of guides.css only loading on
   /guides/ pages — applying this to <html> is the only way `href="#x"` clicks
   animate (the scroll happens on the document root, not any inner element). */
html { scroll-behavior: smooth; }
/* Headings sit clear of the fixed header (~84px) when jumped to from the
   TOC or a copy-link click. */
.gm-h { scroll-margin-top: 100px; }

.gm-root {
    --gm-brand: var(--color-primary, #67b7dc);
    --gm-brand-dark: var(--color-primary-hover, #4f9fc4);
    --gm-brand-soft: #e6f2fa;
    --gm-ink: #1f2933;
    --gm-ink-soft: #52606d;
    --gm-ink-mute: #7b8794;
    --gm-bg: var(--color-bg-page, #F5F7FB);
    --gm-bg-soft: #f5f7fb;
    --gm-surface: #fff;
    --gm-border: var(--color-border, #e7ecf1);
    --gm-border-soft: var(--color-border-subtle, #ebedf2);
    --gm-warn: #ef6c00;
    --gm-warn-soft: #fff3e0;
    --gm-pro: #6a1b9a;
    --gm-pro-soft: #f3e5f5;
    --gm-radius: 10px;
    --gm-radius-sm: 6px;
    color: var(--gm-ink);
    background: var(--gm-bg);
}

.gm-root a { color: var(--gm-brand-dark); text-decoration: none; }
.gm-root a:hover { color: var(--gm-brand); text-decoration: underline; }

/* Buttons (.btn) inside guides shouldn't pick up the hover underline from the
   generic anchor rule above — Keepr's button styling owns its own hover. */
.gm-root a.btn,
.gm-root a.btn:hover { text-decoration: none; }

/* Override Keepr's global "h1 { color: #fff }". Only hero h1 stays white. */
.gm-root h1,
.gm-root h2,
.gm-root h3,
.gm-root h4 { color: var(--gm-ink); }
.gm-root .gm-hero h1 { color: #fff; }

/* ===== Hero (mirrors .about-header) ===== */
.gm-hero {
    background: linear-gradient(145deg, #0f1426 0%, #182540 60%, #1e3050 100%);
    padding: 70px 30px 90px;
    color: #fff;
    text-align: center;
}
.gm-hero h1 {
    font-size: 44px;
    margin: 0 0 18px;
    font-weight: 300;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.gm-hero p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 auto 32px;
    max-width: 600px;
    line-height: 1.7;
}
.gm-hero-search {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    display: flex;
    align-items: center;
    box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}
.gm-hero-search i { color: var(--gm-ink-mute); margin-right: 10px; }
.gm-hero-search input {
    border: 0;
    flex: 1;
    font-size: 15px;
    padding: 10px 6px;
    outline: none;
    color: var(--gm-ink);
    font-family: inherit;
}
.gm-hero-search .btn.brisk-blue { border-radius: 30px; }

/* ===== Landing: category grid + popular list ===== */
.gm-container { max-width: 1200px; margin: 0 auto; padding: 50px 30px; }

.gm-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.gm-cat-card {
    background: var(--gm-surface);
    border-radius: var(--gm-radius);
    padding: 24px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: block;
    color: var(--gm-ink);
    box-shadow: none;
}
.gm-root .gm-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--gm-ink);
}
.gm-cat-card .gm-cat-icon {
    width: 44px;
    height: 44px;
    background: var(--gm-brand-soft);
    color: var(--gm-brand-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 14px;
}
.gm-cat-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--gm-ink); }
.gm-cat-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--gm-ink-soft); line-height: 1.5; }
.gm-cat-card .gm-cat-count { font-size: 12px; color: var(--gm-ink-mute); font-weight: 500; }

.gm-section-h { font-size: 22px; font-weight: 600; margin: 50px 0 18px; color: var(--gm-ink); }
.gm-popular { background: var(--gm-surface); border-radius: var(--gm-radius); overflow: hidden; box-shadow: none; }
.gm-popular .gm-pop-item {
    padding: 16px 22px;
    border-bottom: 1px solid var(--gm-border-soft);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--gm-ink);
}
.gm-popular .gm-pop-item:last-child { border-bottom: 0; }
.gm-root .gm-popular .gm-pop-item:hover { background: #fafbfc; text-decoration: none; color: var(--gm-ink); }
.gm-popular .gm-pop-item > i { color: var(--gm-brand); font-size: 16px; align-self: flex-start; margin-top: 2px; }
.gm-popular .gm-pop-item .gm-pop-body { flex: 1; min-width: 0; }
.gm-popular .gm-pop-item .gm-pop-title { font-weight: 600; margin-bottom: 2px; }
.gm-popular .gm-pop-item .gm-pop-meta { font-size: 12px; color: var(--gm-ink-mute); }

/* ===== Category + Article 2-column layout ===== */
.gm-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}
.gm-breadcrumb { font-size: 13px; color: var(--gm-ink-mute); margin-bottom: 16px; }
.gm-breadcrumb a { color: var(--gm-ink-mute); }
.gm-breadcrumb a:hover { color: var(--gm-brand-dark); }
.gm-breadcrumb i { font-size: 10px; margin: 0 6px; color: var(--gm-ink-mute); }

.gm-side {
    background: var(--gm-surface);
    border-radius: var(--gm-radius);
    padding: 20px 0;
    position: sticky;
    /* Sits clear of the fixed header (84px) with breathing room. */
    top: 115px;
    /* When the nav exceeds the viewport, scroll inside the sidebar rather
       than letting the page-level sticky overflow. 20px bottom gap keeps it
       from butting against the viewport floor. */
    max-height: calc(100vh - 115px - 20px);
    overflow-y: auto;
    box-shadow: none;
}
.gm-side-search { padding: 0 20px 16px; border-bottom: 1px solid var(--gm-border-soft); margin-bottom: 14px; }

/* Search results dropdown — applied to both the sidebar input and the
   landing-page hero input. Positioned beneath whichever input the
   user typed into. Driven by assets/js/guides-search.js. */
.gm-search-wrap { position: relative; }
/* In the hero (display:flex) the wrap replaces the input as the flex item.
   Without flex:1 the wrap collapses to content width and the menu
   (left:0; right:0 on the wrap) ends up narrower than the visible input. */
.gm-hero-search .gm-search-wrap { flex: 1; min-width: 0; }
.gm-search-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--gm-surface);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    box-shadow: 0 12px 32px rgba(20, 30, 60, 0.10);
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
}
.gm-search-menu[hidden] { display: none; }
.gm-search-item {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--gm-ink);
    border-bottom: 1px solid var(--gm-border-soft);
}
.gm-search-item:last-child { border-bottom: 0; }
.gm-search-item.is-active,
.gm-search-item:hover { background: var(--gm-bg-soft); color: var(--gm-ink); }
.gm-search-item-title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.gm-search-item-cat   { font-size: 11.5px; color: var(--gm-ink-mute); margin-top: 2px; }
.gm-search-empty {
    padding: 14px;
    color: var(--gm-ink-mute);
    font-size: 13px;
    text-align: center;
}

.gm-side-search input {
    width: 100%;
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    padding: 8px 12px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
}
.gm-side-section { padding: 0 20px; margin-bottom: 8px; }
/* The category header is a single link to the category page — no chevron,
   no accordion behaviour. The active section's items render underneath it
   automatically; navigating to another category page swaps which section
   is expanded server-side. */
.gm-side-h {
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--gm-ink);
}
.gm-side-h a { color: inherit; }
.gm-side-h a:hover { color: var(--gm-brand-dark); text-decoration: none; }
.gm-side-list { list-style: none; margin: 4px 0 0; padding: 0; }
.gm-side-list li a { display: block; padding: 7px 12px 7px 16px; font-size: 13.5px; color: var(--gm-ink-soft); border-radius: var(--gm-radius-sm); line-height: 1.4; }
.gm-side-list li a:hover { color: var(--gm-brand-dark); text-decoration: none; }
.gm-side-list li a.active {
    color: var(--gm-brand-dark);
    font-weight: 600;
    text-decoration: none;
}

/* Sidebar — collapsible tree. Click chevron to expand/collapse a category;
   click the category name to navigate to its landing page. Active category
   auto-expands on render. */
.gm-tree-node { padding: 0 14px; }
.gm-tree-head {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: transparent;
    border: none;
    padding: 7px 8px;
    border-radius: var(--gm-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--gm-ink);
    cursor: pointer;
    text-align: left;
}
.gm-tree-head:hover { background: var(--gm-bg-soft); }
.gm-tree-chev {
    font-size: 11px;
    color: var(--gm-ink-mute);
    transition: transform 0.15s;
    width: 12px;
    text-align: center;
}
.gm-tree-node.is-open .gm-tree-chev { transform: rotate(90deg); }
.gm-tree-cat-link { color: inherit; flex: 1; }
.gm-tree-cat-link:hover { color: var(--gm-brand-dark); text-decoration: none; }
/* Slide-down animation: outer wrapper is a CSS grid whose row size
   transitions from 0fr → 1fr. The inner <ul> sets overflow:hidden so
   collapsed content is clipped during the animation. Works without
   measuring content height — handles any number of items. */
.gm-tree-list-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 200ms ease;
    margin-left: 14px;
}
.gm-tree-node.is-open .gm-tree-list-wrap { grid-template-rows: 1fr; }
.gm-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--gm-border-soft);
    overflow: hidden;
    min-height: 0;
}
.gm-tree-node.is-open .gm-tree-list { margin: 2px 0 6px; }
.gm-tree-list li a {
    display: block;
    padding: 6px 10px 6px 14px;
    font-size: 13px;
    color: var(--gm-ink-soft);
    margin-left: -1px;
    border-left: 2px solid transparent;
}
.gm-tree-list li a:hover { color: var(--gm-brand-dark); text-decoration: none; }
.gm-tree-list li a.active {
    color: var(--gm-brand-dark);
    border-left-color: var(--gm-brand);
    font-weight: 600;
}

/* Category page main */
.gm-cat-h h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.3px; }
.gm-cat-h p { color: var(--gm-ink-soft); font-size: 16px; margin: 0 0 28px; max-width: 620px; }
.gm-art-list { background: var(--gm-surface); border-radius: var(--gm-radius); overflow: hidden; box-shadow: none; }
.gm-art-row {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gm-border-soft);
    display: flex;
    gap: 18px;
    color: var(--gm-ink);
}
.gm-art-row:last-child { border-bottom: 0; }
.gm-root .gm-art-row:hover { background: #fafbfc; text-decoration: none; color: var(--gm-ink); }
.gm-art-icon { width: 36px; height: 36px; background: var(--gm-brand-soft); color: var(--gm-brand-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.gm-art-body { flex: 1; min-width: 0; }
.gm-art-title { font-weight: 600; margin-bottom: 2px; }
.gm-art-excerpt { font-size: 13.5px; color: var(--gm-ink-soft); }
.gm-art-meta { font-size: 12px; color: var(--gm-ink-mute); align-self: center; flex-shrink: 0; }
/* Below ~480px the right-aligned meta steals too much width — slide it
   under the body so the title can wrap naturally without crushing. */
@media (max-width: 480px) {
    .gm-art-row { flex-wrap: wrap; }
    .gm-art-meta { flex: 1 0 100%; padding-left: 50px; align-self: flex-start; margin-top: 2px; }
}

/* Article page */
.gm-article { background: var(--gm-surface); border-radius: var(--gm-radius); padding: 40px 50px; box-shadow: none; }
.gm-article h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -0.3px; line-height: 1.25; }
.gm-article-sub { font-size: 17px; color: var(--gm-ink-soft); margin: 0 0 18px; }
.gm-article-meta {
    font-size: 13px;
    color: var(--gm-ink-mute);
    padding-bottom: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--gm-border-soft);
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.gm-article-meta i { margin-right: 5px; }
.gm-badge { background: var(--gm-brand-soft); color: var(--gm-brand-dark); padding: 3px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 600; }
.gm-article h2 { font-size: 22px; margin: 34px 0 14px; font-weight: 600; color: var(--gm-ink); }
.gm-article p { margin: 0 0 14px; }
/* Inline links inside the guide article body — explicit colour so they stay
   visible even when wrapped in <strong>. Without this, a bold link inherits
   the dark ink colour from <strong> and reads as a static button label
   instead of a click-through. */
.gm-article p a,
.gm-article li a,
.gm-article td a,
.gm-article dd a { color: var(--gm-brand-dark); }
.gm-article p a:hover,
.gm-article li a:hover,
.gm-article td a:hover,
.gm-article dd a:hover { color: var(--gm-brand); }
.gm-article p a strong,
.gm-article p strong a,
.gm-article li a strong,
.gm-article li strong a,
.gm-article td a strong,
.gm-article td strong a { color: inherit; }
.gm-divider { border: 0; border-top: 1px solid var(--gm-border-soft); margin: 28px 0; }

/* Inline TOC */
.gm-toc { background: var(--gm-bg-soft); border-radius: var(--gm-radius-sm); padding: 16px 22px; margin: 22px 0 30px; }
.gm-toc-h { font-size: 12.5px; font-weight: 700; text-transform: uppercase; color: var(--gm-ink-mute); letter-spacing: 0.6px; margin-bottom: 10px; }
.gm-toc ol { margin: 0; padding-left: 22px; column-count: 2; column-gap: 30px; }
.gm-toc ol li { margin-bottom: 6px; font-size: 14px; }
.gm-toc ol li a { color: var(--gm-ink-soft); }

/* Steps */
.gm-steps { margin: 18px 0 22px; counter-reset: step; list-style: none; padding: 0; }
.gm-steps li { counter-increment: step; position: relative; padding: 0 0 22px 50px; }
.gm-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -4px;
    width: 32px;
    height: 32px;
    background: var(--gm-brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.gm-step-image {
    /* Step screenshots are viewport-mode (1440px) with spatial context, so they
       need the full article-column width. Negative left margin breaks out of the
       50px step-number indent. */
    margin: 22px 0 14px -50px;
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    overflow: hidden;
    background: #fff;
}
.gm-step-image img {
    width: 100%;
    display: block;
}
.gm-step-image .gm-ph {
    display: block;
    background: repeating-linear-gradient(45deg, #f0f2f5, #f0f2f5 10px, #e9eef3 10px, #e9eef3 20px);
    color: var(--gm-ink-mute);
    text-align: center;
    padding: 50px 20px;
    font-size: 13px;
}
.gm-step-image img { display: block; max-width: 100%; height: auto; }

/* Images */
.gm-image {
    margin: 22px 0;
    text-align: center;
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    overflow: hidden;
    background: #fff;
}
.gm-image img { display: block; max-width: 100%; height: auto; }
.gm-image figcaption {
    margin: 0;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--gm-ink-mute);
    border-top: 1px solid var(--gm-border);
    background: #fafbfc;
    text-align: left;
}
.gm-image-full img { width: 100%; }

/* Video */
.gm-video { margin: 22px 0; }
.gm-video iframe, .gm-video video { width: 100%; aspect-ratio: 16/9; border-radius: var(--gm-radius-sm); }
.gm-video-caption { font-size: 13px; color: var(--gm-ink-mute); margin-top: 8px; text-align: center; }

/* Code */
.gm-code { background: #1f2933; color: #f0f2f5; padding: 14px 18px; border-radius: var(--gm-radius-sm); overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
.gm-code code { background: transparent; padding: 0; color: inherit; }

/* Table */
.gm-table-wrap { overflow-x: auto; margin: 18px 0; }
.gm-table { width: 100%; border-collapse: collapse; }
/* Force left alignment + top vertical alignment with !important — Metronic
   and Bootstrap layer styles on <table>/td/th that would otherwise push
   cells around (Bootstrap's .table adds vertical-align: top + padding
   resets; some Metronic themes also right-align numeric-looking cells). */
.gm-table th, .gm-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gm-border-soft);
    text-align: left !important;
    vertical-align: top !important;
}
.gm-table th { font-weight: 600; font-size: 13px; color: var(--gm-ink-mute); text-transform: uppercase; letter-spacing: 0.4px; }

/* Callouts */
.gm-callout { border-radius: var(--gm-radius-sm); padding: 16px 18px; margin: 18px 0; display: flex; gap: 12px; align-items: flex-start; }
.gm-callout > i { font-size: 18px; margin-top: 1px; }
.gm-callout .gm-cal-body { flex: 1; }
.gm-callout strong { font-weight: 700; }
.gm-callout p { margin: 0; }
.gm-callout.tip { background: var(--gm-brand-soft); }
.gm-callout.tip > i { color: var(--gm-brand-dark); }
.gm-callout.warning { background: var(--gm-warn-soft); }
.gm-callout.warning > i { color: var(--gm-warn); }
.gm-callout.pro { background: var(--gm-pro-soft); }
.gm-callout.pro > i { color: var(--gm-pro); }

/* FAQ */
.gm-faq { background: var(--gm-bg-soft); border-radius: var(--gm-radius); overflow: hidden; margin: 30px 0; }
.gm-faq-item { border-bottom: 1px solid var(--gm-border-soft); }
.gm-faq-item:last-child { border-bottom: 0; }
.gm-faq-q { padding: 14px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.gm-faq-q .fa { transition: transform 0.15s; }
.gm-faq-item.is-open .gm-faq-q .fa { transform: rotate(180deg); }
.gm-faq-a-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms ease;
}
.gm-faq-item.is-open .gm-faq-a-wrap { grid-template-rows: 1fr; }
.gm-faq-a {
    padding: 0 20px;
    color: var(--gm-ink-soft);
    font-size: 14px;
    overflow: hidden;
    min-height: 0;
}
.gm-faq-item.is-open .gm-faq-a { padding-bottom: 16px; }

/* Lightbox — full-screen image viewer. Built once in JS and reused; the
   inline <img> uses the same src, so the cached bytes display at native
   resolution without a second download. Click anywhere (overlay, image,
   close button) to dismiss; ESC also closes. */
.gm-step-image img,
.gm-image img { cursor: zoom-in; }
.gm-lightbox {
    position: fixed;
    inset: 0;
    /* Must beat the fixed page header (z-index 10001) — using the max int
       keeps it above anything else the app might layer on top. */
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    cursor: zoom-out;
}
.gm-lightbox.is-open { opacity: 1; pointer-events: auto; }
.gm-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}
.gm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gm-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }
@media (max-width: 600px) {
    .gm-lightbox { padding: 20px; }
    .gm-lightbox-close { top: 12px; right: 12px; }
}

/* CTA */
.gm-cta {
    background: linear-gradient(145deg, #0f1426 0%, #182540 60%, #1e3050 100%);
    border-radius: var(--gm-radius);
    padding: 28px 32px;
    margin: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.gm-cta .gm-cta-title { display: block; font-size: 18px; font-weight: 600; margin-bottom: 4px; color: #fff; }
.gm-cta p { margin: 0; font-size: 14.5px; color: rgba(255,255,255,0.7); }

/* Feedback */
.gm-feedback { border-top: 1px solid var(--gm-border-soft); margin-top: 36px; padding-top: 24px; text-align: center; }
.gm-feedback .gm-fb-q { font-weight: 600; margin-bottom: 12px; }
.gm-feedback .gm-fb-btns { display: flex; gap: 10px; justify-content: center; }
/* HTML `hidden` attribute beats user-agent display:none, but our author CSS
   above (display:flex) wins on specificity. These overrides put hidden back. */
.gm-feedback [hidden] { display: none; }
.gm-feedback .gm-fb-btn {
    padding: 8px 18px;
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.gm-feedback .gm-fb-btn:hover { border-color: var(--gm-brand); color: var(--gm-brand-dark); }

/* Related */
.gm-related { margin-top: 36px; }
.gm-related h3 { font-size: 14px; margin: 0 0 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gm-ink-mute); }
.gm-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gm-rel-card {
    background: var(--gm-bg);
    border-radius: var(--gm-radius-sm);
    padding: 16px;
    color: var(--gm-ink);
    box-shadow: none;
}
.gm-root .gm-rel-card:hover { background: var(--color-bg-hover, #eef1f6); text-decoration: none; color: var(--gm-ink); }
.gm-rel-cat { font-size: 11.5px; color: var(--gm-brand-dark); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; margin-bottom: 4px; }
.gm-rel-title { font-weight: 600; font-size: 14px; }

@media (max-width: 900px) {
    .gm-layout { grid-template-columns: 1fr; gap: 20px; }
    .gm-article { padding: 24px; }
    .gm-rel-grid { grid-template-columns: 1fr; }
    .gm-cta { flex-direction: column; align-items: flex-start; }
    .gm-toc ol { column-count: 1; }

    /* Mobile sidebar — strip the outer card so the toggle button IS the
       visible chrome when closed. When open, toggle + body merge into one
       continuous panel (toggle bottom-flat, body top-flat, shared border). */
    .gm-side {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }
    .gm-side-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 18px;
        background: var(--gm-surface);
        border: 1px solid var(--gm-border);
        border-radius: var(--gm-radius);
        font-size: 14px;
        font-weight: 600;
        color: var(--gm-ink);
        cursor: pointer;
    }
    .gm-side.is-open .gm-side-toggle {
        border-bottom: 0;
        border-radius: var(--gm-radius) var(--gm-radius) 0 0;
    }
    .gm-side-toggle-label .fa { margin-right: 8px; color: var(--gm-ink-mute); }
    .gm-side-toggle-chev { transition: transform 0.2s; color: var(--gm-ink-mute); }
    .gm-side.is-open .gm-side-toggle-chev { transform: rotate(180deg); }

    /* Slide-down: outer .gm-side-body is the grid container; inner wrapper
       is the single clipped child. Two-element pattern is required — putting
       multiple children directly on the grid breaks the animation. */
    .gm-side-body {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 220ms ease;
        background: var(--gm-surface);
        /* Border + radius only appear when expanded so the closed state is
           a true zero-height row (no 1px bottom-border peek). */
        border: 0 solid var(--gm-border);
        border-radius: 0 0 var(--gm-radius) var(--gm-radius);
    }
    /* Inner wrapper has overflow:hidden + min-height:0 so the grid 0fr row
       can fully collapse. Padding is only applied when open — keeping it on
       the inner when closed could leak height in some browsers. */
    .gm-side-body-inner { overflow: hidden; min-height: 0; }
    .gm-side.is-open .gm-side-body {
        grid-template-rows: 1fr;
        border-width: 0 1px 1px 1px;
    }
    .gm-side.is-open .gm-side-body-inner { padding: 14px 0; }
}

/* Desktop: hide the toggle entirely; sidebar body always visible. */
@media (min-width: 901px) {
    .gm-side-toggle { display: none; }
}

/* Very narrow phones — the hero search pill (input + Search button) is
   forced inline on the landing page and overflows below ~400px. Shrink
   padding, drop type sizes, and let the button wrap below if needed. */
@media (max-width: 400px) {
    .gm-hero { padding: 50px 16px 60px; }
    .gm-hero h1 { font-size: 32px; }
    .gm-hero p { font-size: 15px; }
    .gm-hero-search {
        flex-wrap: wrap;
        border-radius: var(--gm-radius);
        padding: 10px;
        gap: 8px;
    }
    .gm-hero-search i { display: none; }
    .gm-hero-search input {
        flex: 1 1 100%;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid var(--gm-border);
        border-radius: var(--gm-radius-sm);
    }
    .gm-hero-search .btn.brisk-blue { width: 100%; border-radius: var(--gm-radius-sm); }

    .gm-container { padding: 30px 16px; }
    .gm-article { padding: 18px; }
    .gm-steps li { padding-left: 40px; }
    .gm-steps li::before { left: 0; }
    .gm-step-image { margin-left: -40px; }
}
