/* Roboto autoalojado (variable, 100-900). Apache License 2.0.
   Dos subconjuntos: latin-ext cubre acentos y ñ; el navegador
   descarga solo el que necesite segun unicode-range. */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --acc: #c0392b;
    --acc-dark: #8e2a1f;
    --ink: #1c1c1e;
    --muted: #5f5f66;
    --line: #e5e5ea;
    --bg: #ffffff;
    --bg-alt: #f6f6f8;
    --dark: #26262b;
    --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.wrap-narrow {
    max-width: 1280px;
}

/* ---------- Cabecera ---------- */
.site-header {
    /*border-bottom: 1px solid var(--line);*/
    position: sticky;
    top: 0;
    background: #16375c;
    z-index: 20;
    color:#fff;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand img {
    height: 36px;
    width: auto;
}
.nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    font-size: 15px;
}
.nav ul a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav ul a:hover {
    border-bottom-color: var(--acc);
    color: var(--acc);
}

/* ---------- Hero ---------- */
.hero {
    background: var(--bg-alt);
    padding: 64px 0;
    border-bottom: 1px solid var(--line);
}
.hero.hero-sm {
    padding: 40px 0;
}
.hero h1 {
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 20ch;
}
.hero p {
    color: var(--muted);
    margin-top: 12px;
    max-width: 60ch;
}
/* Hero con imagen: dos columnas en escritorio, apiladas en movil. */
.hero-media {
    padding: 48px 0;
}
.hero-media-grid {
    display: grid;
    gap: 32px;
    align-items: center;
}
.hero-media-text h1 {
    max-width: 16ch;
}
.hero-media-fig {
    margin: 0;
}
.hero-media-fig img {
    display: block;
    width: 100%;
    height: auto;
    /* contain, no cover: es un banner con texto y cover le recortaria los bordes. */
    aspect-ratio: 16 / 10;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--line);
}
@media (min-width: 860px) {
    .hero-media-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

.crumb {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}
.crumb a:hover {
    color: var(--acc);
}

/* ---------- Rejilla de posts ---------- */
main {
    padding: 56px 0;
}
.sec-title {
    font-size: 22px;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    margin-top: 24px;
}
/* Rejilla de tarjetas.
   .grid        -> 3 por linea (valor por defecto, lo usan las categorias)
   .grid.grid-4 -> 4 por linea
   Ambas bajan a 2 en tableta y a 1 en movil. */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .grid.grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .grid,
    .grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .grid,
    .grid.grid-4 {
        grid-template-columns: 1fr;
    }
}
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition:
        box-shadow 0.18s,
        transform 0.18s;
}
.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}
.card-img img {
    /*aspect-ratio: 16/9;*/
    object-fit: cover;
    width: 100%;
}
.card-body {
    padding: 18px;
}
.cat {
    display: inline-block;
    background: var(--acc);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}
.card h3 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #16375c;
}
.card h3 a:hover {
    color: var(--acc);
}
.card p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 12px;
}
.more {
    color: var(--acc);
    font-weight: 600;
}

/* ---------- Post ---------- */
.post {
    padding: 48px 0 64px;
}
.post h1 {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 28px;
}
.post-hero {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 32px;
}
.post p {
    font-size: 18px;
    line-height: 1.75;
    margin-bottom: 20px;
}
.post .lead {
    font-size: 20px;
    color: #333;
}
.post h2 {
    font-family: var(--font);
    font-size: 22px;
    margin: 32px 0 12px;
    letter-spacing: -0.01em;
}

/* ---------- Bloques de codigo ---------- */
.codigo {
    margin: 32px 0;
}
.codigo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #2b2b31;
    color: #e8e8ed;
    border-radius: 8px 8px 0 0;
    padding: 10px 14px;
    font-size: 13px;
}
.codigo-head .lang {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 11px;
    color: #a8a8b3;
}
.codigo-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #3a3a42;
    color: #e8e8ed;
    border: 1px solid #4c4c56;
    border-radius: 5px;
    padding: 5px 11px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.codigo-copy:hover {
    background: #4a4a54;
}
.codigo-copy:focus-visible {
    outline: 2px solid var(--acc);
    outline-offset: 2px;
}
.codigo-copy.ok {
    background: #1f6f43;
    border-color: #2a8a55;
    color: #fff;
}
.codigo pre {
    margin: 0;
    background: #1e1e24;
    border-radius: 0 0 8px 8px;
    padding: 18px;
    overflow-x: auto;
}
.codigo code {
    display: block;
    background: none;
    padding: 0;
    color: #e4e4ea;
    font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.65;
    white-space: pre;
}

/* ---------- Aviso / nota ---------- */
.nota {
    border-left: 3px solid var(--acc);
    background: var(--bg-alt);
    border-radius: 0 6px 6px 0;
    padding: 18px 20px;
    margin: 32px 0;
}
.nota h3 {
    font-size: 15px;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.nota p {
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 10px;
}
.nota p:last-child {
    margin-bottom: 0;
}
/* Variante para requisitos previos: sin esto el proyecto no compila */
.nota-aviso {
    border-left-color: #c99000;
    background: #fdf8ec;
}

/* ---------- Listas dentro de un post ---------- */
.post .lista {
    margin: 0 0 20px;
    padding-left: 22px;
    display: grid;
    gap: 8px;
}
.post .lista li {
    font-size: 16.5px;
    line-height: 1.65;
}

/* Pasos numerados de una guia */
.post .pasos {
    margin: 0 0 24px;
    padding-left: 24px;
    display: grid;
    gap: 10px;
}
.post .pasos li {
    font-size: 16.5px;
    line-height: 1.6;
    padding-left: 4px;
}
.post .pasos li::marker {
    color: var(--acc);
    font-weight: 700;
}

/* ---------- Capturas de pantalla ---------- */
.captura {
    margin: 28px 0;
    text-align: center;
}
.captura img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    margin: 0 auto;
}
.captura figcaption {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.5;
}

/* ---------- Tabla de conexiones ---------- */
.tabla-wrap {
    overflow-x: auto;
    margin: 24px 0;
}
.tabla {
    border-collapse: collapse;
    width: 100%;
    font-size: 14.5px;
    min-width: 420px;
}
.tabla th,
.tabla td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.tabla thead th {
    background: var(--bg-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.tabla tbody tr:hover {
    background: #fafafb;
}
.tabla code {
    font-size: 13px;
}

/* ---------- PDFs ---------- */
.pdf-tag {
    background: var(--acc);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 3px;
    flex-shrink: 0;
}
.downloads {
    margin-top: 56px;
}
.pdf-list {
    list-style: none;
    display: grid;
    gap: 12px;
    max-width: 640px;
}
.pdf-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.pdf-list a:hover {
    border-color: var(--acc);
    background: #fcf6f5;
}
.attach {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    margin-top: 36px;
}
.attach p {
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    margin: 2px 0 0;
}
.attach strong {
    font-size: 15px;
}
.attach div {
    flex: 1;
}
.btn {
    background: var(--acc);
    color: #fff;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.btn:hover {
    background: var(--acc-dark);
}

/* ---------- Pie ---------- */
.site-footer {
    background: var(--dark);
    color: #b8b8c0;
    padding: 48px 0 24px;
    font-size: 14px;
    margin-top: 64px;
}
.fcols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    padding-bottom: 32px;
}
.fcols h5 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.fcols ul {
    list-style: none;
    display: grid;
    gap: 8px;
}
.fcols a:hover {
    color: #fff;
}

/* Redes sociales: SVG en linea, sin dependencias externas.
   El icono hereda el color del enlace via fill:currentColor. */
.redes a {
    display: flex;
    align-items: center;
    gap: 10px;
}
.redes svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.15s;
}
.redes a:hover svg {
    opacity: 1;
}
.redes a:focus-visible {
    outline: 2px solid var(--acc);
    outline-offset: 3px;
    border-radius: 2px;
}
.fbot {
    border-top: 1px solid #414147;
    padding-top: 20px;
    font-size: 13px;
    color: #85858e;
}

@media (max-width: 720px) {
    .nav {
        height: auto;
        flex-direction: column;
        gap: 12px;
        padding: 14px 0;
    }
    .nav ul {
        gap: 16px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .attach {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Diagrama interactivo de la placa ---------- */
.diagrama {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 32px 0;
}

/* Contenedor de la imagen: las zonas se posicionan sobre el */
.diagrama-img {
    position: relative;
    display: inline-block;
    border: 2px solid #2a3441;
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 420px;
    min-width: 0;
    line-height: 0;
}
.diagrama-img img {
    display: block;
    width: 100%;
    height: auto;
}

/* Zonas clicables. Van en % para escalar junto con la imagen. */
.zona {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 4px;
    background: none;
    padding: 0;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}
.zona:hover {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.15);
}
.zona:focus-visible {
    outline: 2px solid #00d9ff;
    outline-offset: 2px;
}
.zona.activa {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.6);
}

/* Panel lateral con la descripcion del componente */
.diagrama-panel {
    flex: 1 1 300px;
    min-width: 260px;
    max-width: 400px;
    align-self: stretch;
    background: #1a232e;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 22px;
}
.diagrama-panel h3 {
    margin: 0 0 10px;
    color: #00d9ff;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.diagrama-panel p {
    color: #c8d3df;
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}
.diagrama-ayuda {
    font-size: 13px;
    color: var(--muted);
    margin-top: 14px;
    width: 100%;
}

@media (max-width: 760px) {
    .diagrama {
        flex-direction: column;
    }
    .diagrama-panel {
        max-width: none;
        width: 100%;
    }
}

/* ---------- Blog: menu lateral + listado ---------- */
.layout-blog {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: start;
}
.grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Menu de categorias */
.lateral {
    position: sticky;
    top: 92px;
}
.lateral-titulo {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 12px;
    font-weight: 700;
}
.lateral-menu {
    list-style: none;
    display: grid;
    gap: 2px;
}
.lateral-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 15px;
    transition:
        background 0.15s,
        color 0.15s;
}
.lateral-menu a:hover {
    background: var(--bg-alt);
}
.lateral-menu a.activa {
    background: var(--acc);
    color: #fff;
    font-weight: 600;
}
.lateral-menu .cuenta {
    font-size: 12px;
    color: var(--muted);
    background: var(--bg-alt);
    border-radius: 10px;
    padding: 1px 8px;
    min-width: 24px;
    text-align: center;
}
.lateral-menu a:hover .cuenta {
    background: #fff;
}
.lateral-menu a.activa .cuenta {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Paginacion */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.paginacion a {
    font-size: 14px;
    font-weight: 600;
    color: var(--acc);
}
.paginacion a:hover {
    text-decoration: underline;
}
.paginacion .inactivo {
    font-size: 14px;
    color: #b8b8c0;
    cursor: default;
}
.pag-nums {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.pag-nums a,
.pag-nums .actual {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 14px;
    padding: 0 8px;
}
.pag-nums a {
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 500;
}
.pag-nums a:hover {
    border-color: var(--acc);
    color: var(--acc);
    text-decoration: none;
}
.pag-nums .actual {
    background: var(--acc);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 900px) {
    .layout-blog {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .lateral {
        position: static;
    }
    .lateral-menu {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }
    .lateral-menu a {
        white-space: nowrap;
        border: 1px solid var(--line);
    }
    .grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .grid.grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Banner de ficha: texto | imagen ---------- */
.banner {
    background: var(--dark);
    color: #ededf2;
}
.banner-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 52px;
    padding-bottom: 52px;
}

.banner-texto .crumb {
    color: #9a9aa6;
    margin-bottom: 14px;
}
.banner-texto .crumb a {
    color: #9a9aa6;
}
.banner-texto .crumb a:hover {
    color: #fff;
}
.banner-texto .cat {
    margin-bottom: 14px;
}
.banner-texto h1 {
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 16px;
}
.banner-texto p {
    font-size: 17px;
    line-height: 1.7;
    color: #bfbfca;
    margin-bottom: 26px;
    max-width: 52ch;
}

.banner-cta {
    display: inline-block;
    background: var(--acc);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s;
}
.banner-cta:hover {
    background: var(--acc-dark);
}
.banner-cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.banner-img img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* El articulo ya no necesita separacion superior: la da el banner */
.banner + .post {
    padding-top: 40px;
}

@media (max-width: 860px) {
    .banner-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 36px;
        padding-bottom: 36px;
    }
    .banner-img {
        order: -1;
    }
}

/* ==========================================================================
   Ficha de placa: modulos, esquematicos y pinout
   ========================================================================== */

/* Caja de aviso destacada. */
.info-box {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-left: 3px solid var(--acc);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}
.info-box strong {
    color: var(--ink);
}

/* ---------- Lista de modulos ---------- */
.module-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 12px;
    margin: 0 0 32px;
}
.module-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.module-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.module-icon.independent {
    background: #2e9e6b;
}
.module-icon.shared {
    background: #d08324;
}
.module-info {
    min-width: 0;
    flex: 1;
}
.module-info h4 {
    font-size: 14px;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
}
.module-info p {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.module-tag {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.tag-ind {
    background: rgba(46, 158, 107, 0.12);
    color: #1e7048;
}
.tag-shared {
    background: rgba(208, 131, 36, 0.14);
    color: #8a5410;
}

/* ---------- Esquematicos ---------- */
.schematics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.sch-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    background: var(--bg);
}
.sch-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sch-header h3 {
    font-size: 15px;
    margin: 0;
}
.sch-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}
.sch-desc {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}
/* El diagrama ASCII necesita ancho fijo; se desplaza en su propia caja. */
.sch-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre;
    overflow-x: auto;
    background: var(--dark);
    color: #e8e8ec;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0;
}

/* ---------- Tabla de pinout ---------- */
.pinout-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 32px;
}
.pinout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 640px;
}
.pinout-table th,
.pinout-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.pinout-table thead th {
    background: var(--bg-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    position: sticky;
    top: 0;
}
.pinout-table tbody tr:last-child td {
    border-bottom: 0;
}
.pinout-table tbody tr:hover {
    background: var(--bg-alt);
}
.pin-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    white-space: nowrap;
}
.pin-ind {
    background: rgba(46, 158, 107, 0.05);
}
.pin-free {
    background: rgba(139, 92, 246, 0.07);
}
.status-tag {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .module-list,
    .schematics-grid {
        grid-template-columns: 1fr;
    }
    .module-item {
        flex-wrap: wrap;
    }
}

/* La tabla generica tiene min-width:420px, mayor que el ancho util de un
   movil de 390px: sin esto la pagina entera se desplaza en horizontal. */
@media (max-width: 460px) {
    .tabla {
        min-width: 0;
    }
    .tabla th,
    .tabla td {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Indice de contenidos de la ficha de placa. */
.toc {
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 24px 0 28px;
}
.toc h2 {
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 10px !important;
}
.toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}
.toc li {
    font-size: 15px;
    margin-bottom: 6px;
    break-inside: avoid;
}
.toc a {
    color: var(--acc);
}
.toc a:hover {
    text-decoration: underline;
}
/* Compensa la cabecera fija al saltar a un ancla. */
.post h2[id] {
    scroll-margin-top: 84px;
}
@media (max-width: 600px) {
    .toc ol {
        columns: 1;
    }
}
