/* ==========================================================================
   RenderBuddy website: "Owl" design system
   Same palette and feel as the mobile app and the desktop Agent:
   cream background, navy cards, blue/cyan accents, amber highlights, Nunito.
   Day by default, Night follows the system (or the header toggle).
   ========================================================================== */

:root {
    --cream: #FDECD2;
    --cream-2: #F8E1BE;
    --cream-3: #FAEEDA;
    --navy: #1F2151;
    --navy-deep: #171B3D;
    --navy-up: #262A63;
    --blue: #2B5DA2;
    --blue-2: #4290D2;
    --cyan: #3DB8F1;
    --ice: #7DE9F6;
    --amber: #E8AC6D;
    --beak: #ECA646;
    --green: #3DDC97;
    --coral: #FF6B6B;
    --ue: #9B4DCA;
    --houdini: #FF6B00;
    --blender: #E87D0D;

    /* Day theme */
    --bg: var(--cream);
    --bg-2: var(--cream-2);
    --surface: #FFF7EB;
    --surface-2: #FBEBD3;
    --ink: #1F1F3C;
    --ink-2: rgba(31, 31, 60, 0.74);
    --muted: rgba(31, 31, 60, 0.56);
    --line: rgba(31, 31, 60, 0.12);
    --line-2: rgba(31, 31, 60, 0.2);
    --link: var(--blue);
    --card: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    --on-card: var(--cream-3);
    --on-card-2: rgba(250, 238, 218, 0.7);
    --code-bg: rgba(31, 33, 81, 0.07);
    --shadow-sm: 0 1px 2px rgba(31, 33, 81, 0.08), 0 4px 12px rgba(31, 33, 81, 0.06);
    --shadow: 0 2px 6px rgba(31, 33, 81, 0.08), 0 18px 40px -12px rgba(31, 33, 81, 0.28);
    --disabled-bg: rgba(31, 31, 60, 0.08);
    --disabled-ink: rgba(31, 31, 60, 0.42);
    --header-bg: rgba(253, 236, 210, 0.94);

    --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    --r-sm: 10px;
    --r: 18px;
    --r-lg: 28px;
    --wrap: 1120px;
    --gutter: 24px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #171B3D;
        --bg-2: #12152F;
        --surface: #1F2151;
        --surface-2: #262A63;
        --ink: #FAEEDA;
        --ink-2: rgba(250, 238, 218, 0.78);
        --muted: rgba(250, 238, 218, 0.56);
        --line: rgba(250, 238, 218, 0.1);
        --line-2: rgba(250, 238, 218, 0.18);
        --link: var(--cyan);
        --card: linear-gradient(160deg, #2A2E6B 0%, var(--navy-up) 100%);
        --code-bg: rgba(250, 238, 218, 0.08);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
        --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px -12px rgba(0, 0, 0, 0.55);
        --disabled-bg: rgba(250, 238, 218, 0.08);
        --disabled-ink: rgba(250, 238, 218, 0.4);
        --header-bg: rgba(23, 27, 61, 0.94);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #171B3D;
    --bg-2: #12152F;
    --surface: #1F2151;
    --surface-2: #262A63;
    --ink: #FAEEDA;
    --ink-2: rgba(250, 238, 218, 0.78);
    --muted: rgba(250, 238, 218, 0.56);
    --line: rgba(250, 238, 218, 0.1);
    --line-2: rgba(250, 238, 218, 0.18);
    --link: var(--cyan);
    --card: linear-gradient(160deg, #2A2E6B 0%, var(--navy-up) 100%);
    --code-bg: rgba(250, 238, 218, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 40px -12px rgba(0, 0, 0, 0.55);
    --disabled-bg: rgba(250, 238, 218, 0.08);
    --disabled-ink: rgba(250, 238, 218, 0.4);
    --header-bg: rgba(23, 27, 61, 0.94);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed;
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.12em 0.42em; border-radius: 6px; overflow-wrap: anywhere; }
kbd {
    display: inline-block; padding: 0.1em 0.5em; border-radius: 6px;
    border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink);
}
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
    display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
:root[data-theme="dark"] .eyebrow { color: var(--cyan); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: var(--cyan); } }
.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 38em; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand .beta {
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
    color: var(--ink-2); font-weight: 700; font-size: 0.97rem; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--ink); background: var(--disabled-bg); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--disabled-bg); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--disabled-bg); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-btn { display: none; }

@media (max-width: 820px) {
    .menu-btn { display: inline-grid; }
    .nav {
        position: absolute; top: 72px; left: 0; right: 0; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 10px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px; }
    .header-actions { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0;
    font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { background: var(--disabled-bg); }
.btn-soon, .btn[aria-disabled="true"] {
    background: var(--disabled-bg); color: var(--disabled-ink); cursor: not-allowed; box-shadow: none;
}
.btn-soon:hover { transform: none; }
.btn-soon .soon {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 999px; background: var(--disabled-bg);
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.93rem; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Device frames ---------- */
.phone {
    position: relative; width: 300px; max-width: 100%;
    padding: 10px; border-radius: 46px;
    background: #0E1030; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone img { border-radius: 36px; width: 100%; }
.phone.small { width: 250px; border-radius: 40px; padding: 8px; }
.phone.small img { border-radius: 32px; }

.window {
    width: 340px; max-width: 100%; border-radius: 14px; overflow: hidden;
    background: var(--cream); box-shadow: var(--shadow), 0 0 0 1px rgba(31, 33, 81, 0.12);
}
.window-bar {
    display: flex; align-items: center; gap: 8px; height: 34px; padding-left: 12px;
    background: #F3DDBA; color: #1F1F3C; font-size: 0.78rem; font-weight: 700;
}
.window-bar img { width: 16px; height: 16px; }
.window-bar .controls { margin-left: auto; display: flex; height: 100%; }
.window-bar .controls span { width: 40px; display: grid; place-items: center; }
.window-bar .controls svg { width: 10px; height: 10px; stroke: #1F1F3C; stroke-width: 1.2; fill: none; }
.window.night .window-bar { background: #12152F; color: #FAEEDA; }
.window.night .window-bar .controls svg { stroke: #FAEEDA; }

.shot { border-radius: var(--r); box-shadow: var(--shadow); }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 28px; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); font-weight: 600; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 560px; }
.hero-visual .window { position: absolute; left: 0; top: 30px; width: 300px; transform: rotate(-2deg); }
.hero-visual .phone { position: relative; margin-left: 240px; width: 280px; z-index: 2; }
@media (max-width: 980px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-visual { min-height: 0; justify-content: center; padding-top: 12px; }
    .hero-visual .window { position: relative; top: 0; width: 230px; transform: rotate(-2deg) translateX(30px); }
    .hero-visual .phone { margin-left: -40px; width: 230px; margin-top: 60px; }
}
@media (max-width: 480px) {
    .hero-visual .window { width: 58%; transform: rotate(-2deg) translateX(14px); }
    .hero-visual .phone { width: 52%; margin-left: -22%; margin-top: 48px; }
}

/* Compatibility strip */
.compat { padding: 0 0 24px; }
.compat-row {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px;
    padding: 22px 28px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm);
}
.compat-item { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }
.compat-item img { width: 26px; height: 26px; object-fit: contain; }
.compat-item small { color: var(--muted); font-weight: 600; }
.ue-logo-dark { display: none; }
:root[data-theme="dark"] .ue-logo-light { display: none; }
:root[data-theme="dark"] .ue-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ue-logo-light { display: none; }
    :root:not([data-theme="light"]) .ue-logo-dark { display: block; }
}

/* Steps (home) */
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step-card {
    background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}
.step-card .num {
    width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: var(--card); color: var(--on-card); font-weight: 800; margin-bottom: 16px;
}
.step-card p { color: var(--ink-2); margin-bottom: 20px; }
.step-card .visual {
    margin-top: auto; border-radius: var(--r); overflow: hidden; background: var(--card);
    height: 170px; display: grid; place-items: center;
}
.step-card .visual.cream { background: var(--cream-2); }
.step-card .visual img.qr { width: 84%; object-fit: cover; object-position: 50% 68%; height: 170px; }
.step-card .visual img.push { width: 92%; border-radius: 16px; }
.dcc-stack { display: flex; align-items: center; gap: 14px; }
.dcc-stack .tile {
    width: 58px; height: 58px; border-radius: 16px; background: rgba(250, 238, 218, 0.08);
    display: grid; place-items: center;
}
.dcc-stack .tile img { width: 34px; height: 34px; object-fit: contain; }
.dcc-stack .arrow { color: var(--on-card-2); }
.dcc-stack .owl { width: 64px; height: 64px; }
@media (max-width: 900px) { .steps-3 { grid-template-columns: 1fr; } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feature p { color: var(--ink-2); }
.feature-media .card-shot { width: 440px; max-width: 100%; border-radius: 26px; box-shadow: var(--shadow); }
@media (max-width: 860px) {
    .feature { grid-template-columns: 1fr; gap: 28px; }
    .feature.flip .feature-media { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
    content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 6px;
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171B3D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks strong { color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 0.92rem; color: var(--ink-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.grey { background: #8A8BA3; }

/* Agent showcase */
.agent-show { display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; }
.agent-show .window { width: 300px; }
.agent-show .window.night { margin-top: 70px; }
@media (max-width: 980px) {
    .agent-show { grid-template-columns: 1fr 1fr; }
    .agent-show > div:first-child { grid-column: 1 / -1; }
    .agent-show .window { width: 100%; }
    .agent-show .window.night { margin-top: 40px; }
}

/* Download panel */
.download {
    background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.dl-row {
    display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; padding: 24px 28px;
}
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-icon {
    width: 56px; height: 56px; border-radius: 16px; background: var(--card); display: grid; place-items: center;
}
.dl-icon img { width: 34px; height: 34px; object-fit: contain; }
.dl-icon svg { width: 28px; height: 28px; color: var(--on-card); }
.dl-row h3 { margin: 0 0 2px; font-size: 1.1rem; }
.dl-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.dl-row p span { white-space: nowrap; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.download-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) {
    .dl-row { grid-template-columns: 56px 1fr; padding: 22px; }
    .dl-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
    font-weight: 800; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
    border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg);
    transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--ink-2); padding-bottom: 8px; margin-top: -4px; }

/* Callout band */
.band {
    background: var(--card); color: var(--on-card); border-radius: var(--r-lg); padding: 40px;
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap; box-shadow: var(--shadow);
}
.band img { width: 84px; height: 84px; }
.band h2 { font-size: 1.6rem; margin-bottom: 6px; }
.band p { color: var(--on-card-2); margin: 0; }
.band .btn { margin-left: auto; }
.band .btn-ghost { color: var(--on-card); box-shadow: inset 0 0 0 1.5px rgba(250, 238, 218, 0.3); }
.band .btn-ghost:hover { background: rgba(250, 238, 218, 0.08); }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 40px; margin-top: 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--ink-2); font-weight: 600; padding: 3px 0; }
.footer-grid p { color: var(--muted); font-size: 0.95rem; max-width: 30em; margin-top: 12px; }
.footer-legal { margin-top: 40px; font-size: 0.82rem; color: var(--muted); }
.footer-legal p { margin: 0 0 4px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ==========================================================================
   Documentation
   ========================================================================== */

/* Hub */
.docs-hero { padding: 64px 0 24px; text-align: center; }
.docs-hero .lead { margin: 0 auto; }
.hub { padding: 32px 0 72px; }
.hub-label {
    text-align: center; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 14px;
}
.hub-row { display: grid; gap: 20px; }
.hub-row.three { grid-template-columns: repeat(3, 1fr); }
.hub-row.one { grid-template-columns: minmax(0, 420px); justify-content: center; }
.hub-card {
    display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--r-lg);
    background: var(--card); color: var(--on-card); box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-top: 4px solid var(--accent, var(--cyan));
}
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.hub-card .icon {
    width: 52px; height: 52px; flex: none; border-radius: 15px; background: rgba(250, 238, 218, 0.08);
    display: grid; place-items: center;
}
.hub-card .icon img { width: 32px; height: 32px; object-fit: contain; }
.hub-card .icon img.owl { width: 46px; height: 46px; }
.hub-card h2 { font-size: 1.15rem; margin: 2px 0 4px; color: var(--on-card); }
.hub-card p { margin: 0 0 10px; color: var(--on-card-2); font-size: 0.95rem; line-height: 1.5; }
.hub-card .go { font-weight: 800; font-size: 0.9rem; color: var(--ice); }
.hub-card .ver { font-size: 0.8rem; font-weight: 700; color: var(--on-card-2); }
.hub-card.ue { --accent: var(--ue); }
.hub-card.houdini { --accent: var(--houdini); }
.hub-card.blender { --accent: var(--blender); }
.hub-card.agent { --accent: var(--green); }
.hub-card.app { --accent: var(--cyan); }

.hub-link { position: relative; height: 84px; }
.hub-link svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-link path {
    fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round;
    animation: flow 1.6s linear infinite;
}
.hub-link .tag {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    background: var(--bg); color: var(--muted); font-size: 0.78rem; font-weight: 700;
    padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap;
}
.hub-link.single path { animation-duration: 1.2s; }
@keyframes flow { to { stroke-dashoffset: -18; } }
@media (max-width: 860px) {
    .hub-row.three { grid-template-columns: 1fr; }
    .hub-link svg .branch { display: none; }
}

.quickstart {
    margin-top: 64px; background: var(--surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm);
}
.quickstart h2 { font-size: 1.4rem; }
.quickstart ol { margin: 0; padding: 0; list-style: none; counter-reset: q; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quickstart li { counter-increment: q; color: var(--ink-2); font-size: 0.97rem; }
.quickstart li::before {
    content: counter(q); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
    background: var(--card); color: var(--on-card); font-weight: 800; margin-bottom: 10px; font-size: 0.9rem;
}
.quickstart li strong { display: block; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 860px) { .quickstart ol { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .quickstart ol { grid-template-columns: 1fr; } }

/* Doc pages */
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 80px; }
.doc-nav { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 0.95rem; }
.doc-nav h4 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.doc-nav ul { list-style: none; margin: 0 0 22px; padding: 0; }
.doc-nav a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 700; padding: 7px 10px; border-radius: 10px; }
.doc-nav a img { width: 20px; height: 20px; object-fit: contain; }
.doc-nav a:hover { background: var(--disabled-bg); text-decoration: none; color: var(--ink); }
.doc-nav a[aria-current="page"] { background: var(--card); color: var(--on-card); }
.doc-nav .toc a { font-weight: 600; font-size: 0.9rem; padding: 5px 10px 5px 14px; border-left: 2px solid var(--line); border-radius: 0; }
.doc-nav .toc a.active { border-left-color: var(--cyan); color: var(--ink); }
.doc-nav details summary { display: none; }

@media (max-width: 960px) {
    .doc-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
    .doc-nav { position: static; max-height: none; background: var(--surface); border-radius: var(--r); padding: 6px 14px; box-shadow: var(--shadow-sm); }
    .doc-nav details summary {
        display: flex; justify-content: space-between; align-items: center; cursor: pointer;
        font-weight: 800; padding: 10px 0; list-style: none;
    }
    .doc-nav details summary::-webkit-details-marker { display: none; }
    .doc-nav details summary::after { content: "▾"; color: var(--muted); }
    .doc-nav details[open] summary::after { content: "▴"; }
    .doc-nav .toc { display: none; }
}

.doc { min-width: 0; max-width: 780px; }
.doc-head { display: flex; gap: 20px; align-items: center; margin-bottom: 10px; }
.doc-head .icon {
    width: 68px; height: 68px; flex: none; border-radius: 20px; background: var(--card);
    display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.doc-head .icon img { width: 42px; height: 42px; object-fit: contain; }
.doc-head .icon img.owl { width: 60px; height: 60px; }
.doc-head h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin: 0; }
.doc > .lead { margin: 14px 0 26px; }
.doc h2 { font-size: 1.65rem; margin-top: 56px; padding-top: 8px; }
.doc h3 { margin-top: 30px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc ul:not([class]), .doc ol:not([class]) { padding-left: 1.3em; }
.doc li + li { margin-top: 4px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.facts li {
    font-size: 0.86rem; font-weight: 700; color: var(--ink-2); background: var(--surface);
    border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.doc .facts li + li { margin-top: 0; }

/* Numbered steps with optional figure */
.steps { list-style: none; margin: 18px 0; padding: 0; counter-reset: st; }
.steps > li {
    counter-increment: st; position: relative; padding: 0 0 26px 56px; margin: 0;
}
.steps > li::before {
    content: counter(st); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 12px;
    display: grid; place-items: center; background: var(--card); color: var(--on-card); font-weight: 800;
}
.steps > li::after {
    content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 2px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps > li > strong:first-child { display: block; color: var(--ink); font-size: 1.07rem; margin-bottom: 2px; }
.steps > li p { margin: 0 0 8px; }

.figure { margin: 22px 0 28px; }
.figure .frame { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 28px; border-radius: var(--r-lg); background: var(--surface-2); }
.figure figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.figure .window { width: 300px; }
.figure .phone { width: 250px; }
.figure img.card-shot { width: 420px; max-width: 100%; border-radius: 24px; box-shadow: var(--shadow); }

.callout {
    display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; margin: 20px 0;
    background: var(--surface); border-left: 4px solid var(--cyan); box-shadow: var(--shadow-sm);
}
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--cyan); }
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }
.callout.tip { border-left-color: var(--green); }
.callout.tip svg { color: var(--green); }
.callout.warn { border-left-color: var(--beak); }
.callout.warn svg { color: var(--beak); }

.table-wrap { overflow-x: auto; margin: 18px 0 24px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); }
td { color: var(--ink-2); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }

pre {
    background: var(--navy-deep); color: var(--cream-3); padding: 16px 18px; border-radius: 14px;
    overflow-x: auto; font-size: 0.88rem; line-height: 1.6; margin: 12px 0 18px;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

.state-list { display: grid; gap: 10px; margin: 16px 0 24px; padding: 0; list-style: none; }
.state-list li { display: flex; gap: 12px; align-items: baseline; margin: 0; }
.state-list .dot { transform: translateY(1px); }

.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.mini-card { background: var(--surface); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.mini-card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.mini-card p { margin: 0; font-size: 0.95rem; }
@media (max-width: 640px) { .cards-2 { grid-template-columns: 1fr; } }

.doc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-pager a { display: flex; flex-direction: column; padding: 14px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; }
.doc-pager a span { font-size: 0.78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.doc-pager a:hover { text-decoration: none; box-shadow: var(--shadow); }
.doc-pager .next { margin-left: auto; text-align: right; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hub-link path { animation: none; }
    * { transition: none !important; }
}

/* ---------- Small-screen and detail fixes ---------- */
.window-bar { white-space: nowrap; overflow: hidden; }
.footer-grid a.brand { display: inline-flex; padding: 0; color: var(--ink); }
.doc-nav a img { width: 24px; height: 24px; padding: 3px; border-radius: 7px; background: var(--navy); }
.hub-card .body { display: block; }
@media (max-width: 480px) {
    .brand .beta { display: none; }
    .site-header .wrap { gap: 12px; }
    .dcc-stack { gap: 8px; }
    .dcc-stack .tile { width: 46px; height: 46px; border-radius: 13px; }
    .dcc-stack .tile img { width: 26px; height: 26px; }
    .dcc-stack .owl { width: 52px; height: 52px; }
    .window-bar { font-size: 0.68rem; height: 28px; }
    .window-bar .controls span { width: 26px; }
    section { padding: 56px 0; }
    .band { padding: 28px; }
    .band .btn { margin-left: 0; }
}
