:root {
    --nd-primary: #009ef7;
    --nd-text: #181c32;
    --nd-muted: #7e8299;
    --nd-bg: #f5f8fa;
    --nd-card: #ffffff;
    --nd-border: #eff2f5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--nd-text);
    background: var(--nd-bg);
    line-height: 1.65;
}

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

.nd-container { max-width: 920px; margin: 0 auto; padding: 0 1.25rem; }

.nd-header {
    background: var(--nd-card);
    border-bottom: 1px solid var(--nd-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.nd-header__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--nd-text);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.nd-brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.nd-brand:hover { text-decoration: none; }

.nd-brand__logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(100%, 280px);
    object-fit: contain;
}

.nd-main { padding: 2.5rem 0 4rem; }

.nd-page-title, .nd-article__title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 .75rem;
    line-height: 1.2;
}

.nd-lead { color: var(--nd-muted); margin: 0 0 2rem; }

.nd-breadcrumb { color: var(--nd-muted); font-size: .875rem; margin-bottom: .5rem; }

.nd-article__title--legal {
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(1.15rem, 2.8vw, 1.55rem);
    letter-spacing: 0.02em;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.nd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--nd-muted);
    font-size: .875rem;
    margin-bottom: 1.75rem;
}

.nd-meta__sep { opacity: 0.5; }

.nd-doc-heading__institution {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--nd-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1.5rem;
}

.nd-content h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d4e89;
    border-bottom: 2px solid var(--nd-border);
    padding-bottom: 0.5rem;
    text-transform: none;
}

.nd-content p {
    margin: 0 0 1rem;
    text-align: justify;
}

.nd-content ul,
.nd-content ol {
    margin: 0 0 1rem 1.25rem;
    padding-left: 0.25rem;
}

.nd-content li {
    margin-bottom: 0.5rem;
}

.nd-content h1, .nd-content h3 { margin-top: 1.5rem; margin-bottom: .75rem; }

.nd-content blockquote {
    margin: 1.25rem 0;
    padding: .75rem 1rem;
    border-left: 4px solid var(--nd-primary);
    background: rgba(0, 158, 247, 0.06);
    border-radius: 0 .5rem .5rem 0;
}

.nd-article {
    background: var(--nd-card);
    border: 1px solid var(--nd-border);
    border-radius: 1rem;
    padding: 2rem;
}

.nd-empty { color: var(--nd-muted); padding: 2rem 0; }

.nd-doc-list { list-style: none; padding: 0; margin: 0; }
.nd-doc-list li { margin-bottom: .75rem; }
.nd-doc-list a {
    display: block;
    background: var(--nd-card);
    border: 1px solid var(--nd-border);
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    color: var(--nd-text);
    font-weight: 600;
}
.nd-doc-list a:hover { border-color: var(--nd-primary); text-decoration: none; }

.nd-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.nd-cat-card {
    display: block;
    background: var(--nd-card);
    border: 1px solid var(--nd-border);
    border-radius: 1rem;
    padding: 1.25rem;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.nd-cat-card:hover {
    border-color: var(--nd-primary);
    box-shadow: 0 8px 24px rgba(24, 28, 50, 0.06);
    text-decoration: none;
}
.nd-cat-card__title { font-weight: 700; margin-bottom: .35rem; }
.nd-cat-card__desc { color: var(--nd-muted); font-size: .9rem; margin-bottom: .75rem; }
.nd-cat-card__count { font-size: .8rem; color: var(--nd-primary); font-weight: 600; }

.nd-footer {
    border-top: 1px solid var(--nd-border);
    padding: 1.5rem 0;
    color: var(--nd-muted);
    font-size: .875rem;
    background: var(--nd-card);
}

.nd-footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nd-footer__text {
    color: var(--nd-muted);
    font-weight: 500;
}

.nd-footer__link {
    color: var(--nd-text);
    font-weight: 600;
    text-decoration: none;
}

.nd-footer__link:hover {
    color: var(--nd-primary);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .nd-article { padding: 1.25rem; }
}

/* Vista embebida en iframe (p. ej. wizard idVerification) */
body.nd-embed {
    background: #fff;
}

body.nd-embed .nd-main--embed {
    padding: 0.75rem 0 1rem;
    max-width: 100%;
}

body.nd-embed .nd-article--embed {
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    background: transparent;
    box-shadow: none;
}

body.nd-embed .nd-content h2 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
}

body.nd-embed .nd-content p {
    font-size: 0.925rem;
}
