/* ==========================================================================
   WAF++ Antora Supplemental UI - CLEAN (Copy & Paste)
   Goals:
   - Header aligned to sidebar + content grid
   - Logo above sidebar, Home next to it, actions right-aligned
   - Sidebar as clean card
   - Doc content boxed like marketing (soft card)
   - No global layout-breaking selectors
   ========================================================================== */

/* ---------------------------
   0) Tokens
---------------------------- */
:root {
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell,
    "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --c-text: #0f172a;
    --c-muted: #475569;
    --c-subtle: #64748b;
    --c-border: #e2e8f0;
    --c-bg: #ffffff;

    --c-primary: #2b7fff;
    --c-primary-600: #1f6fe6;

    --r-md: 14px;
    --r-lg: 18px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);

    --container-max: 1120px;

    /* >>> This is the key: align header logo over sidebar <<< */
    --sidebar-width: 260px; /* adjust if your nav is wider/narrower */
    --pad-x: 24px;
    --pad-x-sm: 16px;
}

/* ---------------------------
   1) Base / Safety
---------------------------- */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-600); text-decoration: underline; }

p, li { color: var(--c-muted); line-height: 1.7; }

code, pre { font-family: var(--font-mono); }

/* Soft marketing background */
body {
    background:
            radial-gradient(900px 500px at 10% 0%, rgba(43,127,255,0.08), transparent 60%),
            radial-gradient(900px 500px at 90% 10%, rgba(255,200,120,0.12), transparent 60%),
            #fff;
}

/* ---------------------------
   2) Hide default Antora navbar
---------------------------- */
.navbar { display: none !important; }

/* ---------------------------
   3) Header aligned to Sidebar + Content grid
---------------------------- */
.waf-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-border);
}

/*
  Grid layout:
  [sidebar-width] [Home] [spacer] [actions-right]
  Logo sits in col 1 (over sidebar).
*/
.waf-header__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px var(--pad-x);

    display: grid;
    grid-template-columns: var(--sidebar-width) auto 1fr auto;
    align-items: center;
    gap: 14px;
}

/* Brand: logo + wordmark in sidebar column */
.waf-header__brand {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.waf-header__logoimg {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
}

.waf-header__wordmark {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #1f2937;
}

/* Nav: only Home, sits next to sidebar */
.waf-header__nav {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
}

.waf-header__link {
    color: #334155;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
}
.waf-header__link:hover {
    background: rgba(15,23,42,0.04);
    text-decoration: none;
}

/* Actions: right aligned */
.waf-header__actions {
    grid-column: 4;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Search (keep your IDs for JS hook) */
.waf-header__search { display: inline-flex; align-items: center; }
#search-field.field { display: inline-flex; }

#search-input {
    width: 240px;
    max-width: 26vw;
    border: 1px solid var(--c-border);
    background: #fff;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 650;
    color: #0f172a;
    box-shadow: var(--shadow-sm);
    outline: none;
}
#search-input:focus {
    border-color: rgba(43,127,255,0.5);
    box-shadow: 0 0 0 4px rgba(43,127,255,0.12);
}

/* Language switcher */
.waf-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.waf-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 850;
    font-size: 12px;
    color: #334155;
    text-decoration: none;
}
.waf-lang__btn:hover {
    background: rgba(15,23,42,0.04);
    text-decoration: none;
}
.waf-flag { font-size: 14px; line-height: 1; }
.waf-lang__txt { line-height: 1; }

/* CTA */
.waf-cta {
    background: var(--c-primary);
    color: #fff !important;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    font-size: 13px;
    text-decoration: none !important;
    border: 1px solid rgba(43,127,255,0.25);
    white-space: nowrap;
}
.waf-cta:hover { filter: brightness(0.95); }

/* ---------------------------
   4) Main layout (keep Antora’s flex, just polish)
---------------------------- */
.body {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Keep content aligned with header container */
.main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ---------------------------
   5) Sidebar (card style)
---------------------------- */
.nav, .nav-panel, .nav-menu {
    background: #fff !important;
    border: 1px solid var(--c-border) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-sm) !important;
}

.nav-menu { padding: 12px !important; }

.nav ul { list-style: none !important; padding-left: 0 !important; margin: 0 !important; }
.nav li { margin: 2px 0 !important; }

.nav a, .nav .nav-link, .nav .nav-text {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 750;
    font-size: 13px;
    color: #334155;
    text-decoration: none !important;
}
.nav a:hover, .nav .nav-link:hover {
    background: rgba(15,23,42,0.04);
}

.nav .nav-item.is-current-page > a,
.nav .nav-item.is-current-page > .nav-link,
.nav a[aria-current="page"] {
    background: rgba(43,127,255,0.12);
    border: 1px solid rgba(43,127,255,0.22);
    color: #0f172a;
}

.nav .nav-item .nav-item { margin-left: 10px; }
.nav .nav-item .nav-item > a { font-weight: 650; color: #475569; }

/* ---------------------------
   6) Doc content (boxed like marketing)
---------------------------- */
.doc { padding-top: 16px; }

.doc .content,
.doc .doc-content {
    max-width: 84ch;
}

/* The “card” behind docs content */
.doc .content {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(226,232,240,0.7);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    padding: 22px 24px;
}

/* Tables + code safe */
.doc table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.doc pre {
    max-width: 100%;
    overflow: auto;
    border-radius: var(--r-md);
}

/* ---------------------------
   7) Responsive
---------------------------- */
@media (max-width: 980px) {
    :root { --sidebar-width: 220px; }
    .waf-header__inner {
        grid-template-columns: auto 1fr auto;
        padding: 10px var(--pad-x-sm);
    }
    .waf-header__brand { grid-column: 1; }
    .waf-header__nav { grid-column: 2; }
    .waf-header__actions { grid-column: 3; }
    #search-input { width: 200px; max-width: 44vw; }
    .main { padding: 0 var(--pad-x-sm); }
    .doc .content { padding: 16px; }
}

@media (max-width: 560px) {
    .waf-header__nav { display: none; }
    .waf-cta { display: none; }
    #search-input { width: 160px; }
}

/* ==========================================================================
   WAF++ Marketing-like Footer
   ========================================================================== */

.footer { display: none !important; } /* hide default Antora footer if present */

.waf-footer {
    margin-top: 64px;
    background: #2b2f36;
    color: rgba(255,255,255,0.78);
    padding: 46px 0 26px;
}

.waf-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--pad-x, 24px);
}

.waf-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 26px;
    align-items: start;
}

.waf-footer__title {
    font-weight: 900;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.92);
    margin-bottom: 12px;
    font-size: 13px;
    text-transform: none;
}

.waf-footer__link {
    display: block;
    padding: 6px 0;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 650;
    font-size: 13px;
}
.waf-footer__link:hover {
    color: #fff;
    text-decoration: none;
}

.waf-footer__brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    justify-self: end;
    padding-left: 12px;
}

.waf-footer__logoWrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    display: grid;
    place-items: center;
}

.waf-footer__logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.25));
}

.waf-footer__brandName {
    color: rgba(255,255,255,0.92);
    font-weight: 900;
    font-size: 14px;
    line-height: 1.1;
}

.waf-footer__brandTag {
    color: rgba(255,255,255,0.65);
    font-weight: 650;
    font-size: 12px;
    margin-top: 4px;
}

.waf-footer__bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.waf-footer__small {
    font-size: 12px;
    color: rgba(255,255,255,0.60);
    font-weight: 650;
}

/* Responsive */
@media (max-width: 980px) {
    .waf-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .waf-footer__brand {
        justify-self: start;
        padding-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .waf-footer__grid {
        grid-template-columns: 1fr;
    }
    .waf-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   FULL WIDTH LANDING (only for index)
   ============================================ */

/* Remove boxed card + width restriction */
.page-role-full-landing .doc .content {
    max-width: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Allow full width usage */
.page-role-full-landing .doc .doc-content {
    max-width: none !important;
}

/* Hero spacing */
.waf-hero {
    margin: 40px 0 30px;
    max-width: 1100px;
}

.waf-hero__lead {
    font-size: 18px;
    color: #475569;
    max-width: 720px;
    line-height: 1.6;
}

/* Grid layout */
.waf-landing__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

/* Cards */
.waf-card {
    grid-column: span 6;
    background: rgba(255,255,255,0.8);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
}

.waf-card--wide {
    grid-column: span 12;
}

.waf-card h3 {
    margin-top: 0;
}

@media (max-width: 980px) {
    .waf-card {
        grid-column: span 12;
    }
}
/* ==========================================================
   LANDING: remove the inner content clamp (doc -> content)
   ========================================================== */

.page-role-full-landing .doc,
.page-role-full-landing .doc .content,
.page-role-full-landing .doc .doc-content,
.page-role-full-landing .doc .content-container {
    max-width: none !important;
    width: 100% !important;
}

/* This is the typical "boxed" culprit: margin auto + content-max */
.page-role-full-landing .doc .content,
.page-role-full-landing .doc .doc-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* If your global CSS makes the docs look like a card, disable it for landing */
.page-role-full-landing .doc .content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Ensure your landing grid can actually expand */
.page-role-full-landing .waf-landing,
.page-role-full-landing .waf-landing__wrap,
.page-role-full-landing .waf-landing__grid {
    max-width: none !important;
    width: 100% !important;
}

.page-role-full-landing .doc * {
    max-width: none !important;
}

/* ==========================================================
   FULL LANDING: override site.css clamp for .doc (46rem)
   Scope: body.full-landing (matches your DOM)
   ========================================================== */

body.full-landing article.doc,
body.full-landing .doc {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* also override the media query variant */
@media screen and (min-width: 1024px) {
    body.full-landing article.doc,
    body.full-landing .doc {
        max-width: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Optional: if inner wrapper still clamps */
body.full-landing .doc > .content,
body.full-landing .doc .content {
    max-width: none !important;
    width: 100% !important;
}

/* Landing “marketing” components */
body.full-landing .waf-hero--marketing {
    margin: 22px 0 18px;
    padding: 18px 0 10px;
}

body.full-landing .waf-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.65);
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 10px;
}

body.full-landing .waf-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--c-primary, #2b7fff);
    display: inline-block;
}

body.full-landing .waf-hero__lead {
    font-size: 16px;
    color: #475569;
    line-height: 1.7;
    max-width: 80ch;
    margin: 0 0 14px;
}

body.full-landing .waf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 14px;
}

body.full-landing .waf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(226,232,240,1);
    background: #fff;
    color: #0f172a;
    font-weight: 900;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
body.full-landing .waf-btn:hover { filter: brightness(0.98); text-decoration: none; }

body.full-landing .waf-btn--primary {
    background: var(--c-primary, #2b7fff);
    border-color: rgba(43,127,255,0.25);
    color: #fff;
}
body.full-landing .waf-btn--ghost {
    background: rgba(255,255,255,0.55);
}

body.full-landing .waf-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin-top: 10px;
}

body.full-landing .waf-metric {
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.65);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
body.full-landing .waf-metric__k { font-size: 12px; font-weight: 900; color: #334155; }
body.full-landing .waf-metric__v { font-size: 13px; font-weight: 750; color: #0f172a; margin-top: 4px; }

body.full-landing .waf-kicker { font-size: 12px; font-weight: 900; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; }
body.full-landing .waf-h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.02em; }
body.full-landing .waf-h3 { margin: 0 0 8px; }

body.full-landing .waf-muted { color: #475569; }

body.full-landing .waf-landing__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    margin: 12px 0 60px;
}
body.full-landing .waf-card { grid-column: span 6; }
body.full-landing .waf-card--wide { grid-column: span 12; }

body.full-landing .waf-pillars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
body.full-landing .waf-pillar {
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.7);
    border-radius: 16px;
    padding: 14px 14px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    display: block;
}
body.full-landing .waf-pillar:hover { transform: translateY(-1px); }
body.full-landing .waf-pillar__k { font-size: 12px; font-weight: 900; color: #64748b; }
body.full-landing .waf-pillar__t { font-size: 14px; font-weight: 950; color: #0f172a; margin-top: 6px; }
body.full-landing .waf-pillar__d { font-size: 13px; color: #475569; margin-top: 6px; line-height: 1.6; }

body.full-landing .waf-3up {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
body.full-landing .waf-miniCard {
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.65);
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
body.full-landing .waf-miniCard__t { font-weight: 950; color: #0f172a; }
body.full-landing .waf-miniCard__d { margin-top: 6px; color: #475569; line-height: 1.6; }

body.full-landing .waf-final .waf-final__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
body.full-landing .waf-final__actions { display: inline-flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1100px) {
    body.full-landing .waf-pillars { grid-template-columns: repeat(2, minmax(0,1fr)); }
    body.full-landing .waf-3up { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    body.full-landing .waf-card { grid-column: span 12; }
    body.full-landing .waf-metrics { grid-template-columns: 1fr; }
    body.full-landing .waf-final .waf-final__inner { flex-direction: column; align-items: flex-start; }
}