/* ==========================================================================
   Random Tools — Estilos del home
   ========================================================================== */

.home-grid {
    display: grid;
    grid-template-columns: 1.12fr 1.12fr .92fr;
    gap: 18px;
    align-items: stretch;
}

.home-grid--bottom {
    grid-template-columns: 1.75fr 1fr;
}

/* --- Tarjeta hero -------------------------------------------------------- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    background:
        radial-gradient(130% 100% at 100% 0%, rgba(185, 166, 255, .13), transparent 62%),
        var(--surface);
}

.hero__canvas {
    border-radius: var(--r-lg);
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 128px;
    justify-content: center;
}

.hero__bar {
    height: 9px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--surface-3), transparent);
}

.hero__bar:nth-child(1) { width: 42%; background: linear-gradient(90deg, var(--violet), transparent); opacity: .55; }
.hero__bar:nth-child(2) { width: 88%; }
.hero__bar:nth-child(3) { width: 66%; }
.hero__bar:nth-child(4) { width: 74%; }

.hero__chip {
    position: absolute;
    top: 14px;
    right: 14px;
}

.hero h2 {
    font-size: 19px;
    font-weight: 640;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.hero p {
    font-size: 12.3px;
    color: var(--tx-2);
    margin-top: 7px;
    line-height: 1.55;
}

.hero .btn { width: 100%; }

/* --- Tarjeta de vista previa del motor ----------------------------------- */
.preview__chart {
    height: 152px;
    border-radius: var(--r-lg);
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 6px;
    overflow: hidden;
}

.legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10.8px;
    color: var(--tx-2);
    flex-wrap: wrap;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend i {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    display: block;
}

/* --- Lista de herramientas (columna derecha) ----------------------------- */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface-2);
    transition: border-color .16s ease, transform .16s ease;
}

.tool-row:hover {
    border-color: var(--line-2);
    transform: translateY(-1px);
}

.tool-row .stack strong {
    font-size: 12.5px;
    font-weight: 620;
}

.tool-row .stack span {
    font-size: 10.8px;
    color: var(--tx-3);
}

.tool-row .btn { margin-left: auto; }

/* --- Tabla de herramientas ----------------------------------------------- */
.tool-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.formats {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Anchos estables para el catálogo */
.catalog-table { table-layout: fixed; }
.catalog-table th:nth-child(1) { width: 27%; }
.catalog-table th:nth-child(2) { width: 33%; }
.catalog-table th:nth-child(3) { width: 12%; }
.catalog-table th:nth-child(4) { width: 16%; }
.catalog-table th:nth-child(5) { width: 12%; }
.catalog-table td { vertical-align: middle; }

/* --- Tarjeta de atajos --------------------------------------------------- */
.shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--tx-2);
}

.shortcut:last-of-type { border-bottom: 0; }

/* `kbd` y `.empty` viven en core.css porque los usan varias herramientas. */

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
    .home-grid { grid-template-columns: 1fr 1fr; }
    .home-grid > .card:nth-child(3) { grid-column: 1 / -1; }
    .home-grid--bottom { grid-template-columns: 1fr; }
    .home-grid--bottom > .card:nth-child(3) { grid-column: auto; }
}

@media (max-width: 760px) {
    .home-grid,
    .home-grid--bottom { grid-template-columns: 1fr; }
    .home-grid > .card:nth-child(3) { grid-column: auto; }
}
