/* Base Theme Variables: MoltMentions brand tokens (light) */
:root {
    --bg-main: #ffffff;
    --bg-nav: #ffffff;
    --bg-sidebar: #f7f7f8;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-color: #e4e4e7;
    --border-glass: rgba(228, 228, 231, 0.5);

    --text-primary: #09090b;
    --text-secondary: #3f3f46;
    --text-muted: #5f5f67;

    --brand-primary: #c2410c;
    --brand-primary-hover: #9a3412;
    --brand-accent: #c2410c;

    --nav-hover-bg: #f1f1f3;
    --card-bg: #ffffff;
    --card-hover-bg: #f7f7f8;

    --shadow-sm: 0 1px 3px rgba(9, 9, 11, 0.05);
    --shadow-md: 0 4px 12px rgba(9, 9, 11, 0.08);
    --shadow-glass: 0 4px 30px rgba(9, 9, 11, 0.05);

    --gradient-brand: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);

    /* Semantic Colors */
    --color-green: #047857;
    --bg-green-light: #d1fae5;
    --color-orange: #c2410c;
    --bg-orange-light: #ffedd5;
    --color-red: #b91c1c;
    --bg-red-light: #fee2e2;

    --color-indigo-600: #c2410c;

    --table-row-border: rgba(228, 228, 231, 0.7);

    --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    /* MoltMentions brand tokens (dark, the default) */
    --bg-main: #09090b;
    --bg-nav: #09090b;
    --bg-sidebar: #0f0f12;
    --bg-glass: rgba(15, 15, 18, 0.75);
    --border-color: #26262b;
    --border-glass: rgba(38, 38, 43, 0.5);

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #878790;

    --brand-primary: #f97316;
    --brand-primary-hover: #fb923c;
    --brand-accent: #fb923c;

    --nav-hover-bg: #1a1a1f;
    --card-bg: #131316;
    --card-hover-bg: #1a1a1f;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.3);

    --color-green: #34d399;
    --bg-green-light: rgba(52, 211, 153, 0.16);
    --color-orange: #fb923c;
    --bg-orange-light: rgba(249, 115, 22, 0.16);
    --color-red: #f87171;
    --bg-red-light: rgba(239, 68, 68, 0.2);

    --color-indigo-600: #fb923c;

    --table-row-border: rgba(38, 38, 43, 0.85);
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--brand-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: var(--border-color); 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; border-top: 1px solid var(--border-color); padding-top: 2rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 1rem; }

p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }
.lead { font-size: 1.25rem; color: var(--text-secondary); }
.mt-4 { margin-top: 1rem; }

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover { color: var(--brand-primary-hover); }

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.text-green { color: var(--color-green); }
.text-orange { color: var(--color-orange); }
.text-red { color: var(--color-red); }
.bg-green-light { background-color: var(--bg-green-light); }
.bg-orange-light { background-color: var(--bg-orange-light); }
.bg-red-light { background-color: var(--bg-red-light); }

/* Common Components */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(194, 65, 12, 0.3);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--brand-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(194, 65, 12, 0.4);
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}
.btn-secondary:hover {
    background: var(--nav-hover-bg);
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; width: 100%; }

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.icon-btn:hover {
    background: var(--nav-hover-bg);
    color: var(--brand-primary);
}

/* Layout */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.nav-left, .nav-center, .nav-right { display: flex; align-items: center; }
.nav-left { gap: 1.5rem; }

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}
.search-bar i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
}
.search-bar input {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 1rem 0.4rem 2rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.2s ease;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.2);
    width: 300px;
}

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 0.25rem 0;
    z-index: 60;
    display: none;
}
.search-suggestion-item {
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.search-suggestion-item:hover {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}

.nav-center .nav-links {
    display: flex;
    gap: 0.5rem;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}
.nav-links a:hover {
    color: var(--text-primary);
    background: var(--nav-hover-bg);
}
.nav-links a.active {
    color: var(--brand-primary);
    background: rgba(194, 65, 12, 0.1);
}

.nav-right { gap: 1rem; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.25rem; cursor: pointer; }

.layout-container {
    display: flex;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Left Sidebar */
.left-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-main);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    overflow-y: auto;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    overflow-x: hidden;
}

.left-sidebar.collapsed {
    width: 0 !important;
    padding-left: 0;
    padding-right: 0;
    border-right-width: 0;
    opacity: 0;
}
.sidebar-section { margin-bottom: 1.25rem; }
.sidebar-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}
.sidebar-section ul { list-style: none; }
.sidebar-section li { margin-bottom: 0.1rem; }
.sidebar-section a {
    display: block;
    padding: 0.25rem 0.6rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.sidebar-section a:hover {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}
.sidebar-section a.active {
    background: var(--nav-hover-bg);
    color: var(--brand-primary);
    font-weight: 500;
}
.sidebar-section a.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}
.sidebar-section a.nav-item span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.time-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    background: var(--nav-hover-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1;
}

/* Docs navigation sidebar: product block + collapsible tree (built in script.js, mountDocsShell).
   The header links live here now, so the header hides them once the sidebar is mounted. */
.docs-nav-on .nav-center { display: none; }
.docs-nav-on .mobile-menu-btn { display: none; }
.docs-nav-on .left-sidebar { padding: 1.5rem 1rem; }

.docs-nav { display: flex; flex-direction: column; }
.docs-nav__caption {
    margin: 0 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.docs-nav__product {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.docs-nav__product:hover { background: var(--card-hover-bg); border-color: var(--text-muted); }
.docs-nav__product.is-current {
    border-color: var(--brand-primary);
    background: rgba(194, 65, 12, 0.1);
}
.docs-nav__product-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.docs-logo { display: block; width: auto; }
.docs-logo--dark { display: none; }
[data-theme="dark"] .docs-logo--light { display: none; }
[data-theme="dark"] .docs-logo--dark { display: block; }
.docs-nav .docs-logo { height: 26px; align-self: flex-start; }
.docs-nav .docs-logo--citedby { height: 16px; margin: 5px 0; }
.docs-header-logo { height: 32px; }
.docs-header-logo.docs-logo--citedby { height: 22px; }
@media (max-width: 768px) { .docs-header-logo.docs-logo--citedby { height: 17px; } }
/* MoltMentions has no logo image yet: a text wordmark stands in, sized like the other product marks. */
.docs-logo--moltmentions {
    height: auto;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
}
.docs-nav .docs-logo--moltmentions { font-size: 1.05rem; margin: 2px 0; }
.docs-header-logo.docs-logo--moltmentions { font-size: 1.3rem; }
@media (max-width: 768px) { .docs-header-logo.docs-logo--moltmentions { font-size: 1.05rem; } }
.docs-nav__product-text small { font-size: 0.75rem; color: var(--text-muted); }
.docs-nav__product-mark { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.docs-nav__product.is-current .docs-nav__product-mark { color: var(--brand-primary); }
.docs-nav__rule { height: 1px; margin: 1rem 0 0.75rem; background: var(--border-color); }

.docs-nav__tree, .docs-nav__group, .docs-nav__panel { display: flex; flex-direction: column; gap: 2px; }
.docs-nav__link,
.docs-nav__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 0;
    border-radius: 6px;
    background: none;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.docs-nav__toggle { font-weight: 600; color: var(--text-primary); }
.docs-nav__panel .docs-nav__toggle { font-weight: 500; color: var(--text-secondary); }
.docs-nav__link:hover,
.docs-nav__toggle:hover { background: var(--nav-hover-bg); color: var(--text-primary); }
.docs-nav__link.is-active {
    background: rgba(194, 65, 12, 0.1);
    color: var(--brand-primary);
    font-weight: 500;
}
.docs-nav__link:focus-visible,
.docs-nav__toggle:focus-visible,
.docs-nav__product:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.docs-nav__chev { margin-left: auto; font-size: 0.65rem; color: var(--text-muted); transition: transform 0.15s ease; }
.docs-nav__toggle[aria-expanded="true"] .docs-nav__chev { transform: rotate(90deg); }
.docs-nav__panel {
    margin: 2px 0 6px 0.55rem;
    padding-left: 0.4rem;
    border-left: 1px solid var(--border-color);
}
.docs-nav__panel[hidden] { display: none; }

.docs-nav__link .time-badge { margin-left: auto; }
.time-badge--beta { background: rgba(194, 65, 12, 0.15); color: var(--brand-primary); }

.docs-nav-scrim {
    position: fixed;
    inset: 64px 0 0 0;
    z-index: 44;
    background: rgba(0, 0, 0, 0.5);
}
.docs-nav-scrim[hidden] { display: none; }

.resizer {
    width: 4px;
    background-color: transparent;
    cursor: col-resize;
    flex-shrink: 0;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    border-right: 1px solid var(--border-color); /* Matches the sidebar separator initially */
    margin-left: -2px;
    z-index: 10;
    transition: background-color 0.2s, display 0.3s;
}
.resizer:hover, .resizer.dragging {
    background-color: var(--brand-primary);
}
.resizer.collapsed {
    display: none;
}


/* Main Content */
.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 3rem 4rem;
    background: var(--bg-main);
}
.content-wrapper {
    max-width: 1080px;
    margin: 0 auto;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumbs i { font-size: 0.7rem; }
.breadcrumbs span { color: var(--text-primary); font-weight: 500; }

.content-section { margin-bottom: 3.5rem; }
.content-section p:last-child { margin-bottom: 0; }
.content-section h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* Standalone documentation page layout (Setup views) */
.doc-page {
    /* Use existing layout spacing from .main-content + .content-wrapper
       so Setup pages match Get Started/Core Concepts. */
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.doc-page-header-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}
.doc-page-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
}
.doc-page-description {
    margin-top: 0.9rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 40rem;
}
.doc-page-body {
    margin-top: 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}
.doc-page-body h1,
.doc-page-body h2,
.doc-page-body h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
}
.doc-page-body h1 { font-size: 1.5rem; }
.doc-page-body h2 { font-size: 1.25rem; }
.doc-page-body h3 { font-size: 1.05rem; }
.doc-page-body p {
    margin: 0.4rem 0;
    color: var(--text-secondary);
}
.doc-page-body a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}
.doc-page-body a:hover {
    text-decoration: underline;
    color: var(--brand-primary-hover);
}
.doc-page-body strong { font-weight: 700; }
.doc-page-body code {
    font-family: var(--font-mono);
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    color: var(--brand-primary);
}
.doc-page-body pre code {
    background: transparent;
    padding: 0;
    color: #e5e7eb;
}

[data-theme="dark"] .doc-page-body code {
    background: rgba(255, 255, 255, 0.06);
    color: var(--brand-primary);
}
.doc-page-body ul,
.doc-page-body ol {
    padding-left: 1.25rem;
    margin: 0.4rem 0 0.6rem;
}
.doc-page-body li {
    margin: 0.2rem 0;
    color: var(--text-secondary);
}
.doc-page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.86rem;
}
.doc-page-body th,
.doc-page-body td {
    border: 0;
    border-bottom: 1px solid var(--table-row-border);
    padding: 0.5rem 0.6rem;
    text-align: left;
    vertical-align: top;
}
.doc-page-body th {
    background: var(--bg-sidebar);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.doc-page-body tbody tr:nth-child(even) td {
    background: transparent;
}
.doc-page-body blockquote {
    margin: 0.8rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--brand-primary);
    background: var(--bg-sidebar);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.doc-page-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}
.doc-page-body pre {
    background: #020617;
    color: #e5e7eb;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 0.9rem 0;
}
.doc-page-body pre code {
    background: transparent;
    padding: 0;
    color: #e5e7eb; /* force light code color inside dark blocks */
}
@media (max-width: 640px) {
    .doc-page-body table {
        font-size: 0.8rem;
    }
}

.doc-page-body .doc-table-xscroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}
.doc-page-body .doc-muted-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 0 0.35rem;
}
.doc-page-body .doc-subtle {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.2rem;
}

/* Markdown-style documentation body */
.markdown-body {
    font-size: 0.98rem;
    color: var(--text-secondary);
}
.markdown-body h1 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.markdown-body p {
    margin-bottom: 1rem;
}
.markdown-body ul {
    margin: 0 0 1rem 1.25rem;
    padding-left: 0.75rem;
}
.markdown-body li {
    margin-bottom: 0.25rem;
}
.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-sidebar);
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}
.markdown-body th,
.markdown-body td {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}
.markdown-body thead th {
    background: var(--bg-sidebar);
    text-align: left;
    font-weight: 600;
}
.markdown-body tbody tr:nth-child(even) {
    background: var(--card-hover-bg);
}
.markdown-body tbody tr:hover {
    background: var(--nav-hover-bg);
}

.markdown-body hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}
.markdown-body blockquote {
    border-left: 3px solid var(--brand-primary);
    padding-left: 0.75rem;
    color: var(--text-secondary);
    margin: 1rem 0;
}
.markdown-body pre {
    background: var(--bg-sidebar);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}
.markdown-body pre code {
    background: transparent;
    padding: 0;
}

/* Doc footer meta */
.doc-meta-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
@media (min-width: 640px) {
    .doc-meta-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.doc-meta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}
.doc-meta-actions .github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: var(--brand-primary);
}
.doc-meta-actions .github-link i {
    font-size: 0.9rem;
}
.doc-helpful {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.doc-helpful button {
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
}
.doc-helpful button:hover {
    background: var(--nav-hover-bg);
    color: var(--brand-primary);
}

/* Grid Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.feature-card {
    padding: 1.5rem;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--brand-primary); }

.analyze-signals-hero,
.take-action-hero {
    position: static;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 2rem;
}

.signals-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.signals-overview-card {
    padding: 1.25rem;
    display: grid;
    gap: 0.6rem;
}

.signals-overview-card strong {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.signals-overview-card p {
    margin: 0;
    color: var(--text-muted);
}

.signals-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(194, 65, 12, 0.12);
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signal-section {
    margin-top: 2.5rem;
}

.signal-alerts-card {
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.signal-alerts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.signal-alerts-header h3 {
    margin: 0.6rem 0 0;
    font-size: 1.2rem;
}

.signal-badge {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--nav-hover-bg);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.signal-alert-list {
    display: grid;
    gap: 0.9rem;
}

.signal-alert-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.signal-score {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.signal-score.positive {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.signal-score.neutral {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.signal-score.negative {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.intelligence-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}

.intelligence-card {
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

.intelligence-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient-brand);
    opacity: 0.85;
}

.intelligence-card h3 {
    margin-top: 0.4rem;
    margin-bottom: 1rem;
}

.revenue-signal-grid {
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.4fr);
    align-items: stretch;
}

.revenue-focus-card,
.revenue-metrics-card {
    height: 100%;
}

.revenue-stat-list,
.revenue-metric-grid {
    margin-top: 1.25rem;
}

.revenue-stat-list {
    display: grid;
    gap: 0.75rem;
}

.revenue-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: var(--nav-hover-bg);
}

.revenue-stat span,
.revenue-metric span,
.revenue-metric small {
    color: var(--text-secondary);
}

.revenue-stat strong,
.revenue-metric strong {
    color: var(--text-primary);
}

.revenue-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.revenue-metric {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(194, 65, 12, 0.07), transparent);
}

.revenue-metric strong {
    font-size: 1.4rem;
    line-height: 1.1;
}

.revenue-metric small {
    font-size: 0.8rem;
}

.analyze-signals-hero h1,
.take-action-hero h1 {
    margin: 0 0 0.75rem;
}

.analyze-signals-hero .lead,
.take-action-hero .lead {
    margin-bottom: 0;
    max-width: 44rem;
}

.action-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-hero-card {
    padding: 1.25rem;
    display: grid;
    gap: 0.65rem;
}

.action-hero-card strong {
    font-size: 1.05rem;
    line-height: 1.5;
}

.action-hero-card p {
    margin: 0;
    color: var(--text-muted);
}

.take-action-section {
    margin-top: 2.5rem;
}

.action-workflow-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

.action-workflow-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-workflow-card p {
    margin: 0;
    color: var(--text-secondary);
}

.workflow-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.workflow-card-footer span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.workflow-card-footer strong {
    font-size: 0.95rem;
}

.workflow-timeline {
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.workflow-timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.workflow-timeline-header h3 {
    margin: 0.6rem 0 0;
    font-size: 1.2rem;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.workflow-step {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(194, 65, 12, 0.06), transparent);
    display: grid;
    gap: 0.45rem;
}

.workflow-step span {
    color: var(--text-secondary);
}

.take-action-console {
    margin-top: 1.5rem;
    overflow: hidden;
    background: var(--bg-main);
}

.take-action-console-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}

.action-console-panel {
    display: grid;
    gap: 1rem;
    min-height: 100%;
}

.action-console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.action-console-results {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-sidebar);
}

.action-result-list {
    display: grid;
    gap: 0.85rem;
}

.action-result-item {
    display: grid;
    gap: 0.3rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.action-result-item span {
    color: var(--text-secondary);
}

/* Key/Value list (used inside feature cards) */
.kv-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}
.kv-item {
    display: grid;
    gap: 0.2rem;
}
.kv-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.kv-value {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.card-icon.blue { background: rgba(194, 65, 12, 0.1); color: var(--brand-primary); }
.card-icon.purple { background: rgba(113, 113, 122, 0.14); color: var(--text-secondary); }

[data-theme="dark"] .signal-alert-item {
    background: rgba(15, 23, 42, 0.58);
}

[data-theme="dark"] .signal-score.positive {
    color: #34d399;
}

[data-theme="dark"] .signal-score.neutral {
    color: #fbbf24;
}

[data-theme="dark"] .signal-score.negative {
    color: #f87171;
}

[data-theme="dark"] .workflow-step {
    background: linear-gradient(180deg, rgba(194, 65, 12, 0.12), rgba(15, 23, 42, 0.2));
}

/* Mock Dashboard */
.dashboard-mockup {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.mockup-header {
    background: var(--bg-sidebar);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.window-controls { display: flex; gap: 6px; }
.window-controls span { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; }
.window-controls span:nth-child(2) { background: #f59e0b; }
.window-controls span:nth-child(3) { background: #10b981; }
.mockup-url {
    margin: 0 auto;
    background: var(--bg-main);
    padding: 0.2rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.mockup-body {
    display: flex;
    height: 250px;
    background: var(--card-bg);
}
.mock-sidebar {
    width: 60px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
}
.mock-main {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mock-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.stage-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: #eef2ff;
}
.stage-pill:hover {
    background: #e0e7ff;
}
[data-theme="dark"] .stage-pill {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-secondary);
}
.mock-chart {
    flex-grow: 1;
    background: var(--bg-sidebar);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.chart-line {
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 60%;
    background: linear-gradient(to top, rgba(194, 65, 12, 0.2), transparent);
    border-top: 2px solid var(--brand-primary);
    border-radius: 100% 100% 0 0 / 50% 50% 0 0;
}

/* Integration Flow */
.integration-cards {
    padding: 2.5rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.signals-box {
    border: 2px dashed var(--border-color);
    background: var(--bg-sidebar);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    position: relative;
    transition: border-color 0.3s ease;
}
.signals-box:hover {
    border-color: var(--brand-primary);
}
.tech-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}
.tech-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 130px;
    width: 130px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s;
    text-align: center;
    z-index: 2;
}
.tech-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
}
.tech-card i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}
.tech-card span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.tech-card small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.flow-down {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin: 1rem 0;
    z-index: 1;
}
.flow-line-vertical {
    position: absolute;
    top: -20px;
    bottom: -20px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: var(--border-color);
}
.animated-dot-vertical {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--brand-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-primary);
    animation: flowDown 2s infinite linear;
}
@keyframes flowDown { 
    0% { top: -20px; opacity: 0; } 
    10% { opacity: 1; } 
    90% { opacity: 1; } 
    100% { top: calc(100% + 10px); opacity: 0; } 
}
.hub-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.node {
    padding: 1rem 1.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}
.node.center {
    border-color: var(--border-color);
    cursor: default;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.node.center:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
}

/* Styled List */
.styled-list { list-style: none; margin-top: 1.5rem; }
.styled-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}
.list-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.list-content strong { display: block; margin-bottom: 0.25rem; color: var(--text-primary); font-size: 1.05rem; }
.list-content span { color: var(--text-secondary); }

/* Page Nav */
.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.nav-card {
    flex: 1;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.nav-card:hover { border-color: var(--brand-primary); }
.nav-card.disabled { opacity: 0.5; pointer-events: none; }
.nav-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.nav-title { font-size: 1.15rem; font-weight: 500; color: var(--brand-primary); }
.next-card { align-items: flex-end; text-align: right; }
.next-card i { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; opacity: 0; transition: all 0.2s ease; color: var(--brand-primary); }
.next-card:hover i { opacity: 1; right: 1rem; transform: translateY(-50%) scale(1.1); }

/* Footer */
.content-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.feedback-btns { display: flex; gap: 0.5rem; }
.feedback-btns .btn-icon { border: 1px solid var(--border-color); border-radius: 6px; padding: 0.4rem 0.8rem; width: auto; font-size: 0.9rem; }
.feedback-submitted {
    opacity: 0.6;
    cursor: default;
}
.feedback-submitted:hover {
    background: inherit;
    color: inherit;
}
.footer-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 2rem;
    font-size: 0.85rem;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--brand-primary); }

/* Right Sidebar (TOC) */
.right-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 2rem 1.5rem;
}
.sticky-top {
    position: sticky;
    top: 84px;
}
/* Long "On this page" lists scroll inside the sidebar instead of running off the screen */
.right-sidebar .sticky-top {
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    scrollbar-width: thin;
}
.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-left: 1px solid var(--border-color);
    padding-left: 0.5rem;
}
.toc-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border-left: 2px solid transparent;
    margin-left: -0.6rem;
}
.toc-link:hover { color: var(--text-primary); }
.toc-link.active {
    color: var(--brand-primary);
    border-left-color: var(--brand-primary);
    background: rgba(194, 65, 12, 0.05);
    font-weight: 500;
}

.toc-promo {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
}
.promo-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.toc-promo p { font-size: 0.85rem; margin-bottom: 1rem; }

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* Custom Visualizations for Core Concepts */

/* Connect Your Stack */
.connection-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    margin-top: 1.5rem;
    background: var(--bg-main);
}
.conn-box {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-sidebar);
    font-weight: 500;
}
.conn-arrows i { color: var(--text-muted); font-size: 1.5rem; }
.conn-hub {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.conn-hub i { font-size: 2rem; }

/* AI Comparison (Correlated Signals) */
.ai-comparison {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 2rem;
    margin-top: 1.5rem;
    position: relative;
    background: var(--bg-main);
}
.comp-side {
    flex: 1;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.comp-side.success-side { border-color: rgba(16, 185, 129, 0.4); background: var(--bg-green-light); }
.comp-side.fail-side { border-color: rgba(239, 68, 68, 0.4); background: var(--bg-red-light); }
.comp-side h4 { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.comp-side ul { padding-left: 1.5rem; color: var(--text-secondary); font-size: 0.95rem; }
.comp-side li { margin-bottom: 0.5rem; }
.comp-vs {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Slack Notification Mockup */
.slack-mockup {
    margin-top: 1.5rem;
    overflow: hidden;
    background: var(--bg-main);
}
.slack-header {
    background: #4a154b;
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.slack-message {
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-bg);
}
.slack-avatar img { width: 40px; height: 40px; border-radius: 4px; }
.slack-content strong { color: var(--text-primary); }
.slack-content small { color: var(--text-muted); font-size: 0.75rem; margin-left: 0.5rem; }
.slack-card {
    margin-top: 0.75rem;
    border-left: 4px solid var(--color-green);
    background: var(--bg-sidebar);
    padding: 1rem;
    border-radius: 0 12px 12px 0;
}
.slack-card p { margin-bottom: 0.5rem; font-size: 0.95rem; }
.btn-slack {
    background: #007a5a;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.btn-slack:hover { background: #148567; }

/* CSS Funnel */
.css-funnel-container {
    padding: 2.5rem 2rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-main);
}
.funnel-step {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}
.funnel-step span { 
    display: block; 
    margin-bottom: 0.25rem; 
    font-size: 0.9rem; 
    color: var(--text-primary); 
    font-weight: 500;
}
.f-bar {
    height: 30px;
    background: var(--gradient-brand);
    margin: 0 auto;
    border-radius: 4px;
    transition: width 0.3s;
}
.f-1 .f-bar { width: 100%; opacity: 0.6; }
.f-2 .f-bar { width: 60%; opacity: 0.8; }
.f-3 .f-bar { width: 25%; opacity: 1; }
.f-drop {
    font-size: 0.85rem;
    color: var(--color-green);
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Chart Mockup (Sparkline) */
.chart-mockup {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-main);
}
.chart-title { font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); }
.chart-area { position: relative; height: 150px; }
.sparkline { width: 100%; height: 100%; overflow: visible; }
.sparkline-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s forwards ease-out;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.chart-tooltip {
    position: absolute;
    top: 15px;
    right: 80px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Health Widget */
.health-widget {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-main);
}
.border-red-glow { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 0 15px rgba(239, 68, 68, 0.1); }
.hw-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.hw-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.hw-slider { position: relative; margin-bottom: 1.5rem; }
.hw-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    position: relative;
    width: 100%;
}
.hw-fill {
    position: absolute;
    left: 0; top: 0; height: 100%;
    background: var(--color-red);
    border-radius: 4px;
}
.hw-thumb {
    position: absolute;
    top: -10px;
    width: 28px;
    height: 28px;
    background: var(--bg-main);
    border: 2px solid var(--color-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    transform: translateX(-50%);
    box-shadow: var(--shadow-sm);
}
.hw-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.hw-reason {
    font-size: 0.9rem;
    color: var(--color-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .right-sidebar { display: none; }
}
@media (max-width: 1024px) {
    .nav-center { display: none; }
    .mobile-menu-btn { display: block; }
}
@media (max-width: 768px) {
    .left-sidebar { display: none; }
    /* With the generated nav the sidebar becomes a drawer opened by the header hamburger. */
    .docs-nav-on .left-sidebar {
        display: block;
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        height: auto;
        width: min(320px, 86vw) !important;
        z-index: 45;
        transform: translateX(-100%);
        visibility: hidden;
        box-shadow: var(--shadow-md);
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }
    .docs-nav-open .left-sidebar { transform: none; visibility: visible; transition: transform 0.25s ease; }
    .docs-nav-on .resizer { display: none; }
    .docs-nav-on .mobile-menu-btn { display: block; }
    .docs-nav-open { overflow: hidden; }
    .main-content { padding: 2rem; }
    .search-bar input { width: 40px; padding: 0; opacity: 0; }
    .search-bar i { pointer-events: none; z-index: 10; padding: 0.5rem; }
    .nav-right .btn-primary { display: none; }
    .signal-alerts-header,
    .signal-alert-item {
        grid-template-columns: 1fr;
    }
    .signal-alert-item {
        justify-items: start;
    }
    .workflow-timeline-header,
    .action-console-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .workflow-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .workflow-steps,
    .take-action-console-body,
    .revenue-signal-grid,
    .revenue-metric-grid {
        grid-template-columns: 1fr;
    }
    .signal-badge,
    .signal-score {
        white-space: normal;
    }
    .slack-message {
        padding: 1rem;
    }
}

ready-to-scale-promo {
    display: block;
}


.coming-soon-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-orange);
    vertical-align: middle;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coming-soon-badge--blue {
    background: rgba(194, 65, 12, 0.14);
    border: 1px solid rgba(194, 65, 12, 0.35);
    color: var(--brand-primary);
}

[data-theme="dark"] .coming-soon-badge--blue {
    background: rgba(96, 165, 250, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: var(--brand-primary);
}

/* Code tabs */
.code-tabs {
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.code-tabs .tab-bar {
    display: flex;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-color);
    padding: 0 0.25rem;
}
.code-tabs .tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.55rem 1rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}
.code-tabs .tab-btn.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}
.code-tabs .tab-btn:hover:not(.active) {
    color: var(--text-primary);
}
.code-tabs .tab-pane {
    display: none;
}
.code-tabs .tab-pane.active {
    display: block;
}
.code-tabs .tab-pane pre {
    margin: 0;
    border-radius: 0;
    border: none;
}

/* MCP tools dropdown (capabilities table) */
.tools-dropdown {
    border: 1px solid rgba(194, 65, 12, 0.18);
    border-radius: 8px;
    background: var(--card-bg);
    overflow: hidden;
}

.tools-dropdown summary.tools-dropdown__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.95rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
    background: rgba(194, 65, 12, 0.08); /* light blue header like reference */
}

.tools-dropdown summary.tools-dropdown__summary::-webkit-details-marker {
    display: none;
}

.tools-dropdown__chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.tools-dropdown[open] .tools-dropdown__chevron {
    transform: rotate(180deg);
}

.tools-dropdown__content {
    padding: 0.15rem 1rem 0.95rem;
    background: var(--card-bg);
}

.tools-dropdown__content table {
    margin-top: 0 !important;
    width: 100%;
}

.tools-dropdown__content td code {
    font-family: var(--font-mono);
    background: rgba(15, 23, 42, 0.035); /* lightest gray/near-white */
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    color: var(--brand-primary);
}

[data-theme="dark"] .tools-dropdown__content td code {
    background: rgba(255, 255, 255, 0.07);
    color: var(--brand-primary);
}

.tools-dropdown[open] summary.tools-dropdown__summary {
    border-bottom-color: var(--table-row-border);
}

/* Step-wise content inside implementation dropdowns */
.tools-dropdown__content p {
    margin: 0.35rem 0 0.75rem;
}

.tools-dropdown__content ol,
.tools-dropdown__content ul {
    margin: 0.35rem 0 0.8rem;
    padding-left: 1.35rem;
}

.tools-dropdown__content li {
    margin: 0.25rem 0 0.55rem;
}

.tools-dropdown__content pre {
    margin: 0.75rem 0;
}

/* Make blockquotes inside dropdowns look like "Note" callouts */
.tools-dropdown__content blockquote {
    margin: 0.85rem 0 0;
    border-left: none;
    border: 1px solid rgba(194, 65, 12, 0.6);
    background: rgba(194, 65, 12, 0.05);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

[data-theme="dark"] .tools-dropdown__content blockquote {
    border: 1px solid rgba(194, 65, 12, 0.85);
    background: rgba(194, 65, 12, 0.14);
}

/* Remove extra divider under last tool row */
.tools-dropdown__content table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Query examples (Amplitude-like cards) */
.query-examples .query-examples__section {
    margin-top: 1.25rem;
}

.query-examples h3 {
    margin-top: 0;
}

.query-examples .query-examples__subcard {
    margin-top: 0.85rem;
    background: var(--card-bg);
    border: 1px solid rgba(194, 65, 12, 0.16);
    border-radius: 12px;
    padding: 0.95rem 1.05rem;
}

/* Override global h4 (uppercase) just for query examples */
.query-examples h4 {
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.query-examples .query-examples__subcard ul {
    margin: 0.1rem 0 0 1.25rem;
    padding: 0;
}

.query-examples .query-examples__subcard li {
    margin: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 1.0rem;
}

/* Query examples (Amplitude-like quote blocks) */
.query-examples blockquote.query-examples__prompt {
    margin: 0.75rem 0;
    padding: 0 0 0 1.05rem;
    border-left: 4px solid rgba(148, 163, 184, 0.45);
    background: transparent;
    border-radius: 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.03rem;
}

[data-theme="dark"] .query-examples blockquote.query-examples__prompt {
    border-left-color: rgba(148, 163, 184, 0.35);
}

/* Query examples hierarchy: category vs tool name */
.query-examples h3 {
    font-size: 1.25rem;
    font-weight: 750;
    margin-top: 1.65rem;
    margin-bottom: 0.5rem;
}

.query-examples h3:first-of-type {
    margin-top: 0.75rem;
}

.query-examples h4 {
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.085em;
    color: var(--text-muted);
    margin-top: 0.95rem;
    margin-bottom: 0.35rem;
}

/* Remote server bullets: align like reference */
#remote-server ul {
    margin: 0.75rem 0 0.75rem;
    padding-left: 0.95rem;
}

#remote-server li {
    margin: 0.45rem 0;
}

/* Bullets should sit "ahead" in these sections */
#troubleshooting ul,
#technical-specs ul {
    margin: 0.75rem 0 0.75rem;
    padding-left: 0.95rem;
}

/* Shared note callout (used outside dropdowns) */
blockquote.note-callout {
    margin: 0.75rem 0 1.05rem;
    padding: 0.9rem 1rem;
    border-left: none;
    border: 1px solid rgba(194, 65, 12, 0.55);
    background: rgba(194, 65, 12, 0.06);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.98rem;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

[data-theme="dark"] blockquote.note-callout {
    border: 1px solid rgba(194, 65, 12, 0.85);
    background: rgba(194, 65, 12, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

blockquote.note-callout i {
    color: var(--brand-primary);
}

/* Product screenshots in docs — display at CSS size; 2x PNGs stay sharp on retina */
.doc-screenshot {
    margin: 1rem 0 1.25rem;
}
.doc-screenshot__img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
}
.doc-screenshot figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Placeholder frame until product screenshots are added */
.doc-screenshot-placeholder {
    margin: 1rem 0 1.25rem;
}
.doc-screenshot-placeholder__frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 180px;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    border: 1.5px dashed var(--border-color);
    background: var(--nav-hover-bg);
    color: var(--text-muted);
    text-align: center;
}
.doc-screenshot-placeholder__frame strong {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}
.doc-screenshot-placeholder__frame small {
    font-size: 0.75rem;
    font-family: var(--font-mono);
}
.doc-screenshot-placeholder figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}
[data-theme="dark"] .doc-screenshot-placeholder__frame {
    background: rgba(17, 24, 39, 0.65);
    border-color: #3a4558;
}

/* Implementation dropdown spacing (Amplitude-like accordions) */
#implementation .tools-dropdown + .tools-dropdown {
    margin-top: 0.95rem;
}

#implementation .tools-dropdown__content {
    padding: 0.7rem 1.15rem 1.1rem;
}

/* Capabilities (example prompts) accordions: space between collapsibles */
#capabilities .tools-dropdown + .tools-dropdown {
    margin-top: 1rem;
}

/* Restore Amplitude-style quote lines inside capabilities dropdowns (overrides generic .tools-dropdown__content blockquote callout) */
.query-examples .tools-dropdown__content blockquote.query-examples__prompt {
    margin: 0.75rem 0;
    padding: 0 0 0 1.05rem;
    border: none !important;
    border-left: 4px solid rgba(148, 163, 184, 0.45) !important;
    background: transparent !important;
    border-radius: 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.03rem;
    box-shadow: none;
}

.query-examples .tools-dropdown__content blockquote.query-examples__prompt:first-child {
    margin-top: 0;
}

[data-theme="dark"] .query-examples .tools-dropdown__content blockquote.query-examples__prompt {
    border-left-color: rgba(148, 163, 184, 0.35) !important;
    background: transparent !important;
}

/* Subgroup labels inside capabilities dropdowns (match h4 hierarchy on page) */
#capabilities .tools-dropdown__content h4 {
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.085em;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 0.4rem;
}

/* First subgroup title after intro copy (Other tool reference prompts) */
#capabilities .tools-dropdown__content > p:first-child + h4 {
    margin-top: 0.35rem;
}

/* Other Query examples: two-column tool name + prompt (no tables) */
.query-examples__other-group {
    margin-top: 1.35rem;
}

.query-examples__other-group:first-child {
    margin-top: 0.35rem;
}

#capabilities .query-examples__other-group h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.query-examples__tool-grid {
    margin-top: 0.45rem;
}

.query-examples__tool-grid-header {
    display: grid;
    grid-template-columns: minmax(10rem, 30%) 1fr;
    gap: 0.75rem 1rem;
    padding: 0.4rem 0 0.55rem;
    border-bottom: 1px solid var(--table-row-border);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.query-examples__tool-pair {
    display: grid;
    grid-template-columns: minmax(10rem, 30%) 1fr;
    gap: 0.75rem 1rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--table-row-border);
}

.query-examples__tool-pair:last-child {
    border-bottom: none;
}

.query-examples__tool-name {
    min-width: 0;
}

.query-examples__tool-name code {
    display: inline-block;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 0.2rem 0.45rem;
    border-radius: 0.3rem;
    background: rgba(15, 23, 42, 0.045);
    color: var(--brand-primary);
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
}

[data-theme="dark"] .query-examples__tool-name code {
    background: rgba(255, 255, 255, 0.07);
}

.query-examples__tool-pair .query-examples__prompt {
    margin: 0 !important;
}

@media (max-width: 640px) {
    .query-examples__tool-grid-header,
    .query-examples__tool-pair {
        grid-template-columns: 1fr;
    }
}

/* Example prompts dropdown at the top of each section of the MCP tools pages */
.tool-examples {
    margin: 0.75rem 0 1.5rem;
}

.tool-examples__count {
    margin-left: 0.15rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.tool-examples .tools-dropdown__content {
    padding-top: 0.5rem;
}

.tool-examples .query-examples__tool-name a {
    text-decoration: none;
}

.tool-examples .tool-examples__prompts p {
    margin: 0 0 0.45rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.55;
}

.tool-examples .tool-examples__prompts p:last-child {
    margin-bottom: 0;
}

/* Single-column layout on phones: the Tool / Example prompt header no longer lines up with anything */
@media (max-width: 640px) {
    .tool-examples .query-examples__tool-grid-header {
        display: none;
    }

    .tool-examples .query-examples__tool-pair {
        gap: 0.4rem;
    }
}

/* Tool entries: clear space above each tool heading so entries do not run together */
.content-section h3[id^="tool-"] {
    margin-top: 2rem;
}

/* Plain lists inside a content section: keep bullets inside the text column and
   give the block below them the same gap a paragraph would have */
.content-section > ul:not([class]),
.content-section > ol:not([class]) {
    padding-left: 1.25rem;
    margin: 0 0 1.5rem;
}

.content-section > ul:not([class]) > li,
.content-section > ol:not([class]) > li {
    margin: 0.2rem 0;
}

.content-section > ul:not([class]):last-child,
.content-section > ol:not([class]):last-child {
    margin-bottom: 0;
}

/* A bold label paragraph (for example "Good to know") sits close to the list it introduces */
.content-section > p:has(> strong:only-child):has(+ ul:not([class])) {
    margin-bottom: 0.5rem;
}

/* Phones: let wide parameter tables scroll sideways and let long inline names wrap,
   so the page itself never scrolls sideways */
@media (max-width: 768px) {
    .params-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content :not(pre) > code {
        overflow-wrap: anywhere;
    }

    .main-content p,
    .main-content li {
        overflow-wrap: break-word;
    }

    .main-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-content pre {
        max-width: 100%;
        overflow-x: auto;
    }

    .breadcrumbs {
        flex-wrap: wrap;
    }

    .ai-comparison {
        flex-direction: column;
        gap: 2rem;
        padding: 1rem;
    }
}

/* ===== Mobile =====
   Phones: the header must always fit (the theme toggle and menu button used to fall off the right edge),
   nothing may widen the page, and tables, code and tap targets have to work with a thumb. */
.main-content, .content-wrapper { min-width: 0; max-width: 100%; }
.main-content img, .main-content video, .main-content svg, .main-content canvas, .main-content iframe { max-width: 100%; }
.main-content img { height: auto; }
.docs-nav__signin { display: none; }

@media (max-width: 1024px) {
    /* A menu button on a page with no generated sidebar opens nothing */
    html:not(.docs-nav-on) .mobile-menu-btn { display: none; }
}

@media (max-width: 768px) {
    /* A page can never scroll sideways; wide things scroll inside themselves */
    html, body { overflow-x: hidden; overflow-x: clip; }

    /* Header: logo, search, theme, menu: all inside the screen width */
    .top-nav { padding: 0 0.5rem 0 0.75rem; }
    .nav-left { gap: 0.25rem; min-width: 0; flex: 1 1 auto; }
    .nav-right { gap: 0; flex: 0 0 auto; }
    #desktop-sidebar-toggle { display: none; }
    .logo { min-width: 0; min-height: 44px; }
    .logo-img, .docs-header-logo { height: 26px; max-width: 100%; }
    .docs-header-logo.docs-logo--citedby { height: 15px; }
    .icon-btn,
    .mobile-menu-btn,
    .docs-nav-on .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        flex-shrink: 0;
    }
    .search-bar { width: 44px; height: 44px; flex-shrink: 0; justify-content: center; }
    .search-bar i { position: static; padding: 0; font-size: 1.1rem; }
    .search-bar input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; font-size: 16px; }
    /* Tapping the search icon opens a full-width search bar over the header */
    .search-bar:focus-within {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 64px;
        padding: 0 0.75rem;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border-color);
        z-index: 70;
    }
    .search-bar:focus-within i { position: absolute; left: 1.4rem; top: 50%; transform: translateY(-50%); z-index: 1; }
    .search-bar:focus-within input {
        position: static;
        width: 100%;
        height: 42px;
        padding: 0 0.75rem 0 2.5rem;
        opacity: 1;
    }
    .search-bar:focus-within .search-suggestions { top: calc(100% + 4px); left: 0.75rem; right: 0.75rem; max-height: 60vh; overflow-y: auto; }
    .search-suggestion-item { padding: 0.75rem 0.9rem; font-size: 0.95rem; }

    /* Page */
    .main-content { padding: 1.25rem 1rem 2.5rem; }
    h1 { font-size: clamp(1.75rem, 7.5vw, 2.25rem); }
    h2 { font-size: 1.4rem; margin-top: 1.5rem; padding-top: 1.5rem; }
    .breadcrumbs a { padding: 0.4rem 0; }

    /* Sidebar drawer: thumb-sized rows */
    .docs-nav__link, .docs-nav__toggle { padding: 0.7rem 0.7rem; font-size: 0.95rem; }
    .docs-nav__product { padding: 0.7rem 0.75rem; }
    .docs-nav__signin {
        display: block;
        margin-top: 1rem;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        background: var(--brand-primary);
        color: #fff;
        font-weight: 600;
        text-align: center;
    }

    /* Tables scroll inside themselves and keep readable columns; their text stays a readable size */
    .main-content table { font-size: 0.875rem; }
    .main-content td, .main-content th { font-size: 0.875rem; }
    .main-content td code, .main-content th code { font-size: 0.8125rem; white-space: nowrap; overflow-wrap: normal; }
    .params-table th, .params-table td { min-width: 6.5rem; }
    .params-table th:last-child, .params-table td:last-child { min-width: 14rem; }
    .doc-subtle, .doc-muted-label, .mcp-client-meta { font-size: 0.8125rem; }
    .mcp-badge { font-size: 0.7rem; }
    .main-content pre { font-size: 0.8125rem; }

    /* Buttons you tap: code tabs, Copy, "Was this helpful?" */
    .mcp-btn, .btn-icon, .btn-secondary, .btn-primary,
    .tab-btn, .platform-tab, .install-tab, .code-tab-btn, .feedback-btn, .btn-slack, .copy-btn, .gs-copy-btn { min-height: 44px; }
    .feedback-btn, .copy-btn, .gs-copy-btn { min-width: 44px; }

    /* Small uppercase section labels */
    .main-content .bring-label, .main-content .pi-book-label, .main-content .session-label,
    .main-content .crm-card-direction, .main-content .doc-muted-label { font-size: 0.75rem; }
}

@media (max-width: 640px) {
    /* Inline-styled flex rows and grids on content pages: let them shrink instead of widening the page */
    .doc-page-body [style*="flex:1"],
    .doc-page-body [style*="flex: 1"] { min-width: 0; }
    .doc-page-body [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
    .doc-page-body img { max-width: 100%; height: auto; }
    .tech-grid { flex-wrap: wrap; gap: 0.75rem; }
    .tech-card { min-width: 0; flex: 1 1 8rem; }
    .signals-box, .integration-cards { padding: 1rem; }
    .signal-alerts-header { flex-wrap: wrap; }
    .signal-badge, .signal-score { max-width: 100%; }

    /* Captions and labels styled inline at 11-12px are too small to read on a phone */
    .main-content [style*="font-size: 12px"],
    .main-content [style*="font-size:12px"] { font-size: 13px !important; }
    .main-content [style*="font-size: 11px"],
    .main-content [style*="font-size:11px"] { font-size: 12px !important; }
}

@media (max-width: 380px) {
    .top-nav { padding-left: 0.5rem; }
    .logo-img, .docs-header-logo { height: 24px; }
    .docs-header-logo.docs-logo--citedby { height: 14px; }
}


/* ===== MoltMentions brand layer ===== */
.doc-page-title,
.content-wrapper h1,
.mcp-doc .content-section > h2 {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.12;
}
.content-wrapper h1.doc-page-title { font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); }
.docs-logo--moltmentions { font-family: var(--font-sans); font-weight: 600; }
.docs-logo__accent { color: var(--brand-primary); }
.doc-page-header-eyebrow { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.02em; }
.btn-primary, .mcp-btn.primary { color: #fff; }
[data-theme="dark"] .btn-primary { background: #c2410c; }
