/* nysr.host — documentation redesign layer.
   Loaded after docs-article.css on every docs page. Same identity as the
   dashboard: radial background, 16px cards, Inter and the blue accent. */

:root {
    --docs-bg: #050506;
    --docs-surface: #0e0e11;
    --docs-surface-2: #141418;
    --docs-border: rgba(255, 255, 255, .08);
    --docs-border-strong: rgba(255, 255, 255, .16);
    --docs-text: #e8eaed;
    --docs-muted: #9aa0a6;
    --docs-dim: #6b7075;
    --docs-accent: #8ab4f8;
    --docs-green: #81c995;
    --docs-yellow: #fdd663;
    --docs-radius: 16px;
}

html { color-scheme: dark; scroll-behavior: smooth; }

body {
    background:
        radial-gradient(1100px 540px at 8% -8%, rgba(138, 180, 248, .10), transparent 60%),
        radial-gradient(900px 460px at 96% 2%, rgba(129, 201, 149, .05), transparent 58%),
        var(--docs-bg) !important;
    color: var(--docs-text);
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------ index */

.docs-main {
    max-width: 1080px;
    padding: 56px 28px 90px;
}

.docs-hero { margin-bottom: 34px; }

.docs-hero::before {
    content: "Documentation";
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--docs-muted);
}
.docs-hero::before {
    content: "● Documentation";
    letter-spacing: .09em;
}
html[lang="es"] .docs-hero::before { content: "● Documentación"; }

.docs-hero h1 {
    margin: 10px 0 12px;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 650;
    letter-spacing: -0.035em;
    color: var(--docs-text);
}

.docs-hero p {
    max-width: 740px;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--docs-muted);
}

.docs-hero .docs-note {
    max-width: 800px;
    margin-top: 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--docs-dim);
}

/* search added by docs.js */
.docs-search {
    position: relative;
    max-width: 440px;
    margin: 0 0 34px;
}
.docs-search input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 44px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    color: var(--docs-text);
    font: inherit;
    font-size: 14px;
}
.docs-search input::placeholder { color: var(--docs-dim); }
.docs-search input:focus {
    outline: none;
    border-color: rgba(138, 180, 248, .5);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, .1);
}
.docs-search .material-symbols-outlined {
    position: absolute;
    left: 14px;
    top: 13px;
    font-size: 20px;
    color: var(--docs-dim);
    pointer-events: none;
}

.docs-empty {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--docs-dim);
    font-size: 14px;
    border: 1px dashed var(--docs-border-strong);
    border-radius: var(--docs-radius);
}
.docs-empty.on { display: block; }

.docs-group { margin-bottom: 36px; }

.docs-group h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--docs-muted);
}
.docs-group h2 .material-symbols-outlined {
    font-size: 16px;
    color: var(--docs-dim);
}

.docs-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.docs-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent), var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    text-decoration: none;
    color: var(--docs-text);
    transition: border-color .18s, transform .18s, box-shadow .18s, background .18s;
    min-width: 0;
}
.docs-card:hover {
    border-color: var(--docs-border-strong);
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .38);
}
.docs-card .dicon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(138, 180, 248, .1);
    border: 0;
    color: var(--docs-accent);
}
.docs-card .dicon .material-symbols-outlined { font-size: 21px; }
.docs-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}
.docs-card strong + span {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--docs-muted);
}
.docs-card .arrow {
    margin-left: auto;
    color: var(--docs-dim);
    font-size: 18px;
    flex: 0 0 auto;
    transition: color .18s, transform .18s;
}
.docs-card:hover .arrow { color: var(--docs-text); transform: translateX(3px); }

/* FAQ block on the index */
.docs-group[data-seo-faq] {
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    padding: 24px 26px;
    margin-bottom: 0;
}
.docs-group[data-seo-faq] h2 {
    display: block;
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--docs-text);
}
.docs-group[data-seo-faq] h3 {
    margin: 20px 0 6px !important;
    font-size: 0.95rem !important;
    font-weight: 600;
    color: var(--docs-text);
}
.docs-group[data-seo-faq] p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--docs-muted);
}

/* ------------------------------------------------ article */

.docs-article-layout {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 28px 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 56px;
    align-items: start;
    flex: 1 0 auto;
}

.docs-article-layout .article-main {
    max-width: none;
    margin: 0;
    padding: 0;
    width: auto;
    min-width: 0;
}

.article-main h1 {
    margin-bottom: 14px;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 650;
    letter-spacing: -0.035em;
    color: var(--docs-text);
}

.crumbs {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--docs-border);
    background: rgba(255, 255, 255, .03);
    font-size: 11.5px;
    color: var(--docs-dim);
}
.crumbs a { color: var(--docs-muted); }
.crumbs a:hover { color: var(--docs-text); text-decoration: none; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 11.5px;
    color: var(--docs-muted);
}
.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--docs-border);
    background: var(--docs-surface);
}
.article-meta .material-symbols-outlined { font-size: 14px; color: var(--docs-dim); }

.article-main p,
.article-main ul,
.article-main ol {
    color: #b9bdc4;
    font-size: 15px;
    line-height: 1.75;
}
.article-main p strong,
.article-main li strong { color: var(--docs-text); }
.article-main a { color: var(--docs-accent); text-underline-offset: 2px; }

.article-main h2 {
    margin: 42px 0 14px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--docs-text);
    scroll-margin-top: 92px;
}
.article-main h2 .material-symbols-outlined { color: var(--docs-dim); }
.article-main h2 .step {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(138, 180, 248, .12);
    border: 1px solid rgba(138, 180, 248, .24);
    color: var(--docs-accent);
    font-size: 13px;
    font-weight: 700;
}

.article-main h3 {
    color: var(--docs-text);
}

.article-main code.inline {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--docs-border);
    color: var(--docs-text);
    font-size: .84em;
}

/* callouts */
.callout {
    gap: 12px;
    padding: 15px 17px;
    margin: 18px 0 20px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.65;
}
.callout .material-symbols-outlined {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 17px;
    margin-top: 0;
    flex: 0 0 auto;
}
.callout.tip { background: rgba(129, 201, 149, .07); border: 1px solid rgba(129, 201, 149, .22); }
.callout.tip .material-symbols-outlined { background: rgba(129, 201, 149, .12); color: var(--docs-green); }
.callout.warn { background: rgba(253, 214, 99, .06); border: 1px solid rgba(253, 214, 99, .22); }
.callout.warn .material-symbols-outlined { background: rgba(253, 214, 99, .12); color: var(--docs-yellow); }
.callout p { margin: 0; font-size: 14px; color: #c9cdd3; }

/* code blocks */
.codeblock {
    margin: 16px 0 22px;
    border-radius: 14px;
    border: 1px solid var(--docs-border);
    background: #09090c;
    overflow: hidden;
}
.codeblock pre {
    padding: 18px 20px;
    font-size: 13px;
    line-height: 1.65;
    color: #d7dbe0;
}
.codeblock button {
    top: 10px;
    right: 10px;
    padding: 4px 11px;
    border-radius: 8px;
    border: 1px solid var(--docs-border);
    background: var(--docs-surface-2);
    color: var(--docs-muted);
    font-size: 11.5px;
    font-weight: 600;
    transition: color .15s, border-color .15s, background .15s;
}
.codeblock button:hover {
    color: var(--docs-text);
    border-color: var(--docs-border-strong);
    background: rgba(255, 255, 255, .07);
}
.codeblock button.copied { color: var(--docs-green); border-color: rgba(129, 201, 149, .4); }

/* screenshots */
.docs-shot,
.docs-image-link img {
    border-radius: 14px;
    border: 1px solid var(--docs-border);
    background: var(--docs-surface);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .35);
}
.docs-image-link { display: block; }
.docs-image-link:hover img { border-color: var(--docs-border-strong); }

/* FAQ + related links */
.article-faq {
    margin-top: 40px;
    padding: 22px 24px 24px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
}
.article-faq > h2 {
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--docs-border);
    font-size: 18px;
}
.article-faq h3 { font-size: 14px; }
.article-faq h3::before {
    background: rgba(138, 180, 248, .12);
    border: 1px solid rgba(138, 180, 248, .3);
    color: var(--docs-accent);
}
.article-faq p { font-size: 13.5px; color: var(--docs-muted); }

.article-main .docs-links {
    gap: 10px;
    margin-top: 16px;
}
.article-main .docs-links a {
    padding: 12px 14px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--docs-text);
    transition: border-color .15s, background .15s;
}
.article-main .docs-links a:hover {
    border-color: var(--docs-border-strong);
    background: rgba(255, 255, 255, .045);
}

/* CTA + footer nav */
.article-cta {
    margin-top: 44px;
    padding: 28px;
    border-radius: var(--docs-radius);
    border: 1px solid var(--docs-border);
    background:
        radial-gradient(520px 220px at 50% -40%, rgba(138, 180, 248, .16), transparent 70%),
        var(--docs-surface);
    text-align: center;
}
.article-cta h3 { margin-bottom: 6px; font-size: 20px; letter-spacing: -0.02em; }
.article-cta p { margin-bottom: 18px; font-size: 13.5px; color: var(--docs-muted); }
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    background: var(--docs-accent);
    border: 1px solid var(--docs-accent);
    color: #04121f !important;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: background .15s;
}
.cta-button:hover { background: #a8c7fa; color: #04121f !important; }

.article-nav a { color: var(--docs-muted); font-size: 13px; }
.article-nav a:hover { color: var(--docs-text); }

/* table of contents */
.docs-toc {
    position: sticky;
    top: 92px;
    font-size: 12.5px;
    min-width: 0;
}
.docs-toc-label {
    display: block;
    margin-bottom: 8px;
    padding-left: 13px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--docs-dim);
}
.docs-toc nav {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--docs-border);
    max-height: calc(100vh - 132px);
    overflow-y: auto;
    scrollbar-width: thin;
}
.docs-toc a {
    padding: 6px 0 6px 13px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--docs-muted);
    text-decoration: none;
    line-height: 1.45;
    transition: color .15s, border-color .15s;
}
.docs-toc a:hover { color: var(--docs-text); }
.docs-toc a.on { color: var(--docs-text); border-left-color: var(--docs-accent); }

/* reading progress */
#docs-progress {
    height: 2px;
    background: var(--docs-accent);
    box-shadow: 0 0 12px rgba(138, 180, 248, .5);
}

/* image lightbox (docs-shots.js) */
.docs-image-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 28px;
    border: 0;
    background: rgba(3, 3, 4, .88);
    backdrop-filter: blur(6px);
}
.docs-image-dialog[open] { display: grid; place-items: center; }
.docs-image-dialog img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 14px;
    border: 1px solid var(--docs-border-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.docs-image-close {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--docs-border-strong);
    background: var(--docs-surface);
    color: var(--docs-text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.docs-image-close:hover { background: rgba(255, 255, 255, .08); }

/* ------------------------------------------------ responsive */

@media (max-width: 1000px) {
    .docs-article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 780px; }
    .docs-toc { display: none; }
}

@media (max-width: 760px) {
    .docs-main { padding: 38px 18px 70px; }
    .docs-hero h1 { font-size: 33px; }
    .docs-hero p { font-size: 14.5px; }
    .docs-list { grid-template-columns: 1fr; }
    .docs-group[data-seo-faq] { padding: 20px; }
    .docs-article-layout { padding: 34px 18px 70px; }
    .article-main h1 { font-size: 32px; }
    .article-main h2 { font-size: 21px; margin-top: 34px; }
    .article-main p, .article-main ul, .article-main ol { font-size: 14.5px; }
    .article-cta { padding: 22px; }
    .docs-search { max-width: none; }
}
